routes are killing me - how to?

Stefan Jeglinski yellowdog-general@lists.terrasoftsolutions.com
Thu Nov 7 14:58:01 2002


>  > I'm still not sure I'm doing iptables right anyway, but the issue is
>>  more fundamental than that. The hosts on 192.168.0.0 have the gateway
>>  device listed as 192.168.0.1, but they cannot ping 192.168.0.1, and
>>  vice versa. I believe this is a problem with the routing table. Am I
>>  wrong on this?
>
>This means there is something wrong. The internal machines should be able to
>ping the interface without needing masqing, forwarding, or any routes. Make
>sure your subnet masks are correct. The internal interface (eth0, as I
>understand) and all of the machines must be using the same subnet mask. None
>of the internal machines should have ip forwarding on, or any routes
>specified other than what is set up by default by the network configuration
>files.
>
>You will not have any success with masquerading until you have this issue
>resolved.

Agreed. On the Linux box I have:

eth0      Link encap:Ethernet  HWaddr 00:00:C5:53:8E:45 
           inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:21675 dropped:0 overruns:0 frame:0
           TX packets:0 errors:309 dropped:0 overruns:0 carrier:918
           collisions:0

eth1      Link encap:Ethernet  HWaddr 00:05:9A:20:02:3A 
           inet addr:63.220.231.132  Bcast:63.220.231.191  Mask:255.255.255.192
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:69453 errors:2 dropped:0 overruns:0 frame:2
           TX packets:110560 errors:38 dropped:0 overruns:0 carrier:76
           collisions:0

eth1 is physically connected to a switch on the public network. eth0 
is connected to a hub on the private network. the only box on the 
private network is an OSX box:

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         inet6 fe80::203:93ff:fe48:e26%en0 prefixlen 64 scopeid 0x4
         inet 192.168.0.222 netmask 0xffffff00 broadcast 192.168.0.255
         ether 00:03:93:48:0e:26
         media: autoselect (100baseTX <half-duplex>) status: active

So it seems to me, the OSX box and the eth0 NIC are on the same 
subnet. They are physically connected to one another through the hub 
and nothing else:

OSX (192.168.0.222) ----- hub ----- (192.168.0.1) eth0

They cannot ping one another! But before you say that there must be a 
problem with hardware, consider that using all of the same pieces, 
this *works*:

               +---------------------------------+
               |  +---------------------------+  |
               +  |                           |  |
              hub | +-----------------------+ |  |
OSX          |   | |                       | |  |
63.220.231.x-+   +-+ eth0 (63.220.231.162) | |  |
                    |                       | +-hub--dslmodem (63.220.231.129)
                    |                       |   | |
                    | (63.220.231.132) eth1 +---+ +
                    |                       |     |
                    +-----------------------+     |
                                                  |
                  other 63.220.231.128/26 IPs ----+




Stefan Jeglinski