Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Example: Configuring CoS-Based Forwarding

    Router A has two routes to destination on Router D. One route goes through Router B, and the other goes through Router C, as shown in Figure 1.

    Configure Router A with CBF to select Router B for queue 0 and queue 2, and Router C for queue 1 and queue 3.

    Figure 1: Sample CoS-Based Forwarding

    Sample CoS-Based Forwarding

    When you configure CBF with OSPF as the IGP, you must specify the next hop as an interface name, not as an IP address. The next hops in this example are specified as ge-2/0/0.0 and ge-0/3/0.0.

    [edit class-of-service]
    forwarding-policy {next-hop-map my_cbf {forwarding-class be {next-hop ge-2/0/0.0;}forwarding-class ef {next-hop ge-0/3/0.0;}forwarding-class af {next-hop ge-2/0/0.0;}forwarding-class nc {next-hop ge-0/3/0.0;}}}
    classifiers {inet-precedence inet {forwarding-class be {loss-priority low code-points [ 000 100 ];}forwarding-class ef {loss-priority low code-points [ 001 101 ];}forwarding-class af {loss-priority low code-points [ 010 110 ];}forwarding-class nc {loss-priority low code-points [ 011 111 ];}}}
    forwarding-classes {queue 0 be;queue 1 ef;queue 2 af;queue 3 nc;}
    interfaces {at-4/2/0 {unit 0 {classifiers {inet-precedence inet;}}}}
     [edit policy-options]
    policy-statement cbf {from {route-filter exact;}then cos-next-hop-map my_cbf;}
     [edit routing-options]graceful-restart;
    forwarding-table {export cbf;}
     [edit interfaces]
    traceoptions {file trace-intf size 5m world-readable;flag all;}
    ge-0/3/0 {unit 0 {family inet {address;}family iso;family mpls;}}
    ge-2/0/0 {unit 0 {family inet {address;}family iso;family mpls;}}
    at-4/2/0 {atm-options {vpi 1 {maximum-vcs 1200;}}unit 0 {vci 1.100;family inet {address;}family iso;family mpls;}}

    Modified: 2016-12-06