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

Configuring Class-of-Service-Based Forwarding

Class-of-service (CoS)-based forwarding allows you to control the next-hop selection based on a packet’s class of service or IP precedence. It allows path selection based on a multifield classifier.

To configure CoS-based forwarding, perform the following tasks:

  1. Create a routing policy at the [edit policy-options] or [edit logical-systems logical-system-name policy-options] hierarchy levels to limit the configuration so that routes matching the route filter will be subject to the CoS next-hop mapping specified in my-cos-map:
    [edit]
    policy-options {
    policy-statement my-cos-forwarding {
    from {
    route-filter ...;
    }
    then {
    cos-next-hop-map my-cos-map;
    }
    }
    }
  2. Create a CoS next-hop map. To specify a CoS next-hop map, include the cos-next-hop-map statement at the [edit class-of-service] hierarchy level. For more information about creating a CoS next-hop map, see the JUNOS Class of Service Configuration Guide.
  3. Specify the exporting of the routes to the forwarding table at the [edit routing-options] or [edit logical-systems logical-system-name routing-options] hierarchy levels:
    [edit]
    routing-options {
    forwarding-table {
    export my-cos-forwarding;
    }
    }
  4. Specify a static route that has multiple next hops for load balancing at the [edit routing-options] or [edit logical-systems logical-system-name routing-options] hierarchy levels:
    [edit]
    routing-options {
    static {
    route 12.1.1.1/32 {
    next-hop [ 3.1.1.2 3.1.1.4 3.1.1.6 3.1.1.8 ];
    }
    }
    }

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