目前IPv6隧道技术有ISATAP隧道、6to4隧道、IPv6 over MPL隧道等。
任务一:配置ISATAP隧道
实验拓扑图如下所示
配置要求:两台路由器ROUTERA和ROUTERB通过IPv4网络连接,要求在两台路由器上分别配置ISATAP隧道,实现两端IPv6主机PC1与PC2互访。
配置步骤:
步骤1:在R1上配置ISATAP隧道
R1_config#interface tunnel 0
R1_config_t0# ipv6 address 1234::/16 eui-64
R1_config_t0# tunnel mode ipv6 ipisatap
R1_config_t0# tunnel source 1.1.1.1
R1_config_t0# exit
R1_config# interface fastEthernet 0/0
R1_config_f0/0#ip address 1.1.1.1 255.255.255.0
验证:
R1_config#show ipv6 int
Tunnel0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::5EFE:101:101
Global unicast address(es):
1234::5EFE:101:101, subnet is 1234::/16 [EUI]
Joined group address(es):
FF02::1
FF02::1:FF01:101
MTU is 1460 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are enabled
步骤2:在RouterB上配置ISATAP隧道:
R2_config#interface tunnel 0
R2_config_t0# ipv6 address 1234::/16 eui-64
R2_config_t0# tunnel mode ipv6 ipisatap
R2_config_t0# tunnel source 1.1.1.2
R2_config# interface fastEthernet 0/0
R2_config_f0/0#ip address 1.1.1.2 255.255.255.0
验证:
R2_config#show ipv6 int
Tunnel0 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::5EFE:101:102
Global unicast address(es):
1234::5EFE:101:102, subnet is 1234::/16 [EUI]
oined group address(es):
FF02::1
FF02::1:FF01:102
MTU is 1460 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are enabled
步骤3:测试隧道连通性
R1_config#ping6 1234::5EFE:101:102
PING 1234::5EFE:101:102 (1234::5EFE:101:102): 56 data bytes
!!!!!
--- 1234::5EFE:101:102 ping6 statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0/2/10ms
RouterB_config#ping6 1234::5EFE:101:101
PING 1234::5EFE:101:101 (1234::5EFE:101:101): 56 data bytes
!!!!!
--- 1234::5EFE:101:101 ping6 statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
步骤4:配置默认路由指向隧道接口
R1_config#ipv6 route ::/0 tunnel 0 fe80::5efe:101:102
//此处配置tunnel 0的本地链路地址
R2_config#ipv6 route ::/0 tunnel 0 fe80::5efe:101:101
//此处配置tunnel 0的本地链路地址
步骤5:测试主机连通性(路由器G0/4接口IPv6地址及PC机地址配置步骤略)
任务二:配置6to4隧道
实验拓扑图如下所示
配置要求:两台路由器R1和ROUTERB通过IPv4网络连接,要求在两台路由器上分别配置6to 4隧道,实现IPv6主机PC1能够与PC2互访。
配置步骤:
步骤1:在R1上配置IPv6 to IPv4隧道
R1_config#interface tunnel 0
R1_config_t0# ipv6 address 2002:101:101::1/32
R1_config_t0# tunnel mode ipv6ip 6to4
R1_config_t0# tunnel source 1.1.1.1
R1_config_t0# interface fastEthernet 0/0
R1_config_f0/0#ip address 1.1.1.1 255.255.255.0
R1_config_f0/0#exit
步骤2:在RouterB上配置IPv6 to IPv4隧道:
R2_config#interface tunnel 0
R2_config_t0# ipv6 address 2002:101:102::1/32
R2_config_t0# tunnel mode ipv6ip 6to4
R2_config_t0# tunnel source 1.1.1.2
R2_config# interface fastEthernet 0/0
R2_config_f0/0#ip address 1.1.1.2 255.255.255.0
步骤3:测试。在R1的端口G0/4上配置IPv6地址2001::1/64,在R2的端口g0/4上配置IPv6地址2014::1/64。在R1上ping6 R2端口g0/4的地址2014::1/64,或者在RouterB上ping6 R1端口f0/1的地址2001::1/64。在路由器上配置相应的路由。
R1_config# interface GigaEthernet 0/4
R1_config_g0/4#ipv6 address 2001::1/64
R1_config#ipv6 route 2014::/64 2002:101:102::1
R2_config# interface GigaEthernet 0/4
R2_config# ipv6 route2001::/64 2002:101:101::1
步骤4:在R1上验证配置。
R1# ping6 2014::1
PING 2014::1 (2014::1): 56 data bytes
!!!!!
---2014::1 ping6 statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
Round
-trip min/avg/max = 0/0/0 ms
步骤5:在R2上验证配置。
R2#ping6 2001::1
PING 2001::1 (2001::1): 56 data bytes
!!!!!
--- 2001::1 ping6 statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms
R2#