James Herbert (Lists)
Sat, 16 Dec 2006 02:52:00 -0800
Jeroen Massar wrote:
James Herbert (Lists) wrote:Hi misc! I have a home router which is connected to a DSL line as its primary connection, with static IPs and the like. I have a secondary cable connection with a dynamic IP, and I have to use dhcp to get the IP for this link. I have the following in my dhclient.conf: send host-name "paladin"; supersede host-name "paladin"; supersede routers 212.208.87.225; supersede domain-name-servers 10.0.0.1; request subnet-mask, broadcast-address;[..]$ sudo route add default `cat /etc/mygate` add net default: gateway 213.208.87.225 $ Can anyone offer any advice?Don't use DHCP ;)
shhh, dhcp is great :P
nah, you could at least add the "route add default..." snippet into a separate file and use 'script /etc/dhclient.restore-gw' or something to make sure that you keep your gateway set. dhclient can unfortunately bepretty annoying sometimes.
No kidding! I guess I could hack around this but that's not really the Right Thing... ;)
supersede should do the trick indeed; what you might want to change is the 'request' line and add 'routers' there. It might be that dhclient doesn't want to give your default route as it was not requested.
yeah tried that, no change.
Btw watch out with scripts, if they fail to execute properly, dhclient will nicely loop and keep on requesting new addresses, most likely causing the pool on the server side to run empty (at least that happened to me that last time ;)
Will try to avoid that pitfall at all costs!!
Greets, Jeroen
Cheers James