Showing posts with label IOS-XR. Show all posts
Showing posts with label IOS-XR. Show all posts

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




ကိုဖြိုး

Tuesday, 25 April 2017

EIGRP on XR

EIGRP ရဲ့ သဘောတရားကတော့ အတူတူပါပဲ ဒါပေမယ့် XR ရဲ့ ကန့်သတ်ချက်လေး တွေရှိနေတာကိုတော့ သတိပြုရပါမယ်။ IOS XR ပေါ်မှာ EIGRP Configuration လုပ်တဲ့ ပုံစံကိုဆက်ကြည့်ရအောင်။ သိသိသာသာ ပြောင်းသွားတာကတော့ Address-family အောက်မှာ အသုံးပြုရတဲ့ပုံစံပါ။ Auto summary က Default အနေနဲ့ ပိတ်ထားတဲ့ အတွက် no auto summary မလိုပါဘူး။ Neighbors up/down status ကိုကြည့်ဖို့ ရာအတွက် ထည့်ရေးပေးရပါတယ်။ အဲဒါမပါရင် Neighbor up/down အခြေအနေကို Log မှာ မမြင်ရပါဘူး။

RP/0/0/CPU0:XR1#conf t
RP/0/0/CPU0:XR1(config)#router eigrp 1
RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#log-neighbor-changes


RP/0/0/CPU0:XR1(config-eigrp-af)#interface g0/0/0/0
RP/0/0/CPU0:XR1(config-eigrp-af-if)#exit
RP/0/0/CPU0:XR1(config-eigrp-af)#exi
RP/0/0/CPU0:XR1(config-eigrp)#exit
RP/0/0/CPU0:XR1(config)#commit

RP/0/0/CPU0:Apr 23 12:44:17.626 : eigrp[1002]: %ROUTING-EIGRP-5-NBRCHANGE : EIGRP-1: default-v4 1: Neighbor 192.168.1.2 (GigabitEthernet0/0/0/0) is up: new adjacency

Show IP Protocols နဲ့ ကြည့်ရင် သူရဲ့  Default setting/ timers တွေကို အလွယ်တကူ သိနိုင်ပါတယ်။

RP/0/0/CPU0:XR1#sh ip protocols
Routing Protocol: EIGRP, instance 1
 Default context AS: 1, Router ID: 192.168.1.1
  Address Family: IPv4
   Logging neighbor changes
   Default networks not flagged in outgoing updates
   Default networks not accepted from incoming updates
   Distance: internal 90, external 170
   Maximum paths: 4
   EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0, K6=0


   EIGRP metric rib scale 128
   EIGRP metric version 64-bit
   EIGRP maximum hopcount 100
   EIGRP maximum metric variance 1
   EIGRP NSF: enabled
    NSF-aware route hold timer is 480s
    NSF signal timer is 20s
    NSF converge timer is 300s
    Time since last restart is 00:00:11
   SIA Active timer is 180s
   Interfaces:
    GigabitEthernet0/0/0/0

RP/0/0/CPU0:XR1#sh eigrp nei
IPv4-EIGRP Neighbors for AS(1) VRF default

H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   192.168.1.2             Gi0/0/0/0         11 00:01:30   59   354  0  2

Commit လုပ်တဲ့အချိန်မှာ အမှားပါသွားရင် လက်မခံပါဘူး။ ဘာကြောင့် လက်မခံသလဲဆိုတာကို failed config ကနေပြန်ကြည့်နိုင်ပါတယ်။ ဒီနမူနာမှာဆိုရင် load sharing အတွက် Maximum paths ကို 32 အထိရတယ်ဆိုပြီး ဆိုပါတယ် ဒါပေမယ့် တကယ် ကိုယ်သုံးတဲ့ Platform က လက်မခံနိုင်ရင်တော့ မရပါဘူး။ 

RP/0/0/CPU0:XR1#conf t
RP/0/0/CPU0:XR1(config)#router eigrp 1
RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#maximum-paths 32
RP/0/0/CPU0:XR1(config-eigrp-af)#commit

% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed [inheritance]' from this session to view the errors

RP/0/0/CPU0:XR1(config-eigrp-af)#show configuration failed inheritance
!! SEMANTIC ERRORS: This configuration was rejected by
!! the system due to semantic errors. The individual
!! errors with each failed configuration command can be
!! found below.


router eigrp 1
 address-family ipv4
  maximum-paths 32
!!% 'eigrp' detected the 'warning' condition 'C12000 Platform can support only 16 maximum-paths'
 !
!
End


ပြန်ပြင်ပြီး သုံးလိုက်ရင် အဆင်ပြေသွားပါတယ်။

RP/0/0/CPU0:XR1(config-eigrp-af)#maximum-paths 16
RP/0/0/CPU0:XR1(config-eigrp-af)#commit
RP/0/0/CPU0:XR1(config-eigrp-af)#
RP/0/0/CPU0:XR1#sh ip protocol | i path
   Maximum paths: 16

Load sharing မှာ unequal load အတွက် Variance သုံးရတယ်ဆိုတာ သိကြမှာပါ။ အများဆုံး 128 အထိလက်ခံတယ်။

RP/0/0/CPU0:XR1(config)#router eigrp 1
RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#variance ?
  <1-128>  Metric variance multiplier
RP/0/0/CPU0:XR1(config-eigrp-af)#variance 128
RP/0/0/CPU0:XR1(config-eigrp-af)#commit
RP/0/0/CPU0:XR1(config-eigrp-af)#

RP/0/0/CPU0:XR1#sh ip protocol | i variance
   EIGRP maximum metric variance 128

မူလပုံစံအတိုင်း ပြန်ထားလိုက်မယ်။

RP/0/0/CPU0:XR1#conf t
RP/0/0/CPU0:XR1(config)#router eigrp 1
RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#no variance
RP/0/0/CPU0:XR1(config-eigrp-af)#no maximum-paths
RP/0/0/CPU0:XR1(config-eigrp-af)#commit
RP/0/0/CPU0:XR1(config-eigrp-af)#

RP/0/0/CPU0:XR1#sh ip protocol | i "path|variance"
   Maximum paths: 4
   EIGRP maximum metric variance 1

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

RP/0/0/CPU0:XR1#sh ip route eigrp

D    2.2.2.2/32 [90/10752] via 192.168.1.2, 00:07:25, GigabitEthernet0/0/0/0

RP/0/0/CPU0:XR1#show route eigrp

D    2.2.2.2/32 [90/10752] via 192.168.1.2, 00:07:10, GigabitEthernet0/0/0/0

Authentication အတွက် Key ကို activate လုပ်တာနဲ့ မရသေးဘူး။ Cryptographic-algorithm ကို md5 အသုံးပြုမှရတယ်။

RP/0/0/CPU0:XR1(config)#
RP/0/0/CPU0:XR1(config)#key chain E-KEY
RP/0/0/CPU0:XR1(config-E-KEY)#key 1
RP/0/0/CPU0:XR1(config-E-KEY-1)#key-string clear cisco

RP/0/0/CPU0:XR1#show key chain E-KEY
Key-chain: E-KEY/ -

Key 1 -- text "045802150C2E"
  cryptographic-algorithm -- Not configured
  Send lifetime: Not configured
  Accept lifetime: Not configured

RP/0/0/CPU0:XR1(config)#router eigrp 1
RP/0/0/CPU0:XR1(config-eigrp)#address-family ipv4
RP/0/0/CPU0:XR1(config-eigrp-af)#interface g0/0/0/0
RP/0/0/CPU0:XR1(config-eigrp-af-if)#authentication keychain E-KEY
RP/0/0/CPU0:XR1(config-eigrp-af-if)#commit

RP/0/0/CPU0:XR1#show eigrp interfaces g0/0/0/0 detail | i "Key|key"
  Authentication mode: MD5  Key chain: E-KEY
  No active key found in keychain database
  Packets dropped due to wrong keychain config: 0

Neighbour ပြုတ်သွားလိမ့်မယ်။ တစ်ဖက်က ဒီအတိုင်းလိုက်ပြောင်းရင်လည်း ရမှာ မဟုတ်။

