Per: Les Mikesell lesmikesell at gmail.com Thu Sep 6 13:55:05 EDT 2012
A 'route -n' should show you where any destination will head on the next hop. On host C, what is the line with the smallest matching destination/mask? Likewise, on the gateway host where you think it is being forwarded the wrong way?
$ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 aaa.bbb.ccc.0 0.0.0.0 255.255.255.0 U 0 0 0 bridge0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bridge0 0.0.0.0 aaa.1bbb.ccc.1 0.0.0.0 UG 0 0 0 bridge0
$ traceroute 192.168.209.43 traceroute to 192.168.209.43 (192.168.209.43), 30 hops max, 40 byte packets 1 gway01 (aaa.bbb.ccc.1) 0.321 ms 0.298 ms 0.283 ms 2 ISPlink (aaa.bbb.ddd.53) 1.000 ms 0.993 ms 1.450 ms 3 * * * 4 * * * 5 * * * . . .
This seems to say that 192.168.209.43 is being routed out to the Internet as aaa.bbb.ddd.53 is our external gateway address on the router.
This is the routing table on the router:
[root@gway01 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface aaa.bbb.ddd.52 0.0.0.0 255.255.255.252 U 0 0 0 eth0 aaa.bbb.ccc.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1 0.0.0.0 aaa.bbb.ddd.53 0.0.0.0 UG 0 0 0 eth0
On Thu, Sep 6, 2012 at 1:09 PM, James B. Byrne byrnejb@harte-lyne.ca wrote:
A 'route -n' should show you where any destination will head on the next hop. On host C, what is the line with the smallest matching destination/mask? Likewise, on the gateway host where you think it is being forwarded the wrong way?
$ /sbin/route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 aaa.bbb.ccc.0 0.0.0.0 255.255.255.0 U 0 0 0 bridge0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bridge0 0.0.0.0 aaa.1bbb.ccc.1 0.0.0.0 UG 0 0 0 bridge0
$ traceroute 192.168.209.43 traceroute to 192.168.209.43 (192.168.209.43), 30 hops max, 40 byte packets 1 gway01 (aaa.bbb.ccc.1) 0.321 ms 0.298 ms 0.283 ms
OK, there is no better match than the default in the route table above, so it goes to the default gateway. I assume that's what you want if you don't make the netmask span the 192.168.x.x range, but a side effect is that it will source from the aaa.bbb.ccc.x interface address.
This seems to say that 192.168.209.43 is being routed out to the Internet as aaa.bbb.ddd.53 is our external gateway address on the router.
This is the routing table on the router:
[root@gway01 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface aaa.bbb.ddd.52 0.0.0.0 255.255.255.252 U 0 0 0 eth0 aaa.bbb.ccc.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1 0.0.0.0 aaa.bbb.ddd.53 0.0.0.0 UG 0 0 0 eth0
I don't see any 192.168.x.x interface/mask there. Where else could it go? Or is that 2nd 169.254.0.0 a typo?