[PATCH] Documentation: sandbox.rst: added dhcp network configuration
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Apr 21 12:32:54 BST 2021
Hello Neeraj,
On 20.04.21 20:17, Neeraj Pal wrote:
> Hello Ahmad,
>
> I have added the DHCP network configuration as discussed
> (http://lists.infradead.org/pipermail/barebox/2021-April/035795.html)
> Please confirm and let me know if needs any modifications.
>
> Thanks,
> Neeraj
Thanks.
Please send this as Git patch, i.e. with a commit message. This is most
easily done, by using git send-email. Write something in the commit message
that explains the change, e.g.:
Network configuration on sandbox requires some extra steps on the host
OS. Document these.
And don't forget your Signed-off-by. You should also mark the patch as v2
(pass -v2 to git send-email if you use that).
Some more comments inline.
>
> diff --git a/Documentation/boards/sandbox.rst b/Documentation/boards/sandbox.rst
> index e9e518365..7016312e9 100644
> --- a/Documentation/boards/sandbox.rst
> +++ b/Documentation/boards/sandbox.rst
> @@ -74,3 +74,79 @@ Available sandbox invocation options include:
>
> To terminate barebox and return to the calling shell, the poweroff command is
> suitable.
> +
> +Network configuration for Sandbox
> +-------------------------------------------------
I am not sure Sphinx likes it when the line is longer than the
text. Please adjust and while at it you could drop the "for Sandbox"
part. The whole file (and resulting page) is about sandbox.
> +
> +After running the sanbox, the following steps are required to configure network
s/sanbox/sandbox/. Do you do do these steps while sandbox is running?
If so, it might be better written as While sandbox is running, ... etc.
> +through dhcp.
> +Following configuration tested on Ubuntu 20.04 focal LTS
I think you can safely omit this line, but it doesn't hurt.
> +
> +* 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
> + 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state
> UNKNOWN mode DEFAULT group default qlen 1000
> + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> + 2: enp0s31f6: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500
> qdisc fq state DOWN mode DEFAULT group default qlen 1000
> + link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> + 3: wlp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
> noqueue state UP mode DORMANT group default qlen 1000
> + link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> + 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
You could delete the interfaces that are irrelevant, but that's just a nitpick.
> + 5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq master
> virbr0 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
> +
> +* On Sandbox
> +
> + .. code-block:: console
> +
> + barebox at 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 at 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 at Sandbox:/ ping google.com
> + PING google.com (172.217.167.46)
> + host google.com is alive
> +
> + .. code-block:: console
> +
> + barebox at 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)
The rest looks fine.
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list