ON THIS PAGE
Example: Applying Scheduler Maps and Shaping Rate to DLCIs
This example shows how to apply scheduler maps and shaping rates to individual logical interfaces.
Requirements
This example uses the following hardware and software components:
Junos OS Release 7.4 or later running on router line cards that support Intelligent Queuing (IQ).
Junos OS Release 13.2 or later running on MX Series routers containing 16x10GE MPC or MPC3E line cards.
Junos OS Release 13.3 or later running on MX Series routers containing MPC4E line cards.
Junos OS Release 15.1 or later running on MX Series routers containing MPC6E line cards.
Overview
By default, output scheduling is not enabled on logical interfaces. Logical interfaces without shaping configured share a default scheduler. Logical interface scheduling (also called per-unit scheduling) allows you to enable multiple output queues on a logical interface and associate customized scheduling and shaping for each queue.
This example shows how to define schedulers for logical interfaces through the direct use of scheduler maps and shaping rates.
In this example, we associate the scheduler sched-map-logical-0
with logical interface unit 0
on physical interface t3-1/0/0
, and allocate 10 Mbps of transmission bandwidth
to the logical interface. We also associate the scheduler sched-map-logical-1
with logical interface unit 1
on the same physical
interface, t3-1/0/0
, and allocate 20 Mbps of transmission
bandwidth to the logical interface.
The allocated bandwidth is shared among the individual forwarding classes in the scheduler map. Although these schedulers are configured on a single physical interface, they are independent from each other. Traffic on one logical interface unit does not affect the transmission priority, bandwidth allocation, or drop behavior on the other logical interface unit.
For a similar example, see Example: Applying Scheduling and Shaping to VLANs.
Configuration
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.
set interfaces t3-1/0/0:1 per-unit-scheduler set interfaces t3-1/0/0:1 encapsulation frame-relay set interfaces t3-1/0/0:1 unit 0 dlci 100 set interfaces t3-1/0/0:1 unit 0 family inet address 10.1.1.0/24 set interfaces t3-1/0/0:1 unit 1 dlci 101 set interfaces t3-1/0/0:1 unit 1 family inet address 10.1.1.1/24 set class-of-service interfaces t3-1/0/0:1 unit 0 scheduler-map sched-map-logical-0 set class-of-service interfaces t3-1/0/0:1 unit 0 shaping-rate 10m set class-of-service interfaces t3-1/0/0:1 unit 1 scheduler-map sched-map-logical-1 set class-of-service interfaces t3-1/0/0:1 unit 1 shaping-rate 20m set class-of-service scheduler-maps sched-map-logical-0 forwarding-class best-effort scheduler sched-best-effort-0 set class-of-service scheduler-maps sched-map-logical-0 forwarding-class assured-forwarding scheduler sched-bronze-0 set class-of-service scheduler-maps sched-map-logical-0 forwarding-class expedited-forwarding scheduler sched-silver-0 set class-of-service scheduler-maps sched-map-logical-0 forwarding-class network-control scheduler sched-gold-0 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class best-effort scheduler sched-best-effort-1 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class assured-forwarding scheduler sched-bronze-1 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class expedited-forwarding scheduler sched-silver-1 set class-of-service scheduler-maps sched-map-logical-1 forwarding-class network-control scheduler sched-gold-1 set class-of-service schedulers sched-best-effort-0 transmit-rate 4m set class-of-service schedulers sched-bronze-0 transmit-rate 3m set class-of-service schedulers sched-silver-0 transmit-rate 2m set class-of-service schedulers sched-gold-0 transmit-rate 1m set class-of-service schedulers sched-best-effort-1 transmit-rate 8m set class-of-service schedulers sched-bronze-1 transmit-rate 6m set class-of-service schedulers sched-silver-1 transmit-rate 4m set class-of-service schedulers sched-gold-1 transmit-rate 2m
Procedure
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see the Junos OS CLI User Guide.
Configure the device interfaces.
[edit interfaces]
user@PE1# set t3-1/0/0:1 per-unit-scheduler user@PE1# set t3-1/0/0:1 encapsulation frame-relay user@PE1# set t3-1/0/0:1 unit 0 dlci 100 user@PE1# set t3-1/0/0:1 unit 0 family inet address 10.1.1.0/24 user@PE1# set t3-1/0/0:1 unit 1 dlci 101 user@PE1# set t3-1/0/0:1 unit 1 family inet address 10.1.1.1/24Define the schedulers.
[edit class-of-service]
user@PE1# set schedulers sched-best-effort-0 transmit-rate 4m user@PE1# set schedulers sched-bronze-0 transmit-rate 3m user@PE1# set schedulers sched-silver-0 transmit-rate 2m user@PE1# set schedulers sched-gold-0 transmit-rate 1m user@PE1# set schedulers sched-best-effort-1 transmit-rate 8m user@PE1# set schedulers sched-bronze-1 transmit-rate 6m user@PE1# set schedulers sched-silver-1 transmit-rate 4m user@PE1# set schedulers sched-gold-1 transmit-rate 2mDefine the scheduler maps.
[edit class-of-service]
user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class best-effort scheduler sched-best-effort-0 user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class assured-forwarding scheduler sched-bronze-0 user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class expedited-forwarding scheduler sched-silver-0 user@PE1# set scheduler-maps sched-map-logical-0 forwarding-class network-control scheduler sched-gold-0 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class best-effort scheduler sched-best-effort-1 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class assured-forwarding scheduler sched-bronze-1 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class expedited-forwarding scheduler sched-silver-1 user@PE1# set scheduler-maps sched-map-logical-1 forwarding-class network-control scheduler sched-gold-1Apply the scheduler maps and shaping rates to the logical interfaces.
[edit class-of-service]
user@PE1# set interfaces t3-1/0/0:1 unit 0 scheduler-map sched-map-logical-0 user@PE1# set interfaces t3-1/0/0:1 unit 0 shaping-rate 10m user@PE1# set interfaces t3-1/0/0:1 unit 1 scheduler-map sched-map-logical-1 user@PE1# set interfaces t3-1/0/0:1 unit 1 shaping-rate 20m
Results
From configuration mode, confirm your configuration
by entering the show interfaces
and show class-of-service
commands. If the output does not display the intended configuration,
repeat the instructions in this example to correct the configuration.
[edit interfaces] user@PE1# show t3-1/0/0:1 { encapsulation frame-relay; per-unit-scheduler; } [edit class-of-service] user@PE1# show interfaces { t3-1/0/0:1 { unit 0 { scheduler-map sched-map-logical-0; shaping-rate 10m; } unit 1 { scheduler-map sched-map-logical-1; shaping-rate 20m; } } } scheduler-maps { sched-map-logical-0 { forwarding-class best-effort scheduler sched-best-effort-0; forwarding-class assured-forwarding scheduler sched-bronze-0; forwarding-class expedited-forwarding scheduler sched-silver-0; forwarding-class network-control scheduler sched-gold-0; } sched-map-logical-1 { forwarding-class best-effort scheduler sched-best-effort-1; forwarding-class assured-forwarding scheduler sched-bronze-1; forwarding-class expedited-forwarding scheduler sched-silver-1; forwarding-class network-control scheduler sched-gold-1; } } schedulers { sched-best-effort-0 { transmit-rate 4m; } sched-bronze-0 { transmit-rate 3m; } sched-silver-0 { transmit-rate 2m; } sched-gold-0 { transmit-rate 1m; } sched-best-effort-1 { transmit-rate 8m; } sched-bronze-1 { transmit-rate 6m; } sched-silver-1 { transmit-rate 4m; } sched-gold-1 { transmit-rate 2m; } }
If you are done configuring the device, enter commit from configuration mode.