Showing posts with label BGP. Show all posts
Showing posts with label BGP. Show all posts

Sunday, 19 November 2017

RIB failure

အမေးများတဲ့ RIB failure အကြောင်းပြောကြတာပေါ့။ RIB failure ဆိုတာ နံရိုးကျိုးတဲ့ အကြောင်း ပြောတာ မဟုတ်ပါဘူး။ BGP မှာ မြင်တွေ့ရလေ့ရှိတဲ့ r ဆိုတဲ့ routing information base failure ဆိုတဲ့ အကြောင်းပါ။

အဓိက ကတော့ BGP table မှာ r အနေနဲ့ မြင်ရတဲ့ route တွေဟာ routing table ထဲကို မဝင်ရောက်နိုင်တာဖြစ်ပါတယ်။ ဘာကြောင့် မဝင်ရောက်နိုင်လဲဆိုရင်တော့ သူထက် AD သာတဲ့ IGP route တွေရှိနေလို့ပါပဲ။ ဒီနေရာမှာ ဖြစ်လေ့ရှိတာက iBGP routes တွေပါ။ သူရဲ့ AD က 200 ဆိုတော့ ဘယ် IGP နဲ့ ယှဉ်ယှဉ် အမြဲရှုံးနေမှာပါ။ IGP တွေဟာ AD အရမ်းမြင့်တဲ့ eBGP ကိုတော့ ကျော်နိုင်ဖို့ မလွယ်ပါဘူး။

Rib failure ဖြစ်ရတဲ့ အကြောင်းရင်းကို Cisco မှာ အကြောင်း ၃ ခု အနေနဲ့ ပြထားပါတယ်။ ဒါပေမဲ့ အပြင်မှာ အတွေ့များတာကတော့ iBGP vs IGP ကြောင့်ပါ။ ဒါကလည်း သဘာဝကျပါတယ်။ BGP အနေနဲ့ အောက်ခံ IGP ကို အားပြုရင်းသာ အလုပ်လုပ်ရတာဆိုတော့ IGP ထဲမှာ လိုအပ်တဲ့ route ရှိနေပီးသားဆိုရင် BGP route ကို သုံးစရာ မလိုတော့ဘူးဆိုတဲ့ သဘောပေါ့။

ဥပမာ ပြရရင် လက်ရွေးစင် ဘောလုံးအသင်း လူရွေးသလိုမျိုးပေါ့။ လက်ရွေးစင် အသင်းဟာ Routing table သာ ဖြစ်ခဲ့မယ်ဆိုရင် routing table တွေထဲကို ရောက်ဖို့အတွက် အကောင်းဆုံး route ဖြစ်ဖို့လိုပါတယ်။ ဒီလိုပဲ လက်ရွေးစင် ဖြစ်ဖို့အတွက် အကောင်းဆုံး ဖြစ်ဖို့လိုပါတယ်။ ဒီနေရာမှာ အနယ်နယ် အရပ်ရပ်က အကောင်းဆုံးလို့ ထင်ရတဲ့ ကစားသမားတွေကို လက်ရွေးစင် ရွေးမဲ့ အဖွဲ့ကို စေလွှတ်ကြပါတယ်။ Router ထဲမှာ OSPF EIGRP iBGP eBGP ဆိုတဲ့ route တွေ လာစု နေသလိုမျိုး။ အဲဒီကမှ နေရာတူ ကစားကြတဲ့ ကစားသမားတွေအကြား အကောင်းဆုံးကို ရွေးပီး ကျန်တဲ့ ကစားသမားတွေက ပြုတ်တဲ့သူပြုတ် အရံဖြစ်တဲ့သူဖြစ်ပေါ့။ Router မှာကျတော့ Same destination/network/prefix ကို သွားလို့ရတဲ့ route တွေအချင်းချင်း ယှဉ်ကြည့်ပီး အကောင်းဆုံးကို RIB ထဲထည့်လိုက်ပါတယ်။ ကျန်တဲ့ route တွေထဲကမှ ဒုတိယ တတိယ စသဖြင့် အကောင်းဆုံး route တွေကို အရံအဖြစ် သက်ဆိုင်ရာ Table/database အတွင်းမှာ အရံသင့် ချန်ထားပါတယ်။

BGP ရဲ့ r route ကတော့ အရံအဖြစ်သာ ရွေးခံရတဲ့ BGP route တစ်ခုပါပဲ။ Reserve ဆိုပါတော့။ ပထမ နေရာယူထားတဲ့ IGP route တွေသာ အကြောင်းတခုခုကြောင့် ပျောက်သွားခဲ့မယ်ဆိုရင် Reserve route က သူ့နေရာ ဝင်လာမှာ ဖြစ်ပါတယ်။ Routing table ထဲမှာ မရှိပေမဲ့ BGP route တွေ ဖလှယ်တဲ့အခါမှာ rib failure route တွေကိုလည်း ထည့်ပီး ဖလှယ်ကြပါတယ်။ အဲဒါကို မကြိုက်ရင်တော့ Suppress-inactive command အသုံးပြုပီး တားလို့ရပါတယ်။ ဘာကြောင့် RIB Failure ဖြစ်ရလည်း ဆိုတာကိုတော့
show ip bgp rib-failure ဆိုပြီး ကြည့်ရင်ရပါတယ်။ AD ကြောင့်ဆိုရင် Higher admin distance ဆိုပြီး မြင်ရမှာပါ။

အရှင်းဆုံးပြောရရင်တော့ ဘာကြောင့် အရွေးမခံရလဲဆိုရင် သူထက်သာတဲ့သူ ရှိလို့ပါ။ Route တွေကို ဘာနဲ့ယှဉ်လဲ ဆိုရင် AD နဲ့ပါ။ ဒီတော့ AD နိမ့်တဲ့သူက ရှုံးပါတယ်။ ဒါလောက်ဆို Rib failure အကြောင်း သဘောပေါက်လောက်ပီလို့ ထင်ပါတယ်။

Cisco Ref:

What does r RIB-Failure mean in the show ip bgp command output?

R1> show ip bgp
BGP table version is 5, local router ID is 200.200.200.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
r> 6.6.6.0/24       10.10.13.3               0    130      0 30 i
*> 7.7.7.0/24       10.10.13.3               0    125      0 30 i

When BGP tries to install the bestpath prefix into Routing Information Base (RIB) (for example, the IP Routing table), RIB might reject the BGP route due to any of these reasons:

* Route with better administrative distance already present in IGP. For example, if a static route already exists in IP Routing table.
* Memory failure.
* The number of routes in VPN routing/forwarding (VRF) exceeds the route-limit configured under the VRF instance.
In such cases, the prefixes that are rejected for these reasons are identified by r RIB Failure in the show ip bgp command output and are advertised to the peers. This feature was first made available in Cisco IOS Software Release 12.2(08.05)T.

ကိုဖြိုး။

Sunday, 22 October 2017

BGP LAB

BGP နဲ့ပက်သက်ပြီး LAB တစ်ခုကို လုပ်ကြည့်ရအောင်။ ဒီ LAB ကို ပြီးခဲ့တဲ့ Workshop တုန်းက လုပ်ဖို့ အတွက် စီစဉ်ထားတာဖြစ်ပါတယ်။ BGP အကြောင်းအရာဖက်က ကြည့်မယ်ဆိုရင် အခြေခံ သဘောတရား လောက်သာပါမှာ ဖြစ်ပါတယ်။ ဒါပေမဲ့ BGP အတွက် လုပ်ရင်းနဲ့ တခြားသိထား လေ့လာထားတဲ့ အရာတွေဟာ ဘယ်လို အသုံးဝင်လာမလဲ ဆိုတာတွေကို ပြန်ပြီး ပေါင်းစပ်မိဖို့အတွက်ကိုလည်း ရည်ရွယ် ထားပါတယ်။ 



ဒီပုံမှာ အဖွဲ့အစည်း နှစ်ခုဟာ ISP ကို BGP နဲ့ ချိတ်ဆက်ထားပြီးတော့ သူတို့ရဲ့ Public IP Address တွေကို ISP ကနေ တဆင့် Advertise လုပ်ထားပါတယ်။ AS100 နဲ့ AS200 ဟာ Public IP အချင်းချင်းသာ ဆက်သွယ်လို့ ရမှာ ဖြစ်ပါတယ်။ ပေးထားတဲ့ နမူနာ အတိုင်း လိုက်လုပ်ကြည့်ရင်း တခြား စဉ်းစားစရာ တွေကို စဉ်းစားကြည့်ရင်း သိထားတာတွေကို ပြန်အသုံးချကြည့်တာပေါ့။

- EIGRP မှာ no auto-summary မပါရင် ဘယ်လိုအကျိုးသက်ရောက်မှုတွေ ဖြစ်လာနိုင်သလဲ။
- AS100/AS200 နဲ့ ကြားက Subnet ကို အတွင်းက Router တွေက သိဖို့လိုသလား။
- Static IP route ကို Null 0 သုံးထားခြင်းဟာ Routing ကိုထိခိုက်စေနိုင်လား။ ဘာကြောင့် သုံးထားသလဲ။
- အတွင်းက Router တွေကနေ Source IP မပါပဲနဲ့ ဘာကြောင့် အပြင်ထွက်လို့ မရသလဲ။ အပြင်ထွက်လို့ရဖို့အတွက် ဘာကို အသုံးပြုရမလဲ။

BGP နဲ့ ပက်သက်ပြီး တော့ စဉ်းစားစရာတွေကတော့
- ISP နဲ့ Peer လုပ်တဲ့အခါမှာ တိုက်ရိုက်ချိတ်ထားတဲ့ Interface IP အစား Loopback IP သုံးမယ်ဆိုရင် ဘယ်လိုလုပ်ရမလဲ။
- Network statement နဲ့ Advertise လုပ်လိုက်တာနဲ့ Network advertisement အတွက် လုံလောက်ပြီလား။
- BGP default weight နဲ့ Local preference Value က ဘာလဲ။ ဘယ်လို သိနိုင်မလဲ။
- AS200 မှာ Route-reflector သုံးထားတဲ့ အကျိုးကျေးဇူးက ဘာဖြစ်နိင်မလဲ။
- iBGP တွေမှာ next-hop-self ဘာကြောင့် သုံးရတာလဲ။
- Neighbour ကနေ Prefix ဘယ်နှစ်ခု လက်ခံရသလဲဆိုတာကို ဘယ်လိုသိနိုင်မလဲ။
- BGP best route ဖြစ်ကြောင်းကို ဘာကိုကြည့်ရင် သိနိုင်သလဲ။
- Prefix တစ်ခုဟာ ဘယ် AS ကနေ အစပြုလာသလဲဆိုတာ ဘယ်လိုသိနိုင်မလဲ။

ဒီမေးခွန်းတွေကို ဖြေနိုင်ပြီဆိုရင် Routing နဲ့ BGP အခြေခံကို နားလည်သဘောပေါက်ထားပြီလို့ ယူဆလို့ ရပါပြီ။

ကိုဖြိုး။



Configuring Interfaces IP address for IGP and BGP
ISP
interface FastEthernet0/0
 ip address 121.121.121.1 255.255.255.252
 
interface FastEthernet0/1
 ip address 122.122.122.1 255.255.255.252

A1
interface Loopback1
 ip address 100.100.100.1 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.100.1 255.255.255.0
 
interface FastEthernet0/1
 ip address 121.121.121.2 255.255.255.252
 
A2
interface Loopback1
 ip address 100.100.100.2 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.100.2 255.255.255.0
 
B1
interface Loopback1
 ip address 200.200.200.1 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.200.1 255.255.255.0
 
interface FastEthernet0/1
 ip address 122.122.122.2 255.255.255.252

B2
interface Loopback1
 ip address 200.200.200.2 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.200.2 255.255.255.0
 
B3
interface Loopback1
 ip address 200.200.200.3 255.255.255.255
 
interface FastEthernet0/0
 ip address 192.168.200.3 255.255.255.0

Configuring IGP in AS 100 and AS 200 and verify peers/routes
AS100 (EIGRP)
A1(config)#router eigrp 100
A1(config-router)#network 100.100.100.1 0.0.0.0
A1(config-router)#network 192.168.100.1 0.0.0.0
A1(config-router)#no auto-summary
 
A2(config)#router eigrp 100
A2(config-router)#network 100.100.100.2 0.0.0.0
A2(config-router)#network 192.168.100.2 0.0.0.0
A2(config-router)#no auto-summary
 
A1#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   192.168.100.2           Fa0/0             13 00:01:38   20   200  0  9
 
A1#sh ip route eigrp
     100.0.0.0/32 is subnetted, 2 subnets
D       100.100.100.2 [90/409600] via 192.168.100.2, 00:00:15, FastEthernet0/0
 
A2#sh ip eigrp neighbors
IP-EIGRP neighbors for process 100
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                           
                                            (sec)         (ms)       Cnt Num
0   192.168.100.1           Fa0/0             14 00:02:00  432  2592  0  10
 
A2#sh ip route eigrp
     100.0.0.0/32 is subnetted, 2 subnets
D       100.100.100.1 [90/409600] via 192.168.100.1, 00:00:56, FastEthernet0/0

AS200 (OSPF)
 
B1(config)#router ospf 1
B1(config-router)#router-id 200.200.200.1
B1(config-router)#network 200.200.200.1 0.0.0.0 are 0
B1(config-router)#network 192.168.200.1 0.0.0.0 are 0

B2(config)#router ospf 1
B2(config-router)#router-id 200.200.200.2
B2(config-router)#network 200.200.200.2 0.0.0.0 are 0
B2(config-router)#network 192.168.200.2 0.0.0.0 are 0
 
B3(config)#router ospf 1
B3(config-router)#router-id 200.200.200.3
B3(config-router)#network 200.200.200.3 0.0.0.0 are 0
B3(config-router)#network 192.168.200.3 0.0.0.0 are 0
 
B1#sh ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
200.200.200.2     1   FULL/BDR        00:00:34    192.168.200.2   FastEthernet0/0
200.200.200.3     1   FULL/DROTHER    00:00:37    192.168.200.3   FastEthernet0/0
 
B1#sh ip route ospf
     200.200.200.0/32 is subnetted, 3 subnets
O       200.200.200.2 [110/11] via 192.168.200.2, 00:01:46, FastEthernet0/0
O       200.200.200.3 [110/11] via 192.168.200.3, 00:01:06, FastEthernet0/0
 
B2#sh ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
200.200.200.1     1   FULL/DR         00:00:38    192.168.200.1   FastEthernet0/0
200.200.200.3     1   FULL/DROTHER    00:00:30    192.168.200.3   FastEthernet0/0
 
B2#sh ip route ospf
     200.200.200.0/32 is subnetted, 3 subnets
O       200.200.200.1 [110/11] via 192.168.200.1, 00:01:59, FastEthernet0/0
O       200.200.200.3 [110/11] via 192.168.200.3, 00:01:19, FastEthernet0/0
 
B3#sh ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
200.200.200.1     1   FULL/DR         00:00:35    192.168.200.1   FastEthernet0/0
200.200.200.2     1   FULL/BDR        00:00:34    192.168.200.2   FastEthernet0/0
 
B3#sh ip route ospf
     200.200.200.0/32 is subnetted, 3 subnets
O       200.200.200.1 [110/11] via 192.168.200.1, 00:01:51, FastEthernet0/0
O       200.200.200.2 [110/11] via 192.168.200.2, 00:01:51, FastEthernet0/0
Configuring EBGP between ISP and AS 100, AS 200 
 
ISP(config)#int l1
ISP(config-if)#ip add 120.120.120.120 255.255.255.255
 
ISP(config)#router bgp 120
ISP(config-router)#bgp router-id 120.120.120.120
ISP(config-router)#neighbor 121.121.121.2 remote-as 100
ISP(config-router)#neighbor 122.122.122.2 remote-as 200
ISP(config-router)#network 120.120.120.120 mask 255.255.255.255
 
A1(config)#router bgp 100
A1(config-router)#bgp router-id 100.100.100.1
A1(config-router)#neighbor 121.121.121.1 remote-as 120
 
B1(config)#router bgp 200
B1(config-router)#bgp router-id 200.200.200.1
B1(config-router)#neighbor 122.122.122.1 remote-as 120
 
ISP#sh ip bgp summary | B Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.2   4   100      14      16        2    0    0 00:02:46        0
122.122.122.2   4   200       5       6        2    0    0 00:01:05        0
 
A1#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.1   4   120      17      15        2    0    0 00:03:10        1
 
B1#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
122.122.122.1   4   120       6       5        2    0    0 00:01:49        1
Configuring iBGP in AS 100 and AS 200 
 
A1(config)#router bgp 100
A1(config-router)#neighbor 192.168.100.2 remote-as 100
A1(config-router)#neighbor 192.168.100.2 next-hop-self
 
A2(config)#router bgp 100
A2(config-router)#bgp router-id 100.100.100.2
A2(config-router)#neighbor 192.168.100.1 remote-as 100
A2(config-router)#neighbor 192.168.100.1 next-hop-self
 
A1#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.1   4   120      69      67        2    0    0 00:55:21        1
192.168.100.2   4   100       4       5        2    0    0 00:00:45        0
 
A2#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.100.1   4   100       5       4        2    0    0 00:00:50        1
 
B1(config)#router bgp 200
B1(config-router)#neighbor 192.168.200.2 remote-as 200
B1(config-router)#neighbor 192.168.200.2 next-hop-self
B1(config-router)#neighbor 192.168.200.2 route-reflector-client
B1(config-router)#
B1(config-router)#neighbor 192.168.200.3 remote-as 200
B1(config-router)#neighbor 192.168.200.3 next-hop-self
B1(config-router)#neighbor 192.168.200.3 route-reflector-client
 
B2(config)#router bgp 200
B2(config-router)#bgp router-id 200.200.200.2
B2(config-router)#neighbor 192.168.200.1 remote-as 200
B2(config-router)#neighbor 192.168.200.1 next-hop-self
 
B3(config)#router bgp 200
B3(config-router)#bgp router-id 200.200.200.3
B3(config-router)#neighbor 192.168.200.1 remote-as 200
B3(config-router)#neighbor 192.168.200.1 next-hop-self
 
B1#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
122.122.122.1   4   120      62      61        2    0    0 00:57:34        1
192.168.200.2   4   200       5       6        2    0    0 00:01:29        0
192.168.200.3   4   200       4       5        2    0    0 00:00:33        0
 
B3#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.200.1   4   200       5       4        2    0    0 00:00:51        1
 
B2#sh ip bgp summary | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.200.1   4   200       7       6        2    0    0 00:02:04        1

Advertise Public IP range to ISP and verify routing test between AS100 and 200
 
A1(config)#router bgp 100
A1(config-router)#network 100.100.100.0 mask 255.255.255.0
A1(config-router)#exit
A1(config)#
A1(config)#ip route 100.100.100.0 255.255.255.0 null 0
 
B1(config)#router bgp 200
B1(config-router)#network 200.200.200.0 mask 255.255.255.0
B1(config-router)#exit
B1(config)#
B1(config)#ip route 200.200.200.0 255.255.255.0 null 0
 
ISP#sh ip bgp su | b Nei
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
121.121.121.2   4   100      75      78        4    0    0 01:02:50        1
122.122.122.2   4   200      66      68        4    0    0 01:01:10        1
 
ISP#sh ip bgp
BGP table version is 4, local
router ID is 120.120.120.120
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*> 100.100.100.0/24 121.121.121.2            0             0 100 i
*> 120.120.120.120/32
                    0.0.0.0                  0         32768 i
*> 200.200.200.0    122.122.122.2            0             0 200 i
 
A2#sh ip bgp
BGP table version is 4, local
router ID is 100.100.100.2
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP,? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*>i100.100.100.0/24 192.168.100.1            0    100      0 i
*>i120.120.120.120/32
                    192.168.100.1            0   100      0 120 i
*>i200.200.200.0    192.168.100.1            0   100      0 120 200 i
 
B3#sh ip bgp
BGP table version is 4, local
router ID is 200.200.200.3
Status codes: s suppressed, d
damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP,? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*>i100.100.100.0/24 192.168.200.1            0    100      0 120 100 i
*>i120.120.120.120/32
                    192.168.200.1            0   100      0 120 i
*>i200.200.200.0    192.168.200.1            0   100      0 i
 
A2#ping 200.200.200.3 source
100.100.100.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echosto 200.200.200.3, timeout is 2 seconds:
Packet sent with a sourceaddress of 100.100.100.2
!!!!!
Success rate is 100 percent
(5/5), round-trip min/avg/max = 40/49/56 ms
 
B3#ping 100.100.100.2 source 200.200.200.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.100.100.2, timeout is 2 seconds:
Packet sent with a source address of 200.200.200.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/56/68 ms


Saturday, 1 July 2017

BGP on XR




IOS XR အပေါ်မှာ BGP  ကိုစမ်းကြည့်ဖို့အတွက် iBGP နဲ့ EBGP ပါဝင်တဲ့ ရှင်းလင်းတဲ့ LAB တစ်ခု လုပ်ကြည့်တာပေါ့။ Router ၃ လုံးကို အသုံးပြုထားပြီး ISP အတွက် တစ်လုံး ISP ကိုတိုက်ရိုက်ချိတ်ဆက် ထားတဲ့ CE အနေနဲ့ တစ်လုံး၊ CE ကနေ အတွင်းကို iBGP နဲ့ ပြန်သွားတဲ့ Core အနေနဲ့တစ်လုံး သုံးထား ပါတယ်။ ISP Router ကနေ Public Routes တွေအဖြစ် 10.xx.xx.xx ကနေ 50.xx.xx.xx အထိ ကြေညာ ထားပါတယ်။ CE ဖက်ကလည်း အတွင်းမှာ အသုံးပြုတဲ့ Public Routes တွေ ဖြစ်တဲ့ 100.xx.xx.xx နဲ့ 192.1.1.x. ကို ပြန်လည် ကြေညာမှာ ဖြစ်ပါတယ်။ CE နဲ့ Core အကြားမှာတော့ iBGP အပြင် အောက်ခံ အဖြစ် ISIS ကို အသုံးပြုထားပါတယ်။ ဒါမှသာ iBGP အချင်းချင်း Loopback Interface တွေကနေ တစ်လုံးနဲ့ တစ်လုံး စကားပြောနိုင်မှာ ဖြစ်ပါတယ်။


Configuration ပိုင်းအနေနဲ့ကတော့ သိပ်မကွာပါဘူး။ Address-family တွေရဲ့  အောက်မှာပဲ ရေးပေး ရပါတယ်။ အခြေခံဖြစ်တဲ့ Configuration မှာ သိသိသာသာ ကွာခြားသွားတာကတော့ eBGP အသုံးပြုတဲ့ ပုံပါ။ ရိုးရိုး IOS မှာ BGP Neighbour ဖြစ်ပြီဆိုတာနဲ့ တစ်ဖက်နဲ့ တစ်ဖက် Configuration မှာ ရေးထားတဲ့ အတိုင်း၊ BGP advertisement တွေအတိုင်း Routes တွေ ဖလှယ်ကြပါတယ်။ အဲဒါကို အလွယ်တကူ ကြည့် ချင်ရင် summary နဲ့ ကြည့်လိုက်ယုံပါပဲ။ Prefix ဘယ်နှစ်ခုရတယ် ဆိုတာ ချက်ချင်းသိနိုင်ပါတယ်။ XR မှာတော့ ဒီအတိုင်းဆိုရင် 0 Prefix အနေနဲ့မြင်ရပါလိမ့်မယ်။ တစ်ဖက်နဲ့ တစ်ဖက် Routes တွေ အပြန်အလှန် ပို့ဖို့အတွက် RPL လို့ ခေါ်တဲ့ Route policy ထည့်ပေးမှသာ Routes တွေကိုမြင်ရမှာ ဖြစ်ပါတယ်။ iBGP အချင်းချင်းဆိုရင်တော့ မလိုပါဘူး။

IOS မှာ အဲဒီလိုမျိုး ထိန်းချုပ်ဖို့ အတွက် Route-map တွေနဲ့ အသုံးပြုရပါတယ်။ RPL က route-map ထက် ပိုမိုကောင်းမွန်ပြီး လိုချင်တဲ့ Route attributes တွေပေါ်မူတည်ပြီး ဘာလုပ်မလဲဆိုတာမျိုးကို If/else statement တွေနဲ့ တွဲပြီး ဘာဖြစ်ရင် ဘာလုပ်မယ်၊ ဘယ်လိုပြောင်းမယ် ဆိုပြီး ကိုယ်ကြိုက်တဲ့ ပုံစံအတိုင်း အသုံးပြုလို့ ရပါတယ်။ RPL ကိုတော့ အစုံသုံးတတ်အောင် သီးသန့်ထပ်ပြီး လေ့လာရပါလိမ့်မယ်။ အခု LAB မှာတော့ ISP က လာတဲ့ Routes တွေကနေ 10.xx.xx.xx ကို လက်မခံပဲ တခြား Routes များကိုသာ လက်ခံတဲ့ ပုံစံ အနေနဲ့ စမ်းထားပါတယ်။ BGP ရဲ့ အလုပ်လုပ်ပုံ၊ IOS မှာ အသုံးပြုခဲ့တဲ့ အခြေခံတွေကိုသာ သိထားမယ် ဆိုရင် XR ပေါ်မှာလည်း လိုအပ်တဲ့ Configuration တွေကို လိုက်လုပ်နိုင်မှာ ဖြစ်ပါတယ်။

