Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: is this a dns problem?

  1. #1
    Join Date
    Apr 2007
    Beans
    11

    is this a dns problem?

    I have a bunch of computers (windows and ubuntu) hooked to my router. When I log into the router I can see all the connected computers, I can see their IP and I can also see the name of the computers.

    When using windows, I can access all other machines using their names (even ubuntu). When trying to do the same with ubuntu I have to use the IP number. I'm sure there's some simple service missing on the ubuntu machine that queries the router for the name of the machine. Can anybody help?


    Thank you.

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    6,609
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: is this a dns problem?

    It sounds familiar.

    Could you post the results of these commands on the Ubuntu machine?
    Code:
    $ ifconfig
    
    $ route -n
    
    $ nslookup ubuntu.com
    
    $ dig ubuntu.com
    Regards.

  3. #3
    Join Date
    Oct 2010
    Location
    uk
    Beans
    247
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: is this a dns problem?

    I think that is because windows uses WINS to resolve the names into addresses but linux uses dns and unless you have a local dns server you will need to enter the ip.

    you might be able to setup linux to use WINS i'm not sure you will have to look into it

    Probably the easiest way would be to give them static ip's an enter them into /etc/hosts file

    --edit--

    this should explain how to setup WINS
    http://www.korokithakis.net/posts/ho...ames-in-linux/
    Last edited by dave01945; October 12th, 2011 at 10:19 PM.
    The best things in life are free

  4. #4
    Join Date
    Apr 2007
    Beans
    11

    Re: is this a dns problem?

    Code:
    dsula@tabasco:~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:0c:29:80:b6:61  
              inet addr:192.168.1.117  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::20c:29ff:fe80:b661/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:23 errors:0 dropped:0 overruns:0 frame:0
              TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2742 (2.7 KB)  TX bytes:7364 (7.3 KB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:16 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:960 (960.0 B)  TX bytes:960 (960.0 B)
    
    dsula@tabasco:~$ 
    
    dsula@tabasco:~$ route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
    dsula@tabasco:~$ 
    
    dsula@tabasco:~$ nslookup ubuntu.com
    Server:		68.87.71.230
    Address:	68.87.71.230#53
    
    Non-authoritative answer:
    Name:	ubuntu.com
    Address: 91.189.94.156
    
    dsula@tabasco:~$ 
    
    dig ubuntu.com
    
    ; <<>> DiG 9.7.0-P1 <<>> ubuntu.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37146
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;ubuntu.com.			IN	A
    
    ;; ANSWER SECTION:
    ubuntu.com.		600	IN	A	91.189.94.156
    
    ;; Query time: 36 msec
    ;; SERVER: 68.87.71.230#53(68.87.71.230)
    ;; WHEN: Wed Oct 12 17:16:50 2011
    ;; MSG SIZE  rcvd: 44
    
    dsula@tabasco:~$
    And here's an example how it doesn't work:
    Code:
    dsula@tabasco:~$ host mesera
    mesera has address 208.68.143.50
    Host mesera not found: 3(NXDOMAIN)
    dsula@tabasco:~$
    'mesera' resolves to 208.68... instead the correct IP would be 192.168.1.104

  5. #5
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: is this a dns problem?

    Quote Originally Posted by dave01945 View Post
    I think that is because windows uses WINS to resolve the names into addresses but linux uses dns and unless you have a local dns server you will need to enter the ip.
    Close...but no cigar! Windows shares (SMB/CIFS) uses NetBIOS to resolve names. A WINS server can hold and map NetBIOS names to IP addresses.

    you might be able to setup linux to use WINS i'm not sure you will have to look into it
    Samba does not need a WINS server to operate correctly.

    Probably the easiest way would be to give them static ip's an enter them into /etc/hosts file

    --edit--

    this should explain how to setup WINS
    http://www.korokithakis.net/posts/ho...ames-in-linux/
    Samba explicitly states that you should not use a WINS server for a simple LAN.

  6. #6
    Join Date
    Apr 2007
    Beans
    11

    Re: is this a dns problem?

    Quote Originally Posted by dave01945 View Post
    Probably the easiest way would be to give them static ip's an enter them into /etc/hosts file
    Yeah, that's what I don't want to do. But I'll take a look at the WINS. However for me this has nothing to do with windows. Shouldn't the router distribute the names ? Granted I don't know that much about networking. Maybe the router only supports this WINS protocol?

    I might add: I also cannot connect from ubuntu to another ubuntu by name. So there's defenitly no windows involved here.
    Last edited by dsula; October 12th, 2011 at 10:29 PM.

  7. #7
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: is this a dns problem?

    Quote Originally Posted by dsula View Post
    I have a bunch of computers (windows and ubuntu) hooked to my router. When I log into the router I can see all the connected computers, I can see their IP and I can also see the name of the computers.

    When using windows, I can access all other machines using their names (even ubuntu). When trying to do the same with ubuntu I have to use the IP number. I'm sure there's some simple service missing on the ubuntu machine that queries the router for the name of the machine. Can anybody help?


    Thank you.
    How are you trying to access these windows machines? Are you using Nautilus to browse the shares? Or...Are you trying to mount these shares to the local filesystem?

  8. #8
    Join Date
    Apr 2007
    Beans
    11

    Re: is this a dns problem?

    Quote Originally Posted by capscrew View Post
    How are you trying to access these windows machines? Are you using Nautilus to browse the shares? Or...Are you trying to mount these shares to the local filesystem?
    It has nothing to do with windows. From any ubuntu machine I try to do
    Code:
    ping <host>
    whereas <host> can be the name of another windows or ubuntu machine. The hostname gets resolved to a wrong IP (see example in post above). If I perform explicit ping <IP> all works fine.
    When doing the same ping <host> in windows, all hostnames are reolved correctly (to other windows or other ubuntu).

  9. #9
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: is this a dns problem?

    Quote Originally Posted by dsula View Post
    It has nothing to do with windows. From any ubuntu machine I try to do
    Code:
    ping <host>
    whereas <host> can be the name of another windows or ubuntu machine. The hostname gets resolved to a wrong IP (see example in post above). If I perform explicit ping <IP> all works fine.
    When doing the same ping <host> in windows, all hostnames are reolved correctly (to other windows or other ubuntu).
    Ahhhhh... Then for sure WINS or NetBIOS has nothing to do with this. Your problem is you have no DNS resolution on the LAN side of your network. This is why an Internet address (ubuntu.com) resolves, but a local address (192.168.etc) is redirected (by the router) and fails.

    As stated above you can add all the IP to hostname mapping in the Ubuntu machines /etc/hosts file if the IP addresses are set to static (non-changing). The /etc/hosts file is not dynamic; it needs to be manually configured.

    The only other thing is to see if your router will handle the local DNS services. Mine does.

    Edit: The address you mentioned is an Internet address owned by:
    Code:
    OrgName:        FAST Search & Transfer Inc
    OrgId:          FST-20
    Address:        117 Kendrick Street
    City:           Needham
    StateProv:      MA
    PostalCode:     02494
    Country:        US
    Last edited by capscrew; October 12th, 2011 at 10:45 PM.

  10. #10
    Join Date
    Apr 2007
    Beans
    11

    Re: is this a dns problem?

    Quote Originally Posted by capscrew View Post
    Ahhhhh... Then for sure WINS or NetBIOS has nothing to do with this. Your problem is you have no DNS resolution on the LAN side of your network. This is why an Internet address (ubuntu.com) resolves, but a local address (192.168.etc) is redirected (by the router) and fails.

    As stated above you can add all the IP to hostname mapping in the Ubuntu machines /etc/hosts file if the IP addresses are set to static (non-changing). The /etc/hosts file is not dynamic; it needs to be manually configured.

    The only other thing is to see if your router will handle the local DNS services. Mine does.
    Well ok, I can understand that. But why is Windows able to resolve the hostnames? It still has to get the names from the router somehow, right? So I can assume that ubuntu would be able to get the same information, too, correclty configured.

Page 1 of 3 123 LastLast

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
  •