GRE实验报告

实验要求

在R2和R3上配置GRE,在公网上建立一条数据通道,使用这条数据通道进行数据传输。

实验预览图

实验分析

先对R2、R3、R1配置端口IP,在R2、R3分别配置环回0、配置缺省指向运营商ISP、创建隧道接口并进行配置,最后将隧道接口的路由补上。

实验过程:

在R2上配置:

配置端口ip:

[r2]int GigabitEthernet 0/0/0

[r2-GigabitEthernet0/0/0]ip address 12.0.0.1 24

配置环回0:

[r2-LoopBack0]ip address 192.168.1.1 24

添加缺省路由指向ISP:

[r2]ip route-static 0.0.0.0 0 12.0.0.2

配置隧道接口:

[r2]interface Tunnel 0/0/0

[r2-Tunnel0/0/0]ip address 192.168.3.1 24---配置接口ip

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

[r2-Tunnel0/0/0]source 12.0.0.1----定义封装内容

[r2-Tunnel0/0/0]destination 23.0.0.2

补充路由信息:

[r2]ip route-static 192.168.2.0 24 192.168.3.2

在R1上配置:

配置端口ip:

[r1]interface GigabitEthernet 0/0/0

[r1-GigabitEthernet0/0/0]ip address 12.0.0.2 24

配置端口ip:

[r1]interface GigabitEthernet 0/0/1

[r1-GigabitEthernet0/0/1]ip address 23.0.0.1 24

在R3上配置:

配置端口ip:

[r3]interface GigabitEthernet 0/0/0

[r3-GigabitEthernet0/0/0]ip address 23.0.0.2 24

配置环回0:

[r3-LoopBack0]ip address 192.168.2.1 24

添加缺省路由指向ISP:

[r3]ip route-static 0.0.0.0 0 23.0.0.1

配置隧道接口:

[r3]interface Tunnel 0/0/0

[r3-Tunnel0/0/0]ip address 192.168.3.2 24---配置接口ip

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

[r3-Tunnel0/0/0]source 23.0.0.2----定义封装内容

[r3-Tunnel0/0/0]destination 12.0.0.1

补充路由信息:

[r3]ip route-static 192.168.1.0 24 192.168.3.1

实验结果:

R2:

抓包:

R3:

抓包: 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Rinleren

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值