ifup activates wrong interfaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vlan (Ubuntu) |
Fix Released
|
High
|
Stéphane Graber |
Bug Description
When using ifup to activate one vlan interface defined in /etc/network/
1- Started with the following in /etc/network/
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth0.101
iface eth0.101 inet static
address 192.168.200.2
netmask 255.255.255.0
2- Added more vlans to the file
auto eth0.102
iface eth0.102 inet static
address 192.168.201.2
netmask 255.255.255.0
auto eth0.103
iface eth0.103 inet static
address 192.168.202.2
netmask 255.255.255.0
auto eth0.104
iface eth0.104 inet static
address 192.168.203.2
netmask 255.255.255.0
3- Upped only eth0.102
root@dixie:~# ifup eth0.102
Set name-type for VLAN subsystem. Should be visible in /proc/net/
Added VLAN with VID == 102 to IF -:eth0:-
* Setting up iSCSI targets
...done.
ssh stop/waiting
ssh start/running, process 2224
4- Then when upping the other interfaces obtained error that they were already up:
root@dixie:~# ifup eth0.103
ifup: interface eth0.103 already configured
root@dixie:~# vi /etc/network/
root@dixie:~# ifup eth0.103
ifup: interface eth0.103 already configured
root@dixie:~# ifup eth0.104
ifup: interface eth0.104 already configured
5- klog shows they were added all on the same second:
Mar 20 20:45:56 dixie kernel: [12270.182797] eth0.103: no IPv6 routers present
Mar 20 20:45:56 dixie kernel: [12270.742537] eth0.102: no IPv6 routers present
Mar 20 20:45:56 dixie kernel: [12270.798510] eth0.104: no IPv6 routers present
6- Added more interfaces to the interfaces file:
auto eth0.105
iface eth0.105 inet static
address 192.168.205.2
netmask 255.255.255.0
auto eth0.106
iface eth0.106 inet static
address 192.168.206.2
netmask 255.255.255.0
auto eth0.107
iface eth0.107 inet static
address 192.168.207.2
netmask 255.255.255.0
7- Upped only eth0.105, but eth0.106 and eth0.107 also come up:
root@dixie:~# ifup eth0.105
Set name-type for VLAN subsystem. Should be visible in /proc/net/
Added VLAN with VID == 105 to IF -:eth0:-
* Setting up iSCSI targets
...done.
ssh stop/waiting
ssh start/running, process 2619
root@dixie:~#
Mar 20 20:52:14 dixie ntpdate[2574]: step time server 91.189.89.199 offset -0.009063 sec
Mar 20 20:52:16 dixie kernel: [12650.777148] eth0.105: no IPv6 routers present
Mar 20 20:52:16 dixie kernel: [12650.809124] eth0.106: no IPv6 routers present
Mar 20 20:52:17 dixie kernel: [12651.336879] eth0.107: no IPv6 routers present
8- Sys info:
root@dixie:~# apt-cache policy ifupdown
ifupdown:
Installed: 0.7~beta2ubuntu10
Candidate: 0.7~beta2ubuntu10
Version table:
*** 0.7~beta2ubuntu10 0
500 http://
100 /var/lib/
0.
500 http://
root@dixie:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
9- messages:
root@dixie:~# for file in /var/log/
--- /var/log/
ifup: interface eth0.101 already configured
--- /var/log/
ifup: interface eth0.102 already configured
--- /var/log/
Set name-type for VLAN subsystem. Should be visible in /proc/net/
* Setting up iSCSI targets
...done.
ssh stop/waiting
ssh start/running, process 2438
--- /var/log/
Set name-type for VLAN subsystem. Should be visible in /proc/net/
* Setting up iSCSI targets
...done.
--- /var/log/
ifup: interface eth0.105 already configured
--- /var/log/
Set name-type for VLAN subsystem. Should be visible in /proc/net/
* Setting up iSCSI targets
...done.
ssh stop/waiting
ssh start/running, process 2932
--- /var/log/
Set name-type for VLAN subsystem. Should be visible in /proc/net/
* Setting up iSCSI targets
...done.
Related branches
affects: | ifupdown (Ubuntu) → vlan (Ubuntu) |
So the problem here is with the udev hook which is meant to create all the vlans when the parent interface shows up. It seems to be slightly over-enthusiastic and will try to bring up all VLANs every time any interface changes.