အခုအခြေအနေက CE နဲ့ CORE အကြားမှာ ISIS သုံးထားပြီး CORE မှာ ရှိတဲ့ Public routes ဖြစ်တဲ့ 192.168.1.2 နဲ့ 192.168.1.3 ကို ISIS ကနေ ပို့ထားတာဖြစ်ပါတယ်။ 100.100.100.1 နဲ့ .2 ကိုတော့ BGP ကနေ တင်မှာဖြစ်ပါတယ်။

RP/0/0/CPU0:CExrv#sh ip route

L    192.1.1.1/32 is directly connected, 00:05:23, Loopback1
i L2 192.1.1.2/32 [115/10] via 192.168.1.2, 00:02:16, GigabitEthernet0/0/0/1
i L2 192.1.1.3/32 [115/10] via 192.168.1.2, 00:02:16, GigabitEthernet0/0/0/1

C    192.168.1.0/30 is directly connected, 00:05:23, GigabitEthernet0/0/0/1
L    192.168.1.1/32 is directly connected, 00:05:23, GigabitEthernet0/0/0/1
C    200.200.200.0/30 is directly connected, 00:07:53, GigabitEthernet0/0/0/0
L    200.200.200.2/32 is directly connected, 00:07:53, GigabitEthernet0/0/0/0


Core-VXR#sh ip route

      100.0.0.0/32 is subnetted, 2 subnets
C        100.100.100.1 is directly connected, Loopback3
C        100.100.100.2 is directly connected, Loopback4
      192.1.1.0/32 is subnetted, 3 subnets
i L2     192.1.1.1 [115/10] via 192.168.1.1, 00:19:42, FastEthernet0/0
C        192.1.1.2 is directly connected, Loopback1
C        192.1.1.3 is directly connected, Loopback2
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/30 is directly connected, FastEthernet0/0
L        192.168.1.2/32 is directly connected, FastEthernet0/0




iBGP တက်သွားရင်တော့ 100.x.x.x  routes တွေကို BGP Routes တွေအနေနဲ့ တွေ့ရမှာဖြစ်ပါတယ်။ အပြင် ISP ကို summary routes အနေနဲ့ ပို့ဖို့အတွက် Null0 ကို ထောက်ထားတဲ့ Static routes တွေကို တွေ့ပါလိမ့်မယ်။ XR မှာ Static route ကိုလည်း address-family ပုံစံမျိုးနဲ့ပဲ ရေးပါတယ်။

 router static
 address-family ipv4 unicast
  100.100.100.0/30 Null0
  192.1.1.0/24 Null0

RP/0/0/CPU0:CExrv#sh ip route

S    100.100.100.0/30 is directly connected, 00:00:07, Null0
B    100.100.100.1/32 [200/0] via 192.1.1.2, 00:04:13
B    100.100.100.2/32 [200/0] via 192.1.1.2, 00:04:13

S    192.1.1.0/24 is directly connected, 00:00:07, Null0
L    192.1.1.1/32 is directly connected, 00:45:03, Loopback1
i L2 192.1.1.2/32 [115/10] via 192.168.1.2, 00:41:55, GigabitEthernet0/0/0/1
i L2 192.1.1.3/32 [115/10] via 192.168.1.2, 00:41:55, GigabitEthernet0/0/0/1
C    192.168.1.0/30 is directly connected, 00:45:03, GigabitEthernet0/0/0/1
L    192.168.1.1/32 is directly connected, 00:45:03, GigabitEthernet0/0/0/1
C    200.200.200.0/30 is directly connected, 00:47:32, GigabitEthernet0/0/0/0
L    200.200.200.2/32 is directly connected, 00:47:32, GigabitEthernet0/0/0/0



BGP အားလုံးတက်သွားပြီဆိုရင်  iBGP က ရတဲ့ Prefix count 2 ကိုမြင်ရပေမယ့် eBGP မှာတော့ 0 ကိုပဲ တွေ့ နေရမှာပါ။ ဒါကတော့ RPL အသုံးမပြုရသေးလို့ ဖြစ်ပါတယ်။

 RP/0/0/CPU0:CExrv#sh bgp ipv4 unicast summary
BGP router identifier 192.1.1.1, local AS number 192
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0000000   RD version: 6
BGP main routing table version 6
BGP scan interval 60 secs

BGP is operating in STANDALONE mode.


Process       RcvTblVer   bRIB/RIB   LabelVer  ImportVer  SendTblVer  StandbyVer
Speaker               6          6          6          6           6           6


Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
192.1.1.2         0   192      15      13        6    0    0 00:09:43          2
200.200.200.1     0   200      29      27        6    0    0 00:00:05          0!


RPL အသုံးပြုပြီးသွားရင်တော့ eBGP ကနေ ရလာတဲ့ Prefix counts 5 ကိုမြင်ရပါလိမ့်မယ်။ AS 200 ကနေလာတဲ့ Routes ၅ ခုတွေ့ရပါတယ်။ လက်ရှိပုံစံမှာ ဘာလာလာ အကုန်လက်ခံတဲ့ ပုံစံမျိုးနဲ့ သုံးထားတဲ့ Pass All RPL ဖြစ်ပါတယ်။

 P/0/0/CPU0:CExrv#sh bgp ipv4 unicast summary

Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
192.1.1.2         0   192      16      15       11    0    0 00:10:59          2
200.200.200.1     0   200      31      29       11    0    0 00:01:21          5

RP/0/0/CPU0:CExrv#sh bgp ipv4 unicast

Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 10.10.10.0/24      200.200.200.1            0             0 200 ?
*> 20.20.20.0/24      200.200.200.1            0             0 200 ?
*> 30.30.30.0/24      200.200.200.1            0             0 200 ?
*> 40.40.40.0/24      200.200.200.1            0             0 200 ?

*> 100.100.100.0/30   0.0.0.0                  0         32768 i
*>i100.100.100.1/32   192.1.1.2                0    100      0 i
*>i100.100.100.2/32   192.1.1.2                0    100      0 i
*> 192.1.1.0/24       0.0.0.0                  0         32768 i
*> 200.200.200.0/30   200.200.200.1            0             0 200 ?


အဲဒီကမှ တဆင့် eBGP ကလာတဲ့ Routes တွေကနေ 10.x.x.x ကို လက်မခံတော့ပဲ ကျန်တာတွေကိုသာ လက်ခံမယ်ဆိုတဲ့ RPL နဲ့ အစားထိုးလိုပါမယ်။ ဒါဆိုရင်တော့ 10.x.x.x ပျောက်သွားတာကိုတွေ့ရပါလိမ့်မယ်။

 Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*> 20.20.20.0/24      200.200.200.1            0             0 200 ?
*> 30.30.30.0/24      200.200.200.1            0             0 200 ?
*> 40.40.40.0/24      200.200.200.1            0             0 200 ?

*> 100.100.100.0/30   0.0.0.0                  0         32768 i
*>i100.100.100.1/32   192.1.1.2                0    100      0 i
*>i100.100.100.2/32   192.1.1.2                0    100      0 i
*> 192.1.1.0/24       0.0.0.0                  0         32768 i
*> 200.200.200.0/30   200.200.200.1            0             0 200 ?




CE router မှာ အသုံးပြုထားတဲ့ RPL နဲ့ BGP Configuration ပုံစံပါ။ CE config ကိုကြည့်လိုက်တာနဲ့ ISP Router ကို အလွယ်တကူ ခန့်မှန်းလို့ ရနိုင်သလို CORE ကလည်း IOS အသုံးပြုထားတဲ့အတွက် မဖော်ပြတော့ပါဘူး။

CExrv

prefix-set 10Route
  10.10.10.0/24
end-set
!
route-policy PASS
  pass
end-policy
!
route-policy Block10
  if destination in 10Route then
    drop
  else
    pass
  endif
end-policy
!

