Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Dual BGP neighbors with route-maps

Hi,

Here in our company we have a router that is connected to 2 eBGP peers, lets say that the first peer is 1.1.1.1 and the other is 2.2.2.2. Currently, we are receiving and using a default route to 1.1.1.1, this make the 2.2.2.2 not utilized. So what we did is create a route-map that sets the ip next-hop to 2.2.2.2

 

example:

access-list 1 standard pernit 200.200.200.200

route-map BROWSE permit 10

match ip address 1

set ip next-hop 2.2.2.2

 

I wonder what happens when the 2.2.2.2 ISP goes down, will it failover to ISP1? If not is there a way of doing this type of setup with failover without using IP SLA?

 

Thanks.

Everyone's tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
New Member

If ip address 2.2.2.2 known

If ip address 2.2.2.2 known to your router as connected network than you don’t have to configure SLA. If 2.2.2.2 goes down, connected route will be withdrawn from routing table and route-map will not sent packets to it.

But if 2.2.2.2 isn’t directly connected, than you have to configure sla operation to track it reachability and use verify-reachability keyword in route-map.

Cisco Employee

Hi, Setting next-hop to 2.2.2

Hi,

 

Setting next-hop to 2.2.2.2 for routes received from 1.1.1.1 is very bad design, this may cause blackholing of traffic or traffic loop. Say suppose, prefix which ISP1 is advertising , not available with ISP2 and we are sending traffic to ISP2 with next-hop change, eventually it may get dropped.

 

If you are receiving partial/full routes then you can pefer few prefixes to ISP1 and others to ISP2 with changing local preference.


If you are receving just default route then you can use "maximum-paths 2" to install both default routes into routing table and do load balance of traffic.
By default "maximum-paths 2" works only for prefixes coming from same AS. To enable same for prefixes coming from different AS, there is hidden command in BGP "bgp bestpath as-path multipath-relax"

 

Configuration example:
----------------------

Topology
                      _______R1 (AS-100)
                     /
(AS-300) R3
                     \_______R2 (AS-200)

 

R1, R2 advertsiing default route to R3.

R3#sh ip bgp su | i 1.1.1.1|2.2.2.2
1.1.1.1         4          100      38      39       20    0    0 00:30:54       10
2.2.2.2         4          200      39      39       20    0    0 00:30:53        2
R3#


R3#show ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 20
Paths: (2 available, best #2, table default)
Multipath: eBGP
  Advertised to update-groups:
     1         
  100
    1.1.1.1 (metric 11) from 1.1.1.1 (204.90.255.1)
      Origin IGP, localpref 100, valid, external, multipath
  200
    2.2.2.2 (metric 11) from 2.2.2.2 (100.100.100.100)
      Origin IGP, localpref 100, valid, external, multipath, best
R3#


R3#sh ip route | b Gateway
Gateway of last resort is 2.2.2.2 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 2.2.2.2, 00:00:36   <<<<<<<<<<<<<<<< preferring only 2.2.2.2
      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/11] via 172.31.13.1, 00:32:21, Ethernet1/0.100

After configuring "Maximum-paths 2" and "bgp bestpath as-path multipath-relax"


R3#conf t 
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router bgp 300
R3(config-router)#maximum-path 2
R3(config-router)#bgp bestpath as-path multipath-relax
R3(config-router)#

 

R3#sh ip route | b Gateway
Gateway of last resort is 2.2.2.2 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 2.2.2.2, 00:00:19
                [20/0] via 1.1.1.1, 00:00:19  <<<<<<<<<<<<< both BGP routes got installed into routing table
      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/11] via 172.31.13.1, 00:33:41, Ethernet1/0.100


-- Pls dont forget to rate helpful posts --

Regards,
Akash

5 REPLIES
Cisco Employee

Hi,There are different ways

Hi,

There are different ways of achieving the load balancing using bgp like multipath or BGP link bandwidth feature. Refer the below link that will help you configure load balancing as per you requirement.

 

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html

 

Hope it answers your query.

 

Thanks & Regards

Sandeep

New Member

Agreed with Akash.You can use

Agreed with Akash.

You can use the meximum-path 2 in order to achieve dual ISP with different AS,  its a hidden command in BGP bgp bestpath as-path multipath-relax.

#Maximum-path 2

#bgp bestpath as-path multipath-relax

New Member

If ip address 2.2.2.2 known

If ip address 2.2.2.2 known to your router as connected network than you don’t have to configure SLA. If 2.2.2.2 goes down, connected route will be withdrawn from routing table and route-map will not sent packets to it.

But if 2.2.2.2 isn’t directly connected, than you have to configure sla operation to track it reachability and use verify-reachability keyword in route-map.

Cisco Employee

Hi, Setting next-hop to 2.2.2

Hi,

 

Setting next-hop to 2.2.2.2 for routes received from 1.1.1.1 is very bad design, this may cause blackholing of traffic or traffic loop. Say suppose, prefix which ISP1 is advertising , not available with ISP2 and we are sending traffic to ISP2 with next-hop change, eventually it may get dropped.

 

If you are receiving partial/full routes then you can pefer few prefixes to ISP1 and others to ISP2 with changing local preference.


If you are receving just default route then you can use "maximum-paths 2" to install both default routes into routing table and do load balance of traffic.
By default "maximum-paths 2" works only for prefixes coming from same AS. To enable same for prefixes coming from different AS, there is hidden command in BGP "bgp bestpath as-path multipath-relax"

 

Configuration example:
----------------------

Topology
                      _______R1 (AS-100)
                     /
(AS-300) R3
                     \_______R2 (AS-200)

 

R1, R2 advertsiing default route to R3.

R3#sh ip bgp su | i 1.1.1.1|2.2.2.2
1.1.1.1         4          100      38      39       20    0    0 00:30:54       10
2.2.2.2         4          200      39      39       20    0    0 00:30:53        2
R3#


R3#show ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 20
Paths: (2 available, best #2, table default)
Multipath: eBGP
  Advertised to update-groups:
     1         
  100
    1.1.1.1 (metric 11) from 1.1.1.1 (204.90.255.1)
      Origin IGP, localpref 100, valid, external, multipath
  200
    2.2.2.2 (metric 11) from 2.2.2.2 (100.100.100.100)
      Origin IGP, localpref 100, valid, external, multipath, best
R3#


R3#sh ip route | b Gateway
Gateway of last resort is 2.2.2.2 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 2.2.2.2, 00:00:36   <<<<<<<<<<<<<<<< preferring only 2.2.2.2
      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/11] via 172.31.13.1, 00:32:21, Ethernet1/0.100

After configuring "Maximum-paths 2" and "bgp bestpath as-path multipath-relax"


R3#conf t 
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router bgp 300
R3(config-router)#maximum-path 2
R3(config-router)#bgp bestpath as-path multipath-relax
R3(config-router)#

 

R3#sh ip route | b Gateway
Gateway of last resort is 2.2.2.2 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 2.2.2.2, 00:00:19
                [20/0] via 1.1.1.1, 00:00:19  <<<<<<<<<<<<< both BGP routes got installed into routing table
      1.0.0.0/32 is subnetted, 1 subnets
O        1.1.1.1 [110/11] via 172.31.13.1, 00:33:41, Ethernet1/0.100


-- Pls dont forget to rate helpful posts --

Regards,
Akash

New Member

Thanks for the reply.

Thanks for the reply.

236
Views
5
Helpful
5
Replies
CreatePlease login to create content