LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2 nic router problem (https://www.linuxquestions.org/questions/linux-networking-3/2-nic-router-problem-121825/)

williamc 12-01-2003 09:51 PM

2 nic router problem
 
I am a newby working on implementing a Linux router as part of a small network. The network consists of:

· hosts which are set at [192.168.48.xx];
· the router with an internal nic card [eth1 at 192.168.48.1] and an external nic card [eth 0 at 192.168.48.2].
· The router is a RedHat 7.3 machine running the 2.4.7 kernal.
· The default gateway for eth0 is 172.31.34.2
· IPChains is disabled
· IPTables is automatic
· Firewall is disabled [for now]
· /etc/sysctl.conf has the line “net.ipv4.ip_forward=1”
· Routes that have been entered are:

Gateway netmask Network
172.31.48.1 255.255.0.0 172.31.0.0
192.168.48.1 255.255.255.0 192.168.48.0


We can ping the default gateway from router eth0.

We can ping the router eth0 from the hosts.

We can ping the router eth1 from the hosts.

We have been unable to ping the default gateway from the hosts.

We have been unable to ping from eth0 to eth1

Thanks to all. This forum has been a great deal of help.

Bill

chort 12-01-2003 10:09 PM

You've made a classic networking blunder. Each NIC needs to be on it's own subnet. The ip_forward setting will take care of making packets go where they're supposed to, you don't have to "point" the interfaces at each other.

Reconfigure as such:
eth0 = 172.31.48.2
eth1 = 192.168.48.1

172.31.48.1 0.0.0.0 0.0.0.0
172.31.48.2 172.31.48.0 255.255.255.0
192.168.48.1 192.168.48.0 255.255.255.0

williamc 12-04-2003 10:32 PM

2 nic router problem
 
Chort:

Linux routing is alive and well. Thanks for the assistance.

Bill


All times are GMT -5. The time now is 05:14 AM.