mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Neeraj Pal <neerajpal09@gmail.com>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH v2] Documentation: some extra steps requires for DHCP network configuration for sandbox on the host OS
Date: Thu, 22 Apr 2021 12:15:35 +0530	[thread overview]
Message-ID: <CANi4_RXQMObqajAKM1L=p7sRcLh_eQwdDgH0+CLXPybqPjkYuA@mail.gmail.com> (raw)
In-Reply-To: <790f7dec-aef4-6e9c-c34c-d0001440956a@rempel-privat.de>

Hi Oleksij,

Thank you for your inputs.

I will modify the patch as per your suggestions and share it again.

The issue is I already have Qemu virbr0 bridge, so it is very easy to
setup but in case of no already configured bridge available then I am
facing some issues to setup bridge manually, I followed lots of blogs
and tutorials but none of them working for my conditions and none of
them allocates IP address to barebox, tried both dhcp (dhclient -v
br0) and statically allocate to bridge.

However, this are no issues with barebox in this case, it is something
either I am missing or misunderstanding. So, that is  why I have used
Qemu virbr0 bridge and also suggested in the documents.

Also tried the steps suggested by you but in case of virbr0 it is
working fine and easy to setup but when creating manually bridge then
it is not allocating any IP.

Please share some inputs to help me to configure manually without Qemu
so I can also document them in the docs.


Thanks and regards,
Neeraj

On Thu, Apr 22, 2021 at 10:06 AM Oleksij Rempel <linux@rempel-privat.de> wrote:
>
> Hi,
>
> thank you for your patch!
>
> Am 21.04.21 um 20:08 schrieb Neeraj Pal:
> > Signed-off-by: Neeraj Pal <neerajpal09@gmail.com>
> > ---
> >  Documentation/boards/sandbox.rst | 66 ++++++++++++++++++++++++++++++++
> >  1 file changed, 66 insertions(+)
> >
> > diff --git a/Documentation/boards/sandbox.rst b/Documentation/boards/sandbox.rst
> > index e9e518365..925dfc808 100644
> > --- a/Documentation/boards/sandbox.rst
> > +++ b/Documentation/boards/sandbox.rst
> > @@ -74,3 +74,69 @@ Available sandbox invocation options include:
> >
> >  To terminate barebox and return to the calling shell, the poweroff command is
> >  suitable.
> > +
> > +Network configuration
> > +---------------------
> > +
> > +While running the sandbox, the following steps are required
> > +
> > +* On host
> > +
> > +  * virbr0: virtual bridge interface created by Qemu (easy method)
> > +
> > +  * if Qemu virtual bridge (virbr0) is not available then manually create and configure one bridge like "br0"
> > +
> > +    .. code-block:: console
> > +
> > +        $ ip link show
> > +        4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
> > +            link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> > +        6: barebox: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
> > +            link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> > +
> > +    .. code-block:: console
> > +
> > +        $ sudo apt install bridge-utils
> > +        $ sudo ifconfig barebox up
> > +        $ sudo brctl addif virbr0 barebox
> > +        $ sudo ip link set barebox master virbr0
> > +        $ sudo dhclient -v virbr0
>
> bridge-utils and ifconfig are deprecated tools. Please use ip utils instead. Usual bridge
> configuration with ip utils looks like:
>
> # create bridge interface with name br0
> ip l a name br0 type bridge
> # bring up bridge interface
>
> ip l s dev br0 up
> # link existing eth0 interface to the bridge br0
> ip l s eth0 master br0
> ip l s dev eth0 up
> ip l s eth1 master br0
> ip l s dev eth1 up
>
>
>
> In case you wont to assign static address to the bridge interface:
> ip a a 172.17.1.1/24 dev br0
>
>
> > +
> > +* On Sandbox
> > +
> > +    .. code-block:: console
> > +
> > +        barebox@Sandbox:/ devinfo eth0
> > +        Parent: tap0
> > +        Parameters:
> > +          ethaddr: 00:00:00:00:00:00 (type: MAC)
> > +          gateway: 0.0.0.0 (type: ipv4)
> > +          ipaddr: 0.0.0.0 (type: ipv4)
> > +          linux.bootargs:  (type: string)
> > +          linux.devname:  (type: string)
> > +          mode: dhcp (type: enum) (values: "dhcp", "static", "disabled")
> > +          netmask: 0.0.0.0 (type: ipv4)
> > +          serverip:  (type: string)
> > +
> > +    .. code-block:: console
> > +
> > +        barebox@Sandbox:/ dhcp eth0
> > +        WARNING: eth0: No MAC address set. Using random address c2:2c:a1:17:b8:47
> > +        T eth0: DHCP client bound to address 192.168.122.21
> > +        barebox@Sandbox:/ ping google.com
> > +        PING google.com (172.217.167.46)
> > +        host google.com is alive
> > +
> > +    .. code-block:: console
> > +
> > +        barebox@Sandbox:/ devinfo eth0
> > +        Parent: tap0
> > +        Parameters:
> > +          ethaddr: c2:2c:a1:17:b8:47 (type: MAC)
> > +          gateway: 192.168.122.1 (type: ipv4)
> > +          ipaddr: 192.168.122.21 (type: ipv4)
> > +          linux.bootargs:  (type: string)
> > +          linux.devname:  (type: string)
> > +          mode: dhcp (type: enum) (values: "dhcp", "static", "disabled")
> > +          netmask: 255.255.255.0 (type: ipv4)
> > +          serverip: 192.168.122.1 (type: string)
> >
>
>
> --
> Regards,
> Oleksij

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-04-22  6:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 18:17 [PATCH] Documentation: sandbox.rst: added dhcp network configuration Neeraj Pal
2021-04-21 11:32 ` Ahmad Fatoum
2021-04-21 17:45   ` Neeraj Pal
2021-04-21 18:08     ` [PATCH v2] Documentation: some extra steps requires for DHCP network configuration for sandbox on the host OS Neeraj Pal
2021-04-22  4:36       ` Oleksij Rempel
2021-04-22  6:45         ` Neeraj Pal [this message]
2021-05-08 19:08         ` [PATCH v3] Documentation: boards: sandbox: " Neeraj Pal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANi4_RXQMObqajAKM1L=p7sRcLh_eQwdDgH0+CLXPybqPjkYuA@mail.gmail.com' \
    --to=neerajpal09@gmail.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=linux@rempel-privat.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox