小乔 发表于 2017-8-3 10:46:53

华为大型园区出口综合案例(防火墙旁路)

1.1 配置注意事项l   本举例中的交换机以华为公司的S系列框式交换机为例、防火墙以USG系列为例、路由器以NE系列为例。
l   本配置案例仅涉及企业网络出口相关配置,涉及企业内网的相关配置请参见华为S系列园区交换机快速配置中的“大型园区组网场景”。
l   本例仅涉及防火墙与交换机的对接配置以及防火墙的双机热备配置。防火墙上的安全业务规划及园区安全策略、攻击防范、带宽管理、IPSec等功能的配置示例请参见《防火墙配置案例集》。
l   本例仅涉及园区出口路由器与交换机的对接配置。路由器在公网侧的配置示例请参见NE系列路由器《配置指南》。
1.2 组网需求在大型园区出口,核心交换机上行通过路由器访问外网。防火墙旁挂于核心交换机,对业务流量提供安全过滤功能。
为了简化网络并提高可靠性,在核心层交换机通常部署集群。在防火墙上部署双机热备(主备模式),当其中一台故障时,业务可以平滑切换到另一台。核心交换机双归接入2台出口路由器,路由器之间部署VRRP确保可靠性。
为提高链路可靠性,在核心交换机与出口路由器之间,核心交换机与防火墙之间,2台防火墙之间均通过Eth-Trunk互连。
如下图所示。图1-1 园区出口组网图(防火墙旁挂,双机热备)
http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/15/560a3a53e94e3.png 在一般的三层转发环境下,园区内外部之间的流量将直接通过交换机转发,不会经过FW1或FW2。当流量需要从交换机转发至FW,经FW检测后再转发回交换机,就需要在交换机上配置VRF功能,将交换机隔离成两个相互独立的虚拟交换机VRF-A和根交换机Public。
Public作为连接出口路由器的交换机。对于下行流量,它将外网进来的流量转发给FW进行检测;对于上行流量,它接收经FW检测后的流量,并转发到路由器。
VRF-A作为连接内网侧的交换机。对于下行流量,它接收经FW检测后的流量,并转发到内网;对于上行流量,它将内网的流量转发到FW去检测。
根据上图中的流量转发路径可以将上图转换成如下所示的更容易理解的逻辑组网图。图1-2 交换机与路由器、防火墙之间物理接口连接示意图
http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/15/560a3a6441314.png 本例所示核心交换机工作在三层模式,上图所示的逻辑组网图可以理解为防火墙上下行连接三层交换机的双机热备组网。这种组网的特点是需要在防火墙的上下行业务接口上部署VRRP备份组,如下所示。图1-3 交换机与路由器、防火墙之间三层口连接示意图
http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/15/560a3a6e78a81.png 如上图所示,内部用户访问外网的流量转发路径如下(上图中蓝色路径):1.       当内部用户访问外网的流量到达VRF-A时,流量根据VRF-A上的静态路由(下一跳设置为防火墙下行VRRP的虚拟IP地址)被转发到防火墙。
2.       防火墙完成对流量的安全检测后,会根据静态路由(下一跳设置为CSS的VLANIF20)将流量转发到Public上。
3.       最后,Public通过到路由器的静态路由(下一跳设置为路由器VRRP的虚拟IP地址)将流量转发到路由器。
外部用户访问内网的流量转发路径如下(上图中红色路径):1.       当外部用户访问内网的流量到路由器时,流量根据OSPF路由表被转发到Public上。
2.       流量到达Public后,先根据Public上的静态路由(下一跳设置为防火墙上行VRRP的虚拟IP地址)被转发到防火墙。
3.       防火墙完成对流量的安全检测后,会根据静态路由(下一跳设置为CSS的VLANIF30)将流量转发到VRF-A上。
4.       VRF-A通过OSPF路由表将流量转发汇聚交换机,最后由汇聚交换机将流量转发到业务网络。

1.3 数据规划表1-1 链路聚合接口规划http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2016/0203/13/56b1945324b17.PNG

