目的:架设一台IPV6 的DHCP server
环境:服务器Fedora14 , 客户端win7
- 安装DHCPD,
- 下载源码download latest dhcp-4.1.0.tar.gz from www.isc.org
- 解压缩tar
- ./configure
- make
- make install
- 配置网卡eth1
- 配置文件如下/etc/sysconfig/networking/devices/ifcfg-eth1
# Please read /usr/share/doc/initscripts-*/sysconfig.txt # for the documentation of these parameters. DEVICE=eth1 BOOTPROTO=static TYPE=Ethernet NM_CONTROLLED=yes ONBOOT=yes IPV6INIT=yes IPV6_AUTOCONF=no IPV6ADDR=2001:0db8:0000:f101:0001:0000:0000:0017 NAME="System eth1" HWADDR=00:0F:3D:83:74:6D IPV6_DEFAULTGW=2001:0db8:0000:f101:0001:0000:0000:0017
- 配置network(/etc/sysconfig/network)
NETWORKING=yes HOSTNAME=server2 NTPSERVERARGS=iburst NETWORKING_IPV6=yes
- 配置/etc/dhcpd6.conf
# dhcpd.conf # # Sample configuration file for ISC dhcpd # # option definitions common to all supported networks... option domain-name "example.org"; option dhcp6.domain-search "ipv6,domain.bellnet"; default-lease-time 300; max-lease-time 7200; # Use this to enble / disable dynamic dns updates globally. #ddns-update-style none; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. subnet6 2001:db8:0:f101::/64 { #Range for clients range6 2001:db8:0:f101::3 2001:db8:0:f101::fff0; #additional options option domain-name-servers a.com; prefix6 2001:db8:0:f101:: 2001:db8:0:f101:: /64; #host specialclient { # host-identifier option dhcp6.client-id 00:01:00:01:18:f4:18:11:00:23:8b:a5:a6:f3; # fixed-address6 2001:db8:0:f101:1::32; #} }
- 配置文件如下/etc/sysconfig/networking/devices/ifcfg-eth1
- 运行 dhcpd -6 -cf /etc/dhcpd6.conf eth1
- 使用win7获取IPV6地址
- 在win7上增加路由
netsh interface ipv6 add route ::/0 "本地连接" 2001:db8:0:f101::fff0 publish=yes