I'm just trying to figure out how to handle hostnames via DHCP on a
small LAN. I know how to do it with CentOS, so I'll describe the process
on my CentOS machines.
On the server side, I have a dhcpd.conf that looks like this:
--8<---------- /etc/dhcpd.conf ---------------------------------
# Options globales
ddns-update-style interim;
authoritative;
default-lease-time 86400; # un jour
max-lease-time 86400; # un jour
# Données du réseau local
option broadcast-address 192.168.1.255;
option subnet-mask 255.255.255.0;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.252;
option domain-name "presbytere.montpezat";
In this example, no machine has a "static" hostname configuration.
Everything is managed centrally on the server. The 'hostname' and
'hostname --fqdn' commands work correctly, in that they return something
like 'raymonde' or 'raymonde.presbytere.montpezat'.
Now, how can I do the same thing on a 100 % Ubuntu network, version
10.04 on server and desktops?
Cheers from the sunny South of France,
Niki
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
03-09-2011, 11:34 AM
Tom H
How to manage hostnames via DHCP?
On Wed, Mar 9, 2011 at 2:43 AM, Niki Kovacs <contact@kikinovak.net> wrote:
>
> I'm just trying to figure out how to handle hostnames via DHCP on a small
> LAN. I know how to do it with CentOS, so I'll describe the process on my
> CentOS machines.
>
> On the server side, I have a dhcpd.conf that looks like this:
>
>...
>
> Then on the client side, every machine that gets its network configuration
> via DHCP is configured like this:
>
> --8<---------- /etc/sysconfig/network --------------
> NETWORKING=yes
> NETWORKING_IPV6=no
> HOSTNAME=localhost.localdomain
> --8<------------------------------------------------
>
> --8<---------- /etc/sysconfig/network-scripts/ifcfg-eth0 -
> DEVICE=eth0
> BOOTPROTO=dhcp
> ONBOOT=yes
> --8<------------------------------------------------
>
> --8<---------- /etc/hosts --------------------------
> 127.0.0.1 localhost.localdomain localhost
> --8<------------------------------------------------
>
> In this example, no machine has a "static" hostname configuration.
> Everything is managed centrally on the server. The 'hostname' and 'hostname
> --fqdn' commands work correctly, in that they return something like
> 'raymonde' or 'raymonde.presbytere.montpezat'.
>
> Now, how can I do the same thing on a 100 % Ubuntu network, version 10.04 on
> server and desktops?
On the clients, if not using NM:
# cat /etc/network/interfaces
auto lo
iface lo inet loop
auto eth0
iface eth0 inet dhcp
# vi /etc/default/grub
(edit the following line)
GRUB_CMDLINE_LINUX="ipv6.disable=1"
(run update-grub to update the grub configuration)
(if you prefer, you can use "/etc/modprobe.d/" files)
(If using NM, you probably only have to "rm /etc/hostname")
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
03-10-2011, 05:35 AM
Niki Kovacs
How to manage hostnames via DHCP?
Le 09/03/2011 13:34, Tom H a écrit :
On the clients, if not using NM:
# cat /etc/network/interfaces
auto lo
iface lo inet loop
auto eth0
iface eth0 inet dhcp
# vi /etc/default/grub
(edit the following line)
GRUB_CMDLINE_LINUX="ipv6.disable=1"
(run update-grub to update the grub configuration)
(if you prefer, you can use "/etc/modprobe.d/" files)
(If using NM, you probably only have to "rm /etc/hostname")
Thanks for your detailed answer! I'll give that a shot.
Cheers,
Niki
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
03-10-2011, 07:30 AM
Tom H
How to manage hostnames via DHCP?
On Thu, Mar 10, 2011 at 1:35 AM, Niki Kovacs <contact@kikinovak.net> wrote:
> Le 09/03/2011 13:34, Tom H a écrit :
>>
>> On the clients, if not using NM:
>>
>> # cat /etc/network/interfaces
>> auto lo
>> iface lo inet loop
>> auto eth0
>> iface eth0 inet dhcp
>>
>> # rm /etc/hostname
>>
>> # cat /etc/hosts
>> 127.0.0.1 localhost.localdomain localhost
>>
>> # vi /etc/default/grub
>> (edit the following line)
>> GRUB_CMDLINE_LINUX="ipv6.disable=1"
>> (run update-grub to update the grub configuration)
>> (if you prefer, you can use "/etc/modprobe.d/" files)
>>
>> (If using NM, you probably only have to "rm /etc/hostname")
>
> Thanks for your detailed answer! I'll give that a shot.
You're welcome. Good luck.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
03-11-2011, 03:14 PM
Niki Kovacs
How to manage hostnames via DHCP?
Le 10/03/2011 09:30, Tom H a écrit :
Le 09/03/2011 13:34, Tom H a écrit :
On the clients, if not using NM:
# cat /etc/network/interfaces
auto lo
iface lo inet loop
auto eth0
iface eth0 inet dhcp
# vi /etc/default/grub
(edit the following line)
GRUB_CMDLINE_LINUX="ipv6.disable=1"
(run update-grub to update the grub configuration)
(if you prefer, you can use "/etc/modprobe.d/" files)
(If using NM, you probably only have to "rm /etc/hostname")
I tried what you suggested. Works like a charm.
$ ls /etc/hostname
ls: cannot access /etc/hostname: No such file or directory
$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
$ hostname --fqdn
raymonde.presbytere.montpezat
Thanks again.
Niki
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
03-12-2011, 09:58 AM
Tom H
How to manage hostnames via DHCP?
On Fri, Mar 11, 2011 at 11:14 AM, Niki Kovacs <contact@kikinovak.net> wrote:
>
> I tried what you suggested. Works like a charm.
>
> $ ls /etc/hostname
> ls: cannot access /etc/hostname: No such file or directory
> $ cat /etc/hosts
> 127.0.0.1 * * * localhost.localdomain localhost
> $ hostname --fqdn
> raymonde.presbytere.montpezat
>
> Thanks again.
You're welcome.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users