如何配置IPV6
2008-09-18 13:31
429 查看
实验验背景:公司构建了2个IPV6的网络,但是这两个网络不在同一个地域范围内,如果要想通信,必须要跨越IPV4的网络,为了达到通信的目的,决定采用隧道技术。
试验目的:1、采用GRE隧道技术来实现;
2、实现PC1能够和PC2之间PING通;
3、IPV6路由的实现采用IPV6 RIP实现;
试验拓扑:
1.配置路由器端口的ip地址
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain lookup
Router(config)#hostname aaa
aaa(config)#interface f0/0
aaa(config-if)#no switchport
aaa(config-if)#ip add 192.168.1.1 255.255.255.0
aaa(config-if)#no shut
aaa(config-if)#exit
aaa(config)#interface loopback 1
aaa(config-if)#ipv6 address 2000::1/64
aaa(config-if)#exit
Router#conf t
Router(config)#no ip domain lookup
Router(config)#hostname bb
bb(config)#interface f0/0
bb(config-if)#no switchport
bb(config-if)#ip add 192.168.1.2 255.255.255.0
bb(config-if)#no shut
bb(config-if)#exit
bb(config)#interface f0/1
bb(config-if)#no switchport
bb(config-if)#ip add 172.16.1.1 255.255.255.0
bb(config-if)#no shut
bb(config-if)#exit
Router#conf t
Router(config)#no ip domain lookup
Router(config)#hostname ccc
ccc(config)#interface f0/0
ccc(config-if)#no switchport
ccc(config-if)#ip add 172.16.1.2 255.255.255.0
ccc(config-if)#no shut
ccc(config-if)#exit
ccc(config)#interface loopback 1
ccc(config-if)#ipv6 add 2001::1/64
ccc(config-if)#exit
2.配置ipv4的动态路由
aaa(config)#router rip
aaa(config-router)#version 2
aaa(config-router)#no auto-summary
aaa(config-router)#network 192.168.1.0
aaa(config-router)#exit
bb(config)#router rip
bb(config-router)#version 2
bb(config-router)#no auto-summary
bb(config-router)#network 192.168.1.0
bb(config-router)#network 172.16.1.0
bb(config-router)#exit
ccc(config)#router rip
ccc(config-router)#version 2
ccc(config-router)#no auto-summary
ccc(config-router)#network 172.16.1.0
ccc(config-router)#exit
3.查看路由表
aaa#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
R 172.16.1.0 [120/1] via 192.168.1.2, 00:00:01, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
bb#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
ccc#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 172.16.1.1, 00:00:01, FastEthernet0/0
4.给路由器做隧道
aaa#conf t
aaa(config)#interface tunnel 1
aaa(config-if)#ipv6 address 2002::1/64
aaa(config-if)#tunnel source 192.168.1.1
aaa(config-if)#tunnel destination 172.16.1.2
aaa(config-if)#exit
ccc(config)#interface tunnel 1
ccc(config-if)#ipv6 address 2003::1/64
ccc(config-if)#tunnel source 172.16.1.2
ccc(config-if)#tunnel destination 192.168.1.1
5.在路由器上配置ipv6并应用到接口
aaa(config)#ipv6 unicast-routing
aaa(config)#ipv6 router rip wang
aaa(config-rtr)#exit
aaa(config)#interface tunnel 1
aaa(config-if)#ipv6 rip wang enable
aaa(config-if)#exit
aaa(config)#interface loopback 1
aaa(config-if)#ipv6 rip wang enable
ccc(config)#ipv6 unicast-routing
ccc(config)#ipv6 router rip wang
ccc(config)#interface tunnel 1
ccc(config-if)#ipv6 rip wang enable
ccc(config)#interface loopback 1
ccc(config-if)#ipv6 rip wang enable
ccc(config-if)#exit
6.查看ipv6的路由表
aaa#show ipv6 rou
IPv6 Routing Table - 8 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2000::/64 [0/0]
via ::, Loopback1
L 2000::1/128 [0/0]
via ::, Loopback1
R 2001::/64 [120/2]
via FE80::CE00:4FF:FEA0:F000, Tunnel1
C 2002::/64 [0/0]
via ::, Tunnel1
L 2002::1/128 [0/0]
via ::, Tunnel1
R 2003::/64 [120/2]
via FE80::CE00:4FF:FEA0:F000, Tunnel1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
cc#show ipv6 rou
IPv6 Routing Table - 8 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R 2000::/64 [120/2]
via FE80::CE00:EFF:FE4C:F000, Tunnel1
C 2001::/64 [0/0]
via ::, Loopback1
L 2001::1/128 [0/0]
via ::, Loopback1
R 2002::/64 [120/2]
via FE80::CE00:EFF:FE4C:F000, Tunnel1
C 2003::/64 [0/0]
via ::, Tunnel1
L 2003::1/128 [0/0]
via ::, Tunnel1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
7.验证试验结果:ping对短
aaa#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 276/492/668 ms
ccc#ping 2000::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2000::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 532/610/740 ms本文出自 “小强” 博客,请务必保留此出处http://hong80s.blog.51cto.com/401646/100146
试验目的:1、采用GRE隧道技术来实现;
2、实现PC1能够和PC2之间PING通;
3、IPV6路由的实现采用IPV6 RIP实现;
试验拓扑:
1.配置路由器端口的ip地址
Router#
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#no ip domain lookup
Router(config)#hostname aaa
aaa(config)#interface f0/0
aaa(config-if)#no switchport
aaa(config-if)#ip add 192.168.1.1 255.255.255.0
aaa(config-if)#no shut
aaa(config-if)#exit
aaa(config)#interface loopback 1
aaa(config-if)#ipv6 address 2000::1/64
aaa(config-if)#exit
Router#conf t
Router(config)#no ip domain lookup
Router(config)#hostname bb
bb(config)#interface f0/0
bb(config-if)#no switchport
bb(config-if)#ip add 192.168.1.2 255.255.255.0
bb(config-if)#no shut
bb(config-if)#exit
bb(config)#interface f0/1
bb(config-if)#no switchport
bb(config-if)#ip add 172.16.1.1 255.255.255.0
bb(config-if)#no shut
bb(config-if)#exit
Router#conf t
Router(config)#no ip domain lookup
Router(config)#hostname ccc
ccc(config)#interface f0/0
ccc(config-if)#no switchport
ccc(config-if)#ip add 172.16.1.2 255.255.255.0
ccc(config-if)#no shut
ccc(config-if)#exit
ccc(config)#interface loopback 1
ccc(config-if)#ipv6 add 2001::1/64
ccc(config-if)#exit
2.配置ipv4的动态路由
aaa(config)#router rip
aaa(config-router)#version 2
aaa(config-router)#no auto-summary
aaa(config-router)#network 192.168.1.0
aaa(config-router)#exit
bb(config)#router rip
bb(config-router)#version 2
bb(config-router)#no auto-summary
bb(config-router)#network 192.168.1.0
bb(config-router)#network 172.16.1.0
bb(config-router)#exit
ccc(config)#router rip
ccc(config-router)#version 2
ccc(config-router)#no auto-summary
ccc(config-router)#network 172.16.1.0
ccc(config-router)#exit
3.查看路由表
aaa#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
R 172.16.1.0 [120/1] via 192.168.1.2, 00:00:01, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
bb#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/1
C 192.168.1.0/24 is directly connected, FastEthernet0/0
ccc#show ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
R 192.168.1.0/24 [120/1] via 172.16.1.1, 00:00:01, FastEthernet0/0
4.给路由器做隧道
aaa#conf t
aaa(config)#interface tunnel 1
aaa(config-if)#ipv6 address 2002::1/64
aaa(config-if)#tunnel source 192.168.1.1
aaa(config-if)#tunnel destination 172.16.1.2
aaa(config-if)#exit
ccc(config)#interface tunnel 1
ccc(config-if)#ipv6 address 2003::1/64
ccc(config-if)#tunnel source 172.16.1.2
ccc(config-if)#tunnel destination 192.168.1.1
5.在路由器上配置ipv6并应用到接口
aaa(config)#ipv6 unicast-routing
aaa(config)#ipv6 router rip wang
aaa(config-rtr)#exit
aaa(config)#interface tunnel 1
aaa(config-if)#ipv6 rip wang enable
aaa(config-if)#exit
aaa(config)#interface loopback 1
aaa(config-if)#ipv6 rip wang enable
ccc(config)#ipv6 unicast-routing
ccc(config)#ipv6 router rip wang
ccc(config)#interface tunnel 1
ccc(config-if)#ipv6 rip wang enable
ccc(config)#interface loopback 1
ccc(config-if)#ipv6 rip wang enable
ccc(config-if)#exit
6.查看ipv6的路由表
aaa#show ipv6 rou
IPv6 Routing Table - 8 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2000::/64 [0/0]
via ::, Loopback1
L 2000::1/128 [0/0]
via ::, Loopback1
R 2001::/64 [120/2]
via FE80::CE00:4FF:FEA0:F000, Tunnel1
C 2002::/64 [0/0]
via ::, Tunnel1
L 2002::1/128 [0/0]
via ::, Tunnel1
R 2003::/64 [120/2]
via FE80::CE00:4FF:FEA0:F000, Tunnel1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
cc#show ipv6 rou
IPv6 Routing Table - 8 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
R 2000::/64 [120/2]
via FE80::CE00:EFF:FE4C:F000, Tunnel1
C 2001::/64 [0/0]
via ::, Loopback1
L 2001::1/128 [0/0]
via ::, Loopback1
R 2002::/64 [120/2]
via FE80::CE00:EFF:FE4C:F000, Tunnel1
C 2003::/64 [0/0]
via ::, Tunnel1
L 2003::1/128 [0/0]
via ::, Tunnel1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
7.验证试验结果:ping对短
aaa#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 276/492/668 ms
ccc#ping 2000::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2000::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 532/610/740 ms本文出自 “小强” 博客,请务必保留此出处http://hong80s.blog.51cto.com/401646/100146
相关文章推荐
- Linux下ipv6配置系列一:如何配置Linux系统ipv6环境
- Linux下ipv6配置系列二:如何为Nginx添加ipv6模块
- 如何在路由器上配置IPv6为未来IT的生涯充电?
- 如何配置 Linux ipv6 6RD隧道
- WindowsXP如何把32位IPv4配置成IPv6
- Windows: 如何配置IPv6隧道
- 在 Windows Server 2003 企业服务器中如何配置 IPv6 协议
- 如何在PC上安装IPv6?如何配置IPv6呢?
- Linux下ipv6配置系列一:如何配置Linux系统ipv6环境
- centOS-7.x如何配置ipv6
- Linux下ipv6配置系列三:如何为Nginx配置IPv6端口监听
- 如何配置Windows Live Writer
- Nova如何配置虚拟机使用Spice+QXL ?
- eclipse环境下如何配置tomcat
- win7中如何恢复UltraEdit的默认配置
- 如何配置JDK的开发环境.
- 一个IP,一个linux服务器,两个项目,两个域名;如何将两个域名配置到同一个IP的两个项目中。
- c#如何读取配置文件INI
- 64位Windows系统如何配置32位ODBC
- 服装ERP研究(九):DRP项目结束后如何配置支持小组