cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
805
Views
0
Helpful
12
Replies

Load Balancing between two Service provider

sutharhemant90
Level 1
Level 1

Dear All,

I am planning to implement the load balancing in bgp for my remote branch router.  According to the my below configuration my routes are being properly propagated to the R1 but i want to control the outgoing traffic from the R2 router where 192.168.151.X can go through the next hop 192.168.11.2 and 192.168.150.X can go through the 192.168.12.2 and if any link goes down than the traffic should be go through the backup link.

Please suggest which attribute need to be configured on the R2 router to do unequal load balancing.

Load.jpeg.jpeg

Below mentioned configuration is from my remote branch.

interface FastEthernet0/1

ip address 192.168.11.1 255.255.255.0

interface FastEthernet1/1

ip address 192.168.151.1 255.255.255.0 secondary

ip address 192.168.150.1 255.255.255.0

router bgp 4444

no synchronization

bgp log-neighbor-changes

bgp dmzlink-bw

network 192.168.150.0

network 192.168.151.0

neighbor 192.168.11.2 remote-as 3333

neighbor 192.168.11.2 route-map R101-103-MAP out

neighbor 192.168.12.2 remote-as 3333

neighbor 192.168.12.2 route-map R102-104-MAP out

maximum-paths 2

no auto-summary

!

ip classless

!

!

access-list 1 permit 192.168.150.0

access-list 2 permit 192.168.151.0

access-list 3 permit 192.168.151.0

access-list 4 permit 192.168.150.0

route-map R102-104-MAP permit 10

match ip address 3

set as-path prepend 4444 4444 4444

!

route-map R102-104-MAP permit 20

match ip address 4

!

route-map R101-103-MAP permit 10

match ip address 1

set as-path prepend 4444 4444 4444

!

route-map R101-103-MAP permit 20

match ip address 2

12 Replies 12

JohnTylerPearce
Level 7
Level 7

Are you just running BGP on R2 or are you running an IGP as well?

Only BGP routng protocol is being used as of now

Do you have a default route such as 'ip route 0.0.0.0 0.0.0.0 next-hop' going to R1?

If so, you could do the following.

ip route 0.0.0.0 0.0.0.0 next-hopA 1

ip route 0.0.0.0 0.0.0.0 next-hopB 1

That way it would load balance.

@John - I want to do the load balancing source base.

Harold Ritter
Cisco Employee
Cisco Employee

Hi Hemant,

From what I understand, you are trying to route traffic from R2 to R1 based on the source address of the transiting packets, right? If so BGP will not help. What you need to consider is Policy Based Routing (PBR). This same question was asked earlier this week. PLease refer to the following posting for more information.

https://supportforums.cisco.com/message/4074342

Regards

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hi Harold:- Thanks and I have read your post. Here I have configured two IP addresses in the single LAN interface. and i want to define the next hope for both different subnet to different next hope. Can you please show me the sample configuration for this. it would really help me to solve our my issue.

My requirement is as mentioned below:

Subnet 192.168.151.0/24 sould be go through the 192.168.11.2 and if the next hope is down than it should be flow through 192.168.12.2.

Subnet 192.168.150.0/24 sould be go through the 192.168.12.2 and if the next hope is down than it should be flow through 192.168.11.2.

Please suggest me the configuration accordingly. Thanks in advance..

Harold is talking about doing PBR

ip sla 150

icmp-echo X.X.X.X source-interface Source-Interface

ip sla schedule 1 life forever start-time now

ip sla 151

icmp-echo X.X.X.X source-interface Source-Interface

ip sla schedule 1 life forever start-time now

*** X.X.X.X would be the IP-Addr that you want to verify pings with

*** The Source-Interface, will be the source interface that is initiating the pings

ip access-list standard 150-PBRACL

permit 192.168.150.0 255.255.255.0

ip access-list standard 151-PBRACL

permit 192.168.151.0 255.255.255.0

route-map 150-PBR

match ip address 150-PBRACL

set ip next-hop 192.168.12.2

ip next-hop verify-availability track 150

route-map 150-PBR

match ip address 150-PBRACL

set ip next-hop 192.168.11.2

ip next-hop verify-availability track 151

ip route 0.0.0.0 0.0.0.0 track 150

ip route 0.0.0.0 0.0.0.0 track 151

I would lab this up first.

Please correct me if I'm wrong with anything Harold

@John:- I am planning to implement the load balancing with PBR only and our most of the branch routers IOS are not supporting IP SLA.

I gotcha, thanks for the update hemant.

Ok, so as long as the next-hops are directly connected, than the following should work, I would think

ip access-list standard 150-PBRACL

permit 192.168.150.0 255.255.255.0

ip access-list standard 151-PBRACL

permit 192.168.151.0 255.255.255.0

route-map 150-PBR

match ip address 150-PBRACL

set ip next-hop 192.168.12.2

ip next-hop verify-availability X.X.X.X

route-map 150-PBR

match ip address 150-PBRACL

set ip next-hop 192.168.11.2

ip next-hop verify-availability Y.Y.Y.Y

In this configuration, the route-map 150-PBR, should verify that 192.168.12.2 is available via CDP, and if it's not, than I would assume it would route as normal.

You will also need to map these route-maps to the appropriate interfaces

'ip policy route-map 150-PBR' etc

Thanks for your help on this.

I am having one question that i have configured two IP addresses under the interface. could you tell me where to apply the policy under the interface for both the IP series.

@John

in your configuration i can find two mistakes .

1. your standard access list with subnet mask instead of wildcard mask.

2. you have set the same IP address list for the both the route-map policy.

finally i have made the below configuration from my end and it is working.

interface FastEthernet0/0

ip address 192.168.12.1 255.255.255.0

interface FastEthernet0/1

ip address 192.168.11.1 255.255.255.0

interface FastEthernet1/1

ip address 192.168.151.1 255.255.255.0 secondary

ip address 192.168.150.1 255.255.255.0

no ip directed-broadcast

ip policy route-map 150-PBR

router bgp 4444

no synchronization

bgp log-neighbor-changes

network 192.168.150.0

network 192.168.151.0

neighbor 192.168.11.2 remote-as 3333

neighbor 192.168.11.2 route-map R101-103-MAP out

neighbor 192.168.12.2 remote-as 3333

neighbor 192.168.12.2 route-map R102-104-MAP out

maximum-paths 2

no auto-summary

access-list 1 permit 192.168.150.0

access-list 2 permit 192.168.151.0

access-list 3 permit 192.168.151.0

access-list 4 permit 192.168.150.0

route-map R102-104-MAP permit 10

match ip address 3

set as-path prepend 4444 4444 4444

!

route-map R102-104-MAP permit 20

match ip address 4

!

route-map R101-103-MAP permit 10

match ip address 1

set as-path prepend 4444 4444 4444

!

route-map R101-103-MAP permit 20

match ip address 2

!

route-map 150-PBR permit 10

match ip address HEMANT

set ip next-hop 192.168.11.2

set ip next-hop verify-availability

!

route-map 150-PBR permit 20

match ip address MILAN

set ip next-hop 192.168.12.2

set ip next-hop verify-availability

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco