Hello Neeraj, On 19.04.21 20:09, Neeraj Pal wrote: > Hello Ahmad, > > Yes, it would be very helpful and straightforward for future users to > set up DHCP networking. > Sure, I will submit a patch to add it in Documentation. > > planning to include this as an example under the link: > https://www.barebox.org/doc/latest/user/networking.html#lowlevel-network-device-configuration > as 1.3.1.1. or if you want in other places then please let me know. Please add it to https://www.barebox.org/doc/latest/boards/sandbox.html Thanks, Ahmad > > Thank you > > Kind regards, > Neeraj > > On Mon, Apr 19, 2021 at 1:16 PM Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote: >> >> Hello Neeraj, >> >> On 17.04.21 06:41, Neeraj Pal wrote: >>> Hi, >>> >>> I successfully configured the networking on sandbox env. >>> So, below are the steps for anyone in need. >>> >>> On host (ubuntu) >>> - ip link show => barebox virtual ethernet device will be listed >>> - sudo brctl addif virbr0 barebox => I already have virtual br0 >>> "virbr0" for Qemu so I have used that to bridge, else create a new >>> bridge >>> - sudo ip link set barebox master virbr0 >>> - sudo dhclient -v barebox >>> >>> On barebox: >>> - dhcp eth0 >> >> That could go into the Documentation to make it easier for future users. >> Would you like to submit a patch? >> >> Thanks for the bug reports btw, >> Ahmad >> >>> >>> logs are given below: >>> barebox@Sandbox:/ dhcp eth0 >>> T T eth0: DHCP client bound to address 192.168.122.216 >>> barebox@Sandbox:/ ping google.com >>> PING google.com (172.217.166.238) >>> host google.com is alive >>> barebox@Sandbox:/ >>> >>> Thanks and regards, >>> Neeraj >>> >>> On Fri, Apr 16, 2021 at 11:37 PM Neeraj Pal <neerajpal09@xxxxxxxxx> wrote: >>>> >>>> Sorry missed, Network info: >>>> >>>> barebox@Sandbox:/ devinfo eth0 >>>> Parent: tap0 >>>> Parameters: >>>> ethaddr: 9e:47:e0:0b:cb:ab (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) >>>> barebox@Sandbox:/ >>>> >>>> After ifup -a >>>> >>>> barebox@Sandbox:/ devinfo eth0 >>>> Parent: tap0 >>>> Parameters: >>>> ethaddr: 80:81:82:83:84:85 (type: MAC) >>>> gateway: 172.0.0.1 (type: ipv4) >>>> ipaddr: 172.0.0.2 (type: ipv4) >>>> linux.bootargs: ip=172.0.0.2:172.0.0.1:172.0.0.1:255.255.255.0::: >>>> (type: string) >>>> linux.devname: (type: string) >>>> mode: static (type: enum) (values: "dhcp", "static", "disabled") >>>> netmask: 255.255.255.0 (type: ipv4) >>>> serverip: 172.0.0.1 (type: string) >>>> barebox@Sandbox:/ ping google.com >>>> ERROR: dns: no nameserver specified in $net.nameserver >>>> T T T T T ping failed: Connection timed out >>>> >>>> It seems like it is not able to get the IP from DHCP so I am trying to >>>> set up static, once. >>>> >>>> On Fri, Apr 16, 2021 at 11:28 PM Neeraj Pal <neerajpal09@xxxxxxxxx> wrote: >>>>> >>>>> Hi, >>>>> >>>>> On Wed, Apr 14, 2021 at 12:37 AM Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote: >>>>>> >>>>>> There is more documentation besides the README. For networking see >>>>>> https://barebox.org/doc/latest/user/networking.html >>>>> >>>>> Thank you for the documentation. I read them and configured the values >>>>> but it is not working, so it may be possible that I am not doing it >>>>> correctly. >>>>> >>>>>> The default barebox boot target is to net boot. It'll try to get >>>>>> a DHCP address and then load some predefined files over TFTP >>>>>> (If it fails, it'll tell you which ones). >>>>>> >>>>>> If that didn't work, you'll need to tell more about your setup? >>>>>> What board are you using barebox on? >>>>> >>>>> Thank you for the information. At present, I haven't tried it on any >>>>> board as I am using it as Sandbox but I have BeagleBone Black and >>>>> Raspberry Pi 3B. >>>>> >>>>>> Part of the question reads like you are using it while Linux is >>>>>> running (sandbox) and some other like you'd run it directly as >>>>>> bootloader. Also what kind of errors do you get, can you copy them here? >>>>> >>>>> Yes, I am trying to execute it as Sandbox and while executing through >>>>> sudo please find the information given below: >>>>> >>>>> sudo ./barebox >>>>> >>>>> add stickypage initially unbacked by file >>>>> >>>>> >>>>> barebox 2021.04.0-00056-gaf0f068a6 #1 Fri Apr 16 23:11:01 IST 2021 >>>>> >>>>> >>>>> Board: Sandbox >>>>> console: registered as cs0 >>>>> netconsole: registered as netconsole-1 >>>>> hostfile 7f455b09a000.stickypage.of: registered as character device >>>>> sandbox-watchdog watchdog.of: probed >>>>> malloc space: 0x7f4559e21010 -> 0x7f455ae2100f (size 16 MiB) >>>>> state: New state registered 'state' >>>>> ERROR: state: No meta data header found >>>>> ERROR: state: No meta data header found >>>>> ERROR: state: No meta data header found >>>>> ERROR: state: Failed to find any valid state copy in any bucket >>>>> ERROR: state: Failed to read state with format raw, -2 >>>>> WARNING: state state.of: Failed to load persistent state, continuing >>>>> with defaults, -2 >>>>> super: JFFS version 2.2. © 2001-2006 Red Hat, Inc. >>>>> envfs: no envfs (magic mismatch) - envfs never written? >>>>> >>>>> ******************************************************* >>>>> *** Inconsistent barebox state buckets detected *** >>>>> *** This is normal for a first boot *** >>>>> *** barebox will repair them on next poweroff/reset *** >>>>> ******************************************************* >>>>> barebox@Sandbox:/ ping google.com >>>>> ERROR: dns: no nameserver specified in $net.nameserver >>>>> ping failed: No route to host >>>>> barebox@Sandbox:/ dhcp >>>>> WARNING: eth0: No MAC address set. Using random address 9e:47:e0:0b:cb:ab >>>>> T T T T T T T T T T T T T T T T T T T T dhcp: Connection timed out >>>>> barebox@Sandbox:/ ping google.com >>>>> ERROR: dns: no nameserver specified in $net.nameserver >>>>> ping failed: No route to host >>>>> barebox@Sandbox:/ >>>>> >>>>> barebox@Sandbox:/ devinfo >>>>> `-- global >>>>> `-- nv >>>>> `-- platform >>>>> `-- machine >>>>> `-- state.of >>>>> `-- 7f455b09a000.stickypage.of >>>>> `-- 0x00000000-0x00000fff ( 4 KiB): /dev/stickypage >>>>> `-- 0x00000400-0x00000bff ( 2 KiB): /dev/stickypage.env >>>>> `-- 0x00000c00-0x00000fff ( 1 KiB): /dev/stickypage.state >>>>> `-- bmode >>>>> `-- 7f455b09a000.stickypage:partitions.of >>>>> `-- power.of >>>>> `-- watchdog.of >>>>> `-- wdog0 >>>>> `-- sound.of >>>>> `-- led.of >>>>> `-- console0 >>>>> `-- cs0 >>>>> `-- 0x00000000-0xffffffffffffffff ( 0 Bytes): /dev/cs0 >>>>> `-- mem0 >>>>> `-- 0x00000000-0xffffffffffffffff ( 0 Bytes): /dev/mem >>>>> `-- netconsole >>>>> `-- 0x00000000-0xffffffffffffffff ( 0 Bytes): /dev/netconsole-1 >>>>> `-- tap0 >>>>> `-- eth0 >>>>> `-- sdlfb0 >>>>> `-- devrandom0 >>>>> `-- chosen:environment.of >>>>> `-- spi >>>>> `-- i2c >>>>> `-- fs >>>>> `-- ramfs0 >>>>> `-- devfs0 >>>>> `-- pstore0 >>>>> `-- state >>>>> barebox@Sandbox:/ >>>>> >>>>> I am doing ping but it doesn't have any dns entry and route to resolve it. >>>>> >>>>> Please let me know for any other information. >>>>> >>>>> Thanks and regards, >>>>> Neeraj >>> >> >> -- >> 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 | > -- 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 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox