Navigation

Example: Configuring CoS for Tunnels
In Figure 1, Router A acts as a tunnel ingress device. The link between interfaces ge-1/0/0 in Router A and ge-1/3/0 in Router B is the GRE or IP-IP tunnel. Router A monitors the traffic received from interface ge-1/3/0. By way of interface ge-1/0/0, Router C generates traffic to Router B.
Figure 1: CoS with a Tunnel Configuration

Router A
[edit interfaces]
ge-1/0/0 {unit 0 {family inet {address 10.80.0.2/24;}}}
ge-1/0/1 {unit 0 {family inet {filter {input zf-catch-all;}address 10.90.0.2/24;}}}
gr-2/1/0 {unit 0 {tunnel {source 11.11.11.11;destination 10.255.245.46;}family inet {address 21.21.21.21/24;}}}
ip-2/1/0 {unit 0 {tunnel {source 12.12.12.12;destination 10.255.245.46;}family inet {address 22.22.22.22/24;}}}
[edit routing-options]static {route 1.1.1.1/32 next-hop gr-2/1/0.0;route 2.2.2.2/32 next-hop ip-2/1/0.0;}
[edit class-of-service]interfaces {ge-1/0/0 {unit 0 {rewrite-rules {inet-precedence zf-tun-rw-ipprec-00;}}}}
rewrite-rules {inet-precedence zf-tun-rw-ipprec-00 {forwarding-class best-effort {loss-priority low code-point 000;loss-priority high code-point 001;}forwarding-class expedited-forwarding {loss-priority low code-point 010;loss-priority high code-point 011;}forwarding-class assured-forwarding {loss-priority low code-point 100;loss-priority high code-point 101;}forwarding-class network-control {loss-priority low code-point 110;loss-priority high code-point 111;}}}
dscp zf-tun-rw-dscp-00 {forwarding-class best-effort {loss-priority low code-point 000000;loss-priority high code-point 001001;}forwarding-class expedited-forwarding {loss-priority low code-point 010010;loss-priority high code-point 011011;}forwarding-class assured-forwarding {loss-priority low code-point 100100;loss-priority high code-point 101101;}forwarding-class network-control {loss-priority low code-point 110110;loss-priority high code-point 111111;}}
[edit firewall]filter zf-catch-all {term term1 {then {loss-priority high;forwarding-class network-control;}}}
Router B
[edit interfaces]
ge-1/3/0 {unit 0 {family inet {address 10.80.0.1/24;}}}
lo0 {unit 0 {family inet {address 10.255.245.46/32;}}}
Router C
[edit interfaces]
ge-1/0/0 {unit 0 {family inet {address 10.90.0.1/24;}}}
[edit routing-options]static {route 1.1.1.1/32 next-hop 10.90.0.2;route 2.2.2.2/32 next-hop 10.90.0.2;}