Routing issues

dspazman at epicup.com dspazman at epicup.com
Mon Dec 5 00:38:51 CET 2011


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?



> My original answer relates only to traffic with a source address in your
> Cogent /29 as this might be filtered by HE. You might need to do something
> similar to traffic with a source address in your HE /29 as this might be
> filtered by Cogent. Traffic with a source address in your /22 shouldn't have
> that problem.

the policy routing should probably still be setup to allow testing of a
particular line because this way incoming and outgoing traffic do not have to
come over the same line.
 
mk





More information about the Bird-users mailing list