1.4 配置思路采用如下思路配置园区出口举例:1.       配置核心交换机集群CSS。
2.       配置交换机与防火墙、路由器之间的接口及IP地址。为提高链路可靠性,在交换机与防火墙、交换机与路由器之间配置跨框Eth-Trunk接口。在防火墙的接口上配置安全区域。
3.       在出口路由器上部署VRRP。为了保证核心交换机与两个出口路由器之间的可靠性,在两个出口路由器之间部署VRRP,VRRP的心跳报文经过核心交换机进行交互。Router1为Master设备,Router2为Backup设备。
4.       部署路由。交换机上配置VRF功能,将交换机隔离成两个相互独立的虚拟交换机VRF-A和根交换机Public,以隔离业务网段路由与公网路由。为了引导各设备的上行流量,在核心交换机上配置一条缺省路由,下一跳指向出口路由器VRRP的虚地址。为了引导园区两个出口路由器的回程流量,在两个出口路由器和核心交换机之间部署OSPF,核心交换机上将所有用户网段发布到OSPF里面,通告给两个出口路由器。为了将业务网络的上行流量引导至防火墙,在交换机上配置一条缺省路由,下一跳指向防火墙VRRP VRID2的虚拟IP。为了将到业务网络1的下行流量引导至防火墙,在交换机上配置一条缺省路由,下一跳指向防火墙VRRP VRID1的虚拟IP。为了将到业务网络2的下行流量引导至防火墙,在交换机上配置一条缺省路由,下一跳指向防火墙VRRP VRID1的虚拟IP。为了将业务网络的上行流量引导至交换机,在防火墙上配置一条缺省路由,下一跳指向交换机VLANIF20的IP地址。为了将到业务网络1的下行流量引导至交换机,在防火墙上配置一条缺省路由,下一跳指向交换机VLANIF30的IP地址。为了将到业务网络2的下行流量引导至交换机,在防火墙上配置一条缺省路由,下一跳指向交换机VLANIF30的IP地址。
5.       配置防火墙双机热备。
1.5 操作步骤                           步骤 1   交换机:配置交换机集群。1.       连接集群卡的线缆。下图以S12700交换机的EH1D2VS08000集群卡连线为例。本例连线示意图中,S12700主控板、交换网板和集群卡都是满配的情况。实际使用时,S12700每框至少配置一块主控板和一块交换网板即可。推荐每框配置两块交换网板并插上两块集群卡。图1-1 集群卡连线示意图
http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/15/560a3aa2dc3d8.png http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/14/560a32d5e9d92.jpgl两框之间至少要连接一根集群线缆。l一块集群卡只能与对框一块集群卡相连,不能连接到多块集群卡,且不能与本框集群卡相连。l集群卡上组1的任意接口只能与对框集群卡上组1的任意接口相连,组2的要求同组1。l每块集群卡上连接集群线缆的数量相同(如果不相同会影响总的集群带宽),且两端按照接口编号的顺序对接。2.       在Switch 1上配置集群。# 集群连接方式为集群卡(缺省值,不需配置)。集群ID采用缺省值1(不需配置)。优先级为100。<HUAWEI> system-view
set css mode css-card//设备缺省值,不需再执行命令配置,此步骤仅用作示范命令。
set css id 1//设备缺省值,不需再执行命令配置,此步骤仅用作示范命令。
set css priority 100//集群优先级缺省为1,修改主交换机的优先级大于备交换机
css enable
Warning: The CSS configuration takes effect only after the system is rebooted. The next CSS mode is CSS-card. Reboot now? :y//重启交换机

3.       在Switch 2上配置集群。集群连接方式为集群卡(缺省值,不需配置)。集群ID为2。优先级采用缺省值1(不需配置)。<HUAWEI> system-view
set css id 2//集群ID缺省为1,修改备交换机的ID为2
css enable
Warning: The CSS configuration takes effect only after the system is rebooted. The next CSS mode is CSS-card. Reboot now? :y//重启交换机

4.       交换机完成重启后,查看集群状态。−          在集群系统的主交换机Switch 1上,主用主控板上的CSS MASTER灯绿色常亮。(图1)−          Switch 1的两块主控板上编号为1的CSS ID灯绿色常亮,Switch 2的两块主控板上编号为2的CSS ID灯绿色常亮。(图1)−          集群卡上有集群线缆连接的端口LINK/ALM灯绿色常亮。(图2)−          主框上所有集群卡的MASTER灯绿色常亮,备框上所有集群卡的MASTER灯常灭。(图2)图1-2 CSS系统指示灯示意图
http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/15/560a3aaf9cf69.png http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/14/560a32d5e9d92.jpgl集群建立后,后续交换机的配置都在主交换机(Switch 1)上进行,数据会自动同步到备交换机(Switch 2)。l在集群系统中,接口编号会变为4维,例如,10GE1/4/0/0。其中左边第一位表示集群ID。                           步骤 2   配置CSS与FW、路由器之间的跨框Eth-Trunk口,CSS上的VLANIF口以及IP地址。1.       配置交换机与路由器之间的跨框Eth-Trunk,VLANIF以及IP地址。# 在CSS上创建Eth-Trunk1,用于连接Router1,并加入Eth-Trunk成员接口。<HUAWEI> system-view
sysname CSS//给集群系统重新命名。
interface Eth-Trunk 1
quit
interface XGigabitethernet 1/4/0/0//在Eth-Trunk1中加入主交换机上的成员接口
Eth-Trunk 1
quit
interface XGigabitethernet 2/4/0/0//在Eth-Trunk1中加入备交换机上的成员接口
Eth-Trunk 1
quit


