dhclient and metric

Sep 13, 2006 2 Replies

My LANs have a route to the Internet thru a box running SuSE 10.1. It has a FiOS connection (Verizon) and a cable connection (Comcast). I can statically configure this such that the cable connection, which is slower, has a higher metric. And by setting /proc/sys/net/ipv4/route/gc_timeout to a low value, I have a quick automatic fallback.



That's all fine so far, but the Comcast connection gets its IP via DHCP, and I'm running dhclient. So the question is about the best way to assign the higher metric to this route automatically upon startup (reboot, whatever). There appears to be no provision for this in dhclient.conf.



Any suggestions?


Bill Michaelson wrote in part:

Find the script (under /etc/rc.d -- good luck with SysV mess'o'symlinks!) that runs dhclient and add ifconfig eth1 metric 4 after the dhclient invocation or to some rc.local script. It should persist though dhclient changes and eth1 up/down .

I like to think of dhclient and friends as nothing more than script daemons that do little more than `ifconfig` and `route`.

-- Robert

Bill Michaelson wrote: (snip)

Try comp.protocols.tcp-ip or a linux networking newsgroup.

-- glen

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required