- Installation unter Debian / Ubuntu
apt-get install isc-dhcp-server isc-dhcp-common
Datei | Beschreibung |
---|---|
/etc/default/isc-dhcp-server | Standardeinstellungen des Servers (nur unter SysV-Init) |
/etc/dhcp/dhcpd.conf | DHCP Server Einstellungen IPv4 |
/etc/dhcp/dhcpd6.conf | DHCP Server Einstellungen IPv6 |
/var/lib/dhcp/dhcpd6.leases | Lease der Clients |
service isc-dhcp-server6 start|stop|restart|status | DHCPv6 Daemon starten|stoppen|neustarten |
service isc-dhcp-server start|stop|restart|status | DHCP IPv4 Daemon starten|stoppen|neustarten |
/etc/init.d/isc-dhcp-server start|stop|restart | DHCPv6 Daemon starten|stoppen|neustarten |
update-rc.d -f isc-dhcp-server default | ISC-DHCP Server beim Systemstart mitstarten (unter Upstart) |
update-rc.d -f isc-dhcp-server remove | ISC-DHCP Server Systemstart deaktivieren (unter Upstart) |
echo "manual" | sudo tee -a /etc/init/isc-dhcp-server.override |
- Konfiguration unter upstart (ubuntu) oder Systemd nicht mehr nötig!
# /etc/default/isc-dhcp-server DHCPD_CONF=/etc/dhcp/dhcpd6.conf OPTIONS="-6" INTERFACES="eth0 eth1"
- der DHCPv6 Server muss eine IPv6 aus der in der Konfigurationsdatei angegebenene subnet6
haben.
# IPv6 /etc/dhcp/dhcpd6.conf # ddns-update-style none; default-lease-time 600; max-lease-time 7200; log-facility local7; authoritative; # IPv6 Server Optionen option dhcp6.name-servers fd01:edda:edda:21::254; option dhcp6.domain-search "local.zz","domain.zz"; # subnet6 ::/64 { subnet6 fd01:edda:edda:21::/64 { range6 fd01:edda:edda:21::300 fd01:edda:edda:21::320; # Host Reservierung # host Ubuntu-S1 { # host-identifier option dhcp6.client-id 00:03:00:01:00:50:56:82:7a:fd; # fixed-address6 2001:db8:2:1::2; # } }
DHCP Server von Hand auf der Konsole starten, IPv6 Modus -6, Daemon läuft im Vordergrund -f, Log auf Standardausgabe -d, mit Konfigurationsdatei -cf. weiter Hilfe man dhcpd
. Server startet nur, wenn der Server auch eine IPv6 aus dem Subnet6 der Konfig hat.
dhcpd -6 -f -d -cf /etc/dhcp/dhcpd6.conf eth1
- unter ubuntu Device neu starten
ifdown eth1 && ifup eth1
- IPv6 Adressen anzeigen
ip -6 addr show dev eth1
- Rechner im Netz anzeigen
ip -6 neigh show
- Installation
apt-get install wide-dhcpv6-server
Datei | Beschreibung |
---|---|
/etc/wide-dhcpv6/dhcp6s.conf | DHCPv6 Server Konfiguration |
man dhcp6s.conf | Hilfe zur Server Konfiguration |
/usr/share/doc/wide-dhcpv6-server/examples/dhcp6s.conf.sample | Beispiel Konfigurationsdatei |
/etc/default/wide-dhcpv6-server | DHCPv6 Server initscript |
service wide-dhcpv6-server start | stop | restart | status | Daemon starten | stoppen | neustarten | aktueller Status |
/usr/sbin/dhcp6s | Server Daemon |
update-rc.d wide-dhcpv6-server defaults | Daemon Autostart aktivieren |
update-rc.d -f wide-dhcpv6-server remove | Daemon Autostart deaktivieren |
- Beispiel Server Konfigurationsdatei
# /etc/wide-dhcpv6/dhcp6s.conf # option domain-name-servers 2001:db8:1::1; option domain-name "domain.tld"; interface eth0 { preference 255; send rapid-commit; address-pool pool1 3600; }; pool pool1 { range range 2001:db8:1::2 to 2001:db8:1::200 ; };
- Paket installieren (Standard bei ubuntu und Debian)
apt-get install isc-dhcp-client isc-dhcp-common
Dateien / Verzeichnisse | |
---|---|
/etc/dhcp/dhclient.conf | IPv4 Client Konfigurationsdatei |
/etc/dhcp/dhclient6.conf | IPv6 Client Konfigurationsdatei |
- auf dem ISC-DHCP-Server, aus der Datei /etc/dhcp/dhclient.conf
den Eintrag interface-mtu
aus den Parametern unter request
entfernen.
# /etc/dhcp/dhclient.conf ... request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, domain-search, host-name, dhcp6.name-servers, dhcp6.domain-search, # netbios-name-servers, netbios-scope, interface-mtu, netbios-name-servers, netbios-scope, rfc3442-classless-static-routes, ntp-servers, dhcp6.fqdn, dhcp6.sntp-servers; ...
- DHCPv6 Client Konfiguration
# IPv6 /etc/dhcp/dhclient6.conf # interface "eth0" { send dhcp6.ia-pd 1; script "/etc/dhclient-exit-hooks"; }
- IPv6 DHCP Lease erneuern
dhclient -6 -d eth0
dhclient -P -d -cf /etc/dhcp/dhclient6.conf eth0
- Paket installieren
apt-get install wide-dhcpv6-client
Dateien / Verzeichnisse | |
---|---|
/etc/wide-dhcpv6/dhcp6c.conf | Client Konfigurationsdatei |
/etc/default/wide-dhcpv6-client | Daemon Default Einstellungen |
service wide-dhcpv6-client start | stop | restart | status | Daemon starten | stoppen | neustarten | aktueller Status |
- Default Schnittstelle konfigurieren
# /etc/default/wide-v6-client INTERFACES="eth0"
# /etc/wide-dhcpv6/dhcp6c.conf interface eth0 { # WAN Interface zum PD Server # These 3 lines are used to do DHCP on the interface. send ia-na 1; # Tells the system to assign a DHCP IP to this interface # PD specific. send ia-pd 1; # Tells the PD server, we are requesting prefix delegation send rapid-commit; request domain-name-servers; #get DNS from DHCP Optional request domain-name; #get DNS search domain from DHCP Optional script "/etc/wide-dhcpv6/dhcp6c-script"; }; id-assoc na 1 { # Required to have the DHCP address assigned to the interface with the matching s }; id-assoc pd 1 { #configuring the requested prefix delegation. prefix ::/56 infinity; prefix-interface eth1 { #LAN Interface sla-id 0; # Use the first /64 from the delegated prefix. Starts with zero. 2001:db8:1200:0 ifid 1; # Specifies the host address to use with the prefix. eg. 2001:db8:1200:0::1/64 sla-len 8; #how many bits to add to the prefix delegation to get to /64. 48+16=64, 56+8=64 };
interface eth0 { information-only; request domain-name-servers; request domain-name; script "/etc/wide-dhcpv6/dhcp6c-script"; };
- Daemon temporär starten
dhcp6c -c /etc/wide-dhcpv6/dhcp6c.conf -fdD eth0
Datei | Beschreibung |
---|---|
/etc/radvd.conf | radvd Konfigurationsdatei |
service radvd start | stop | restart | status | radvd Daemon starten | stoppen | neustarten | aktueller Status |
radvdump | Fehlersuche gesendete und empfangene Advertisements detailliert betrachten |
rdisc6 eth0 | aktuelle Router Advertisements für die angegebene Schnittstelle anzeigen |
- Beispiel Daemon Konfigurationsdatei
# /etc/radvd.conf # interface eth1 { AdvSendAdvert on; MinRtrAdvInterval 15; MaxRtrAdvInterval 60; AdvDefaultPreference high; AdvManagedFlag off; AdvOtherConfigFlag off; AdvHomeAgentFlag off; prefix ::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr on; }; };
Parameter
AdvSendAdvert - Advertisement versenden
AdvManagedFlag - Managed Address, DHCPv6 Stateful Konfiguration
AdvOtherConfigFlag - Other Stateful, DHCPv6 Stateless Konfiguration
AdvHomeAgentFlag - Home Agent Flag für Mobile IPv6
AdvDefaultPreference - Router Priorität
AdvAutonomous - Autokonfiguration durch den Client
eth0 - WAN Interface
eth1 - LAN Interface
- Weiterleitung der Pakete aktivieren forwarding auf allen Schnittsellen, Router Advertisement auf eth0 akzeptieren accept_ra
sysctl -w net.ipv6.conf.all.forwarding=1 sysctl -w net.ipv6.conf.all.accept_ra=1 sysctl -w net.ipv6.conf.eth0.accept_ra=2 sysctl -w net.ipv6.conf.eth1.autoconf=0
- aktuelle Einstellungen kontrollieren
sysctl net.ipv6.conf.all.forwarding sysctl net.ipv6.conf.all.accept_ra sysctl net.ipv6.conf.eth0.accept_ra sysctl net.ipv6.conf.eth1.autoconf
- IPv6 Adresse der Schnittstelle eth0 anzeigen
ip -6 addr show dev eth0