Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-16-2011, 12:08 PM   #1
LQ Newbie
Registered: Mar 2011
Posts: 8

Rep: Reputation: 0
Question Hostname resolution

Hi, I guess this thread could be at the Linux-Server forum but I'm not 100% sure, so here it goes...

I have a home network with 4 computers:
1-Ubuntu 10.10 (Server - wired)
2-Windows 7 (desktop - wired)
3-Windows 7 (laptop - wired)
4-Windows XP (laptop - wireless)

I also have a DLINK DI-624 wireless router which is connected to my cable modem.

My problem is that I can't ping computers by hostname.
I am still building the Ubuntu server and while configuring Samba for file sharing, I noticed that none of my computers were able to find my server on the network.

I'll be disabling my router so that all traffic flows through the server. (It has 2 network cards, it is going to act as a proxy/DHCP server)

What do I have to do to resolve network names?

Last edited by diogosalazar; 03-16-2011 at 12:14 PM. Reason: doubt about the thread forum category
Old 03-16-2011, 12:27 PM   #2
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062Reputation: 1062
On your LAN it's generally easier if you use fixed-IP addressing. On your Linux machine you can directly edit /etc/hosts adding the fixed-IP address and name of each machine. On the Windows machines, you edit the network settings giving each machine a unique address; somewhere or other (I've forgotten) there is an equivalent of /etc/hosts where entries can be made for the fixed-IP address of machines on your LAN. Your D-Link manual should guide you in how to set up Windows machines for fixed-IP.

Precisely how that's done in Ubuntu I don't know -- I believe there's a network GUI that you use to specify network settings.

Assuming that your D-Link is at (it's your gateway address), you may want to set fixed-IP addresses to, and so on. If your D-Link is doing DHCP, it probably starts "leasing" addresses at so as long as your stay below that, you can use fixed-IP with no problems. Your /etc/hosts file should look something like this
# For loopbacking.               localhost   fubar   snafu   pita
once you've done the addressing changes (the equivalent on Windows look different but serves the same purpose).

The trick is that the boxes have to know who they are and who everybody else is by name (which resolves to a fixed address). That'll also make it easier to set up Samba.

Hope this helps some.
1 members found this post helpful.


dns, hostname, network, ping, server

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
hostname resolution locally adevendra Linux - Networking 7 07-24-2009 10:16 PM
Hostname Resolution Raakh Linux - Newbie 1 11-28-2007 02:30 PM
Fedora hostname resolution abbs1 Linux - Networking 2 01-26-2006 02:25 AM
problem in hostname resolution anupverma Linux - Newbie 5 05-18-2004 12:27 PM
Hostname resolution not working akela Linux - Networking 0 06-07-2003 01:17 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:13 PM.

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