Page MenuHomeVyOS Platform

Ethernet interface with dhcp does not re-enable correctly after disable.
Closed, DuplicatePublicBUG

Description

I'm going through the documentation at the moment and saw that interface ethernet <iface> disable was not documented so I wanted to test that.

On a simple Hyper-V VM with 1.2.0-rc11 I just set up eth0 with dhcp and everything worked as expected, I got address and everything.

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             10.20.30.107/24                   u/u
eth1             172.17.144.146/28                 u/u
lo               127.0.0.1/8                       u/u
                 ::1/128

set interface ethernet eth0 disable also worked as expected. The interface went down.

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 A/D
eth1             172.17.144.146/28                 u/u
lo               127.0.0.1/8                       u/u
                 ::1/128

vyos@vyos:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:15:5d:54:a1:4f brd ff:ff:ff:ff:ff:ff
[...]

The interesting part came later when I tried to re-enable the interface. I tried the only obvious way I could see to enable,
delete interface ethernet eth0 disable only to discover that the interface didn't get an IP again.

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 u/u
eth1             172.17.144.146/28                 u/u
lo               127.0.0.1/8                       u/u
                 ::1/128

vyos@vyos:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:15:5d:54:a1:4f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::215:5dff:fe54:a14f/64 scope link
       valid_lft forever preferred_lft forever
[...]

It looks as if the interface is going up but the dhcp client is not made aware.
When checking for BOOTP/DHCP with Wireshark I saw other activity but nothing from vyos after re-enable.

What I can see relevant log entries for the sequence...

Disable

Jan 22 08:17:43 vyos dhclient[2880]: DHCPRELEASE on eth0 to 10.20.30.21 port 67
Jan 22 08:17:44 vyos bgpd[1903]: [EC 100663301] INTERFACE_ADDRESS_DEL: Cannot find IF 2 in VRF 0
Jan 22 08:17:44 vyos sudo[2879]: pam_unix(sudo:session): session closed for user root
Jan 22 08:17:44 vyos sudo[2926]: vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/bin/rm -f /var/lib/dhcp/dhclient_eth0.pid
Jan 22 08:17:44 vyos sudo[2926]: pam_unix(sudo:session): session opened for user root by vyos(uid=0)
Jan 22 08:17:44 vyos sudo[2926]: pam_unix(sudo:session): session closed for user root
Jan 22 08:17:44 vyos sudo[2928]: vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/sbin/ip link set eth0 down
Jan 22 08:17:44 vyos sudo[2928]: pam_unix(sudo:session): session opened for user root by vyos(uid=0)
Jan 22 08:17:44 vyos lldpd[2465]: error while receiving frame on eth0: Network is down
Jan 22 08:17:44 vyos bgpd[1903]: [EC 100663301] INTERFACE_STATE: Cannot find IF eth0 in VRF 0
Jan 22 08:17:44 vyos bgpd[1903]: [EC 100663301] INTERFACE_ADDRESS_DEL: Cannot find IF 2 in VRF 0
Jan 22 08:17:44 vyos bgpd[1903]: [EC 100663301] INTERFACE_ADDRESS_DEL: Cannot find IF 2 in VRF 0
[...]
Jan 22 08:17:44 vyos commit[2962]: Successful change to active configuration by user vyos on /dev/pts/0
Jan 22 08:17:45 vyos ntpd[2385]: Deleting interface #7 eth0, fe80::215:5dff:fe54:a14f#123, interface stats: received=0, sent=0, dropped=0, active_time=64 secs
Jan 22 08:17:45 vyos ntpd[2385]: Deleting interface #3 eth0, 10.20.30.107#123, interface stats: received=12, sent=12, dropped=0, active_time=66 secs
Jan 22 08:17:45 vyos ntpd[2385]: 193.228.143.14 interface 10.20.30.107 -> (none)
Jan 22 08:17:45 vyos ntpd[2385]: 91.209.0.17 interface 10.20.30.107 -> (none)
Jan 22 08:17:45 vyos ntpd[2385]: peers refreshed

delete disable

Jan 22 08:20:50 vyos sudo[3412]: vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/sbin/ip link set eth0 up
Jan 22 08:20:50 vyos sudo[3412]: pam_unix(sudo:session): session opened for user root by vyos(uid=0)
Jan 22 08:20:50 vyos bgpd[1903]: [EC 100663301] INTERFACE_STATE: Cannot find IF eth0 in VRF 0
Jan 22 08:20:50 vyos bgpd[1903]: [EC 100663301] INTERFACE_STATE: Cannot find IF eth0 in VRF 0
Jan 22 08:20:50 vyos sudo[3412]: pam_unix(sudo:session): session closed for user root
Jan 22 08:20:50 vyos sudo[3411]: vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/opt/vyatta/sbin/irq-affinity.pl eth0 auto
Jan 22 08:20:50 vyos sudo[3411]: pam_unix(sudo:session): session opened for user root by vyos(uid=0)
Jan 22 08:20:50 vyos irq-affinity[3414]: cpus=2 cores=1 threads=2 sockets=1
Jan 22 08:20:50 vyos sudo[3411]: pam_unix(sudo:session): session closed for user root
Jan 22 08:20:50 vyos sudo[3441]: vyos : TTY=pts/0 ; PWD=/home/vyos ; USER=root ; COMMAND=/bin/mv /tmp/config.boot.3435 /opt/vyatta/etc/config/archive/config.boot

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rc11
Why the issue appeared?
Will be filled on close