Configuring Static CoS for an L2TP LNS Inline Service
Before you begin, configure the L2TP LNS inline service interface. See Configuring an L2TP LNS with Inline Service Interfaces.
You can configure hierarchical scheduling for an L2TP LNS inline service and manage the IP header values using rewrite rules and classifiers.
To configure static CoS for an L2TP LNS inline service:
- Configure the hierarchical scheduler for the service interface
(
si
) interface.[edit interfaces si-fpc/port/pic ] user@host# set hierarchical-scheduler maximum-hierarchy-levels 2
Best Practice:To enable Level 3 nodes in the LNS scheduler hierarchy and to provide better scaling, we recommend that you also specify a maximum of two hierarchy levels.
- Configure the LNS to reflect the IP ToS value in the inner
IP header to the outer IP header.
[edit services l2tp tunnel-group name] user@host# set tos-reflect
- Configure the classifier for egress traffic from the LAC:
- Define the fixed or behavior aggregate (BA) classifier.
To configure a fixed classifier:
[edit class-of-service interfaces si-fpc/port/pic unit logical-unit-number] user@host# set forwarding-class class-name
To configure a BA classifier:
[edit class-of-service] user@host# set classifiers (dscp | dscp-ipv6 | inet-precedence) classifier-name forwarding-class class-name loss-priority level code-points [ aliases ] [ bit-patterns]
- Apply the classifier to the service interface.
To apply the classifier for the DSCP or DSCP IPv6 value:
[edit class-of-service interfaces si-fpc/port/pic unit logical-unit-number classifiers] user@host# set dscp (classifier-name | default) user@host# set dscp-ipv6 (classifier-name | default)
To apply the classifier for the ToS value:
[edit class-of-service interfaces si-fpc/port/pic unit logical-unit-number classifiers] user@host# set inet-precedence (classifier-name | default)
- Define the fixed or behavior aggregate (BA) classifier.
- Configure and apply a rewrite-rule to ingress traffic
to the LAC:
- Configure the rewrite rule with the forwarding class and
the loss priority value.
[edit class-of-service] user@host# set rewrite-rules (dscp | dscp-ipv6 | inet-precedence) rewrite-name forwarding-class class-name loss-priority level code-point (alias | bits)
- Apply the rewrite rule to the service interface.
To apply the rewrite rule for the DSCP or DSCP IPv6 value:
[edit class-of-service interfaces si-fpc/port/pic unit logical-unit-number rewrite-rules] user@host# set dscp(rewrite-name | <default>) protocol protocol-types user@host# set dscp-ipv6 (rewrite-name | <default>)
To apply the rewrite rule for the ToS value:
[edit class-of-service interfaces si-fpc/port/pic unit logical-unit-number rewrite-rules] user@host# set inet-precedence (rewrite-name | <default>) protocol protocol-types
- Configure the rewrite rule with the forwarding class and
the loss priority value.
- (Optional) Configure additional adjustments for downstream
ATM traffic.
By default, the shaping calculation on the service interface includes the L2TP encapsulation. If necessary, you can configure additional adjustments for downstream ATM traffic from the LAC or differences in Layer 2 protocols.
[edit class-of-service traffic-control-profiles profile-name] user@host# set overhead-accounting (frame-mode | cell-mode) <bytes byte-value
- Apply the traffic-control profile.
[edit class-of-service interfaces si-fpc/port/pic unit logical-unit-number] user@host#
set output-traffic-control-profile profile-name
Best Practice:To limit bandwidth for tunneled sessions with default CoS configurations, we recommend that you also configure CoS for the remaining traffic on the static service interface.
[edit class-of-service interfaces si-fpc/port/pic ] user@host# set output-traffic-control-profile-remaining profile-name