dentproject / dentOS

dentOS SwitchDev based NOS
Other
200 stars 59 forks source link

dhcp address not requested from dhcp server after reboot #185

Closed mgheorghe closed 1 year ago

mgheorghe commented 1 year ago

issue

  1. reboot the dent switch
  2. after it comes back up from serial do: ip addr
  3. observe that ma1 interface has no ip address
  4. /etc/network/interfaces.d folder is empty

debug steps:

logs:

5: ma1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 2048
    link/ether 90:3c:b3:8b:ef:34 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::923c:b3ff:fe8b:ef34/64 scope link
       valid_lft forever preferred_lft forever

[    6.277239] mvpp2 f2000000.ethernet ma1: renamed from eth0
found interface name alias eth0 --> ma1
remapping interface eth0 --> ma1
*            ma1: 90:3c:b3:8b:ef:34
NETDEV=ma1
[   15.300073] mvpp2 f2000000.ethernet ma1: PHY [f212a200.mdio-mii:00] driver [Marvell 88E1510] (irq=POLL)
[   15.310710] mvpp2 f2000000.ethernet ma1: configuring for phy/sgmii link mode
[   19.420173] mvpp2 f2000000.ethernet ma1: Link is Up - 1Gbps/Full - flow control off
[   19.427909] IPv6: ADDRCONF(NETDEV_CHANGE): ma1: link becomes ready
         Starting dnsmasq - A lightweight DHCP and caching DNS server...
[  OK  ] Started dnsmasq - A lightweight DHCP and caching DNS server.

onl_platform=arm64-accton-as4224-52p-r0
dent 3.0 but not sure what exact build, i may need help with the command to find the exact build number if needed.
mgheorghe commented 1 year ago

in /etc/network/interfaces we can see

# The management interface
auto eth0
iface eth0 inet dhcp

but since eth0 got renamed in ma1 during boot i dont think this 2 lines are working and i think this is causing the problem

mgheorghe commented 1 year ago

replacing eth0 with ma1 in the interfaces file works

root@dentlab-infra-sw1:~# grep -rn /usr -e "remapping interface"

/usr/lib/python2.7/dist-packages/onl/network/MdevApp.py:47:
sys.stdout.write("remapping interface %s --> %s\n" Binary file /usr/lib/python2.7/dist-packages/onl/network/MdevApp.pyc matches