# 在CSS上创建Eth-Trunk2,用于连接Router2,并加入Eth-Trunk成员接口。 interface Eth-Trunk 2
quit
interface XGigabitethernet 1/4/0/1//在Eth-Trunk2中加入主交换机上的成员接口
Eth-Trunk 2
quit
interface XGigabitethernet 2/4/0/1//在Eth-Trunk2中加入备交换机上的成员接口
Eth-Trunk 2
quit


# 创建VLANIF,并配置IP地址。 vlan batch 10
interface Eth-Trunk 1//将Eth-Trunk1加入VLAN10
port link-type trunk
port trunk allow-pass vlan 10
quit
interface Eth-Trunk 2//将Eth-Trunk2加入VLAN10
port link-type trunk
port trunk allow-pass vlan 10
quit
interface Vlanif 10//创建VLANIF10,用于CSS与Router1、Router2通信
ip address 10.10.4.1 24
quit

2.       配置交换机与FW之间的跨框Eth-Trunk,CSS上的VLANIF口以及IP地址。# 在CSS上创建Eth-Trunk4,用于将Pubilc与FW1连接,并加入Eth-Trunk成员接口。 interface Eth-Trunk 4
quit
interface Gigabitethernet 1/1/0/7//在Eth-Trunk4中加入主交换机上的成员接口
Eth-Trunk 4
quit
interface Gigabitethernet 2/1/0/7//在Eth-Trunk4中加入备交换机上的成员接口
Eth-Trunk 4
quit


# 在CSS上创建Eth-Trunk5,用于将VRF-A与FW1连接,并加入Eth-Trunk成员接口。 interface Eth-Trunk 5
quit
interface Gigabitethernet 1/1/0/8//在Eth-Trunk5中加入主交换机上的成员接口
Eth-Trunk 5
quit
interface Gigabitethernet 2/1/0/8//在Eth-Trunk5中加入备交换机上的成员接口
Eth-Trunk 5
quit


# 在CSS上创建Eth-Trunk6,用于将Pubilc与FW2连接,并加入Eth-Trunk成员接口。 interface Eth-Trunk 6
quit
interface Gigabitethernet 1/2/0/7//在Eth-Trunk6中加入主交换机上的成员接口
Eth-Trunk 6
quit
interface Gigabitethernet 2/2/0/7//在Eth-Trunk6中加入备交换机上的成员接口
Eth-Trunk 6
quit


# 在CSS上创建Eth-Trunk7,用于将VRF-A与FW2连接,并加入Eth-Trunk成员接口。 interface Eth-Trunk 7
quit
interface Gigabitethernet 1/2/0/8//在Eth-Trunk7中加入主交换机上的成员接口
Eth-Trunk 7
quit
interface Gigabitethernet 2/2/0/8//在Eth-Trunk7中加入备交换机上的成员接口
Eth-Trunk 7
quit


# 创建VLANIF,并配置IP地址。 vlan batch 20 30
interface Eth-Trunk 4//将Eth-Trunk4加入VLAN20
port link-type trunk
port trunk allow-pass vlan 20
quit
interface Eth-Trunk 6//将Eth-Trunk6加入VLAN20
port link-type trunk
port trunk allow-pass vlan 20
quit
interface Vlanif 20//创建VLANIF20,用于CSS的Public连接FW1、FW2
ip address 10.10.2.1 24
quit
interface Eth-Trunk 5//将Eth-Trunk5加入VLAN30
port link-type trunk
port trunk allow-pass vlan 30
quit
interface Eth-Trunk 7//将Eth-Trunk7加入VLAN30
port link-type trunk
port trunk allow-pass vlan 30
quit
interface Vlanif 30//创建VLANIF30,用于CSS的VRF-A连接FW1、FW2
ip address 10.10.3.1 24
quit

