Routing issues
Martin Kraus
martin.kraus at wujiman.net
Mon Dec 5 12:40:19 CET 2011
On Sun, Dec 04, 2011 at 06:38:51PM -0500, dspazman at epicup.com wrote:
> On Mon, Dec 05, 2011 at 07:38:30AM +1100, Martin Barry wrote:
> > > The end result is to have a BGP router using two connections to announce
> > > my /22 using my ASN, from the bird router I need to be able to send out
> > > requests from my /22 over both interfaces (I have them weighted in the
> > > bird config file so one gets more traffic).
>
> > which would balance the outgoing traffic. however the incoming comes over
> > based on bgp preferences(mainly as path) in the internet which results in a
> > lot of asymetric routing. this will result in weird latency and problems with
> > one line affecting all connections.
>
> Can the bgp routing path be set so incoming traffic prefers one connection over the other, as well? I thought setting something like this:
>
> protocol ospf {
> import all;
> export filter {
> ospf_metric1 = 1000;
> if source = RTS_STATIC then accept; else reject;
> };
>
> area 0 {
> interface "eth0" {
> cost 50;
> type broadcast;
> hello 5; retransmit 2; wait 10; dead 20;
> };
>
> interface "eth1" {
> cost 5;
> type pointopoint;
> hello 5; retransmit 2; wait 10; dead 20;
> };
> interface "*" {
> cost 1000;
> stub;
> };
> };
> }
>
> Would cause the path through the connection on eth0 to be 10x more prefered then the path through eth1, so incoming bandwidth should be split in about a 10-1 ratio. So if I have eth0 as a 10 Gig connection, and eth1 as a 1 Gig connection, between using that for incoming traffic, and a multipath rule for outgoing traffic like this:
>
> ip route add default scope global nexthop via 1.1.1.153 dev eth0 weight 10 nexthop via 2.2.2.81 dev eth1 weight 1
>
> Would cause the two connections to be pretty uniformly used on incoming and outgoing traffic at a 10/1 ratio, allowing me to pretty fully saturate both lines?
eh. not really. the thing you show here is ospf and the cost is simply the
weight of the link that is taken into account when it computes the shortest
path. there is no load balancing involved.
bgp can loadbalance only by ip networks, and it is a manual process for long
term setup, not per packet magic solution.
hate to say it but setting it correctly requires a lot of reading and some experience.
basically the best thing to do is just to set two bgp peers and then mess with the
as path to balance the incoming traffic over those two connections.
mk
More information about the Bird-users
mailing list