H3C交换机设备使用QOS策略方式实现报文过滤
1.概述
在某些客户的内网通常会限制一些电脑访问重要的服务器,就需要使用acl进行报文过滤。
本次采用QOS策略方式实现报文过滤。
2.内网区域网络需求
1、办公人员能正常访问应用服务器(web网站应用),但不能访问运维服务器;
2、运维人员能正常访问应用服务器和运维服务器;
3、运维服务器不能通过防火墙访问互联网。
功能需求:vlan划分、qos策略、acl过滤
3.网络拓扑
4.数据规划
配置项 | SW_center | 应用服务器 | 运维服务器 | 办公人员 | 运维人员 | 防火墙 |
接口配置 | 接口号:GigabitEthernet 1/0/1 IP地址:172.16.21.1/24 接口号:GigabitEthernet 1/0/3 IP地址:172.16.22.1/24 接口号:GigabitEthernet 1/0/5 IP地址:172.16.23.1/24 接口号:GigabitEthernet 1/0/7 IP地址:172.16.20.1/24 | 接口号:GigabitEthernet 1/0/1 IP地址:172.16.21.2/24
| 接口号:GigabitEthernet 1/0/1 IP地址:172.16.22.2/24
| 接口号:GigabitEthernet 1/0/1 IP地址:172.16.23.2/24
| 接口号:GigabitEthernet 1/0/1 IP地址:172.16.23.3/24
| 接口号:GigabitEthernet 1/0/1 IP地址:172.16.20.2/24
|
Vlan配置 | Vlan: 20、21、22、23 | Vlan: 21 | Vlan: 22 | Vlan: 23 | Vlan: 23 | Vlan: 20 |
5.配置思路
本次仅针对交换机进行配置。
交换机配置思路如下:
1. 完成接口基本配置、VLAN配置,并描述vlan用于接入什么设备
2. 配置acl、QOS策略。
3. 应用全局QOS策略
4. 验证。
5.交换机配置
只列出交换机的主要配置:
血淋漓的提示:配置结束记得save force 保存
<SW_center>dis cu
#
version 7.1.075, Alpha 7571
#
sysname SW_center
#
#
vlan 1
#
vlan 20 to 23 //添加VLAN 20-23
#
traffic classifier 1 operator and
if-match acl 3000 //流分类:匹配acl 3000的数据报文
#
traffic behavior 1
filter deny //流行为:数据报文拒绝通过
#
qos policy 1
classifier 1 behavior 1 //配置qos策略,使流分类和流行为关联
#
stp global enable
#
interface NULL0
#
interface Vlan-interface20
description internet
ip address 172.16.20.1 255.255.255.0
#
interface Vlan-interface21
description ...
ip address 172.16.21.1 255.255.255.0
#
interface Vlan-interface22
description test
ip address 172.16.22.1 255.255.255.0
#
interface Vlan-interface23
description ..
ip address 172.16.23.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 21
combo enable fiber
#
interface GigabitEthernet1/0/2
port link-mode bridge
combo enable fiber
#
interface GigabitEthernet1/0/3
port link-mode bridge
port access vlan 22
combo enable fiber
#
interface GigabitEthernet1/0/4
port link-mode bridge
combo enable fiber
#
interface GigabitEthernet1/0/5
port link-mode bridge
port access vlan 23
combo enable fiber
#
interface GigabitEthernet1/0/6
port link-mode bridge
port access vlan 23
combo enable fiber
#
interface GigabitEthernet1/0/7
port link-mode bridge
port access vlan 20
combo enable fiber
#
ip route-static 0.0.0.0 0 172.16.20.2
#
qos apply policy 1 global inbound //在交换机全局应用qos策略
#
acl advanced 3000 //匹配23.2访问22.0和匹配20.0访问22.0网段
rule 0 permit ip source 172.16.22.0 0.0.0.255 destination 172.16.23.2 0
rule 5 permit ip source 172.16.22.0 0.0.0.255 destination 172.16.20.0 0.0.0.255
6.需求验证
1使用办公人员电脑IP 172.16.23.3 可以ping通运维服务器172.16.22.2
2使用办公人员电脑IP 172.16.23.3 无法ping通运维服务器172.16.22.2
3使用运维服务器IP 172.16.22.2 无法ping通防火墙172.16.20.2