3.       配置交换机与业务网络之间的跨框Eth-Trunk,VLANIF以及IP地址。# 在CSS上创建Eth-Trunk8,用于连接业务网络1,并加入Eth-Trunk成员接口。 interface Eth-Trunk 8
quit
interface Gigabitethernet 1/3/0/1//在Eth-Trunk8中加入主交换机上的成员接口
Eth-Trunk 8
quit
interface Gigabitethernet 2/3/0/1//在Eth-Trunk8中加入备交换机上的成员接口
Eth-Trunk 8
quit


# 在CSS上创建Eth-Trunk9,用于连接业务网络2,并加入Eth-Trunk成员接口。 interface Eth-Trunk 9
quit
interface Gigabitethernet 1/3/0/2//在Eth-Trunk9中加入主交换机上的成员接口
Eth-Trunk 9
quit
interface Gigabitethernet 2/3/0/2//在Eth-Trunk9中加入备交换机上的成员接口
Eth-Trunk 9
quit

# 创建VLANIF,并配置IP地址。 vlan batch 100 200
interface Eth-Trunk 8//将Eth-Trunk8加入VLAN100
port link-type trunk
port trunk allow-pass vlan 100
quit
interface Vlanif 100//创建VLANIF100,用于CSS连接业务网络1
ip address 10.10.100.1 24
quit
interface Eth-Trunk 9//将Eth-Trunk9加入VLAN200
port link-type trunk
port trunk allow-pass vlan 200
quit
interface Vlanif 200//创建VLANIF200,用于CSS连接业务网络2
ip address 10.10.200.1 24
quit

                           步骤 3   路由器:配置路由器与CSS之间的接口# 配置Router1,在Router1上创建Eth-Trunk1,并加入成员接口。<Huawei> system-view
sysname Router1
interface Eth-Trunk 1   
quit
interface XGigabitethernet 1/0/1   
undo shutdown
Eth-Trunk 1
quit
interface XGigabitethernet 1/0/2   
undo shutdown
Eth-Trunk 1
quit

# 配置Dot1q终结子接口,终结VLAN10。并配置IP地址。 interface Eth-Trunk 1.100
ip address 10.10.4.2 24
dot1q termination vid 10
quit

# Router2上的配置步骤与Router1相同,仅接口IP地址有差别,请参照Router1完成Router2的配置。                           步骤 4   防火墙:配置防火墙的接口与安全区# 配置FW1的接口与安全区。<USG> system-view
sysname FW1
interface Eth-Trunk 4//配置与CSS连接的接口及IP地址
ip address 10.10.2.2 24
quit
interface Gigabitethernet 1/0/0//在Eth-Trunk4中加入成员接口
Eth-Trunk 4
quit
interface Gigabitethernet 1/0/1//在Eth-Trunk4中加入成员接口
Eth-Trunk 4
quit

interface Eth-Trunk 5//配置与CSS连接的接口及IP地址
ip address 10.10.3.2 24
quit
interface Gigabitethernet 1/1/0//在Eth-Trunk5中加入成员接口
Eth-Trunk 5
quit
interface Gigabitethernet 1/1/1//在Eth-Trunk5中加入成员接口
Eth-Trunk 5
quit

interface Eth-Trunk 1//配置FW1与FW2连接的接口
ip address 10.1.1.1 24
quit
interface Gigabitethernet 2/0/0//在Eth-Trunk1中加入成员接口
Eth-Trunk 1
quit
interface Gigabitethernet 2/0/1//在Eth-Trunk1中加入成员接口
Eth-Trunk 1
quit

firewall zone trust
add interface Eth-Trunk 5//将连接内网的Eth-Trunk5加入安全区域
quit
firewall zone untrust
add interface Eth-Trunk 4//将连接外网的Eth-Trunk4加入非安全区域
quit
firewall zone dmz
add interface Eth-Trunk 1//将FW1、FW2之间的接口加入DMZ区域
quit

# 配置FW2的接口与安全区。<USG> system-view
sysname FW2
interface Eth-Trunk 6//配置与CSS连接的接口及IP地址
ip address 10.10.2.3 24
quit
interface Gigabitethernet 1/0/0//在Eth-Trunk6中加入成员接口
Eth-Trunk 6
quit
interface Gigabitethernet 1/0/1//在Eth-Trunk6中加入成员接口
Eth-Trunk 6
quit

interface Eth-Trunk 7//配置与CSS连接的接口及IP地址
ip address 10.10.3.3 24
quit
interface Gigabitethernet 1/1/0//在Eth-Trunk7中加入成员接口
Eth-Trunk 7
quit
interface Gigabitethernet 1/1/1//在Eth-Trunk7中加入成员接口
Eth-Trunk 7
quit

