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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to