设为首页收藏本站language 语言切换
查看: 2497|回复: 4
收起左侧

[分享] 华为大型园区出口配置示例(防火墙直连部署)

[复制链接]
 成长值: 63505
发表于 2017-7-7 09:46:06 | 显示全部楼层 |阅读模式
组网需求
图1-1所示,在大型园区出口,核心交换机上行和防火墙进行直连,通过防火墙连接到出口网关,对出入园区的业务流量提供安全过滤功能,为网络安全提供保,网络要求如下:

l   内网用户使用私网IP地址,用户的IP地址使用DHCP自动分配。
l   部门A用户能够访问Internet,部门B用户不能访问Internet。
l   内外网用户都可以访问HTTP服务器。
l   保证网络的可靠性,每个节点都进行冗余设计。
图1-1 园区出口组网图(防火墙直连)

                               
登录/注册后可看大图

部署要点
l   路由部署:
−           Router ID:为每台设备配置一个Loopback地址,作为设备的Router ID。
−           出口路由器、防火墙、核心交换机作为OSPF骨干区域Area0,出口路由器作为ASBR,核心交换机为ABR。
−           部门A和部门B的的OSPF区域分别配置为Area 1和Area 2,并配置为NSSA区域,减少LSA在区域间的传播。
−           为了引导各设备的上行流量,在核心交换机上配置一条缺省路由,下一跳指向防火墙,在防火墙上配置一条缺省路由,下一跳指向出口路由器,出口路由器上配置一条缺省路由,下一跳指向运行商网络设备的对接地址(公网网关)。

l   可靠性部署:
推荐使用CSS+iStack+Eth-trunk无环以太网技术,让可靠性变得简单。
−           在核心交换机部署集群(CSS),汇聚交换机部署堆叠(iStack),保证设备级可靠性。
−           为提高链路可靠性、在核心交换机与防火墙之间、核心交换机和汇聚交换机之间、汇聚交换机和接入交换机之间均通过Eth-Trunk互连。
−           在防火墙上部署双机热备,两台防火墙之间实现负载分担。

l   DHCP部署:
−           核心交换机配置DHCP服务器,为用户自动分配IP地址。
−           在汇聚交换机上配置DHCP Relay,保证能够通过DHCP服务为用户分配IP地址。

l   NAT部署:
−           为了使内网用户访问Internet,在两台出口路由器的上行口配置NAT,实现私网地址和公网地址之间的转换。通过ACL匹配部门A的源IP地址,从而实现部门A的用户可以访问Internet,而部门B的用户不能访问Internet。
−           为了保证外网用户能够访问HTTP服务器,在两台出口路由器上配置NAT Server。

l   安全部署:
防火墙配置安全策略,对流量进行过滤,保证网络安全。

设备规划

                               
登录/注册后可看大图

数据规划

                               
登录/注册后可看大图

配置思路
采用如下思路配置园区出口:

                               
登录/注册后可看大图

操作步骤
                                步骤 1     核心交换机:配置交换机集群
1.         连接集群卡的线缆,下图以EH1D2VS08000集群卡连线为例。

                               
登录/注册后可看大图


                               
登录/注册后可看大图
l  一块集群卡只能与对框一块集群卡相连,不能连接到多块集群卡,且不能与本框集群卡相连。
l  集群卡上组1的任意接口只能与对框集群卡上组1的任意接口相连,组2的要求同组1。
l  每块集群卡上连接集群线缆的数量相同(如果不相同会影响总的集群带宽),且两端按照接口编号的顺序对接。

2.         在Switch1上配置集群,集群连接方式为集群卡(缺省值,不需配置)。集群ID采用缺省值1(不需配置),优先级为100
<HUAWEI> system-view
[HUAWEI] set css mode css-card   //设备缺省值,不需再执行命令配置,此步骤仅用作示范命令
[HUAWEI] set css id 1  //设备缺省值,不需再执行命令配置,此步骤仅用作示范命令
[HUAWEI] set css priority 100   //集群优先级缺省为1,修改主交换机的优先级大于备交换机
[HUAWEI] css enable     
Warning: The CSS configuration takes effect only after the system is rebooted. The next CSS mode is CSS-Card. Reboot now? [Y/N]:Y  //重启交换机

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

4.         交换机完成重启后,查看集群状态
集群系统主的CSS MASTER灯绿色常亮,如dc_cfg_campus_001#fig_dc_cfg_campus_00103所示。
&#8722;           Switch1的两块主控板上编号为1的CSS ID灯绿色常亮,Switch2的两块主控板上编号为2的CSS ID灯绿色常亮。
&#8722;           集群卡上有集群线缆连接的端口LINK/ALM灯绿色常亮。
&#8722;           主框上所有集群卡的MASTER灯绿色常亮,备框上所有集群卡的MASTER灯常灭。

                               
登录/注册后可看大图


                               
登录/注册后可看大图
集群建立后,后续交换机的配置都在主交换机上进行,数据会自动同步到备交换机。 在集群系统中,接口编号会变为4维,例如,10GE1/1/0/9。其中左边第一位表示集群ID。
                                步骤 2     汇聚交换机:配置堆叠(iStack),这里以S5720EI系列交换机为例,使用业务口做堆叠

                               
登录/注册后可看大图
以Switch3和Swtich4为例,Switch5和Swtich6做堆叠类似,不做赘述。
在配置堆叠前,先不要连线,等配置完成之后再连线
1.         配置逻辑堆叠端口并加入物理成员接口

                               
登录/注册后可看大图
本端设备逻辑堆叠端口stack-port n/1里的物理成员端口只能与对端设备逻辑堆叠端口stack-port n/2里的物理成员端口相连。
# 配置Switch3的业务口GE0/0/28为物理成员端口,并加入到相应的逻辑堆叠端口。
[Switch3] interface stack-port 0/1
[Switch3-stack-port0/1] port interface gigabitethernet 0/0/28 enable
Warning: Enabling stack function may cause configuration loss on the interface, continue?[Y/N]:Y                                             
Info: This operation may take a few seconds. Please wait for a moment.......   
[Switch3-stack-port0/1] quit

# 配置Switch4的业务口GE0/0/28为物理成员端口,并加入到相应的逻辑堆叠端口。
[Switch4] interface stack-port 0/2
[Switch4-stack-port0/2] port interface gigabitethernet 0/0/28 enable
Warning: Enabling stack function may cause configuration loss on the interface, continue?[Y/N]:Y                                             
Info: This operation may take a few seconds. Please wait for a moment.......  
[Switch4-stack-port0/2] quit  

2.         配置堆叠ID和堆叠优先级
# 配置Switch3的堆叠优先级为200。
[Switch3] stack slot 0 priority 200
Warning: Please do not frequently modify Priority, it will make the stack split, continue?[Y/N]:Y  

# 配置Switch3的堆叠ID为1。
[Switch3] stack slot 0 renumber 1
Warning: All the configurations related to the slot ID will be lost after the slot ID is modified.
Please do not frequently modify slot ID, it will make the stack split. Continue?[Y/N]:Y
Info: Stack configuration has been changed, and the device needs to restart to make the configuration effective.

