not-so-simple routing issue?
Steve Arnold <[email protected]> 30 Jun 2003 12:47:27 -0700
| Newsgroups | gmane.linux.gentoo.sysadmin |
|---|---|
| Message-ID | <[email protected]> |
Howdy:
Although it's not gentoo-specific, I'm having trouble getting a simple
routing setup going on a new machine/new kernel. It's really
overly-simple:
Internet <--> gateway <------------> router <--------->
subnet1 subnet2
Subnets 1 and 2 are separate private class C address ranges, ie, subnet1
is 192.168.0.0 and subnet 2 is 192.168.2.0, and the router box is not
using any IPtables or other masqing/firewalling stuff. Here's the basic
routing table on the router:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 router 255.255.255.0 UG 0 0 0 eth0
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default gateway 0.0.0.0 UG 0 0 0 eth1
And yes, ip_forwarding is turned on in the kernel (2.4.20). The weird
thing is, the hosts in subnet2 can see/ping the hosts in subnet1, all
except the gateway machine. Thus, subnet2 cannot see the Internet
either. The same setup worked fine with an older kernel; I'm now
wondering why I upgraded in the first place.
So it looks like the hosts in subnet2 can find their local gateway
(192.168.2.1) and can find the hosts in subnet1 just fine. However, for
some reason that escapes me, they cannot get out the default gateway in
subnet1 (they can't even ping the internal IP of the gateway).
I even resorted to running routed on both the gateway and the router,
watching the routing tables fill with routes as traffic flowed a little,
but it still didn't help. From a machine in subnet1:
PING (192.168.2.XX): 56 octets data
64 octets from 192.168.2.XX: icmp_seq=0 ttl=63 time=0.7 ms
64 octets from 192.168.2.XX: icmp_seq=1 ttl=63 time=0.7 ms
64 octets from 192.168.2.XX: icmp_seq=2 ttl=63 time=0.6 ms
>From the above machine in subnet2:
PING (192.168.0.X): 56 octets data
64 octets from 192.168.0.X: icmp_seq=0 ttl=63 time=0.6 ms
64 octets from 192.168.0.X: icmp_seq=1 ttl=63 time=1.8 ms
64 octets from 192.168.0.X: icmp_seq=2 ttl=63 time=0.6 ms
Now from the same machine, to the gateway:
PING (192.168.0.Y): 56 octets data
--- 192.168.0.Y ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
It's either something really stupid that I'm missing, or the kernel is
goofy. Assuming the latter, I'm rebuilding the kernel now...
Any tips would be highly appreciated.
Thanks in advance, Steve
--
[email protected] mailing list