Odd entry in the routing table

Soldato
Joined
24 Sep 2015
Posts
3,971
I've spun up an Ubuntu 16.04.2 LTS VM on my Hyper-V hardware, I've got quite a few setup and they're all working fine but this this one has an odd entry in the routing table which is confusing me. I can't see where it's coming from:

Code:
root@newvm:~:$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.255.254.1    0.0.0.0         UG    0      0        0 eth0
10.0.0.0        0.0.0.0         255.0.0.0       U     0      0        0 eth0
root@newvm:~:$


The entry for 0.0.0.0 ia 10.255.254.1 is fine, that's the default gateway as I've specified in /etc/network/interfaces

Code:
root@newvm:/etc/network:$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 10.255.254.11
gateway 10.255.254.1
network 10.255.254.0
broadcast 10.255.254.255
dns-nameserver 8.8.8.8 8.8.4.4
root@newvm:/etc/network:$


Where does the entry for 10.0.0.0/8 come from? It's causing problems as any clients in 10/8 can't reach the VM whilst those in 172.16/12 can.

I can remove it easily enough and then clients in 10/8 can reach it:

Code:
root@newvm:/etc/network:$ ip route del 10/8
root@newvm:/etc/network:$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.255.254.1    0.0.0.0         UG    0      0        0 eth0
root@newvm:/etc/network:$


But after a reboot that entry is back. I could script 'ip route del 10/8' to run at boot time and I could blat the VM and start from scratch but I'd like to understand where that entry is coming from.

Any ideas much appreciated!
 
Bah. I've been looking at this one and off for a few days but it was only when I posted the thread that I spotted the problem - I hadn't specified the subnet mask in /etc/network/interfaces! I've done that and it's all ok now.
 
Back
Top Bottom