华为模拟器GRE 实验

该配置案例展示了如何在FW1和FW2之间建立GRE隧道,实现192.168.1.0/24网络与10.0.0.0/24网络之间的通信。FW1配置包括设置内外网接口、GRE隧道、路由和安全策略;R1作为GRE隧道另一端的设备,配置了相关接口;FW2同样配置了GRE隧道、接口和路由,以实现两端的互通。安全策略设置为全放行,便于实验环境下的通信。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

GRE 通用路由封装协议

IP协议号 47

FW1配置

#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 10.0.0.254 255.255.255.0
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 1.1.1.1 255.255.255.0
 service-manage ping permit
#
#
interface Tunnel1 					//配置GRE隧道 tunnel 1 
 ip address 172.16.1.1 255.255.255.0			//添加隧道源地址
 tunnel-protocol gre					//隧道类型为GRE
 source 1.1.1.1					//源接口地址
 destination 2.2.2.2					//目的接口地址
#
firewall zone trust
 add interface GigabitEthernet1/0/0			//将内网接口加入trust区域
#
firewall zone untrust				//将外网和隧道接口加入untrust区域
 add interface GigabitEthernet1/0/1
 add interface Tunnel1
#
ip route-static 2.2.2.2 255.255.255.255 1.1.1.254		//指向防火墙2的路由
ip route-static 192.168.1.0 255.255.255.0 Tunnel1		//将目的地址为192.168.1.0 24位地址封装在tunnel隧道内
#
#
security-policy					//实验环境下安全策略全放行
 default action permit
#

R1配置(仅仅只有接口配置)

#
interface GigabitEthernet0/0/0
 ip address 2.2.2.254 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 1.1.1.254 255.255.255.0 
#

FW2配置

#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 192.168.1.254 255.255.255.0
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 2.2.2.2 255.255.255.0
 service-manage ping permit
#
#
interface Tunnel1 					//配置GRE隧道 tunnel 1 
 ip address 172.16.1.2 255.255.255.0			//添加隧道源地址
 tunnel-protocol gre					//隧道类型为GRE
 source 2.2.2.2					//源接口地址
 destination 1.1.1.1					//目的接口地址
#
#
ip route-static 1.1.1.1 255.255.255.255 2.2.2.254    //指向防火墙1的路由
ip route-static 10.0.0.0 255.255.255.0 Tunnel1    //将目的地址为10.0.0.0 24位地址封装在tunnel隧道内
#
#
security-policy					//实验环境下安全策略全放行
 default action permit
#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

li工

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

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

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

打赏作者

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

抵扣说明:

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

余额充值