1功能需求及组网说明
各种流动作的配置
『配置环境参数』
1.三层交换机SwitchA有两个端口ethetnet 0/1、ethernet 0/2分别属于vlan 1、vlan 2
2.vlan 1、vlan 2的三层接口地址分别是1.0.0.1/8、2.0.0.1/8,上行口G 1/1是trunk端口,并答应vlan 3 通过
『组网需求』
1.访问控制:答应位于ethetnet 0/1下的pc1(ip:1.0.0.2)进入端口的流量,拒绝pc3(ip:1.0.0.3)的流量通过端口进入交换机。
2.带宽保证:保证位于ethetnet 0/1下的主机(ip网段:1.0.0.0/8)在上行口端口有70mbps带宽。
3.拥塞避免:位于ethetnet 0/1下的主机(ip网段:1.0.0.0/8)在上行口端口有70mbps带宽,当流量超过时,为了避免同步丢失,启用RED。
4.优先级标记:对源于pc1(ip:1.0.0.2)的报文打上ef标记,并在上行口启用diff以保证pc1发出的流量得到相应的服务登记。
5.队列调度:当上行口发生拥塞时,保证pc2(ip:2.0.0.2)发出的报文得到优先转发。
6.流量统计:对主机pc1(ip:1.0.0.2)进入端口的流量进行统计,以作为计费依据。
7.流重定向:将pc1到pc2的报文重定向到cpu。
2数据配置步骤
【3526E配置方法】
需求1
参见《访问控制》一节
需求2
参见《限速》一节
需求3
S3526E不能实现基于流的随机丢弃
需求4
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA-acl-basic-1]quit
[SwitchA]traffic-priority ip-group 1 dscp ef
需求5
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA-acl-basic-1]quit
[SwitchA]traffic-priority ip-group 1 local-precedence 7
[SwitchA] queue-scheduler strict-priority
需求6
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA-acl-basic-1]quit
[SwitchA]acl num 200
[SwitchA-acl-link-200]rule 0 permit ingress interface e0/1 egress any
[SwitchA-acl-link-200]quit
[SwitchA]traffic-statistic ip-group 1 link-group 200 rule 0
需求7
[SwitchA]acl num 200
[SwitchA-acl-link-200]rule 0 permit ingress interface e0/1 egress interface e0/2
[SwitchA-acl-link-200]quit
[SwitchA] traffic-redirect link-group 200 cpu
【6506配置方法】
需求1:
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA-acl-basic-1]rule 1 deny source 1.0.0.30
[SwitchA]int e1/0/1
[SwitchA-Ethernet1/0/1]packet-filter ip-group 1 rule 0
[SwitchA-Ethernet1/0/1]packet-filter ip-group 1 rule 1
需求2:
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0.255.255.255
[SwitchA-acl-basic-1]quit
[SwitchA]interfaceg1/1
[SwitchA-Ethernet1/0/1]traffic-bandwidtch outbound ip-group 1 rule 71680 102400 100
需求3:
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0.255.255.255
[SwitchA-acl-basic-1]quit
[SwitchA]interfaceg1/1
[SwitchA-Ethernet1/0/1]traffic-red outbound ip-group 1 rule 0 64 128 80
需求4:
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA-acl-basic-1]quit
[SwitchA]intere1/0/1
[SwitchA-Ethernet1/0/1]traffic-priority ip-group outbound 1 rule 0 dscp ef
需求5
[SwitchA]acl num 1
[SwitchA -acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA -acl-basic-1]quit
[Quidway]intere1/0/1
[SwitchA -Ethernet1/0/1]traffic-priority ip-group outbound 1 rule 0 local-precedence 7
[SwitchA -Ethernet1/0/1]quit
[SwitchA] priority-trust local-precedence
需求6:
[SwitchA]acl num 1
[SwitchA-acl-basic-1]rule 0 permit source 1.0.0.2 0
[SwitchA-acl-basic-1]quit
[SwitchA]int e1/0/1
[SwitchA-Ethernet1/0/1]traffic-statistic ip-group 1 rule 0
需求7:此需求6506不支持
【5516配置方法】
需求1:访问控制
[SwitchA]acl num 100
[SwitchA-acl-adv-100]rule permit ip source 1.0.0.2 0
[SwitchA-acl-adv-100]rule deny ip destination 1.0.0.3 0
[SwitchA-acl-adv-100]quit
[SwitchA]packet-filter ip-group 100
需求2:带宽保证
参见《限速》一节
需求3:拥塞避免
不支持。
需求4:优先级标记
[SwitchA]acl nu 100
[SwitchA-acl-adv-100]rule p ip source 1.0.0.2 0
[SwitchA-acl-adv-100]quit
[SwitchA] traffic-p ip 100 dscp ef
需求5:队列调度
[SwitchA]acl nu 100
[SwitchA-acl-adv-100]rule permit ip source 1.0.0.2 0
[SwitchA-acl-adv-100]quit
[SwitchA]traffic-pri ip 100 local 7
需求6:流量统计
[SwitchA]acl nu 100
[SwitchA-acl-adv-100]rule permit ip source 1.0.0.2 0
[SwitchA-acl-adv-100]q
[SwitchA]traffic-statistic ip-group 100