• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

S5800与IMC配合使用user-profile限速不成功案例分析

  • 0关注
  • 1收藏 1526浏览
粉丝:3人 关注:0人

某职教中心使用S5800作为接入交换机,在S5800上启用Portal认证对接入用户进行控制。客户希望能对每位上线用户进行限速。大部分中低端交换机不支持IMC直接下发带宽限速,但可以使用user-profileIMC配合进行限速。

当前配置限速是成功的用户下载速度在400KB左右,限速成功。

客户有内网FTP服务器,希望对这些FTP服务器地址不做限速。增加一个CB对,放通部分地址,配置如下:

acl number 3000

 description TO-FWQ

 rule 1 permit ip destination 10.1.129.0 0.0.0.255

 rule 5 permit ip source 10.1.140.0 0.0.0.255

 rule 6 permit ip destination 10.1.140.0 0.0.0.255

 rule 10 permit ip source 10.1.130.0 0.0.0.255

 rule 20 permit ip destination 10.1.130.0 0.0.0.255

 

qos policy xiansu

classifier 3000 behavior 3000

classifier 3001 behavior 3001

qos policy xiansu-xia

classifier 3000 behavior 3000(增加的配置)

classifier 3002 behavior 3002

#

user-profile xiansu

qos apply policy xiansu inbound

qos apply policy xiansu-xia outbound

增加配置后,发现限速会失效,用户下载速度会达到1MB以上。

1、查看当前配置

 acl number 3000

description TO-FWQ

rule 1 permit ip destination 10.1.129.0 0.0.0.255

rule 5 permit ip source 10.1.140.0 0.0.0.255

rule 6 permit ip destination 10.1.140.0 0.0.0.255

rule 10 permit ip source 10.1.130.0 0.0.0.255

rule 20 permit ip destination 10.1.130.0 0.0.0.255

acl number 3001

description shangwang

rule 10 permit ip source 10.1.0.0 0.0.255.255

acl number 3002

rule 10 permit ip destination 10.1.0.0 0.0.255.255

acl number 3003

rule 10 permit ip source 10.1.130.0 0.0.0.255

rule 20 permit ip destination 10.1.130.0 0.0.0.255

 

 traffic behavior 3001

car cir 2000 cbs 125000 ebs 512 green pass red discard yellow pass

traffic behavior 3002

car cir 4000 cbs 25000 ebs 512 green pass red discard yellow pass

traffic behavior 3000

filter permit

 

 qos policy xiansu

classifier 3000 behavior 3000

classifier 3001 behavior 3001

qos policy xiansu-xia

classifier 3000 behavior 3000

classifier 3002 behavior 3002

 

user-profile xiansu

qos apply policy xiansu inbound

qos apply policy xiansu-xia outbound

配置无问题,查看底层ACL下发情况。

2、查看底层ACL下发

Acl-Type MQC UserProfile , Stage IFP, GroupPri 13, EntryID 157, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 518, Prio_Sub 15,Slice 2,SliceIdx 0

Rule Match --------

        Ports: 0x4000000000000, 0x7c3fc3ffffffff

        Lookup: STP forwarding, 0x18, 0x18

        Outer Vlan: 0x83, 0xfff

        Source IP: 10.1.133.20, 255.255.255.255

        Dest IP: 10.1.129.0, 255.255.255.0

        IP Type: Any IPv4 packet

Actions --------

        Redirect do NOT

        Permit

 

Acl-Type MQC UserProfile , Stage IFP, GroupPri 13, EntryID 158, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 518, Prio_Sub 15,Slice 2,SliceIdx 1

Rule Match --------

        Ports: 0x4000000000000, 0x7c3fc3ffffffff

        Lookup: STP forwarding, 0x18, 0x18

        Outer Vlan: 0x83, 0xfff

        Source IP: 10.1.133.20, 255.255.255.255

        IP Type: Any IPv4 packet

Actions --------

        Redirect do NOT

        Permit

 

Acl-Type MQC UserProfile , Stage IFP, GroupPri 13, EntryID 159, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 518, Prio_Sub 15,Slice 2,SliceIdx 2

Rule Match --------

        Ports: 0x4000000000000, 0x7c3fc3ffffffff

        Lookup: STP forwarding, 0x18, 0x18

        Outer Vlan: 0x83, 0xfff

        Source IP: 10.1.133.20, 255.255.255.255

        Dest IP: 10.1.140.0, 255.255.255.0

        IP Type: Any IPv4 packet

Actions --------

        Redirect do NOT

        Permit

 

Acl-Type MQC UserProfile , Stage IFP, GroupPri 13, EntryID 160, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 518, Prio_Sub 15,Slice 2,SliceIdx 3

Rule Match --------

        Ports: 0x4000000000000, 0x7c3fc3ffffffff

        Lookup: STP forwarding, 0x18, 0x18

        Outer Vlan: 0x83, 0xfff

        Source IP: 10.1.133.20, 255.255.255.255

        IP Type: Any IPv4 packet

Actions --------

        Redirect do NOT

        Permit

 

Acl-Type MQC UserProfile , Stage EFP, GroupPri 515, EntryID 423, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 262, Prio_Sub 15,Slice 0,SliceIdx 0

