Accessing Windows from Linux/Mac by name using TCP/IP

4

1

What are some solutions to access Windows by its computer name from Linux and Mac using TCP/IP. That is, from terminal I want to be able to ping my Windows PCs using its host name.

My setup is:

  • Various machines running Ubuntu, Windows XP and OS X.
  • Networked using a consumer grade wireless router which provides DHCP.
  • The only DNS is the ISP's, which resolves Internet names and not local host names.

The Windows machines can ping each other by name. The Ubuntu and OS X machines can only ping Windows by IP address (name doesn't work).

Wavy Crab

Posted 2010-06-05T03:25:14.410

Reputation: 1 455

Answers

4

I ended up going with multicast DNS by installing Apple's Bonjour. Now I can address the Windows PCs by using the address hostname.local from the OS X and Linux machines.

Wavy Crab

Posted 2010-06-05T03:25:14.410

Reputation: 1 455

1

you can edit your /etc/hosts file to add the ip addresses to internal DNS support.

Obviously a sync solution (meaning using a DNS server in your router or setting up a DNS server on one of your boxes that the router points to)

Mark Harviston

Posted 2010-06-05T03:25:14.410

Reputation: 149

0

Check to see if your router supports DNS forwarding. Often DNS forwarders will serve windows hostnames if they come through as a DNS request.

You might also make sure that Samba is fully installed on the linux machines and enabled on the Mac.

Darth Android

Posted 2010-06-05T03:25:14.410

Reputation: 35 133

DNS Forwarding is a feature that allows DNS requests to be forwarded to a specific set of downstream servers rather than using root hints for unresolvable names. It doesn't have anything to do with local hostnames. – MDMarra – 2010-06-07T02:06:59.187

0

Adding wins to the end of the hosts line in the file /etc/nsswitch.conf will make Linux use the Windows network browsing thingy for name resolution.

(You will need to have the winbind package installed for it to work. It will probably already be installed.)

Neal

Posted 2010-06-05T03:25:14.410

Reputation: 8 447