router bgp 192
 address-family ipv4 unicast
  network 100.100.100.0/30
  network 192.1.1.0/24
 !
 neighbor 192.1.1.2
  remote-as 192
  update-source Loopback1
  address-family ipv4 unicast
   next-hop-self
   soft-reconfiguration inbound
  !
 !
 neighbor 200.200.200.1
  remote-as 200
  address-family ipv4 unicast
   route-policy Block10 in
   route-policy PASS out




ကိုဖြိုး

Saturday, 12 September 2015

Route dampening

ရန်ကုန်တိုက်ခန်းအထပ်မြင့်တွေမှာ နေဖူးသူတွေတိုင်း ရေတင်ရတဲ့ ဒုက္ခကိုကြုံဖူးပါလိမ့်မယ်၊ အထပ်မြင့်လေပိုပြီးခက်ခဲလေပဲ။ ဒီကြားထဲမီးကလဲ ပြတ်သေးတယ်။ များသောအားဖြင့် ညဖက်မီးမှန်တဲ့အချိန်ကြမှ တင်ကြတာများပါတယ်။ ကျွန်တော်တို့နေခဲ့တဲ့ဖက်ဆိုရင် ညသန်းခေါင်မှတင်ရပါတယ်၊ ရေမလာလို့မဟုတ်ပဲ မီးကလာလိုက်ပြတ်လိုက်ဖြစ်နေလို့ပါ။ ဘယ်သူမှ မီးလာတာနဲ့ချက်ချင်းတင်လေ့မရှိကြပါဘူး၊ အနည်းဆုံးတော့ ၁၅မိနစ်လောက်စောင့်ပြီးတော့မှ တင်ကြပါတယ်။ တခါတလေ စိတ်မရှည်လို့ မီးလာတာနဲ့ ချက်ချင်းတင်လိုက်ရင် ၅မိနစ်လဲနေရာ ပြန်ပြတ်သွားလို့အလုပ်ရှုပ်တာပဲ အဖတ်တင်ပါတယ်။ ဒါကြောင့် စိတ်ချရအောင်အများစုအိပ်ချိန်လောက်ကြမှ တင်လေ့ရှိပါတယ်။ အဲဒါနဲ့ Network နဲ့ဘာဆိုင်လဲလို့ဆိုရင် ဘာမှမဆိုင်ပါဘူး ဒါပေမယ့် BGP Dampening ရဲ့လုပ်ဆောင်ပုံကိုဖတ်ကြည့်တဲ့အခါမှာတော့ အဲဒီ လုပ်ဆောင်ပုံကို တီထွင်ခဲ့တဲ့သူဟာ ရန်ကုန်မှာ အထပ်မြင့်နဲ့များနေခဲ့ဖူးသလားဆိုပြီး မဆီမဆိုင် လျှောက်တွေးဖြစ်မိသွားပါတယ်။  :)

ဘာကြောင့်လဲလို့ဆိုတာ နဲနဲလောက်လေ့လာကြည့်ကြတာပေါ့။ BGP ဟာ Neighbor တွေနဲ့ချိတ်ဆက်ပြီးတဲ့အခါမှာ သူမှာရှိတဲ့ Routes တွေကို ကိုယ်ကယူ၊ တခြားဖက်ကိုပြန်ပေး၊ ကိုယ့်ဖက်က Routes တွေကို Neighbor တွေကိုကြေညာ၊ ကိုယ့်ရဲ့ BGP table နဲ့ Routing table ကိုလဲ Update လုပ်၊ စသဖြင့်လုပ်ရပါတယ်။ ဒါဟာ မီးစလာတာနဲ့ ရေတင်ဖို့ ကိစ္စတွေ လုပ်ဆောင်ရသလိုပါပဲ၊ ရေစက်သော့ယူ၊ အောက်ထပ်ဆင်း၊ လိုရမယ်ရ ရေချူဖို့အတွက် ရေပုံးကလဲပါသလိုပေါ့၊ ဒီလိုပဲ Router ခမျာမှာလဲ သူ့အလုပ်နဲ့သူ ရှုပ်တာပေါ့။ ဖြစ်ချင်တော့ တဖက်က Neighbor ရဲ့ အတွင်းဖက်က အကြောင်းကြောင်းတခုခုကြောင့် သူရဲ့ Route တွေကိုပေးလိုက်၊ ပျောက်သွားလိုက်၊ Attribute တွေကိုဟိုပြောင်းလိုက် ဒီပြောင်းလိုက် ဖြစ်နေတဲ့အခါ ကိုယ့်ဖက်ကလဲ သူ့ကြောင့်အလုပ်ရှုပ်ရတော့တာပေါ့။ Best Routes ပြန်တွက်တာ၊ Route-map တွေပြန်အလုပ်လုပ်ရတာ နဲ့ Router resource တွေပိုသုံးရပါတယ်။ တစ်ခါနှစ်ခါလောက်ဆိုရင်တော့ မပြောသာပါဘူး။ ဒါပေမယ့် ခဏတာအတွင်းမှာ အဲဒီလိုမျိုးအကြိမ်များစွာဖြစ်လာရင်တော့ သိပ်မဟုတ်ချင်တော့ဘူး၊ တခုခုလုပ်မှဖြစ်တော့မပေါ့။ ဘာလုပ်ရမလဲဆိုတော့ BGP Dampening ကို အသုံးပြုပြီး ကိုယ့်ကိုကိုယ်ကာကွယ်ရတော့မှာပဲ။

Dampening ကဘာလုပ်ပေးလဲဆိုရင် အဲဒီလိုဖြစ်တဲ့ Routes တွေကို မှတ်ထားလိုက်တယ်၊ မပြောသေးဘူး ကြည့်နေတယ်ပေါ့၊ ဒီ Routes တွေဘာများထပ်ဖြစ်အုံးမလဲဆိုပြီးတော့၊ တစ်ခါပဲဖြစ်ချင်ဖြစ်မှာပေါ့၊ ဒါပေမယ့် Penalty 1000 အနေနဲ့ မှတ်ထားလိုက်တယ်။ Route Advertisement တွေဘာတွေလဲ ဘာမှအပြောင်းအလဲမလုပ်သေးဘူး။ ဖြစ်ချင်တော့ အဲဒီ Route ကထပ်ပြီးတော့ ပြဿနာတက်နေသေးတယ်ဆိုရင်တော့ Penalty ထပ်ပေးရင်းနဲ့ Suppress Limit (Default 2000) ကျော်သွားရင်တော့ အဲဒီ Route တွေကို Damp Route အနေနဲ့သတ်မှတ်ပြီး အချိန်အတိုင်းအတာတခုအတွင်းမှာ ဘယ်ကိုမှ Announcement မလုပ်တော့ဘူး။ တဖက်ကလည်း စောင့်ကြည့်နေပြီးတော့ ပြန်သုံးလို့ရအောင် Half-Life အချိန်အတွင်းမှာ Penalty ကိုပြန်လျော့ပေးပါတယ်။ Default half-life က ၁၅မိနစ်ဖြစ်ပါတယ်။ ဥပမာ မီးလာလိုက်ပြတ်လိုက်ဖြစ်နေတဲ့အချိန်မှာ မီးပြန်လာတာနဲ့ချက်ချင်းရေမတင်ပဲ စောင့်သလိုမျိုးပေါ့။ အခြေအနေကောင်းလောက်ပြီ စိတ်ချရပြီဆိုရင် တော့လုပ်ငန်းပြန်စကြတာပေါ့။ အပြင်မှာ လူကပဲ သူရဲ့အတွေ့အကြုံ ရပ်ကွက်ကမီးပေးတဲ့ အနေအထားကို ကြည့်ပြီး ကိုယ်တိုင်ဆုံးဖြတ်ပေမယ့် BGP မှာတော့ Reuse Limit ကိုပြန်ရောက်သွားတဲ့အချိန်ကြမှသာ Forwarding တွေ၊ Announcement တွေပြန်လုပ်ပါတယ်။ Default reuse limit ကတော့ 750 ပါ။ Cisco Presentation အဟောင်းတခုမှာ ပြထားတဲ့ အောက်ကပုံမှာကြည့်လိုက်ရင် ပိုပြီးမြင်သာပါလိမ့်မယ်။




