Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Main Support Categories > Networking & Wireless
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Networking & Wireless
Having problems getting connected to the internet or getting your wireless card to work? Ask here.

 
Thread Tools Display Modes
Old April 10th, 2007   #1
joslinar
5 Cups of Ubuntu
 
Join Date: Mar 2007
Beans: 24
Name resolution in a LAN

I recently converted to Ubuntu. I'm getting rid of XP in my PCs ( Yeah, I saw the light!!!) I have a linksys WRT54GL router and I want to network my Ubuntu PCs. I would like to able to conect to an Ubuntu PC without knowing the IP address, I would like to connect just using the host name.
If i try to ping directly the name of a linux (ex. ping guatek) host ubuntu can't find it. But if I try to ping an XP host it will find the ip address. If I go to the router DHCP tables windows clients have host name and ip address listed but linux clients only have IP addresses in the table. Why is this and how can I resolve it? I don't want to maintain /etc/host files. How XP does this without a DNS server?
joslinar is offline   Reply With Quote
Old April 16th, 2007   #2
Blyzzard
5 Cups of Ubuntu
 
Join Date: Sep 2006
Beans: 17
Re: Name resolution in a LAN

I ahve the same problem i think

i have 3 PCs on my network.

1. Friend next door(XP pro)
2. My Gaming PC (XP pro)
3. TS (and movie) server (Ubuntu 6.06)

The main thing I want to be able to do is us Teamspeak on my PC to talk to my friend next door. now i know that the server address is 192.168.0.9, but I REALLY want to be able to connect to the PC name (avalanche) instead of the IP address.

So i imagine that it's some sort of name resolution that has to occur somewhere.

Additionally, I use VNC to connect to the ubuntu server and I have to use the ip address instead of the PC name. Would be nice to use the name instead.

Ideas anyone?
Blyzzard is offline   Reply With Quote
Old April 16th, 2007   #3
dbott67
Chocolate Ubuntu Mocha Blend
 
dbott67's Avatar
 
Join Date: Mar 2005
Location: St Catharines, ON, Canada
Beans: 1,769
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to dbott67
Re: Name resolution in a LAN

You need to install the following packages from the repos:

Code:
 sudo apt-get install smbfs smbclient winbind
BACKGROUND

(This is from another thread that I posted in regarding local name resolution. The full thread is for here: http://www.ubuntuforums.org/showthre...97#post1770797)

... some issues arise because of the way SMB shares "announce" themselves to the network. Generally, connecting via IP address works properly, but browsing by 'computer name' can occasionally fail. Windows uses WINS service to allow users to browse by computer name (also known in Windows-speak as Netbios name). WINS binds the computer name to the IP address. For the most part, this has been superceded by DNS, which binds the fully-qualified domain name to the IP address. The problem is that DNS resolution requires that:

a) You're running a DNS server (locally)
b) Each client is registered in the DNS server

The problem here is that most people don't run their own DNS server at home and if you have any Windows computers on the network (or Samba shares), you really should have a WINS server installed.

There is a package in the repositories called 'winbind' that is a service that resolves user and group information on NT-based networks and also allows you to browse by computer name.

This info is provided by 'featherking' from this thread:

Code:
sudo gedit /etc/nsswitch.conf
find this line (it may not be exactly that)

Code:
hosts:          files dns mdns
and add wins, so now it looks like

Code:
hosts:          files dns mdns wins
then install winbind
Code:
sudo apt-get install winbind
The advantage to using winbind vs. static IPs is that I can add/remove PCs without worrying about editing the hosts file. There are also a few tools that can aid in discovery:
Code:
dbott@thedrake:~$ sudo smbtree
Password:
WORKGROUP
        \\THEDRAKE                      thedrake server (Samba, Ubuntu) <--- My Dapper desktop
                \\THEDRAKE\ADMIN$               IPC Service (thedrake server (Samba, Ubuntu))
                \\THEDRAKE\IPC$                 IPC Service (thedrake server (Samba, Ubuntu))
                \\THEDRAKE\dbott
                \\THEDRAKE\print$               Printer Drivers
        \\PIII-600 <--- the kids XP PC; no firewall; no shares
        \\OMEGA-XP <--- My laptop; Running XP firewall
Error connecting to 192.168.1.105 (No route to host)
cli_start_connection: failed to connect to OMEGA-XP<20> (192.168.1.105)
        \\NAS-160GB <--- My NAS device
                \\NAS-160GB\IPC$
                \\NAS-160GB\Videos
                \\NAS-160GB\Music
                \\NAS-160GB\Archive
                \\NAS-160GB\Data
                \\NAS-160GB\PUBLIC
        \\JBOTT-PC <--- My wife's laptop; Running Vista firewall; no open shares
timeout connecting to 192.168.1.101:445
timeout connecting to 192.168.1.101:139
Error connecting to 192.168.1.101 (Operation already in progress)
cli_start_connection: failed to connect to JBOTT-PC<20> (192.168.1.101)
dbott@thedrake:~$
All of the discovered data is stored in var/cache/samba/browse.dat:
Code:
dbott@thedrake:~$ cat /var/cache/samba/browse.dat
"WORKGROUP"               c0001000 "THEDRAKE"                    "WORKGROUP"
"THEDRAKE"                40059a03 "thedrake server (Samba, Ubuntu)" "WORKGROUP"
"NAS-160GB"               40412003 ""                            "WORKGROUP"
"OMEGA-XP"                40011203 ""                            "WORKGROUP"
"JBOTT-PC"                40001003 ""                            "WORKGROUP"
"PIII-600"                40011003 ""                            "WORKGROUP"
After installing samba, winbind & smbfs, you need to configure samba. Please read this document:

https://help.ubuntu.com/community/SettingUpSamba

-Dave
dbott67 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:16 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry