Configuring PHB for Flow Classified by L3 ACL

Per-Hop-Behavior (PHB) is a description of the externally observable forwarding behavior applied at a Differentiated Services (DS)-compliant node to a DS behavior aggregate. Reference: RFC 3260. Or in other words, PHB is the way how the nodes would apply the type of QoS on the packets by examining the DSCP value. PHB would apply to shaping, policing, and queuing components of QoS.

The COS values such as VLAN 1P priority, IP DSCP, MPLS EXP can be remarked for flows classified through L2 ACL /L3 ACL (Access Control List) by configuring the Per Hop behavior (PHB) for the flows.

The listed below configuration steps are for remarking QoS priority value (done by configuring the parameter “default-priority-type ipDscp 0”) using PHB configuration for the flow classified by using the L3 ACL.

  1. Enable Port 1.

    Type the following:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enter Interface Configuration Mode.
    iS5comm(config)# interface gigabitethernet 0/2
    iS5comm(config-if)# no shutdown
    • Exit the Interface Configuration Mode
    iS5comm(config-if)# exit
  2. Enable QoS.

    Type the following:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enable the QoS.
    iS5comm(config)# qos enable
  3. Create an L3 ACL filter for TCP packets on port 2.

    Type the following:

    • Create an IP access control list.
    iS5comm(config)# ip access-list extended 1002
    • Configure the ACL with the following parameters to permit the following packets.
      • tcp—for TCP protocol
      • any—for packets from any source IP address
      • any—for packets to any destination IP address
      • priority 3—for packets with priority 3 (this is a mandatory parameter)
    iS5comm(config-ext-nacl)# permit tcp any any priority 3
    • Exit the ACL Configuration Mode
    iS5comm(config-ext-nacl)# exit
    • Enter Interface Configuration Mode.
    iS5comm(config)# interface gigabitethernet 0/2
    • Apply the created ACL to the selected interface, where 1002 is the ACL number and “in” stands for inbound packets related configuration.
    iS5comm(config-if)# ip access-group 1002 in
    • Exit the Interface Configuration Mode
    iS5comm(config-if)# exit
  4. Create a class map, set a class, and create a policy map.

    Type the following:

    • Create a class map 30.
    iS5comm(config)# class-map 30
    • Configure the match criteria for the class-map.
    iS5comm(config-cls-map)# set class 6
    iS5comm(config-cls-map)# match access-group ip-access-list 1002
    iS5comm(config-cls-cmap)# exit
    iS5comm(config)# queue-map class 6 queue-id 4
    Note:

    The following message appears: “Delete and re-create the policy-map and meter entries with conform / exceed / violate configuration already created for this CLASS (if already done).If not removed the earlier configured policy and/or meter information will not be updated int he hardware.” Note that this is a warning message used to notify user in case of other scenarios where policy map and queue map coexist.

    S5comm# show policy-map
    QoS Policy Map Entries
    ----------------------
    PolicyMapId  : 1
    IfIndex      : 0
    Class        : 1
    DefaultPHB   : None.
    MeterId      : 0
    ConNClass    : 0
    ExcNClass    : 0
    VioNClass    : 0
    ConfAct      : None.
    ExcAct       : None.
    VioAct       : None.
    • Create a policy map to associate with the class map already created and to apply on the packet before forwarding it.
    iS5comm(config)# policy-map 30
    • Map the class to the policy map created for the port Gi 0/2.
    Note:

    The Class value is used to link the policy and class map. “IpDSCP” is to configure

    the default priority type is IP DSCP priority with a value of 0 (“best effort”).
    iS5comm(config-ply-map)# set policy class 6 default-priority-type ipDscp 0
    iS5comm(config-ply-map)#end
  5. View the configuration detail.

    Type the following.

    iS5comm# show policy-map 30
    QoS Policy Map Entries
    ----------------------
    PolicyMapId  : 30
    IfIndex      : 0
    Class        : 6
    DefaultPHB   : IP DSCP
    PHB Value    : 2
    MeterId      : 0
    ConNClass    : 0
    ExcNClass    : 0
    VioNClass    : 0
    ConfAct      : None.
    ExcAct       : None.
    VioAct       : None.
    iS5comm# show access-lists 1002
    Extended IP Access List 1002
    -----------------------------
    Filter Priority                  : 3
    Filter Protocol Type             : TCP
    IP address Type                  : IPV4
    Source IP address                : 0.0.0.0
    Source IP address mask           : 0.0.0.0
    Source IP Prefix Length          : 0
    Destination IP address           : 0.0.0.0
    Destination IP address mask      : 0.0.0.0
    Destination IP Prefix Length     : 0
    Flow Identifier                  : 0
    In Port List                     : Gi0/2
    Out Port List                    : NIL
    Filter TOS                       : NIL
    Filter DSCP                      : NIL
    Filter Source Ports From         : 0
    Filter Source Ports Till         : 65535
    acce
    Filter Destination Ports From    : 0
    Filter Destination Ports Till    : 65535
    Service Vlan                     : 0
    Service Vlan Priority            : 0
    Customer Vlan                    : 0
    Customer Vlan Priority           : 0
    Packet Tag Type                  : Single-tag
    Filter Action                    : Permit
    Redirect Port List               : NIL
    TrafficDistField                 : Unknown
    Sub Action                       : NONE
    Sub Action Id                    : 0
    Status                           : Active
    iS5comm# show queue-map
    QoS Queue Map Entries
    ---------------------
    IfIndex    CLASS      PriorityType    Priority Value  Mapped Queue
    ---------- ---------- --------------- --------------- ---------------
    0          none       VlanPri         0               1
    0          none       VlanPri         1               2
    0          none       VlanPri         2               3
    0          none       VlanPri         3               4
    0          none       VlanPri         4               5
    0          none       VlanPri         5               6
    0          none       VlanPri         6               7
    0          none       VlanPri         7               8
    0          6          none            0               4