Rule Match --------

        Out Port: 50

        Outer Vlan: 0x83, 0xfff

        Dest IP: 10.1.133.20, 255.255.255.255

        IP Type: Any IPv4 packet

Actions --------

        Permit

 

Acl-Type MQC UserProfile , Stage EFP, GroupPri 515, EntryID 428, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 262, Prio_Sub 15,Slice 0,SliceIdx 5

Rule Match --------

        Out Port: 50

        Outer Vlan: 0x83, 0xfff

        Dest IP: 10.1.133.20, 255.255.255.255

        IP Type: Any IPv4 packet

Actions --------

        CAR cir 0xfa0, cbs 0xc8, pir 0xfa0, pbs 0x4, mode srTCM color blind

        Account mode  packets,  green and red

        Grn Permit

        Red Deny

        Yel Permit

以上是截取的部分底层ACL下发信息,以入方向的某条ACL下发为例:

这是底层下发的ACL

Acl-Type MQC UserProfile , Stage IFP, GroupPri 13, EntryID 157, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 518, Prio_Sub 15,Slice 2,SliceIdx 0

Rule Match --------

        Ports: 0x4000000000000, 0x7c3fc3ffffffff

        Lookup: STP forwarding, 0x18, 0x18

        Outer Vlan: 0x83, 0xfff

        Source IP: 10.1.133.20, 255.255.255.255

        Dest IP: 10.1.129.0, 255.255.255.0

        IP Type: Any IPv4 packet

Actions --------

        Redirect do NOT

        Permit

这是实际配置的ACL

 acl number 3000

rule 1 permit ip destination 10.1.129.0 0.0.0.255

qos policy xiansu

classifier 3000 behavior 3000

classifier 3001 behavior 3001

user-profile xiansu

qos apply policy xiansu inbound

从实际配置和下发的情况来看,入方向(inbound)的策略里SIP字段会被用户IP代替。

再看出方向

这是底层下发的ACL

Acl-Type MQC UserProfile , Stage EFP, GroupPri 515, EntryID 426, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 262, Prio_Sub 15,Slice 0,SliceIdx 3

Rule Match --------

        Out Port: 50

        Outer Vlan: 0x83, 0xfff

        Source IP: 10.1.130.0, 255.255.255.0

        Dest IP: 10.1.133.20, 255.255.255.255

        IP Type: Any IPv4 packet

Actions --------

        Permit

这是实际配置的ACL

 acl number 3000

rule 10 permit ip source 10.1.130.0 0.0.0.255

qos policy xiansu-xia

classifier 3000 behavior 3000

classifier 3002 behavior 3002

user-profile xiansu

qos apply policy xiansu-xia outbound

从实际配置和下发的情况来看,出方向(outbound)的策略里DIP字段会被用户IP代替。

之所以增加出方向CB3000会导致限速失效也是因为其rule 1中的permit ip destination 10.1.129.0 0.0.0.255在出方向时被替换成客户端自身的IP地址10.1.133.20

qos policy xiansu-xia

classifier 3000 behavior 3000(增加的配置)

acl number 3000

description TO-FWQ

rule 1 permit ip destination 10.1.129.0 0.0.0.255

rule 5 permit ip source 10.1.140.0 0.0.0.255

rule 6 permit ip destination 10.1.140.0 0.0.0.255

rule 10 permit ip source 10.1.130.0 0.0.0.255

rule 20 permit ip destination 10.1.130.0 0.0.0.255

 

Acl-Type MQC UserProfile , Stage EFP, GroupPri 515, EntryID 423, Active

Health 1, PoolFree 0, PoolID 0, Prio_Mjr 262, Prio_Sub 15,Slice 0,SliceIdx 0

Rule Match --------

        Out Port: 50

        Outer Vlan: 0x83, 0xfff

        Dest IP: 10.1.133.20, 255.255.255.255

        IP Type: Any IPv4 packet

Actions --------

        Permit

因而该客户端下行方向数据包直接通过,未匹配限速的规则。

对于基于user-profileMQC策略,如果下发到出方向(outbound),那么策略中的rule不能配置DIP,因为这个字段会被上线用户的IP所替换。

同理,下发到入方向(inbound)的策略里,也不能包括SIP,这个字段也会被用户IP替换。

所以,现场的配置有些问题,需要调整。在入方向要删除带有SIP字段的rule,出方向删除带有DIPrule。在入方向,SIP为客户端IP,只需对DIP做限制;在出方向,DIP为客户端IP,只需对SIP做限制。修改配置也不会影响效果。

user-profile调用时不会检查ACL的配置,所以需要大家提前了解规避。

该案例对您是否有帮助:

您的评价:1

若您有关于案例的建议,请反馈:

作者在2019-06-11对此案例进行了修订
2 个评论
粉丝:0人 关注:0人

不止是5800,我之前用SR88也遇到这个问题了,排查了好久。

文枫 知了小白
粉丝:0人 关注:1人

这个坑太大了,本来想通过IMC来下发,没想到整得更复杂了

编辑评论

举报

×

侵犯我的权益 >
对根叔知了社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔知了社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作