Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Example: Configuring Shared Resources on Ethernet IQ2 Interfaces

date_range 13-Jan-21

For input traffic on physical interface ge-1/2/3, logical interface units 1, 2, and 3 are sharing one set of scheduler-shaper resources, defined by traffic-control profile s1. Logical interface units 4, 5, and 6 are sharing another set of scheduler-shaper resources, defined by traffic-control profile s1.

For output traffic on physical interface ge-1/2/3, logical interface units 1, 2, and 3 are sharing one set of scheduler-shaper resources, defined by traffic-control profile s2. Logical interface units 4, 5, and 6 are sharing another set scheduler-shaper resources, defined by traffic-control profile s2.

For each physical interface, the shared-instance statement creates one set of resources to be shared among units 1, 2, and 3 and another set of resources to be shared among units 4, 5, and 6. Input and output shaping rates are configured at the physical interface level, which demonstrates the hierarchical shaping capability of the Gigabit Ethernet IQ2 PIC.

content_copy zoom_out_map
[edit]
class-of-service {
    traffic-control-profiles {
        s1 {
            scheduler-map map1;
            shaping-rate 100k;
        }
        s2 {
            scheduler-map map1;
            shaping-rate 200k;
        }
    }
    forwarding-classes { # Map one forwarding class to one queue.
        queue 0 fc-be;
        queue 1 fc-be1;
        queue 2 fc-ef;
        queue 3 fc-ef1;
        queue 4 fc-af11;
        queue 5 fc-af12;
        queue 6 fc-nc1;
        queue 7 fc-nc2;
    }
    classifiers { # Map 802.1p bits to forwarding-class and loss-priority.
        ieee-802.1 ieee-8021p-table {
            forwarding-class fc-nc2 {
                loss-priority low code-points [111];
            }
            forwarding-class fc-nc1 {
                loss-priority low code-points [110];
            }
            forwarding-class fc-af12 {
                loss-priority low code-points [101];
            }
            forwarding-class fc-af11 {
                loss-priority low code-points [100];
            }
            forwarding-class fc-ef1 {
                loss-priority low code-points [011];
            }
            forwarding-class fc-ef {
                loss-priority low code-points [010];
            }
            forwarding-class fc-be1 {
                loss-priority low code-points [001];
            }
            forwarding-class fc-be {
                loss-priority low code-points [000];
            }
        }
    }
    interfaces {
        ge-1/2/3 {
            input-shaping-rate 500m;
            shaping-rate 500m; # Output shaping rate
            unit 0 { # Apply behavior aggregate classifier to an interface.
                classifiers {
                    ieee-802.1 ieee-8021p-table;
                }
            }
            unit 1 {
                input-traffic-control-profile s1 shared-instance 1;
                output-traffic-control-profile s2 shared-instance 1;
            }
            unit 2 {
                input-traffic-control-profile s1 shared-instance 1;
                output-traffic-control-profile s2 shared-instance 1;
            }
            unit 3 {
                input-traffic-control-profile s1 shared-instance 1;
                output-traffic-control-profile s2 shared-instance 1;
            }
            unit 4 {
                input-traffic-control-profile s1 shared-instance 2;
                output-traffic-control-profile s2 shared-instance 2;
            }
            unit 5 {
                input-traffic-control-profile s1 shared-instance 2;
                output-traffic-control-profile s2 shared-instance 2;
            }
            unit 6 {
                input-traffic-control-profile s1 shared-instance 2;
                output-traffic-control-profile s2 shared-instance 2;
            }
        }
    }
}

Configuring a Simple Filter

Configure a simple filter that overrides the classification derived from the lookup of the Layer 2 fields.

content_copy zoom_out_map
firewall {
    family inet {
        simple-filter sf-1 {
            term 1 {
                source-address 172.16.0.0/24;
                destination-address 172.16.20.0/24;
                source-port 1024-9071;
            }
            then { # Action with term-1
            forwarding-class fc-be1;
            loss-priority high;
        }
        term 2 {
            source-address 172.16.10.0/24;
            destination-address 172.16.30.0/24;
        }
        then { # Action with term-2
        forwarding-class fc-ef1;
        loss-priority low;
    }
}
interfaces { # Apply the simple filter.
ge-1/2/3 {
    unit 0 {
        family inet {
            simple-filter {
                input sf-1;
            }
        }
    }
}
 
class-of-service {
    scheduler-maps { # Configure a custom scheduler map.
    map1 {
        forwarding-class fc-be scheduler sch-Q0;
        forwarding-class fc-be1 scheduler sch-Q1;
        forwarding-class fc-ef scheduler sch-Q2;
        forwarding-class fc-ef1 scheduler sch-Q3;
        forwarding-class fc-af11 scheduler sch-Q4;
        forwarding-class fc-af12 scheduler sch-Q5;
        forwarding-class fc-nc1 scheduler sch-Q6;
        forwarding-class fc-nc2 scheduler sch-Q7;
    }
}
schedulers { # Define schedulers.
sch-Q0 {
    transmit-rate percent 25;
    buffer-size percent 25;
    priority low;
    drop-profile-map loss-priority any protocol any drop-profile drop-default;
}
sch-Q1 {
    transmit-rate percent 5;
    buffer-size temporal 2000;
    priority high;
    drop-profile-map loss-priority any protocol any drop-profile drop-ef;
}
sch-Q2 {
    transmit-rate percent 35;
    buffer-size percent 35;
    priority low;
    drop-profile-map loss-priority any protocol any drop-profile drop-default;
}
sch-Q3 {
    transmit-rate percent 5;
    buffer-size percent 5;
    drop-profile-map loss-priority any protocol any drop-profile drop-default;
}
sch-Q4 {
    transmit-rate percent 5;
    priority high;
    drop-profile-map loss-priority any protocol any drop-profile drop-ef;
}
sch-Q5 {
    transmit-rate percent 10;
    priority high;
    drop-profile-map loss-priority any protocol any drop-profile drop-ef;
}
sch-Q6 {
    transmit-rate remainder;
    priority low;
    drop-profile-map loss-priority any protocol any drop-profile drop-default;
}
sch-Q7 {
    transmit-rate percent 5;
    priority high;
    drop-profile-map loss-priority any protocol any drop-profile drop-default;
}
footer-navigation