# 配置Switch4的堆叠ID为2。
[Switch4] stack slot 0 renumber 2
Warning: All the configurations related to the slot ID will be lost after the slot ID is modified.
Please do not frequently modify slot ID, it will make the stack split. Continue?[Y/N]:Y
Info: Stack configuration has been changed, and the device needs to restart to make the configuration effective.

3.         Switch3、Switch4下电,使用SFP+电缆连接GE0/0/28接口做堆叠口。

                               
登录/注册后可看大图
下电前,建议通过命令save保存配置。
本设备的stack-port 0/1必须连接邻设备的stack-port 0/2,否则堆叠组建不成功。

                               
登录/注册后可看大图

4.         设备上电
如果用户希望某台交换机为主交换机可以先为其上电,例如:希望Switch3做为主设备,可以先给Switch3上电,再为Switch4上电。

5.         检查堆叠是否建立成功

                               
登录/注册后可看大图
可以看到一主一备,堆叠建立成功。
步骤 3    部署Eth-Trunk接口:配置CSS与FW、汇聚交换机之间的跨框Eth-Trunk口
1.         防火墙FW:配置和核心交换机CSS之间互联的Eth-Trunk接口
# 在FW1上创建Eth-Trunk 10,用于连接核心交换机CSS,并加入Eth-Trunk成员接口。
[FW1] interface eth-trunk 10  //创建Eth-Trunk10接口,和CSS对接
[FW1-Eth-Trunk10] quit
[FW1] interface gigabitethernet 2/0/3  
[FW1-GigabitEthernet2/0/3] eth-trunk 10
[FW1-GigabitEthernet2/0/3] quit
[FW1] interface gigabitethernet 2/0/4
[FW1-GigabitEthernet2/0/4] eth-trunk 10
[FW1-GigabitEthernet2/0/4] quit

# 在FW2上创建Eth-Trunk 20,用于连接核心交换机CSS,并加入Eth-Trunk成员接口。
[FW2] interface eth-trunk 20  //创建Eth-Trunk20接口,和CSS对接
[FW2-Eth-Trunk20] quit
[FW2] interface gigabitethernet 2/0/3
[FW2-GigabitEthernet2/0/3] eth-trunk 20
[FW2-GigabitEthernet2/0/3] quit
[FW2] interface gigabitethernet 2/0/4  
[FW2-GigabitEthernet2/0/4] eth-trunk 20
[FW2-GigabitEthernet2/0/4] quit

2.         核心交换机CSS:配置CSS和FW之间、CSS和汇聚交换机的跨框Eth-Trunk
# 在CSS上创建Eth-Trunk10,用于连接FW1,并加入Eth-Trunk成员接口。
[CSS] interface eth-trunk 10  //创建Eth-Trunk10接口,和FW1对接
[CSS-Eth-Trunk10] quit
[CSS] interface gigabitethernet 1/1/0/3  
[CSS-GigabitEthernet1/1/0/3] eth-trunk 10
[CSS-GigabitEthernet1/1/0/3] quit
[CSS] interface gigabitethernet 2/1/0/3
[CSS-GigabitEthernet2/1/0/3] eth-trunk 10
[CSS-GigabitEthernet2/1/0/3] quit

# 在CSS上创建Eth-Trunk20,用于连接FW2,并加入Eth-Trunk成员接口。
[CSS] interface eth-trunk 20  //创建Eth-Trunk20接口,和FW2对接
[CSS-Eth-Trunk20] quit
[CSS] interface gigabitethernet 1/1/0/4  
[CSS-GigabitEthernet1/1/0/4] eth-trunk 20  
[CSS-GigabitEthernet1/1/0/4] quit
[CSS] interface gigabitethernet 2/1/0/4
[CSS-GigabitEthernet2/1/0/4] eth-trunk 20
[CSS-GigabitEthernet2/1/0/4] quit

# 在CSS上创建Eth-Trunk 100,用于连接汇聚交换机AGG1,并加入Eth-Trunk成员接口。
[CSS] interface eth-trunk 100  //创建Eth-Trunk100接口,和AGG1相连
[CSS-Eth-Trunk100] quit
[CSS] interface gigabitethernet 1/2/0/3
[CSS-GigabitEthernet1/2/0/3] eth-trunk 100
[CSS-GigabitEthernet1/2/0/3] quit
[CSS] interface gigabitethernet 2/2/0/3
[CSS-GigabitEthernet2/2/0/3] eth-trunk 100
[CSS-GigabitEthernet2/2/0/3] quit

# 在CSS上创建Eth-Trunk 200,用于连接汇聚交换机AGG2,并加入Eth-Trunk成员接口。
[CSS] interface eth-trunk 200  //创建Eth-Trunk200接口,和AGG2相连
[CSS-Eth-Trunk200] quit
[CSS] interface gigabitethernet 1/2/0/4  
[CSS-GigabitEthernet1/2/0/4] eth-trunk 200
[CSS-GigabitEthernet1/2/0/4] quit
[CSS] interface gigabitethernet 2/2/0/4  
[CSS-GigabitEthernet2/2/0/4] eth-trunk 200
[CSS-GigabitEthernet2/2/0/4] quit

3.         汇聚交换机:配置汇聚交换机AGG和核心交换机CSS、汇聚交换机和接入交换机之间互联的Eth-Trunk接口
# 配置AGG1。
[AGG1] interface eth-trunk 100  //创建Eth-Trunk100接口,和CSS相连
[AGG1-Eth-Trunk100] quit
[AGG1] interface gigabitethernet 1/0/1
[AGG1-GigabitEthernet1/0/1] eth-trunk 100
[AGG1-GigabitEthernet1/0/1] quit
[AGG1] interface gigabitethernet 2/0/1  
[AGG1-GigabitEthernet2/0/1] eth-trunk 100
[AGG1-GigabitEthernet2/0/1] quit
[AGG1] interface eth-trunk 500  //创建Eth-Trunk500接口,和接入交换机相连
[AGG1-Eth-Trunk500] quit
[AGG1] interface gigabitethernet 1/0/5
[AGG1-GigabitEthernet1/0/5] eth-trunk 500
[AGG1-GigabitEthernet1/0/5] quit
[AGG1] interface gigabitethernet 2/0/5  
[AGG1-GigabitEthernet2/0/5] eth-trunk 500
[AGG1-GigabitEthernet2/0/5] quit

