network configuration setup - dhcp

Neeraj Pal neerajpal09 at gmail.com
Fri Apr 16 19:07:07 BST 2021


Sorry missed, Network info:

barebox at 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 at Sandbox:/

After ifup -a

barebox at 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 at 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 at gmail.com> wrote:
>
> Hi,
>
> On Wed, Apr 14, 2021 at 12:37 AM Ahmad Fatoum <a.fatoum at pengutronix.de> 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 at Sandbox:/ ping google.com
> ERROR: dns: no nameserver specified in $net.nameserver
> ping failed: No route to host
> barebox at 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 at Sandbox:/ ping google.com
> ERROR: dns: no nameserver specified in $net.nameserver
> ping failed: No route to host
> barebox at Sandbox:/
>
> barebox at 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 at 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



More information about the barebox mailing list