Pages

Saturday, January 29, 2011

BGP unequal BW Load sharing

To enable bgp multipath, we use the command under router bgp : maximum-path x. However, the way router sends the traffic is 1:1 load sharing and it does not depend on the link bandwidth. If we need the router to do an unequal load sharing according to the bandwidth between the multipath, bgp dmzlink-bw command is required.

In this example, we have 2 links between R1 and R2. The MED of 192.168.x.x prefixes has equal MED. However, the bandwidth of each link is not equal. 1000kbps and 100kbps as shown in the figure.


Here is the routing table of R2.

R2# sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

B    192.168.4.0/24 [20/0] via 10.10.2.1, 01:27:13
                    [20/0] via 10.10.1.1, 01:27:13
B    192.168.5.0/24 [20/0] via 10.10.2.1, 01:27:13
                    [20/0] via 10.10.1.1, 01:27:13
     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.1.0 is directly connected, FastEthernet0/0
C       10.10.2.0 is directly connected, FastEthernet0/1
B    192.168.6.0/24 [20/0] via 10.10.2.1, 01:27:13
                    [20/0] via 10.10.1.1, 01:27:13
B    192.168.1.0/24 [20/0] via 10.10.2.1, 01:27:13
                    [20/0] via 10.10.1.1, 01:27:13
B    192.168.2.0/24 [20/0] via 10.10.2.1, 01:27:13
                    [20/0] via 10.10.1.1, 01:27:13
B    192.168.3.0/24 [20/0] via 10.10.2.1, 01:27:13
                    [20/0] via 10.10.1.1, 01:27:13
R2#

We can see from the routing table of R2 that R2 has 2 routes to reach 192.168.x.0/24. But the way R2 sends out packets is 1:1 load sharing although the bandwidth of each link is not equal. The requirement is to do a unequal cost load sharing between R1 and R2. Therefore, we need to enable dmzlink-bw feature on router R2.

Configuration


R2
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 bgp dmzlink-bw
 neighbor 10.10.1.1 remote-as 100
 neighbor 10.10.1.1 dmzlink-bw
 neighbor 10.10.2.1 remote-as 100
 neighbor 10.10.2.1 dmzlink-bw
 maximum-paths 3
 no auto-summary
 !
 address-family nsap
  maximum-paths 3
  no synchronization
 exit-address-family



R2#ping 192.168.6.0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.6.0, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/175/256 ms


Verify Configuration

R2#sh ip bgp 192.168.6.0
BGP routing table entry for 192.168.6.0/24, version 23
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Multipath: eBGP
  Advertised to update-groups:
        1
  100
    10.10.2.1 from 10.10.2.1 (192.168.6.1)
      Origin IGP, metric 0, localpref 100, valid, external, multipath
      DMZ-Link Bw 1 kbytes
  100
    10.10.1.1 from 10.10.1.1 (192.168.6.1)
      Origin IGP, metric 0, localpref 100, valid, external, multipath, best
      DMZ-Link Bw 1250 kbytes
R2#


R2#sh ip route 192.168.6.0
Routing entry for 192.168.6.0/24
  Known via "bgp 200", distance 20, metric 0
  Tag 100, type external
  Last update from 10.10.1.1 00:02:31 ago
  Routing Descriptor Blocks:
  * 10.10.2.1, from 10.10.2.1, 00:02:31 ago
      Route metric is 0, traffic share count is 10
      AS Hops 1
      Route tag 100
    10.10.1.1, from 10.10.1.1, 00:02:31 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 100

We can see in the result of show ip route 192.168.6.0 that traffic share of 2 links is not equal and the proportion of the traffic is according to the link bandwidth which is 1:10. So, the dmzlink-bw was successfully configured.!



No comments:

Post a Comment