FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 05-09-2008, 02:29 AM
"Douglas A. Tutty"
 
Default Newbie Basic Networking. Using Hostnames

On Fri, May 09, 2008 at 01:04:45AM +0000, Oscar Corte wrote:
>
> I recently installed Debian at two home PC?s. Both are connected to an
> ADSL modem through which Internet is accessed.
>
> All network configurations were made by Debian at installation time.
> I?m able to ping each machine from each other but by its IP address.
> However, I don't get any results if I ping by the use of host names.
>
> What am I missing?

You are missing some type of name service or correct /etc/hosts files.

If both boxes are connected directly to the ADSL modem, then presumably
both boxes are getting an IP via DHCP from the modem. The problem with
this setup is that the IP numbers are not known in advance so you can't
tell one box the other boxes' IP number.

Here's how I think you have it set up:

ADSL modem
| |
DHCP DHCP
| |
box1 box2


If it were me, here's how I'd do it. You will need a extra network
card, but they're cheap:


ADSL modem
|
DHCP
|
eth0 DHCP
box1
e.g. eth1 192.168.1.1
| (consider putting a simple switch here
| for future upgrades. This network would
| have static IP numbers, unless you want
| to run your own DHCP.
box2


To handle DNS service for your network, the easiest solution is to put
the host/IP info in /etc/hosts on box1 and install the dnsmasq package
on box1. On box 2, you would list box1 as the nameserver. Dnsmasq will
serve dns requests from your network, resolving names as does box1
itself: first from /etc/hosts, second from any nameserver lines that
point to the ADSL modem or your ISP.

If your home network gets large, dynamic (hosts coming and going), or
just changes frequently, you may wish to set up dnsmasq to also be a
DHCP server. However, I wouldn't worry about that right now.

This is how I have my network setup. I'm on dialup but its the same
thing.

The problem with having all boxes connected directly to the modem is
that you don't controll the modem. It also doesn't address your need
for a firewall. If you want a firewall, with the new setup, you would
configure box1 as the firewall with e.g. shorewall. Read the
shorewall-doc package for further details.

DNS can be very, very, complex but for a small home network, fixed IP in
/etc/hosts with dnsmasq is about as simple as it gets.

I hope this helps.

Doug.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 05-09-2008, 02:36 AM
NN_il_Confusionario
 
Default Newbie Basic Networking. Using Hostnames

On Fri, May 09, 2008 at 01:04:45AM +0000, Oscar Corte wrote:
>I'm able to ping each machine from each other but by its IP address.
> However, I don't get any results if I ping by the use of host names.
> What am I missing?

a definition of the two "ip fqdn name" lines in /etc/hosts on both
machines

(and also word wrapping in the e-mail)

--
Chi usa software non libero avvelena anche te. Digli di smettere.
Informatica=arsenico: minime dosi in rari casi patologici, altrimenti letale.
Informatica=bomba: intelligente solo per gli stupidi che ci credono.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org