Results 1 to 10 of 10

Thread: Cant' ping OWN eth0

  1. #1
    Join Date
    Jul 2006
    Beans
    103

    Cant' ping OWN eth0

    I reinstalled kubuntu 8.04 in PC#1 and made no change to its configuration.

    Plugged the ethernet cable to the Realtek 8139/8139C/8139C+ card, the green light turned on. The machine at the other end of the cable (PC#2, Kubuntu 8.04 untouched) also has the same Realtek card.

    In PC#1 did:
    Code:
    sudo ifconfig eth0 192.168.0.1 netmask 255.255.255.0
    sudo ifconfig eth0 up
    In PC#2 did:
    Code:
    sudo ifconfig eth0 192.168.0.2 netmask 255.255.255.0
    sudo ifconfig eth0 up
    In PC#1 tried to ping its own eth0 interface:
    Code:
    ping 192.168.0.1
    connect: Network is unreachable
    Then in the same PC#1 tried to ping the other PC ethernet interface:
    Code:
    ping 192.168.0.2
    connect: Network is unreachable
    This works perfectly if both PCs are running Knoppix (versions 4.0 and 6.0). And also I can ping both machines from each other.

    If I leave Knoppix running in PC#2 and run Kubuntu in PC#1 the problem appears again.

    What could be causing this? iptables is set to ACCEPT everything by default policies, so it can't be the firewall's fault.

  2. #2
    Join Date
    Apr 2009
    Location
    Seattle
    Beans
    7
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Cant' ping OWN eth0

    likely an issue with your routing table. what's it look like?

  3. #3
    Join Date
    Jul 2006
    Beans
    103

    Re: Cant' ping OWN eth0

    Well, I (kind of) found what was going wrong. I was taking for granted that only the ethernet interface of the rebooted PC needed to be reset and re-upped, but apparently even if only one of the two machines is rebooted then the interfaces in both PCs need to be reconfigured and re-upped again.
    Is this true? Seems to be very inconvenient...

    likely an issue with your routing table. what's it look like?
    Thanks for the help. But aren't both PCs in the same subnetwork? In this case a routing table isn't needed, right?

  4. #4
    Join Date
    Apr 2009
    Location
    Seattle
    Beans
    7
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Cant' ping OWN eth0

    no, of course you do not need to reconfigure both machines after one reboots. that will never happen.

    you still need a routing table that routes 192.168.0.0/24 out eth0 on both computers, assuming eth0 is the correct interface.

    you should see an entry like this:

    Code:
    route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
    Last edited by gdave; April 3rd, 2009 at 01:25 AM.

  5. #5
    Join Date
    Jul 2006
    Beans
    103

    Re: Cant' ping OWN eth0

    no, of course you do not need to reconfigure both machines after one reboots. that will never happen.
    Thanks for the help. However, the opposite *seems* to be the case. I reboot PC#1 and then of course I must do:
    Code:
    sudo ifconfig eth0 192.168.0.1 netmask 255.255.255.0
    sudo ifconfig eth0 up
    because the network is still not permanently configured. But I also *must* reconfig PC#2:
    Code:
    sudo ifconfig eth0 192.168.0.2 netmask 255.255.255.0
    sudo ifconfig eth0 up
    Otherwise I can't ping PC#2 from PC#1 anymore:
    Code:
    ping 192.168.0.2
    PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
    From 192.168.0.1 icmp_seq=1 Destination Host Unreachable
    From 192.168.0.1 icmp_seq=2 Destination Host Unreachable
    From 192.168.0.1 icmp_seq=3 Destination Host Unreachable
    Weird...

  6. #6
    Join Date
    Jan 2007
    Beans
    5,549

    Re: Cant' ping OWN eth0

    how about specifying the gateway and stuff.. for 1 machine , enter ip as 192.168.0.1 and gateway 192.168.0.1 .. for other machine enter ip as 192.168.0.2 and gateway 192.168.0.1 . make these changes in the /etc/network/interfaces file and restart networking by typing sudo /etc/init.d/networking restart

  7. #7
    Join Date
    Aug 2008
    Beans
    55

    Re: Cant' ping OWN eth0

    Do you have loopback interface? If not set it on
    /etc/network/interface by adding these lines:
    auto lo
    iface lo inet loopback

    and then restart the networking by running this
    command:
    sudo /etc/init.d/networking restart

  8. #8
    Join Date
    Apr 2009
    Location
    Seattle
    Beans
    7
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Cant' ping OWN eth0

    no gateway needed for LAN-only access.

    We still need to see your routing table. and also show your interface configuration/setup. display the results from these 3 commands:

    Code:
    route -n
    
    ip link show
    
    cat /proc/net/dev

  9. #9
    Join Date
    Jul 2006
    Beans
    103

    Re: Cant' ping OWN eth0

    how about specifying the gateway and stuff.. for 1 machine , enter ip as 192.168.0.1 and gateway 192.168.0.1 .. for other machine enter ip as 192.168.0.2 and gateway 192.168.0.1 . make these changes in the /etc/network/interfaces file and restart networking by typing sudo /etc/init.d/networking restart
    A gateway setup is not needed for this most basic ethernet connection. But I made the interfaces' new configuration persistent in /etc/network/interfaces and now I can reboot each machine independently without needing to reset the iface at the other end.

    Do you have loopback interface? If not set it on
    /etc/network/interface by adding these lines:
    auto lo
    iface lo inet loopback
    and then restart the networking by running this
    command:
    sudo /etc/init.d/networking restart
    Thanks, but everything is Ok there.

    no gateway needed for LAN-only access.

    We still need to see your routing table. and also show your interface configuration/setup. display the results from these 3 commands:
    I just solved the problem: everything works fine, but thanks anyways.

    Again, many thanks for the help guys, now I have a persistent working connection between my PCs.

  10. #10
    Join Date
    Apr 2009
    Beans
    52
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: Cant' ping OWN eth0

    Some NICs will rengotiate without being forced to and others will not.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •