BGP, should be simple

I'm having trouble wrapping my head around the concept of BGP weight and neighbor weight.

I have two local routers, A and B both connected to a single LAN. They connect to a cloud via a 50Mb line and a 45Mb line. The routers on the other end of the line, call them A1 and B1, are out of my control.

At a remote site I have a router C, which connects to the cloud via a T1 to router C1, also out of my control.

If I add weight to router A, when C tries to send a packet to the LAN, will it always prefer router A, as long as the line isn't down? Or do I need to tell C what path to take?

Reply to
S. Checker
Loading thread data ...

you use weight when you want manipulate with outgoing traffic from your local network, and weight attribute is use when you have one router with two exit (single home, dual single home design)

in your case i would like to use MED between your routers (A,B) and A1, B and set metric for network from router C. in that way you will "suggest" the A1 or B1 router which path you want to use when traffic from router C is destinated to your local network and if all atributes are by default less MED (less metric) will win.

if you want traffic originate from router C goes A1->A set MED betweenB-> B1 to some random value. with that this path will be worse because of higher metric (higher is worst in this case) and A-A1 will have default MED 0 and that is better path (routers B1 will know that router A1 is the next hop if he will have some traffic for your local network)

Reply to

and use route-map ;)

Reply to

I appreciate the time you took to lay this out. Reading further on MED it certainly appears to do what I want although it makes my small brain hurt a bit. The first attempt I've put together, on Router B, is:

router bgp 101 ... neighbor route-map MED-up in ... access-list 11 remark route map for MED access-list 11 permit any ... ! route-map MED-up permit 10 match ip address 11 set metric 11

The "in" or "out" on the neighbor command had me stymied; fortunately it is not yet fully production so I can afford to play with it.

Again, thank you.

Reply to
S. Checker

I am very far from a BGP expert however to ensure a preferred return path from the Internet in the past I have used as-path prepend.

I found it *simple to understand* and to implement.

formatting link
It seems that it can be used for inbound and *outbound* traffic.

If we are AS 7 and some remote internet AS 8 has two potential bgp paths available

At the remote end it might look like this.

A - 8 27 47 67 87 7 B - 8 17 37 57 77 97 7 A will be preferred since it is shorter.

By using AS path-prepend you can make one of the paths artificially longer

router bgp 7 ... neighbour A route-map prepend out route map X set as-path prepend 7 7 7

The two paths now look like this at the remote end.

A - 8 27 47 67 87 7 7 7 7 B - 8 17 37 57 77 97 7 B is now preferred

Perhaps this might be suitable for your needs? I think it very easy to follow.

Reply to

S. Checker wrote: ...

Following up:

Once I switched my innie to an outie, it works just fine.

Reply to
S. Checker

thats right, you must use "out" when use MED, that means that the metric will be use for all incoming traffic (in your case for route in acl 11, any route in your case )

in andout direction are little confused it ist not logical to me...

Reply to
mixig Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.