# 配置AGG2。
[AGG2] interface eth-trunk 200  //创建Eth-Trunk200接口,和CSS相连
[AGG2-Eth-Trunk200] quit
[AGG2] interface gigabitethernet 1/0/1
[AGG2-GigabitEthernet1/0/1] eth-trunk 200
[AGG2-GigabitEthernet1/0/1] quit
[AGG2] interface gigabitethernet 2/0/1  
[AGG2-GigabitEthernet2/0/1] eth-trunk 200
[AGG2-GigabitEthernet2/0/1] quit
[AGG2] interface eth-trunk 600  //创建Eth-Trunk600接口,和接入交换机相连
[AGG2-Eth-Trunk600] quit
[AGG2] interface gigabitethernet 1/0/5
[AGG2-GigabitEthernet1/0/5] eth-trunk 600
[AGG2-GigabitEthernet1/0/5] quit
[AGG2] interface gigabitethernet 2/0/5  
[AGG2-GigabitEthernet2/0/5] eth-trunk 600
[AGG2-GigabitEthernet2/0/5] quit

                                步骤 4    配置各接口IP地址
# 配置Router1。
[Router1] interface loopback 0
[Router1-LoopBack0] ip address 1.1.1.1 32  //用来做Router ID
[Router1-LoopBack0] quit
[Router1] interface gigabitethernet 0/0/2
[Router1-GigabitEthernet0/0/2] ip address 202.10.1.1 24  //配置和外网相连的接口的IP地址
[Router1-GigabitEthernet0/0/2] quit
[Router1] interface gigabitethernet 0/0/1
[Router1-GigabitEthernet0/0/1] ip address 10.1.1.1 24  //配置和FW1相连的接口的IP地址
[Router1-GigabitEthernet0/0/1] quit

# 配置Router2。
[Router2] interface loopback 0
[Router2-LoopBack0] ip address 2.2.2.2 32  //用来做Router ID
[Router2-LoopBack0] quit
[Router2] interface gigabitethernet 0/0/2
[Router2-GigabitEthernet0/0/2] ip address 202.10.2.1 24  //配置和外网相连的接口的IP地址
[Router2-GigabitEthernet0/0/2] quit
[Router2] interface gigabitethernet 0/0/1
[Router2-GigabitEthernet0/0/1] ip address 10.2.1.1 24  //配置和FW2相连的接口的IP地址
[Router2-GigabitEthernet0/0/1] quit

# 配置FW1。
[FW1] interface loopback 0
[FW1-LoopBack0] ip address 3.3.3.3 32  //用来做Router ID
[FW1-LoopBack0] quit
[FW1] interface gigabitethernet 1/0/1
[FW1-GigabitEthernet1/0/1] ip address 10.1.1.2 24  //配置和Router1相连的接口的IP地址
[FW1-GigabitEthernet1/0/1] quit
[FW1] interface gigabitethernet 1/0/7
[FW1-GigabitEthernet1/0/7] ip address 10.10.1.1 24  //配置双机热备心跳线IP地址
[FW1-GigabitEthernet1/0/7] quit
[FW1] interface eth-trunk 10
[FW1-Eth-Trunk10] ip address 10.3.1.1 24  //配置和CSS相连的Eth-Trunk接口的IP地址
[FW1-Eth-Trunk10] quit

# 配置FW2。
[FW2] interface loopback 0
[FW2-LoopBack0] ip address 4.4.4.4 32  //用来做Router ID
[FW2-LoopBack0] quit
[FW2] interface gigabitethernet 1/0/1
[FW2-GigabitEthernet1/0/1] ip address 10.2.1.2 24  //配置和Router2相连的接口的IP地址
[FW2-GigabitEthernet1/0/1] quit
[FW2] interface gigabitethernet 1/0/7
[FW2-GigabitEthernet1/0/7] ip address 10.10.1.2 24  //配置双机热备心跳线IP地址
[FW2-GigabitEthernet1/0/7] quit
[FW2] interface eth-trunk 20
[FW2-Eth-Trunk20] ip address 10.4.1.1 24  //配置和CSS相连的Eth-Trunk接口的IP地址
[FW2-Eth-Trunk20] quit

# 配置CSS。
[CSS] interface loopback 0
[CSS-LoopBack0] ip address 5.5.5.5 32  //用来做Router ID
[CSS-LoopBack0] quit
[CSS] interface eth-trunk 10
[CSS-Eth-Trunk10] undo portswitch  //缺少情况下,交换机的Eth-Trunk接口为二层模式,如果作为三层接口使用,需要首先使用undo portswitch命令将接口切换为三层模式
[CSS-Eth-Trunk10] ip address 10.3.1.2 24  //配置和FW1相连的Eth-Trunk10接口的IP地址
[CSS-Eth-Trunk10] quit
[CSS] interface eth-trunk 20
[CSS-Eth-Trunk20] undo portswitch  //缺少情况下,交换机的Eth-Trunk接口为二层模式,如果作为三层接口使用,需要首先使用undo portswitch命令将接口切换为三层模式
[CSS-Eth-Trunk20] ip address 10.4.1.2 24  //配置和FW2相连的Eth-Trunk20接口的IP地址
[CSS-Eth-Trunk20] quit
[CSS] vlan batch 100 200 300  //批量创建VLAN  
[CSS] interface eth-trunk 100
[CSS-Eth-Trunk100] port hybrid pvid vlan 100
[CSS-Eth-Trunk100] port hybrid untagged vlan 100
[CSS-Eth-Trunk100] quit
[CSS] interface  vlanif 100   
[CSS-Vlanif100] ip address 10.5.1.1 24  //配置和汇聚交换机AGG1相连的接口的IP地址
[CSS-Vlanif100] quit
[CSS] interface eth-trunk 200
[CSS-Eth-Trunk200] port hybrid pvid vlan 200
[CSS-Eth-Trunk200] port hybrid untagged vlan 200
[CSS-Eth-Trunk200] quit
[CSS] interface  vlanif 200   
[CSS-Vlanif200] ip address 10.6.1.1 24  //配置和汇聚交换机AGG2相连的接口的IP地址
[CSS-Vlanif200] quit
[CSS] interface gigabitethernet 1/1/0/10  //进入连接HTTP服务器的接口
[CSS-GigabitEthernet1/1/0/10] port link-type access
[CSS-GigabitEthernet1/1/0/10] port default vlan 300  //以Access方式加入VLAN 300
[CSS-GigabitEthernet1/1/0/10] quit
[CSS] interface vlanif 300   
[CSS-Vlanif300] ip address 10.100.1.1 24  //配置连接HTTP服务器接口的IP地址
[CSS-Vlanif300] quit

# 配置AGG1。
[AGG1] interface loopback 0
[AGG1-LoopBack0] ip address 6.6.6.6 32  //用来做Router ID
[AGG1-LoopBack0] quit
[AGG1] vlan batch 100 500
[AGG1] interface eth-trunk 100
[AGG1-Eth-Trunk100] port hybrid pvid vlan 100
[AGG1-Eth-Trunk100] port hybrid untagged vlan 100
[AGG1-Eth-Trunk100] quit
[AGG1] interface vlanif 100   
[AGG1-Vlanif100] ip address 10.5.1.2 24  //配置和CSS相连的接口的IP地址
[AGG1-Vlanif100] quit
[AGG1] interface eth-trunk 500
[AGG1-Eth-Trunk500] port hybrid pvid vlan 500
[AGG1-Eth-Trunk500] port hybrid untagged vlan 500
[AGG1-Eth-Trunk500] quit
[AGG1] interface vlanif 500   
[AGG1-Vlanif500] ip address 192.168.1.1 24  //配置和接入交换机相连的接口的IP地址,并作为部门A的网关  
[AGG1-Vlanif500] quit