interface Eth-Trunk 1//配置FW2与FW1连接的接口
ip address 10.1.1.2 24
quit
interface Gigabitethernet 2/0/0//在Eth-Trunk1中加入成员接口
Eth-Trunk 1
quit
interface Gigabitethernet 2/0/1//在Eth-Trunk1中加入成员接口
Eth-Trunk 1
quit

firewall zone trust
add interface Eth-Trunk 7//将连接内网的Eth-Trunk7加入安全区域
quit
firewall zone untrust
add interface Eth-Trunk 6//将连接外网的Eth-Trunk6加入非安全区域
quit
firewall zone dmz
add interface Eth-Trunk 1//将FW1、FW2之间的接口加入DMZ区域
quit

                           步骤 5   路由器:部署VRRP。Router1为VRRP的Master,Router2为VRRP的Backup# 配置Router1。 interface Eth-Trunk 1.100
vrrp vrid 1 virtual-ip 10.10.4.100//配置VRRP的虚拟IP地址
vrrp vrid 1 priority 120//提高Router1的优先级,使其成为Master
quit

# 配置Router2。 interface Eth-Trunk 1.100
vrrp vrid 1 virtual-ip 10.10.4.100//配置VRRP的虚拟IP地址
quit

配置完成后,Router1和Router2之间应该能建立VRRP的主备份关系,执行display vrrp命令可以看到Router1和Router2的VRRP状态。# 查看Router1的VRRP状态为Master。 display vrrp
Eth-Trunk1.100 | Virtual Router 1
    State : Master
    Virtual IP : 10.10.4.100
    Master IP : 10.10.4.2
    PriorityRun : 120
    PriorityConfig : 120
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
    TimerRun : 1 s
    TimerConfig : 1 s
    Auth type : NONE
    Virtual MAC : 0000-5e00-0101
    Check TTL : YES
    Config type : normal-vrrp
    Create time : 2015-05-18 06:53:47 UTC-05:13
    Last change time : 2015-05-18 06:54:14 UTC-05:13# 查看Router2的VRRP状态为Backup。 display vrrp
Eth-Trunk1.100 | Virtual Router 1
    State : Backup
    Virtual IP : 10.10.4.100
    Master IP : 10.10.4.2
    PriorityRun : 100
    PriorityConfig : 100
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
    TimerRun : 1 s
    TimerConfig : 1 s
    Auth type : NONE
    Virtual MAC : 0000-5e00-0101
    Check TTL : YES
    Config type : normal-vrrp
    Create time : 2015-05-18 06:53:52 UTC-05:13
    Last change time : 2015-05-18 06:57:12 UTC-05:13
步骤 6   配置CSS与FW、路由器之间的路由。1.       在交换机与路由器之间部署OSPF。# 在CSS上创建VPN实例Public,将连接路由器的接口和连接防火墙上行口的接口绑定到Public。 ip vpn-instance Public//创建Public
ipv4-family
route-distinguisher 100:2
vpn-target 222:2 both
quit
quit
interface Vlanif 10
ip binding vpn-instance Public//将CSS连接路由器的接口VLANIF10绑定至Public
ip address 10.10.4.1 24   //将接口绑定到Public时,接口上的IP地址会被删除,需要重新配置IP地址。
quit
interface Vlanif 20
ip binding vpn-instance Public//将CSS连接防火墙上行口的接口VLANIF20绑定至Public
ip address 10.10.2.1 24   //将接口绑定到Public时,接口上的IP地址会被删除,需要重新配置IP地址。
quit# 对于上行流量,在Public中配置静态路由,路由下一跳指向路由器VRRP虚拟IP。 ip route-static vpn-instance Public 0.0.0.0 0.0.0.0 10.10.4.100 //Public中的缺省路由,下一跳指向路由器VRRP的虚拟IP# 对于下行流量,在CSS与Router之间运行OSPF协议,用于Router学习到业务网段的回程路由信息。 ospf 100 router-id 1.1.1.1
area 0
network 10.10.100.0 0.0.0.255   //将业务网络1所在网段发布到OSPF中
network 10.10.200.0 0.0.0.255   //将业务网络2所在网段发布到OSPF中
network 10.10.4.0 0.0.0.255   //将连接Router的网段发布到OSPF中
quit
import-route static      //在OSPF中引入静态路由
quit

在两个出口路由器Router1、Router2上部署OSPF。# 配置Router1 ospf 100 router-id 2.2.2.2
area 0
network 10.10.4.0 0.0.0.255   //将连接CSS的网段发布到OSPF中
quit
quit

