组网及说明
配置步骤
需求:总部与分支之间可以互访;分支之间不访问。
PE-1、PE-2之间访问通过GRE隧道;PE-1、PE-3之间访问通过GRE over GRE隧道(不仅在公网实现数据封装,在私网也实现数据封装),
即PE-1访问PE-3时,PE-1到PE-2之间的流量是双层GRE。
PE-1:
#
sysname PE-1
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0
ip address 10.1.1.1 255.255.255.252
#
interface GigabitEthernet0/1
ip address 192.168.1.1 255.255.255.0
#
interface Tunnel0 mode gre
ip address 172.16.1.1 255.255.255.252
source 10.1.1.1
destination 10.1.1.2
#
interface Tunnel1 mode gre
ip address 172.17.1.1 255.255.255.252
source 1.1.1.1
destination 2.2.2.2
#
PE-2:
#
sysname PE-2
#
interface GigabitEthernet0/0
ip address 10.1.1.2 255.255.255.252
#
interface GigabitEthernet0/1
ip address 10.1.2.2 255.255.255.252
#
interface GigabitEthernet0/2
ip address 192.168.2.1 255.255.255.0
#
interface Tunnel0 mode gre
ip address 172.16.1.2 255.255.255.252
source 10.1.1.2
destination 10.1.1.1
#
ip route-static 1.1.1.1 32 Tunnel0
ip route-static 2.2.2.2 32 10.1.2.1
ip route-static 192.168.1.0 24 Tunnel0
#
PE-3:
#
version 7.1.064, Release 0821P11
#
sysname PE-3
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface GigabitEthernet0/0
ip address 10.1.2.1 255.255.255.252
#
interface GigabitEthernet0/1
ip address 192.168.3.1 255.255.255.0
#
interface Tunnel0 mode gre
ip address 172.17.1.2 255.255.255.252
source 2.2.2.2
destination 1.1.1.1
#
ip route-static 1.1.1.1 32 10.1.2.2
ip route-static 192.168.1.0 24 Tunnel0
#
测试:
<ZongBu>ping 192.168.3.2
Ping 192.168.3.2 (192.168.3.2): 56 data bytes, press CTRL+C to break
56 bytes from 192.168.3.2: icmp_seq=0 ttl=253 time=4.000 ms
56 bytes from 192.168.3.2: icmp_seq=1 ttl=253 time=2.000 ms
配置关键点
GRE Tunnel两端的源IP地址和目的IP地址要对应。
本文由 @弱电KK 发布于弱电智能网 。
题图来自Unsplash,基于CC0协议
内容观点仅代表作者本人,弱电智能网平台仅提供信息存储空间服务。
如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
文章名称:《H3C华三路由 GRE over GRE配置》
文章链接:https://www.ruodian360.com/tech/networking/9471.html
添加微信ydian188免费入群,记得备注“弱电智能网”。