အခုလို BGP Dampening သုံးလိုက်တဲ့အတွက် တဖက်ကပြဿနာဟာ ကိုယ့် Router ရဲ့ Route propagation/ Calculation တွေ၊ Forwarding/ Announcement ကိစ္စတွေမှာလာပြီးမထိခိုက်တော့ဘူးပေါ့၊ Configuration အနေနဲ့ သိပ်ပြီးတော့ရှုပ်ထွေးစရာမရှိပါဘူး ဒါပေမယ့်သူရဲ့ Dampening Factors တွေကိုစိတ်ကြိုက်ပြောင်းချင်တယ်ဆိုရင်တော့ အတွက်အချက်လေးနဲနဲလုပ်ကြည့်ရမှာပါ။

Router(config)# bgp dampening
Router(config)# bgp dampening half-life reuse suppress max-suppress [route-map map-name]

ဒီ Configuration မှာ Max_Penalty ကိုပေးမထားပေမဲ့ ဖော်မြူလာအရ တွက်လို့ရပါတယ်။ ဒီအတိုင်းတွက်လိုက်ရင် Default Value 12000 ရပါလိမ့်မယ်။
max_penalty = reuse_limit * 2 ^ (maximum_suppress_time / half_life_time)

R1#show ip bgp dampening parameters
 dampening 15 750 2000 60 (DEFAULT)
  Half-life time      : 15 mins       Decay Time       : 2320 secs
  Max suppress penalty: 12000         Max suppress time: 60 mins


Router ၃လုံးလောက်အသုံးပြုပြီး စမ်းသပ်ကြည့်လို့ရပါတယ်။ အောက်ကပုံမှာ Flap စတင်ဖြစ်တဲ့အချိန်မှာ History state ပြောင်းသွားပုံနဲ့ Penalty ဘယ်လိုပေးသွားသလဲဆိုတာ တွေ့ရပါလိမ့်မယ်။ အဲဒီကမှ Flap အရေအတွက်များလာတဲ့အခါမှာ Damp အဖြစ်ပြောင်းသွားတဲ့ အဆင့်ဆင့်ကိုပြထားပါတယ်။ ဒါပေမယ့် တခါတလေမှာ Flap ဖြစ်နေပေမဲ့ မဖြစ်မနေသုံးရတော့မယ်ဆိုရင်တော့ အဲဒီ Route ကို Damp state ကနေဖယ်ထုတ်ပေးရပါတယ်။ ဒါကိုတော့ Clear command ကိုအသုံးပြုရပါတယ်။

Router# clear ip bgp flap-statistics

























ကိုယ်တိုင် LAB လုပ်ပြီး Dampening Parameters တွေကိုပြောင်းကြည့်၊ Show command တွေနဲ့သူ့ရဲ့အလုပ်လုပ်ပုံအဆင့်ဆင့်ကိုကြည့်ချင်းအားဖြင့် ပိုပြီးနားလည်နိုင်ပါလိမ့်မယ်။

ကိုဖြိုး

Sunday, 26 July 2015

လမ်းပေါ်ကပေးတဲ့ BGP အတွေး

BGP ရဲ့ Routes တွေကို ဘယ်လိုဖလှယ်လဲ Route-map တွေနဲ့ Attributes တွေကိုဘယ်လိုပြောင်းလို့ရလဲဆိုတာတွေ ရေးပြီးတဲ့အချိန်မှာ နောက်ထပ်သတိထားစရာတွေကို ထပ်ပြီးကြည့်ဖို့ လိုအပ်ပါသေးတယ်။ အဲဒီထဲကမှ Prefix limitation အကြောင်းကို ကြည့်ကြတာပေါ့။ ဒီအကြောင်းရေးဖို့ ဖြစ်လာတဲ့တွန်းအားကတော့ လမ်းပေါ်ကပါပဲ။ အရင်ရေးခဲ့တဲ့အကြောင်းအရာတွေမှာလဲ လမ်းပေါ်ကမြင်တွေ့နေကြကိစ္စတွေနဲ့ နှိုင်းယှဉ်ပြီးရေးခဲ့ဘူးပါတယ်။ ပိုပြီးတော့မြင်သာအောင်လို့ပါ။ ဒီတခါကတော့ ကားကြပ်တဲ့ကိစ္စနဲ့တွဲပြီး စဉ်းစားကြတာပေါ့။

မကြာသေးခင်ကရန်ကုန်ကိုပြန်ရောက်တုန်း သတိထားမိတာကတော့ ကားတွေပိုများလာပြီး လမ်းတွေပိုပြီးတော့ကြပ်လာတာတွေ့ရပါတယ်။အရေးပေါ်ဆေးရုံကားတို့ မီးသတ်ကားတို့အတွက် အရေးပေါ်လာရင် အမြန်သွားဖို့အတွက်တောင် အခက်အခဲဖြစ်နေပါတယ်။ သေချာပေးထားတဲ့လမ်းတွေကလဲမရှိ (No Priority/ No QoS) လမ်းနဲ့ကားအရေအတွက်ကလဲမမျှ (Infrastructure/ Capacity issue) တဲ့အတွက် မီးလောင်ရင်လဲအချိန်မှီသွားရောက်ငြိမ်းသတ်ဖို့မလွယ်၊ အသက်လုရမည့်လူနာလဲလမ်းပေါ်မှာတင် အသက်ဆုံးရမည့် အနေအထားတွေဖြစ်လာနိုင်ပါတယ်။ ပြောရရင်တော့ သေချာစီမံကိန်းရေးဆွဲထားခြင်းမရှိတဲ့ မှားယွင်းတဲ့ အစီအစဉ်ကြောင့် ဖြစ်လာနိုင်တဲ့ နောက်ဆက်တွဲအကျိုးတွေပါပဲ။ ဘယ်ကစလဲဆိုရရင် ကိုယ့်မှာရှိတဲ့ Infrastructure/ Facility ကိုမလေ့လာ မသုံးသပ်၊ စနစ်ကြတဲ့ Policy/ Direction မရှိပဲ ကားတွေကို အကန့်အသတ်မရှိသလောက်ပေးသွင်းခဲ့တာက စတယ်လို့ယူဆရပါတယ်။

Network မှာလဲဒီလိုပါပဲ။ ကိုယ်သုံးတဲ့ Hardware ရဲ့ စွမ်းဆောင်နိုင်မှု၊ ရွေးချယ်တဲ့ နည်းပညာ၊ပုံစံ၊ အစီအမံ အစရှိတဲ့ အသေးစိတ်တွေကိုအရင်လေ့လာပြီးမှ ကိုယ်နဲ့ကိုက်ညီမဲ့ Design/ Hardware/ Protocols စသဖြင့်ရွေးချယ်အသုံးပြုရပါတယ်။ ပစ္စည်းတခုဝယ်မယ်ဆိုရင်လည်း ထုတ်လုပ်သူဖက်ကပေးထားတဲ့ Data Sheet လို့ခေါ်တဲ့ အသေးစိတ်ကိုသေချာဖတ်ကြည့်ပြီး လိုချင်တဲ့ Specification/ performace ရနိုင်ပြီး အသုံးတည့်မယ့်ပစ္စည်းကိုဝယ်ယူရပါတယ်။ BGP သုံးတဲ့အခါမှာလဲ ထို့အတူပါပဲ။ ဘယ်နေရမှာ သုံးမှာလည်း၊ Peers/ Neighbors တွေဘယ်နှစ်ခုရှိလည်း၊ Routes/Prefix တွေဘယ်လောက်များလဲ၊ ကိုယ့်ရဲ့ Hardware ကရော BGP အသုံးပြုဖို့အတွက်လုံလောက်ရဲ့လားဆိုတာကို အရင်လေ့လာသင့်ပါတယ်။ ကိုယ့်မှာရှိတဲ့ RAM ထက် ကိုယ်လက်ခံတဲ့ Routes အရေအတွက်ကများသွားရင် BGP Restart ဖြစ်ပြီး Network Interruption ဖြစ်နိုင်ပါတယ်။ Network ပြတ်တောက်မှုအတွက် ထိခိုက်နိုင်တာတွေ၊ အရေးပါပုံတွေကို အရင်က ရေးခဲ့ပြီးတဲ့အတွက် ထပ်မရှင်းတော့ပါဘူး။

