[NTLUG:Discuss] Default gateway -where set

Bryan J. Smith b.j.smith at ieee.org
Sat Aug 27 01:35:59 CDT 2005


On Sat, 2005-08-27 at 06:00 -0500, Leroy Tennison wrote:
> Where is the default gateway set on Linux (Red Hat or SuSE)?  I found 
> references to /etc/sysconfig/network (Red Hat) but the gateway paramater 
> in it is commented out yet I have a defautl gateway set for eth1 (dhcp 
> for my dsl).

Depends on whether or not you want to add a system-wide default gateway
(aka route), or if you want each interface to have their own default
routes.  In your case, you probably want the latter because you are
using DHCP on one interface.

In Red Hat, you set the system-wide default route
in /etc/sysconfig/network.  You set interface-specific default routes
in /etc/sysconfig/network-scripts/ifcfg-(if) for each (where (if) could
be eth0, eth1, wlan0, ppp0, etc...).

If you configure one interface with DHCP, and the DHCP provides a
default route as an option, then in the absence of any system-wide or
other interface default route, it will often work as the default for the
entire system.  It really depends on the application, subnet involved,
etc...

With that said, are you running into issues?
Or just asking?


-- 
Bryan J. Smith     b.j.smith at ieee.org     http://thebs413.blogspot.com
----------------------------------------------------------------------
The best things in life are NOT free - which is why life is easiest if
you save all the bills until you can share them with the perfect woman





More information about the Discuss mailing list