Network goes down on service restart with multiple IPs assigned
I go not have ifupdown-ng
installed (my system was installed a few years ago and was upgraded since) and I had the following in my /etc/network/interfaces
:
auto lan
iface lan inet static
bridge-ports eth0 eth1 eth6
address 192.168.1.99
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1
Everything was great, I could do service networking restart
any time and networking would go back up shortly.
I have then extended it with this (which was frustrating because wiki assumes I have ifupdown-ng
, without which proposed syntax with IP/24
was actually invalid for my OS):
iface lan inet static
address 192.168.1.97
netmask 255.255.255.0
iface lan inet static
address 192.168.1.95
netmask 255.255.255.0
Now when I do service networking restart
network goes down and doesn't get back up (I log in remotely so don't see how it complains).
The config is valid though, system boots successfully and gets all 3 interfaces assigned as expected:
13: lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether 00:17:b6:00:64:38 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.99/24 scope global lan
valid_lft forever preferred_lft forever
inet 192.168.1.97/24 scope global secondary lan
valid_lft forever preferred_lft forever
inet 192.168.1.95/24 scope global secondary lan
valid_lft forever preferred_lft forever
From that I made a conclusion that there must be a bug somewhere preventing networking from restarting fully and properly.