8

I'm using a Juniper EX2200 as demarc/CPE device for a customer that has multiple handoff ports on the one switch. I need to make sure that, across all their ports, they don't use more bandwidth than they ordered.

I've read the Juniper doc Defining CoS Schedulers and I'm still not sure if the egress shaper is applied per-interface or per-scheduler.

My config snippit is below. Ports 0/1/0-3 are downstream to the customer and port 0/1/0 is upstream.

# show class-of-service
interfaces {
    ge-0/0/0 {
        scheduler-map all-cust;
    }
    ge-0/0/1 {
        scheduler-map all-cust;
    }
    ge-0/0/2 {
        scheduler-map all-cust;
    }
    ge-0/0/3 {
        scheduler-map all-cust;
    }
    ge-0/1/0 {
        shaping-rate 20971520;
    }
}
scheduler-maps {
    all-cust {
        forwarding-class best-effort scheduler all-cust;
    }
}
schedulers {
    all-cust {
        shaping-rate 31457280;
    }
}

2 Answers 2

6

Per port, not aggregate. Schedulers are not global, rather per interface queue.

1
  • Thanks! Maybe this should be a different question, but is there a different way to globally shape a group of interfaces?
    – jda
    Commented Dec 31, 2013 at 5:29
5

You should consider policing since your concern is that they don't get more bandwidth than they have been allotted. This will give you a hard limit.

Your shaping in this instance is just ensuring that 31457280 goes into the BE forwarding-class, not that they can't get more bandwidth than 31457280.

2
  • I'd like to avoid sawtoothing the traffic to be polite if possible. I could make a custom forwarding-class that matches all tags. If policing is the way to do what I want then I'll ignore the client-facing ports and just shape out / police in on my upstream-facing port.
    – jda
    Commented Dec 31, 2013 at 16:59
  • 1
    @jona If you want to set a hard limit, that's the one guaranteed way to do it. TCP won't really care about the abrupt packet drops, though UDP may. This is where you would likely want to add in CoS maps, to guarantee UDP a chunk of traffic. Keep in mind that if your customer handles their own network, the shaping should be performed by them, not you.
    – Ryan Foley
    Commented Dec 31, 2013 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.