# 配置Router2 ospf 100 router-id 3.3.3.3
area 0
network 10.10.4.0 0.0.0.255   //将连接CSS的网段发布到OSPF中
quit
quit   

# 配置完成后,CSS、Router1和Router2之间能建立邻居关系。以查看CSS上的OSPF邻居为例,能看到Router1和Router2,并且邻居状态是Full。 display ospf peer
         OSPF Process 100 with Router ID 1.1.1.1
             Neighbors


       Area 0.0.0.0 interface 10.10.4.1(Vlanif10)'s neighbors
       Router ID: 2.2.2.2          Address: 10.10.4.2
         State: FullMode:Nbr isMasterPriority: 1
         DR: 10.10.4.1BDR: 10.10.4.2MTU: 0   
         Dead timer due in 31sec
         Retrans timer interval: 5
         Neighbor is up for 00:13:23      
         Authentication Sequence: [ 0 ]

      Router ID: 3.3.3.3          Address: 10.10.4.3
      State: FullMode:Nbr isMasterPriority: 1
      DR: 10.10.4.1BDR: 10.10.4.2MTU: 0   
       Dead timer due in 37sec
      Retrans timer interval: 5
      Neighbor is up for 00:00:52   
      Authentication Sequence: [ 0 ]

2.       交换机:配置交换机与FW之间的静态路由。# 对于上行流量,在CSS上创建VPN实例VRF-A,将连接业务网络的接口和连接防火墙下行的接口绑定到VRF-A,VRF-A的缺省路由下一跳指向防火墙下行VRRP虚拟IP(VRID2)。 ip vpn-instance VRF-A//创建VRF-A
ipv4-family
route-distinguisher 100:1
vpn-target 111:1 both
quit
quit
interface Vlanif 100
ip binding vpn-instance VRF-A//将CSS连接业务网络1的接口VLANIF100绑定至VRF-A
ip address 10.10.100.1 24   //将接口绑定到VRF-A时,接口上的IP地址会被删除,需要重新配置IP地址。
quit
interface Vlanif 200
ip binding vpn-instance VRF-A//将CSS连接业务网络2的接口VLANIF200绑定至VRF-A
ip address 10.10.200.1 24   //将接口绑定到VRF-A时,接口上的IP地址会被删除,需要重新配置IP地址。
quit
interface Vlanif 30
ip binding vpn-instance VRF-A//将CSS连接防火墙下行的接口VLANIF30绑定至VRF-A
ip address 10.10.3.1 24   //将接口绑定到VRF-A时,接口上的IP地址会被删除,需要重新配置IP地址。
quit# 在VRF-A中的配置缺省路由,下一跳指向防火墙下行VRRP 2的虚拟IP(VRID2)。 ip route-static vpn-instance VRF-A 0.0.0.0 0.0.0.0 10.10.3.5# 在Public中配置静态路由,对于下行流量,路由下一跳指向防火墙上行VRRP 1的虚拟IP(VRID1)。 ip route-static vpn-instance Public 10.10.100.0 255.255.255.0 10.10.2.5   //目的地址是业务网段1的报文,下一跳指向2台FW VRID2的虚拟地址。 ip route-static vpn-instance Public 10.10.200.0 255.255.255.0 10.10.2.5   //目的地址是业务网段2的报文,下一跳指向2台FW VRID2的虚拟地址。3.       防火墙:配置防火墙的静态路由# 在FW1上配置静态路由。 ip route-static 0.0.0.0 0.0.0.0 10.10.2.1//对于上行流量,缺省路由下一跳为交换机的Public接口VLANIF20的IP地址
ip route-static 10.10.100.0 255.255.255.0 10.10.3.1//对于下行流量,目的地址为业务网络1,下一跳为交换机上VRF-A接口VLANIF30的IP地址
ip route-static 10.10.200.0 255.255.255.0 10.10.3.1//对于下行流量,目的地址为业务网络2,下一跳为交换机上VRF-A接口VLANIF30的IP地址

# 在FW2上配置静态路由。 ip route-static 0.0.0.0 0.0.0.0 10.10.2.1//对于上行流量,缺省路由下一跳为交换机的Public接口VLANIF20的IP地址
ip route-static 10.10.100.0 255.255.255.0 10.10.3.1//对于下行流量,目的地址为业务网络1,下一跳为交换机上VRF-A接口VLANIF30的IP地址
ip route-static 10.10.200.0 255.255.255.0 10.10.3.1//对于下行流量,目的地址为业务网络2,下一跳为交换机上VRF-A接口VLANIF30的IP地址# 配置完成后,Router1、Router1和CSS之间应该建立OSPF邻居关系,执行display ospf peer命令可以查看OSPF邻居状态为Full,以CSS为例,OSPF邻居状态如下。4.       检查路由配置结果# 查看CSS上的路由表。 display ip routing-table vpn-instance VRF-A   
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: VRF-A
         Destinations : 7      Routes : 7         

