I am seeing two IP address on a single interface in a weird way. This is my output of ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:27:eb:26:b1:c8 inet addr:10.0.0.22 Bcast:10.255.255.255 Mask:255.0.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:456 errors:0 dropped:0 overruns:0 frame:0 TX packets:519 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:63643 (62.1 KiB) TX bytes:111910 (109.2 KiB)
This is my /etc/network/interfaces file output
auto lo iface lo inet loopback auto eth0 allow-hotplug eth0 iface eth0 inet static address 10.0.0.22 subnet 255.255.255.0 gateway 10.0.0.1 auto eth1 allow-hotplug eth1 iface eth1 inet static # address 0 # subnet 255.255.255.0 # gateway 192.168.0.2
And this is my output for sudo ip addr show
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether b8:27:eb:26:b1:c8 brd ff:ff:ff:ff:ff:ff inet 10.0.0.22/8 brd 10.255.255.255 scope global eth0 valid_lft forever preferred_lft forever inet 10.0.0.100/24 brd 10.0.0.255 scope global eth0 valid_lft forever preferred_lft forever 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000 link/ether 00:00:00:00:6c:f8 brd ff:ff:ff:ff:ff:ff inet 169.254.78.64/16 brd 169.254.255.255 scope global eth1 valid_lft forever preferred_lft forever
As we can see here eth0 has two ip address and is only shown by ip command and not by ifconfig or /etc/network/interfaces file. I am unable to understand from where this is coming or how to disable the 2nd IP permanently. I would like to get rid of the 2nd IP address permanently.
I have also noticed that this IP comes after a second or so when the system is booted. When I do dmesg I see these are the last few lines-
[ 15.270464] device eth1 entered promiscuous mode [ 15.576206] asix 1-1.4:1.0 eth1: link up, 100Mbps, full-duplex, lpa 0xCDE1
allow-hotplugtogether - one or the other will work (start with that). See if on reboot it still gets two addresses.
interfacesis not respected either. Maybe you should call it