why can't ping gateway? - TCP-IP

This is a discussion on why can't ping gateway? - TCP-IP ; there is simple configuration,but I really could not figure out why can't works. linux box : eth0 (192.168.1.2)used to home connection eth1 (192.168.3.150)used to campus conncetion,which has 192.168.3.1 as gateway IP. windows box: eth0 (192.168.1.3),used to home connection,gateway IP is ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: why can't ping gateway?

  1. why can't ping gateway?

    there is simple configuration,but I really could not figure out why
    can't works.

    linux box : eth0 (192.168.1.2)used to home connection
    eth1 (192.168.3.150)used to campus conncetion,which has
    192.168.3.1 as gateway IP.

    windows box: eth0 (192.168.1.3),used to home connection,gateway IP is
    192.168.1.2

    Now,on my windows box,I could ping linux eth1 (192.168.3.150) but
    can't get ping 192.168.3.1 through.

    [root@localhost ~]# netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window
    irtt Iface
    192.168.3.0 0.0.0.0 255.255.255.0 U 0 0
    0 eth1
    192.168.1.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 eth1
    0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0
    0 eth1


    sorry for my english and thanks in advance!


  2. Re: why can't ping gateway?

    In article <1189246624.522520.252840@y42g2000hsy.googlegroups. com>,
    iLRainyday wrote:

    > there is simple configuration,but I really could not figure out why
    > can't works.
    >
    > linux box : eth0 (192.168.1.2)used to home connection
    > eth1 (192.168.3.150)used to campus conncetion,which has
    > 192.168.3.1 as gateway IP.
    >
    > windows box: eth0 (192.168.1.3),used to home connection,gateway IP is
    > 192.168.1.2
    >
    > Now,on my windows box,I could ping linux eth1 (192.168.3.150) but
    > can't get ping 192.168.3.1 through.


    Sounds like the 192.168.3.1 box doesn't have a route for 192.168.1.0/24
    pointing to 192.168.3.150, so it can't reply to the pings you're sending.

    >
    > [root@localhost ~]# netstat -rn
    > Kernel IP routing table
    > Destination Gateway Genmask Flags MSS Window
    > irtt Iface
    > 192.168.3.0 0.0.0.0 255.255.255.0 U 0 0
    > 0 eth1
    > 192.168.1.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 eth1
    > 0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0
    > 0 eth1
    >
    >
    > sorry for my english and thanks in advance!


    --
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    *** PLEASE don't copy me on replies, I'll read them in the group ***

  3. Re: why can't ping gateway?

    On Sat, 08 Sep 2007 16:16:49 -0400, Barry Margolin wrote:

    > In article <1189246624.522520.252840@y42g2000hsy.googlegroups. com>,
    > iLRainyday wrote:
    >
    >> there is simple configuration,but I really could not figure out why
    >> can't works.
    >>
    >> linux box : eth0 (192.168.1.2)used to home connection
    >> eth1 (192.168.3.150)used to campus conncetion,which has
    >> 192.168.3.1 as gateway IP.
    >>
    >> windows box: eth0 (192.168.1.3),used to home connection,gateway IP is
    >> 192.168.1.2
    >>
    >> Now,on my windows box,I could ping linux eth1 (192.168.3.150) but can't
    >> get ping 192.168.3.1 through.

    >
    > Sounds like the 192.168.3.1 box doesn't have a route for 192.168.1.0/24
    > pointing to 192.168.3.150, so it can't reply to the pings you're
    > sending.
    >


    Or routing is not turned on.

    M4

  4. Re: why can't ping gateway?

    On Sat, 08 Sep 2007, in the Usenet newsgroup comp.protocols.tcp-ip, in article
    <1189246624.522520.252840@y42g2000hsy.googlegroups. com>, iLRainyday wrote:

    >there is simple configuration,but I really could not figure out why
    >can't works.


    Hmmm, no details of distribution, but the headers suggest CentOS which
    is a Red Hat clone. It helps to include your distribution data, as
    things are done differently by the 800+ Linux distributions.

    Have you installed the HOWTOs? There should be over 450 documents in
    /usr/share/HOWTO/.

    >linux box : eth0 (192.168.1.2)used to home connection
    > eth1 (192.168.3.150)used to campus conncetion,which has
    >192.168.3.1 as gateway IP.
    >
    >windows box: eth0 (192.168.1.3),used to home connection,gateway IP is
    >192.168.1.2


    OK - fairly normal setup

    >Now,on my windows box,I could ping linux eth1 (192.168.3.150) but
    >can't get ping 192.168.3.1 through.


    1. cat /proc/sys/net/ipv4/ip_forward Is that a "1"?
    2. Does 192.168.3.1 know how to reach 192.168.1.x by sending the
    replies to 192.168.3.150 to be forwarded?

    >[root@localhost ~]# netstat -rn
    >Kernel IP routing table
    >Destination Gateway Genmask Flags MSS Window irtt Iface
    >192.168.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    >192.168.1.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 eth1
    >0.0.0.0 192.168.3.1 0.0.0.0 UG 0 0 0 eth1


    Looks fine - and I guess that the windoze box is able to ping the
    eth1 address (however it is not the eth1 interface that is answering, but
    the _kernel_ which knows all of it's addresses, and is answering through
    the "appropriate" interface - in this case eth0) so it is configured
    correctly. You need to look at the 192.168.3.1 router routing table to
    see that it knows how to reach 192.168.1.x. The 169.254.0.0 is only
    needed if you have a broken DHCP server on the 192.168.3.x network. If
    you look inside /etc/sysconfig/network-scripts/ifup you'll probably
    find something like:

    # Add Zeroconf route.
    if [ -z "${NOZEROCONF}" -a "${ISALIAS}" = "no" ]; then
    ip route replace 169.254.0.0/16 dev ${REALDEVICE}
    fi

    So if you set NOZEROCONF=yes in the /etc/sysconfig/network configuration
    file, this "feature" will be disabled. That probably is also where you
    can set

    FORWARD_IPV4=

    to 'yes' or 'true', which the network boot scripts will then set the
    kernel variable '/proc/sys/net/ipv4/ip_forward' correctly.

    >sorry for my english and thanks in advance!


    Your English is fine.

    Old guy


  5. Re: why can't ping gateway?

    thanks for everyone

    the reason is "192.168.3.1 has no routing for icmp to return",as above
    said~

    in addition,Barry Margolin, thanks for encouraging my english


+ Reply to Thread