[AusNOG] Server BW limits
Glen Turner
gdt at gdt.id.au
Tue Sep 11 00:58:26 EST 2012
[apologies for only now catching up reading ausnog]
On 2012-08-27 Don Gould wrote:
> Code samples anyone?
It's simple enough on a Linux host (and I can't imagine that it's much
harder on other operating systems).
Use Quagga to take a full BGP feed. Set up an incoming route-map that
applies a Linux realm to the incoming routes, one realm per class of
traffic. You'll need the quagga+realm patch for this.
Use "tc" to configure one outgoing queue per class of traffic, with the
selection criteria for queue entry being the realm of route covering the
destination address. For classes where you are trying to control
throughput then configure traffic shaping (where you are more interested
in relative performance use queue length and drop preference). If your
pipe size doesn't match your host's interface speed then you may need to
configure a hierarchy of queues, and Linux does this fine.
An application can query the Linux forwarding table via the "netlink
socket" API and use the returned realm value to do something
application-specific, such as explain that the traffic is being shaped
and they should go elsewhere for better perfomance. You don't have to
pull the entire routing table into the application, as the API will
return the matching route entry for a particular destination address.
For that matter, if you think about what the realm of the default route
should be then you don't need to install the entire BGP routing table
into the kernel's forwarding table.
Best wishes,
-glen
More information about the AusNOG
mailing list