[CentOS] How to specify the default route?
Jason Pyeron
jpyeron at pdinc.us
Thu Jun 24 11:47:45 UTC 2010
> -----Original Message-----
> From: centos-bounces at centos.org
> [mailto:centos-bounces at centos.org] On Behalf Of Dominik Zyla
> Sent: Wednesday, June 23, 2010 13:55
> To: centos at centos.org
> Subject: Re: [CentOS] How to specify the default route?
>
> On Mon, Jun 21, 2010 at 07:57:13PM -0400, Rick Thomas wrote:
> > I have a machine with two net interfaces.
> >
> > it seems to always pick the wrong one (eth1) as the default route.
> >
> > I can change it with
> >
> > route del default
> > route add default eth0
> >
> > after it's up (or in rc.local, of course), but I'd like to
> figure out
> > what I need to do this "the CentOS way" (e.g. edit some
> configuration
> > file? Run some config utility, what?) once and for all.
> >
> > Can somebody point me to the canonical documentation on the
> subject?
> > I've searched /usr/share/doc and the man pages, but I can't find
> > anything useful.
> >
> > Googling for "default route centos" gives some interesting
> stuff, but
> > nothing definitive.
>
> route add default gw ${GATEWAYS_IP}
Our 2 nics are a wan(static) and lan(dhcp)
We set the default route for the wan, and when the dhcp lease expires and renews
it klobbers the default route with the lan's gateway.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron PD Inc. http://www.pdinc.us -
- Principal Consultant 10 West 24th Street #100 -
- +1 (443) 269-1555 x333 Baltimore, Maryland 21218 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
More information about the CentOS
mailing list