Junos
Junos

CoS configuration

‎09-23-2016 02:10 AM

Hello team,

 

I'm currently facing a problem to configure a CoS on a WAN interface, my ISP informed me that i need to configure that to fix a lantency problem.

 

It's pretty easy on a cisco router but i don't really understand on Junos. I followed this link https://kb.juniper.net/InfoCenter/index?page=content&id=KB27218&smlogin=true&actp=search

but i would like your help.

 

Here is the configuration done :

 

interfaces {
ge-0/0/0 {
per-unit-scheduler;
vlan-tagging;
speed 100m;
link-mode full-duplex;
gigether-options {
no-auto-negotiation;
}
unit 0 {
vlan-id 2900;
family inet {
address X.X.X.X/30;
}
}
}

....

class-of-service {
interfaces {
ge-0/0/0 {
unit 0 {
rewrite-rules {
ieee-802.1 class;
}
}
}
}
rewrite-rules {
ieee-802.1 class {
import default;
forwarding-class network-control {
loss-priority low code-point 001;
loss-priority medium-low code-point 001;
loss-priority medium-high code-point 001;
loss-priority high code-point 001;
}
forwarding-class best-effort {
loss-priority low code-point 001;
loss-priority high code-point 001;
}
}
}
}

 

I need to use the VLAN2900 and a CoS 2, can you please check the configuration and tell if there is something wrong on it ? Maybe i can simplify something.

 

Thaks for your help.

 

Regards,

 

David

 

 

 

8 REPLIES 8
Highlighted
Junos

Re: CoS configuration

‎09-23-2016 05:52 AM

Hi, 

 

I am not sure I understood the requirements.

The config is applying rewrite rules on Layer2 headers 802.1p and marking network-control and best-effort with same markings.  Has any traffic been classified into the different forwarding classes?

 

Also, unless the egress port is being congested and traffic being buffered on the egress queues causing additional latency, not sure how CoS would fix this latency problem.

 

Cheers,

Ashvin

Highlighted
Junos

Re: CoS configuration

‎09-23-2016 08:39 AM

Hi AshvinO,

 

I just tried to follow the link provided by Juniper.

I guess i made something wrong.

 

The only things i need is to configure a Cos = 2 and a VLAN=2900 on the ge-0/0/0 interface.

About the VLAN i think it's OK, now i need to configure the CoS.

 

Without the CoS configured, i have internet connection on the SRX but i observed very big latency on the internet access. The ISP told that is normal because we didn't configure the CoS.

 

Can you help me on this point ?

 

I try to understand the CoS with the differents links provided by Juniper.

 

Thanks

David

Highlighted
Junos

Re: CoS configuration

‎09-23-2016 11:48 AM

Hi David,

 

If I understand from config you have IP address configured on this interface, seems this is your WAN interface. Wondering why you are applying Layer 2 COS ?

Highlighted
Junos

Re: CoS configuration

‎09-26-2016 01:08 AM

Hi,

I need to apply this configuration because it's an ISP recommendation.

Without this configuration the internet connection is very slow.

Regards,

David

Highlighted
Junos

Re: CoS configuration

‎09-26-2016 01:13 AM

Here is the configuration applied on the previous Cisco router :

vlan 2900
name C2E
!
!
class-map match-any class1
match input-interface FastEthernet4
match vlan 2900
!
!
policy-map marqdot1p
class class1
set cos 2

 

interface FastEthernet4.900
!
interface FastEthernet4.2900
description WAN C2E1
encapsulation dot1Q 2900
ip address X.X.X.X 255.255.255.252
ip nat outside
ip virtual-reassembly in
service-policy output marqdot1p

 

I need to apply the same configuration on the SRX, but i don't find the equivalent on junos 🙂

 

Thanks for your help.

 

 

Highlighted
Junos

Re: CoS configuration

‎09-26-2016 01:50 AM

Hi, 

 

The initial config looks ok except I think the code point should be 010 for cos 2.

You may also want to add all the other default forwarding-classes[assured-forwarding & expedited-forwarding] if there's traffic matching those.


Cheers,

Ashvin.

Highlighted
Junos

Re: CoS configuration

‎09-26-2016 04:15 AM

I configured it as you advised :

 

set interfaces ge-0/0/0 per-unit-scheduler
set interfaces ge-0/0/0 vlan-tagging
set interfaces ge-0/0/0 speed 100m
set interfaces ge-0/0/0 link-mode full-duplex
set interfaces ge-0/0/0 gigether-options no-auto-negotiation
set interfaces ge-0/0/0 unit 0 vlan-id 2900
set interfaces ge-0/0/0 unit 0 family inet address X.X.X.X/30

....

set class-of-service interfaces ge-0/0/0 unit 0 rewrite-rules ieee-802.1 class
set class-of-service rewrite-rules ieee-802.1 class import default
set class-of-service rewrite-rules ieee-802.1 class forwarding-class network-control loss-priority low code-point 010
set class-of-service rewrite-rules ieee-802.1 class forwarding-class network-control loss-priority medium-low code-point 010
set class-of-service rewrite-rules ieee-802.1 class forwarding-class network-control loss-priority medium-high code-point 010
set class-of-service rewrite-rules ieee-802.1 class forwarding-class network-control loss-priority high code-point 010
set class-of-service rewrite-rules ieee-802.1 class forwarding-class best-effort loss-priority low code-point 010
set class-of-service rewrite-rules ieee-802.1 class forwarding-class best-effort loss-priority high code-point 010

 

What do you think ?

Thanks.

 

David

Highlighted
Junos
Solution
Accepted by topic author dlabarthe@nextsys.fr
‎10-11-2016 08:23 AM

Re: CoS configuration

‎10-04-2016 02:50 AM

Hi team,

I followed your advices and it's working like a charm.

Thanks for your help.

Regards,

David

Feedback