On 20 Feb 2004, Monique Y. Herman wrote:
> On 2004-02-20, Anthony Campbell penned:
> >
> > My /etc/hosts is as follows, in case this indicates the problem:
> > (The alternative lines are because I tried both the IP which my domain
> > name resolves to and also the ip on my router. I don't know which, if
> > either, I need.)
> >
> > --------cut------------------
> > 127.0.0.1 localhost loopback
> > # 194.176.77.5 acampbell.org.uk arcadia
> > 192.168.0.20  acampbell.org.uk arcadia
> > 0.0.0.0 accampbell.uklinux.net
> >
> > 10.0.0.1   arcadia
> > 10.0.0.2   mimosas
> >
> > -------cut-------------
> 
> 1) It looks like you're mixing internal network numbers here.  192.168.0.20
> for arcadia, then later 10.0.0.1 for arcadia and .2 for mimosas ... I'm
> fairly sure that this is not what you want.
> 
> Is there a web interface to your router?  Mine lets me set the LAN IP
> address.  Does yours, and if so, does it say 192.168.0.something or
> 10.0.0.something?
> 
> It might also be enlightening for you to share your
> /etc/network/interfaces ... specifically, the "gateway" value for your
> network device should be the same as the router's IP address.  At least,
> if you want outbound traffic, it should be.
> 
> 2) What's that 0.0.0.0 entry for?  I don't have any such entries on my
> machine, and I'm not sure it's what you want.
> 
> 3) You probably don't need to specify the external address (194.etc) in
> the hosts file.  In fact, it's a little misleading, as from outside your
> router, all of your machines look like that address.  All the hosts file
> does is give your machine a cheat-sheet for the names of some
> commonly-used hosts.  If you frequently wanted to connect to a machine
> that's outside the router (say, work or home) and wanted it to have a
> nice, easy-to-remember name, then you might list an external IP address
> for it.
> 
> --
> monique
> 
If you think I've got myself into a right muddle with this business,
you're correct. Not a case of failing to rtfm, rather of too much rtfm
(or the wrong fm, perhaps).

The lan IP address in the router is 192.168.0.20, which is why I had it
in /etc/hosts.

I added the 192... business because I read in various places that you
were supposed to have this line (I didn't previously) and because
without it all hostname commands (hostname, hostname -f, hostname -s)
produce the same thing, i.e. just arcadia. But perhaps that doesn't
matter? I've taken it out at present.

The 0.0.0.0 line also came from a how-to I found on the Net, but I've
taken it out.


My /etc/network/interfaces:

----------cut--------------------------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo 
iface lo inet loopback
        address 127.0.0.1
        netmask 255.0.0.0
        broadcast 127.0.0.255
        gateway 127.0.0.1

#Router stuff
auto eth0 
iface eth0 inet static 
   address 192.168.0.20
   netmask 255.255.255.0
   gateway 192.168.0.1
   broadcast 192.168.0.255
---------------cut------------------------


Anthony



-- 
[EMAIL PROTECTED]    ||  http://www.acampbell.org.uk
using Linux GNU/Debian ||  for book reviews, electronic 
Windows-free zone      ||  books and skeptical articles


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to