[Contents] [Prev] [Next] [Index] [Report an Error]

Example: CoS with IPv6 DiffServ Configuration

Figure 13: IPv6 DiffServ Configuration

Image g017167.gif

Figure 13 shows the complete topology for IPv6 DiffServ, complete with interfaces and IPv6 addresses. The IPv4-mapped IPv6 address format described in RFC 1884 is used.

Begin your configuration on Router 2, the core router. This ensures that when DiffServ is enabled on the edge routers, CoS is enabled end to end through the network. The core router configuration is a little simpler because no MF classification is configured in the core.

Router 2

[edit]
class-of-service {
classifiers { # Router 2 classifiers.
dscp-ipv6 IPv6-classifier {
import default; # Uses the DSCP default map.
forwarding-class be-DATA-class {
loss-priority high code-points 000001;
}
forwarding-class ef-FIN-class {
loss-priority high code-points 101111;
}
forwarding-class af-AV-class {
loss-priority high code-points 001100;
}
forwarding-class nc-CONTROL-class {
loss-priority high code-points 110001;
}
}
}
drop-profiles { # Router 2 drop profiles.
af-AV-normal {
interpolate {
fill-level [95 100];
drop-probability [0 100];
}
}
af-AV-with-PLP {
interpolate {
fill-level [60 70 80 90 95];
drop-probability [80 90 95 97 100];
}
}
}
forwarding-classes { # Router 2 forwarding classes.
queue 0 be-DATA-class;
queue 1 ef-FIN-class;
queue 2 af-AV-class;
queue 3 nc-CONTROL-class;
}
interfaces { # Router 2 class-of-service interfaces.
so-1/0/1 { # Connected to R1.
scheduler-map diffserv-cos-map;
unit 0 {
classifiers {
dscp-ipv6 IPv6-classifier;
}
rewrite-rules {
dscp-ipv6 rewrite-IPv6-dscp;
}
}
}
so-1/0/2 { # Connected to R3.
scheduler-map diffserv-cos-map;
unit 0 {
classifiers {
dscp-ipv6 IPv6-classifier;
}
rewrite-rules {
dscp-ipv6 rewrite-IPv6-dscp;
}
}
}
}
rewrite-rules rewrite-IPv6-dscps { # Router 2 rewrite rules.
forwarding-class be-DATA-class {
loss-priority low code points 000000;
loss-priority high code points 000001;
}
forwarding-class ef-FIN-class {
loss-priority low code points 101110;
loss-priority high code points 101111;
}
forwarding-class af-AV-class {
loss-priority low code points 001010;
loss-priority high code points 001100;
}
forwarding-class nc-CONTROL-class {
loss-priority low code points 110000;
loss-priority high code points 110001;
}
}
scheduler-maps { # Router 2 scheduler maps.
diffserv-cos-map {
forwarding-class be-DATA-class scheduler be-DATA-scheduler;
forwarding-class ef-FIN-class scheduler ef-FIN-scheduler;
forwarding-class af-AV-class scheduler af-AV-scheduler;
forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler;
}
}
schedulers { # Router 2 schedulers.
be-DATA-scheduler {
transmit-rate percent 40;
buffer-size percent 40;
priority low;
}
ef-FIN-scheduler {
transmit-rate percent 10;
buffer-size percent 10;
priority high;
}
af-AV-scheduler {
transmit-rate percent 45;
buffer-size percent 45;
priority high;
drop-profile-map loss-priority low protocol any drop-profile af-AV-normal;
drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP;
}
nc-CONTROL-scheduler {
transmit-rate percent 5;
buffer-size percent 5;
priority low;
}
}
}
interfaces { # R2 interfaces.
so-1/0/1 { # Connected to R1.
unit 0 {
family inet {
address 10.0.0.1/24;
}
family inet6 {
address 0:0:FFFF:10.0.0.1/120;
}
}
}
so-1/0/2 { # Connected to R3.
unit 0 {
family inet {
address 10.0.1.1/24;
}
family inet6 {
address 0:0:FFFF:10.0.1.1/120;
}
}
}
}

Continue your configuration on Router 1 and Router 3, the edge routers. These routers get firewall-filter-based MF classifiers and rewrite rules for markers as well as schedulers and drop profiles on the core-facing interfaces.

Router 1

[edit]
class-of-service {
classifiers { # Router 1 classifiers.
dscp-ipv6 IPv6-classifier {
import default; # Uses the DSCP default map.
forwarding-class be-DATA-class {
loss-priority high code-points 000001;
}
forwarding-class ef-FIN-class {
loss-priority high code-points 101111;
}
forwarding-class af-AV-class {
loss-priority high code-points 001100;
}
forwarding-class nc-CONTROL-class {
loss-priority high code-points 110001;
}
}
}
drop-profiles { # Router 1 drop profiles.
af-AV-normal {
interpolate {
fill-level [95 100];
drop-probability [0 100];
}
}
af-AV-with-PLP {
interpolate {
fill-level [60 70 80 90 95];
drop-probability [80 90 95 97 100];
}
}
}
forwarding-classes { # Router 1 forwarding classes.
queue 0 be-DATA-class;
queue 1 ef-FIN-class;
queue 2 af-AV-class;
queue 3 nc-CONTROL-class;
}
interfaces { # Router 1 class-of-service interfaces.
so-0/1/1 { # To servers.
scheduler-map diffserv-cos-map;
unit 0 {
classifiers {
dscp-ipv6 IPv6-classifier;
}
rewrite-rules {
dscp-ipv6 rewrite-IPv6-dscp;
}
}
}
rewrite-rules rewrite-IPv6-dscps { # Router 1 rewrite rules.
forwarding-class be-DATA-class {
loss-priority low code points 000000;
loss-priority high code points 000001;
}
forwarding-class ef-FIN-class {
loss-priority low code points 101110;
loss-priority high code points 101111;
}
forwarding-class af-AV-class {
loss-priority low code points 001010;
loss-priority high code points 001100;
}
forwarding-class nc-CONTROL-class {
loss-priority low code points 110000;
loss-priority high code points 110001;
}
}
scheduler-maps { # Router 1 scheduler map.
diffserv-cos-map {
forwarding-class be-DATA-class scheduler be-DATA-scheduler;
forwarding-class ef-FIN-class scheduler ef-FIN-scheduler;
forwarding-class af-AV-class scheduler af-AV-scheduler;
forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler;
}
}
schedulers { # Router 1 schedulers.
be-DATA-scheduler {
transmit-rate percent 40;
buffer-size percent 40;
priority low;
}
ef-FIN-scheduler {
transmit-rate percent 10;
buffer-size percent 10;
priority high;
}
af-AV-scheduler {
transmit-rate percent 45;
buffer-size percent 45;
priority high;
drop-profile-map loss-priority low protocol any drop-profile af-AV-normal;
drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP;
}
nc-CONTROL-scheduler {
transmit-rate percent 5;
buffer-size percent 5;
priority low;
}
}
}
firewall { # Router 1 firewall policer and filter.
policer ef-FIN-Policer-Profile {
if-exceeding {
bandwidth-percent 10;
burst-size-limit 2k;
}
then loss-priority high;
}
family inet6 {
filter mf-classifier {
filter-specific;
term AV {
from {
destination-address {
0:0:FFFF:172.16.79.11;
}
}
then {
loss-priority low;
forwarding-class af-AV-class;
}
}
term Finance {
from {
destination-address {
O:0:FFFF:172.16.79.63;
}
}
then {
policer ef-FIN-Policer-Profile;
forwarding-class ef-FIN-class;
}
}
term Network-Control {
from {
traffic-class 192; # 192 is the 110000 traffic class.
}
then {
forwarding-class nc-CONTROL-class; # This is network control traffic.
}
}
term Data {
then forwarding-class be-DATA-class; # The rest is data.
}
}
}
}
interfaces { # Router 1 interfaces.
so-0/0/1 { # To servers.
unit 0 {
family inet {
address 192.168.54.1/24;
}
family inet6 {
filter {
input mf-classifier;
}
address 0:0:FFFF:192.168.54.1/120;
}
}
}
so-0/1/1 { # Connected to R2.
unit 0 {
family inet {
address 10.0.0.2/24;
}
family inet6 {
address 0:0:FFFF:10.0.0.2/120;
}
}
}
}
}

Router 3

