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

BGP Config to Influence Outbound Traffic

sdiver
Level 1
Level 1

We have BGP multi-home with three ISPs and two routers, and I'm looking for validation on influencing outbound traffic.

Router01 peers with ISP01, and ISP01 provides us with a /24 IP block (eg. 1.1.1.0/24).

Router02 peers with ISP02, and ISP02 provides us with a /24 IP block (eg. 2.2.2.0/24). Router02 also peers with ISP03, and ISP03 provides us with a /24 IP block (eg. 3.3.3.0/24).

We would like to influence the 1.1.1.0/24 IP block to egress over the ISP01 connection, and the 2.2.2.0/24 and 3.3.3.0/24 IP blocks to egress over the ISP02 connection. To do that, our thought is to create route-maps on each router and set a local-preference for each IP block.

On the Router01, create the following route-maps to influence traffic to exit over the ISP01 connection:

 
ip prefix-list ISP01 seq 5 permit 1.1.1.0/24
ip prefix-list ISP02 seq 5 permit 2.2.2.0/24
ip prefix-list ISP03 seq 5 permit 3.3.3.0/24
ip prefix-list DEFAULT seq 100 permit 0.0.0.0/0
!
route-map ISP01-LP-IN permit 5
 description PERMIT ISP01 IP BLOCK & SET LOCALPREF
 match ip address prefix-list ISP01
 set local-preference 200
!
route-map ISP01-LP-IN permit 10
 description PERMIT DEFAULT ROUTE ON ISP01
 match ip address prefix-list DEFAULT
!
router bgp XXXXXX
 address-family ipv4
  neighbor A.A.A.A route-map ISP01-LP-IN in
 
On the Router02, create the following route-maps to influence traffic to exit over the ISP02 connection:
 
ip prefix-list ISP01 seq 5 permit 1.1.1.0/24
ip prefix-list ISP02 seq 5 permit 2.2.2.0/24
ip prefix-list ISP03 seq 5 permit 3.3.3.0/24
ip prefix-list PERMIT-DEFAULT seq 10 permit 0.0.0.0/0
!
route-map ISP02-LP-IN permit 5
 description PERMIT ISP02 IP BLOCK & SET LOCALPREF
 match ip address prefix-list ISP02
 set local-preference 200
!
route-map ISP02-LP-IN permit 10
 description PERMIT ISP03 IP BLOCK & SET LOCALPREF
 match ip address prefix-list ISP03
 set local-preference 150
!
route-map ISP02-LP-IN permit 15
 description PERMIT DEFAULT ROUTE ON ISP02
 match ip address prefix-list DEFAULT
!
route-map ISP03-LP-IN permit 5
 description PERMIT DEFAULT ROUTE ON ISP03
 match ip address prefix-list DEFAULT
!
router bgp XXXXXX
 address-family ipv4
  neighbor B.B.B.B route-map ISP02-LP-IN in
  neighbor C.C.C.C route-map ISP03-LP-IN in

Would this accomplish the goal of steering the traffic toward the connection we would like it to egress on?

6 Replies 6

Richard Burts
Hall of Fame
Hall of Fame

I do not believe that this approach will accomplish what you want. The man issue is that setting local preference works on prefixes that the ISP advertises to you. But ISP01 does not advertise 1.1.1 to you. So local preference will not help you.

If you think about it the prefixes that the ISP advertises to you will be the destination addresses on traffic that you forward to the ISP. And you want to influence the traffic based on the source address (is it 1.1.1 or 2.2.2 or 3.3.3). To influence traffic based on source address you should use Policy Based Routing.

HTH

Rick

Hello Router01 peers with ISP01, and ISP01 provides us with a /24 IP block (eg. 1.1.1.0/24).

We would like to influence the 1.1.1.0/24 IP block to egress over the ISP01 connection

can you confirm if you mean this is your local subnet or it is what the isp is advertising to you?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Paul makes a good point. I certainly interpreted the original post to mean that 1.1.1.0 was an address block assigned to them by the ISP. But it certainly could be that this is a prefix advertised to them by the ISP. And in that case manipulating Local Preference would be a way to achieve their objective. So we need clarification from the original poster.

HTH

Rick

In this scenario, the 1.1.1.0/24 block is not a local subnet, it is the address block assigned to us by ISP01 (and 2.2.2.0/24 is assigned to use by ISP02, and 3.3.3.0/24 is the block assigned to use by ISP03...none are local subnets).

I guess I am perhaps I am confusing assigned and advertised routers. Each of our ISPs has assigned us a /24 (and a /29, which is what the BGP neighbors are using)...and we have worked with each ISP to allow traffic from those /24s on each ISP's network. From our Internet routers, we are then advertising each of those /24s to each ISP.

It is still not clear to me how you are using the words assigned and advertised. Are you using them interchangeably or are you using them to mean 2 different things?

If an ISP is advertising 1.1.1 to you then the place to look for a solution is in manipulating local preference in BGP. If an ISP has given you 1.1.1 to use then the place to look for a solution is in PBR. Which is it?

HTH

Rick

I see same issue couple weeks ago, 
the solution was using VRF 
we make specific LAN and ISP with same VRF that make sure that specific LAN using only one ISP 
and for failover we use VRF target import/export for that purpose. 

Review Cisco Networking for a $25 gift card