Assigning Forwarding Class and DSCP Value for Routing Engine-Generated Traffic
You can set the forwarding class and differentiated service
code point (DSCP) value for traffic originating in the Routing Engine.
To configure forwarding class and DSCP values that apply to Routing
Engine–generated traffic only, apply an output filter to the
loopback (lo.0
) interface and set the appropriate forwarding
class and DSCP bit configuration for various protocols. For example,
you can set the DSCP value on OSPF packets that originate in the Routing
Engine to 10
and assign them to the AF (assured forwarding)
forwarding class while the DSCP value on ping packets are set to 0
and use forwarding class BE (best effort).
This particular classification ability applies to packets generated by the Routing Engine only.
The following example assigns Routing Engine sourced
ping packets (using ICMP) a DSCP value of 38
and a forwarding
class of af17
, OSPF packets a DSCP value of 12
and a forwarding class of af11
, and BGP packets (using
TCP ) a DSCP value of 10
and a forwarding class of af16
.
[edit class-of-service] forwarding-classes { class af11 queue-num 7; class af12 queue-num 1; class af13 queue-num 2; class af14 queue-num 4; class af15 queue-num 5; class af16 queue-num 4; class af17 queue-num 6; class af18 queue-num 7; } [edit firewall filter family inet] filter loopback-filter { term t1 { from { protocol icmp; # For pings } then { forwarding-class af17; dscp 38; } } term t2 { from { protocol ospf; # For OSPF } then { forwarding-class af11; dscp 12; } } term t3 { from { protocol tcp; # For BGP } then { forwarding-class af16; dscp 10; } } term t4 { then accept; # Do not forget! } } [edit interfaces] lo0 { unit 0 { family inet { filter { output loopback-filter; } } } }
This is not a complete router configuration. You still have to assign resources to the queues, configure the routing protocols, addresses, and so on.