[LARTC] I know there must be a way ...

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looking through all the advanced routing docs I can find, I think I have
dug up enough parts to cobble something together to do what I need but I
am befuddled. Here is a description of my problem:

Two providers. A primary I will call provider-A and a backup that I will
call provider-B. I collect full routes from both by BGP. My aggregate
traffic output varies from about 130MB in the middle of the night up to
about 300MB during the day ... a little lower on the weekends. Provider-B
is more expensive and has a 50MB minimum. I have fiddled with my BGP so
that I end up sending about 45-50MB of traffic to provider-B during my
peak time of the day.  What I would like to do is pretty much nail
provider-B to 50MB at all times using a Linux box in the traffic path.

A bit more detail on what I am trying to do:

A packet arriving from inside my network has 4 possible dispositions.

1. There is a route to the destination from both providers (most likely).
2. There is a route only from Provider-A.
3. There is a route only from Provider-B.
4. There is no route from either provider.

I can make zebra put routes into realms. I can then check arriving packets
to see if a realm has a route to the destination. Packets in disposition 2
must go to provider-A, packets in disposition 3 must go to provider-B.
Packets in disposition 1 are what I call "the pool" and may go to either A
or B to get to their distination.

What I want to do is create three streams ... A, B, and Pool. I need to
mark A so that it gets routed to provider-A (with FWMARK or some other
means ... say TOS), mark stream B so that it is nailed to provider B, BUT
when stream B is below 50MB, I want to pull in packets from the pool to
bring it up to 50. I do NOT want to rate-limit at 50 because if I loose my
link to provider-A or they have a peering issue, more than 50MB might need
to go to B, I just want to stop pulling traffic from the pool at that
point.  Any traffic in the pool remaining after B has pulled what it wants
would be marked for provider-A.

What I end up with is something like this:

Traffic that can only be routed to A goes to A
Traffic that can only be routed to B goes to B
If B is less than 50MB, get some of the traffic that could go to either A
or B to make up the difference
Remaining traffic goes to A.

Is anyone here ever done this?






[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux