- play_arrow Overview
- play_arrow Understanding How Class of Service Manages Congestion and Defines Traffic Forwarding Behavior
- Understanding How Class of Service Manages Congestion and Controls Service Levels in the Network
- How CoS Applies to Packet Flow Across a Network
- The Junos OS CoS Components Used to Manage Congestion and Control Service Levels
- Mapping CoS Component Inputs to Outputs
- Default Junos OS CoS Settings
- Packet Flow Through the Junos OS CoS Process Overview
- Configuring Basic Packet Flow Through the Junos OS CoS Process
- Example: Classifying All Traffic from a Remote Device by Configuring Fixed Interface-Based Classification
- Interface Types That Do Not Support Junos OS CoS
-
- play_arrow Configuring Platform-Specific Functionality
- play_arrow Configuring Class of Service on ACX Series Universal Metro Routers
- CoS on ACX Series Routers Features Overview
- Understanding CoS CLI Configuration Statements on ACX Series Routers
- DSCP Propagation and Default CoS on ACX Series Routers
- Configuring CoS on ACX Series Routers
- Classifiers and Rewrite Rules at the Global, Physical, and Logical Interface Levels Overview
- Configuring Classifiers and Rewrite Rules at the Global and Physical Interface Levels
- Applying DSCP and DSCP IPv6 Classifiers on ACX Series Routers
- Schedulers Overview for ACX Series Routers
- Shared and Dedicated Buffer Memory Pools on ACX Series Routers
- CoS for PPP and MLPPP Interfaces on ACX Series Routers
- CoS for NAT Services on ACX Series Routers
- Hierarchical Class of Service in ACX Series Routers
- Storm Control on ACX Series Routers Overview
- play_arrow Configuring Class of Service on MX Series 5G Universal Routing Platforms
- Junos CoS on MX Series 5G Universal Routing Platforms Overview
- CoS Features and Limitations on MX Series Routers
- Configuring and Applying IEEE 802.1ad Classifiers
- Scheduling and Shaping in Hierarchical CoS Queues for Traffic Routed to GRE Tunnels
- Example: Performing Output Scheduling and Shaping in Hierarchical CoS Queues for Traffic Routed to GRE Tunnels
- CoS-Based Interface Counters for IPv4 or IPv6 Aggregate on Layer 2
- Enabling a Timestamp for Ingress and Egress Queue Packets
- play_arrow Configuring Class of Service on PTX Series Packet Transport Routers
- CoS Features and Limitations on PTX Series Routers
- CoS Feature Differences Between PTX Series Packet Transport Routers and T Series Routers
- Understanding Scheduling on PTX Series Routers
- Virtual Output Queues on PTX Series Packet Transport Routers
- Example: Configuring Excess Rate for PTX Series Packet Transport Routers
- Identifying the Source of RED Dropped Packets on PTX Series Routers
- Configuring Queuing and Shaping on Logical Interfaces on PTX Series Routers
- Example: Configuring Queuing and Shaping on Logical Interfaces in PTX Series Packet Transport Routers
- Example: Configuring Strict-Priority Scheduling on a PTX Series Router
- CoS Support on EVPN VXLANs
- Understanding CoS CLI Configuration Statements on PTX Series Routers
- Classification Based on Outer Header of Decapsulation Tunnel
-
- play_arrow Configuring Line Card-Specific and Interface-Specific Functionality
- play_arrow Feature Support of Line Cards and Interfaces
- play_arrow Configuring Class of Service for Tunnels
- play_arrow Configuring Class of Service on Services PICs
- CoS on Services PICs Overview
- Configuring CoS Rules on Services PICs
- Configuring CoS Rule Sets on Services PICs
- Example: Configuring CoS Rules on Services PICs
- Packet Rewriting on Services Interfaces
- Multiservices PIC ToS Translation
- Fragmentation by Forwarding Class Overview
- Configuring Fragmentation by Forwarding Class
- Configuring Drop Timeout Interval for Fragmentation by Forwarding Class
- Example: Configuring Fragmentation by Forwarding Class
- Allocating Excess Bandwidth Among Frame Relay DLCIs on Multiservices PICs
- Configuring Rate Limiting and Sharing of Excess Bandwidth on Multiservices PICs
- play_arrow Configuring Class of Service on IQ and Enhanced IQ (IQE) PICs
- CoS on Enhanced IQ PICs Overview
- Calculation of Expected Traffic on IQE PIC Queues
- Configuring the Junos OS to Support Eight Queues on IQ Interfaces for T Series and M320 Routers
- BA Classifiers and ToS Translation Tables
- Configuring ToS Translation Tables
- Configuring Hierarchical Layer 2 Policers on IQE PICs
- Configuring Excess Bandwidth Sharing on IQE PICs
- Configuring Rate-Limiting Policers for High Priority Low-Latency Queues on IQE PICs
- Applying Scheduler Maps and Shaping Rate to Physical Interfaces on IQ PICs
- Applying Scheduler Maps to Chassis-Level Queues
- play_arrow Configuring Class of Service on Ethernet IQ2 and Enhanced IQ2 PICs
- CoS on Enhanced IQ2 PICs Overview
- CoS Features and Limitations on IQ2 and IQ2E PICs (M Series and T Series)
- Differences Between Gigabit Ethernet IQ and Gigabit Ethernet IQ2 PICs
- Shaping Granularity Values for Enhanced Queuing Hardware
- Ethernet IQ2 PIC RTT Delay Buffer Values
- Configuring BA Classifiers for Bridged Ethernet
- Setting the Number of Egress Queues on IQ2 and Enhanced IQ2 PICs
- Configuring the Number of Schedulers per Port for Ethernet IQ2 PICs
- Applying Scheduler Maps to Chassis-Level Queues
- CoS for L2TP Tunnels on Ethernet Interface Overview
- Configuring CoS for L2TP Tunnels on Ethernet Interfaces
- Configuring LNS CoS for Link Redundancy
- Example: Configuring L2TP LNS CoS Support for Link Redundancy
- Configuring Shaping on 10-Gigabit Ethernet IQ2 PICs
- Configuring Per-Unit Scheduling for GRE Tunnels Using IQ2 and IQ2E PICs
- Understanding Burst Size Configuration on IQ2 and IQ2E Interfaces
- Configuring Burst Size for Shapers on IQ2 and IQ2E Interfaces
- Configuring a CIR and a PIR on Ethernet IQ2 Interfaces
- Example: Configuring Shared Resources on Ethernet IQ2 Interfaces
- Configuring and Applying IEEE 802.1ad Classifiers
- Configuring Rate Limits to Protect Lower Queues on IQ2 and Enhanced IQ2 PICs
- Simple Filters Overview
- Configuring a Simple Filter
- play_arrow Configuring Class of Service on 10-Gigabit Ethernet LAN/WAN PICs with SFP+
- CoS on 10-Gigabit Ethernet LAN/WAN PIC with SFP+ Overview
- BA and Fixed Classification on 10-Gigabit Ethernet LAN/WAN PIC with SFP+ Overview
- DSCP Rewrite for the 10-Gigabit Ethernet LAN/WAN PIC with SFP+
- Configuring DSCP Rewrite for the 10-Gigabit Ethernet LAN/WAN PIC
- Queuing on 10-Gigabit Ethernet LAN/WAN PICs Properties
- Mapping Forwarding Classes to CoS Queues on 10-Gigabit Ethernet LAN/WAN PICs
- Scheduling and Shaping on 10-Gigabit Ethernet LAN/WAN PICs Overview
- Example: Configuring Shaping Overhead on 10-Gigabit Ethernet LAN/WAN PICs
- play_arrow Configuring Class of Service on Enhanced Queuing DPCs
- Enhanced Queuing DPC CoS Properties
- Configuring Rate Limits on Enhanced Queuing DPCs
- Configuring WRED on Enhanced Queuing DPCs
- Configuring MDRR on Enhanced Queuing DPCs
- Configuring Excess Bandwidth Sharing
- Configuring Customer VLAN (Level 3) Shaping on Enhanced Queuing DPCs
- Simple Filters Overview
- Configuring Simple Filters on Enhanced Queuing DPCs
- Configuring a Simple Filter
- play_arrow Configuring Class of Service on MICs, MPCs, and MLCs
- CoS Features and Limitations on MIC and MPC Interfaces
- Dedicated Queue Scaling for CoS Configurations on MIC and MPC Interfaces Overview
- Verifying the Number of Dedicated Queues Configured on MIC and MPC Interfaces
- Scaling of Per-VLAN Queuing on Non-Queuing MPCs
- Increasing Available Bandwidth on Rich-Queuing MPCs by Bypassing the Queuing Chip
- Flexible Queuing Mode
- Multifield Classifier for Ingress Queuing on MX Series Routers with MPC
- Example: Configuring a Filter for Use as an Ingress Queuing Filter
- Ingress Queuing Filter with Policing Functionality
- Ingress Rate Limiting on MX Series Routers with MPCs
- Rate Shaping on MIC and MPC Interfaces
- Per-Priority Shaping on MIC and MPC Interfaces Overview
- Example: Configuring Per-Priority Shaping on MIC and MPC Interfaces
- Configuring Static Shaping Parameters to Account for Overhead in Downstream Traffic Rates
- Example: Configuring Static Shaping Parameters to Account for Overhead in Downstream Traffic Rates
- Traffic Burst Management on MIC and MPC Interfaces Overview
- Understanding Hierarchical Scheduling for MIC and MPC Interfaces
- Configuring Ingress Hierarchical CoS on MIC and MPC Interfaces
- Configuring a CoS Scheduling Policy on Logical Tunnel Interfaces
- Per-Unit Scheduling and Hierarchical Scheduling for MPC Interfaces
- Managing Dedicated and Remaining Queues for Static CoS Configurations on MIC and MPC Interfaces
- Excess Bandwidth Distribution on MIC and MPC Interfaces Overview
- Bandwidth Management for Downstream Traffic in Edge Networks Overview
- Scheduler Delay Buffering on MIC and MPC Interfaces
- Managing Excess Bandwidth Distribution on Static Interfaces on MICs and MPCs
- Drop Profiles on MIC and MPC Interfaces
- Intelligent Oversubscription on MIC and MPC Interfaces Overview
- Jitter Reduction in Hierarchical CoS Queues
- Example: Reducing Jitter in Hierarchical CoS Queues
- CoS on Ethernet Pseudowires in Universal Edge Networks Overview
- CoS Scheduling Policy on Logical Tunnel Interfaces Overview
- Configuring CoS on an Ethernet Pseudowire for Multiservice Edge Networks
- CoS for L2TP LNS Inline Services Overview
- Configuring Static CoS for an L2TP LNS Inline Service
- CoS on Circuit Emulation ATM MICs Overview
- Configuring CoS on Circuit Emulation ATM MICs
- Understanding IEEE 802.1p Inheritance push and swap from a Transparent Tag
- Configuring IEEE 802.1p Inheritance push and swap from the Transparent Tag
- CoS on Application Services Modular Line Card Overview
- play_arrow Configuring Class of Service on Aggregated, Channelized, and Gigabit Ethernet Interfaces
- Limitations on CoS for Aggregated Interfaces
- Policer Support for Aggregated Ethernet Interfaces Overview
- Understanding Schedulers on Aggregated Interfaces
- Examples: Configuring CoS on Aggregated Interfaces
- Hierarchical Schedulers on Aggregated Ethernet Interfaces Overview
- Configuring Hierarchical Schedulers on Aggregated Ethernet Interfaces
- Example: Configuring Scheduling Modes on Aggregated Interfaces
- Enabling VLAN Shaping and Scheduling on Aggregated Interfaces
- Class of Service on demux Interfaces
- Example: Configuring Per-Unit Schedulers for Channelized Interfaces
- Applying Layer 2 Policers to Gigabit Ethernet Interfaces
-
- play_arrow Configuration Statements and Operational Commands
ON THIS PAGE
Example: Remarking Diffserv Code Points to 802.1P PCPs to Carry CoS Profiles Across a Service Provider’s VPLS Network
This configuration example explains how to implement class-of-service (CoS) capabilities over a Virtual Private LAN Service (VPLS) network.
Requirements
To verify this procedure, this example uses a traffic generator. The traffic generator can be hardware-based or it can be software running on a server or host machine.
The functionality in this procedure is widely supported on devices that run Junos OS. The example shown here was tested and verified on MX Series routers running Junos OS Release 10.4.
Overview
VPLS networks create a Virtual Private LAN that provides a very close approximation of an Ethernet LAN to customers of a service provider. In a VPLS network, it is not necessary for all customers to be connected to a single LAN. Instead, the customers can be spread across two or more LANs. In the simplest sense, a VPLS network connects individual LANs across a packet-switched network so that they appear as a single LAN. See Figure 1 for an example of a typical VPLS topology.