# 配置AGG2。
[AGG2] interface loopback 0
[AGG2-LoopBack0] ip address 7.7.7.7 32  //用来做Router ID
[AGG2-LoopBack0] quit
[AGG2] vlan batch 200 600
[AGG2] interface eth-trunk 200
[AGG2-Eth-Trunk200] port hybrid pvid vlan 200
[AGG2-Eth-Trunk200] port hybrid untagged vlan 200
[AGG2-Eth-Trunk200] quit
[AGG2] interface  vlanif 200   
[AGG2-Vlanif200] ip address 10.6.1.2 24  //配置和CSS相连的接口的IP地址
[AGG2-Vlanif200] quit
[AGG2] interface eth-trunk 600
[AGG2-Eth-Trunk600] port hybrid pvid vlan 600
[AGG2-Eth-Trunk600] port hybrid untagged vlan 600
[AGG2-Eth-Trunk600] quit
[AGG2] interface vlanif 600  
[AGG2-Vlanif600] ip address 192.168.2.1 24  //配置和接入交换机相连的接口的IP地址,并作为部门B的网关  
[AGG2-Vlanif600] quit

                                步骤 5     防火墙:配置防火墙各接口所属安全区域和安全策略
# 将各接口加入到安全区域。
[FW1] firewall zone trust
[FW1-zone-trust] add interface Eth-Trunk 10  //将连接内网的Eth-Trunk10加入安全区域
[FW1-zone-trust] quit
[FW1] firewall zone untrust
[FW1-zone-untrust] add interface gigabitethernet 1/0/1  //将连接外网的GE1/0/1加入非安全区域
[FW1-zone-untrust] quit
[FW1] firewall zone dmz
[FW1-zone-dmz] add interface gigabitethernet 1/0/7  //将心跳口GE1/0/7加入DMZ区域
[FW1-zone-dmz] quit
[FW2] firewall zone trust
[FW2-zone-trust] add interface Eth-Trunk 20  //将连接内网的Eth-Trunk20加入安全区域
[FW2-zone-trust] quit
[FW2] firewall zone untrust
[FW2-zone-untrust] add interface gigabitethernet 1/0/1  //将连接外网的GE1/0/1加入非安全区域
[FW2-zone-untrust] quit
[FW2] firewall zone dmz
[FW2-zone-dmz] add interface gigabitethernet 1/0/7  //将心跳口GE1/0/7加入DMZ区域
[FW2-zone-dmz] quit

# FW1:配置安全策略
[FW1] policy interzone local untrust inbound
[FW1-policy-interzone-local-untrust-inbound] policy 2
[FW1-policy-interzone-local-untrust-inbound-2] policy source 10.1.1.1 mask 24  //允许位于untrust区域的接入路由器访问防火墙
[FW1-policy-interzone-local-untrust-inbound-2] action permit
[FW1-policy-interzone-local-untrust-inbound-2] quit
[FW1-policy-interzone-local-untrust-inbound] quit
[FW1] policy interzone local trust outbound
[FW1-policy-interzone-local-trust-outbound] policy 1
[FW1-policy-interzone-local-trust-outbound-1] policy source 10.3.1.2 mask 24  //允许位于Trust区域的设备访问防火墙
[FW1-policy-interzone-local-trust-outbound-1] policy source 10.5.1.1 mask 24  //允许位于Trust区域的设备访问防火墙
[FW1-policy-interzone-local-trust-outbound-1] policy source 192.168.1.1 mask 24  //允许位于Trust区域的设备访问防火墙
[FW1-policy-interzone-local-outbound-inbound-1] action permit
[FW1-policy-interzone-local-outbound-inbound-1] quit
[FW1-policy-interzone-local-outbound-inbound] quit
[FW1] policy interzone trust untrust outbound
[FW1-policy-interzone-trust-untrust-outbound] policy 4
[FW1-policy-interzone-trust-untrust-outbound-4] policy source 192.168.1.1 mask 24  //允许192.168.1.0/24网段访问外网
[FW1-policy-interzone-trust-untrust-outbound-4] action permit
[FW1-policy-interzone-trust-untrust-outbound-4] quit
[FW1-policy-interzone-trust-untrust-outbound] quit
[FW1] policy interzone trust untrust inbound
[FW1-policy-interzone-trust-untrust-inbound] policy 3
[FW1-policy-interzone-trust-untrust-inbound-3] policy source 10.1.1.1 mask 24  //允许10.1.1.1访问内网
[FW1-policy-interzone-trust-untrust-inbound-3] action permit
[FW1-policy-interzone-trust-untrust-inbound-3] quit
[FW1-policy-interzone-trust-untrust-inbound] quit
# FW2:配置安全策略
[FW2] policy interzone local untrust inbound
[FW2-policy-interzone-local-untrust-inbound] policy 2
[FW2-policy-interzone-local-untrust-inbound-2] policy source 10.2.1.1 mask 24  //允许位于untrust区域的接入路由器访问防火墙
[FW2-policy-interzone-local-untrust-inbound-2] action permit
[FW2-policy-interzone-local-untrust-inbound-2] quit
[FW2-policy-interzone-local-untrust-inbound] quit
[FW2] policy interzone local trust outbound
[FW2-policy-interzone-local-trust-outbound] policy 1
[FW2-policy-interzone-local-trust-outbound-1] policy source 10.4.1.2 mask 24  //允许位于Trust区域的设备访问防火墙
[FW2-policy-interzone-local-trust-outbound-1] policy source 10.6.1.1 mask 24  //允许位于Trust区域的设备访问防火墙
[FW2-policy-interzone-local-trust-outbound-1] policy source 192.168.2.1 mask 24  //允许位于Trust区域的设备访问防火墙
[FW2-policy-interzone-local-dmz-inbound-1] action permit
[FW2-policy-interzone-local-dmz-inbound-1] quit
[FW2-policy-interzone-local-dmz-inbound] quit
[FW2] policy interzone trust untrust inbound
[FW2-policy-interzone-trust-untrust-inbound] policy 3
[FW2-policy-interzone-trust-untrust-inbound-3] policy source 10.2.1.1 mask 24  //允许10.2.1.1访问内网
[FW2-policy-interzone-trust-untrust-inbound-3] action permit
[FW2-policy-interzone-trust-untrust-inbound-3] quit
[FW2-policy-interzone-trust-untrust-inbound] quit
                                步骤 6    部署路由
