LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2005, 09:07 AM   #1
Fillys6
Member
 
Registered: Mar 2005
Posts: 31

Rep: Reputation: 15
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.
 
Old 12-21-2005, 09:33 AM   #2
Fillys6
Member
 
Registered: Mar 2005
Posts: 31

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i find my gateway address on eth0? seth Linux - Networking 10 03-21-2010 03:42 AM
How do I set the ip address for eth0, eth1 and the default gateway? abefroman SUSE / openSUSE 5 05-19-2005 04:15 AM
how to add internet gateway for eth0 in shorewall prue3 Linux - Security 4 02-03-2005 12:39 AM
finding gateway address on eth0 MHouse Linux - Newbie 9 03-05-2004 06:35 AM
Gateway doesn't show up under eth0. bah. 00gab00ga Linux - Networking 19 03-03-2004 05:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration