ENSP IPV6-over-IPV4

IPv6是网络层协议的第二代标准协议,一个IPv6地址同样可以分为网络前缀和主机ID两个部分。

可以将IPV4的网络看成IPV6的承载网,只有IPv4网络是连通的,则IPv6网络才有可能连通。所以配置的时候需要先配置IPv4网络的路由功能,再配IPv6网络的路由功能。

R1配置

<Huawei>sy
[Huawei]sy R1
[R1]IPV6
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ipv6 enable
[R1-GigabitEthernet0/0/0]ipv6 address auto link-local 
[R1-GigabitEthernet0/0/0]ipv6 address 2001:1::2 64
[R1-GigabitEthernet0/0/0]q
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]ip address 12.1.1.1 24
[R1-GigabitEthernet0/0/1]q
[R1]int tunnel0/0/0
[R1-Tunnel0/0/0]ipv6 enable
[R1-Tunnel0/0/0]ipv6 address 2031:0:FD::1 64
[R1-Tunnel0/0/0]q
[R1]ospf
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]

R2配置

<R2>sy
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip address 23.1.1.2 24
[R2-GigabitEthernet0/0/1]q
[R2]ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255

R3配置

 <R3>sy
[R3]ipv6
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip address 23.1.1.3 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ipv6 enable
[R3-GigabitEthernet0/0/1]ipv6 address 2002:1::2 64
[R3-GigabitEthernet0/0/1]int tunnel0/0/0
[R3-Tunnel0/0/0]ipv6 enable
[R3-Tunnel0/0/0]undo ipv6 address auto link-local
[R3-Tunnel0/0/0]ipv6 address 2031:0:FD::3 64
[R3-Tunnel0/0/0]int g0/0/1 
[R3-GigabitEthernet0/0/1]ipv6 address auto link-local 
[R3-GigabitEthernet0/0/1]q
[R3]ospf
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255

R1路由配置

<R1>sy
[R1]int tunnel0/0/0  
[R1-Tunnel0/0/0]tunnel-protocol ipv6-ipv4 
[R1-Tunnel0/0/0]source 12.1.1.1  
[R1-Tunnel0/0/0]destination 23.1.1.3
[R1-Tunnel0/0/0]q    
[R1]ipv6 route-static 2002:1:: 64 2031:0:FD::3
[R1]ipv6 route-static :: 0 2031:0:FD::3 

R3路由配置

 <Huawei>sy
[R3]int tunnel0/0/0  
[R3-Tunnel0/0/0]tunnel-protocol ipv6-ipv4    
[R3-Tunnel0/0/0]source 23.1.1.3 
[R3-Tunnel0/0/0]destination 12.1.1.1
[R3-Tunnel0/0/0]q
[R3]ipv6 route-static 2001:1:: 64 2031:0:FD::1
[R3]ipv6 route-static :: 0 2031:0:FD::1

测试联通性

上一篇:c# is 和 as 浅看重制版


下一篇:软件工程——期末复习(适用于sdut)