[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ntpq no longer working -



Tim wrote:
Tim:
Do not try giving the same alias or hostname to two different IP
addresses, that's bound to cause problems.  Also, there's no need to put
the same name as an alias as you've got as a hostname, the aliases are
*optional* *alternatives*.
Bob Goodwin:
I've changed /etc/hosts pretty much as you suggested:

127.0.0.1       localhost.localdomain   localhost
10.1.1.2        box2
10.1.1.3        box3
10.1.1.4        box4
10.1.1.1        box1
192.168.1.226   box1

But that leaves me with two lines aliased to box1, I'm not sure if that can cause problems?

Quite likely...  Whether it's the problem you're dealing with now, or
going to be others in the future.

Each network interface *really* *should* have a unique address
(numerical and/or named).  It is *possible* to have some that aren't
unique, but you really need to know what you're doing for that to work
(and it's not something I can offer advice on).

Not knowing your network (rearrange to suit), you might want to try
something along these lines with the last two on your list:

10.1.1.1        eth.box1
192.168.1.226   wireless.box1

It distinguishes the interfaces, but still makes it easy for you to work
out which is which box.

NB:  I'm not sure that it's essential that you name each interface.  I
don't know if you're doing this because you want to, or because you
think you have to.  And if any of those interfaces are being configured
by DHCP, it's possible for the DHCP server to provide the name.  It's
also possible for you to get assigned different IPs, and then the hosts
file would be out of kilter.  I only use a very simple hosts file on my
machines, as I have a DNS server that works with my DHCP server.
I think dhcp acts beyond the eth0/192.168.1.226 wireless bridge.  Somehow
I have to direct the computer to that eth0 interface if it's going to
reach the internet, printer, etc.

As you say you can't know what my system looks like but I think what I have
now is pretty close to being set up right and it is working again, thanks to the help
I received here.
Can I put the bridge address on the line above it?

127.0.0.1       localhost.localdomain   localhost
10.1.1.2        box2
10.1.1.3        box3
10.1.1.4        box4
10.1.1.1        192.168.1.226	box1
I don't think the last line is correct as above. 10.1.1.1`box1 should be eth1
while 192.168.1.226 is eth0 that connects to the wireless bridge.  Perhaps
as you say I should have named them differently somehow but I tend to think
of them as interfaces to the same computer, box1. Box1 has to interface either the LAN or the wireless network.

The format of the hosts file is: numerical IP address, white space,
fully-qualified domain name, white space, then optional aliases
separated by white spaces.

e.g. 192.168.1.2 webserver.example.com webserver newsserver fileserver

"Aliases" meaning alternative names for the same interface.  They could
be single words (as above), or other fully-qualified domain names, as
below:

e.g. 192.168.1.2 www.example.com ftp.example.com news.example.com

If you start putting numerical IP addresses into other places in the
hosts file, you're going to get some strange behaviours.
Ok, I won't try that.

I appreciate the time and effort spent covering this for me.

Thanks.

Bob


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]