subnet unable to get beyond gateway!

Discussion in 'Routers and Switches' started by joe, Jan 12, 2015.

  1. joe

    joe

    Joined:
    Jan 11, 2015
    Messages:
    1
    Likes Received:
    0
    Location:
    UK
    Trying to route between two networks and got it working one way - but not the other.

    'enrico' is my internet gateway/router (CentOS 6) with PPP running over eth0 and my internal network running over eth1. It also runs DHCP on eth1. To keep things simple for you here I have disconnected from the internet for now (ifdown ppp0, ifdown eth0)

    Code:
    root@enrico:[/etc/sysconfig/network-scripts]# ifconfig eth1
    eth1      Link encap:Ethernet  HWaddr C8:3A:35:D5:76:9F  
              inet addr:192.168.37.1  Bcast:192.168.37.255  Mask:255.255.255.0
              inet6 addr: fe80::ca3a:35ff:fed5:769f/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:6610606 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8204536 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:9885245 (9.4 MiB)  TX bytes:4036055794 (3.7 GiB)
              Interrupt:21 Base address:0x6000 
    
    root@enrico:[/etc/sysconfig/network-scripts]# netstat -nr
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    10.37.0.1       0.0.0.0         255.255.255.255 UH        0 0          0 eth1
    192.168.37.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
    10.37.0.0       10.37.0.1       255.255.0.0     UG        0 0          0 eth1
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
    'gateway' is another CentOS 6 server. eth0 gets an IP address from the DHCP server on enrico and it behaves as I would expect.

    Code:
    root@gateway:[/etc/sysconfig/network-scripts]# ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 00:15:60:A3:A6:CE  
              inet addr:192.168.37.13  Bcast:192.168.37.255  Mask:255.255.255.0
              inet6 addr: fe80::215:60ff:fea3:a6ce/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:24017 errors:0 dropped:0 overruns:0 frame:0
              TX packets:26755 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2869124 (2.7 MiB)  TX bytes:2177876 (2.0 MiB)
              Interrupt:17 
    
    root@gateway:[/etc/sysconfig/network-scripts]# netstat -nr
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    192.168.37.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 eth0
    0.0.0.0         192.168.37.1    0.0.0.0         UG        0 0          0 eth0
    
    root@gateway:[/etc/sysconfig/network-scripts]# ping 192.168.37.1 {enrico}
    PING 192.168.37.1 (192.168.37.1) 56(84) bytes of data.
    64 bytes from 192.168.37.1: icmp_seq=1 ttl=64 time=0.650 ms
    64 bytes from 192.168.37.1: icmp_seq=2 ttl=64 time=0.084 ms
    64 bytes from 192.168.37.1: icmp_seq=3 ttl=64 time=0.087 ms
    64 bytes from 192.168.37.1: icmp_seq=4 ttl=64 time=0.084 ms
    
    --- 192.168.37.1 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3000ms
    rtt min/avg/max/mdev = 0.084/0.226/0.650/0.244 ms
    
    root@gateway:[/etc/sysconfig/network-scripts]# ping 192.168.37.14 {hariot}
    PING 192.168.37.14 (192.168.37.14) 56(84) bytes of data.
    64 bytes from 192.168.37.14: icmp_seq=1 ttl=64 time=0.270 ms
    64 bytes from 192.168.37.14: icmp_seq=2 ttl=64 time=0.350 ms
    64 bytes from 192.168.37.14: icmp_seq=3 ttl=64 time=0.317 ms
    64 bytes from 192.168.37.14: icmp_seq=4 ttl=64 time=0.296 ms
    
    --- 192.168.37.14 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 2999ms
    rtt min/avg/max/mdev = 0.270/0.308/0.350/0.031 ms
    Now bring up eth1 on gateway

    Code:
    root@gateway:[/etc/sysconfig/network-scripts]# ifup eth1
    Determining if ip address 10.37.0.1 is already in use for device eth1...
    
    root@gateway:[/etc/sysconfig/network-scripts]# ifconfig eth1
    eth1      Link encap:Ethernet  HWaddr 10:FE:ED:07:E3:10  
              inet addr:10.37.0.1  Bcast:10.37.255.255  Mask:255.255.0.0
              inet6 addr: fe80::12fe:edff:fe07:e310/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:40313 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3203 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:3048381 (2.9 MiB)  TX bytes:336741 (328.8 KiB)
    		    
    root@gateway:[/etc/sysconfig/network-scripts]# netstat -nr
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    192.168.37.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
    10.37.0.0       0.0.0.0         255.255.0.0     U         0 0          0 eth1
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
    0.0.0.0         192.168.37.1    0.0.0.0         UG        0 0          0 eth0
    Clients on 192.168.37.0/24 are able to ping 10.37.0.1 - here from 'hariot' running OS X

    Code:
    joe@hariot:[~/workspace/ProcessAnalysis2]$ ping 10.37.0.1
    PING 10.37.0.1 (10.37.0.1): 56 data bytes
    64 bytes from 10.37.0.1: icmp_seq=0 ttl=64 time=0.366 ms
    64 bytes from 10.37.0.1: icmp_seq=1 ttl=64 time=0.335 ms
    64 bytes from 10.37.0.1: icmp_seq=2 ttl=64 time=0.466 ms
    64 bytes from 10.37.0.1: icmp_seq=3 ttl=64 time=0.376 ms
    
    --- 10.37.0.1 ping statistics ---
    4 packets transmitted, 4 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 0.335/0.386/0.466/0.049 ms
    Connecting a Windows7 machine 'joe-dv7' (via eth1 on gateway) we can also ping that {Windows Firewall is disabled}

    Code:
    joe@hariot:[~/workspace/ProcessAnalysis2]$ ping 10.37.0.2
    PING 10.37.0.2 (10.37.0.2): 56 data bytes
    64 bytes from 10.37.0.2: icmp_seq=0 ttl=127 time=1.148 ms
    64 bytes from 10.37.0.2: icmp_seq=1 ttl=127 time=1.222 ms
    64 bytes from 10.37.0.2: icmp_seq=2 ttl=127 time=1.123 ms
    64 bytes from 10.37.0.2: icmp_seq=3 ttl=127 time=1.131 ms
    
    --- 10.37.0.2 ping statistics ---
    4 packets transmitted, 4 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 1.123/1.156/1.222/0.039 ms
    All of which is what I would expect.
    WHERE THINGS START TO GO WRONG IS ...
    Trying to come back to the 192.168.37.0/24 network from joe-dv7

    It pings 10.37.0.1 but cannot seem to get beyond there.
    I've googled/read a lot but as far as I can see I have done everything right - I can't fathom why it doesn't work.

    I've tried adding a host route as follows - but that doesn't seem to make any difference

    Code:
    root@gateway:[/etc/sysconfig/network-scripts]# route add -host 192.168.37.1 dev eth0
    
    root@gateway:[/etc/sysconfig/network-scripts]# netstat -nr
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    192.168.37.1    0.0.0.0         255.255.255.255 UH        0 0          0 eth0
    192.168.37.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
    10.37.0.0       0.0.0.0         255.255.0.0     U         0 0          0 eth1
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
    0.0.0.0         192.168.37.1    0.0.0.0         UG        0 0          0 eth0
    I do have iptables running on enrico but stopping that doesn't make any difference either.

    I guess it could be something to do with the Windows machine but my instinct says it is the routing on 'gateway'. But I have run out of ideas now so would be grateful if anyone can suggest anything.
     
    joe, Jan 12, 2015
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.