Jump to content

Interface only get ip config if plugged on boot


JonatasPrust

Recommended Posts

Hi,

Nanopi R1 -  Kernel and Armbian version: 4.19.62-sunxi #5.92

 

I have the following problem:

If I put the ethernet cable on the interface, and then turn on the nano pi, the interface receives a valid ip.

But the problem is, if I start nanopi without the cable connected, and I connect after system boot, the interface does not receive ip configuration.

Configs and logs:

/etc/network/interfaces:

source /etc/network/interfaces.d/*

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
        address 10.100.3.1
        netmask 255.255.255.0
        gateway 10.100.3.1

auto lo
iface lo inet loopback

up command iptables-restore < /scripts/iptables

 

/scripts/iptables

*nat
:PREROUTING ACCEPT [120:10027]
:INPUT ACCEPT [11:1747]
:OUTPUT ACCEPT [24:1848]
:POSTROUTING ACCEPT [4:304]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT

 

journalctl  -b 0 -u NetworkManager | grep eth0

Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1115] keyfile: add connection /run/NetworkManager/system-connections/eth0.nmconnection (91ae80f1-5092-4e36-8f48-72f86df06873,"eth0")
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1178] device (eth0): state change: unavailable -> disconnected (reason 'connection-assumed', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1247] device (eth0): Activation: starting connection 'eth0' (91ae80f1-5092-4e36-8f48-72f86df06873)
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1258] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1287] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1309] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1328] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1372] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1388] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'external')
Mar 25 01:38:29 2-0211 NetworkManager[556]: <info>  [1648183109.1538] device (eth0): Activation: successful, device activated.
Mar 25 01:38:37 2-0211 NetworkManager[556]: <info>  [1648183117.8873] device (eth0): carrier: link connected
Mar 25 01:39:56 2-0211 NetworkManager[556]: <info>  [1648183196.5941] device (eth0): state change: activated -> unavailable (reason 'carrier-changed', sys-iface-state: 'external')
Mar 25 01:39:56 2-0211 NetworkManager[556]: <info>  [1648183196.7318] device (eth0): carrier: link connected
Mar 25 01:39:56 2-0211 NetworkManager[556]: <info>  [1648183196.7333] device (eth0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'external')

 

Link to comment
Share on other sites

16 minutes ago, JonatasPrust said:

4.19.62-sunxi #5.92

Your firmware is WAY outdated. Resources of Armbian are limited and we can only cover the most recent version of Armbian which is 22.02 atm.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines