dhcpv6 server test env building
来源:互联网 发布:温州市网络问政平台 编辑:程序博客网 时间:2024/06/06 02:47
A: Ubuntu 14.04 + 有线网卡(eth0) + 无线网卡(wlan0)
B: Windows 7 + 有线网卡 + 无线网卡
A,B的无线网卡都连接到家庭无线路由器,网关为192.168.1.1,可以上互联网。A,B的有线网卡通过网线直连,A作为IPv6 server和网关,为B的有线网卡分配IPV6地址2. sudo apt-get install radvd
3. vi /etc/radvd.conf (需新建该文件),如下面几行4. 在/etc/sysctl.conf 中打开 net.ipv6.conf.all.forwarding=1
5. sudo /etc/init.d/radvd start
(如果在 radvd 运行状态下重启机器,radvd 会在开机后自动运行)
6. 在B上运行ipconfig
7.连通性测试B上:
1.sudo apt-get install isc-dhcp-server
2.sudo vim /etc/network/interfaces
配置本机IPv6地址2001:db8:0:1::2
此时ping 2001:db8:0:1::2 不通A上ping 2001:db8:0:1::254 连通三、使用wide-dhcpv6-server给B分配IPv6地址
A:
1.sudo apt-get install wide-dhcpv6-server
2.sudo vim /etc/network/interfaces
添加IPv6地址2001:db8:1:2::120
3.sudo vim /etc/wide-dhcpv6/dhcp6s.conf
B: Windows 7 + 有线网卡 + 无线网卡
A,B的无线网卡都连接到家庭无线路由器,网关为192.168.1.1,可以上互联网。A,B的有线网卡通过网线直连,A作为IPv6 server和网关,为B的有线网卡分配IPV6地址
一.A使用radvd(Router AdvertisementDaemon)为B分配ipv6地址
1.sudo vim /etc/network/interfaces
- auto lo
- iface lo inet loopback
- auto eth0
- iface eth0 inet static
- address 10.5.5.1
- netmask 255.255.255.224
- network 10.10.10.0
- broadcast 10.5.5.31
- #auto eth0
- iface eth0 inet6 static
- address 2001:db8::1
- netmask 64
3. vi /etc/radvd.conf (需新建该文件),如下面几行
- interface eth0 {
- AdvSendAdvert on;
- AdvManagedFlag off;
- AdvOtherConfigFlag off;
- prefix 2001:db8::/64{
- AdvOnLink on;
- AdvAutonomous on;
- AdvRouterAddr off;
- };
- };
5. sudo /etc/init.d/radvd start
(如果在 radvd 运行状态下重启机器,radvd 会在开机后自动运行)
6. 在B上运行ipconfig
- 以太网适配器 本地连接:
- 连接特定的 DNS 后缀 . . . . . . . :
- IPv6 地址 . . . . . . . . . . . . : 2001:db8::2ca1:fa3d:7f0b:611b
- 临时 IPv6 地址. . . . . . . . . . : 2001:db8::5130:67e5:bd0:f297
- 本地链接 IPv6 地址. . . . . . . . : fe80::2ca1:fa3d:7f0b:611b%11
- IPv4 地址 . . . . . . . . . . . . : 10.5.5.26
- 子网掩码 . . . . . . . . . . . . : 255.255.255.224
- 默认网关. . . . . . . . . . . . . : fe80::beae:c5ff:fe65:766c%11
- 10.5.5.1
A上运行ifconfig
- eth0 Link encap:以太网 硬件地址 bc:ae:c5:65:76:6c
- inet 地址:10.5.5.1 广播:10.5.5.31 掩码:255.255.255.224
- inet6 地址: fe80::beae:c5ff:fe65:766c/64 Scope:Link
- inet6 地址: 2001:db8::1/64 Scope:Global
- UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
- 接收数据包:1475 错误:0 丢弃:0 过载:0 帧数:0
- 发送数据包:323 错误:0 丢弃:0 过载:0 载波:0
- 碰撞:0 发送队列长度:1000
- 接收字节:132185 (132.1 KB) 发送字节:32086 (32.0 KB)
7.连通性测试
A上:
ping6 -I eth0 2001:db8::2ca1:fa3d:7f0b:611b
- PING 2001:db8::2ca1:fa3d:7f0b:611b(2001:db8::2ca1:fa3d:7f0b:611b) from 2001:db8::1 eth0: 56 data bytes
- 64 bytes from 2001:db8::2ca1:fa3d:7f0b:611b: icmp_seq=1 ttl=64 time=73.9 ms
- 64 bytes from 2001:db8::2ca1:fa3d:7f0b:611b: icmp_seq=2 ttl=64 time=0.398 ms
- PING fe80::2ca1:fa3d:7f0b:611b(fe80::2ca1:fa3d:7f0b:611b) from fe80::beae:c5ff:fe65:766c eth0: 56 data bytes
- 64 bytes from fe80::2ca1:fa3d:7f0b:611b: icmp_seq=1 ttl=64 time=0.699 ms
ping 2001:db8::1
- C:\Windows\system32>ping 2001:db8::1
- 正在 Ping 2001:db8::1 具有 32 字节的数据:
- 来自 2001:db8::1 的回复: 时间=464ms
- 来自 2001:db8::1 的回复: 时间=62ms
二、使用isc-dhcp-server为B分配IPv6地址
A:1.sudo apt-get install isc-dhcp-server
2.sudo vim /etc/network/interfaces
配置本机IPv6地址2001:db8:0:1::2
3.sudo vim /etc/dhcp/dhcpd6.conf
- default-lease-time 600;
- max-lease-time 7200;
- log-facility local7;
- subnet6 2001:db8:0:1::/64 {
- # Range for clients
- range6 2001:db8:0:1::129 2001:db8:0:1::254;
- # Range for clients requesting a temporary address
- range6 2001:db8:0:1::/64 temporary;
- # Additional options
- option dhcp6.name-servers fec0:0:0:1::1;
- option dhcp6.domain-search "domain.example";
- # Prefix range for delegation to sub-routers
- prefix6 2001:db8:0:100:: 2001:db8:0:f00:: /56;
- # Example for a fixed host address
- host specialclient {
- host-identifier option dhcp6.client-id 00:01:00:01:4a:1f:ba:e3:60:b9:1f:01:23:45;
- fixed-address6 2001:db8:0:1::127;
- }
- }
4.B上运行ipconfig
- 以太网适配器 本地连接:
- 连接特定的 DNS 后缀 . . . . . . . : domain.example
- IPv6 地址 . . . . . . . . . . . . : 2001:db8:0:1::254
- 本地链接 IPv6 地址. . . . . . . . : fe80::2ca1:fa3d:7f0b:611b%11
- 自动配置 IPv4 地址 . . . . . . . : 169.254.97.27
- 子网掩码 . . . . . . . . . . . . : 255.255.0.0
- 默认网关. . . . . . . . . . . . . : ::
- netsh interface ipv6 add route ::/0 "本地连接" 2001:db8:0:1::254 publish=yes
- C:\Windows\system32>ping 2001:db8:0:1::2
- 正在 Ping 2001:db8:0:1::2 具有 32 字节的数据:
- 来自 2001:db8:0:1::2 的回复: 时间<1ms
- 来自 2001:db8:0:1::2 的回复: 时间<1ms
- 来自 2001:db8:0:1::2 的回复: 时间<1ms
A:
1.sudo apt-get install wide-dhcpv6-server
2.sudo vim /etc/network/interfaces
添加IPv6地址2001:db8:1:2::120
3.sudo vim /etc/wide-dhcpv6/dhcp6s.conf
- # The followings are a sample configuration to provide a DNS server address
- # for every client as well as to delegate a permanent IPv6 prefix
- # 2001:db8:1111::/48 to a client whose DUID is 00:01:00:01:aa:bb.
- option domain-name-servers 2001:db8::35;
- host kame {
- duid 00:01:00:01:aa:bb;
- prefix 2001:db8:1111::/48 infinity;
- };
- # The followings are a sample configuration to provide an IPv6 address
- # from an address pool 2001:db8:1:2::1000-2000 for 3600[s].
- # Note. You have to send an RA to fxp0; otherwise a client cannot be sure
- # about the prefix-length and the default router. If you want to prevent
- # stateless address configuration via RA, please set the autonomous-flag to
- # OFF in your RA configuration.
- interface eth0 {
- address-pool pool1 3600;
- };
- pool pool1 {
- range 2001:db8:1:2::1000 to 2001:db8:1:2::2000 ;
- };
4.同实验二验证。
0 0
- dhcpv6 server test env building
- dhcpv4 test env building
- pppoe test env building
- pppoe v4 test env building
- Simple DHCPv6 server configuration
- Configuring ISC DHCPv6 Server
- bcm68380 complile env building
- Ubuntu搭建dhcpv4+dhcpv6服务器(Kea DHCP Server V1.2.0)
- Issues might be encountered during HA test bed building based on win2k8 server R2
- Building a LAMP Server
- Building a LAMP Server
- Building a LAMP Server
- DHCPv6 简介
- Configuring DHCPv6
- DHCPv6介绍
- DHCPv6协议
- env
- env
- 当下全球最炙手可热的八位少年创业者
- Swift学习:7.数组
- Java的深拷贝和浅拷贝(转载)
- Windows CE: Prefetch Aborts, why they are difficult to locate
- 【开源框架】Android之史上最全最简单最有用的第三方开源库收集整理,有助于快速开发,欢迎各位...
- dhcpv6 server test env building
- Android searchView和listview实现搜索
- 矩阵链乘法
- Apache配置禁止访问某些文件或目录
- linux用curl命令测试Post请求
- 程序员总结:帮助你早些明白一些道理
- 正则表达式 多个手机号之间使用英文逗号分隔
- Hadoop中Namenode无法启动
- Java中==和equals()的区别