Showing results for 
Search instead for 
Did you mean: 

BGP with weighted routes and HSRP

Level 1
Level 1

Can I split my AS into two subnets and wieght each subnet such that a preference is given to one ISP for subnet A and the other ISP for subnet B.

Specifically, I have a small AS (globally routable) - call it peered using two routers to two ISPs.

I have HSRP configured on the inside i/f of the two routers using two HSRP groups. For group 1, R1 is the active router and R2 is the standby router. For group 2, R2 is the active router and R1 is the standby router.

Traffic arriving at the R1 router is routed through ISP1 and traffic arriving at the R2 router is routed through ISP2.

Can I split my "" subnet into two subnets say and and wieght the routes so that return traffic will prefer the path to the originating router?


2 Replies 2

Level 1
Level 1

First make sure your two ISPs will announce your /28 networks. Some may not in order to keep routing tables small. Once you have determined that they will, you will want to use AS-Path prepend. See the following

For the match statements, change it to an access list and build an access list that contains 1 of your two networks. Then build another for your other network.

On R1 match group 2 network, and prepend your AS number several times.

On R2 match group 1 network, and prepend your AS number several times.

The exact number depends, you will want to play with it and determine the smallest number of prepends that get all traffic to flow over the correct path.

Level 10
Level 10


Even if you can talk your two ISPs into aaccepting and announcing your two /28 most large ISPs (like MCI) will not accept anything smaller than /24.

So you will not have connectivity to most of the internet with this approach.

You need at least two /24 and use AS path prepending:

R1 announces to ISP1 AS 65000 AS 65000 65000 65000 65000

R2 announces to ISP2 AS 65000 65000 65000 65000 AS 65000

This assumes you have AS 65000 - replace with your official AS if you have one.