Re: DHCP and domain name
Johan Mazel(johan.mazel@gmail.com) is reported to have said:
> Hi
> I have a Debian 2.6.18-4-686 running with KDE 3.5.5.
>
> I have three questions.
>
> 1) When I start the system, my IP address is 192.168.0.72. If I make a renew
> of ip address with dhclient, my IP address change 192.168.0.20. If I change
> again, my IP address stay at 192.168.0.20.
> Is that possible that at the startup of the computer, the network component
> just assign a choosen IP without asking the DNS ?
>
> 2) I captured the frames with Wireshark (during the renewal of IP address)
> and the DHCP server send me a new address with a domain name.
> Is there anyway to access this domain name ?
>
> 3) The command hostname --fqdn returns me : localhost.localdomain.
> Is that linked with the fact that I'm on a local network ? It seem that yes,
> but I'm sure.
> How can I change the fqdn ?
man hostname
see the -f option
/etc/hosts
127.0.0.1 localhost lo
192.168.0.72 yourbox.domain.name yourbox
OR
If you have control of the DHCP server, have it assign the
192.168.0.72 address to that box everytime.
In /etc/dhcp3/dhcpd.conf on the DHCP Server
# your box
host yorybox {
hardware ethernet 00:02:7D:05:02:11;
fixed-address 192.161.0.72;
option host-name "yourbox.domain.name";
}
see man 5 dhcpd.leases for more examples.
Wayne
--
Keyboard not connected, press to continue.
_______________________________________________________
Reply to: