Routing
Highlighted
Routing

DSCP Tag for Route Selection

‎05-06-2019 02:31 AM
Hi Guys, Seeking your assistance on how I can configure DSCP in Juniper to behave this way. This is my first time encountering DSCP by the way. We have a bandwidth manager that tags traffic/packets with an EF DSCP tagging, now what we want is when the traffic/packets enter the Router1, Router 1 must forward the traffic to Peer1(Premium) or via AS-Paths if we have multiple Premium peering. Else, traffic without DSCP EF tag should get forwarded to Peer2(Non-Premium) or to other non-Premium peering. Kindly see attached file for the diagram. Thank you in advance!

Attachments

13 REPLIES 13
Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-06-2019 02:49 AM

Hi Saul,

 

You can check this article on "CoS-based forwarding".

 

Thanks,

Alex

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-06-2019 06:02 AM

@alex_kovalev, I'll check this out. Thanks!

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-08-2019 02:42 AM

@alex_kovalev, do we still need to configure below command?

 

set class-of-service interfaces xe-x/x/x unit 0 classifiers dscp default

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-09-2019 03:40 AM

@alex_kovalev, can we do the policy-options policy-statement route-filter via source IP, not destination IP?

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-10-2019 01:38 AM

Hi Saul,

 

SC> do we still need to configure below command?
SC> set class-of-service interfaces xe-x/x/x unit 0 classifiers dscp default

I don You can check what classifier you have on the interface:

> show class-of-service interface xe-x/y/z.n

And if it is not dscp, you need to configure it.

 

SC> can we do the policy-options policy-statement route-filter via source IP, not destination IP?
No, you can not do soure routing with "CoS-based forwarding".
For this you need Filter-Base Forwardind (FBF).
Also in FBF you can match dscp value of the packet and route accordingly.

 

Thanks,
Alex

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-20-2019 06:35 PM

If I use FBF, should I use it this way,

 

===============

family inet {
 filter DSCP-Test {
  term DSCP {
   from {
    dscp ef;
            }

   then {
    routing-instance DSCP-NextHopTest;
===============

 

or this?

==============

family inet {
filter DSCP-Test {
term DSCP {
from {
destination-address {
0.0.0.0/0;
}
dscp ef;
}
then {
routing-instance DSCP-NextHopTest;
==============

 

Thanks in advanced

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-20-2019 09:47 PM

Hi Saul,

 

As you're matching ingress traffic , this should suffice.  Ensure to check  "show configuration" and confirm the configuration is accepted as supported on the device, in case any version specific support issue it'll flag part of the config as "NOT SUPPORTED ON...".

 

===============

family inet {
 filter DSCP-Test {
  term DSCP {
   from {
    dscp ef;
            }

   then {
    routing-instance DSCP-NextHopTest;
===============

 

Hope this helps.

Regards,
-r.

--------------------------------------------------

If this solves your problem, please mark this post as "Accepted Solution."
Kudos are always appreciated Smiley Happy.

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-21-2019 12:43 PM

FBF would be the best practice here. The two configuration samples don't make much difference. Based on what you need (currently looks like you need everything 0/0), you can always modify the filter and other matching terms 


Mengzhe Hu
JNCIE x 3 (SP DC ENT)
Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-22-2019 08:00 PM

Yes, this is for ingress. Will try this out.

 

Thanks!

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-22-2019 08:01 PM

Got it, will try this out.

 

Thanks!

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-30-2019 05:51 AM

@mriyaz

 

Configured below and still not getting the results we want.

option 1

===========================================

v# show firewall filter DSCP-Test term DSCP-TEST
from {
destination-address {
0.0.0.0/0;
}
forwarding-class expedited-forwarding;
}
then {
routing-instance next-hop-xxxx;
}

option 2

===========================================

v# show firewall filter DSCP-Test term DSCP-TEST
from {
destination-address {
0.0.0.0/0;
}
dscp ef;
}
then {
routing-instance next-hop-xxxx;
}

===========================================

 

help, please?

Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-30-2019 10:37 AM

This is correct. You need to match DSCP value.

 

Let me ask:

1. is traffic coming in as IP traffic? Not as layer 2 or MPLS labled?

2. is traffic really having dscp of EF?

 

option 2

===========================================

v# show firewall filter DSCP-Test term DSCP-TEST 
from {
destination-address {
0.0.0.0/0;
}
dscp ef;
}
then {
routing-instance next-hop-xxxx;

count ef-packet; <<<<<<<<<<<<<<<<<<Add this counter and check if the filter is capturing any packet 
}


Mengzhe Hu
JNCIE x 3 (SP DC ENT)
Highlighted
Routing

Re: DSCP Tag for Route Selection

‎05-30-2019 06:12 PM

1. is traffic coming in as IP traffic? Not as layer 2 or MPLS labled? IP traffic only

2. is traffic really having dscp of EF? Per the vendor of the box that tags the traffic with EF, yes it tags traffic.

 

I'll add the command you provided.

 

Will keep you guys posted.

 

Thanks!