GRE实验

本文详细描述了通过AR2440路由器配置GRE隧道、RIPV2和OSPF,实现在AR1和AR3之间,中间隔着AR2的广播域,实现点对点安全通信的实验过程。
摘要由CSDN通过智能技术生成

一.实验要求

二.实验材料

AR2440路由器三台,PC两台

三.实验思路 

1.ip配置
2.公私网通
3.建立隧道

[r1]interface Tunnel 0/0/0 --- 创建GRE随道接口

[r1-Tunnel0/0/0]ip address 192.168.3.1 24  ---- 配置隧道IP地址

[r1-Tunnel0/0/0]tunnel-protocol gre  ---- 定义封装方式

[r1-Tunnel0/0/0]source 100.1.1.1 ---- 定义隧道被封装的源地址

[r1-Tunnel0/0/0]destination 100.2.2.3---- 定义隧道被封装的目标地址

4.路由协议

RIPV2

1.启动RIP进程

[r1]rip 1 --- 进程号,进具有本地意义,如果需要同时启动多个RIP进程时,需要使用不同的进

程号进行区分

[r1-rip-1]

2.选择RIP版本

[r1-rip-1]version 2

3.宣告

RIP宣告的要求:

1,所有直连网段都必须宣告

2,必须按照主类进行宣告

OSPF的基本配置

1.启动OSPF进程

[r1]ospf 1 router-id 1.1.1.1 --- 手工配置RID需要在进程启动时配置

[r1-ospf-1]

2.创建区域

[r1-ospf-1]area 0

[r1-ospf-1-area-0.0.0.0]

3.宣告

宣告的作用:

1.激活接口 --- 只有宣告的网段包含的接口会被激活,只有激活的接口可以收发OSPF 的数据。

2.发布路由 --- 只有激活的接口所对应的直连网段的路由才能被发布

四.实验配置

AR1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]int g 0/0/0
[AR1-GigabitEthernet0/0/0]int g 0/0/1
[AR1-GigabitEthernet0/0/1]ip add 100.1.1.1 24
[AR1]dis ip int brief
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/24       up         up        
GigabitEthernet0/0/1              100.1.1.1/24         up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)    
[AR1]ip route-static 100.2.2.0 24 100.1.1.2
[AR1]ping 100.2.2.1
  PING 100.2.2.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 100.2.2.1: bytes=56 Sequence=2 ttl=254 time=70 ms
    Reply from 100.2.2.1: bytes=56 Sequence=3 ttl=254 time=50 ms
    Reply from 100.2.2.1: bytes=56 Sequence=4 ttl=254 time=20 ms
    Reply from 100.2.2.1: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 100.2.2.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/40/70 ms
[AR1]int Tunnel 0/0/0
[AR1-Tunnel0/0/0]ip add 192.168.3.1 24
[AR1-Tunnel0/0/0]tunnel	
[AR1-Tunnel0/0/0]tunnel-protocol gre
[AR1-Tunnel0/0/0]sou	
[AR1-Tunnel0/0/0]source 100.1.1.1
[AR1-Tunnel0/0/0]des	
[AR1-Tunnel0/0/0]description 100.2.2.1
[AR1]rip 1
[AR1-rip-1]version 2
[AR1-rip-1]network 192.168.1.0
[AR1-rip-1]undo summary
[AR1-rip-1]network 192.168.3.0
[AR1]ospf router-id 1.1.1.1
[AR1-ospf-1]a 0 
[AR1-ospf-1-area-0.0.0.0]ne	
[AR1-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]q
AR2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]int g 0/0/0 
[AR2-GigabitEthernet0/0/0]ip add 100.1.1.2 24
[AR2-GigabitEthernet0/0/0]int g 0/0/1
[AR2-GigabitEthernet0/0/1]ip add 100.2.2.2 24
AR3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR3
[AR3]int g 0/0/0
[AR3-GigabitEthernet0/0/0]ip add 100.2.2.1 24
[AR3-GigabitEthernet0/0/0]int g 0/0/1
[AR3-GigabitEthernet0/0/1]ip add 192.168.2.1 24
[AR3]dis ip int brief 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              100.2.2.1/24         up         up        
GigabitEthernet0/0/1              192.168.2.1/24       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
NULL0                             unassigned           up         up(s)    
[AR3]ip route-static 100.1.1.0 24 100.2.2.2
[AR3]int Tunnel 0/0/0
[AR3-Tunnel0/0/0]ip add 192.168.3.1 24
[AR3-Tunnel0/0/0]tunnel	
[AR3-Tunnel0/0/0]tunnel-protocol gre
[AR3-Tunnel0/0/0]sou	
[AR3-Tunnel0/0/0]source 100.2.2.1
[AR3-Tunnel0/0/0]des	
[AR3-Tunnel0/0/0]description 100.1.1.1
[AR3]rip 1
[AR3-rip-1]undo summary
[AR3-rip-1]network 192.168.3.0
[AR3-rip-1]network 192.168.2.0
[AR3]undo rip 1
[AR3]ospf router-id 3.3.3.3
[AR3-ospf-1]a 0
[AR3-ospf-1-area-0.0.0.0]ne	
[AR3-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]q
[AR3-ospf-1] q
五.实验结果

        在RIPV2,OSPF,静态路由的配置下,中间有AR2隔开广播域,却可以通过GREVPN交换路由信息,实现点到点的安全通信

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值