How is a packet classified if i have a dscp classifer configured but the dscp value of the incoming packet is not configured.
e.g. In my dscp classifier (dscp-class) i have only configured the dscp values below and they have been assigned to various forwarding classes.
How will a packet with dscp value af21 (010010) be classified (note; i have not imported the dscp-default in my classifier)
set class-of-service code-point-aliases dscp dscp-CS7 111000set class-of-service code-point-aliases dscp dscp-CS6 110000set class-of-service code-point-aliases dscp dscp-EF 101110set class-of-service code-point-aliases dscp dscp-AF11 001010set class-of-service code-point-aliases dscp dscp-BE1 000001set class-of-service code-point-aliases dscp dscp-BE 000000
set class-of-service classifiers dscp dscp-class forwarding-class NC loss-priority high code-points dscp-CS7set class-of-service classifiers dscp dscp-class forwarding-class NC loss-priority low code-points dscp-CS6set class-of-service classifiers dscp dscp-class forwarding-class EF loss-priority low code-points dscp-EFset class-of-service classifiers dscp dscp-class forwarding-class AF loss-priority low code-points dscp-AF11set class-of-service classifiers dscp dscp-class forwarding-class BE loss-priority high code-points dscp-BEset class-of-service classifiers dscp dscp-class forwarding-class BE loss-priority low code-points dscp-BE1
af21 will be classified as best-effort.
Traffic that does not explicitly receive CoS treatment from the device is assigned to the best-effort forwarding class.
Yes. thank you for that.
Now, do you know if the original markings in the packet headers are maintained on egress or they are re-written to best effort?
That depends on whether the port is trunk or access or device is SRX or EX. If you do not write and apply your own CoS classifiers and re-write rules, then the default that ships with the device is applied.
https://www.juniper.net/documentation/en_US/junos/topics/concept/schedulers-default-cos-config-guide.htmlhttps://www.juniper.net/documentation/en_US/junos/topics/concept/classifier-ba-overview-cos-config-guide.htmlThe BA classifier looks at specific bit field in the incoming packet, and maps a CoS value in the packet header to a forwarding class and loss priority so the acket can be further processed. The forwarding class determines the output queue. The loss priority is used by schedulers in conjunction with the random early discard (RED) algorithm to control packet discard during periods of congestion. If using MF classifier, you use a firewall filter to classify the packets based on youir choice whether SA/DA/SMAC/DMAC or whatewver you like. Whether your classification is honored depends on the re-write rules. By default, EX Series switches do not rewrite CoS bits, because ther are no rewrite rules applied, so the original bits remain unchanged on the egress interface.
If you do nothing to configure or assign classifiers, Junos OS automatically assigns an implicit default IP precedence classifier to all logical interfaces that maps IP precedence code points to best-effort and network-control forwarding classes (mapped to queue 0 and queue 3 on routing devices, respectively)https://www.juniper.net/documentation/en_US/junos/topics/concept/cos-ex-series-rewrite-rules-understanding.htmlIn effect, the rewrite rule performs the reverse function of the behavior aggregate (BA) classifier, which is used when the packet enters the switch. As the packet leaves the switch, the final CoS action is generally the application of a rewrite rule.
You configure rewrite rules to alter CoS values in outgoing packets on the outbound interfaces of an edge switch to meet the policies of a targeted peer