Classifying Packets by Egress Interface
For Juniper Networks M320 Multiservice Edge Routers and T Series Core Routers with the Intelligent Queuing (IQ), IQ2, Enhanced IQ (IQE), Multiservices link services intelligent queuing (LSQ) interfaces, or ATM2 PICs, you can classify unicast and multicast packets based on the egress interface. For unicast traffic, you can also use a multifield filter, but only egress interface classification applies to multicast traffic as well as unicast traffic. If you configure egress classification of an interface, you cannot perform Differentiated Services code point (DSCP) rewrites on the interface. By default, the system does not perform any classification based on the egress interface.
On an MX Series router that contains MPCs and MS-DPCs, multicast packets are dropped on the router and not processed properly if the router contains MLPPP LSQ logical interfaces that function as multicast receivers and if the network services mode is configured as enhanced IP mode on the router. This behavior is expected with LSQ interfaces in conjunction with enhanced IP mode. In such a scenario, if enhanced IP mode is not configured, multicasting works correctly. However, if the router contains redundant LSQ interfaces and enhanced IP network services mode configured with FIB localization, multicast works properly.
To enable packet classification by the egress interface,
you first configure a forwarding class map and one or more queue numbers
for the egress interface at the [edit class-of-service forwarding-class-map forwarding-class-map-name]
hierarchy level:
[edit class-of-service] forwarding-classes-interface-specific forwarding-class-map-name { class class-name queue-num queue-number [ restricted-queue queue-number ]; }
For T Series routers that are restricted to only four queues,
you can control the queue assignment with the restricted-queue
option, or you can allow the system to automatically determine the
queue in a modular fashion. For example, a map assigning packets to
queue 6 would map to queue 2 on a four-queue system.
If you configure an output forwarding class map associating
a forwarding class with a queue number, this map is not supported
on multiservices link services intelligent queuing (lsq-
) interfaces.
Once the forwarding class map has been configured, you
apply the map to the logical interface by using the output-forwarding-class-map
statement at the [edit class-of-service interfaces interface-name unit logical-unit-number ]
hierarchy level:
[edit class-of-service interfaces interface-name unit logical-unit-number] output-forwarding-class-map forwarding-class-map-name;
All parameters relating to the queues and forwarding class must be configured as well. For more information about configuring forwarding classes and queues, see Configuring a Custom Forwarding Class for Each Queue.
This example shows how to configure an interface-specific
forwarding-class map named FCMAP1
that restricts queues
5 and 6 to different queues on four-queue systems and then applies FCMAP1
to unit 0
of interface ge-6/0/0
:
[edit class-of-service] forwarding-class-map FCMAP1 { class FC1 queue-num 6 restricted-queue 3; class FC2 queue-num 5 restricted-queue 2; class FC3 queue-num 3; class FC4 queue-num 0; class FC3 queue-num 0; class FC4 queue-num 1; } [edit class-of-service] interfaces { ge-6/0/0 unit 0 { output-forwarding-class-map FCMAP1; } }
Note that without the restricted-queue
option in FCMAP1
, the example would assign FC1
and FC2
to queues 2 and 1, respectively, on a system restricted to four
queues.
Use the show class-of-service forwarding-class forwarding-class-map-name
command to display the
forwarding-class map queue configuration:
user@host> show class-of-service forwarding-class FCMAP2 Forwarding class ID Queue Restricted queue FC1 0 6 3 FC2 1 5 2 FC3 2 3 3 FC4 3 0 0 FC5 4 0 0 FC6 5 1 1 FC7 6 6 2 FC8 7 7 3
Use the show class-of-service interface interface-name
command to display the forwarding-class
maps (and other information) assigned to a logical interface:
user@host> show class-of-service interface ge-6/0/0 Physical interface: ge-6/0/0, Index: 128 Queues supported: 8, Queues in use: 8 Scheduler map: <default>, Index: 2 Input scheduler map: <default>, Index: 3 Chassis scheduler map: <default-chassis>, Index: 4 Logical interface: ge-6/0/0.0, Index: 67 Object Name Type Index Scheduler-map sch-map1 Output 6998 Scheduler-map sch-map1 Input 6998 Classifier dot1p ieee8021p 4906 forwarding-class-map FCMAP1 Output 1221 Logical interface: ge-6/0/0.1, Index 68 Object Name Type Index Scheduler-map <default> Output 2 Scheduler-map <default> Input 3 Logical interface: ge-6/0/0.32767, Index 69 Object Name Type Index Scheduler-map <default> Output 2 Scheduler-map <default> Input 3