1.         路由器、防火墙、核心交换机上行接口配置为骨干区域Area 0
# 配置Router1
[Router1] router id 1.1.1.1  
[Router1] ospf 1  //配置OSPF
[Router1-ospf-1] area 0  //配置为骨干区域
[Router1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255  //将连接FW1的网段发布到OSPF骨干区域
[Router1-ospf-1-area-0.0.0.0] quit
[Router1-ospf-1] quit
# 配置Router2
[Router2] router id 2.2.2.2
[Router2] ospf 1  //配置OSPF
[Router2-ospf-1] area 0  //配置为骨干区域
[Router2-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255  //将连接FW2的网段发布到OSPF骨干区域
[Router2-ospf-1-area-0.0.0.0] quit
[Router2-ospf-1] quit

# 配置FW1
[FW1] router id 3.3.3.3
[FW1] ospf 1  //配置OSPF
[FW1-ospf-1] area 0  //配置为骨干区域
[FW1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255  //将连接Router1的网段发布到OSPF骨干区域
[FW1-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255  //将连接CSS的网段发布到OSPF骨干区域
[FW1-ospf-1-area-0.0.0.0] quit
[FW1-ospf-1] quit

# 配置FW2
[FW2] router id 4.4.4.4
[FW2] ospf 1  //配置OSPF
[FW2-ospf-1] area 0  //配置为骨干区域
[FW2-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255  //将连接Router2的网段发布到OSPF骨干区域
[FW2-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255  //将连接CSS的网段发布到OSPF骨干区域
[FW2-ospf-1-area-0.0.0.0] quit
[FW2-ospf-1] quit

# 配置CSS
[CSS] router id 5.5.5.5
[CSS] ospf 1  //配置OSPF
[CSS-ospf-1] area 0  //配置为骨干区域
[CSS-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255  //将连接FW1的网段发布到OSPF骨干区域
[CSS-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255  //将连接FW2的网段发布到OSPF骨干区域
[CSS-ospf-1-area-0.0.0.0] network 10.100.1.0 0.0.0.255  //将连接HTTP服务器的网段发布到OSPF骨干区域
[CSS-ospf-1-area-0.0.0.0] quit
[CSS-ospf-1] quit

2.         核心交换机下行接口、汇聚交换机配置为NSSA区域Area1、Area2
# 配置CSS
[CSS] ospf 1  //配置OSPF
[CSS-ospf-1] area 1  //配置为Area1
[CSS-ospf-1-area-0.0.0.1] network 10.5.1.0 0.0.0.255  //将连接AGG1的网段发布到OSPF Area 1
[CSS-ospf-1-area-0.0.0.1] nssa  //将Area 1配置为NSSA区域
[CSS-ospf-1-area-0.0.0.1] quit
[CSS-ospf-1] area 2  //配置为Area2
[CSS-ospf-1-area-0.0.0.2] network 10.6.1.0 0.0.0.255  //将连接AGG2的网段发布到OSPF Area 2
[CSS-ospf-1-area-0.0.0.2] nssa  //将Area 1配置为NSSA区域
[CSS-ospf-1-area-0.0.0.2] quit
[CSS-ospf-1] quit

# 配置AGG1
[AGG1] ospf 1  //配置OSPF
[AGG1-ospf-1] area 1  //配置为Area 1
[AGG1-ospf-1-area-0.0.0.1] network 10.5.1.0 0.0.0.255  //将连接CSS的网段发布到OSPF Area 1
[AGG1-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255  //将用户网段发布到OSPF Aea 1 [AGG1-ospf-1-area-0.0.0.1] nssa  //将Area 1配置为NSSA区域
[AGG1-ospf-1-area-0.0.0.1] quit
[AGG1-ospf-1] quit

# 配置AGG2
[AGG2] ospf 1  //配置OSPF
[AGG2-ospf-1] area 2  //配置为Area 2
[AGG2-ospf-1-area-0.0.0.2] network 10.6.1.0 0.0.0.255  //将连接CSS的网段发布到OSPF Area 2
[AGG2-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255  //将用户网段发布到OSPF Aea 1 [AGG2-ospf-1-area-0.0.0.2] nssa  //将Area 2配置为NSSA区域
[AGG2-ospf-1-area-0.0.0.2] quit
[AGG2-ospf-1] quit

3.         在核心交换机上配置一条缺省路由,下一跳指向防火墙,在防火墙上配置一条缺省路由,下一跳指向出口路由器,出口路由器上配置一条缺省路由,下一跳指向运行商网络设备的对接地址(公网网关)
[Router1] ip route-static 0.0.0.0 0.0.0.0 202.10.1.2
[Router2] ip route-static 0.0.0.0 0.0.0.0 202.10.2.2
[FW1] ip route-static 0.0.0.0 0.0.0.0 10.1.1.1
[FW2] ip route-static 0.0.0.0 0.0.0.0 10.2.1.1
[CSS] ip route-static 0.0.0.0 0.0.0.0 10.3.1.1
[CSS] ip route-static 0.0.0.0 0.0.0.0 10.4.1.1

4.         检查配置结果
在AGG上查看路由表,可以看到到内网各网段都生成了路由,并且通过NSSA区域生成一条缺省路由,以AGG1为例:
[AGG1] display ip routing-table  
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 14       Routes : 14        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   O_NSSA  150  1           D   10.5.1.1        Vlanif100
        6.6.6.6/32  Direct  0    0           D   127.0.0.1       LoopBack0
       10.1.1.0/24  OSPF    10   3           D   10.5.1.1        Vlanif100
       10.2.1.0/24  OSPF    10   3           D   10.5.1.1        Vlanif100
       10.3.1.0/24  OSPF    10   2           D   10.5.1.1        Vlanif100
       10.4.1.0/24  OSPF    10   2           D   10.5.1.1        Vlanif100
       10.5.1.0/24  Direct  0    0           D   10.5.1.2        Vlanif100
       10.5.1.2/32  Direct  0    0           D   127.0.0.1       Vlanif100
       10.6.1.0/24  OSPF    10   2           D   10.5.1.1        Vlanif100
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  Direct  0    0           D   192.168.1.1     Vlanif500
    192.168.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif500
    192.168.2.0/24  OSPF    10   3           D   10.5.1.1        Vlanif100
# 在CSS上查看路由表,可以看到到内网各网段都生成了路由,上行到防火墙的两条路Cost值都一样,说明采用负载负担方式上行。
[CSS] display ip routing-table  
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
         Destinations : 18       Routes : 19        

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        0.0.0.0/0   Static  60   0          RD   10.3.1.1        Eth-Trunk10
                    Static  60   0          RD   10.4.1.1        Eth-Trunk20

        5.5.5.5/32  Direct  0    0           D   127.0.0.1       LoopBack0
       10.1.1.0/24  OSPF    10   2           D   10.3.1.1        Eth-Trunk10
       10.2.1.0/24  OSPF    10   2           D   10.4.1.1        Eth-Trunk20
       10.3.1.0/24  Direct  0    0           D   10.3.1.2        Eth-Trunk10
       10.3.1.2/32  Direct  0    0           D   127.0.0.1       Eth-Trunk10
       10.4.1.0/24  Direct  0    0           D   10.4.1.2        Eth-Trunk20
       10.4.1.2/32  Direct  0    0           D   127.0.0.1       Eth-Trunk20
       10.5.1.0/24  Direct  0    0           D   10.5.1.1        Vlanif100
       10.5.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif100
       10.6.1.0/24  Direct  0    0           D   10.6.1.1        Vlanif200
       10.6.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif200
     10.100.1.0/24  Direct  0    0           D   10.100.1.1      Vlanif300
     10.100.1.1/32  Direct  0    0           D   127.0.0.1       Vlanif300
      127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
      127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    192.168.1.0/24  OSPF    10   2           D   10.5.1.2        Vlanif100
    192.168.2.0/24  OSPF    10   2           D   10.6.1.2        Vlanif200
步骤 7    核心交换机CSS、汇聚交换机AGG:配置DHCP
# 在核心交换机CSS上配置DHCP服务器,自动为用户分配IP地址。
[CSS] dhcp enable  //使能DHCP
[CSS] interface vlanif 100  //通过VLANIF100接口为部门A用户分配IP地址
[CSS-Vlanif100] dhcp select global  //配置全局DHCP服务器
[CSS-Vlanif100] quit
[CSS] interface vlanif 200  //通过VLANIF100接口为部门B用户分配IP地址
[CSS-Vlanif200] dhcp select global  //配置全局DHCP服务器
[CSS-Vlanif200] quit
[CSS] ip pool poola  //配置地址池poola,为部门A用户分配IP地址/
[CSS-ip-pool-poola] network 192.168.1.0 mask 24  //配置为部门A分配的网段
[CSS-ip-pool-poola] gateway-list 192.168.1.1  //配置为部门A用户分批的网关
[CSS-ip-pool-poola] quit
[CSS] ip pool poolb  //配置地址池poolb,为部门B用户分配IP地址
[CSS-ip-pool-poolb] network 192.168.2.0 mask 24  //配置为部门B分配的网段
[CSS-ip-pool-poolb] gateway-list 192.168.2.1  //配置为部门B用户分批的网关
[CSS-ip-pool-poolb] quit

# 在汇聚交换机AGG1上配置DHCP中继。
[AGG1] dhcp enable  //使能DHCP
[AGG1] interface vlanif 500  //在用户接入网口做DHCP中继
[AGG1-Vlanif500] dhcp select relay  //配置DHCP中继
[AGG1-Vlanif500] dhcp relay server-ip 10.5.1.1  //配置DHCP服务器IP地址
[AGG1-Vlanif500] quit

# 在汇聚交换机AGG2上配置DHCP中继。
[AGG2] dhcp enable  //使能DHCP
[AGG2] interface vlanif 600  //在用户接入网口做DHCP中继
[AGG2-Vlanif600] dhcp select relay  //配置DHCP中继
[AGG2-Vlanif600] dhcp relay server-ip 10.6.1.1  //配置DHCP服务器IP地址
[AGG2-Vlanif600] quit

# 检查配置结果。
在客户端配置通过DHCP服务器获取IP地址,然后在设备上查看地址池情况,可以看到已分配两个IP地址给用户(Used        :2),还剩余503个(Idle        :503),说明IP地址已经分配成功。
[CSS] display ip pool   
  -----------------------------------------------------------------------
  Pool-name      : poola
  Pool-No        : 0
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.1.1      
  Mask           : 255.255.255.0
  VPN instance   : --

  -----------------------------------------------------------------------
  Pool-name      : poolb
  Pool-No        : 1
  Position       : Local           Status           : Unlocked
  Gateway-0      : 192.168.2.1      
  Mask           : 255.255.255.0
  VPN instance   : --


  IP address Statistic
    Total       :506   
    Used        :2          Idle        :503   
    Expired     :0          Conflict    :1          Disable   :0  

                                步骤 8     出口路由器:配置NAT
内网用户使用的私网IP地址,要想实现如下功能:
l   部门A用户可以访问Internet,在出口路由器配置NAT地址转换,在出口路由器将私网IP地址转换成公网IP。
l   外网用户能否访问内网HTTP服务器,在出口路由器配置NAT Server。

                               
登录/注册后可看大图
假设运营商分配给企业用户的公网IP为:202.10.1.2~202.10.1.10,202.10.2.2~202.10.2.10。 其中202.10.1.2作为Router1连接外网的IP地址,202.10.2.2为Router2连接外网的IP地址。202.10.1.10作为外网用户访问HTTP服务器的公网地址。内网用户使用剩余IP公网IP访问Internet。
# 在Router1上配置NAT,将部门A的用户的IP私网地址转换成公网IP,保证部门A的用户能够访问Internet
[Router1] nat address-group 1 202.10.1.3 202.10.1.9  //配置NAT地址池,包括用来运营商分配的公网IP
[Router1] acl number 2000
[Router1-acl-basic-2000] rule permit source 192.168.1.0 0.0.0.255  //配置可以用来访问外网的用户地址段
[Router1-acl-basic-2000] quit
[Router1] interface gigabitethernet 0/0/2
[Router1-GigabitEthernet0/0/2] nat outbound 2000 address-group 1  //在连接外网的接口上应用NAT
[Router1-GigabitEthernet0/0/2] quit

# 在Router2上配置NAT,将部门A的用户的IP私网地址转换成公网IP

[Router2] nat address-group 1 202.10.2.3 202.10.2.10  //配置NAT地址池,包括用来运营商分配的公网IP
[Router2] acl number 2000
[Router2-acl-basic-2000] rule permit source 192.168.1.0 0.0.0.255  //配置可以用来访问外网的用户地址段
[Router2-acl-basic-2000] quit
[Router2] interface gigabitethernet 0/0/2
[Router2-GigabitEthernet0/0/2] nat outbound 2000 address-group 1  //在连接外网的接口上应用NAT  
[Router2-GigabitEthernet0/0/2] quit
# 检查配置结果
[Router2] display nat outbound
NAT Outbound Information:
-------------------------------------------------------------------------  
Interface                     Acl     Address-group/IP/Interface      Type
-------------------------------------------------------------------------
GigabitEthernet0/0/2        2000                              1       pat
-------------------------------------------------------------------------  
Total : 1

# 在Router1和Router2上配置NAT Server,保证外部用户能够访问内网HTTP服务器

[Router1] interface gigabitethernet 0/0/2
[Router1-GigabitEthernet0/0/2] nat server protocol tcp global 202.10.1.10 http inside 10.100.1.1 http  //允许Internet用户访问公司内部HTTP服务器
[Router1-GigabitEthernet0/0/2] quit
[Router2] interface gigabitethernet 0/0/2
[Router2-GigabitEthernet0/0/2] nat server protocol tcp global 202.10.1.10 http inside 10.100.1.1 http  //允许Internet用户访问公司内部HTTP服务器
[Router2-GigabitEthernet0/0/2] quit

                                步骤 9     防火墙:配置双机热备
# 在FW1上配置VGMP组监控上下行业务接口。
[FW1] hrp track interface  gigabitethernet 1/0/1  //配置VGMP组监控上行接口
[FW1] hrp track interface  eth-trunk 10  //配置VGMP组监控下行接口

# 在FW1配置根据HRP状态调整OSPF的相关COST值的功能。
[FW1] hrp adjust ospf-cost enable
# 在FW2上配置VGMP组监控上下行业务接口。
[FW2] hrp track interface  gigabitthernet 1/0/1  //配置VGMP组监控上行接口
[FW2] hrp track interface  eth-trunk 20  //配置VGMP组监控下行接口
# 在FW2配置根据HRP状态调整OSPF的相关COST值的功能。
[FW2] hrp adjust ospf-cost enable
在FW1上指定心跳接口,启用双机热备。
[FW1] hrp interface  gigabitethernet 1/0/7 remote 10.10.1.2  //配置心跳口,并启用双机热备
[FW1] hrp enable  //启动HRP双机热备份功能
HRP_M[FW1]  hrp mirror session enable  //启动会话快速备份功能, 防火墙工作于双机热备份组网环境下,如果报文的来回路径不一致,通过配置会话快速备份功能,能够保证主用防火墙的会话信息立即同步至备用防火墙。当主用防火墙出现故障时,报文能够被备用防火墙转发出去,从而保证内外部用户的会话不中断

                               
登录/注册后可看大图
双机热备功能配置完成后,主用设备的配置和会话会自动备份到备用设备上。
# 在FW2上指定心跳接口,启用双机热备。
[FW2] hrp interface gigabitethernet 1/0/7 remote 10.10.1.1  //配置心跳口,并启用双机热备
[FW2] hrp enable  //启动HRP双机热备份功能
HRP_B[FW2] hrp mirror session enable  //启动会话快速备份功能, 防火墙工作于双机热备份组网环境下,如果报文的来回路径不一致,通过配置会话快速备份功能,能够保证主用防火墙的会话信息立即同步至备用防火墙。当主用防火墙出现故障时,报文能够被备用防火墙转发出去,从而保证内外部用户的会话不中断

# 检查配置结果。
HRP_M[FW1] display hrp state
Role: active, peer: active
Running priority: 49012, peer: 49012                                            
Core state: normal, peer: normal                                    
Backup channel usage: 3%                                                        
Stable time: 0 days, 5 hours, 1 minutes  

以看到本端和对端优先级相同,且状态都为active,说明两台防火墙处于负载分担状态。
                                步骤 10     防火墙:配置攻击防范
对于内部服务器,可能会遭受SYN Flood、HTTP Flood攻击,所以在防火墙上开启SYN Flood、HTTP Flood攻击防范功能,保护内部服务器不受攻击。

                               
登录/注册后可看大图
本举例中的攻击防范阈值仅供参考,实际配置时,请根据网络实际流量进行配置。
HRP_M[FW1] firewall defend syn-flood enable
HRP_M[FW1] firewall defend syn-flood zone untrust max-rate 20000
HRP_M[FW1] firewall defend udp-flood enable
HRP_M[FW1] firewall defend udp-flood zone untrust max-rate 1500
HRP_M[FW1] firewall defend icmp-flood enable
HRP_M[FW1] firewall defend icmp-flood zone untrust max-rate 20000
HRP_M[FW1] firewall blacklist enable
HRP_M[FW1] firewall defend ip-sweep enable
HRP_M[FW1] firewall defend ip-sweep max-rate 4000
HRP_M[FW1] firewall defend port-scan enable
HRP_M[FW1] firewall defend port-scan max-rate 4000
HRP_M[FW1] firewall defend ip-fragment enable
HRP_M[FW1] firewall defend ip-spoofing enable

----结束
配置文件
l   Router1的配置文件
#
sysname Router1
#
acl number 2000
rule permit source 192.168.1.0 0.0.0.255
#
nat address-group 1 202.10.1.3 202.10.1.9  
#
interface GigabitEthernet 0/0/1
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet 0/0/2
ip address 202.10.1.1 255.255.255.0
nat outbound 2000 address-group 1
nat server protocol tcp global 202.10.1.10 http inside 10.100.1.10 http  
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1 router id 1.1.1.1
area 0.0.0.0
  network 10.1.1.0  0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 202.10.1.2
#
return

l   Router2的配置文件
#
sysname Router2
#
acl number 2000
rule permit source 192.168.1.0 0.0.0.255
#
nat address-group 1 202.10.2.3 202.10.2.10 mask 255.255.255.0  
#
interface GigabitEthernet 0/0/1
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet 0/0/2
ip address 202.10.2.1 255.255.255.0
nat outbound 2000 address-group 1
nat server protocol tcp global 202.10.1.10 http inside 10.100.1.10 http  
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1 router id 2.2.2.2
area 0.0.0.0
  network 10.2.1.0 0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 202.10.2.2
#
return

l   FW1的配置文件
#
sysname FW1
#                                                                                
router id 3.3.3.3     
#
hrp mirror session enable
hrp adjust ospf-cost enable
hrp enable
hrp interface GigabitEthernet 1/0/7 remote 10.10.1.2
hrp track interface GigabitEthernet1/0/1  
hrp track interface Eth-Trunk 10  
#
interface Eth-Trunk 10
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet 1/0/1
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet 1/0/7
ip address 10.10.1.1 255.255.255.0
#
interface GigabitEthernet 2/0/3
eth-trunk 10
#
interface GigabitEthernet 2/0/4
eth-trunk 10
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#   
firewall zone trust         
set priority 85            
add interface Eth-Trunk10
#  
firewall zone dmz           
set priority 50            
add interface GigabitEthernet1/0/7
#   
firewall zone untrust         
set priority 5            
add interface GigabitEthernet 1/0/1
#                                                                                
ospf 1                                                                           
area 0.0.0.0                                                                 
  network 10.1.1.0 0.0.0.255
  network 10.3.1.0 0.0.0.255   
#
ip route-static 0.0.0.0 0.0.0.0 10.1.1.1
#
policy interzone local trust outbound
policy 1
  action permit
  policy source 10.3.1.0 mask 24
  policy source 10.5.1.0 mask 24
  policy source 192.168.1.0 mask 24
#
policy interzone local untrust inbound
policy 2
  action permit
  policy source 10.1.1.0 mask 24
#
policy interzone trust untrust inbound
policy 3
  action permit
  policy source 10.1.1.0 mask 24
#
policy interzone trust untrust outbound
policy 4
  action permit
  policy source 192.168.1.0 mask 24
#
firewall defend syn-flood enable
firewall defend syn-flood zone untrust max-rate 20000
firewall defend udp-flood enable
firewall defend udp-flood zone untrust max-rate 1500
firewall defend icmp-flood enable
firewall defend icmp-flood zone untrust max-rate 20000
firewall blacklist enable
firewall defend ip-sweep enable
firewall defend ip-sweep max-rate 4000
firewall defend port-scan enable
firewall defend port-scan max-rate 4000
firewall defend ip-fragment enable
firewall defend ip-spoofing enable
#  
return

l   FW2的配置文件
#
sysname FW2
#                                                                                
router id 4.4.4.4     
#
hrp mirror session enable
hrp adjust ospf-cost enable
hrp enable
hrp interface GigabitEthernet 1/0/7 remote 10.10.1.1
hrp track interface GigabitEthernet1/0/1  
hrp track interface Eth-Trunk 20  
#
interface Eth-Trunk 20
ip address 10.4.1.1 255.255.255.0
#
interface GigabitEthernet 1/0/1
ip address 10.2.1.2 255.255.255.0
#
interface GigabitEthernet 1/0/7
ip address 10.10.1.2 255.255.255.0
#
interface GigabitEthernet 2/0/3
eth-trunk 20
#
interface GigabitEthernet 2/0/4
eth-trunk 20
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#   
firewall zone trust         
set priority 85            
add interface Eth-Trunk20
#  
firewall zone dmz           
set priority 50            
add interface GigabitEthernet1/0/7
#   
firewall zone untrust         
set priority 5            
add interface GigabitEthernet 1/0/1
#                                                                                
ospf 1                                                                           
area 0.0.0.0                                                                 
  network 10.2.1.0 0.0.0.255
  network 10.4.1.0 0.0.0.255   
#
ip route-static 0.0.0.0 0.0.0.0 10.2.1.1
#
policy interzone local trust outbound
policy 1
  action permit
  policy source 10.4.1.0 mask 24
  policy source 10.6.1.0 mask 24
  policy source 192.168.2.0 mask 24
#
policy interzone local untrust inbound
policy 2
  action permit
  policy source 10.2.1.0 mask 24
#
policy interzone trust untrust inbound
policy 3
  action permit
  policy source 10.2.1.0 mask 24
#
firewall defend syn-flood enable
firewall defend syn-flood zone untrust max-rate 20000
firewall defend udp-flood enable
firewall defend udp-flood zone untrust max-rate 1500
firewall defend icmp-flood enable
firewall defend icmp-flood zone untrust max-rate 20000
firewall blacklist enable
firewall defend ip-sweep enable
firewall defend ip-sweep max-rate 4000
firewall defend port-scan enable
firewall defend port-scan max-rate 4000
firewall defend ip-fragment enable
firewall defend ip-spoofing enable
#  
return

l   CSS的配置文件
#
sysname CSS
#                                                                                
vlan batch 100 200 300
#
dhcp enable
#
ip pool poola
gateway-list 192.168.1.1                                                           
network 192.168.1.0 mask 255.255.255.0                                             
#
ip pool poolb
gateway-list 192.168.2.1                                                           
network 192.168.2.0 mask 255.255.255.0                                             
#
interface Vlanif 100
ip address 10.5.1.1 255.255.255.0
dhcp select global
#
interface Vlanif 200
ip address 10.6.1.1 255.255.255.0
dhcp select global
#
interface Vlanif 300
ip address 10.100.1.100 255.255.255.0
#
interface Eth-Trunk 10
undo portswitch
ip address 10.3.1.2 255.255.255.0
#
interface Eth-Trunk 20
undo portswitch
ip address 10.4.1.2 255.255.255.0
#  
interface Eth-Trunk 100
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface Eth-Trunk 200
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface GigabitEthernet 1/1/0/1
port link-type access
port default vlan 300
#
interface GigabitEthernet 1/1/0/3
eth-trunk 10
#
interface GigabitEthernet 1/1/0/4
eth-trunk 20
#
interface GigabitEthernet 1/2/0/3
eth-trunk 100
#
interface GigabitEthernet 1/2/0/4
eth-trunk 200
#
interface GigabitEthernet 2/1/0/3
eth-trunk 10
#
interface GigabitEthernet 2/1/0/4
eth-trunk 20
#
interface GigabitEthernet 2/2/0/3
eth-trunk 100
#
interface GigabitEthernet 2/2/0/4
eth-trunk 200
#
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
#                                                                                                                       
ospf 1 router-id 5.5.5.5                                                                        
area 0.0.0.0                                                                 
  network 10.3.1.0 0.0.0.255
  network 10.4.1.0 0.0.0.255
  network 10.100.1.0 0.0.0.255  
area 0.0.0.1   
  network 10.5.1.0 0.0.0.255
area 0.0.0.2   
  network 10.6.1.0 0.0.0.255   
#
ip route-static 0.0.0.0 0.0.0.0 10.3.1.1
ip route-static 0.0.0.0 0.0.0.0 10.4.1.1
#  
return

l   AGG1的配置文件
#
sysname AGG1
#                                                                                
vlan batch 100 500
#
interface Vlanif 100
ip address 10.5.1.2 255.255.255.0
#
interface Vlanif 500
ip address 192.168.1.1 255.255.255.0
dhcp select relay
dhcp relay server-ip 10.5.1.1
#
interface Eth-Trunk 100
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface Eth-Trunk 500
port hybrid pvid vlan 500
port hybrid untagged vlan 500
#
interface GigabitEthernet 1/0/1
eth-trunk 100
#
interface GigabitEthernet 2/0/1
eth-trunk 100
#
interface GigabitEthernet 1/0/5
eth-trunk 500
#
interface GigabitEthernet 2/0/5
eth-trunk 500
#
interface LoopBack0
ip address 6.6.6.6 255.255.255.255
#                                                                       
ospf 1 router-id 6.6.6.6                                                                        
area 0.0.0.1                                                                 
network 10.5.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255  
nssa
#  
return

l   AGG2的配置文件
#
sysname AGG2
#                                                                                
vlan batch 200 600
#
interface Vlanif 200
ip address 10.6.1.2 255.255.255.0
#
interface Vlanif 600
ip address 192.168.2.1 255.255.255.0
dhcp select relay
dhcp relay server-ip 10.6.1.1
#
interface Eth-Trunk 200
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface Eth-Trunk 600
port hybrid pvid vlan 600
port hybrid untagged vlan 600
#
interface GigabitEthernet 1/0/1
eth-trunk 200
#
interface GigabitEthernet 2/0/1
eth-trunk 200
#
interface GigabitEthernet 1/0/5
eth-trunk 600
#
interface GigabitEthernet 2/0/5
eth-trunk 600
#
interface LoopBack0
ip address 7.7.7.7 255.255.255.255
#                                                                       
ospf 1 router-id 7.7.7.7                                                                        
area 0.0.0.2                                                                 
  network 10.6.1.0 0.0.0.255
  network 192.168.2.0 0.0.0.255  
  nssa
#  
return


发表于 2017-7-7 11:23:53 | 显示全部楼层
好东西,知识点太全了
板凳 2017-7-7 11:23:53 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-7-7 11:25:00 | 显示全部楼层
感谢楼主分享,可惜微信上的图片不能外连
地板 2017-7-7 11:25:00 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-9 12:00 , Processed in 0.077859 second(s), 12 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表