need help in adding a computer to internal home network (host unreachable)

Discussion in 'Linux Networking' started by H. S., Apr 29, 2004.

  1. H. S.

    H. S. Guest

    Hi,

    I am trying to add another computer to my internal home network. My main
    computer, say HomeR (running Debian Sarge 2.4.24-1-686), working as a
    router has two NICs. It's eth0 connects to the high speed modem and eth1
    connects to a switch and has the configuration:
    #-------------------------------------------------------------------
    #> cat /etc/network/interfaces
    # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
    # /usr/share/doc/ifupdown/examples for more information.
    # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

    # The loopback interface
    auto lo
    iface lo inet loopback

    # The first network card - this entry was created during the Debian
    installation
    # (network, broadcast and gateway are optional)
    auto eth0
    iface eth0 inet static
    address 192.168.1.0
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    # gateway 192.168.10.1
    pre-up /etc/iptables/iptables.sh panic
    pre-up /etc/iptables/iptables.sh preup_start
    auto eth1
    iface eth1 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    # gateway 192.168.1.0
    #-------------------------------------------------------------------
    The route command on HomeR gives:
    #> route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    a.b.c.d 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    0.0.0.0 a.b.c.d 0.0.0.0 UG 0 0 0 ppp0

    where a.b.c.d is the IP that my ISP provides each time I connect to it.


    My two internal computer are connected to the swith from their NICs.

    One of my internal home computers, say Home1, is 192.168.0.10 and is
    working fine (ping, internet, ssh, etc. towards HomeR and outside). The
    other, say Home2, is the one I am trying to add. I put in Knoppix and
    set Home2 up as 192.168.0.11, with netmask 255.255.255.0, gateway
    192.168.0.2 and with the nameserves which are listed in
    /etc/resolve.conf of HomeR (the router machine).

    I cannot ping to or from 192.168.0.11 any other computer. Domain names
    do not get resolved. If I try pinging it from HomeR, I get:
    # ping -c4 192.168.0.11
    PING 192.168.0.11 (192.168.0.11) 56(84) bytes of data.
    From 192.168.0.2 icmp_seq=1 Destination Host Unreachable
    From 192.168.0.2 icmp_seq=2 Destination Host Unreachable
    From 192.168.0.2 icmp_seq=3 Destination Host Unreachable
    From 192.168.0.2 icmp_seq=4 Destination Host Unreachable

    --- 192.168.0.11 ping statistics ---
    4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3000ms
    , pipe 3


    But if I disconnect Home1 from the internal LAN, and do 'tcpdump -i
    eth1' on HomeR, and ping HomeR from Home2, I get:
    # tcpdump -i eth1
    tcpdump: listening on eth1
    03:19:03.838878 arp who-has 192.168.0.2 tell 192.168.0.11
    03:19:03.838928 arp reply 192.168.0.2 is-at 0:50:ba:50:3:87
    03:19:04.833008 arp who-has 192.168.0.2 tell 192.168.0.11
    03:19:04.833039 arp reply 192.168.0.2 is-at 0:50:ba:50:3:87
    03:19:05.833046 arp who-has 192.168.0.2 tell 192.168.0.11
    03:19:05.833091 arp reply 192.168.0.2 is-at 0:50:ba:50:3:87


    But if I do 'tcpdump -i eth0' on Home2 and ping Home2 from HomeR, I get
    no activity. So it seems that Home2 is able to send packets to the
    192.168.0.0 network, but no other machine is able to send any to
    192.168.0.11(Home2).


    Any ideas what could be going wrong or how do I go about solving this?

    Thanks a ton,
    ->HS
     
    H. S., Apr 29, 2004
    #1
    1. Advertisements

  2. H. S.

    H. S. Guest

    or have I not described the problem properly? I am at wit's end, not
    sure what is wrong with my network. Could use some help.

    ->HS



    Apparently, _H. S._, on 04/29/04 03:35,typed:
     
    H. S., Apr 29, 2004
    #2
    1. Advertisements

  3. H. S.

    /dev/rob0 Guest

    If you're using PPPoE, which it appears from other information you
    posted, IIUC the eth0 interface should have no IP assigned.
    Did you consult these man pages and examples? That's all Debian-
    specific, and I cannot help with that. In fact the majority of your
    post seems to be Debian-specific.
    The gateway IP should be the pppd peer IP. /sbin/ifconfig output might
    be more useful here.
    So that is the machine with the problem ... why are you posting the
    information from the router? Try ifconfig on the troubled client, and
    the "route -n" from there.
    Guess: broken routing on home2?
     
    /dev/rob0, Apr 29, 2004
    #3
  4. H. S.

    H. S. Guest

    Apparently, _/dev/rob0_, on 04/29/04 16:24,typed:
    Okay, here is what Home2 gives me:

    $> route -n
    ~# 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
    0.0.0.0 192.168.0.2 0.0.0.0 UG 0 0 0 eth0

    $> ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:0C:41:1D:32:3E
    inet addr:192.168.0.11 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:14 dropped:0 overruns:0 frame:16
    TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:2376 (2.3 KiB)
    Interrupt:11 Base address:0xd800

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:26 errors:0 dropped:0 overruns:0 frame:0
    TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:2664 (2.6 KiB) TX bytes:2664 (2.6 KiB)


    BTW, as I mentioned earlier, Home1 machine is running Win98 and is
    working fine as far as the network is concerned. It's IP is
    192.168.0.10. Now if I unplug Home1's LAN cable and connect it to
    Home2's NIC and change Home2's IP as 192.168.0.10, thereby effectively
    making Home2 as Home1 (from network's point of view), the new machine
    still can't ping anything else, i.e. the problem remains the same.

    Hopefully the above information will help to narrow down the problem.

    thanks for your suggestions,
    ->HS
     
    H. S., Apr 29, 2004
    #4
  5. H. S.

    /dev/rob0 Guest

    Routing looks fine.
    ^^ ^^
    But this does NOT. You've got either a physical problem with the NIC,
    media (cables), or the Ethernet driver.
    No need to change the IP, but swapping the cable eliminates that as a
    suspect. Bad NIC or driver problem.
    Usually when ifconfig shows errors, it means it. :) I did see one time
    where a buggy tulip NIC showed errors yet it worked fine.
     
    /dev/rob0, Apr 30, 2004
    #5
  6. H. S.

    H. S. Guest

    Apparently, _/dev/rob0_, on 04/29/04 21:40,typed:

    I did consider that possibility. So I changed the NIC and used a brand
    new LinkSys NIC. Same symptons. Though I need to verify that the driver
    the knoppix was using was not reported to have shown any problem, and
    also I am yet to test the new NIC in WinXP (it is going to be a dual
    boot machine). Quite honestly, this is driving me nuts ... grrr.

    BTW, last night, I started pinging HomeR (router machine) from Home2
    (the problem machine),and started "tcpdump -i eth1" on HomeR. It showed
    some activity (no other machine was connected to the switch, so Home2
    was the only machine on my internal LAN). So I inferred from that the
    NIC on Home2 was able to send data to the LAN but was not able to
    receive it or understand it. I am not sure what this leads to, but it is
    another sympton.

    ->HS
     
    H. S., Apr 30, 2004
    #6
  7. H. S.

    H. S. Guest

    Apparently, _/dev/rob0_, on 04/29/04 21:40,typed:

    It was the cable!

    So: HomeR is connected to the switch (a 1->4 switch). Home1 and Home2
    were connected to the switch. The problem computer was Home2. While
    debugging the problem, I replaced the cable of Home1 with the one that I
    was using for Home2, and Home1 worked perfectly, thus eliminating the
    cable as the problem. But while trying an older cable with Home2, we
    observed Home2 then worked okay!! So it was the cable, which
    coincidently worked okay with Home1 but not with Home2. Now that we have
    replaced the cable, all inter LAN is working okay.
     
    H. S., Apr 30, 2004
    #7
    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.