LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 05-29-2004, 10:51 AM   #1
birkinshawc
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

10.172.168.0___0.0.0.0_________255.255.254.0___U 0 0 0 eth1
132.185.176.0__0.0.0.0_________255.255.252.0___U 0 0 0 eth0
127.0.0.0______0.0.0.0_________255.0.0.0_______U 0 0 0 lo
0.0.0.0________10.172.168.254___0.0.0.0________UG 0 0 0 eth1
0.0.0.0________132.185.179.249__0.0.0.0________UG 0 0 0 eth0
0.0.0.0________10.172.168.254___0.0.0.0________UG 0 0 0 eth1
0.0.0.0________132.185.179.249__0.0.0.0________UG 0 0 0 eth0

This allows me to ping IPs on the 10.172.xxx.xxx network, includign those that can only be reached through the gateway 10.172.168.254. However, despite being able to ping the gateway 132.185.179.249 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,

Chris
 
Old 05-29-2004, 03:05 PM   #2
kvedaa
Member
 
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 10.172.0.0 netmask 255.255.0.0 eth1
 
  


Reply


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


All times are GMT -5. The time now is 05:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration