LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-29-2009, 04:35 AM   #1
peterhocking
LQ Newbie
 
Registered: Mar 2009
Location: Canberra, ACT, Australia
Distribution: SME Server & Ubuntu
Posts: 5

Rep: Reputation: 0
can't ping PC after changing worksgroup in Samba


Hi

I'm new to Ubuntu & recently installed 8.10. On my home network, I have a SME-Server which acts as the DHCP & DNS server for the network gateway for my home network. After the installation of Ubuntu, I could ping the PC running Ubuntu by machine name from my Windows boxes on the same network & it would be resolved to an IP address.

Since I installed the Samba tools to using Synaptic Package Manager & used the SMB4A tool & Samba tool under System Administration to change the workgroup name, I can no longer ping the Ubuntu PC by name & have the name resolved to an IP address & it is not visible in My Networks places.

Can anyone help me resolve this issue?

TIA

Peter
 
Old 03-29-2009, 11:23 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Try this.

http://www.linuxquestions.org/questi...6/#post3491438
 
Old 03-30-2009, 03:15 AM   #3
peterhocking
LQ Newbie
 
Registered: Mar 2009
Location: Canberra, ACT, Australia
Distribution: SME Server & Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie View Post
Thanks, but the solution suggested in that post is a work around, it doesn't actually fix the problem. Is there any other way of fixing it?

TIA

Peter
 
Old 03-30-2009, 07:57 AM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The solution suggested in that post is not a workaround. I think you are showing your ignorance of networking for you to say that it is. If you don't like putting ip addresses in the hosts and lmhosts files on each client then the second suggestion is equally valid. Use a WINS server.
 
Old 03-30-2009, 11:24 PM   #5
peterhocking
LQ Newbie
 
Registered: Mar 2009
Location: Canberra, ACT, Australia
Distribution: SME Server & Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie View Post
The solution suggested in that post is not a workaround. I think you are showing your ignorance of networking for you to say that it is. If you don't like putting ip addresses in the hosts and lmhosts files on each client then the second suggestion is equally valid. Use a WINS server.
As someone who has worked in IT for close to 20 years, I could take your comment about ignorance as an insult. I am ignorant about linux, but not about networking.

Obviously the issue is something to with the Ubuntu box whose name is no longer being resolved to an IP address where previously it was.

To enter it's IP address in the hosts file of every PC on the network is not a fix, it's a work around because it doesn't fix the problem, it works around it. A fix is fixing what has caused the problem which was probably caused by something that happened when I used the Samba config tools.

Perhaps someone with a bit more Samba knowledge could offer their 2 cents worth?

TIA

Peter
 
Old 04-04-2009, 03:12 PM   #6
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by peterhocking View Post
Hi

I'm new to Ubuntu & recently installed 8.10. On my home network, I have a SME-Server which acts as the DHCP & DNS server for the network gateway for my home network. After the installation of Ubuntu, I could ping the PC running Ubuntu by machine name from my Windows boxes on the same network & it would be resolved to an IP address.

Since I installed the Samba tools to using Synaptic Package Manager & used the SMB4A tool & Samba tool under System Administration to change the workgroup name, I can no longer ping the Ubuntu PC by name & have the name resolved to an IP address & it is not visible in My Networks places.

Can anyone help me resolve this issue?

TIA

Peter
I hope this isn't too late to be helpful. The simple answer to your question is this. Computers in a different workgroup won't appear in each other's browse list (My Network Places, etc.).

Name resolution SHOULD work. That is done by "nmbd" on the Linux machine. If the name can't be resolved then check to see that "nmbd" is running. Also, the correct host name must be specified to Linux or you must include a line in the "smb.conf" file "[global]" section.

netbios name = computername

Name resolution normally uses broadcasts on UDP port 137. Make sure that both computers are in the same IP subnetwork and on the same LAN, and that port 137 is not blocked by firewall software.

===== READ BELOW IF YOU WANT TO KNOW MORE ABOUT HOW IT WORKS =====

There are three main parts to SAMBA and Microsoft Networking.
  • Network Browser (My Network Places)
  • Computer name to IP resolution (name service)
  • Server Message Block (shared folders and printers)

