Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-29-2004, 10:51 AM   #1
LQ Newbie
Registered: Feb 2004
Posts: 10

Rep: Reputation: 0
2 NICs 2 networks 2 gateways

We have a redhat machine sat on two networks, each network having its own gateway. We want the machine to be able to see both networks and connect to machines through the gateways. We do not want the machine to allow talk between the two networks however.

I set up the two gateways in /etc/sysconfig/network-scripts/ifcfg-eth0 and ifcfg-eth1, and commented out the default gateway in /etc/sysconfig/network.

# netstat -rn

Kernel IP routing table
Destination____Gateway________Genmask Flags MSS Window irtt Iface 0 0 0 eth1 0 0 0 eth0 0 0 0 lo 0 0 0 eth1 0 0 0 eth0 0 0 0 eth1 0 0 0 eth0

This allows me to ping IPs on the network, includign those that can only be reached through the gateway However, despite being able to ping the gateway I cannot ping anything through it.

Does anyone know what is going on? This is very confusing and any help would be greatly appreciated!

Many thanks,

Old 05-29-2004, 03:05 PM   #2
Registered: Mar 2004
Location: Virginia
Distribution: PacketProtector
Posts: 331

Rep: Reputation: 30
You should try adding a route for 10.172.x.x informing your computer how you want it to try to get there using the 'route' command:

route add -net netmask eth1


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Squid+2 Networks+2 Gateways+same Machine?! pin_bk Linux - Networking 6 09-03-2005 02:22 PM
Two NICS one web server and Two Gateways walk into a bar... dr_rockstar66 Linux - Networking 2 02-23-2005 04:23 PM
2 nics, 2 networks help. chrisknight Linux - Networking 5 12-19-2004 01:21 PM
2 nics, 2 networks, 2 problemas kangaegoto Linux - Networking 1 12-19-2004 06:58 AM
Howto set up 2 different gateways for 2 different nics kemplej Slackware 1 05-18-2004 11:53 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:26 PM.

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