Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BGP routing question

Status
Not open for further replies.

AyrishGrl

Technical User
Feb 14, 2005
129
US
I am fairly new to working with BGP and I am trying to figure somehting out. We have two connections each to a different ISP. We are running BGP with each ISP. Currently, inbound traffic is routing over both ISPs and I want to force all traffic down only one and use the other for failover purposes. We are running HSRP on the back end. I need to be able to weight the prferred (or non-prefered) ISP somehow. I think I can do this with the med, but am not sure how. We are running two 7204s and are receiving full routes from both ISPs (not sure why, but that was how it was set up when I got there). Also, is there any reason to receive full routes and not just a default route from the ISP? Seems like overkill to me.
 
Thanks for the link!

I tried the config and now I have all traffic appearing to go down 1 link which is what I want, but it is going down the wrong link. I think I have it configured to do the opposite, but its not working. Here is how its config'd.

ISP 1 (I want this to be the primary link)
router bgp 14839
no synchronization
bgp log-neighbor-changes
redistribute static route-map static-out
neighbor 66.237.112.33 remote-as 2828
neighbor 66.237.112.33 version 4
neighbor 66.237.112.33 distribute-list 11 out
neighbor 66.237.112.33 route-map SetMetric out
neighbor 66.237.112.33 filter-list 1 out

route-map SetMetric permit 10
match ip address 11
set as-path prepend 14839
********************************************
ISP 2 (backup link)

router bgp 14839
no synchronization
bgp log-neighbor-changes
redistribute static route-map static-out
neighbor 4.24.149.53 remote-as 1
neighbor 4.24.149.53 version 4
neighbor 4.24.149.53 distribute-list 10 out
neighbor 4.24.149.53 route-map SetMetric out
neighbor 4.24.149.53 filter-list 1 out

route-map SetMetric permit 10
match ip address 10
set as-path prepend 14839 14839
**************************************

All traffic seems to be going through ISP 2 and I want it the other way.

Also when doing a show route-map, should I see counters incrementing if it is working?

daml3#show route-map SetMetric
route-map SetMetric, permit, sequence 10
Match clauses:
ip address (access-lists): 10
Set clauses:
as-path prepend 14839 14839
Policy routing matches: 0 packets, 0 bytes

Thanks again.

 
When you say going down.. Do you mean outgoing traffic (leaving your network) or incoming traffic (coming from the Internet to you)?
 
Sorry - to clarify....All inbound traffic is using ISP 2. HSRP config has outbound traffic traversing ISP 1. I want inbound and outbound traffic using ISP 1. ISP 2 should pick up traffic in the event of an outage. HSRP should take care of the backend.
 
Ok...

Remove this line

neighbor 66.237.112.33 route-map SetMetric out

Only use the route-map on ISP2 because that is the path you want lengthened.

In fact... You might want to change your route-map on your ISP2 so that it prepends more. Try putting your AS number in there at least 3 times.
 
Thanks, I will give this a shot today and let you know how it goes.
 
I removed the route-map statement from ISP 1 and legthened the route-map on ISP 2 so that I am prepending the AS number 6 times. Traffic is still routing inbound through ISP 2. Do I need to reset the BGP session to actually implement the changes or should they kick in right away?

I also see a redistribute static statement in the BGP config.

redistribute static route-map static-out

daml3#show route-map static-out
route-map static-out, permit, sequence 10
Match clauses:
ip address (access-lists): 10
Set clauses:
Policy routing matches: 0 packets, 0 bytes

I am a bit confused. Which is actually advertising the routes: the distribute list or the static routes by redistrubution? Here are the static routes.

ip route 0.0.0.0 0.0.0.0 4.24.149.53
ip route 10.206.18.0 255.255.255.0 198.79.29.10
ip route 10.206.69.0 255.255.255.0 198.79.29.7
ip route 64.40.224.77 255.255.255.255 198.79.29.14
ip route 65.24.213.64 255.255.255.255 4.24.149.53
ip route 65.198.132.0 255.255.255.192 4.24.149.53
ip route 198.76.179.0 255.255.255.0 198.79.29.7
ip route 198.79.24.0 255.255.252.0 Null0
ip route 198.79.24.0 255.255.255.224 198.79.29.3
ip route 198.79.26.0 255.255.255.0 198.79.29.7
ip route 198.79.28.0 255.255.254.0 Null0
ip route 198.79.29.0 255.255.255.0 198.79.29.7
ip route 206.158.30.1 255.255.255.255 198.79.29.3
 
Looks like I had to reset the BGP to get the route-map changes to kick in. I did a soft reset and no all traffic seems to be flowing correctly through ISP 1.

I am still confused about the fact that we have both redistribute static and the distribute list statements. Do they work together?
 
distribute lists are use to tell BGP what routes you want to advertise to your peer....

So:
Code:
neighbor 4.24.149.53 distribute-list 10 out

This line tells BGP to advertise only routes allowed by access-list 10 to peer 4.24.149.53.

Redistribute static is just a fast way of telling BGP what routes to advertise.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top