[edit]
class-of-service {
classifiers { # Router 3 classifiers.
dscp-ipv6 IPv6-classifier {
import default; # Uses the DSCP default map.
forwarding-class be-DATA-class {
loss-priority high code-points 000001;
}
forwarding-class ef-FIN-class {
loss-priority high code-points 101111;
}
forwarding-class af-AV-class {
loss-priority high code-points 001100;
}
forwarding-class nc-CONTROL-class {
loss-priority high code-points 110001;
}
}
}
drop-profiles { # Router 3 drop profiles.
af-AV-normal {
interpolate {
fill-level [95 100];
drop-probability [0 100];
}
}
af-AV-with-PLP {
interpolate {
fill-level [60 70 80 90 95];
drop-probability [80 90 95 97 100];
}
}
}
forwarding-classes { # Router 3 forwarding classes.
queue 0 be-DATA-class;
queue 1 ef-FIN-class;
queue 2 af-AV-class;
queue 3 nc-CONTROL-class;
}
interfaces { # Router 3 class-of-service interfaces.
so-2/0/1 { # To servers.
scheduler-map diffserv-cos-map;
unit 0 {
classifiers {
dscp-ipv6 IPv6-classifier;
}
rewrite-rules {
dscp-ipv6 rewrite-IPv6-dscp;
}
}
}
rewrite-rules rewrite-IPv6-dscps { # Router 3 rewrite rules.
forwarding-class be-DATA-class {
loss-priority low code points 000000;
loss-priority high code points 000001;
}
forwarding-class ef-FIN-class {
loss-priority low code points 101110;
loss-priority high code points 101111;
}
forwarding-class af-AV-class {
loss-priority low code points 001010;
loss-priority high code points 001100;
}
forwarding-class nc-CONTROL-class {
loss-priority low code points 110000;
loss-priority high code points 110001;
}
}
scheduler-maps { # Router 3 scheduler map.
diffserv-cos-map {
forwarding-class be-DATA-class scheduler be-DATA-scheduler;
forwarding-class ef-FIN-class scheduler ef-FIN-scheduler;
forwarding-class af-AV-class scheduler af-AV-scheduler;
forwarding-class nc-CONTROL-class scheduler nc-CONTROL-scheduler;
}
}
schedulers { # Router 3 schedulers.
be-DATA-scheduler {
transmit-rate percent 40;
buffer-size percent 40;
priority low;
}
ef-FIN-scheduler {
transmit-rate percent 10;
buffer-size percent 10;
priority high;
}
af-AV-scheduler {
transmit-rate percent 45;
buffer-size percent 45;
priority high;
drop-profile-map loss-priority low protocol any drop-profile af-AV-normal;
drop-profile-map loss-priority high protocol any drop-profile af-AV-with-PLP;
}
nc-CONTROL-scheduler {
transmit-rate percent 5;
buffer-size percent 5;
priority low;
}
}
firewall { # Router 3 firewall policer and filter.
policer ef-FIN-Policer-Profile {
if-exceeding {
bandwidth-percent 10;
burst-size-limit 2k;
}
then loss-priority high;
}
family inet6 {
filter mf-classifier {
filter-specific;
term AV {
from {
destination-address {
0:0:FFFF:172.16.79.11;
}
}
then {
loss-priority low;
forwarding-class af-AV-class;
}
}
term Finance {
from {
destination-address {
O:0:FFFF:172.16.79.63;
}
}
then {
policer ef-FIN-Policer-Profile;
forwarding-class ef-FIN-class;
}
}
term Network-Control {
from {
traffic-class 192; # 192 is the 110000 traffic class.
}
then {
forwarding-class nc-CONTROL-class; # This is network control traffic.
}
}
term Data {
then forwarding-class be-DATA-class; # The rest is data.
}
}
}
}
interfaces { # Router 3 interfaces.
so-2/0/0 { # To servers.
unit 0 {
family inet {
address 1172.16.79.1/24;
}
family inet6 {
filter {
input mf-classifier;
}
address 0:0:FFFF:172.16.79.1/120;
}
}
}
so-2/0/1 { # to R2
unit 0 {
family inet {
address 10.0.1.2/24;
}
family inet6 {
address 0:0:FFFF:10.0.1.2/120;
}
}
}
}
}
}

[Contents] [Prev] [Next] [Index] [Report an Error]