Destination/Mask    Proto   PreCost      Flags NextHop         Interface

      0.0.0.0/0   Static60   0          RD   10.10.3.5       Vlanif30
      10.10.3.0/24Direct0    0         D   10.10.3.1       Vlanif30
      10.10.3.1/32Direct0    0         D   127.0.0.1       Vlanif30
    10.10.100.0/24Direct0    0         D   10.10.100.1   Vlanif100
    10.10.100.1/32Direct0    0         D   127.0.0.1       Vlanif100
    10.10.200.0/24Direct0    0         D   10.10.200.1   Vlanif200
    10.10.200.1/32Direct0    0         D   127.0.0.1       Vlanif200

可以看到在VRF-A的路由表中,第1行表示访问外网流量的下一跳是防火墙VRRP VRID 2的虚拟地址10.10.3.5,说明上行流量被强制转发到防火墙进行检测。 display ip routing-table vpn-instance Public   
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 7      Routes : 7         

Destination/Mask    Proto   PreCost      Flags NextHop         Interface

      0.0.0.0/0   Static60   0          RD   10.10.4.100       Vlanif10
      10.10.2.0/24Direct0    0         D   10.10.2.1       Vlanif20
      10.10.2.1/32Direct0    0         D   127.0.0.1       Vlanif20
      10.10.4.0/24Direct0    0         D   10.10.4.1       Vlanif10
      10.10.4.1/32Direct0    0         D   127.0.0.1       Vlanif10
      10.10.100.0/24Static60   0          RD   10.10.2.5       Vlanif20
      10.10.200.0/24Static60   0          RD   10.10.2.5       Vlanif20可以看到在Public的路由表中,第1行表示访问外网流量的下一跳是路由器VRRP VRID 1的虚拟地址10.10.4.100。第5、6行表示访问业务网络的流量的下一跳是防火墙VRRP VRID 1的虚拟地址10.10.3.5,说明下行流量被强制转发到防火墙进行检测。                           步骤 7   防火墙:配置双机热备# 在FW1上配置双机热备,FW1在备份组中作为master。 interface Eth-Trunk 4
vrrp vrid 1 virtual-ip 10.10.2.5 24 master//在上行接口配置备份组1,并设置状态为master
quit
interface Eth-Trunk 5
vrrp vrid 2 virtual-ip 10.10.3.5 24 master//在下行接口配置备份组2,并设置状态为master
quit
hrp interface Eth-Trunk 1 remote 10.1.1.2//配置心跳口,并启用双机热备
firewall packet-filter default permit interzone local dmz
hrp enable
HRP_M# 在FW2上配置双机热备,FW2在备份组中作为slave。 interface Eth-Trunk 6
vrrp vrid 1 virtual-ip 10.10.2.5 24 slave//在上行接口配置备份组1,并设置状态为slave
quit
interface Eth-Trunk 7
vrrp vrid 2 virtual-ip 10.10.3.5 24 slave //在下行接口配置备份组2,并设置状态为slave
quit
hrp interface Eth-Trunk 1 remote 10.1.1.1//配置心跳口,并启用双机热备
firewall packet-filter default permit interzone local dmz
hrp enable
HRP_M# 查看VRRP状态,FW1为Master,FW2为slave。HRP_M display vrrp
Eth-Trunk4 | Virtual Router 1
   VRRP Group : Master
    State : Master
    Virtual IP : 10.10.2.5
    Virtual MAC : 0000-5e00-0101
    Primary IP : 10.10.2.2
    PriorityRun : 120
    PriorityConfig : 100
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
   Advertisement Timer : 1
    Auth type : NONE
    Check TTL : YES
   
Eth-Trunk5 | Virtual Router 2
   VRRP Group : Master
    State : Master
    Virtual IP : 10.10.3.5
    Virtual MAC : 0000-5e00-0102
    Primary IP : 10.10.3.2
    PriorityRun : 120
    PriorityConfig : 100
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
   Advertisement Timer : 1
    Auth type : NONE
    Check TTL : YES

HRP_M display vrrp
Eth-Trunk7 | Virtual Router 2
   VRRP Group : Slave
    State : Backup
    Virtual IP : 10.10.3.5
    Virtual MAC : 0000-5e00-0102
    Primary IP : 10.10.3.3
    PriorityRun : 100
    PriorityConfig : 100
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
   Advertisement Timer : 1
    Auth type : NONE
    Check TTL : YES
   
