From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Neeraj Pal <neerajpal09@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: network configuration setup - dhcp
Date: Wed, 21 Apr 2021 13:33:42 +0200 [thread overview]
Message-ID: <343e3157-e7b3-834f-dc07-a9641f437838@pengutronix.de> (raw)
In-Reply-To: <CANi4_RWFjaaHpJCbY7SXpZyYsAr=saTW1UCrLbS+QQr2Z_ZKFQ@mail.gmail.com>
Hello Neeraj,
On 21.04.21 12:22, Neeraj Pal wrote:
> Hello Ahmad,
>
> My apologies if you are not okay about the patch that I directly shared to
> you.
> So, please let me know if you want me to resend the patch with "to"
> @barebox and CC to you.
No need to apologize. I just hadn't had the time yet to review it.
I've done so now.
Cheers,
Ahmad
>
> Thanks & Regards,
> Neeraj
>
> On Tue, 20 Apr, 2021, 11:57 pm Neeraj Pal, <neerajpal09@gmail.com> wrote:
>
>> Hello Ahmad,
>>
>> Sure, Thank you for sharing.
>>
>> I have submitted the patch
>> (http://lists.infradead.org/pipermail/barebox/2021-April/035814.html)
>> to you and CC to barebox@
>> Please let me know if needs any modifications or improvements.
>>
>> Thanks,
>> Neeraj
>>
>> On Tue, Apr 20, 2021 at 12:44 AM Ahmad Fatoum <a.fatoum@pengutronix.de>
>> wrote:
>>>
>>> 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@pengutronix.de>
>> 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@gmail.com>
>> 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@gmail.com>
>> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On Wed, Apr 14, 2021 at 12:37 AM Ahmad Fatoum <
>> a.fatoum@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@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
>> |
>>
>
--
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-04-21 11:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 17:07 Neeraj Pal
2021-04-13 19:07 ` Ahmad Fatoum
2021-04-16 17:58 ` Neeraj Pal
2021-04-16 18:07 ` Neeraj Pal
2021-04-17 4:41 ` Neeraj Pal
2021-04-19 7:46 ` Ahmad Fatoum
2021-04-19 18:09 ` Neeraj Pal
2021-04-19 19:14 ` Ahmad Fatoum
2021-04-20 18:27 ` Neeraj Pal
[not found] ` <CANi4_RWFjaaHpJCbY7SXpZyYsAr=saTW1UCrLbS+QQr2Z_ZKFQ@mail.gmail.com>
2021-04-21 11:33 ` Ahmad Fatoum [this message]
2021-04-21 18:44 ` 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=343e3157-e7b3-834f-dc07-a9641f437838@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=neerajpal09@gmail.com \
/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