cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
752
Views
0
Helpful
6
Replies

EBGP Query

Keith Alman
Level 1
Level 1

Afternoon All,

Given a number of externally peered BGP routers, all ibgp meshed, how would one influence egress traffic via prefix.

Local Preference does work on inbound updates, creating a preference on outgoing traffic, however I can only engineer traffic based on destinaion network/AS, not source/origination prefix.

Will a simple distribute list on the neigbour create the desired result, or am I completely losing the plot?

Thanks in advance

6 Replies 6

mheusinger
Level 10
Level 10

Hello,

to influence the BGP path selection in a neighbor AS you can use BGP AS path, BGP MED or - through BGP community with the help of the neighbor AS - Local preference.

Unless the neighboring AS does implement their own policy contradicting yours, the most simple approach would be to set different MED values - lower ones are better. As all other path selection criteria (Weight, Loc Pref, AS path) are the same in all updates, path selection in the neighbor AS will be based on MED.

The advantage is also, that the neighboring AS does not have to do something special.

BGP MED can be set f.e. through an outgoing route-map.

Hope this helps! Please rate all posts.

Regards, Martin

Martin,

Thanks for the reply.

What i'm refereing to is influencing prefixes that originate in my AS as to which router they should use to exit.

To the best of my knowledge MED's influence ingress traffic into an AS.

Jansen

Ah, so I misunderstood.

So would you like to

A) send prefixes through only a subset of your BGP peers to the neighboring AS?

B) send the traffic from some of your prefixes to some destinations in the internet through some specific peers?

C) explain me, what you really want to achieve, if A) and B) are not matching.

For A) prefix-lists could do the job. For B) the only option is policy based routing, because normal IP routing is solely destination based.

Hope this helps! Please rate all posts.

Regards, Martin

Martin,

"A" seems the closest match.

Say I have 4 x /24's and 2 external Peers. (on two distinct routers using iBGP for prefix exchange) What I would like to achieve is for 1 of the /24's to prefer external router A as oppsed to router B for both egress and ingress traffic. B is only to be used by this /24 in the event that A is unaccessible.

If i'm still unclear please say so, and I'll elaborate.

Depending on your network, there are at least few ways of doing this, none that I know of are all that pretty and it depends on your network structure as to which way would be best. Assuming the /24 that you want to egress through router A is directly connected to router and and the other three /24s are directly connected to Router B, you can add a weight to the incoming advertisements from your external peers. The weight is only local to the router, so once traffic arrives on that router, it will use that as an exit point, unless the exit point is down.

The second way to do this is to use policy based routing. You create a route-map which matches on prefix you want to route out of router A, and then set the next-hop to the next-hop to router A. You then match your other three prefixes, (or just omit the match statment for everything else) and set the next hop to your path to router B. You need to apply this on the inbound interface where the traffic is coming from as a policy-map. Depending on how your network is built, you have to be careful not to create a routing loop as you are manually manipulating traffic.

If the prefix that is to go out router A is located on one router C and the prefixes to go our router B are on router D, you can also change the local preference on your iBGP advertisement out to routers C and D. To do this you would apply a route-map outbound from router A to router C which sets to the local preference to say 200. Because iBGP routes are not passed on to any other iBGP neighbors, all of the other routers will still have a local preference of 100 for the outbound destinations . You could then also apply a route-map outbound on the iBGP session from router B to router D doing the same thing. This would make Router D prefer router B as its exit point, and Router C would prefer router A as its exit point. All other routers would be uneffected by the change.

Let me know if this helps or more information about how the network is configured.

Keith Alman
Level 1
Level 1

The policy routing method is certianly ugly, albeit will work. I was hoping to be able to achieve this with BGP.

The network at the moment is standard as far as enterprise multi-layered model goes. At the top Transport layer 2 routers with ebgp feeds exist. These two routers exchange prefixes via ibgp. Anything from the transport to customer access, where the prefixes reside, exchange routing information using an IGP. The idea was to have a /24 prefix exit via router A, since the customer does not "like" Router B's transit.

I certainly could use policy routing based oin source at the transport devices to manually set next hops. It doesn't however seem like an ideal situation.

Review Cisco Networking for a $25 gift card