GRE VPN——配置实验

1,按照图示配置IP地址

r1:

r2:

r3:

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

[R1]ip 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来传递两端私网路由

[R1]ip route-static 192.168.2.0 24 192.168.3.3

[R3]ip 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
相关推荐
likfishdn3 分钟前
Linux的文件与目录管理
linux·运维·服务器
渲染101专业云渲染5 分钟前
川翔云电脑优势总结
服务器·3d·电脑·blender·maya
chian-ocean23 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=25 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
橘子味的茶二34 分钟前
高级系统架构师--第十章:计算机网络
服务器·计算机网络·系统架构
一只小姜丝3321 小时前
解决各大浏览器中http地址无权限调用麦克风摄像头问题
网络·vue.js·网络协议·http
紫菜(Nori)1 小时前
短连接服务器压测-wrk
服务器·压力测试
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos
北京耐用通信1 小时前
航空装配自动化神器Ethercat转profient网关搭配机器人精准控制
运维·机器人·自动化