Re: How to set default gw not by route command in linux?
- From: floyd@xxxxxxxxxx (Floyd L. Davidson)
- Date: Thu, 23 Nov 2006 11:09:28 -0900
Unruh <unruh-spam@xxxxxxxxxxxxxx> wrote:
"ChaoZhang" <chaozh@xxxxxxxxxx> writes:
My linux pc has two adapters, eth0 is 192.168.1.2 and eth1 is
172.16.2.100. I manually set these ip addresses in ifcfg-eth0 and
ifcfg-eth1 files. I also set 192.168.1.1 and 172.16.2.1 as gateways for
eth0 and eth1. After this, I found the default gw is 172.16.2.1 not
Why do you set gateways for both? Gateways are for default routes. You can
only have one default route. The last one set.
A gateway is for *any* address that is not on a physically connected
network. There might well be multiple physical networks accessable
via gateways through a single interface. Each of those non-directly
connected physical networks will necessarily have a gateway to forward
from one physical network to the other.
It has *nothing* to do with a default, other than that a default route
has to have a gateway specified.
192.168.1.1. I know I can change it through route command. But I think
there must be another way for system to set the default gw is
192.168.1.1. Could you please tell me how to configure it? many thanks!
Get rid of the GATEWAY option for the address you do not want.
What if he needs that gateway to access a non-directly connected
physical network?
--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
.
- Follow-Ups:
- Re: How to set default gw not by route command in linux?
- From: Moe Trin
- Re: How to set default gw not by route command in linux?
- From: steve_schefter
- Re: How to set default gw not by route command in linux?
- References:
- How to set default gw not by route command in linux?
- From: ChaoZhang
- Re: How to set default gw not by route command in linux?
- From: Unruh
- How to set default gw not by route command in linux?
- Prev by Date: Server in a NAT subet?
- Next by Date: socket lib with IGMPv3 support
- Previous by thread: Re: How to set default gw not by route command in linux?
- Next by thread: Re: How to set default gw not by route command in linux?
- Index(es):
Relevant Pages
|