Copyright (C) 2008-2021 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
If you want to manage your IPs in a central way you should use a DHCP-Server. This helps you to install and configure it.
If you want to use this solution you need the following howto(s) finished:
emerge net-misc/dhcp
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/conf.d/dhcpd
Changed on 17.11.09Only change this if you want to store your DHCP-Settings in your LDAP. This sets the configuration file for LDAP.
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"After change
DHCPD_CONF="/etc/dhcp/dhcpd.conf"
The Listen Interface
# DHCPD_IFACE=""After change
DHCPD_IFACE="eth0"
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/conf.d/dhcpd6
Changed on 17.11.09Config File fpr DHCP in WLAN Network
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"After change
DHCPD_CONF="/etc/dhcp/dhcpd6.conf"
The Listen Interface
# DHCPD_IFACE=""After change
DHCPD_IFACE="eth0"
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/conf.d/dhcpd-wlan
Changed on 17.11.09Config File fpr DHCP in WLAN Network
# DHCPD_CONF="/etc/dhcp/dhcpd.conf"After change
DHCPD_CONF="/etc/dhcp/dhcpd-wlan.conf"
The Listen Interface
# DHCPD_IFACE=""After change
DHCPD_IFACE="wlan0"
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/dhcp/dhcpd.conf
Changed on 06.09.08DHCP Base settings only if you want to use DHCP without LDAP. After some default definitions like gateway, DNS Server, domain name,... it defines a range of IPs for clients. Change it according to your environment if you dont use DHCP over LDAP.
option domain-name "example.com"; default-lease-time 600; max-lease-time 7200; option subnet-mask XXX.XXX.XXX.XXX; option broadcast-address XXX.XXX.XXX.XXX; option domain-name-servers my.lan.ip.addr; option ntp-servers XXX.XXX.XXX.XXX; option routers XXX.XXX.XXX.XXX; default-lease-time 7200; max-lease-time 14400; ddns-update-style none; subnet my.lan.network.ip netmask XXX.XXX.XXX.XXX { range XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX; }
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/dhcp/dhcpd.conf
Changed on 06.09.08Here are some Examples for fixed IPs of some DHCP-Hosts. (only if you don't use DHCP over LDAP)
host heidiphone-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host homephone-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host beckyphone-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host user1phone-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host hometablet-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host beckykindle-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host small-gabosh-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host small-gabosh { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host knirps-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host ultra-gabosh-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host station-gabosh { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host epson-gabosh-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host gaboshberry { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host gaboshsleepberry { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host gaboshbeckyberry { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host lgtv { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host testberry { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host mirko-nas { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; }
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/dhcp/dhcpd-ldap.conf
Changed on 17.11.09This are the settings for connecting to the LDAP Server. It is only needed if you want to use LDAP as DHCP-Storage.
ldap-server "localhost"; ldap-port 389; ldap-username ""; ldap-password ""; ldap-base-dn "ou=DHCP-Servers,dc=example,dc=com"; ldap-dhcp-server-cn "silent-gabosh.example.com"; ldap-method dynamic; ldap-debug-file "/tmp/dhcp-ldap-startup-config";
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/dhcp/dhcpd-ldap-wlan.conf
Changed on 17.11.09This are the settings for connecting to the LDAP Server. It is only needed if you want to use LDAP as DHCP-Storage.
ldap-server "localhost"; ldap-port 389; ldap-username ""; ldap-password ""; ldap-base-dn "ou=DHCP-Servers,dc=example,dc=com"; ldap-dhcp-server-cn "silent-gabosh.example.com-wlan"; ldap-method dynamic; ldap-debug-file "/tmp/dhcp-ldap-startup-config-wlan";
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/dhcp/dhcpd-wlan.conf
Changed on 06.09.08Configuration for DHCP in WLAN Network
option subnet-mask XXX.XXX.XXX.XXX; option broadcast-address XXX.XXX.XXX.XXX; option domain-name-servers my.lan.ip.addr; option domain-name "example.com"; option ntp-servers my.lan.ip.addr; option routers XXX.XXX.XXX.XXX; default-lease-time 7200; max-lease-time 14400; ddns-update-style none; subnet XXX.XXX.XXX.XXX netmask XXX.XXX.XXX.XXX { range XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX; } next-server XXX.XXX.XXX.XXX; filename "bootx64.efi";
Hosts with fixed IP
host epson-gabosh-wlan { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host small-gabosh { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host knirps { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host ultra-gabosh { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host heidiphone { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host homephone { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host beckyphone { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host user1phone { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host hometablet { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; } host beckykindle { hardware ethernet XX:XX:XX:XX:XX:XX; fixed-address XXX.XXX.XXX.XXX; }
For starting the new service after system reboot you should add it to a runlevel with the following command(s):
rc-update add dhcpd
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.