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

相关推荐

最近更新

  1. TCP协议是安全的吗?

    2024-03-29 09:00:06       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-29 09:00:06       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-29 09:00:06       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-29 09:00:06       18 阅读

热门阅读

  1. 如何查看自己服务器的SSL证书?

    2024-03-29 09:00:06       20 阅读
  2. Vue.js:构建高效且灵活的Web应用的利器

    2024-03-29 09:00:06       18 阅读
  3. 显示器分辨率

    2024-03-29 09:00:06       20 阅读
  4. 「PHP系列」PHP echo/print语句、数据类型详解

    2024-03-29 09:00:06       22 阅读
  5. 配置SSH后 GitHub无法使用了

    2024-03-29 09:00:06       18 阅读
  6. 详解IOS的Automatically Sign在设备上打包

    2024-03-29 09:00:06       18 阅读
  7. Flink集群启动脚本分析

    2024-03-29 09:00:06       16 阅读
  8. HTML文本信息

    2024-03-29 09:00:06       14 阅读