Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP route selection

hi:

we have 2 ISP belong to 2 different AS, I can control the outgoing traffic, but how to control the incoming traffic without changing anything at ISP end?

  • WAN Routing and Switching
5 REPLIES

Re: BGP route selection

Hi,

How you advertise your network to the ISP is what determines how incoming traffic is routed to you. The most common approach used is to prepend the AS-path to influence incoming traffic. Ofcourse, the configuration to effect this is done on your router(s).

Check out the following link.

http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00800945bf.shtml#conf4

HTH,

Sundar

Re: BGP route selection

Simplest way is to prepend AS_PATH, so longer PATH is less preferred. However this works not always and depends how different AS's are interconnected in your neighbourhood. For example if you prepend towards ISP2, but it's connected to an Internet Exchange directly, while ISP1 is connected via some third ISP3, then at Internet Exchange announces via ISP1 and ISP2 for your network will have equal length AS_PATH.

Better approach is to speak with both of your ISP about the way they're interconnected and ask if they use or could use BGP communities to alter annoucements at different part of their interconnection points. For example, if you want ISP2 to be your backup only then you may ask for community number that when sent will result assigning your routes lower local-pref.

Have a look at this document: http://www.cisco.com/univercd/cc/td/doc/cisintwk/ics/icsbgp4.htm

Re: BGP route selection

Hello,

in addition to the other posts, have a look at the following configuration examples (using AS-PATH and MED in order to influence how traffic enters the AS). In these examples, you want the route for 212.136.1.0/24 to be preferred through Router 2:

Router1

ip prefix-list AS1 seq 5 permit 212.136.1.0/24

!

route-map AS_PATH permit 10

match ip address prefix-list AS1

set as-path

!

route-map MED permit 20

!

router bgp 1

neighbor 194.143.1.1 route-map MED out

Router2

ip prefix-list AS2 seq 5 permit 212.136.1.0/24

!

route-map MED permit 10

match ip address prefix-list AS1

set metric 100

!

route-map MED permit 20

!

router bgp 1

neighbor 194.144.1.1 route-map MED out

Here, both ISP's advertise network 212.136.1.0 to you. The path through Router 2 would be preferred because of the lower metric.

Router1

ip prefix-list AS1 seq 5 permit 212.136.1.0/24

!

route-map AS-PATH permit 10

match ip address prefix-list AS1

set as-path prepend 200 200 200

!

route-map AS-PATH permit 20

!

router bgp 1

neighbor 194.143.1.1 route-map AS-PATH out

Here, you are prepending the AS path for the route through Router 1, which makes the route preferred through Router 2.

HTH,

GNT

Re: BGP route selection

GNT,

MED will work only if other ISP do not reset it (some do), and only for prefixes coming from the same neighbor AS. With two upstream ISP MED will not affect routing decision unless both ISP use 'bgp awlaways-compare-med' and AS's between them do not modify MED.

Re: BGP route selection

hi look at this...and configure attributes as per your requirement...

1. Drop the route immediately if its next hop isn?t accessible or reachable.

2. If there are two routes with different weights, pick the router with the largest weight.

3. If weight values are equal, choose the route with the largest local preference value.

4. If local preference values are equal for multiple routes, choose the route that originated with BGP on this router.

5. If none or all of the routes originated on this router, choose the route with the shortest AS path.

6. If all the AS path lengths are the same, choose the path with the lowest origin type. Origin refers to whether the route originated via an internal gateway protocol (IGP) or an external gateway protocol (EGP). Routes that have entered the GBP domain by redistribution are considered incomplete. IGP is lower than EGP, and EGP is lower than incomplete.

7. If all the origin types are the same, choose the path with the lowest MED value.

8. If all the MED values are the same, choose an external route over an internal route.

9. If all the routes are the same, choose the path with the closest IGP neighbor.

10. If the distance to the closest IGP neighbor are the same. Choose the path with the lowest BGP router ID. A router?s ID is the IP address assigned to the loopback interface or the highest IP address on an active interface at boot time.

Weight and Local Preference are local to the router and used to select the path for the data traffic traveling outside from our internal network.

MED is used to select the path for ISP router to send data to our internal network.

rate this post if it helps

regards

Devang

136
Views
0
Helpful
5
Replies
This widget could not be displayed.