C300 V1.2.0开局指导书

Protect channel: OLTSF ――保护口没有插光纤,有告警 Externel request: no-request ――外部命令倒换 注:保护倒换为告警促发机制,当前活动口有告警就倒换。 删除命令

ZXAN(config-pon)#no protection group aaba

注:删除保护组后,系统会自动删除保护口的数据。 删除外部保护倒换命令:

ZXAN(config-pon)#no protection switch-command group aaa

保护倒换为告警促发机制,当前活动口有告警就倒换。

注意:在删除保护组的时候,系统会自动删除保护口的数据。 几种切换请求的优先级顺序如下(由高到低):

锁定保护通道→强制切换到保护→强制切换到工作→拔出保护口光纤(保护口los告警)-拔出工作口光纤(工作口LOS告警)-手动切换到保护→手工切换到工作-可恢复模式。也就是说,当强制切换命令执行后,就算出活动端口的光纤,也是不会再发生倒换的。

1.29 QOS配置

GPON的qos和acl功能很强大,上联板的qos和acl功能做在主控板的交换芯片上,pon口的qos和acl功能做在pon板的交换芯片上,基于onu的qos和acl功能做在pon板的pon mac上。

C300提供强大的ACL和QOS功能,该2个功能经常是一起进行使用。该部分要灵活应用,在外场测试和实际应用中会有意想不到的效果。

ACL的主要目的是匹配和区分流,对匹配和区分出来的流量进行permit和deny操作。通过ACL区分出来的流,还可以通过QOS进行进行限速、标记、镜像和重定向等一系列操作。 1.30 1.31

SP和WRR 上联口

OLT系统默认为严格优先级SP,一般不需要更改。

上联口的cos到queue的对应关系默认是一一对应的,但是可以进行修改。 查询cos到queue的对应关系用如下命令:

ZXAN(config)#show qos-network-side cos-local-map -----------------------------------

cos value 0 1 2 3 4 5 6 7 queue ID 0 1 2 3 4 5 6 7

如果需要修改,可以使用下面的命令:

ZXAN(config)#qos-network-side cos-local-map cos0 7 cos1 6 cos2 5 cos3 4 cos4 3 cos5 2 cos6 1 cos7 0

上面命令配置cos到queue的映射关系为cos0映射到队列7、cos1映射到队列6、cos2映射到队列5、cos3映射到队列4、cos4映射到队列3、cos5映射到队列2、cos6映射到队列1、cos7映射到队列0。

ZXAN(config)#qos-network-side trust-cos enable

需要在网络端口上执行这个的命令后,COS到队列的映射才能生效。 A)、sp模式:

默认情况下上联口的优先级是sp形式。

此时,带有不同优先级的包通过上联口时保证高优先级的先通过 B)、wrr模式:

在端口模式下,通过配置:

ZXAN(config-if)#qos queue-mode wrr ? <0-7> Queue number

ZXAN(config-if)#qos queue-mode wrr 0 ? <0-15> Queue weight

ZXAN(config-if)#qos queue-mode wrr 0

ZXAN(config-if)# qos queue-mode wrr 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8

可以实现优先级对列发生拥塞情况下按照比例通过,上面的例子中,优先级为0 1 2 3 4 5 6 7的包的比例为1:2:3:4:5:6:7:8

C)、wrr+sp模式:

权重配置为0或者不配置权重的队列为sp模式。 在在端口模式下,通过配置:

ZXAN(config-if)#qos queue-mode wrr 0 1 1 2 2 3 3 4

发生拥塞时,可以实现优先级为4、5、6、7的包先通过,0、1、2、3的包按照比例1:2:3:4通过。 1.32

PON口

pon口的qos和acl功能做在pon板的交换芯片上实现的。 Pon口默认为严格优先级SP,一般不需要更改。

上联口的cos到queue的对应关系默认是一一对应的,但是可以进行修改。 查询cos到queue的对应关系用如下命令:

ZXAN(config)#show qos-user-side cos-queue-map-profile _DFT _COS_QUEUE_MAP_PRF --------------------------------------------------------- profile name : _DFT_COS_QUEUE_MAP_PRF profile detail :

