Sunday, December 13, 2015

BGP advanced task #5. Path selection

Topology:


Routers R1, R2, R3 and R10 are in autonomous-system 123, and running OSPF area 0 as IGP.
R2 and R10 are route-reflectors.
R10 is running IOS-XR, other routers are IOS routers.
Routers R4, R5 and R6 represents autonomous systems 40, 50 and 60.
Each autonomous system allocated an /8 prefix and advertises that prefix into BGP.
eBGP peerings are configured between the following routers:

R6-R4
R6-R5
R4-R1
R5-R3

iBGP peerings are configured in autonomous-system 123:

R1-R2
R1-R10
R3-R2
R3-R10

Requirements:

Configure routers in autonomous system 123 in such way, so traffic from R2 and R10 towards network 60/8 is load balanced proportionally to the bandwidth of the links towards AS40 and AS50.
Bandwidth of the link between AS123 to AS50 should be twice the bandwidth between AS123 to AS40.

Solution:

Highlight the text below to reveal the solution.


Steps required to resolve this task:
1. Enable iBGP multipath
2. Enable unequal cost multipath (UCMP)
3. Allow multipath across different as-paths (similar to task #3)

R1:


!
interface Ethernet1/0
 bandwidth 100000
 ip address 40.0.14.1 255.255.255.0
 ip ospf 1 area 0
 no keepalive
!
router bgp 123
 bgp log-neighbor-changes
 bgp dmzlink-bw
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 send-community both
 neighbor 10.10.10.10 remote-as 123
 neighbor 10.10.10.10 update-source Loopback0
 neighbor 10.10.10.10 send-community both
 neighbor 40.0.14.4 remote-as 40
 neighbor 40.0.14.4 dmzlink-bw
!

R2:


!
router bgp 123
 bgp log-neighbor-changes
 bgp bestpath as-path multipath-relax
 bgp dmzlink-bw
 network 10.0.0.0
 neighbor 1.1.1.1 remote-as 123
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 route-reflector-client
 neighbor 3.3.3.3 remote-as 123
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 route-reflector-client
 maximum-paths ibgp 4
!



R3:


!
interface Ethernet1/0
 bandwidth 200000
 ip address 50.0.35.3 255.255.255.0
 ip ospf 1 area 0
!
router bgp 123
 bgp log-neighbor-changes
 bgp dmzlink-bw
 neighbor 2.2.2.2 remote-as 123
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 send-community both
 neighbor 10.10.10.10 remote-as 123
 neighbor 10.10.10.10 update-source Loopback0
 neighbor 10.10.10.10 send-community both
 neighbor 50.0.35.5 remote-as 50
 neighbor 50.0.35.5 dmzlink-bw
!

R10:


!
router bgp 123
 bgp bestpath as-path multipath-relax
 address-family ipv4 unicast
  maximum-paths ibgp 2
 !
 neighbor 1.1.1.1
  remote-as 123
  update-source Loopback0
  address-family ipv4 unicast
  !
 !
 neighbor 3.3.3.3
  remote-as 123
  update-source Loopback0
  address-family ipv4 unicast
  !
 !


Verification:

R2:


R2#show bgp 60.0.0.0
BGP routing table entry for 60.0.0.0/8, version 7
Paths: (2 available, best #1, table default)
Multipath: iBGP
  Advertised to update-groups:
     1
  Refresh Epoch 1
  40 60, (Received from a RR-client)
    40.0.14.4 (metric 11) from 1.1.1.1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath, best
      DMZ-Link Bw 12500 kbytes
  Refresh Epoch 2
  50 60, (Received from a RR-client)
    50.0.35.5 (metric 11) from 3.3.3.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath(oldest)
      DMZ-Link Bw 25000 kbytes


R2#sh ip route 60.0.0.0
Routing entry for 60.0.0.0/8
  Known via "bgp 123", distance 200, metric 0
  Tag 40, type internal
  Last update from 50.0.35.5 00:42:36 ago
  Routing Descriptor Blocks:
    50.0.35.5, from 3.3.3.3, 00:42:36 ago
      Route metric is 0, traffic share count is 2
      AS Hops 2
      Route tag 40
      MPLS label: none
  * 40.0.14.4, from 1.1.1.1, 00:42:36 ago
      Route metric is 0, traffic share count is 1
      AS Hops 2
      Route tag 40
      MPLS label: none

R10:

RP/0/0/CPU0:R10#show bgp 60.0.0.0/8
Tue Dec  8 16:07:02.805 UTC
BGP routing table entry for 60.0.0.0/8
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                 15          15
Last Modified: Dec  8 15:23:23.715 for 00:43:39
Paths: (2 available, best #1)
  Not advertised to any peer
  Path #1: Received by speaker 0
  Not advertised to any peer
  40 60
    40.0.14.4 (metric 2) from 1.1.1.1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best, group-best, multipath, import-candidate
      Received Path ID 0, Local Path ID 1, version 15
      Extended community: 0x0006:0:1178816512 LB:0:96
  Path #2: Received by speaker 0
  Not advertised to any peer
  50 60
    50.0.35.5 (metric 2) from 3.3.3.3 (3.3.3.3)
      Origin IGP, metric 0, localpref 100, valid, internal, multipath, import-candidate
      Received Path ID 0, Local Path ID 0, version 0
      Extended community: 0x0006:0:1187205120 LB:0:200

RP/0/0/CPU0:R10#show cef 60.0.0.0 detail
Tue Dec  8 16:07:31.103 UTC
60.0.0.0/8, version 54, internal 0x14000001 0x0 (ptr 0xa1060374) [1], 0x0 (0x0), 0x0 (0x0)
 Updated Dec  8 15:23:23.734
 local adjacency 10.0.101.1
 Prefix Len 8, traffic index 0, precedence n/a, priority 4
  gateway array (0xa0d47040) reference count 1, flags 0x8020, source rib (6), 0 backups
                [1 type 3 flags 0x90141 (0xa0f5f794) ext 0x0 (0x0)]
  LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
   via 40.0.14.4, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
    path-idx 0 NHID 0x0 [0xa1060074 0x0]
    next hop 40.0.14.4 via 40.0.14.0/24
   via 50.0.35.5, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
    path-idx 1 NHID 0x0 [0xa10600f4 0x0]
    next hop 50.0.35.5 via 50.0.35.0/24

    Weight distribution:
    slot 0, weight 96, normalized_weight 1, class 0
    slot 1, weight 200, normalized_weight 2, class 0

    Load distribution: 0 1 1 (refcount 1)

    Hash  OK  Interface                 Address
    0     Y   GigabitEthernet0/0/0/2    10.0.101.1
    1     Y   GigabitEthernet0/0/0/0    10.0.103.3
    2     Y   GigabitEthernet0/0/0/0    10.0.103.3

No comments:

Post a Comment