RP/0/0/CPU0:Apr 23 13:20:51.565 : eigrp[1002]: %ROUTING-EIGRP-5-NBRCHANGE : EIGRP-1: default-v4 1: Neighbor 192.168.1.2 (GigabitEthernet0/0/0/0) is down: authentication mode changed

ဒီအခြေအနေအထိ မရသေးဘူး။ Key activate လုပ်ဖို့အတွက် Lifetime ထည့်ပြီး  md5 ပြောင်းမယ်။

RP/0/0/CPU0:XR2#conf t
RP/0/0/CPU0:XR2(config)#key chain E-KEY
RP/0/0/CPU0:XR2(config-E-KEY)# key 1
RP/0/0/CPU0:XR2(config-E-KEY-1)#send-lifetime 00:00:00 22 April 2017 infinite
RP/0/0/CPU0:XR2(config-E-KEY-1)#accept-lifetime 00:00:00 22 April 2017 infinite
RP/0/0/CPU0:XR1(config-E-KEY-1)#cryptographic-algorithm md5


RP/0/0/CPU0:XR1(config-E-KEY-1)#commit
RP/0/0/CPU0:XR1(config-E-KEY-1)#

ဒီပုံစံအတိုင်း နှစ်ဖက်စလုံးမှာ ထည့်လိုက်ရင်တော့ Key active ဖြစ်သွားပြီး Neighbor ပြန်တက်လာမှာဖြစ်ပါတယ်။

RP/0/0/CPU0:XR1#show eigrp interfaces g0/0/0/0 detail | i "Key|key"
  Authentication mode: MD5  Key chain: E-KEY
  Current active key id: 1

RP/0/0/CPU0:XR1#sh eigrp nei

IPv4-EIGRP Neighbors for AS(1) VRF default

H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   192.168.1.2             Gi0/0/0/0         11 00:00:22   35   210  0  6

အခုလောက်ဆို IOS XR ပေါ်မှာ Basic EIGRP Configuration ကို အလုပ်ဖြစ်အောင်လုပ်လို့ ရသွားပါပြီ။ Route policy တွေ ဘာတွေနဲ့ တွဲသုံးလိုက်ရင်တော့ ပိုပြီး အဆင်ပြေသွားပါလိမ့်မယ်။

ကိုဖြိုး

Monday, 17 April 2017

OSPF on XR

High-End Service Provider Router တွေမှာ အသုံးပြုတဲ့ IOS ဟာ မြင်နေကြ သုံးနေကြ Consumer/ Enterprise ဘက်မှာသုံးတဲ့ Classical IOS နဲ့ မတူဘဲ Modular IOS ဖြစ်တဲ့ IOS XR ကို အသုံးပြုထားပါတယ်။ SP Environment မှာသာ တွေ့ ရမှာ ဖြစ်ပြီး ထိတွေ့ ဖို့ အခွင့်အရေး နဲတဲ့ အတွက် သိပ်ပီး ရင်းနှီးလေ့ မရှိကြပါဘူး။ ဒါပေမယ့် အခုနောက်ပိုင်း Virtualization ရဲ့ နည်းပညာကြောင့် IOS XR တို့ NX-OS တို့ကို VM တွေအဖြစ်နဲ့ စမ်းသပ် အသုံးပြုလို့ ရလာပြီ ဖြစ်ပါတယ်။ OS မတူသလို အသုံးပြုရတာလည်း မတူပါဘူး။

နမူနာ အဖြစ်နဲ့ IOS XR ပေါ်မှာ OSPF Basic Configuration ကို ဘယ်လို လုပ်ရသလဲဆိုတာ ကို လေ့လာကြည့်ရအောင်။



xxxxxxxxxxxxxxxxx
Peering
xxxxxxxxxxxxxxxxx


