[PLUG] Network routing

Derek Loree derek at infotects.com
Mon Jun 24 21:58:03 UTC 2002


On Mon, 2002-06-24 at 13:38, Jeff Blain wrote:
> I am trying to route one network to another, but I am having troubles in
> doing so.
> 
> Here is my scenerio...
> 
> machine A is my firewall router. 192.168.0.1
> machine B is my desktop. eth0 192.168.0.10, eth1 192.168.1.1
> machine C is a new computer. eth0 192.168.1.2

Is machine B acting as just a router, or is it trying to do NAT as well?
If it is just a router, you will need to change the netmask on your
firewall to include both subnets --> 255.255.0.0.  As it stands now, all
packets from 192.186.1.0 are in a totally separate subnet from the
subnet that the firewall is using. In other words, any address from
192.168.1.0 is not in the range of address that the firewall is willing
to work with, so it drops them.
> 
> Machine A to B connect fine, as does B to C. Machine B will not route
> traffic from C to A. Can someone help me in figuring this out?
> 
> bash-2.05a# cat /proc/sys/net/ipv4/ip_forward 1
> 
> bash-2.05a# route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0
> eth1
> 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0
> eth0
> 0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0
> eth0
> 
You probably need to specify the gateway of eth1 as the ip address of
eth0, not just to speed things up, but to clear up any possible
confusion in the routing.

> Running tcpdump on eth0 on machine B and trying to ping A from C...
> 
> bash-2.05a# tcpdump
> tcpdump: listening on eth0
> 15:35:08.636798 mesa > rftc: icmp: echo request
> 15:35:09.636891 mesa > rftc: icmp: echo request
> 15:35:10.636992 mesa > rftc: icmp: echo request
> 15:35:11.637089 mesa > rftc: icmp: echo request
> 15:35:11.638935 arp who-has rftc tell dizzy
> 15:35:11.639693 arp reply rftc is-at 0:20:af:f:95:39
> 15:35:12.637196 mesa > rftc: icmp: echo request
> 15:35:13.637302 mesa > rftc: icmp: echo request
> 
> But machine A never recieves anything.
> 
> Any help would be appreciated.
> 
> Jeff
>
HTH

Derek Loree






More information about the PLUG mailing list