Problem:
In a network environment where DHCP must be used, it is no longer possible to access the host with a fixed IP address, which can only be accessed by using the NetBIOS host name
There are WINS servers on our local area network, and Windows clients can access the server through a short hostname (NetBIOS name), but my Ubuntu client is not, very depressed.
Solve:
1. Tell Ubuntu client WINS server address
Ubuntu enters Windows network and must install Samba Apt-get Install Samba
Modify/etc/samba/smb.conf
Add the following in its [global]
WINS Server = 10.35.0.10
This is to tell Ubuntu client that the IP address of the WINS server is 10.35.0.10
Restart NMBD Services sudo service nmbd restart
Verify that the WINS service is valid Nmblookup-r-u <wins_server_ip>
Or
Nmblookup
You can see the IP address directly.
2. Using WINS
Need to install Winbind (find IP by host name)
sudo apt-get install Winbind
Modify/etc/nsswitch.conf
Put one of the
Hosts:files mdns4_minimal [Notfound=return] DNS Mdns4
Revision changed to
Hosts:files wins mdns4_minimal [Notfound=return] DNS Mdns4
Restart the Winbind server to
sudo service winbind restart
We can also use a short hostname, previously
Ping Dragon-thinkpad
System will say: Ping:unknown host Dragon-thinkpad