Eth-Trunk6 | Virtual Router 1
   VRRP Group : Slave
    State : Backup
    Virtual IP : 10.10.2.5
    Virtual MAC : 0000-5e00-0101
    Primary IP : 10.10.2.3
    PriorityRun : 120
    PriorityConfig : 100
    MasterPriority : 120
    Preempt : YES   Delay Time : 0 s
   Advertisement Timer : 1
    Auth type : NONE
    Check TTL : YES

# 查看双机热备状态。HRP_M display hrp state
The firewall's config state is: MASTER

Current state of virtual routers configured as master:
                     Eth-Trunk4    vrid   1 : master
         (gigabitEthernet1/0/0)             : up   
         (gigabitEthernet1/0/1)             : up   
                     Eth-Trunk5    vrid   2 : master
         (gigabitEthernet1/1/0)             : up   
         (gigabitEthernet1/1/1)             : up

http://support.huawei.com/huaweiconnect/enterprise/data/attachment/forum/dm/ecommunity/uploads/2015/0929/14/560a32d5e9d92.jpg双机热备功能配置完成后,主用设备的配置和会话会自动备份到备用设备上,因此以下功能只需在主用防火墙FW1上配置即可。                           步骤 8   防火墙:配置安全策略本例仅涉及防火墙与交换机的对接配置以及防火墙的双机热备配置。防火墙上的安全业务规划及园区安全策略、攻击防范、带宽管理、IPSec等功能的配置示例请参见《防火墙配置案例集》。                           步骤 9   检查配置结果完成上述配置后,检查CSS与Router是否能相互Ping通。# 以CSS Ping Router1 的Eth-Trunk1.100为例,检查上行通路是否连通。<CSS> ping 10.10.4.2

Ping 10.10.4.2: 32 data bytes, Press Ctrl_C to break
    Reply From 10.10.4.2: bytes=32 seq=1 ttl=126 time=140 ms
    Reply From 10.10.4.2: bytes=32 seq=2 ttl=126 time=235 ms
    Reply From 10.10.4.2: bytes=32 seq=3 ttl=126 time=266 ms
    Reply From 10.10.4.2: bytes=32 seq=4 ttl=126 time=140 ms
    Reply From 10.10.4.2: bytes=32 seq=5 ttl=126 time=141 ms

--- 10.10.200.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 140/184/266 ms可以看到,CSS和Router1之间上行链路是可以互通的。# 以Router1 Ping CSS内网侧VRF-A的接口VLANIF100为例,检查下行通路是否连通。<Router1> Ping 10.10.100.1

Ping 10.10.100.1: 32 data bytes, Press Ctrl_C to break
    Reply From 10.10.100.1: bytes=32 seq=1 ttl=253 time=235 ms
    Reply From 10.10.100.1: bytes=32 seq=2 ttl=253 time=109 ms
    Reply From 10.10.100.1: bytes=32 seq=3 ttl=253 time=79 ms
    Reply From 10.10.100.1: bytes=32 seq=4 ttl=253 time=63 ms
    Reply From 10.10.100.1: bytes=32 seq=5 ttl=253 time=63 ms

--- 202.10.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 63/109/235 ms可以看到,Router1和CSS的VLANIF100之间下行链路是可以互通的。。

hongsupeng 发表于 2017-8-3 11:06:07

{:6_267:}

neg0tive 发表于 2017-8-12 21:22:40

学习

wzyi123 发表于 2017-8-29 14:57:52

eth是trunk口的从内侧的eth5能传到 防火墙吗数据

qq455890384 发表于 2017-9-1 17:14:08

6666666666666666666666感谢

伤不伤 发表于 2018-1-21 14:43:28

学习学习

坚持Persist 发表于 2020-2-20 16:15:01

学习了

DJH001 发表于 2021-9-30 12:49:05

大师,为什么路由器上的接口要用1.100 子接口? 是为了方便以后扩容吗?

就随风吧 发表于 2021-10-6 13:01:06

[分享] 华为大型园区出口综合案例(防火墙旁路)

liyou60 发表于 2024-5-14 14:37:27

华为认证,值得拥有!{:6_269:}{:6_267:}{:6_268:}

liyou60 发表于 2024-5-14 14:37:46

华为认证,值得拥有!{:6_269:}{:6_267:}{:6_268:}
页: [1]
查看完整版本: 华为大型园区出口综合案例(防火墙旁路)