The first two parts are not absolutely required but it is more convenient when they work.

The Network Browser maintains a list of computers in the same workgroup that are seen on the network. Computers announce themselves on the network using broadcasts to UDP port 138 (NetBios Datagram) and the computers "elect" some computers to maintain the list. Those computers are called "browsers". There is a "master browser" and one "browser" for every 30 computers. Computers that are not browsers request the list from the "browser" computers. The list of computers is only a convenience. One can type in the computer name or IP address or use a shortcut to access the computer even if the computer does not appear in the browse list. It can take up to 15 minutes or more for new computers to show up in the browse list. The browse list doesn't work across multiple Ethernet LANs or multiple IP subnetworks. All the computers must be in the same LAN, IP subnetwork and workgroup.

Computer name to IP resolution is what allows computer names to be used instead of IP addresses. The SMB protocol actually uses IP addresses for communication so you can use an IP address instead of a name. Computer names can be resolved in a number of different ways and Windows tries all of the available methods until a name is resolved.
  1. NetBIOS Name Service (broadcast to UDP port 137)
  2. Domain Name Service (DNS)
  3. Windows Internet Name Service (WINS)
  4. The "hosts" file
  5. The "LMHOSTS" file

Most small networks use NetBIOS Name Service broadcasts to resolve computer names. When a computer needs to resolve the name of another computer it broadcasts a request on UDP port 137. The target computer sees its name and replies directly to the sender with its IP address. On Linux that is done by "nmbd". NetBIOS Name Resolution only works within the same Ethernet LAN and IP subnetwork. Computers in different subnetworks can't resolve each other's names using NetBIOS.

Domain Name Service can be used to resolve computer names to IP addresses. That requires a DNS server on the LAN, since computer's on a LAN can't register their names with an Internet provider's DNS server.

Windows Internet Name Service requires a computer running a WINS server. SAMBA supports that and so does Windows Server. WINS maintains a list of names. Client computers have to be configured with the address of the WINS servers. WINS can be configured to use NetBIOS Name Service to query unknown names and respond to NetBIOS Name Service queries from computers. That's call WINS proxy.

In cases where none of the first three methods will work the computer names and IP addresses can be configured in the "hosts" or "LMHOSTS" files.

LMHOSTS actually does more than just provide names and IP addresses of computers. It can be used to configure other network browsers and information to expand the NetBIOS name service and network browser functionality. When you have computers in different IP subnetworks you may be able to solve some problems with LMHOSTS.

The third and most important part is SMB (Server Message Block) protocol. There are two standard ports used for SMB.
  • NetBIOS Session (TCP port 139)
  • SMB Session (TCP port 445)

Windows normally establishes a connection on TCP port 139, and then tries to establish a second connection on TCP port 445. If the connection to port 445 is successful then Windows closes the port 139 connection. Port 445 is the preferred port to use. The "NetBIOS Session" port requires that the computers are in the same IP subnetwork on the same Ethernet LAN. Port 445 does not use NetBIOS and will work across IP subnetworks or between Ethernet LANs. NetBIOS is not restricted to using TCP protocol and can also work over IPX/SPX protocol.

SMB is used to list the shares on other computers establish a login session and transfer files. It is the only thing required to access shared folders and printers if you identify computers using their IP address and type the IP address into a file path or shortcut.

Since you are having problems with "ping" resolving the name of the computer on Windows I suspect that "nmbd" might not be working on the Linux machine, or it might not be configured for the correct computer name.

I sometimes use a network packet capture program like WireShark to see the communication between computers. If you can't determine the cause of the problem you might want to do that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
After changing eth0's ip, ping not work windstory Linux - Newbie 1 01-23-2009 05:03 AM
normal user unable to use ping command after changing the security level to higher sleepyz Linux - Security 1 08-06-2008 10:24 PM
Ping ok Samba ok Windows client NO prdprd Linux - Networking 4 04-11-2002 09:43 PM
SAMBA (can ping but cant print) StamfordRob Linux - Newbie 2 03-28-2002 06:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration