How dose "name resolve order" work?

hyoscar wu hywuoscar at gmail.com
Mon Nov 4 21:08:53 MST 2013


Hi list,

  I try to set samba as a wins server in my private network. This is my
smb.conf.

[global]
workgroup = WORKGROUP
security = user
netbios name = test-ubuntu
guest account = nobody
server role = STANDALONE
wins support = yes
name resolve order = wins host

[share]
path = /share
read only = no
---------------------------------------------------------------------------
  My enviroment:

   PC1: test-ubuntu  192.168.76.22   (samba server and wins)
   PC2: test-pcx86    192.168.76.66  (win7 set wins to 192.168.76.22)
   PC3: test-pc3        192.168.76.100

-----------------------------------------------------------------------------
  Start smbd and nmbd in PC1 and restart network interface in PC2.

  Run `nmblookup -R -U 192.168.76.22 test-pcx86` in PC3

  nmblookup -R -U 192.168.76.22 test-pcx86
  querying test-pcx86 on 192.168.76.22
  192.168.76.66 test-pcx86<00>

  Stop smbd nmbd and change "name resolve order = wins host" to "name
resolve order = host wins".

  vim /etc/hosts:

  192.168.76.55    test-pcx86
  127.0.0.1           localhost
  127.0.0.1           test-ubuntu
  192.168.76.77    non-exist-pc

  Restart smbd and nmbd.

  Run   `nmblookup -R -U 192.168.76.22 non-exist-pc` in PC3

  querying non-exist-pc on 192.168.76.22
  192.168.76.77 non-exist-pc<00>

  Run `nmblookup -R -U 192.168.76.22 test-pcx86` in PC3

  querying test-pcx86 on 192.168.76.22
  192.168.76.66 test-pcx86<00>

   My question is why nmblookup still get 192.168.76.22 but 192.168.76.55 ?


More information about the samba-technical mailing list