Results 1 to 10 of 10

Thread: Can't ping windows netbios names on different subnet

  1. #1
    Join Date
    Feb 2005
    Beans
    509
    Distro
    Lubuntu 11.10 Oneiric Ocelot

    SOLVED (HOPEFULLY) Can't ping windows netbios names on different subnet

    Hi,

    I've run through quite a few threads about pinging windows names from a Ubuntu/Linux box, but I'm still unable to ping Windows machines on a different subnet by their short netbios name.

    I can ping Windows machines on my own subnet by their netbios name and machines on another subnet by their full domain name, i.e machine.domain.local


    I've got the following in place:

    running: winbind

    Within /etc/nsswitch.conf :

    hosts: files mdns4_minimal wins dns mdns4

    Within /etc/samba/smb.conf :

    #======================= Global Settings =======================

    [global]

    ## Browsing/Identification ###

    # Change this to the workgroup/NT-domain name your Samba server will part of
    workgroup = ubuntuworkgroup
    netbios name = ubuntu

    # server string is the equivalent of the NT Description field
    server string = %h server (Samba, Ubuntu)

    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    wins support = yes

    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    #wins server = 192.168.110.2

    # This will prevent nmbd to search for NetBIOS names through DNS.
    dns proxy = no

    # What naming service and in what order should we use to resolve host names
    # to IP addresses
    name resolve order = lmhosts host wins bcast dns

    #### Networking ####

    # The specific set of interfaces / networks to bind to
    # This can be either the interface name or an IP address/netmask;
    # interface names are normally preferred
    ; interfaces = 127.0.0.0/8 eth0

    Not sure if I really need to be messing with the smb.conf as I'm not running as a Windows share?

    Thanks in advance for any help.

    John
    Last edited by john_spiral; January 20th, 2009 at 06:23 AM.

  2. #2
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't ping windows netbios names on different subnet

    Just thinking via keyboard, and wondering if a different subnet means using a router - and maybe requiring DNS.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  3. #3
    Join Date
    Feb 2005
    Beans
    509
    Distro
    Lubuntu 11.10 Oneiric Ocelot

    Re: Can't ping windows netbios names on different subnet

    thanks for the response Iowan,

    Looks like the nsswitch.conf file already references a DNS server?

    Code:
    hosts: files mdns4_minimal wins dns mdns4

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't ping windows netbios names on different subnet

    Are the windows boxes "registered" in that DNS server?
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  5. #5
    Join Date
    Dec 2008
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Can't ping windows netbios names on different subnet

    NetBios names are handled by a WINS server. Do you have a WINS server on the local subnet?

    WINS is a LAN technology. The ports (tcp135/139) may not be routable in your situation.

    The order of the listings in your nsswitch.conf file are important. I notice that you have lmhosts and hosts (files) before the WINS and DNS servers. I would have them after the 2 servers and a failsafe rather than the other way around.
    Last edited by capscrew; January 8th, 2009 at 02:56 AM.

  6. #6
    Join Date
    Feb 2005
    Beans
    509
    Distro
    Lubuntu 11.10 Oneiric Ocelot

    Re: Can't ping windows netbios names on different subnet

    Quote Originally Posted by Iowan View Post
    Are the windows boxes "registered" in that DNS server?
    Iowan, when booted into Windows I can succesfully ping Windows short names, I think this shows they are being resolved by either the Wins or DNS servers.

    Capscrew might be onto something by suggesting I change the order of resolution in my nsswitch.conf file.

    I'll give this a bash and report back.

  7. #7
    Join Date
    Feb 2005
    Beans
    509
    Distro
    Lubuntu 11.10 Oneiric Ocelot

    Re: Can't ping windows netbios names on different subnet

    made a change to my /etc/nsswitch.conf :

    hosts: wins dns mdns4 files mdns4_minimal

    rebooted , still can't ping Windows names on different subnet.

    The funny thing is if I do a traceroute to the machines ip address it returns it's name on the last hop?

    If traceroute is resolving names surely ping should also?

  8. #8
    Join Date
    Nov 2006
    Location
    Craggy Island.
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Can't ping windows netbios names on different subnet

    Interesting topic and just as a wag contribution,
    It sounds as if the windows network, has its own wins resolution.
    and from your samba config it looks as if you are turning the ubuntu box as a wins server also.
    ***************
    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    wins support = yes

    *****************


    If you could point ubuntu to your wins server on your other network and disable the ubuntu wins server.
    Im thinking your nsswitch will now point to what you have defined here
    *********************
    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    #wins server = 192.168.110.2<-----

    ****************

    Im thinking at some point you will need to run wireshark to see whats happening on the wires.

    Last stupid question, are you pinging netbios name or host name,
    from what I saw, these can be different.

    Im contributing only as the topic is interesting, so feel free to ignore this as Im no Wins expert, just interested in the question

  9. #9
    Join Date
    Feb 2005
    Beans
    509
    Distro
    Lubuntu 11.10 Oneiric Ocelot

    Re: Can't ping windows netbios names on different subnet

    Yup jonobr you were right!

    To ping windows names on other subnets do the following:

    (1) edit /etc/nsswitch.conf

    Add "wins" to the end of the line so it looks something like this:

    hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4

    note wins before dns

    (2) Install winbind

    sudo aptitude install winbind

    (3) Install samba:

    sudo apt-get install samba

    stop service:

    sudo /etc/init.d/samba stop


    (4) Specify your wins server in /etc/samba/smb.conf , this can be obtained from a Windows machine on the network with the ipconfig /all command.

    Look for the following section, take out the semi colon and replace w.x.y.z with wins server from ipconfig /all command.

    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    ; wins server = w.x.y.z

    also change name resolve order in /etc/samba/smb.conf

    name resolve order = lmhosts host wins bcast

    (5) Start samba:

    sudo /etc/init.d/samba start

    thanks

    John

    EDIT: forgot to add I did a clean install of Ubuntu to get to the route of this beast problem.
    Last edited by john_spiral; January 20th, 2009 at 06:25 AM.

  10. #10
    Join Date
    Feb 2005
    Beans
    509
    Distro
    Lubuntu 11.10 Oneiric Ocelot

    Re: Can't ping windows netbios names on different subnet

    resolving of windows shortnames on a different subnet even seems to work without samba running?

    Looks like winbind might just need to ref the wins server setting in /etc/samba/smb.conf?

    who knows

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
  •