天天看點

華為防火牆單臂路由配置

今天給大家帶來華為USG6600系列防火牆的配置文章。本文主要内容是使用防火牆作為單臂路由實作VLAN的網關功能,進而實作網絡互通。

一、實驗要求及拓撲

華為防火牆單臂路由配置

實驗拓撲如上所示,現在要求配置FW的路由功能,按照圖中要求配置單臂路由,實作PC1和PC2之間互通。

二、實驗配置

(一)子接口相關配置

在防火牆上配置單臂路由,隻需要指名接口的VLAN,以及子接口的IP位址即可,相關配置如下所示:

interface GigabitEthernet1/0/1.10
 vlan-type dot1q 10
 ip address 192.168.10.254 255.255.255.0
#
interface GigabitEthernet1/0/1.20
 vlan-type dot1q 20
 ip address 192.168.20.254 255.255.255.0
           

(二)區域和安全政策相關配置

與路由器不同,要配置防火牆的相關功能,就必須将指定接口劃分到指定的域後該接口才可以正常使用。在本執行個體中,不僅與交換機直連的實體接口要劃分到域中,虛拟的單臂路由子接口也要劃分到域中。此外,還需要配置相應的安全政策。相關配置如下所示:

security-policy
 default action permit
firewall zone trust
 set priority 85
 add interface GigabitEthernet1/0/1
 add interface GigabitEthernet1/0/1.10
 add interface GigabitEthernet1/0/1.20
           

三、實驗效果

配置完成後,PC1和PC2之間可以實作互通,實驗效果如下:

華為防火牆單臂路由配置

四、附錄——FW1代碼

FW1相關代碼附錄如下:

interface GigabitEthernet1/0/1
 undo shutdown
#
security-policy
 default action permit
#
interface GigabitEthernet1/0/1.10
 vlan-type dot1q 10
 ip address 192.168.10.254 255.255.255.0
#
interface GigabitEthernet1/0/1.20
 vlan-type dot1q 20
 ip address 192.168.20.254 255.255.255.0
firewall zone trust
 set priority 85
 add interface GigabitEthernet0/0/0
 add interface GigabitEthernet1/0/1
 add interface GigabitEthernet1/0/1.10
 add interface GigabitEthernet1/0/1.20
           

原創不易,轉載請說明出處:https://blog.csdn.net/weixin_40228200/article/details/119065690

繼續閱讀