LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   eth0 and eth0:1. Default gateway is not working (https://www.linuxquestions.org/questions/linux-networking-3/eth0-and-eth0-1-default-gateway-is-not-working-395255/)

Fillys6 12-21-2005 09:07 AM

eth0 and eth0:1. Default gateway is not working
 
Well I have the following:

Code:

[root@wms /]# cat /etc/sysconfig/networking/profiles/default/ifcfg-eth0
# Broadcom Corporation|NetXtreme BCM5703 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
BROADCAST=172.25.7.255
HWADDR=xxxx
IPADDR=172.25.4.10
NETMASK=255.255.252.0
NETWORK=172.25.4.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
GATEWAY=172.25.4.1

Code:

[root@wms /]# cat /etc/sysconfig/networking/profiles/default/ifcfg-eth0:1
# Broadcom Corporation|NetXtreme BCM5703 Gigabit Ethernet
DEVICE=eth0:1
BOOTPROTO=none
BROADCAST=192.168.240.3
HWADDR=xxxx
IPADDR=192.168.240.2
NETMASK=255.255.255.252
NETWORK=192.168.240.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
GATEWAY=192.168.240.1

eth0:1 has a route of 10.0.0.0 through IP 192.168.240.1

All traffic outside of 172.25.4.0, 192.168.240.0 and 10.0.0.0 is trying to go through the 192.168.240.1 address. I want to route all internet traffic through 172.25.4.1.

So I typed the following:
/sbin/route add default gw 172.25.4.1 eth0
/sbin/route add -net 10.52.184.0 netmask 255.255.248.0 gw 192.168.240.1 eth0:1


Yesterday this worked fine. I came in this morning and now the internet traffic is trying to go through 192.168.240.1 again. I know this because when I try to ping an extral IP it says From 192.168.240.1 icmp_seq=0 Packet filtered

Why isn't my traffic going through 172.25.4.1 like I told it to?


ps is it mandatory to restart network services so that this will work? Our business is 24 hour and it is EXTREMELY inconvenient for me to coordinate and have everyone log off the system for any amount of time (even 30 seconds).

Thanks.

Fillys6 12-21-2005 09:33 AM

Well I ended up removing the eth0:1 interface, deleted the route, and re-added it. Now it works fine. One thing I noticed is that there are a few 0.0.0.0 entries for 192.168.240.1. The top one in the list is 172.25.4.1. Can I manually remove these other 0.0.0.0 entries?

Code:

[root@wms /]# /sbin/route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.240.0  0.0.0.0        255.255.255.252 U    0      0        0 eth0
172.25.8.0      0.0.0.0        255.255.252.0  U    0      0        0 eth1
172.25.4.0      0.0.0.0        255.255.252.0  U    0      0        0 eth0
10.52.184.0    192.168.240.1  255.255.248.0  UG    0      0        0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U    0      0        0 eth0
0.0.0.0        172.25.4.1      0.0.0.0        UG    0      0        0 eth0
0.0.0.0        192.168.240.1  0.0.0.0        UG    0      0        0 eth0
0.0.0.0        192.168.240.1  0.0.0.0        UG    0      0        0 eth1
0.0.0.0        192.168.240.1  0.0.0.0        UG    0      0        0 eth0
0.0.0.0        192.168.240.1  0.0.0.0        UG    0      0        0 eth0
0.0.0.0        192.168.240.1  0.0.0.0        UG    0      0        0 eth0



All times are GMT -5. The time now is 02:04 PM.