BGP Load Sharing with Dual Home to Single ISP



ပြထားတဲ့ topology ပုံထဲက အတိုင်း Router တွေကို Configure လုပ်ထားတယ်ဆိုရင်...
ကျတော်တို့ရဲ့ R1 က R4 ရဲ့ Loopback 0 (4.4.4.4) ကို ရောက်ဖို့ R2 သို့ မဟုတ် R3 ဖက်ကနေ သွားပါလိမ့်မယ်။
ဆိုလိုချင်တာက Upstream Link ၂ ခု ရှိတာကို တခုထဲပဲ သုံးနေတယ်ပေါ့။
ဒါဆိုရင် ကျတော်တို့ က ISP ကို ပိုက်ဆံပေးရတာ မတန်တော့ဘူးပေါ့။
ဒီတော့ ကျတော်တို့ Link ၂ ခုလုံးကို Load Sharing လုပ်ပြီး သုံးချင်တယ်ဗျာ။
ဒါပေမယ့် BGP ရဲ့ Default Path Selection က Best Path တခုကိုပဲ ရွေးတယ်လေ။
ဒါကို ကျတော်တို့က Best Path ၂ ခု ရွေးအောင် လုပ်ကြတာပေါ့။

မလုပ်ခင် R1 ရဲ့ Routing Table မှာ 4.4.4.4 ကို ဘယ်လိုသွားလဲ ကြည့်ပါမယ်။
ပြီးရင် Trace လုပ်ကြည့်ပါမယ်။

R1#sh ip route | Begin Gateway
Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [20/0] via 172.16.12.2, 00:22:18
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 172.16.13.3, 00:22:18
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [20/0] via 172.16.13.3, 00:22:18
      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C        172.16.12.0/24 is directly connected, Ethernet0/0
L        172.16.12.1/32 is directly connected, Ethernet0/0
C        172.16.13.0/24 is directly connected, Ethernet0/1
L        172.16.13.1/32 is directly connected, Ethernet0/1
R1#
R1#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "bgp 65001", distance 20, metric 0
  Tag 65023, type external
  Last update from 172.16.13.3 00:22:27 ago
  Routing Descriptor Blocks:
  * 172.16.13.3, from 172.16.13.3, 00:22:27 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 65023
      MPLS label: none
R1#

Output တွေအရဆိုရင် ကျတော်တို့ R4 ကို R3 ဖက်ကနေသွားနေပါတယ်။

အခု ကျတော်တို့ R2 ဖက်ကနေပါ load sharing လုပ်ချင်တဲ့ အတွက် R1 ရဲ့ BGP configuration အောက်မှာ "maximum-paths 2" ဆိုတဲ့ Command တခု ထည့်ပါမယ်။
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router bgp 65001
R1(config-router)#maximum-paths 2
R1(config-router)#

ပြီးတာနဲ့ Routing Table ကို ပြန်စစ်ပါမယ်။

R1#sh ip route | begin Gateway
Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [20/0] via 172.16.13.3, 00:01:07
                 [20/0] via 172.16.12.2, 00:01:07
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 172.16.13.3, 00:01:07
                 [20/0] via 172.16.12.2, 00:01:07
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [20/0] via 172.16.13.3, 00:01:07
                 [20/0] via 172.16.12.2, 00:01:07
      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C        172.16.12.0/24 is directly connected, Ethernet0/0
L        172.16.12.1/32 is directly connected, Ethernet0/0
C        172.16.13.0/24 is directly connected, Ethernet0/1
L        172.16.13.1/32 is directly connected, Ethernet0/1
R1#
R1#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "bgp 65001", distance 20, metric 0
  Tag 65023, type external
  Last update from 172.16.13.3 00:01:12 ago
  Routing Descriptor Blocks:
    172.16.13.3, from 172.16.13.3, 00:01:12 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 65023
      MPLS label: none
  * 172.16.12.2, from 172.16.12.2, 00:01:12 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 65023
      MPLS label: none
R1#

ဒီတခါမှာတော့ Routing Table ထဲမှာ Entry ၂ ခု စီရှိနေတာကို တွေ့ရပါပြီ။
4.4.4.4 ကို Trace လုပ်ကြည့်ရင် R2 ဖက်ကရော R3 ဖက်ကရော load sharing လုပ်ပြီးသွားတာကို တွေ့ရမှာပါ။

R1#trace 4.4.4.4 num
Type escape sequence to abort.
Tracing the route to 4.4.4.4
VRF info: (vrf in name/id, vrf out name/id)
  1 172.16.12.2 [AS 65023] 1 msec
    172.16.13.3 [AS 65023] 1 msec
    172.16.12.2 [AS 65023] 2 msec
  2 172.16.34.4 1 msec
    172.16.24.4 2 msec *
R1#

ဒါဆိုရင် Dual Home Single ISP အခြေအနေမျိုးမှာ BGP Load Sharing ကို အခြေခံအားဖြင့် ဘယ်လိုလုပ်လို့ရတယ်ဆိုတာကို နားလည်မယ်လို့ ထင်ပါတယ်။

ကျေးဇူးတင်ပါတယ်။
(Be knowledgeable, pass it on then)

No comments :

Post a Comment