* Assign IP address at boot time
@ 2021-03-09 21:27 jchludzinski
2021-03-10 0:45 ` [yocto] " Rudolf J Streif
2021-03-10 9:39 ` Zoran
0 siblings, 2 replies; 12+ messages in thread
From: jchludzinski @ 2021-03-09 21:27 UTC (permalink / raw)
To: Yocto
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Where do I assign a static IP address to my sole network interface?
I tried using the Linux boot parameters (in extlinux.conf):
LABEL Arria10 SOCDK SDMMC
KERNEL ../zImage
FDT ../socfpga_arria10_phead.dtb
APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk
console=ttyS0,115200n8 ip=192.168.0.101:255.255.255.0:eth0
Then I tried editing: /etc/network/interfaces
iface eth0 inet static
address 192.168.0.101
netmask 255.255.255.0
Both failed. Where do I go?
[-- Attachment #2: Type: text/html, Size: 1584 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-09 21:27 Assign IP address at boot time jchludzinski
@ 2021-03-10 0:45 ` Rudolf J Streif
2021-03-10 7:34 ` jchludzinski
2021-03-10 9:39 ` Zoran
1 sibling, 1 reply; 12+ messages in thread
From: Rudolf J Streif @ 2021-03-10 0:45 UTC (permalink / raw)
To: jchludzinski, Yocto
[-- Attachment #1.1.1.1: Type: text/plain, Size: 1136 bytes --]
Hi there,
On 3/9/21 1:27 PM, jchludzinski via lists.yoctoproject.org wrote:
> Where do I assign a static IP address to my sole network interface?
>
That depends on whether or not you are using a network manager and if so
which one.
You haven't told us much about your board and it's network interfaces
and how you built your system.
> I tried using the Linux boot parameters (in extlinux.conf):
>
> *LABEL Arria10 SOCDK SDMMC*
> * KERNEL ../zImage*
> * FDT ../socfpga_arria10_phead.dtb*
> * APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk
> console=ttyS0,115200n8 ip=192.168.0.101:255.255.255.0:eth0*
> Then I tried editing: /etc/network/interfaces
> *iface eth0 inet static *
> *address 192.168.0.101*
> *netmask 255.255.255.0*
> Both failed. Where do I go?
To start, do you have the driver required for your network interface?
You can use ifconfig -a to see if your network interface is detected by
the kernel. You should also look at the kernel log if the network
interface is configured.
:rjs
>
>
>
--
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
[-- Attachment #1.1.1.2: Type: text/html, Size: 3087 bytes --]
[-- Attachment #1.1.2: OpenPGP_0x8D8CA82927339B75.asc --]
[-- Type: application/pgp-keys, Size: 1717 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 505 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 0:45 ` [yocto] " Rudolf J Streif
@ 2021-03-10 7:34 ` jchludzinski
2021-03-10 16:02 ` Rudolf J Streif
0 siblings, 1 reply; 12+ messages in thread
From: jchludzinski @ 2021-03-10 7:34 UTC (permalink / raw)
To: Rudolf J Streif; +Cc: Yocto
> To start, do you have the driver required for your network interface?
Yes, the network/Ethernet device is recognized by Linux and the
appropriate driver is loaded. If I use:
$ ip add add 192.168.9.101/24 dev eth0
I’m up and running. But I want the IP assignment to happen during boot
time.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 7:34 ` jchludzinski
@ 2021-03-10 16:02 ` Rudolf J Streif
2021-03-10 19:31 ` jchludzinski
0 siblings, 1 reply; 12+ messages in thread
From: Rudolf J Streif @ 2021-03-10 16:02 UTC (permalink / raw)
To: jchludzinski; +Cc: Yocto
[-- Attachment #1.1.1: Type: text/plain, Size: 481 bytes --]
On 3/9/21 11:34 PM, jchludzinski wrote:
>> To start, do you have the driver required for your network interface?
>
> Yes, the network/Ethernet device is recognized by Linux and the
> appropriate driver is loaded. If I use:
>
> $ ip add add 192.168.9.101/24 dev eth0
>
> I’m up and running. But I want the IP assignment to happen during boot
> time.
What is your startup manager? systemd or SysVInit?
--
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
[-- Attachment #1.1.2: OpenPGP_0x8D8CA82927339B75.asc --]
[-- Type: application/pgp-keys, Size: 1717 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 505 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 16:02 ` Rudolf J Streif
@ 2021-03-10 19:31 ` jchludzinski
2021-03-10 19:51 ` Rudolf J Streif
0 siblings, 1 reply; 12+ messages in thread
From: jchludzinski @ 2021-03-10 19:31 UTC (permalink / raw)
To: Rudolf J Streif; +Cc: Yocto
> What is your startup manager? systemd or SysVInit?
systemd
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 19:31 ` jchludzinski
@ 2021-03-10 19:51 ` Rudolf J Streif
2021-03-10 21:32 ` jchludzinski
0 siblings, 1 reply; 12+ messages in thread
From: Rudolf J Streif @ 2021-03-10 19:51 UTC (permalink / raw)
To: jchludzinski; +Cc: Yocto
[-- Attachment #1.1.1: Type: text/plain, Size: 390 bytes --]
Create the file /etc/systemd/network/eth0.conf:
[Match]
Name=eth0
[Network]
Address=<ip>
Gateway=<ip>
DNS=<ip>
Restart systemd-networkd
# systemctl restart systemd-networkd
or reboot.
:rjs
On 3/10/21 11:31 AM, jchludzinski wrote:
>
>> What is your startup manager? systemd or SysVInit?
>
> systemd
--
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
[-- Attachment #1.1.2: OpenPGP_0x8D8CA82927339B75.asc --]
[-- Type: application/pgp-keys, Size: 1717 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 505 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 19:51 ` Rudolf J Streif
@ 2021-03-10 21:32 ` jchludzinski
2021-03-10 23:50 ` Rudolf J Streif
0 siblings, 1 reply; 12+ messages in thread
From: jchludzinski @ 2021-03-10 21:32 UTC (permalink / raw)
To: Rudolf J Streif; +Cc: Yocto
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
> Create the file /etc/systemd/network/eth0.conf:
>
> [Match]
> Name=eth0
> [Network]
> Address=<ip>
> Gateway=<ip>
> DNS=<ip>
That didn't work BUT editing /lib/systemd/network/80-wired.network
[Match]
Name=en* eth*
KernelCommandLine=!nfsroot
[Match]
Name=eth0
[Network]
Address=192.168.0.101/24
#Gateway=<ip>
#DNS=<ip>
[Network]
DHCP=no
[DHCP]
#RouteMetric=10
#ClientIdentifier=mac
... did work, after:
root@arria10:~# _systemctl restart systemd-networkd_
[-- Attachment #2: Type: text/html, Size: 1045 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 21:32 ` jchludzinski
@ 2021-03-10 23:50 ` Rudolf J Streif
2021-03-11 18:12 ` jchludzinski
0 siblings, 1 reply; 12+ messages in thread
From: Rudolf J Streif @ 2021-03-10 23:50 UTC (permalink / raw)
To: jchludzinski; +Cc: Yocto
[-- Attachment #1.1.1.1: Type: text/plain, Size: 890 bytes --]
On 3/10/21 1:32 PM, jchludzinski wrote:
>> Create the file /etc/systemd/network/eth0.conf:
>>
>> [Match]
>> Name=eth0
>> [Network]
>> Address=<ip>
>> Gateway=<ip>
>> DNS=<ip>
>
> That didn't work BUT editing /lib/systemd/network/80-wired.network
> [Match]
> Name=en* eth*
> KernelCommandLine=!nfsroot
>
> [Match]
> Name=eth0
> [Network]
> Address=192.168.0.101/24
> #Gateway=<ip>
> #DNS=<ip>
>
> [Network]
> DHCP=no
>
> [DHCP]
> #RouteMetric=10
> #ClientIdentifier=mac
> ... did work, after:
> *root@arria10:~#* /systemctl restart systemd-networkd/
Preferred method for local configuration is using /etc/systemd/network.
However, the probable reason why it did not work is that the file should
be eth0.network. The name of the file(s) do not matter that much. The
extension does though.
--
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
[-- Attachment #1.1.1.2: Type: text/html, Size: 1850 bytes --]
[-- Attachment #1.1.2: OpenPGP_0x8D8CA82927339B75.asc --]
[-- Type: application/pgp-keys, Size: 1717 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 505 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-10 23:50 ` Rudolf J Streif
@ 2021-03-11 18:12 ` jchludzinski
2021-03-11 22:42 ` Rudolf J Streif
2021-03-12 5:37 ` Chen Qi
0 siblings, 2 replies; 12+ messages in thread
From: jchludzinski @ 2021-03-11 18:12 UTC (permalink / raw)
To: Rudolf J Streif; +Cc: Yocto
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
Can this be done using boot parameters?
Something like(?):
LABEL Arria10 SOCDK SDMMC
KERNEL ../zImage
FDT ../socfpga_arria10_phead.dtb
APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk
console=ttyS0,115200n8 ip=192.168.0.101:255.255.255.0:eth0
[-- Attachment #2: Type: text/html, Size: 674 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-11 18:12 ` jchludzinski
@ 2021-03-11 22:42 ` Rudolf J Streif
2021-03-12 5:37 ` Chen Qi
1 sibling, 0 replies; 12+ messages in thread
From: Rudolf J Streif @ 2021-03-11 22:42 UTC (permalink / raw)
To: jchludzinski; +Cc: Yocto
[-- Attachment #1.1.1.1: Type: text/plain, Size: 440 bytes --]
On 3/11/21 10:12 AM, jchludzinski wrote:
> Can this be done using boot parameters?
Not that I know of. Why anyway?
>
> Something like(?):
>
> LABEL Arria10 SOCDK SDMMC
> KERNEL ../zImage
> FDT ../socfpga_arria10_phead.dtb
> APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk
> console=ttyS0,115200n8 *ip=192.168.0.101:255.255.255.0:eth0*
--
Rudolf J Streif
CEO/CTO ibeeto
+1.855.442.3386 x700
[-- Attachment #1.1.1.2: Type: text/html, Size: 1333 bytes --]
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 1717 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 505 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-11 18:12 ` jchludzinski
2021-03-11 22:42 ` Rudolf J Streif
@ 2021-03-12 5:37 ` Chen Qi
1 sibling, 0 replies; 12+ messages in thread
From: Chen Qi @ 2021-03-12 5:37 UTC (permalink / raw)
To: jchludzinski, Rudolf J Streif; +Cc: Yocto
[-- Attachment #1: Type: text/plain, Size: 504 bytes --]
Try adding the following line to the match section of the
80-wired.network file.
KernelCommandLine=!ip
Regards,
Chen Qi
On 03/12/2021 02:12 AM, jchludzinski via lists.yoctoproject.org wrote:
> Can this be done using boot parameters?
>
> Something like(?):
>
> LABEL Arria10 SOCDK SDMMC
> KERNEL ../zImage
> FDT ../socfpga_arria10_phead.dtb
> APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk
> console=ttyS0,115200n8 *ip=192.168.0.101:255.255.255.0:eth0*
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1320 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [yocto] Assign IP address at boot time
2021-03-09 21:27 Assign IP address at boot time jchludzinski
2021-03-10 0:45 ` [yocto] " Rudolf J Streif
@ 2021-03-10 9:39 ` Zoran
1 sibling, 0 replies; 12+ messages in thread
From: Zoran @ 2021-03-10 9:39 UTC (permalink / raw)
To: jchludzinski; +Cc: Yocto
Hello,
Maybe you can stop in the U-Boot monitor, and check your environment?
=>
=> print serverip
=> print ipaddr
=> print gatewayip
=> print gw_ip
And see what and how your bootcmd and similar env variables look like?
And if you do not have defined above, to add them (according to ash
script) and try booting again?
Zee
_______
On Tue, Mar 9, 2021 at 10:28 PM jchludzinski via
lists.yoctoproject.org
<jchludzinski=vivaldi.net@lists.yoctoproject.org> wrote:
>
> Where do I assign a static IP address to my sole network interface?
>
> I tried using the Linux boot parameters (in extlinux.conf):
>
> LABEL Arria10 SOCDK SDMMC
> KERNEL ../zImage
> FDT ../socfpga_arria10_phead.dtb
> APPEND root=/dev/mmcblk0p2 rw rootwait earlyprintk console=ttyS0,115200n8 ip=192.168.0.101:255.255.255.0:eth0
>
> Then I tried editing: /etc/network/interfaces
>
> iface eth0 inet static
> address 192.168.0.101
> netmask 255.255.255.0
>
> Both failed. Where do I go?
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2021-03-12 5:27 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 21:27 Assign IP address at boot time jchludzinski
2021-03-10 0:45 ` [yocto] " Rudolf J Streif
2021-03-10 7:34 ` jchludzinski
2021-03-10 16:02 ` Rudolf J Streif
2021-03-10 19:31 ` jchludzinski
2021-03-10 19:51 ` Rudolf J Streif
2021-03-10 21:32 ` jchludzinski
2021-03-10 23:50 ` Rudolf J Streif
2021-03-11 18:12 ` jchludzinski
2021-03-11 22:42 ` Rudolf J Streif
2021-03-12 5:37 ` Chen Qi
2021-03-10 9:39 ` Zoran
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.