Internet routing တွေကိုလက်ခံရမည့် Router တွေမှာဆိုရင်ပိုပြီးဂရုစိုက်ရပါတယ်။ အခုဆိုရင် တကမ္ဘာလုံးရဲ့ Internet Routes တွေဟာ ၅သိန်း ကျော်လာခဲ့ပါပြီ။ ဒီတော့ အဲဒီ ပမာဏကိုလက်ခံနိုင်ဖို့ အတွက် Router တစ်လုံးမှာရှိရမဲ့ RAM လိုအပ်ချက်ကို သေချာကြည့်ရပါမယ်။ Cisco ကထုတ်ပြန်ထားတဲ့ Cisco Router တွေရဲ့လိုအပ်ချက်နဲ့ ကြိုတင်ပြင်ဆင်ထားနိုင်ဖို့ကို Cisco Forum မှာ ပြီးခဲ့တဲ့နှစ်က The Size of the Internet Global Routing Table and Its Potential Side Effects ခေါင်းစဉ်နဲ့ဆွေးနွေးထားပါတယ်။ ဒီလင့်မှာ သေချာဖတ်ကြည့်ပါ။

https://supportforums.cisco.com/document/12202206/size-internet-global-routing-table-and-its-potential-side-effects

လိုအပ်ရင် အဆင်မြှင့်၊ အသစ်ဝယ်ဆိုတာလဲ လက်တွေ့မှာသိပ်လွယ်တဲ့ကိစ္စမဟုတ်ပါဘူး၊ ငွေကြေးအရကော၊ အစားထိုးဖို့ပြင်ဆင်ရတာတွေအနေနဲ့ပါအခက်အခဲရှိပါတယ်။ အထူးသဖြင့်အချိန်ပေါ့။ ပြဿနာကတက်နေပြီဆိုရင် ပစ္စည်းဝယ်ပြီးလဲတဲ့အထိကို ဘယ်လိုမှစောင့်ဖို့ရာမဖြစ်နိုင်ပါဘူး။ ဒီတော့ တခြားနည်းနဲ့ ဖြေရှင်းရပါတယ်။ ဒီကိစ္စမှာတော့ Workaround အနေနဲ့ BGP maximum prefix ကိုဖြစ်ဖြစ် Prefix အငယ်တွေလက်မခံခြင်းဖြစ်ဖြစ်၊ ဒါမှမဟုတ် Default Route အသုံးပြုခြင်းနဲ့ ယာယီဖြေရှင်းရပါလိမ့်မယ်။

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/25160-bgp-maximum-prefix.html

Configuration ပိုင်းအရအထွေအထူးပြောနေစရာမလိုပါဘူး။

http://www.cisco.com/web/about/security/intelligence/protecting_bgp.html#8

ဒီအကြောင်းအရာဟာလည်းစိတ်ဝင်စားဖို့ကောင်းပါတယ်။ Secuity ဖက်ကနေပြီးတော့ရေးထားတာပါ။ အဲဒီမှာလဲ Maximum prefix အကြောင်းရေးထားပါတယ်။

ကျွန်တော်တို့ ရန်ကုန်မြို့မှာလည်း လမ်းတွေ၊တံတားတွေဆောက်ပြီး လမ်းပန်းဆက်သွယ်ရေးကိုကောင်းအောင်ပြုပြင်နေတုန်း ယာယီဖြေရှင်းနည်းတွေနဲ့ကျောင်းကား၊ဆေးရုံကားနဲ့ မီးသတ်ကားတို့လို အရေးကြီးတဲ့ယာဉ်တွေသွားသွားဖို့ Workarounds တွေကိုဖန်တီးပေးနိုင်မယ် စီစဉ်ပေးနိုင်မယ်ဆိုရင်တော့ မလိုလားအပ်တဲ့ဆုံးရှူံးမှုတွေကို လျော့နည်းစေမှာဖြစ်ပါတယ်။



ကိုဖြိုး

နူးနူးညံ့ညံ့ BGP

Routing protocol တွေထဲမှာ စိတ်ဝင်စားစရာကောင်းတဲ့ Protocol ကိုပြပါဆိုရင် BGP လို့ဆိုရမှာဖြစ်ပါတယ်။ သူ့မှာပါတဲ့ Attributes တွေ၊ Preference ရွေးချယ်ပုံတွေ၊ Route-map တို့ Regular expression တို့နဲ့တွဲဖက်အသုံးပြုတဲ့ပုံတွေဟာ တခြား Protocol တွေထက် အများကြီးလုပ်ဆောင်နိုင်ပါတယ်။ Neighbor တစ်ခုစီဖြစ်စေ အုပ်စုလိုက် Peer-group တို့ဖြစ်စေ စသဖြင့် ကြိုက်သလို Configure လုပ်နိုင်ပုံတွေဟာ တခြား Protocol တွေသုံးတာနဲ့မတူတဲ့အတွက် Admin ရဲ့ နားလည်ပုံ၊ အတွေ့အကြုံကိုလိုက်ပီး စိတ်ကြိုက်အသုံးပြုနိုင်ပုံတွေဟာ စိတ်ဝင်စားဖို့ကောင်းပါတယ်။ ဒါတင်မကပဲ အပြင် Internet ကအဖွဲ့အစည်းအတွေ နဲ့တိုက်ရိုက်ချိတ်ဆက်တဲ့နေရာမှာလည်း သူ့ကိုပဲသုံးရပါတယ်။ တကမ္ဘာလုံးရဲ့ Routes တွေကိုကြည့်နိုင်တာလည်း သူကြောင့်ပါပဲ။ သူ့ရဲ့ အရေးပါမှုကြောင့်လည်း အဲဒီ Router တွေကိုကိုင်တွယ်ရတဲ့သူတွေဟာ အတွေ့အကြုံရှိဖို့ အတွေ့အကြုံရှိတဲ့သူတွေနဲ့တွဲဖက်လုပ်ဖို့လိုပါတယ်။ တဖက်ကလည်း တခုခုမှားလုပ်လိုက်ရင် ဆုံးရှုံးနိုင်တဲ့ အတိုင်းအတာကလည်း များနိုင်ပါတယ်။ BGP ကိုသုံးတယ်ဆိုကတည်းက Provider တို့Data Centre တို့ MPLS တို့ကိုသုံးနိုင်တဲ့ MNC တွေသာများတဲ့အတွက် အမှားအယွင်း သိပ်မခံတဲ့ နေရာတွေပါ။ တချို့Provider တွေမှာဆို Router ကိုတိုက်ရိုက်ပေးမဝင်ပဲ Web Page ကနေလိုအပ်တဲ့ အရာတွေသီးသန့်သာ အသုံးပြုခွင့်ရှိတဲ့ စနစ်တွေရှိပါတယ်။

BGP ဟာတဖက် Neighbor ကပေးပို့လိုက်တဲ့ Routes တွေကို Routing table ထဲကိုမပို့ခင် Route-map တို့Filter list တို့ကို Process လုပ်ပါတယ်။ ဘာမှမပြောင်းရသေးတဲ့ Routes တွေက Adj-RIB-In ထဲမှာထားပီး Process လုပ်ပီးသား Routes တွေကိုတော့ Loc-RIB မှာထားပါတယ်။ Process လုပ်ပီးသွားရင် Adj-RIB-In ကိုအသုံးပြုဖို့မလိုတော့ပါဘူး။ တဖက်က နောက်ထပ်ရောက်လာမည့် Routes တွေကို Process လုပ်ဖို့အတွက် BGP session ကိုပြန်စရပါတယ်။ ပြန်စတဲ့အခါမှာ Hard reset နဲ့ Soft reset ဆိုပီးရှိပါတယ်။ Hard reset ဟာ BGP session ကိုပြတ်သွားစေတဲ့အတွက် Production Network တွေမှာ မလုပ်သင့်တဲ့ကိစ္စဖြစ်ပါတယ်။ ဒီတော့ Soft reset ကိုသုံးရပါတယ် ဒါပေမယ့် Soft reset သုံးနိုင်ဖို့အတွက် Neighbor တွေမှာ Soft reconfiguration inbound ဆိုပြီး ထည့်ထားရပါတယ်။ ဒါမှသာ Clear ip bgp neighbor soft ဆိုပြီးတော့ BGP session ကိုမပြတ်စေပဲ Update လုပ်လို့ရပါတယ်။ သူကဘာလုပ်ပေးတာလဲဆိုရင် Neighbor တခုစီရဲ့ Adj-RIB-In ကိုမဖျက်ပဲ Memory ထဲမှာ Process လုပ်ဖို့သိမ်းထားပေးတာပါ။ Neighbor များလေ၊ Routes များလေ Memory အသုံးပြုတာများလေပေါ့။ အဲဒါကို ကြည့်ချင်ရင် show ip bgp neighbor receive-routes ဆိုပီးကြည့်နိုင်ပါတယ်။