RP/0/0/CPU0:XR1#conf t
RP/0/0/CPU0:XR1(config)#router ospf CORE
RP/0/0/CPU0:XR1(config-ospf)#area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#int GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#exit
RP/0/0/CPU0:XR1(config-ospf-ar)#exit
RP/0/0/CPU0:XR1(config-ospf)#exit
RP/0/0/CPU0:XR1(config)#show config
Building configuration...
!! IOS XR Configuration 5.2.0
router ospf CORE
 area 0
  interface GigabitEthernet0/0/0/0
  !
 !
!
end
RP/0/0/CPU0:XR1(config)#commit

RP/0/0/CPU0:XR2#conf t
RP/0/0/CPU0:XR2(config)#router ospf CORE
RP/0/0/CPU0:XR2(config-ospf)#area 0
RP/0/0/CPU0:XR2(config-ospf-ar)#interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR2(config-ospf-ar-if)#exit
RP/0/0/CPU0:XR2(config-ospf-ar)#exit
RP/0/0/CPU0:XR2(config-ospf)#exit
RP/0/0/CPU0:XR2(config)#commit
RP/0/0/CPU0:XR2(config)#exit


RP/0/0/CPU0:XR1#sh ip ospf nei
* Indicates MADJ interface

Neighbors for OSPF CORE

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.1.2     1     FULL/BDR        00:00:38    192.168.1.2     GigabitEthernet0/0/0/0
    Neighbor is up for 00:00:21

Total neighbor count: 1


RP/0/0/CPU0:XR1#sh ip ospf interface | in Type
  Process ID CORE, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
xxxxxxxxxxxxxxxxxxxx
Change Network Type
xxxxxxxxxxxxxxxxxxxx


RP/0/0/CPU0:XR1(config-ospf-ar-if)#show config
Building configuration...
!! IOS XR Configuration 5.2.0
interface GigabitEthernet0/0/0/0
!
router ospf CORE
 area 0
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
 !
!
end

RP/0/0/CPU0:XR1(config-ospf-ar-if)#commit

RP/0/0/CPU0:XR1#sh ip ospf interface | i Type
  Process ID CORE, Router ID 192.168.1.1, Network Type POINT_TO_POINT, Cost: 1

xxxxxxxxxxxx
Change Cost
xxxxxxxxxxxx


RP/0/0/CPU0:XR1#conf t
RP/0/0/CPU0:XR1(config)#router ospf CORE
RP/0/0/CPU0:XR1(config-ospf)# area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#  interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#cost 10
RP/0/0/CPU0:XR1(config-ospf-ar-if)#commit
RP/0/0/CPU0:XR1(config-ospf-ar-if)#
RP/0/0/CPU0:XR1#

RP/0/0/CPU0:XR1#sh ip ospf interface | i Type
  Process ID CORE, Router ID 192.168.1.1, Network Type POINT_TO_POINT, Cost: 10


xxxxxxxxxxxxxxxx
Authentication
xxxxxxxxxxxxxxxx


RP/0/0/CPU0:XR1#conf t
RP/0/0/CPU0:XR1(config)#router ospf CORE
RP/0/0/CPU0:XR1(config-ospf)# area 0
RP/0/0/CPU0:XR1(config-ospf-ar)#  interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)#authentication message-digest
RP/0/0/CPU0:XR1(config-ospf-ar-if)#message-digest-key 1 md5 cisco
RP/0/0/CPU0:XR1(config-ospf-ar-if)#exit
RP/0/0/CPU0:XR1(config-ospf-ar)#commit
RP/0/0/CPU0:XR1(config-ospf-ar)#

RP/0/0/CPU0:XR1#sh ip ospf interface
GigabitEthernet0/0/0/0 is up, line protocol is up
  Internet Address 192.168.1.1/24, Area 0
  Process ID CORE, Router ID 192.168.1.1, Network Type POINT_TO_POINT, Cost: 10
<Output Omitted>
  Message digest authentication enabled
    Youngest key id is 1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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

မြန်မာ့နှစ်သစ်မှာ အစစ အရာရာ အောင်မြင် ကျန်းမာစေကြောင်း ဆုမွန်ကောင်း တောင်းပေးလိုက်ပါတယ်။

ကိုဖြိုး။