cos-queue-map ---- cos : 0 1 2 3 4 5 6 7 ---- queue : 0 1 2 3 4 5 6 7 ---- drop : 1 1 1 1 1 1 1 1 profile used by : gpon-olt_1/5/1-8

如果需要穿件一个新的cos-queue映射模板,可以使用下面的命令: ZXAN(config)#qos-user-side cos-queue-map-profile que

ZXAN(cfg-cos2q-prf)#cos-queue-map cos0 0 1 cos1 1 1 cos2 2 1 cos3 3 1 cos4 4 1 cos5 5 1 cos6 6 1 cos7 7

ZXAN(config)#interface gpon-olt_1/8/2

ZXAN(config-if)#qos cos-queue-map-profile que

需要在pon口上执行这个的命令进行绑定后,COS到队列的映射才能生效。 A)、sp模式:

默认情况下上联口的优先级是sp形式。

ZXAN(config)#show qos-user-side queue-block-profile _DFT_QUEUE_BLOCK_PRF --------------------------------------------------------- profile name : _DFT_QUEUE_BLOCK_PRF

profile detail :

queue-block ---- queue_number : 0 1 2 3 4 5 6 7 ---- queue_weight : 0 0 0 0 0 0 0 0 ---- queue_depth : 48 48 48 48 48 48 48 48 profile used by : gpon-olt_1/5/1-8

此时,带有不同优先级的包通过上联口时保证高优先级的先通过 B)、wrr模式:

ZXAN(config)#qos-user-side queue-block-profile q1

ZXAN(cfg-queue-prf)#queue-block queue0 1 40 queue1 2 40 queue2 3 40 queue3 4 40 queue4 5 40 queue5 6 40 queue6 7 40 queue7 8 40

可以实现优先级对列发生拥塞情况下按照比例通过,上面的例子中,优先级为0 1 2 3 4 5 6 7的包的比例为1:2:3:4:5:6:7:8

ZXAN(config)#interface GPON-olt_1/8/2 ZXAN(config-if)#qos queue-block-profile q1

需要在pon口上执行这个的命令进行绑定后,这个pon口的wrr调度模式才能生效。 C)、wrr+sp模式:

wrr+sp模式和wrr模式配置方法类似,只是使用sp的队列权重配置0,并且配置的队列一定要从0到7的顺序,权重配置为0的队列后的队列的权重一定要为0。

1.33

ACL

1、acl有多种配置模式,如下,其中的hybrid包括所有的配置方式,建议使用hybrid进行配置。

ZXAN(config)#acl ?

extended Configure extended ACL hybrid Configure hybrid ACL link Configure link layer ACL standard Configure standard ACL

2、此处举个例子对源ip地址192.168.1.1、目的ip地址192.168.1.2进行过滤,其他流量的包全部通过:

A)、首先配置acl:

ZXAN(config)#acl hybrid number 320 ZXAN(config-hybd-acl)#

ZXAN(config-hybd-acl)#rule 1 deny ip 192.168.1.1 0.0.0.0 any any ZXAN(config-hybd-acl)#rule 2 permit ip any any any ZXAN(config-hybd-acl)#show acl 320 hybrid acl 320

rule 1 deny ip 192.168.1.1 0.0.0.0 any any ingress any egress any rule 2 permit ip any any any ingress any egress any hybrid代表配置为混合模式

rule 1 中deny表示匹配上该包即丢弃。

192.168.1.1 0.0.0.0------该处的0.0.0.0代表反掩码,表示匹配网段,如果该处反掩码为0.0.0.255,表示192.168.1.0 255.255.255.0网段

Rule 2 代表匹配任何包,记住:每个acl条目的最后都有个默认条目deny any,如果不想其他包被丢弃,最后一定要加一条rule 2 permit ip any any any ingress any egress any。

ZXAN(config-hybd-acl)#rule 4 permit ip any any any vlan-id 2000――根据VLAN进行流分类 Ingress后面是源mac地址参数;egress后面是目的mac地址参数。 B)、将该acl条目应用到端口上: 进入端口配置模式:

ZXAN(config)#interface gei_1/19/1 绑定到该端口:

ZXAN(config-if)#ip access-group 320 in 这样从端口19/1进入的包将被执行acl。 C)、查看acl绑定情况:

ZXAN(config-if)#show access-list bound

Interface Bound Type ACL gei_1/19/1 in V4HYBD 320

同样的acl可以绑定在pon口对从onu上来的包进行acl过滤,通过命令如下命令进行绑定:

ZXAN(config)#interface GPON-olt_1/8/2 ZXAN(config-if)#ip access-group 320 in

通过该例子可以看到acl的作用,acl还有很多功能,请对照提示命令进行配置,在此不一一例举。

常用查询命令:

查询某acl绑定了哪个端口的命令:

ZXAN(config)#show access-list bound

查询某端口绑定了哪条ACL的命令:

ZXAN(config-hybd-acl)#show run interface gei_1/19/1 1.34

流限速

对上联口进入的包进行限速: A)、配置acl,并绑定到某个上联口或PON口: ZXAN(config-hybd-acl)#show acl 320 hybrid acl 320

rule 1 permit ip 192.168.1.1 0.0.0.0 192.168.1.2 0.0.0.0 any ingress any egress any rule 2 permit ip any any any ingress any egress any

进入端口配置模式:

ZXAN(config)#interface gei_1/19/1 绑定到该端口:

ZXAN(config-if)#ip access-group 320 in

这样从端口19/1进入的包将被进行区分。 B)、配置流限速:

把端口区分出来rule 1流进行限速1M,如下所示:

ZXAN(config)#traffic-limit in 320 rule-id 1 cir 1024 cbs 2000 ebs 2000 mode blind drop-yellow 这样就可以对该源ip为192.168.1.1、目的ip为192.168.1.2的包进行限速1M

解释:

320 rule-id 1代表acl 320的rule 1,匹配了该条目的包进行该操作 Cir代表流量大小,该处配置需要限速的大小即可 Cbs代表缓存,该缓存满了的时候,把包打上黄色 Ebs代表另外一个缓存,满的时候把包打上红色

blind drop-yellow代表丢弃黄色包,当流量操作限制后所有包都会先变成黄色,这样所有超过设置流量的包均被丢弃。

注意:

流量限速是按照净荷进行计算的

同样的操作可以用在内联口,对上行流区分限速。

流量整形可以对出口限速,有时对上行流区分还可以使用流量整形。 1.35

改变优先级

A)、配置acl,并绑定到某个上联口或pon口: ZXAN(config-hybd-acl)#show acl 320 hybrid acl 320

rule 1 permit ip 192.168.1.1 0.0.0.0 192.168.1.2 0.0.0.0 any ingress 0000.4444.2222 egress any

rule 2 permit ip any any any ingress any egress any 进入端口配置模式:

ZXAN(config)#interface gei_1/19/1 绑定到该端口:

ZXAN(config-if)#ip access-group 320 in

这样从端口19/1进入的包将被进行区分。 B)、对流配置优先级:

ZXAN(config)#priority-mark in 320 rule-id 1 cos 6

这样就可以对该源ip为192.168.1.1、目的ip为192.168.1.2、并且源MAC地址为0000.4444.2222、目的mac地址任意的包打上优先级6

解释:

320 rule-id 1代表acl 320的rule 1,匹配了该条目的包进行打优先级6的操作。 1.36

流量统计

统计19槽位上联板1号口上源地址为0000.0000.00a1的报文: ZXAN(config)#show acl link acl 200

rule 1 permit any ingress 0000.0000.00a1 0000.0000.0000 egress any rule 2 permit any ingress 0000.0000.00a2 0000.0000.0000 egress any 流量统计绑定ACL:

ZXAN(config)#traffic-statistics in 200 rule-id 1 pkt-type all statistics-type byte 绑定端口:

ZXAN(config)#interface gei_1/19/1

ZXAN(config-if)#ip access-group 200 in 查询统计值,需要连续查询看变化差值: ZXAN(config)#show traffic-statistics 200

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4