Re: 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@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: DHCP Access without permission
    ... DHCP Server, the dhcp is set to allow 2 ip. ... but the client, without my ... I set my network to use DCHP and there are ... If you are using a plain domestic ADSL Modem / router then nearly all ...
    (microsoft.public.windows.server.networking)
  • Re: network configuration problem
    ... ADSL modem ... Machine A serves as a gateway, DNS, and DHCP server for B. ... The router is your way out to the internet, it needs to know how to send packets back to machine C. ... you have to mdify your network design. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: ioctl(SIOCGIFFLAGS) What is it?
    ... > Acorn to talk to the ADSL modem as well using Inetsuite. ... Actually the LAN setup window cannot ... it's worth having open the "Network ...
    (comp.sys.acorn.networking)
  • Re: SuSe10.0 - windowsXP networking problem !! plz help!!!!
    ... >>> i am a new comer in linux field .. ... >>ADSL modem to your network switch/hub, and give it an IP Address. ... > The ADSL modem is a DHCP server, not a client one merely decided to ...
    (alt.os.linux.suse)
  • Re: 3 LAN, 2 WAN - 2 LAN use 1 WAN, last LAN uses other WAN
    ... You could use a Layer3 Switch which is a LAN Router and a network Switch ... I can connect one network consisting of a switch & ADSL modem to the ...
    (microsoft.public.windows.server.networking)