Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Ubuntu can't ping XP and vice versa

  • 13-10-2008 8:44am
    #1
    Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭


    Hi guys, could really use some help with this one.

    I have an XP home PC wired into a Belkin router. Ubuntu (8.04) eee laptop is wirelessly connected to router. Both machines can ping the router and out to the internet.

    I'm trying to mount an XP shared drive on the Ubuntu machine, but before doing that, I can't get the machines to ping each other. Have tried disabling the firewalls on both machines with no joy.

    Where do I start?


Comments

  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    betafrog wrote: »
    Have you checked that both machines are on the same subnet and that you haven't disabled DHCP on the router?

    What are the IP address for the 2 machines?

    XP Machine;
    IP 192.168.2.2
    Subnet : 255.255.255.0

    Ubuntu Machine;
    IP : 192.168.2.10
    Subnet : 255.255.255.0

    DHCP is enabled on the router, but the XP machine has a static IP. Not using static IP on laptop as I use it in roaming mode at different locations throughout the day.


  • Registered Users, Registered Users 2 Posts: 160 ✭✭TeaServer


    This sounds a bit odd.

    Is ping (ICMP) disabled on the router?

    Another possibility is that the arp cache has incorrect entries. Check the contents of the arp cache on both machines and check that they have the correct MAC address listed for the IP you are trying to ping.

    XP:

    start -> run -> cmd -> arp -a

    Ubuntu:

    In a terminal: arp


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    TeaServer wrote: »
    This sounds a bit odd.

    Is ping (ICMP) disabled on the router?

    Another possibility is that the arp cache has incorrect entries. Check the contents of the arp cache on both machines and check that they have the correct MAC address listed for the IP you are trying to ping.

    XP:

    start -> run -> cmd -> arp -a

    Ubuntu:

    In a terminal: arp

    Ok, looks like something is amiss in the arp cache alright.
    XP 
    Interface: 192.168.2.11 --- 0x2
      Internet Address      Physical Address      Type
      192.168.2.1           00-17-3f-e6-44-47     dynamic
    
    Ubuntu
    Address                  HWtype  HWaddress           Flags Mask            Iface
    192.168.2.11                     (incomplete)                              ra0
    router                   ether   00:17:3F:E6:44:47   C                     ra0 
    

    I've no idea what needs to be done to correct this, so any assistance is very welcome.


  • Registered Users, Registered Users 2 Posts: 160 ✭✭TeaServer


    On the Ubuntu box
    sudo arp -d 192.168.2.11
    sudo arp -s 192.168.2.11 <MAC Address of XP>
    
    If the XP is a fixed IP you can use the second command too.

    If you leave out the second command and it 'should' arp automatically the next time you ping the XP machine and populate the arp cache.

    Hopefully problem solved after this


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    I tried using the first command and leaving out the second command. Attempted to ping the XP machine and got 'Destination host unreachable'. I checked the arp table and it was like it was previously, i.e. it showed (incomplete) under HWAddress.

    I then used both commands and checked the arp table. It looks like this;
    Address                  HWtype  HWaddress           Flags Mask            Iface
    192.168.2.11             ether   00:11:11:79:A0:61   CM                    ra0
    router                   ether   00:17:3F:E6:44:47   C                     ra0 
    

    Now when I try a : sudo ping 192.168.2.11, it just shows;
    PING 192.168.2.11 (192.168.2.11) 56(84) bytes of data.

    and appears to hang here indefinitely - not showing any unreachable messages.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 160 ✭✭TeaServer


    Ok,

    Looking back at your previous posts, we appear to have a conflict about the IP addresses used.

    What are the IP addresses of:

    Router: 192.168.2.1 (from your arp caches)
    WinXP: 192.168.2.2 or 192.168.2.11??
    Ubuntu: 192.168.2.10?

    If the XP machine is actually 192.168.2.2 then you need to change the arp cache from 192.168.2.11

    The dest host not reachable message usually means there is nothing @ that IP address, so maybe you have not setup the XP machine properly?

    Output of
    ipconfig /all
    
    on XP and
    ifconfig -a ra0
    
    on Ubuntu might help us out...


  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    Router: 192.168.2.1

    also set your getway to the router address
    on ubunto and xp


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    Sorry for the confusion - the mixup of IP addresses was only in the posts above. To confirm this, here's the info you were looking for.

    XP :

    ipconfig /all
    C:\Documents and Settings\Mike>ipconfig /all
    
    Windows IP Configuration
    
            Host Name . . . . . . . . . . . . : MikePC
            Primary Dns Suffix  . . . . . . . :
            Node Type . . . . . . . . . . . . : Broadcast
            IP Routing Enabled. . . . . . . . : Yes
            WINS Proxy Enabled. . . . . . . . : Yes
    
    Ethernet adapter Local Area Connection:
    
            Connection-specific DNS Suffix  . :
            Description . . . . . . . . . . . : Broadcom NetXtreme 57xx Gigabit Cont
    roller
            Physical Address. . . . . . . . . : 00-11-11-79-A0-61
            Dhcp Enabled. . . . . . . . . . . : No
            IP Address. . . . . . . . . . . . : 192.168.2.2
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . : 192.168.2.1
            DNS Servers . . . . . . . . . . . : 159.134.237.6
                                                159.134.248.17
    

    arp -a
    C:\Documents and Settings\Mike>arp -a
    
    Interface: 192.168.2.2 --- 0x2
      Internet Address      Physical Address      Type
      192.168.2.1           00-17-3f-e6-44-47     dynamic
      192.168.2.10          00-15-af-e5-b4-b6     static
    


    Ubuntu:

    ifconfig -a /ra0
    ra0       Link encap:Ethernet  HWaddr 00:15:af:e5:b4:b6           inet addr:192.168.2.10  Bcast:192.168.2.255  Mask:255.255.255.0
             inet6 addr: fe80::215:afff:fee5:b4b6/64 Scope:Link
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:3399 errors:0 dropped:0 overruns:0 frame:0
             TX packets:509 errors:0 dropped:0 overruns:0 carrier:0
             collisions:0 txqueuelen:1000
             RX bytes:349141 (340.9 KB)  TX bytes:11897 (11.6 KB)
             Interrupt:19 
    

    arp
    Address                  HWtype  HWaddress           Flags Mask            Iface
    router                   ether   00:17:3F:E6:44:47   C                     ra0
    192.168.2.2              ether   00:11:11:79:A0:61   CM                    ra0 
    

    Note that I have to delete incomplete entries in the Ubuntu arp each time I switch the machine on, and then enter the ip and mac manually with arp -s

    When I attempt to ping 192.168.2.2;
    sudo ping 192.168.2.2
    PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
    
    

    it hangs here indefinitely.


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    I added the XP machine to /etc/hosts with the following;
    127.0.0.1 localhost
    127.0.1.1 mike-eee
    192.168.2.1 router
    192.168.2.2 MikePC
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    

    Thought maybe that the ip6 entries were screwing with the pinging, but after commenting them out there was no change. Pinging MikePC will resolve it's IP address, but still hangs indefinitely.

    I have since uncommented the ip6 entries in /etc/hosts.


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    How do i check and set the gateway setting in Ubuntu?

    I imagine it is ok since I can ping boards.ie from a terminal, but I'd like to make sure.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 160 ✭✭TeaServer


    Right so we don't have the dest unreachable now. My guess is that the XP machine is not responding as a result of firewall or something along those lines.

    Make sure you have all firewall disabled on both machines and try the ping again.

    Note: the arp cache will timeout and automatically be repopulated when an IP on the same network is requested. You should not need to manually add the arp entries. Check the Ubuntu box arp after startup, then ping the XP machine and check the arp cache. If the arp cache has the correct MAC address listed then we know that the Layer 2 traffic is working.

    If it does not have an entry (incomplete) for the XP machine after the ping request, there is a Layer 2 problem, ping (layer 3) will never work.

    Try the above to see if the correct MAC address is populated.

    Note: Default route (gateway) is only needed if the IP address is on another (sub)network, in your case it is the same network, so the ping should work without a default route. But if you are using DHCP it should be set automatically by DHCP server (wireless router)

    As a matter of interest how are you assigning the fixed IP to the XP machine? I presume it is through a MAC Address to IP Address mapping on the router DHCP server, and not actually just manually set on the XP host to use fixed IP while the router is still using DHCP? (This will cause problems)


  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    Physical Address. . . . . . . . . : 00-11-11-79-A0-61
    Dhcp Enabled. . . . . . . . . . . : No
    IP Address. . . . . . . . . . . . : 192.168.2.2
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.2.1
    DNS Servers . . . . . . . . . . . : 159.134.237.6
    159.134.248.17


    The dns settings should also be the router ip
    for xp and ubunto

    the dns setting or outside of your network
    meaning you can ping boards.ie but not your xp machine


  • Registered Users, Registered Users 2 Posts: 4,864 ✭✭✭MunsterCycling


    Is the router set to infrasture mode or acting as an AP, in AP mode it won't let you connect to other machines using the same AP just like public Hotspots.


    MC


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    Thanks for the input guys. I'll check out all the above steps late this afternoon when I get back home and report back on the outcomes.


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    TeaServer wrote: »
    As a matter of interest how are you assigning the fixed IP to the XP machine? I presume it is through a MAC Address to IP Address mapping on the router DHCP server, and not actually just manually set on the XP host to use fixed IP while the router is still using DHCP? (This will cause problems)

    I'll answer this first. I know nothing about MAC address to IP address mapping and did have IP manually set on the XP host while the router was using DHCP (but had IP pool start address set higher than the fixed IP, but I'm guessing this is still a no-go). I had a look through the settings on the router and saw nothing to this effect. What option would I find this under?

    For now, I have switched the XP host back to DHCP (obtain an IP address automatically, and obtain DNS automatically). I have set the lease time on the router to 'forever'. Note that I have the IP pool starting address set to 192.168.2.10. So now, the Ubuntu machine is 192.168.2.10 and the XP machine is 192.168.2.11
    TeaServer wrote:
    Right so we don't have the dest unreachable now. My guess is that the XP machine is not responding as a result of firewall or something along those lines.

    Make sure you have all firewall disabled on both machines and try the ping again.

    Note: the arp cache will timeout and automatically be repopulated when an IP on the same network is requested. You should not need to manually add the arp entries. Check the Ubuntu box arp after startup, then ping the XP machine and check the arp cache. If the arp cache has the correct MAC address listed then we know that the Layer 2 traffic is working.

    If it does not have an entry (incomplete) for the XP machine after the ping request, there is a Layer 2 problem, ping (layer 3) will never work.

    Try the above to see if the correct MAC address is populated.

    Ok, I restarted the Ubuntu machine and checked the arp
    Address                  HWtype  HWaddress           Flags Mask            Iface
    router                   ether   00:17:3F:E6:44:47   C                     ra0 
    

    Now when I ping the XP machine, 192.168.2.11 (This is now the XP machine's IP - received from the router through DHCP and confirmed with an ipconfig in XP), I get 'destination Host Unreachable'.

    I check the arp again, and...
    Address                  HWtype  HWaddress           Flags Mask            Iface
    192.168.2.11             ether   (incomplete)                              ra0
    router                   ether   00:17:3F:E6:44:47   C                     ra0 
    

    Rambo wrote:
    The dns settings should also be the router ip
    for xp and ubunto

    the dns setting or outside of your network
    meaning you can ping boards.ie but not your xp machine

    Both the XP and Ubuntu machines are now in automatic configurations. ipconfig /all shows that XP now has router IP as DNS server. ifconfig doesn't show a DNS server.
    Is the router set to infrasture mode or acting as an AP, in AP mode it won't let you connect to other machines using the same AP just like public Hotspots.

    My answer to this is 'I don't know'. I looked through every setting on every page of the router setup and can't find anything to differentiate between Access Point and Infrastructure modes.

    The router is a 'Belkin Wireless G Router' in case anyone was about to ask.

    Edit: Just to verify something that I omitted from above. I tried all the above steps with firewalls turned off on both machines.


  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    could you also try
    the command route on the unbunto box
    this well tell you getways you are using

    you are using network cable to connect to the router box


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    Rambo wrote: »
    could you also try
    the command route on the unbunto box
    this well tell you getways you are using

    you are using network cable to connect to the router box

    route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.2.0     *               255.255.255.0   U     0      0        0 ra0
    link-local      *               255.255.0.0     U     1000   0        0 ra0
    default         192.168.2.1     0.0.0.0         UG    0      0        0 ra0 
    

    xp is wired to router
    ubuntu is wireless to router


  • Registered Users, Registered Users 2 Posts: 160 ✭✭TeaServer


    Tzetze wrote: »
    I'll answer this first. I know nothing about MAC address to IP address mapping and did have IP manually set on the XP host while the router was using DHCP (but had IP pool start address set higher than the fixed IP, but I'm guessing this is still a no-go).

    The mapping was a setting in my router, what you were doing might have been ok for your router
    Tzetze wrote: »
    Address                  HWtype  HWaddress           Flags Mask            Iface
    192.168.2.11             ether   (incomplete)                              ra0
    router                   ether   00:17:3F:E6:44:47   C                     ra0 
    

    Ok, so it appears to be a case of no arp reply from the XP side. If you have wireshark installed (http://www.wireshark.org) on both systems you can watch for the arp requests and arp replies (if any). I think MC is on to something in his post
    Is the router set to infrasture mode or acting as an AP, in AP mode it won't let you connect to other machines using the same AP just like public Hotspots.

    in that the router is actually not bridging between the wired and wireless networks. If the arp request is not getting to all systems on the network the switch (wireless router) is to blame. I'm not familiar with your router, but a quick google of the problem seems to suggest it is happening to a few people. Maybe try upgrading the firmware, or checking if there is an option to allow the wired and wireless networks to be bridged. Your router also appears to have built in firewall that might be stopping traffic too.

    Failing that I'm out of ideas...


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    On further inspection into the settings on the router, I found 'Act as an access point', which is and was disabled. So, that's not the problem. So, I tried something that, until now, I hadn't tried at all. I wired the laptop to the router just like the desktop machine. Tried to ping to XP and whaddya know, it worked!

    So, your last comment seems to be right on the button. The router is not bridging between the wired and wireless networks. As far as I can tell, there is no option for this in the router's settings. I updated the router to the latest firmware, and still no joy. This defeats the intended purpose of getting the router, ie to access shared folders on the XP machine from anywhere around the house.

    I'll be taking the POS router back to where it was bought, and see if I can exchange it for something more suitable. Can you recommend a G router (doesn't need to be N) that is up to the job?


  • Registered Users, Registered Users 2 Posts: 1,143 ✭✭✭Tzetze


    Well, I exchanged it for a D-Link (DI-524). Had everything up and running in 10 minutes. What a pleasant and painless procedure it should have been all along. The only bit of hassle I had was trying to explain to the guy behind the counter in PCWorld that the problem was nothing to do with the fact that I didn't run the Network Setup Wizard in XP... :rolleyes:

    Thanks to everyone who helped out in this thread, I've learned a lot from you guys.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 160 ✭✭TeaServer


    Nice one. I guess that is something I should be on the lookout for when buying a router in future.

    /T


Advertisement