Configuring an SR-MPLS TE Group to Implement Differentiated Services
When ECMP outbound interfaces contain SR-MPLS TE tunnel interfaces, you can configure an SR-MPLS TE group to preferentially forward important services.
Pre-configuration Tasks
Before configuring an SR-MPLS TE group to implement differentiated services, complete the following tasks:
- Configure an SR-MPLS TE tunnel. For details, see Configuring an SR-MPLS TE Tunnel.
- Import traffic to the SR-MPLS TE tunnel. For details, see Importing Traffic to an SR-MPLS TE Tunnel.
Setting the CoS of Packets
Context
Packet priority mapping
For packets entering a tunnel, the DSCP or EXP field in the packet header is mapped to the forwarding priority according to the mapping relationship defined in the DiffServ domain. The internal priority obtained through mapping is the CoS of the packets.
If you want to select a tunnel to forward service packets based on the original priority of the packets or change the priority of the original service packets, use this mode.
MQC re-marking
For packets entering a tunnel, the packets are classified based on the IP 5-tuple information in the packets, and the internal priority of the packets matching the traffic classifier rules is re-marked. The re-marked interval priority is the CoS of the packets.
If you do not want to select a tunnel to forward packets based on the original priority of the packets or the packets do not carry any priority information, use this mode.
Perform the following steps on the ingress node of an SR-MPLS TE tunnel.
Procedure
- Configure packet priority mapping.
After packet priority mapping is configured on the ingress node of an SR-MPLS TE tunnel, the internal priority obtained through mapping is the CoS of the packets. For details, see Configuring Priority Mapping in CloudEngine 12800 and 12800E Series Switches QoS Configuration Guide.
By default, the device maps the priority of original packets to the internal priority based on the mapping defined in the default domain.
- Configure MQC re-marking.
- Configure a traffic classifier.
Run system-view
The system view is displayed.
- Run traffic classifier classifier-name [ type { and | or } ]
A traffic classifier is created and the traffic classifier view is displayed, or the view of an existing traffic classifier is displayed.
and is the logical operator between rules in a traffic classifier, which means that:If a traffic classifier contains ACL rules, packets match the traffic classifier only if they match one ACL rule and all the non-ACL rules.
If a traffic classifier does not contain any ACL rules, packets match the traffic classifier only if they match all the rules in the classifier.
By default, the relationship between rules in a traffic classifier is or.
Run if-match acl { acl-number | acl-name }
An ACL is used to define a traffic classification rule, traffic classification is performed based on the IP 5-tuple information carried in packets.
- If an ACL is used to define a traffic classification rule, configure the ACL first. In the ACL, you must specify the destination IP address of packets matching the ACL, and the mask length of the specified destination IP address must be greater than or equal to that of the destination network segment route.
- If an ACL in a traffic classifier defines multiple rules, a packet matches the ACL as long as it matches one of the rules, regardless of whether the relationship between rules in the traffic classifier is AND or OR.
Run commit
The configuration is committed.
Run quit
Exit from the traffic classifier view.
- Configure traffic behavior.
Run traffic behavior behavior-name
A traffic behavior is created and the traffic behavior view is displayed, or the existing traffic behavior view is displayed.
Run remark local-precedence { local-precedence-name | local-precedence-value } [ green | yellow | red ]
Packets matching the traffic classifier are re-marked with an internal precedence.
Run commit
The configuration is committed.
Run quit
Exit from the traffic behavior view.
- Configure a traffic policy.
Run traffic policy policy-name
A traffic policy is created and the traffic policy view is displayed, or the view of an existing traffic policy is displayed.
Run classifier classifier-name behavior behavior-name [ precedence precedence-value ]
A traffic behavior is bound to a traffic classifier in the traffic policy.
Run commit
The configuration is committed.
Run quit
Exit from the traffic policy view.
- Apply the traffic policy.
For details about the configuration guidelines of applying traffic policies in different views on the CE12800, see Licensing Requirements and Limitations for MQC (CE12800).
For details about the configuration guidelines of applying traffic policies in different views on the CE12800E, see Licensing Requirements and Limitations for MQC (CE12800E).
For the CE12800 and the CE12800E equipped with FD-X series cards, run the display traffic-policy pre-state { global [ slot slot-id ] | interface { interface-type interface-number } | vlan vlan-id | bridge-domain bd-id } policy-name { inbound | outbound } command before committing the configuration to check the information about resources occupied by the traffic policy to be applied and determine whether the traffic policy can be successfully applied based on the information.
- If a traffic policy needs to be applied to multiple VLANs and interfaces or multiple traffic classifiers for matching packets from different source IP addresses need to be bound to the same traffic policy, you are advised to add these VLANs, source IP addresses, and interfaces to the same QoS group and apply the traffic policy to the QoS group.
Run interface interface-type interface-number[.subinterface-number ]
The interface view or layer 3 sub-interface view is displayed.
Run traffic-policy policy-name inbound
A traffic policy is applied to the interface in the inbound direction.
Run commit
The configuration is committed.
- Configure a traffic classifier.
Setting the CoS Value for a TE Tunnel
Context
An SR-MPLS TE group consists of several SR-MPLS TE tunnels that forward service packets based on the mapping between the CoS value of tunnels and CoS value of service packets, implementing differentiated services. One SR-MPLS TE tunnel can have one or more CoS values.
Perform the following steps on the ingress node of an SR-MPLS TE tunnel.
Procedure
- Run system-view
The system view is displayed.
- Run interface tunnel interface-number
The SR-MPLS TE tunnel interface view is displayed.
- Run mpls te service-class { service-class &<1-8> | default }
The CoS value of a tunnel is configured.
By default, no CoS value is configured for a tunnel.
When packets are mapped to the CS6 or CS7, the packets need to be processed with the highest priority, and the packets are forwarded through the same tunnel.
- Run commit
The configuration is committed.
(Optional) Enabling the Enhanced SR-MPLS TE Group Forwarding Mode
Context
In an SR-MPLS TE group scenario, tunnels of some service classes flap. To prevent packet loss of other service classes and improve ECMP switching performance, enable the enhanced SR-MPLS TE group forwarding mode.
Perform the following steps on the ingress node of an SR-MPLS TE tunnel.
Procedure
- Run system-view
The system view is displayed.
- Run segment-routing group enhanced enable
The enhanced SR-MPLS TE group forwarding mode is enabled.
By default, the enhanced SR-MPLS TE group forwarding mode is disabled.
After the enhanced segment routing MPLS (SR-MPLS) TE group forwarding mode is enabled, you can disable this function only after 300s. After the enhanced segment routing MPLS (SR-MPLS) TE group forwarding mode is disabled, you can enable this function only after 300s.
- Run commit
The configuration is committed.
(Optional) Enabling Traffic Statistics Collection Based on the Service Class of an SR-MPLS TE Tunnel
Context
To check the network status or locate network faults, you can enable traffic statistics collection on SR-MPLS TE tunnel interfaces and collect traffic statistics on the interfaces. To learn more about traffic statistics of different service classes, you can enable traffic statistics collection based on the service class of an SR-MPLS TE tunnel.
Procedure
- Run system-view
The system view is displayed.
- interface tunnel interface-number
The tunnel interface view of a TE tunnel is displayed.
- Run tunnel-protocolmpls te
The tunneling protocol is set to MPLS TE.
- Run mpls te signal-protocol segment-routing
The signaling protocol is set to SR.
By default, RSVP-TE is used as the signaling protocol of a tunnel.
- Run statistic enable
Traffic statistics collection is enabled for the SR-MPLS TE tunnel.
By default, traffic statistics collection is disabled for an SR-MPLS TE tunnel.
- Run mpls te service-class { service-class &<1-8> }
The service class of the tunnel is set.
By default, no service class is configured for a tunnel.
When packets are mapped to CS6 or CS7, the packets need to be processed with the highest priority and will be forwarded through the same tunnel.
- Run statistic service-class enable
Traffic statistics collection based on the service class of the SR-MPLS TE tunnel is enabled.
By default, traffic statistics collection based on the service class of an SR-MPLS TE tunnel is disabled.
- Run commit
The configuration is committed.
Verifying the SR-MPLS TE Group Configuration
Procedure
- Run the display diffserv domain [ brief | ds-domain-name ] command to check the DiffServ domain configuration.
- Run the display mpls te tunnel [ destination ip-address ] [ lsp-id ingress-lsr-id session-id local-lsp-id ] [ lsr-role { all | egress | ingress | remote | transit } ] [ name tunnel-name ] [ { incoming-interface | interface | outgoing-interface } interface-type interface-number ] [ verbose ] command to check the tunnel information.
- Run the display mpls te tunnel-interface [ tunnel interface-number ] command to check information about the tunnel interfaces on the ingress node.