• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

09-ACL和QoS配置举例

目录

01-H3C S12500 报文过滤典型配置举例

本章节下载 01-H3C S12500 报文过滤典型配置举例  (124.99 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500/Configure/Typical_Configuration_Example/H3C_S12500-R1825P01-6W100/09/201308/794663_30005_0.htm

01-H3C S12500 报文过滤典型配置举例

H3C S12500报文过滤配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2013 杭州华三通信技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,

并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。

H3C_彩色.emf

 



1  简介

本文档介绍了报文过滤的配置举例。

报文过滤功能是通过ACL(Access Control List,访问控制列表)实现对数据包的过滤。一般需要对数据包的源地址、目的地址、源端口和目的端口等根据设定的ACL规则进行比较,根据比较的结果决定对数据包进行转发或者丢弃。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解报文过滤特性。

3  配置举例

3.1  组网需求

图1所示,在一个IPv4网络中,某公司通过Device的接口GE4/0/1连接外网,Device与内部网络通过接口GE4/0/2连接。公司内部对外提供FTP服务(端口21)。公司外部主机可以访问公司内部的服务器。希望通过配置报文过滤功能实现以下要求:外部网络只有特定用户可以访问内部FTP服务器,其余访问内部FTP服务器的流量均无法通过。假定外部特定用户的IP地址为20.3.3.3。

图1 报文过滤特性典型配置组网图

 

3.2  使用版本

本举例是在S12500-CMW520-R1825P01版本上进行配置和验证的。

3.3  配置步骤

# 配置VLAN10和VLAN20。

<Device> system-view

[Device] vlan 10

[Device-vlan10] port Gigabitethernet 4/0/2

[Device-vlan10] quit

[Device] vlan 20

[Device-vlan20] port Gigabitethernet 4/0/1

[Device-vlan20] quit

[Device] interface GigabitEthernet 4/0/1

[Device-GigabitEthernet4/0/1] undo shutdown

[Device-GigabitEthernet4/0/1] quit

[Device] interface GigabitEthernet 4/0/2

[Device-GigabitEthernet4/0/2] undo shutdown

[Device-GigabitEthernet4/0/2] quit

[Device] interface vlan-interface 10

[Device-Vlan-interface10] ip address 192.1.1.1 24

[Device–Vlan-interface10] undo shutdown

[Device-Vlan-interface10] quit

[Device] interface vlan-interface 20

[Device-Vlan-interface20] ip address 20.1.1.1 24

[Device–Vlan-interface20] undo shutdown

[Device-Vlan-interface20] quit

# 配置允许特定用户访问FTP服务器、拒绝其它用户访问FTP服务器的IPv4高级 ACL 规则。

<Device> system-view

[Device] acl number 3000

[Device-acl-adv-3000] rule permit tcp destination-port eq 21 source 20.3.3.3 0 destination 129.1.1.2 0

[Device-acl-adv-3000] rule deny tcp destination-port eq 21

[Device-acl-adv-3000] quit

# 应用IPv4高级ACL 3000Device上接口GE4/0/1收到的IPv4报文进行过滤。

[Device] interface GigabitEthernet 4/0/1

[Device-GigabitEthernet4/0/1] packet-filter 3000 inbound

[Device-GigabitEthernet4/0/1] quit

3.4  验证配置

# 查看端口GE4/0/1上所配置的报文过滤策略。

[Device] display packet-filter interface GigabitEthernet 4/0/1

Interface: GigabitEthernet4/0/1

 In-bound policy:

  ACL 3000, Successful

 Out-bound policy:

3.5  配置文件

#

acl number 3000

 rule 0 permit tcp source 20.3.3.3 0 destination 129.1.1.2 0 destination-port eq ftp

 rule 5 deny tcp destination-port eq ftp

#

vlan 1

#

vlan 10

#

vlan 20

#

interface Vlan-interface10

 ip address 129.1.1.1 255.255.255.0

#

interface Vlan-interface20

 ip address 20.1.1.1 255.255.255.0

#

interface GigabitEthernet4/0/1

port link-mode bridge

 port access vlan 20

packet-filter 3000 inbound

#

interface GigabitEthernet4/0/2

port link-mode bridge

 port access vlan 10

#

4  相关资料

·     《H3C S12500系列路由交换机 ACL和QoS配置指导》中的“ACL”

·     《H3C S12500系列路由交换机 ACL和QoS命令参考》中的“ACL”

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们