Configuring DHCPv6
来源:互联网 发布:不用域名不备案 编辑:程序博客网 时间:2024/05/16 17:11
As the IPv4 address space is now exhausted, all networking people are focusing on IPv6. In this post, I will explain how to configure DHCPv6 on a Linux machine running Ubuntu 11.04 server (64 bits) with the ISC DHCPv6 service. Be carefull, you need the version 4.x of the ISC DHCP server that support IPv6. It does not exist as a package for older Ubuntu version. The ISC version 4.1 and above superseed the DHCPv6 serveur.
Step 1: configure a fixed IPv6 address on your ethernet card
To specify a fixed (manual) IPv4/IPv6 address, you need to modify the file /etc/network/interfaces:
As of this writing, the version 4.1.1P1 of the ISC DHCP server is the actual package available on Ubuntu.
The actual version of ISC does not allow to run one instance of ISC and support at the same time DHCPv4 and DHCPv6. You need to start two instances of DHCP, one for IPv4 and one for IPv6.
Be sure that your server will listen for DHCP request on the correct interface. Edit the /etc/default/isc-dhcp-server file:
adding the “-6″ option everywhere the dhcpd process is called (3 times)
change all “dhcp.leases” with dhcp6.leases”
modify the CONFIG_FILE variable :
Step 1: configure a fixed IPv6 address on your ethernet card
To specify a fixed (manual) IPv4/IPv6 address, you need to modify the file /etc/network/interfaces:
auto eth1iface eth1 inet staticaddress 172.16.14.251netmask 255.255.255.0gateway 172.16.14.1iface eth1 inet6 staticpre-up modprobe ipv6address 2001:620:40b:555::4netmask 64gateway 2001:620:40b:555::1Don’t forget to restart the networking service to take this configuration into account:
#/etc/init.d/networking restartStep 2: install the DHCPv6 server
As of this writing, the version 4.1.1P1 of the ISC DHCP server is the actual package available on Ubuntu.
#apt-get install isc-dhcp-serverStep 3: configure the DHCPv6 server
The actual version of ISC does not allow to run one instance of ISC and support at the same time DHCPv4 and DHCPv6. You need to start two instances of DHCP, one for IPv4 and one for IPv6.
Be sure that your server will listen for DHCP request on the correct interface. Edit the /etc/default/isc-dhcp-server file:
INTERFACES="eth1"Configure the IPv4 address Pool by editing/creating the /etc/dhcp/dhcpd.conf file:
option domain-name "buntschu.ch";option domain-name-servers ns.buntschu.ch;default-lease-time 600;max-lease-time 7200;log-facility local7;subnet 172.16.14.0 netmask 255.255.255.0 {range 172.16.14.100 172.16.14.110;}Configure the IPv6 address Pool by editing/creating the /etc/dhcp/dhcpd6.conf file:
option domain-name "buntschu.ch";option domain-name-servers ns.buntschu.ch;default-lease-time 600;max-lease-time 7200;log-facility local7;subnet6 2001:620:40b:555::/64 {range6 2001:620:40b:555::100 2001:620:40b:555::110;}Create a second startup file for the DHCPv6 server
#cp /etc/init.d/isc-dhcp-server /etc/init.d/isc-dhcp6-server#update-rc.d isc-dhcp6-server defaultsModify the new file “/etc/init.d/isc-dhcp6-server” to support IPv6 by:
adding the “-6″ option everywhere the dhcpd process is called (3 times)
change all “dhcp.leases” with dhcp6.leases”
modify the CONFIG_FILE variable :
CONFIG_FILE=/etc/dhcp/dhcpd6.confmodifiy the DHCPID variable:
DHCPDPID=/var/run/dhcp-server/dhcpd6.pidThe DHCP Deamon is controlled by the “apparmor”, so we need to authorize the DHCPv6 to create some files and access some others. Here are the lines to add to the “/etc/apparmor.d/usr.sbin.dhcpd” file:
...network inet6 raw,@{PROC}/[0-9]*/net/if_inet6 r,/var/lib/dhcp/dhcpd6.leases* lrw,/var/run/dhcp-server/dhcpd6.pid w,...Don’t forget to restart the “apparmor” process:
#/etc/init.d/apparmor restartYour are now ready to start both servers !
#/etc/init.d/isc-dhcp-server start#/etc/init.d/isc-dhcp6-server start
Happy playing with IPv6 !
原文地址:
http://www.buntschu.ch/blog/?p=344
0 0
- Configuring DHCPv6
- Configuring ISC DHCPv6 Server
- DHCPv6 简介
- DHCPv6介绍
- DHCPv6协议
- Simple DHCPv6 server configuration
- DHCPv6技术介绍
- DHCPV4 VS DHCPV6
- DHCPv6技术介绍
- ubuntu下radvd,dhcpv6
- DHCPV6文档学习
- wide-dhcpv6 交叉编译
- fedora下配置dhcpv6服务器
- Linux IPv6 Router: RADVD + DHCPv6
- dhcpv6 server test env building
- DHCP源码分析-dhcpv6模块
- wide-dhcpv6的dhcp6c配置
- wide-dhcpv6 使用(2)
- 将java对象存入mysql示例
- Windows XP、Cygwin、NDKr5b编译Android下的ffmpeg
- 一个非常好的介绍Oonegl的网址
- linux网络协议栈(四)链路层 (6)L2隧道(eoip)
- 数据库中多表的连接
- Configuring DHCPv6
- 设计模式六大原则(6):开闭原则
- Scoket:UDP通讯模型
- BACKUP DATABASE PLUS ARCHIVELOG
- Mongodb的用处
- Android 4.4(KitKat)中的设计模式-Graphics子系统
- oracle for in loop 两例
- [机器学习]基于OpenCV实现最简单的数字识别
- 一、Hibernate基础入门