PDA

View Full Version : Static IP Address and Name Service



CamilliLarry
12-19-2005, 03:08 AM
I'm a Linux novice; please be patient...


I'm having trouble getting my Linux box to provide its name to a nameserver
when the Linux box has a static IP address. When the Linux box uses DHCP,
its name can be used by other systems on the LAN to access it. When the
Linux box uses a static address, the other systems can't access it by name.

(I have no trouble getting to the internet/web...)


Environment:
DSL with Westell 6100 modem/router (from Verizon)
8-port hub
Intel-based PC with Knoppix from Kyle Rankin O'Reilly book on hard drive
Intel-based PC with Windows XP
Alpha-based server with "other" O/S
network-capable printer

Originally, I had all four boxes using DHCP. I switched the "other" system to
static IP address so that I can put an externally-visible web server on it. And,
I changed the printer to static IP address to simplify management.

The web interface to the modem/router lets me see what appears to be its ARP
cache [by selecting Troubleshooting -> LAN Stats]. With both DHCP and static
addresses, I can see the IP address, the MAC address, the hostname, and status
("Active") for the three systems other than the Linux box. If the Linux box
uses DHCP, I can see all four fields for it. If the Linux box uses a static
address, it always shows up with "*" in the name field. I can PING all boxes
from the others (well, from all except for the printer) by IP address. When the
Linux box uses DHCP, I can PING it from the other systems by name. When
the Linux box has a static IP address, if I PING it by name, I get "Ping
request could not find host..."

[When I switched the Linux box to use a static IP address, I did run into
the restart problem that is described in
http://www.knoppix.net/forum/viewtopic.php?t=12926&highlight=pump.
I made the change to knoppix-autoconfig, and that problem is gone.]


With Ethereal running on the Linux box, if I do a PING <Linux box> on the Windows
box, I can see:

192.168.1.44 192.168.1.1 NBNS Name query NB LTCLNX<00>
192.168.1.1 192.168.1.44 ICMP Destination unreachable
192.168.1.44 192.168.1.1 NBNS Name query NB LTCLNX<00>
192.168.1.1 192.168.1.44 ICMP Destination unreachable

192.168.1.44 192.168.1.255 NBNS Name query NB LTCLNX<00>
(no response)

KEY:
192.168.1.44 is the Windows box (using DHCP).
192.168.1.1 is the router (with DSL modem).
LTCLNX is the Linux box (static address 192.168.1.102).


If I do a PING from the Linux box to the "other" box, I can see:

192.168.1.102 192.168.1.101 ICMP Echo (ping) request
192.168.1.101 192.168.1.102 ICMP Echo (ping) reply

(192.168.1.101 is the "other" box.)


/etc/network/interfaces contains:

iface eth0 inet static
address 192.168.1.102
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1


/etc/hostname is:
ltclnx

/etc/host.conf is:
order hosts,bind
multi on

What's wrong?