#17953: netifd - hotplug ifdown events and behaving differently in VM (NIC and 
vNIC
link loss)
------------------------+------------------------
  Reporter:  anonymous  |      Owner:  developers
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:
 Component:  packages   |    Version:  Trunk
Resolution:             |   Keywords:  netifd
------------------------+------------------------

Comment (by dedeckeh@…):

 Replying to [comment:6 anonymous]:
 > But in all my tests (note: I opened this ticket) the WAN interfaces on
 my two test systems (x86 VM and TL-WDR4300) are defined as proto 'dhcp',
 not 'static' ...
 >
 > From my test VM running OpenWrt x86 BB r42625
 > {{{
 > root@OpenWrt:/# cat /etc/config/network
 >
 > config interface 'loopback'
 >         option ifname 'lo'
 >         option proto 'static'
 >         option ipaddr '127.0.0.1'
 >         option netmask '255.0.0.0'
 >
 > config interface 'lan'
 >         option ifname 'eth0'
 > #       option type 'bridge'
 >         option proto 'static'
 >         option ipaddr '192.168.100.1'
 >         option netmask '255.255.252.0'
 >         option ip6assign '60'
 >
 > config interface 'wan'
 >         option ifname 'eth1'
 >         option proto 'dhcp'
 >         option hostname 'openwrt'
 >         option defaultroute '1'
 >         option metric '10'
 >
 > config interface 'wan2'
 >         option ifname 'eth2'
 >         option proto 'dhcp'
 >         option mtu '1508'
 >         option defaultroute '1'
 >         option metric '20'
 >
 > #config interface 'wan6'
 > #       option ifname '@wan'
 > #       option proto 'dhcpv6'
 >
 > config interface 'vpn1'
 >         option ifname 'tun1'
 >         option proto 'none'
 >
 > config globals 'globals'
 >         option ula_prefix 'fd65:d55b:92fb::/48'
 >
 > ...
 > }}}
 >
 >
 >
 >
 > Could the different behaviour of netifd upon WAN NIC phy link loss be
 because the eth1 and eth2 interfaces on the x86 VM are considered
 "separate" devices, whereas in the case of physical WDR4300 the two WANs
 are actually sitting on the same switch (eth0.2 and eth0.3) ?

 Netifd relies on netlink events from the Linux kernel indicating link
 loss/presence (LOWER_UP flag in ip link show). I'm wondering if these
 events are generated by the Linux kernel on the X86 VM; you can easily
 check this by calling ubus call network.device status and checking the
 carrier state for the eth1 and eth2 devices if the WAN NIC phy link is
 lost (This should also be visible in ip link show as the NO_CARRIER flag
 should be displayed in case of link lost)

--
Ticket URL: <https://dev.openwrt.org/ticket/17953#comment:9>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to