wrong default route

Broekman, Maarten Maarten.Broekman at FMR.COM
Tue Jul 8 14:52:25 UTC 2008


In general, having GATEWAY= lines in your ifcfg-eth* files is a bad
idea.  The default gateway should be specified in /etc/sysconfig/network
as Chet mentioned.  All the rest of the "gateways" are really just
static routes that you want to set up in a separate init script.

Maarten Broekman

-----Original Message-----
From: redhat-list-bounces at redhat.com
[mailto:redhat-list-bounces at redhat.com] On Behalf Of Chet Nichols III
Sent: Tuesday, July 08, 2008 10:48 AM
To: General Red Hat Linux discussion list
Subject: Re: wrong default route

This might not be the only answer, but you could just specify GATEWAY=
192.168.65.142 in your /etc/sysconfig/network file and remove the
GATEWAY
definitions from all the ifcfg-eth* files.

>From there, I believe that if you want to override the GATEWAY
configured in
/etc/sysconfig/network, you can just re-add it in the specific
ifcfg-eth*
file, but in your case it doesn't seem like you want/need to do that.

Good luck!

Chet

On Tue, Jul 8, 2008 at 10:30 AM, Sir June <sir_june at yahoo.com> wrote:

> I have a server out there that i remotely manage.  i had a downtime
the
> other day when we
> restarted network services. then we found a wrong default route is
laoded
> on the server
> upon restart. i have the configs below. The defaultroute should be
> GATEWAY=192.168.65.142  but it loaded GATEWAY=10.2.1.14 upon restart.
> Could it be the sequence the interfaces are enabled from eth0 then
eth1
> then eth5, the
> last interface activated its own gateway as default?
>
> Should i delete the gateway on eth0 and eth5 such that it would make
sure
> only the
> defaultgateway on eth1 is loaded upon restart?
>
> i just can't restart network services and see what happens, the server
is
> in production
> and it takes a lot of authorization before i can restart it.
>
> thanks,
> june
>
>
> /etc/sysconfig/network-scripts/ifcfg-eth0
> DEVICE=eth0
> ONBOOT=no
> BOOTPROTO=static
> IPADDR=10.11.13.150
> NETMASK=255.255.255.192
> GATEWAY=10.11.13.129
> HOSTNAME=web2003
> HWADDR=00:19:BB:AB:CD:EF
> ETHTOOL_OPTS="speed
> 100 duplex full autoneg off"
>
>
> /etc/sysconfig/network-scripts/ifcfg-eth1
> DEVICE=eth1
> HWADDR=00:19:BB:AA:DD:CC
> ONBOOT=yes
> TYPE=Ethernet
> IPADDR=192.168.65.131
> NETMASK=255.255.255.240
> GATEWAY=192.168.65.142
> HOSTNAME=web2003.domain.net
> ETHTOOL_OPTS="speed
> 100 duplex full autoneg off"
>
>
> /etc/sysconfig/network-scripts/ifcfg-eth5
> DEVICE=eth5
> HWADDR=00:18:FE:BB:CC:DD
> ONBOOT=yes
> TYPE=Ethernet
> BOOTPROTO=static
> IPADDR=10.2.1.1
> NETMASK=255.255.255.240
> GATEWAY=10.2.1.14
> HOSTNAME=web2003.domain.net
> ETHTOOL_OPTS="speed
> 100 duplex full autoneg off"
>
>
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



-- 
----------------------------------------
chet nichols III
chet.nichols at gmail.com
aim: chet / twitter: chet
http://chetnichols.org
----------------------------------------
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list





More information about the redhat-list mailing list