You are not logged in.
i have static routing for everything i need as far as ipv4 goes, and want to delete the default route for ipv4. i have done so already by doing..
ip route del default via 172.20.1.1 dev eth0
but every once and a while i check my routes again and it's back..
[root@helloworld ~]# ip route show
209.51.161.58 via 172.20.1.1 dev eth0
172.20.1.0/24 dev eth0 proto kernel scope link src 172.20.1.74 metric 202
default via 172.20.1.1 dev eth0 metric 202
whats up with this? how can i prevent it? i mean i could always just setup a cronjob to attempt to delete it every 5 minutes or something, but thats kind of a dirty way of doing it and i'd like to prevent it from coming back (or at LEAST stay persistant until the next reboot, then i can apply it again)
thinking about it, could it be the dhcp lease on the local router going up and it running a dhcp request and getting the route again?
Last edited by looshfoo (2010-12-16 07:22:47)
Offline
thinking about it, could it be the dhcp lease on the local router going up and it running a dhcp request and getting the route again?
Yes.
Your lease is only valid for X minutes/hours, after that it has to be renewed, which will recreate the def route. There's probably a config option in your dhcp client to ignore the def route.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
ah, ok. i run my leases kinda short. i wasn't sure if it would readd the route for sure or not though. thanks for the clarification.
for the record i'm using dhcpcd and i think the -G switch is my solution. not sure, just did a quick glance at the man page before heading off to bed.
Offline
in:
/etc/conf.d/dhcpcd
adding "-G <gateway>" solved it
DHCPCD_ARGS="-q -G 172.20.1.1"
and a reboot..
[01:16:10] jason@helloworld:[~]: ip route show
209.51.161.58 via 172.20.1.1 dev eth0
172.20.1.0/24 dev eth0 proto kernel scope link src 172.20.1.74 metric 202
[01:16:13] jason@helloworld:[~]:
thanks for confirming my suspicions, solved!
Offline
You're welcome, and welcome to the forums btw ![]()
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline