basic LAN routing
Doing some experiments and trying to setup linux box as a basic router beween LANs. Don't get routes from other hosts forwarded across LANs.
kernel 2.4.20-8
System has 3 NICs:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:47:DB:ED:6D
inet addr:192.168.200.10 Bcast:192.168.200.255 Mask:255.255.255.0
[...]
eth1 Link encap:Ethernet HWaddr 00:04:5A:56:42:E3
inet addr:172.16.0.1 Bcast:172.16.0.255 Mask:255.255.255.0
[...]
eth2 Link encap:Ethernet HWaddr 00:04:5A:4F:EF:9B
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
[...]
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
[...]
IP Forwarding is enabled:
# cat /proc/sys/net/ipv4/ip_forward
1
Routing table:
# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
172.16.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.200.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.200.1 0.0.0.0 UG 0 0 0 eth0
There is a host with ip 192.168.200.100 that responds to ping from the linux router described above (both directions)
There is a host with ip 172.16.0.2 that responds to ping from the linux router (both directions). This is a windows machine with the following configuration:
IP Address. . . . . . . . . . . . : 172.16.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.0.1
The windows machine can ping all ip addresses of the linux box. However, an attempt to ping any other hosts on the 192.168.200.xxx network does not get a response. I am expecting the linux machine to route from the 172.16.0.xxx network to the 192.168.200.xxx network, but this does not seem to be the case.
Apologies for what is no doubt a basic question, but I can't seem to find what I am missing here.
- Capt. B
|