So I have two network Interfaces
eth0 - NAT behind a router
eth1 - Public IP
When ever I restart the machine, both interfaces pull a IP, but the it randomly chooses eth0 or eth1 to have the gateway. I want the gateway to be eth0 always.
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.17.106.64 0.0.0.0 255.255.255.192 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth0
0.0.0.0 172.17.106.65 0.0.0.0 UG 0 0 0 eth1
So as of now, when ever it starts like this, I manually do this
Code:
route del default eth1
route add default gw 192.168.1.1 eth0
Is there some file or setting I can modify in Fedora10 that will always choose 192.168.1.1 on eth0 as the default gateway?