10-25-2013 06:02 AM - edited 03-04-2019 09:25 PM
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.
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
10-25-2013 06:39 AM
Are you just running BGP on R2 or are you running an IGP as well?
10-25-2013 07:27 AM
Only BGP routng protocol is being used as of now
10-25-2013 07:44 AM
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.
10-25-2013 08:04 AM
@John - I want to do the load balancing source base.
10-25-2013 07:47 AM
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
10-25-2013 08:06 AM
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.
10-25-2013 08:14 AM
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..
10-25-2013 08:23 AM
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
10-25-2013 11:06 AM
@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.
10-25-2013 12:32 PM
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
10-25-2013 10:24 PM
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.
10-27-2013 11:05 PM
@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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide