Dan Widyono on 29 Oct 2007 14:15:03 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] Gateways and Routes


When you tell OpenSuSE (for instance) that your gateway is e.g. 192.168.0.1,
it stuffs a _default route_ (by definition, pointing to "the" gateway) into
/etc/sysconfig/network/routes.

A "gateway address" is simply an alias for "default route to things I don't
know about", e.g. "things not on my subnet".  A "gateway" is simply an alias
for "something which handles routing to things I don't know about".

So technically, regardless of where you are, you need a route if you want to
access anything not on your subnet.  The OS installation might not call it a
route, but rather a gateway address, but the following methods will
internally still set up a "default route" to the "gateway" address.  These
methods are used by the default OS installation procedure to set up the
"gateway":

	redhat: /etc/sysconfig/network (GATEWAY=<IP> entry)
	opensuse: /etc/sysconfig/network/routes (default <IP> - - entry)
	solaris: /etc/defaultrouter (<IP> entry)
	DHCP client: option routers <IP>  in dhcp server config

etc.

It is true that if you have set your "gateway" through the installation
method preferred by your distribution, then you won't have to specify any
_additional routes_ manually in order to access anything.

HTH,
Dan W.

On Mon, Oct 29, 2007 at 08:05:44AM -0500, Ron Kaye Jr wrote:
> thanks
> shouldnt need a route if you are on the same
> subnet as gateway, the traditional 192.168.1
> 
> ron
> 
> =====================
> From: Mike Leone <turgon@mike-leone.com>
> Date: 2007/10/27 Sat PM 12:34:45 CDT
> To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
> Subject: Re: [PLUG] ifconfig no gui
> 
> Dan Widyono wrote:
> > /etc/sysconfig/network/ifcfg-eth*
> > /etc/sysconfig/network/routes
> 
> I don't think I've ever had to input a route on any PC I've ever used,
> regardless of OS. I've specified IP address, masks (very rare for a home
> user to have a mask other than 255.255.255.0, in my experience - I speak
> of a standard home network user, so no need for everyone to chime in at
> once :-)), and default gateways.
> 
> In my case, in /etc/network/interfaces.
> 
> 
> > /etc/resolv.conf
> > 
> >> ifconfig for address, mask
> >> where do i config default gateway,
> >> and my verizon dns servers?
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug