understanding traffic shaping
Kai Krebber <Kai.Krebber <at> krick.net>
2008-12-11 08:31:28 GMT
I'm currently trying to understand traffic shaping on the SSGs and have
a hard time.
Prep for JNCIS FWV has the following question:
You have 4 policies configured for the egress interface with 10Mbps
Policy1: Prio0, 1Mbps GBW, 3Mbps MBW
Policy2: Prio1, 1Mbps GBW, 4Mbps MBW
Policy3: Prio1, 2Mbps GBW, 2Mbps MBW
Policy4: Prio0, 2Mbps GBW, 4Mbps MBW
The book states that under full load policy 4 would drop packets first.
I tried to simulate this and got a different result. I assume, my
assumptions are wrong, but I would need help to spot the error:
Let's say a constant stream of 1 Mbit-packets - one fitting each policy
- hits the device with 40Mbps.
I'll name the packtes after the policy-id, they will fit:
1,2,3,4,1,2,3,4,1,2,3,4, and so on.
Since the egress speed is only 10Mbps, the SSG can only send out one
packet for every four packets, it receives.
First packet hit's the device. It's policy 1. Since Policy 1 has 1Mbps
GBW, the packet goes straight out to the egress interface.
Second packet - this time for policy 2. Again 1 Mbps GBW, so the packet
get's straight queued on the interface, since the first packet is still
being put on the wire.
Same with packet 3 and 4.
Now packet 5 arrives- again for policy 1. GBW is exhausted, but MBW is
not even reached, so this packet is been pushed to Queue 0
Meanwhile packet 1 has left the building and packet 2 is been processed
to be put on the wire.
Next packet 6 arrives (policy 2) - again that GBW is exhausted, but not
the MBW, so this packet is placed in Queue 1.
Next packet 7 (policy 3) comes along - here we're even still in the GWB,
so this packet goes straight to the out-queue for the egress interface.
The last bits of packet 2 have just hit the wire.
Packet 8 arrives (policy 4). Again a GBW-Packet, so it joins Pakets 4
and 7 (3 has just started to be put on the wire).
Packet 9 comes in - Policy1 - This packet is just inside the MBW-limit.
It's the third 1Mb-Paket for policy 1 within this second and we got
3Mbps MBW, so that packet joins packet 5 in Queue 0.
Packet 10 comes in - policy 2. Here we've used up 3 of the 4 Mbps MBW,
so that packet goes into Queue 1.
And according to my understanding, packet 11 finally gets dropped, since
this would be 3Mbps for a 2 Mbps - MBW in policy 3.
Where's my mistake?