Quick history: I had a failure of my main firewall and put a Wi-Fi AP on the network to serve DHCP. This automatically created some routing entries on all three of my RPIs. This ran for a few weeks, and eventually my main firewall was fixed and the AP deprecated.
Here's the current table on one of my RPIs:
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.10.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 10.0.12.175 0.0.0.0 UG 202 0 0 eth0
10.0.0.0 0.0.0.0 255.255.240.0 U 202 0 0 eth0
10.0.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code: Select all
route del default gw 10.0.12.175
route del -net 10.0.0.0/20Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.10.1 0.0.0.0 UG 0 0 0 eth0
10.0.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Code: Select all
root@scs-pi01 # ifdown eth0 && ifup -v eth0
Configuring interface eth0=eth0 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/01-wpa-config-copy
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 10.0.10.30/255.255.255.0 broadcast 10.0.10.255 dev eth0 label eth0
ip link set dev eth0 up
ip route add default via 10.0.10.1 dev eth0
run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant
root@scs-pi01 # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.10.1 0.0.0.0 UG 0 0 0 eth0
0.0.0.0 10.0.12.175 0.0.0.0 UG 202 0 0 eth0
10.0.0.0 0.0.0.0 255.255.240.0 U 202 0 0 eth0
10.0.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0