Junos OS contains several DiffServ code point (DSCP) default
rewrite rules that might meet your requirements. You display them
with the show class-of-service rewrite-rule
command. A
partial set of the default rewrite DSCP rule mappings is shown in
the following table.
You can also define your own custom rewrite-rules table, or use a mixture of the default rewrite-rules and a custom table that you create. This example uses default rewrite-rules.
Map from Forwarding Class | PLP Value | MAP to DSCP/DSCP IPv6/EXP/IP Code Point Aliases |
---|---|---|
expedited-forwarding | low | ef |
expedited-forwarding | high | ef |
assured-forwarding | low | af11 |
assured-forwarding | high | af12 (DSCP/DSCP IPv6/EXP) |
best-effort | low | be |
best-effort | high | be |
network-control | low | nc1/cs6 |
network-control | high | nc2/cs7 |
Junos OS uses the values shown in the following table for MPLS CoS in the EXP fields of the MPLS header.
Forwarding Class | Loss Priority | EXP Code Point |
---|---|---|
best-effort | low | 000 |
best-effort | high | 001 |
expedited-forwarding | low | 010 |
expedited-forwarding | high | 011 |
assured-forwarding | low | 100 |
assured-forwarding | high | 101 |
network-control | low | 110 |
network-control | high | 111 |
In addition to providing the necessary information to complete the purpose of this example, this example also includes all of the commands required to recreate the VPLS network as shown in Figure 2. A full explanation of the tasks required to configure a VPLS network is not included in this example. If you need more information regarding configuring a VPLS network, see the VPLS User Guide for Routing Devices at http://juniper.net/documentation and RFC 4761 at http://tools.ietf.org/html/rfc4761 .
A thorough explanation of the required CoS tasks and the underlying algorithms used in this example is beyond the scope of this document. For more information, refer to QOS-Enabled Networks—Tools and Foundations by Miguel Barreiros and Peter Lundqvist. This book is available at many online booksellers and at www.juniper.net/books .
Configuration
Procedure
- CLI Quick Configuration
- Step-by-Step Procedure
- Step-by-Step Procedure
- Step-by-Step Procedure
- Step-by-Step Procedure
- Step-by-Step Procedure
- Step-by-Step Procedure
- Results
CLI Quick Configuration
To quickly configure this example,
copy the following commands, paste them into a text file, remove any
line breaks, change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
Device CE1
set interfaces ge-1/0/1 unit 0 description to-Host1 set interfaces ge-1/0/1 unit 0 family inet address 172.16.50.2/30 set interfaces ge-1/0/1 unit 0 family inet filter input ip-v4 set interfaces ge-1/0/5 vlan-tagging set interfaces ge-1/0/5 unit 512 description to_PE1 set interfaces ge-1/0/5 unit 512 vlan-id 512 set interfaces ge-1/0/5 unit 512 family inet address 10.10.1.1/24 set interfaces lo0 unit 1 description loopback-interface set interfaces lo0 unit 1 family inet address 192.168.0.1/32 set protocols ospf area 0.0.0.0 interface ge-1/0/5.512 set protocols ospf area 0.0.0.0 interface ge-1/0/1.0 passive set protocols ospf area 0.0.0.0 interface lo0.1 passive set firewall family inet filter ip-v4 term tcp80 from port 80 set firewall family inet filter ip-v4 term tcp80 then dscp ef set firewall family inet filter ip-v4 term 12345 from port 12345 set firewall family inet filter ip-v4 term 12345 then dscp be set firewall family inet filter ip-v4 term accept then accept set class-of-service classifiers ieee-802.1 dscp1 forwarding-class expedited-forwarding loss-priority low code-points ef set class-of-service classifiers ieee-802.1 dscp1 forwarding-class best-effort loss-priority low code-points be set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class expedited-forwarding loss-priority low code-point 010 set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class best-effort loss-priority low code-point 000 set class-of-service interfaces ge-1/0/5 unit 512 classifiers ieee-802.1 dscp1 set class-of-service interfaces ge-1/0/5 unit 512 rewrite-rules ieee-802.1 ieee1-c2
Device PE1
set interfaces ge-1/0/6 vlan-tagging set interfaces ge-1/0/6 encapsulation vlan-vpls set interfaces ge-1/0/6 unit 512 description to_vpls set interfaces ge-1/0/6 unit 512 encapsulation vlan-vpls set interfaces ge-1/0/6 unit 512 vlan-id 512 set interfaces ge-1/0/9 description to_P1 set interfaces ge-1/0/9 unit 0 family inet address 10.30.0.1/30 set interfaces ge-1/0/9 unit 0 family mpls set interfaces lo0 unit 0 description loopback-interface set interfaces lo0 unit 0 family inet address 10.255.70.31/32 set protocols mpls interface ge-1/0/9.0 set protocols bgp group to_PE2 type internal set protocols bgp group to_PE2 local-address 10.255.70.31 set protocols bgp group to_PE2 family l2vpn signaling set protocols bgp group to_PE2 neighbor 172.30.14.1 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-1/0/9.0 set protocols ldp interface ge-1/0/9.0 set protocols ldp interface lo0.0 set routing-options router-id 10.255.70.31 set routing-options autonomous-system 64511 set routing-instances vpls_a instance-type vpls set routing-instances vpls_a interface ge-1/0/6.512 set routing-instances vpls_a route-distinguisher 64511:1 set routing-instances vpls_a vrf-target target:64511:1 set routing-instances vpls_a protocols vpls no-tunnel-services set routing-instances vpls_a protocols vpls site 1 site-identifier 1 set routing-instances vpls_a protocols vpls site 1 interface ge-1/0/6.512
Device P1
set interfaces ge-1/0/3 description to_P2 set interfaces ge-1/0/3 unit 0 family inet address 10.40.0.1/30 set interfaces ge-1/0/3 unit 0 family mpls set interfaces ge-1/0/9 description to_PE1 set interfaces ge-1/0/9 unit 0 family inet address 10.30.0.2/30 set interfaces ge-1/0/9 unit 0 family mpls set interfaces lo0 unit 0 description loopback-interface set interfaces lo0 unit 0 family inet address 192.168.16.1/32 set protocols mpls interface ge-1/0/9.0 set protocols mpls interface ge-1/0/3.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-1/0/3.0 set protocols ospf area 0.0.0.0 interface ge-1/0/9.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface ge-1/0/3.0 set protocols ldp interface ge-1/0/9.0 set protocols ldp interface lo0.0 set routing-options router-id 192.168.16.1
Device P2
set interfaces ge-2/0/6 description to_P1 set interfaces ge-2/0/6 unit 0 family inet address 10.40.0.2/30 set interfaces ge-2/0/6 unit 0 family mpls set interfaces ge-2/0/8 description to_PE2 set interfaces ge-2/0/8 unit 0 family inet address 10.50.0.1/30 set interfaces ge-2/0/8 unit 0 family mpls set interfaces lo0 unit 0 description loopback-interface set interfaces lo0 unit 0 family inet address 192.168.13.1/32 set protocols mpls interface ge-2/0/6.0 set protocols mpls interface ge-2/0/8.0 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-2/0/6.0 set protocols ospf area 0.0.0.0 interface ge-2/0/8.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface ge-2/0/6.0 set protocols ldp interface ge-2/0/8.0 set protocols ldp interface lo0.0 set routing-options router-id 192.168.13.1
Device PE2
set interfaces ge-2/0/8 description to-R1 set interfaces ge-2/0/8 unit 0 family inet address 10.50.0.2/30 set interfaces ge-2/0/8 unit 0 family mpls set interfaces ge-2/1/1 vlan-tagging set interfaces ge-2/1/1 encapsulation vlan-vpls set interfaces ge-2/1/1 unit 512 description to_vpls set interfaces ge-2/1/1 unit 512 encapsulation vlan-vpls set interfaces ge-2/1/1 unit 512 vlan-id 512 set interfaces lo0 unit 0 description loopback-interface set interfaces lo0 unit 0 family inet address 172.30.14.1/32 set protocols mpls interface ge-2/0/8.0 set protocols bgp group to_PE1 type internal set protocols bgp group to_PE1 local-address 172.30.14.1 set protocols bgp group to_PE1 family l2vpn signaling set protocols bgp group to_PE1 neighbor 10.255.70.31 set protocols ospf traffic-engineering set protocols ospf area 0.0.0.0 interface ge-2/0/8.0 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ldp interface ge-2/0/8.0 set protocols ldp interface lo0.0 set routing-options router-id 172.30.14.1 set routing-options autonomous-system 64511 set routing-instances vpls_a instance-type vpls set routing-instances vpls_a interface ge-2/1/1.512 set routing-instances vpls_a route-distinguisher 64511:1 set routing-instances vpls_a vrf-target target:64511:1 set routing-instances vpls_a protocols vpls no-tunnel-services set routing-instances vpls_a protocols vpls site 2 site-identifier 2 set routing-instances vpls_a protocols vpls site 2 interface ge-2/1/1.512
Device CE2
set interfaces ge-2/0/7 unit 0 description to-Host2 set interfaces ge-2/0/7 unit 0 family inet address 172.16.80.2/30 set interfaces ge-2/0/7 unit 0 family inet filter input ip-v4 set interfaces ge-2/1/2 vlan-tagging set interfaces ge-2/1/2 unit 512 description to-PE2 set interfaces ge-2/1/2 unit 512 vlan-id 512 set interfaces ge-2/1/2 unit 512 family inet address 10.10.1.2/24 set interfaces lo0 unit 1 description loopback-interface set interfaces lo0 unit 1 family inet address 192.168.0.2/32 set protocols ospf area 0.0.0.0 interface lo0.1 passive set protocols ospf area 0.0.0.0 interface ge-2/0/7.0 passive set protocols ospf area 0.0.0.0 interface ge-2/1/2.512 set firewall family inet filter ip-v4 term tcp80 from port 80 set firewall family inet filter ip-v4 term tcp80 then dscp ef set firewall family inet filter ip-v4 term 12345 from port 12345 set firewall family inet filter ip-v4 term 12345 then dscp be set firewall family inet filter ip-v4 term accept then accept set class-of-service classifiers ieee-802.1 dscp1 forwarding-class expedited-forwarding loss-priority low code-points ef set class-of-service classifiers ieee-802.1 dscp1 forwarding-class best-effort loss-priority low code-points be set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class expedited-forwarding loss-priority low code-point 010 set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class best-effort loss-priority low code-point 000 set class-of-service interfaces ge-2/1/2 unit 512 rewrite-rules ieee-802.1 ieee1-c2 set class-of-service interfaces ge-2/1/2 unit 512 classifiers ieee-802.1 dscp1
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure Device CE1:
Configure the device interfaces.
content_copy zoom_out_map[edit ] user@CE1# set interfaces ge-1/0/1 unit 0 description to-Host1 user@CE1# set interfaces ge-1/0/1 unit 0 family inet address 172.16.50.2/30 user@CE1#set interfaces ge-1/0/1 unit 0 family inet filter input ip-v4 user@CE1#set interfaces lo0 unit 1 description loopback-interface user@CE1# set interfaces lo0 unit 1 family inet address 192.168.0.1/32
Configure the VLAN parameters.
content_copy zoom_out_map[edit ] user@CE1# set interfaces ge-1/0/5 vlan-tagging user@CE1# set interfaces ge-1/0/5 unit 512 description to_PE1 user@CE1# set interfaces ge-1/0/5 unit 512 vlan-id 512 user@CE1# set interfaces ge-1/0/5 unit 512 family inet address 10.10.1.1/24
Configure the class-of-service parameters.
content_copy zoom_out_map[edit ] user@CE1# set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class expedited-forwarding loss-priority low code-point 010 user@CE1# set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class best-effort loss-priority low code-point 000 user@CE1# set class-of-service classifiers ieee-802.1 dscp1 forwarding-class expedited-forwarding loss-priority low code-points ef user@CE1# set class-of-service classifiers ieee-802.1 dscp1 forwarding-class best-effort loss-priority low code-points be user@CE1# set class-of-service interfaces ge-1/0/5 unit 512 rewrite-rules ieee-802.1 ieee1-c2 user@CE1# set class-of-service interfaces ge-1/0/5 unit 512 classifiers ieee-802.1 dscp1
Configure the protocol parameters.
content_copy zoom_out_map[edit ] user@CE1# set protocols ospf area 0.0.0.0 interface ge-1/0/5.512 user@CE1# set protocols ospf area 0.0.0.0 interface ge-1/0/1.0 passive user@CE1# set protocols ospf area 0.0.0.0 interface lo0.0 passive
Configure the firewall DSCP rewrite parameters.
content_copy zoom_out_map[edit ] user@CE1# set firewall family inet filter ip-v4 term tcp80 from port 80 user@CE1# set firewall family inet filter ip-v4 term tcp80 then dscp ef user@CE1# set firewall family inet filter ip-v4 term 12345 from port 12345 user@CE1# set firewall family inet filter ip-v4 term 12345 then dscp be user@CE1# set firewall family inet filter ip-v4 term accept then accept
Step-by-Step Procedure
To configure Device PE1:
Configure the device interfaces.
content_copy zoom_out_map[edit ] user@PE1# set interfaces ge-1/0/9 description to_P1 user@PE1# set interfaces ge-1/0/9 unit 0 family inet address 10.30.0.1/30 user@PE1# set interfaces ge-1/0/9 unit 0 family mpls user@PE1# set interfaces lo0 unit 0 description loopback-interface user@PE1# set interfaces lo0 unit 0 family inet address 10.255.70.31/32
Configure the VLAN parameters.
content_copy zoom_out_map[edit ] user@PE1# set interfaces ge-1/0/6 vlan-tagging user@PE1# set interfaces ge-1/0/6 encapsulation vlan-vpls user@PE1# set interfaces ge-1/0/6 unit 512 description to_vpls user@PE1# set interfaces ge-1/0/6 unit 512 encapsulation vlan-vpls user@PE1# set interfaces ge-1/0/6 unit 512 vlan-id 512
Configure the protocol parameters.
content_copy zoom_out_map[edit ] user@PE1# set protocols mpls interface ge-1/0/9.0 user@PE1# set protocols bgp group to_PE2 type internal user@PE1# set protocols bgp group to_PE2 local-address 10.255.70.31 user@PE1# set protocols bgp group to_PE2 family l2vpn signaling user@PE1# set protocols bgp group to_PE2 neighbor 172.30.14.1 user@PE1# set protocols ospf traffic-engineering user@PE1# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@PE1# set protocols ospf area 0.0.0.0 interface ge-1/0/9.0 user@PE1# set protocols ldp interface ge-1/0/9.0 user@PE1# set protocols ldp interface lo0.0
Configure the routing option parameters.
content_copy zoom_out_map[edit ] user@PE1# set routing-options router-id 10.255.70.31 user@PE1# set routing-options autonomous-system 64511
Configure the routing instance parameters.
content_copy zoom_out_map[edit ] user@PE1# set routing-instances vpls_a instance-type vpls user@PE1# set routing-instances vpls_a interface ge-1/0/6.512 user@PE1# set routing-instances vpls_a route-distinguisher 64511:1 user@PE1# set routing-instances vpls_a vrf-target target:64511:1 user@PE1# set routing-instances vpls_a protocols vpls no-tunnel-services user@PE1# set routing-instances vpls_a protocols vpls site 1 site-identifier 1 user@PE1# set routing-instances vpls_a protocols vpls site 1 interface ge-1/0/6.512
Step-by-Step Procedure
To configure Device P1:
Configure the device interfaces.
content_copy zoom_out_map[edit ] user@P1# set interfaces ge-1/0/3 description to_P2 user@P1# set interfaces ge-1/0/3 unit 0 family inet address 10.40.0.1/30 user@P1# set interfaces ge-1/0/3 unit 0 family mpls user@P1# set interfaces ge-1/0/9 description to_PE1 user@P1# set interfaces ge-1/0/9 unit 0 family inet address 10.30.0.2/30 user@P1# set interfaces ge-1/0/9 unit 0 family mpls user@P1# set interfaces lo0 unit 0 description loopback-interface user@P1# set interfaces lo0 unit 0 family inet address 192.168.16.1/32
Configure the protocol parameters.
content_copy zoom_out_map[edit ] user@P1# set protocols mpls interface ge-1/0/9.0 user@P1# set protocols mpls interface ge-1/0/3.0 user@P1# set protocols ospf traffic-engineering user@P1# set protocols ospf area 0.0.0.0 interface ge-1/0/3.0 user@P1# set protocols ospf area 0.0.0.0 interface ge-1/0/9.0 user@P1# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@P1# set protocols ldp interface ge-1/0/3.0 user@P1# set protocols ldp interface ge-1/0/9.0 user@P1# set protocols ldp interface lo0.0
Configure the routing options parameter.
content_copy zoom_out_map[edit ] user@P1# set routing-options router-id 192.168.16.1
Step-by-Step Procedure
To configure Device P2:
Configure the device interfaces.
content_copy zoom_out_map[edit ] user@P2# set interfaces ge-2/0/6 description to_P1 user@P2#set interfaces ge-2/0/6 unit 0 family inet address 10.40.0.2/30 user@P2# set interfaces ge-2/0/6 unit 0 family mpls user@P2# set interfaces ge-2/0/8 description to_PE2 user@P2# set interfaces ge-2/0/8 unit 0 family inet address 10.50.0.1/30 user@P2# set interfaces ge-2/0/8 unit 0 family mpls user@P2# set interfaces lo0 unit 0 description loopback-interface user@P2# set interfaces lo0 unit 0 family inet address 192.168.13.1/32
Configure the protocol parameters.
content_copy zoom_out_map[edit ] user@P2# set protocols mpls interface ge-2/0/6.0 user@P2# set protocols mpls interface ge-2/0/8.0 user@P2# set protocols ospf traffic-engineering user@P2# set protocols ospf area 0.0.0.0 interface ge-2/0/6.0 user@P2# set protocols ospf area 0.0.0.0 interface ge-2/0/8.0 user@P2# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@P2# set protocols ldp interface ge-2/0/6.0 user@P2# set protocols ldp interface ge-2/0/8.0 user@P2# set protocols ldp interface lo0.0
Configure the routing option parameter.
content_copy zoom_out_map[edit ] user@P2# set routing-options router-id 192.168.13.1
Step-by-Step Procedure
To configure Device PE2:
Configure the device interfaces.
content_copy zoom_out_map[edit ] user@PE2# set interfaces ge-2/0/8 description to-R1 user@PE2# set interfaces ge-2/0/8 unit 0 family inet address 10.50.0.2/30 user@PE2# set interfaces ge-2/0/8 unit 0 family mpls user@PE2# set interfaces lo0 unit 0 description loopback-interface user@PE2# set interfaces lo0 unit 0 family inet address 172.30.14.1/32
Configure the VLAN parameters.
content_copy zoom_out_map[edit ] user@PE2# set interfaces ge-2/1/1 vlan-tagging user@PE2# set interfaces ge-2/1/1 encapsulation vlan-vpls user@PE2# set interfaces ge-2/1/1 unit 512 description to_vpls user@PE2# set interfaces ge-2/1/1 unit 512 encapsulation vlan-vpls user@PE2# set interfaces ge-2/1/1 unit 512 vlan-id 512
Configure the protocol parameters.
content_copy zoom_out_map[edit ] user@PE2# set protocols mpls interface ge-2/0/8.0 user@PE2# set protocols bgp group to_PE1 type internal user@PE2# set protocols bgp group to_PE1 local-address 172.30.14.1 user@P2# set protocols bgp group to_PE1 family l2vpn signaling user@PE2# set protocols bgp group to_PE1 neighbor 10.255.70.31 user@PE2# set protocols ospf traffic-engineering user@PE2# set protocols ospf area 0.0.0.0 interface ge-2/0/8.0 user@PE2# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@PE2# set protocols ldp interface ge-2/0/8.0 user@PE2# set protocols ldp interface lo0.0
Configure the routing option parameters.
content_copy zoom_out_map[edit ] user@PE2# set routing-options router-id 172.30.14.1 user@PE2# set routing-options autonomous-system 64511
Configure the routing instance parameters.
content_copy zoom_out_map[edit ] user@P2# set routing-instances vpls_a instance-type vpls user@PE2# set routing-instances vpls_a interface ge-2/1/1.512 user@PE2# set routing-instances vpls_a route-distinguisher 64511:1 user@PE2# set routing-instances vpls_a vrf-target target:64511:1 user@PE2# set routing-instances vpls_a protocols vpls no-tunnel-services user@PE2# set routing-instances vpls_a protocols vpls site 2 site-identifier 2 user@PE2# set routing-instances vpls_a protocols vpls site 2 interface ge-2/1/1.512
Step-by-Step Procedure
To configure Device CE2:
Configure the device interfaces.
content_copy zoom_out_map[edit ] user@CE2# set interfaces ge-2/0/7 unit 0 description to-Host2 user@CE2# set interfaces ge-2/0/7 unit 0 family inet address 172.16.80.2/30 user@CE2# set interfaces ge-2/0/7 unit 0 family inet filter input ip-v4 user@CE2# set interfaces lo0 unit 1 description loopback-interface user@CE2# set interfaces lo0 unit 1 family inet address 192.168.0.2/32
Configure the VLAN parameters
content_copy zoom_out_map[edit ] user@CE2# set interfaces ge-2/1/2 vlan-tagging user@CE2# set interfaces ge-2/1/2 unit 512 description to-PE2 user@CE2# set interfaces ge-2/1/2 unit 512 vlan-id 512 user@CE2# set interfaces ge-2/1/2 unit 512 family inet address 10.10.1.2/24
Configure the class-of-service parameters.
content_copy zoom_out_map[edit ] user@CE2# set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class expedited-forwarding loss-priority low code-point 010 user@CE2# set class-of-service rewrite-rules ieee-802.1 ieee1-c2 forwarding-class best-effort loss-priority low code-point 000 user@CE2# set class-of-service classifiers ieee-802.1 dscp1 forwarding-class expedited-forwarding loss-priority low code-points ef user@CE2# set class-of-service classifiers ieee-802.1 dscp1 forwarding-class best-effort loss-priority low code-points be user@CE2# set class-of-service interfaces ge-2/1/2 unit 512 rewrite-rules ieee-802.1 ieee1-c2 user@CE2# set class-of-service interfaces ge-2/1/2 unit 512 classifiers ieee-802.1 dscp1
Configure the protocol parameters.
content_copy zoom_out_map[edit ] user@CE2# set protocols ospf area 0.0.0.0 interface lo0.0 passive user@CE2# set protocols ospf area 0.0.0.0 interface ge-2/0/7.0 passive user@CE2# set protocols ospf area 0.0.0.0 interface ge-2/1/2.512
Configure the firewall DSCP rewrite parameters.
content_copy zoom_out_map[edit ] user@CE2# set firewall family inet filter ip-v4 term tcp80 from port 80 user@CE2# set firewall family inet filter ip-v4 term tcp80 then dscp ef user@CE2# set firewall family inet filter ip-v4 term 12345 from port 12345 user@CE2# set firewall family inet filter ip-v4 term 12345 then dscp be user@CE2# set firewall family inet filter ip-v4 term accept then accept
Results
From configuration mode, confirm your configuration
by entering the show interfaces
, show class-of-service
, show protocols
, show routing-options, show
routing-instances,
and show firewall
, commands.
If the output does not display the intended configuration, repeat
the instructions in this example to correct the configuration.
user@CE1# show interfaces ge-1/0/1 { unit 0 { description to-Host1; family inet { filter { input ip-v4; } address 172.16.50.2/30; } } } ge-1/0/5 { vlan-tagging; unit 512 { description to_PE1; vlan-id 512; family inet { address 10.10.1.1/24; } } } lo0 { unit 1 { description loopback-interface; family inet { address 192.168.0.1/32; } } }
user@CE1# show class-of-service classifiers { ieee-802.1 dscp1 { forwarding-class expedited-forwarding { loss-priority low code-points ef; } forwarding-class best-effort { loss-priority low code-points be; } } } interfaces { ge-1/0/5 { unit 512 { classifiers { ieee-802.1 dscp1; } rewrite-rules { ieee-802.1 ieee1-c2; } } } } rewrite-rules { ieee-802.1 ieee1-c2 { forwarding-class expedited-forwarding { loss-priority low code-point 010; } forwarding-class best-effort { loss-priority low code-point 000; } } }
user@CE1# show protocols ospf { area 0.0.0.0 { interface ge-1/0/5.512; interface ge-1/0/1.0 { passive; } interface lo0.1 { passive; } } }
user@CE1# show firewall family inet { filter ip-v4 { term tcp80 { from { port 80; } then dscp ef; } term 12345 { from { port 12345; } then dscp be; } term accept { then accept; } } }
If you are done configuring Device CE1, enter commit
from configuration mode.
user@PE1# show interfaces ge-1/0/6 { vlan-tagging; encapsulation vlan-vpls; unit 512 { description to_vpls; encapsulation vlan-vpls; vlan-id 512; } } ge-1/0/9 { description to_P1; unit 0 { family inet { address 10.30.0.1/30; } family mpls; } } lo0 { unit 0 { description loopback-interface; family inet { address 10.255.70.31/32; } } }
user@PE1# show protocols mpls { interface ge-1/0/9.0; } bgp { group to_PE2 { type internal; local-address 10.255.70.31; family l2vpn { signaling; } neighbor 172.30.14.1; } } ospf { traffic-engineering; area 0.0.0.0 { interface lo0.0 { passive; } interface ge-1/0/9.0; } } ldp { interface ge-1/0/9.0; interface lo0.0; }
user@PE1# show routing-options router-id 10.255.70.31; autonomous-system 64511;
user@PE1# show routing-instances vpls_a { instance-type vpls; interface ge-1/0/6.512; route-distinguisher 64511:1; vrf-target target:64511:1; protocols { vpls { no-tunnel-services; site 1 { site-identifier 1; interface ge-1/0/6.512; } } } }
If you are done configuring Device PE1, enter commit
from configuration mode.
user@P1# show interfaces ge-1/0/3 { description to_P2; unit 0 { family inet { address 10.40.0.1/30; } family mpls; } } ge-1/0/9 { description to_PE1; unit 0 { family inet { address 10.30.0.2/30; } family mpls; } } lo0 { unit 0 { description loopback-interface; family inet { address 192.168.16.1/32; } } } lo0 { unit 0 { description loopback-interface; family inet { address 192.168.16.1/32; } } }
user@P1# show protocols mpls { interface ge-1/0/9.0; interface ge-1/0/3.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-1/0/3.0; interface ge-1/0/9.0; interface lo0.0 { passive; } } } ldp { interface ge-1/0/3.0; interface ge-1/0/9.0; interface lo0.0; }
user@P1# show routing-options router-id 192.168.16.1;
If you are done configuring Device P1, enter commit
from configuration mode.
user@P2# show interfaces ge-2/0/6 { description to_P1; unit 0 { family inet { address 10.40.0.2/30; } family mpls; } } ge-2/0/8 { description to_PE2; unit 0 { family inet { address 10.50.0.1/30; } family mpls; } } lo0 { unit 0 { description loopback-interface; family inet { address 192.168.13.1/32; } } }
user@P2# show protocols mpls { interface ge-2/0/6.0; interface ge-2/0/8.0; } ospf { traffic-engineering; area 0.0.0.0 { interface ge-2/0/6.0; interface ge-2/0/8.0; interface lo0.0 { passive; } } } ldp { interface ge-2/0/6.0; interface ge-2/0/8.0; interface lo0.0; }
user@P2# show routing-options router-id 192.168.13.1;
If you are done configuring Device P2, enter commit
from configuration mode.
user@PE2# show interfaces ge-2/0/8 { description to-R1; unit 0 { family inet { address 10.50.0.2/30; } family mpls; } } ge-2/1/1 { vlan-tagging; encapsulation vlan-vpls; unit 512 { description to_vpls; encapsulation vlan-vpls; vlan-id 512; } } lo0 { unit 0 { description loopback-interface; family inet { address 172.30.14.1/32; } } }
user@PE2# show protocols mpls { interface ge-2/0/8.0; } bgp { group to_PE1 { type internal; local-address 172.30.14.1; family l2vpn { signaling; } neighbor 10.255.70.31; } } ospf { traffic-engineering; area 0.0.0.0 { interface ge-2/0/8.0; interface lo0.0 { passive; } } } ldp { interface ge-2/0/8.0; interface lo0.0; }
user@PE2# show routing-options router-id 172.30.14.1; autonomous-system 64511;
user@PE2# show routing-instances vpls_a { instance-type vpls; interface ge-2/1/1.512; route-distinguisher 64511:1; vrf-target target:64511:1; protocols { vpls { no-tunnel-services; site 2 { site-identifier 2; interface ge-2/1/1.512; } } } }
If you are done configuring Device PE2, enter commit
from configuration mode.
user@CE2# show interfaces ge-2/0/7 { unit 0 { description to-Host2; family inet { filter { input ip-v4; } address 172.16.80.2/30; } } } ge-2/1/2 { vlan-tagging; unit 512 { description to-PE2; vlan-id 512; family inet { address 10.10.1.2/24; } } } lo0 { unit 1 { description loopback-interface; family inet { address 192.168.0.2/32; } } } user@CE2# show class-of-service classifiers { ieee-802.1 dscp1 { forwarding-class expedited-forwarding { loss-priority low code-points ef; } forwarding-class best-effort { loss-priority low code-points be; } } } interfaces { ge-2/1/2 { unit 512 { classifiers { ieee-802.1 dscp1; } rewrite-rules { ieee-802.1 ieee1-c2; } } } } rewrite-rules { ieee-802.1 ieee1-c2 { forwarding-class expedited-forwarding { loss-priority low code-point 010; } forwarding-class best-effort { loss-priority low code-point 000; } } } user@CE2# show protocols ospf { area 0.0.0.0 { interface lo0.1 { passive; } interface ge-2/0/7.0 { passive; } interface ge-2/1/2.512; } } user@CE2# show firewall family inet { filter ip-v4 { term tcp80 { from { port 80; } then dscp ef; } term 12345 { from { port 12345; } then dscp be; } term accept { then accept; } } }
If you are done configuring Device CE2, enter commit
from configuration mode.
Verification
Confirm that the configuration is working properly by verifying that the DSCP aliases are maintained from Device CE1 to Device CE2.
- Clearing the Firewall Counters
- Sending Traffic into the Network from TCP HTTP Ports 80 and 12345 and Verifying the Results
Clearing the Firewall Counters
Purpose
Confirm that the firewall counters are cleared.
Action
On Device CE2, run the clear firewall all
command to reset the firewall counters to 0.
user@CE2> clear firewall all
Sending Traffic into the Network from TCP HTTP Ports 80 and 12345 and Verifying the Results
Purpose
Send traffic into the network that can be verified at Device CE2.
Action
Configure a new firewall on Device CE2 if you want to verify that the traffic that is being transmitted to Device Host2 from Device Host1 still has the correct DSCP aliases. The following commands create and apply the firewall filter that displays the traffic counts for each code point alias:
user@CE2# set firewall family inet filter count term be from dscp be user@CE2# set firewall family inet filter count term be then count be user@CE2# set firewall family inet filter count term ef from dscp ef user@CE2# set firewall family inet filter count term ef then count ef user@CE2# set firewall family inet filter count term accept then accept user@CE2# set interfaces ge-2/0/7 unit 0 family inet filter output count
When you are done configuring Device CE2, enter commit
from configuration mode.
When you are done testing, you can leave the counting filter in place, or remove it.
On Device Host1 use a traffic generator to send 20 TCP packets with a source port of 80 into the network.
The -s flag sets the source port. The -k flag causes the source port to remain steady instead of incrementing. The -c flag sets the number of packets to 20.
Repeat the task using a source port of 12345.
content_copy zoom_out_map[user@host1]# hping 172.16.80.1 -s 80 -k -c 20 [user@host1]# hping 172.16.80.1 -s 12345 -k -c 20
On Device CE2, display the firewall counters by using the
show firewall
command.content_copy zoom_out_mapuser@CE2> show firewall show firewall Filter: __CE2/count Counters: Name Bytes Packets be 800 20 ef 800 20
Meaning
The code point aliases set by Device CE1 are maintained across the VPLS backbone and appear intact at Device CE2.