FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 07-08-2008, 02:30 PM
Sir June
 
Default wrong default route

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:AAD: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:CCD
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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 07-08-2008, 02:48 PM
"Chet Nichols III"
 
Default 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@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:AAD: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:CCD
> 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@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
----------------------------------------
chet nichols III
chet.nichols@gmail.com
aim: chet / twitter: chet
http://chetnichols.org
----------------------------------------
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 07-08-2008, 02:49 PM
"Miner, Jonathan W (US SSA)"
 
Default wrong default route

I believe that you're correct to delete the GATEWAY lines from eth0 and eth5. A system can only have one "default" route.


-----Original Message-----
From: redhat-list-bounces@redhat.com on behalf of Sir June
Sent: Tue 7/8/2008 10:30 AM
To: redhat-list@redhat.com
Cc:
Subject: wrong default route

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:AAD: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:CCD
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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 07-08-2008, 02:52 PM
"Broekman, Maarten"
 
Default wrong default route

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@redhat.com
[mailto:redhat-list-bounces@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@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:AAD: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:CCD
> 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@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



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


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 07-08-2008, 02:54 PM
Thomas Fess
 
Default wrong default route

Yes, modify the /etc/sysconfig/network with the actual default you want and you CAN add the GATEWAY=whatever here on the actual production NIC = eth1 if I am reading this correctly and then remove the GATEWAY=WRONG-IPS from ALL of the other NIC eth? "service network restart" and you should be in business. happenes to me alot, we are building 100+ servers and we have backup ip's and LOMs etc. If you need to access them and you can't without using the GATEWAY... add a regular route to the NIC config. example route-eth0 inside that file use some like the following:

Using 172.xxx.32.1 as your main gateway on that NIC to access you other networks from that IP/NIC whatever???

Notice the GATEWAY0, NETMASK0, ADDRESS0 change for each subnet I am trying to access, but my gateway IP stays the same, I am using it to access different networks.

ADDRESS0
ADDRESS1
ADDRESS2
ADDRESS3 if needed etc



####################################

[root@dlxkrc2db5 ~]# cat /etc/sysconfig/network-scripts/route-eth1
GATEWAY0=172.xxx.32.1
NETMASK0=255.255.255.0
ADDRESS0=172.xxx.32.0

GATEWAY1=172.xxx.32.1
NETMASK1=255.255.255.0
ADDRESS1=172.xxx.31.0

GATEWAY2=172.xxx.32.1
NETMASK2=255.255.255.0
ADDRESS2=172.xxx.30.0

################################################## #####



--- On Tue, 7/8/08, Sir June <sir_june@yahoo.com> wrote:

> From: Sir June <sir_june@yahoo.com>
> Subject: wrong default route
> To: redhat-list@redhat.com
> Date: Tuesday, July 8, 2008, 10:30 AM
> 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:AAD: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:CCD
> 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@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 07-08-2008, 03:01 PM
Thomas Fess
 
Default wrong default route

What everyone just wrote is totally correct!

run "route add default gw xxx.xxx.xxx.xxx eth1" for your REAL default gw

and do what I wrote below for additional routes

here is an example of my route table:

[root@myserver~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.xxx.32.0 * 255.255.255.0 U 0 0 0 eth1
172.xxx.30.0 Backup-Default- 255.255.255.0 UG 0 0 0 eth1
172.xxx.31.0 Backup-Default- 255.255.255.0 UG 0 0 0 eth1
192.xxx.xxx.0 * 255.255.255.0 U 0 0 0 eth0
192.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default DB-Dev-DefaultG 0.0.0.0 UG 0 0 0 eth0


--- On Tue, 7/8/08, Thomas Fess <dfezz1@yahoo.com> wrote:

> From: Thomas Fess <dfezz1@yahoo.com>
> Subject: Re: wrong default route
> To: "General Red Hat Linux discussion list" <redhat-list@redhat.com>
> Date: Tuesday, July 8, 2008, 10:54 AM
> Yes, modify the /etc/sysconfig/network with the actual
> default you want and you CAN add the GATEWAY=whatever here
> on the actual production NIC = eth1 if I am reading this
> correctly and then remove the GATEWAY=WRONG-IPS from ALL of
> the other NIC eth? "service network restart" and
> you should be in business. happenes to me alot, we are
> building 100+ servers and we have backup ip's and LOMs
> etc. If you need to access them and you can't without
> using the GATEWAY... add a regular route to the NIC
> config. example route-eth0 inside that file use some like
> the following:
>
> Using 172.xxx.32.1 as your main gateway on that NIC to
> access you other networks from that IP/NIC whatever???
>
> Notice the GATEWAY0, NETMASK0, ADDRESS0 change for each
> subnet I am trying to access, but my gateway IP stays the
> same, I am using it to access different networks.
>
> ADDRESS0
> ADDRESS1
> ADDRESS2
> ADDRESS3 if needed etc
>
>
>
> ####################################
>
> [root@dlxkrc2db5 ~]# cat
> /etc/sysconfig/network-scripts/route-eth1
> GATEWAY0=172.xxx.32.1
> NETMASK0=255.255.255.0
> ADDRESS0=172.xxx.32.0
>
> GATEWAY1=172.xxx.32.1
> NETMASK1=255.255.255.0
> ADDRESS1=172.xxx.31.0
>
> GATEWAY2=172.xxx.32.1
> NETMASK2=255.255.255.0
> ADDRESS2=172.xxx.30.0
>
> ################################################## #####
>
>
>
> --- On Tue, 7/8/08, Sir June <sir_june@yahoo.com>
> wrote:
>
> > From: Sir June <sir_june@yahoo.com>
> > Subject: wrong default route
> > To: redhat-list@redhat.com
> > Date: Tuesday, July 8, 2008, 10:30 AM
> > 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:AAD: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:CCD
> > 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@redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
>
>
>
>
> --
> redhat-list mailing list
> unsubscribe
> mailto:redhat-list-request@redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 07-08-2008, 03:36 PM
Sir June
 
Default wrong default route

Thanks for all the answers. I will put the default route to /etc/sysconfig/network and delete the GATEWAYs from ifcfg-eth*... Just want to confirm that eth5 gateway overridden the should be default route in eth1.

thanks,
sir june




--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 02:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org