GRE VPN——配置实验

1,按照图示配置IP地址

r1:

r2:

r3:

2,在R1和R3配置默认路由使公网区域互通

R1ip route-static 0.0.0.0 0 100.1.1.2

R3]ip route-static 0.0.0.0 0 100.2.2.2

3,在R1和R3上配置GRE VPN,使两端私网能够互相访问,Tunnel口IP地址如图,隧道双up:

复制代码
[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

[R3-Tunnel0/0/0]tunnel-protocol gre 
[R3-Tunnel0/0/0]source 100.2.2.3
[R3-Tunnel0/0/0]destination 100.1.1.1

<R1>ping -a 192.168.3.1 192.168.3.3
  PING 192.168.3.3: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 192.168.3.3: bytes=56 Sequence=2 ttl=255 time=40 ms
    Reply from 192.168.3.3: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 192.168.3.3: bytes=56 Sequence=4 ttl=255 time=30 ms
    Reply from 192.168.3.3: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.3.3 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/30/40 ms

4,在R1和R3上配置RIPV2来传递两端私网路由

R1ip route-static 192.168.2.0 24 192.168.3.3

R3ip route-static 192.168.1.0 24 192.168.3.1

复制代码
<R3>ping 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Request time out
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=127 time=20 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=127 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=127 time=30 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=127 time=20 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    4 packet(s) received
    20.00% packet loss
    round-trip min/avg/max = 20/25/30 ms
相关推荐
倔强的石头1062 分钟前
【Linux指南】Linux快捷键与系统实用技巧
linux·运维·服务器
番茄地瓜4 分钟前
Linux 配置静态 IP 步骤
linux·运维·服务器
liulilittle8 分钟前
论 Linux 内核态全局稳态带宽的卡尔曼估计与工程实现
linux·服务器·网络·c++·计算机网络·tcp·通信
pusheng202514 分钟前
IFSJ全英文专访:中国创新力量重塑先进气体感知技术,赋能全球关键基础设施安全
前端·网络·人工智能·物联网·安全
Irissgwe1 小时前
五、应用层协议HTTP
linux·网络·网络协议·http·状态码·url
.千余1 小时前
【Linux】 传输层协议UDP:从端口号到传输机制
linux·运维·udp
囚~徒~2 小时前
轻量化的虚拟机
linux·运维·服务器
SteveSenna2 小时前
Ubuntu 20.04 安装 Isaac Sim 4.5 + Isaac Lab
linux·运维·服务器
开开心心就好2 小时前
支持多显示器的Windows高效分屏工具
运维·python·科技·游戏·计算机外设·ocr·powerpoint
lizhihai_993 小时前
股市学习心得-A股服务器/算力服务器龙头
大数据·运维·服务器·人工智能·科技·学习