当前位置: 首页 > news >正文

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

测试:

抓包:

以上就是本章的全部内容了,如果本文章对你的学习有所帮助麻烦点个赞加个收藏,文章若有错误或疑问可联系博主删除更改,感谢大家的浏览观看!

http://www.dtcms.com/a/355375.html

相关文章:

  • 数制与编码
  • 并发编程——04 深入理解CASAtomic原子操作类详解
  • Qt 中日志级别
  • JS中的String总结
  • Linux 环境源码安装 Docker
  • 影石insta360 DevOps工程师一面记录
  • 学习嵌入式之驱动——I2C子系统
  • 搭建一个Spring cloud 非阻塞式微服务架构
  • 任天堂NDS中文游戏ROM精选毕业整合包整理分享! +NDS模拟器
  • 使用Docker搭建StackEdit在线MarkDown编辑器
  • 如何通过docker进行本地部署?
  • 企业内部机密视频安全保护|如何防止企业内部机密视频泄露?
  • (附源码)基于Spring Boot公务员考试信息管理系统设计与实现
  • GitLab 配置 Pipeline 的过程
  • linux 网络:协议及Wireshark抓包工具的使用
  • Elasticsearch冷热架构:性能与成本完美平衡
  • 《深入浅出 Node.js》分享精简大纲
  • linu 网络 :TCP粘包及UDP
  • 软件设计师备考-(五)计算机网络
  • 客户端是否都需要主动发送`FindService`报文来寻找服务
  • FPGA开发技能(12)matlab图片处理助力FPGA开发
  • 【温室气体数据集】GlobalView 数据概述
  • Kotlin 协程之Channel 的高阶应用
  • RAGFlow
  • plantsimulation知识点 一条轨道上多台RGV如何引用
  • 【Big Data】Presto db 一种语言、一个接口搭建可靠、高效数据湖仓
  • NineData 最新发布 SQL Server 双向实时同步功能
  • 手机上访问你电脑上的前端项目
  • Rust 登堂 之 类型转换(三)
  • 趣味学Rust基础篇(数据类型)