LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-16-2011, 01:08 PM   #1
diogosalazar
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 01:14 PM. Reason: doubt about the thread forum category
 
Old 03-16-2011, 01:27 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,121

Rep: Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819Reputation: 819
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 192.168.1.1 (it's your gateway address), you may want to set fixed-IP addresses to 192.168.1.10, 192.168.1.20 and so on. If your D-Link is doing DHCP, it probably starts "leasing" addresses at 192.168.1.100 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
Code:
# For loopbacking.
127.0.0.1               localhost
192.168.1.10            fubar.com fubar
192.168.1.20            snafu.com snafu
192.168.1.30            pita.com 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.
  


Reply

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


All times are GMT -5. The time now is 06:12 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration