GRE隧道IPv6过渡技术
一、IPv4 over IPv4
拓扑
Tunnel隧道接口协议UP的三个条件:
- 使能IPv4或IPv6(配置IPv4或IPv6地址)
- source地址在本设备上协议UP
- destication地址的路由可达(在路由表中可见)
1、基础配置
AR1
system
sysname AR1
int g 0/0/0
ip add 192.168.1.254 24
int g 0/0/1
ip add 10.0.12.1 24AR2
system
sysname AR2
int g 0/0/0
ip add 10.0.12.2 24
int g 0/0/1
ip add 10.0.23.2 24AR3
system
sysname AR3
int g 0/0/0
ip add 10.0.23.3 24
int g 0/0/1
ip add 172.16.1.254 24
2、隧道接口配置
AR1
int tunnel 0/0/0
ip address 10.0.1.1 255.255.255.0
tunnel-protocol gre
source 10.0.12.1
destination 10.0.23.3AR3
int tunnel 0/0/0
ip address 10.0.3.3 255.255.255.0
tunnel-protocol gre
source 10.0.23.3
destination 10.0.12.1
3、路由配置
AR1
ip route-static 172.16.1.0 24 tunnel 0/0/0
ospf 1 router-id 1.1.1.1
area 0
netw 10.0.12.1 0.0.0.0AR2
ospf 1 router-id 2.2.2.2
area 0
netw 10.0.12.2 0.0.0.0
netw 10.0.23.2 0.0.0.0AR3
ip route-static 192.168.1.0 24 tunnel 0/0/0
ospf 1 router-id 3.3.3.3
area 0
netw 10.0.23.3 0.0.0.0
查看邻居状态
[AR2]display ospf peer brief OSPF Process 1 with Router ID 2.2.2.2Peer Statistic Information----------------------------------------------------------------------------Area Id Interface Neighbor id State 0.0.0.0 GigabitEthernet0/0/0 1.1.1.1 Full 0.0.0.0 GigabitEthernet0/0/1 3.3.3.3 Full ----------------------------------------------------------------------------
查看隧道接口状态
[AR1]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.254/24 up up
GigabitEthernet0/0/1 10.0.12.1/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Tunnel0/0/0 10.0.1.1/24 up up
[AR3]display ip int brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 10.0.23.3/24 up up
GigabitEthernet0/0/1 172.16.1.254/24 up up
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
Tunnel0/0/0 10.0.3.3/24 up up
查看隧道路由
[AR1]display ip routing-table 172.16.1.0
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface172.16.1.0/24 Static 60 0 D 10.0.1.1 Tunnel0/0/0
[AR3]display ip routing-table 192.168.1.0
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface192.168.1.0/24 Static 60 0 D 10.0.3.3 Tunnel0/0/0
测试:
抓包
二、IPv6 over IPv4
拓扑
1、基础配置
AR1
system
sysname AR1
ipv6
int g 0/0/0
ipv6 enable
ipv6 add 2001::ffff 64
int g 0/0/1
ip add 10.0.12.1 24
int tunnel 0/0/0
ipv6 enable
ipv6 add 2001:1::1 64AR2
system
sysname AR2
int g 0/0/0
ip add 10.0.12.2 24
int g 0/0/1
ip add 10.0.23.2 24AR3
system
sysname AR3
ipv6
int g 0/0/1
ipv6 enable
ipv6 add 2000::ffff 64
int g 0/0/0
ip add 10.0.23.3 24
int tunnel 0/0/0
ipv6 enable
ipv6 add 2001:3::1 64
2、隧道接口配置
AR1
int t 0/0/0
tunnel-protocol gre
source 10.0.12.1
destination 10.0.23.3AR3
int t 0/0/0
tunnel-protocol gre
source 10.0.23.3
destination 10.0.12.1
3、路由配置
AR1
ipv6 route-static 2000:: 64 Tunnel 0/0/0
ospf 1 router-id 1.1.1.1
area 0
netw 10.0.12.1 0.0.0.0AR2
ospf 1 router-id 2.2.2.2
area 0
netw 10.0.12.2 0.0.0.0
netw 10.0.23.2 0.0.0.0AR3
ipv6 route-static 2001:: 64 Tunnel 0/0/0
ospf 1 router-id 3.3.3.3
area 0
netw 10.0.23.3 0.0.0.0
查看隧道路由
[AR1]display ipv6 routing-table 2000:: 64
Routing Table :
Summary Count : 1Destination : 2000:: PrefixLength : 64NextHop : 2001:1::1 Preference : 60Cost : 0 Protocol : StaticRelayNextHop : :: TunnelID : 0x0Interface : Tunnel0/0/0 Flags : D
测试:
抓包:
以上就是本章的全部内容了,如果本文章对你的学习有所帮助麻烦点个赞加个收藏,文章若有错误或疑问可联系博主删除更改,感谢大家的浏览观看!