hostname not visible when Linux PC receives IP from router DHCP - Networking

This is a discussion on hostname not visible when Linux PC receives IP from router DHCP - Networking ; My Linksys router acts as the DHCP server for my LAN. I have 4 Windows XP Home PCs and 1 Linux (FC7) PC connected to the router. Each PC receives its IP from the router. Each PC can ping each ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: hostname not visible when Linux PC receives IP from router DHCP

  1. hostname not visible when Linux PC receives IP from router DHCP

    My Linksys router acts as the DHCP server for my LAN. I have 4 Windows
    XP Home PCs and 1 Linux (FC7) PC connected to the router. Each PC
    receives its IP from the router. Each PC can ping each others IP
    address. Each PC can connect to the internet. Each PC can see each
    other through the Windows Network Places. One of the WIndows PCs is
    the Workgroup Master (which holds the hostname browse list). I did not
    designate the Linux PC to perform this function because the PC is not
    always connected to the LAN.

    There is just one problem. On any Windows PC I can ping by the
    hostname the other Windows PCs including the Linux PC. None of the
    hostname/IP address associations are in the hosts files. Each hosts
    file on the Windows PCs looks like this:

    127.0.0.1 localhost.localdomain localhost
    192.168.0.10 hplp # HP Printer
    192.168.0.1 lansys1 # Linksys Router

    The Linux PC contains the same lines. However, I'm unable to ping any
    the Windows PCs by hostname. I can't add the hostnames and IPs to the
    Linux hosts file because if the DHCP server decides to change the IP
    of a PC then it makes the Linux hosts file wrong.

    Why is Windows able to ping by hostname and not Linux?


  2. Re: hostname not visible when Linux PC receives IP from router DHCP

    On Nov 13, 12:35 am, tek wrote:
    > My Linksys router acts as the DHCP server for my LAN. I have 4 Windows
    > XP Home PCs and 1 Linux (FC7) PC connected to the router. Each PC
    > receives its IP from the router. Each PC can ping each others IP
    > address. Each PC can connect to the internet. Each PC can see each
    > other through the Windows Network Places. One of the WIndows PCs is
    > the Workgroup Master (which holds the hostname browse list). I did not
    > designate the Linux PC to perform this function because the PC is not
    > always connected to the LAN.
    >
    > There is just one problem. On any Windows PC I can ping by the
    > hostname the other Windows PCs including the Linux PC. None of the
    > hostname/IP address associations are in the hosts files. Each hosts
    > file on the Windows PCs looks like this:
    >
    > 127.0.0.1 localhost.localdomain localhost
    > 192.168.0.10 hplp # HP Printer
    > 192.168.0.1 lansys1 # Linksys Router
    >
    > The Linux PC contains the same lines. However, I'm unable to ping any
    > the Windows PCs by hostname. I can't add the hostnames and IPs to the
    > Linux hosts file because if the DHCP server decides to change the IP
    > of a PC then it makes the Linux hosts file wrong.
    >
    > Why is Windows able to ping by hostname and not Linux?



    I found that answer is to add "wins" as a lookup parameter to the
    "hosts:" line in the /etc/nsswitch.conf file.




  3. Re: hostname not visible when Linux PC receives IP from router DHCP

    ,--- tek writes:
    | My Linksys router acts as the DHCP server for my LAN. I have 4 Windows
    | XP Home PCs and 1 Linux (FC7) PC connected to the router. Each PC
    | receives its IP from the router. Each PC can ping each others IP
    | address. Each PC can connect to the internet. Each PC can see each
    | other through the Windows Network Places. One of the WIndows PCs is
    | the Workgroup Master (which holds the hostname browse list). I did not
    | designate the Linux PC to perform this function because the PC is not
    | always connected to the LAN.

    | There is just one problem. On any Windows PC I can ping by the
    | hostname the other Windows PCs including the Linux PC. None of the
    | hostname/IP address associations are in the hosts files. Each hosts
    | file on the Windows PCs looks like this:

    | 127.0.0.1 localhost.localdomain localhost
    | 192.168.0.10 hplp # HP Printer
    | 192.168.0.1 lansys1 # Linksys Router

    | The Linux PC contains the same lines. However, I'm unable to ping any
    | the Windows PCs by hostname. I can't add the hostnames and IPs to the
    | Linux hosts file because if the DHCP server decides to change the IP
    | of a PC then it makes the Linux hosts file wrong.

    | Why is Windows able to ping by hostname and not Linux?

    Windows also uses NETBIOS to resolve names, whereas Linux doesn't do
    this by default (in most of the distros). But I'm not able to explain
    why your Windows Box able to 'resolve' Linux box with hostname. Are
    you sure your Linux box is not using DNS server than the Linksys
    router.

    HTH
    --
    Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/
    ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --

+ Reply to Thread