FireBrick Speed Guide
Speed lanes
The FireBrick can manage the rate at which traffic flows using speed lanes. Traffic is placed in a speed lane using the shaping rules. All traffic in any speed lane is controlled by that lane – the speed is for the total traffic in the lane.
Speed lanes allow control of the rate at which traffic flows from and to each possible interface. You can select the interface you wish to view/control, the default being the interface current set for the default gateway (normally WAN).
Settings
| Name | Specify a name for the speed lane, e.g. “slow” |
| Security | Controls which users can view or edit this speed lane |
| Master | Select a master speed lane which also applies to this traffic |
| Rate Min | The minimum speed setting in Kbits/s |
| Rate Max | The maximum allowed speed setting in Kbit/s or blank for no limit |
| Fast | This means that this speed lane is not also limited by the master speed lane, but the master lane is affected by this traffic. |
| ACK | Setting this means that the responses to TCP messages are priority and not delayed. They still affect the speed lane and so delay other traffic. |
| QOS | This means that traffic with a fast type of service are priority and not delayed. They still affect the speed lane and so delay other traffic. |
| ms | This allows a number of milliseconds latency to be added to all traffic to that interface via this lane. |
The first speed lane is the default which is applied if there is no rule to allocate the traffic. It is also the default master speed lane of other lanes.
Traffic is assigned to a speed lane using the shaping rules, and the speed limits applied for that lane, but then the master speed lane is also applied. The master speed lane is usually used to allow the speed of an external internet feed (e.g. ADSL router) to be set, and allow some traffic to go in a lane marked fast to jump the queue.
This means that traffic may have up to 4 consecutive speed restrictions applied – from a lane and a master and to a lane and a master.
Statistics
If the clock is set, then various statistics are shown on the speed lanes…
| Rate Set | The currently selected rate. Where take is selected, the current rate being used is shown in brackets |
| Rate Now | The instantaneous rate indication for the last whole second in KB/s or Kb/s. |
| Rate 5min | The average rate over the last whole 5 minute period in KB/s or Kb/s |
| Day This | The total transferred so far today, in MB |
| Day Last | The total transferred in the last whole day, in MB |
| Month This | The total transferred so far this month, in MB |
| Month Last | The total transferred in the last whole month, in MB |
Note that the rate set and now can be displayed in Kbits/s or Kbytes/s depending on UI settings.
Technical Reference
- The Fast QOS flag works on packets with IP TOS (type of service) set to the value defined in the setup (default 160, typically for VoIP)
- The Fast ACK flag applies to any TCP packets with no payload. It applies if the specific speed lane has Fast ACK set.
- Traffic shaping operates by scheduling packets based on the time they would be sent if the link was the specified speed. This allows smooth operation with TCP and other protocols. Packets that queue jump (e.g. ACK or QOS) are counted and so slow later traffic hence maintaining the overall speed limits.
- Where a master speed lane has a minimum speed set, and there is spare unused capacity below that setting, then that spare capacity is added to the current usage of all subordinate lanes (subject to specified min and max speeds on each lane). This allows the spare capacity to be shared out. As the spare capacity is used, the subordinate lanes will move down to their minimum setting. By setting the max to the same as the min on any lane you can stop spare capacity being taken like this.
- Last day and Last month may be distorted if the FireBrick has been running for some time with the clock not set as these figures are updated on change of day or month.
- It is important to realise that the speed lane applies to the total traffic in that lane. E.g. if you have a lane of say 64Kb/s, and put web traffic (TCP port 80) down it, then this does not mean that each web page will be 64Kb/s but that the total of all sessions on that lane is limited to 64Kb/s – the more simultaneous sessions the less each gets. As such, you can have multiple lanes at the same speed and assign different traffic to different lanes.
- This allows simulation of long latency lines such as satellite links. Note that there is limited buffering capacity, so high bandwidth high latency links can result in packet loss. Latency settings are limited to a maximum of 5000ms and so not suitable for RFC1149 simulation.
- Some internally generated packets are never subject to speed lanes, such as DHCP request/replies, pings for profiles, and tunnel keep alives.
Master speed lanes
Traffic is assigned to a single speed lane using the shaping rules. Each speed lane may then also list a master speed lane which is also applied. The idea behind this is that you may want to control various types of traffic which all then go via a simple feed (e.g. an ADSL line). The master speed lane allows you to then control the rate at which the traffic is actually sent overall. By limiting this you can avoid the external routers buffers filling. This means that traffic marked fast is able to jump the queue on the FireBrick and then not hit another queue in the external router. This is particularly useful for voice over IP over ADSL, for example.
- Statistics record details of the traffic through the lane in each direction depending on the interface. They are also counted on the corresponding master speed lane.
- The from interface statistics includes traffic that has been discarded because of the speed restriction. The to interface statistics only shows traffic which is being sent.
- The statistics ar recorded as entries are recieved or placed in the queue, and so may show higher than the rate set even though the rate limiting is working perfectly.
- Traffic that is QOS or ACK is unaffected (i.e. not delayed) by its speed lane or the master, but it does contribute to the usage of both and so slows other traffic.
- Traffic that is Fast is affected by its own speed lane but not by the master. The master speed lane is however affected by the usage and so slows other traffic. I.e. traffic marked fast effectively stealths bandwidth from the master speed lane.
- Latency added is added for the specific speed lane and the master speed lane for the from and to interface making a total of 20s latency possible.