တကယ်လို့ Neighbor တွေရဲ့ Capabilities မှာ Route Refresh ဆိုတာပါလာရင်တော့ Soft reconfiguration inbound ကိုအသုံးပြုစရာမလိုတော့ပဲ Clear ip bgp neighbor soft တန်းလုပ်လို့ ရပါတယ်။ ဒါကိုတော့ Dynamic soft reset လို့ခေါ်ပါတယ်။ ဒီတော့ တစ်ခုခုပြောင်းပီး Process လုပ်ချင်ရင် Dynamic Soft reset လုပ်လိုက်ရင်ရပါတယ်။ BGP session ကိုမထိခိုက်တော့ပါဘူး။ ဘာကြောင့်ဒီကိစ္စ ဒီCommand လေးတစ်ကြောင်း ဟာအရေးပါရသလဲဆိုရင် Hard Reset ကြောင့် မလိုအပ်ပဲ ဖြစ်သွားနိုင်တဲ့ပြတ်တောက်မှုတွေ မဖြစ်စေချင်လို့ဖြစ်ပါတယ်။အဲဒီလောက်အချိန်လေးနဲ့ မထိခိုက်ပါဘူးလို့ငြင်းမယ်ဆိုရင်တော့ Online နဲ့အရောင်းအဝယ်လုပ်တဲ့နေရာ၊ ငွေးကြေးနဲ့သက်ဆိုင်တဲ့အဖွဲ့အစည်းတွေဖြစ်တဲ့ Stock exchange တို့ Bank တို့အသုံးပြုထားတဲ့ Data Centre မှာလုပ်နေတဲ့သူတွေကို မေးကြည့်ရင် သိလာပါလိမ့်မယ်။ Human Error ကြောင့်ဖြစ်တဲ့ ပြတ်တောက်မှုတွေဖြစ်လာရင် မိမိရဲ့အလုပ်နေရာကိုပါ ထိခိုက်လာနိုင်ပါတယ်။

ဒီတော့ BGP ကို ဖြစ်သလိုကိုင်တွယ်တာထက် သေချာလေ့လာပီးမှ သိမ်မွေ့စွာအသုံးပြုပါလို့ဆိုရင် မလွန်လောက်ပါဘူး။ အနုနည်းနဲ့ရှင်းလို့ရရဲ့သားနဲ့ မလိုအပ်ပဲအကြမ်းဖက်စရာ မလိုဘူးပေါ့။

SLA မရှိတဲ့နေရာမျိုး LAB လိုမျိုးမှာတော့ Hard လုပ်လုပ် Soft လုပ်လုပ် ပြဿနာမရှိပါဘူး။
အခုပြောခဲ့တာတွေကို Router ရဲ့ထုတ်ပေးထားတဲ့ အောက်က နမူနာတွေမှာ ကြည့်ရင်ပိုပီးမြင်သာပါလိမ့်မယ်။

Neighbor တွေမှာ Route Refresh capabilities ကြည့်ချင်ရင်။


R2#show ip bgp neighbors | i refresh
Route refresh: advertised and received(old & new)
Route refresh: advertised and received(old & new)


Neighbor ကနေရလာမယ့် မပြောင်းလဲရသေးတဲ့ Adj-RIB-in ကိုကြည့်တာ၊ soft reconfiguration မသုံးထားတော့ မမြင်ရပါ။

R2#sh ip bgp neighbors 192.168.1.1 received-routes
% Inbound soft reconfiguration not enabled on 192.168.1.1



အသုံးပြုထားရင် ကြည့်လို့ရပါလိမ့်မယ်။

R2(config-router)#neighbor 10.10.10.2 soft-reconfiguration inbound
R2#show ip bgp neighbors 10.10.10.2 received-routes
BGP table version is 6, local router ID is 192.168.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale

Origin codes: i – IGP, e – EGP, ? – incomplete
Network Next Hop Metric LocPrf Weight Path
* 1.1.1.1/32 10.10.10.2 0 0 200 i


ဝင်လာတဲ့ Route ကို Local preference 500 ပြောင်းမယ်ဆိုရင်

router bgp 100
neighbor 10.10.10.2 remote-as 200
neighbor 10.10.10.2 route-map LP in
route-map LP permit 10
set local-preference 500


Soft-reset လုပ်ပီးမှ Local preference ဟာ 500 ကိုပြောင်းသွားမှာဖြစ်ပါတယ်။

R2#clear ip bgp 10.10.10.2 soft
R2#sh ip bgp
BGP table version is 6, local router ID is 192.168.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplet
Network Next Hop Metric LocPrf Weight Path

*> 1.1.1.1/32 10.10.10.2 0 500 0 200 i



ကိုဖြိုး

Saturday, 25 July 2015

Looking Glass ကနေကြည့်ကြရအောင်


Looking glass တွေဟာ Internet routing ပြဿနာ တွေရှင်းတဲ့အခါအလွန်အသုံး ဝင်တဲ့ tools တွေဖြစ်ပါတယ်။ Routes queries တွေ၊ AS path တွေ ကြည့်ဖို့အတွက် ဘယ်သူဘဲဖြစ်ဖြစ် ဝင်သုံးလို့ရအောင် ISP တွေက တင်ထားပေးတာပါ၊ Webpage တွေအနေနဲ့ထားပေးပီး Ping/ Traceroute တို့အပြင် show command အနည်းငယ် လဲသုံးလို့ရပါတယ်၊ BGP အတွက်အဓိကသုံးဖို့ပေါ့။
တချို့ISP တွေက Webpage အပြင် Telnet access ပေးထားတဲ့ Route servers တွေကိုလည်း တင်ထားပေးပါတယ်။ အဲဒီတော့ Internet routes တွေကြည့်ဖို့၊လေ့လာဖို့အတွက် ISP မှာအလုပ်ရမှမဟုတ်ပါဘူး၊ အဲဒီ Route servers တွေကနေဝင်ကြည့်ပီး လေ့လာလို့ရပါတယ်။

နောက်တခုအနေနဲ့ BGP လေ့လာနေသူတွေအဖို့ Regular expression တွေကိုသိထားသင့်ပါတယ်၊ Show command မှာထည့်သုံးရင် ကိုယ်ရှာချင်တဲ့ Routes/Path ကို အချိန်တိုအတွင်းမှာ
ရှာလို့ရပါတယ်၊ Show commands တွေကို Regexp မသုံးလို့ရပေမယ့် BGP attributes တွေ ကစားဖို့အတွက် Route-map တွေ၊ as-path access-list တွေမှာတော့ သုံးမှရမှာပါ။ အဲဒီ regexp Character တွေ နဲ့Matching Function ကိုအကျွမ်းတဝင်ရှိဖို့အတွက် အတော်လေ့ကျင့်ရပါတယ်၊ မသုံးတာကြာရင်မေ့ကုန်ပြန်ရော၊
လေ့ကျင့်ရာမှာလည်း LAB တွေ၊ GNS3 တွေမှာ AS Path၊ Routes တွေကို အစုံအလင်ရဖို့အတွက် generate လုပ်ရတာ မလွယ်ပါဘူး၊ အချိန်ပေးရပါတယ်။ အဲဒီတော့ Route servers တွေထဲဝင်ပီး နည်းနည်းပါးပါးဝင်စမ်းလို့ရတာပေါ့။

ဒီ Site တွေမှာ နိုင်ငံတကာမှာ ရှိတဲ့ ISP ပေါင်းစုံက Looking glass တွေနဲ့ Route servers list ရှိပါတယ်၊ တချို့တလေကတော့ မရတော့ပါဘူး။ နောက်ပီး BGP နဲ့ပက်သက်တဲ့ လေ့လာစရာတွေ အစုံအလင်ရှိပါတယ်၊
အဲဒီ ဟာတွေလေ့လာရင် ၄၊ ၅၊ ၆လောက် အသာလေးကုန်နိုင်တဲ့အတွက် နောက်ထပ် ရေးပေးစရာ တောင်လိုတော့မယ်မထင်ပါဘူး။ :)

Useful sites;
ဥပမာ route server တခုကိုဝင်ကြည့်ရင်း AS တခု (5511) ကနေဖြတ်သွားတဲ့ Routes တွေကိုသိဖို့ regular expression သုံးပီးရှာကြည့်တာပေါ့။


ကိုဖြိုး