Route Redistribution 101 (4)


အခုမှ ဖတ်မယ့်သူတွေ အနေနဲ့ အရင် ပို့စ် Route Redistribution 101 (1) , Route Redistribution 101
(2) နဲ့ Route Redistribution 101 (3) အကို အရင်ဖတ်ပါ။
အောက်က Topology သုံးပြီး IP Address, RIP , OSPF တွေ Configure လုပ်ပါမယ်။ အောက်မှာ Redistribution မလုပ်ရသေးတဲ့ Routing Configuration တွေကို နမူနာကြည့်နိုင်ပါတယ်။
R1#show run | section rip
router rip
 version 2
 offset-list 0 out 5 (ဒါက ဒီပို့စ်ရဲ့ အဓိက ပြဿနာကို ဖန်တီးချင်လို့ hop count 6 ရအောင် လုပ်ယူထားတာပါ။)
 network 1.0.0.0
 network 192.168.12.0
 no auto-summary

R2#show run | section rip
router rip
 version 2
 network 192.168.12.0
 network 192.168.23.0
 network 192.168.24.0
 no auto-summary

R3#show run | section rip
router rip
 version 2
 network 192.168.23.0
 no auto-summary

R4#show run | section rip
router rip
 version 2
 network 192.168.24.0
 no auto-summary

R3#show run | section ospf
router ospf 1
 log-adjacency-changes
 network 192.168.34.0 0.0.0.255 area 0

R4#show run | section ospf
router ospf 1
 log-adjacency-changes
 network 192.168.34.0 0.0.0.255 area 0

ပြီးတဲ့အခါ Router 2,3 နဲ့ 4 တလုံးချင်းစီရဲ့ RIP Routing Table တွေကို ကြည့်ပါမယ်။

R2#show ip route rip
     1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/6] via 192.168.12.1, 00:00:13, FastEthernet1/0

R3#show ip route rip
R    192.168.12.0/24 [120/1] via 192.168.23.2, 00:00:25, FastEthernet0/0
     1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/7] via 192.168.23.2, 00:00:25, FastEthernet0/0
R    192.168.24.0/24 [120/1] via 192.168.23.2, 00:00:25, FastEthernet0/0

R4#show ip route rip
R    192.168.12.0/24 [120/1] via 192.168.24.2, 00:00:04, FastEthernet0/0
     1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/7] via 192.168.24.2, 00:00:04, FastEthernet0/0
R    192.168.23.0/24 [120/1] via 192.168.24.2, 00:00:04, FastEthernet0/0
R2 က R1 ရဲ့ loopback network 1.1.1.0/24 ကို configure လုပ်ထားတဲ့ အတိုင်း hop count 6 နဲ့ learn လုပ်ထားတာကလွဲလို့ ကျန်တာတွေ အားလုံး ပုံမှန်ပါပဲ။

R3#show ip route ospf
R4#show ip route ospf

R3 နဲ့ R4 က directly connected link တွေမှာပဲ OSPF ကို run ထားလို့ OSPF Route တွေကို လောလောဆယ်မတွေ့ရသေးပါဘူး။
အခု RIP ကနေ OSPF ကို Route Redistribution စ လုပ်ပါမယ်။

R3(config)#router ospf 1
R3(config-router)#redistribute rip subnets
R4(config)#router ospf 1
R4(config-router)#redistribute rip subnets

R3#show ip route ospf
O E2 192.168.24.0/24 [110/20] via 192.168.34.4, 00:02:32, FastEthernet1/0
R1 ဟာ အရင်က 192.168.24.0 ကို R2 က တဆင့် Learn လုပ်ပါတယ်။
အခု Redistribution လုပ်ပြီးတဲ့အခါ R4 ကနေ တဆင့် learn လုပ်ပါတယ်။ OSPF AD က OSPF ထက်ပိုကောင်းလို့ပါ။
R4 ရဲ့ OSPF Route ကိုကြည့်ရအောင်။

R4#show ip route ospf
O E2 192.168.12.0/24 [110/20] via 192.168.34.3, 00:07:33, FastEthernet1/0
     1.0.0.0/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/20] via 192.168.34.3, 00:07:33, FastEthernet1/0
O E2 192.168.23.0/24 [110/20] via 192.168.34.3, 00:07:33, FastEthernet1/0

အရင် Redistribution မလုပ်ခင်က R4 ဟာ 192.168.12.0/24, 1.1.1.0/24 network တွေကို သွားဖို့ next hop က R2 ပါ။ အခု Redistribute လုပ်ပြီးတဲ့အခါ next hop က R3 ဖြစ်သွားပါတယ်။
ဒါကို sub-optimal routing လို့ခေါ်ပါတယ်။
ဒီပို့စ်မှာ ပြောချင်တာက redistribution metric problem ဖြစ်တဲ့အတွက် AD ကြောင့်ဖြစ်တဲ့ ဖြစ်တဲ့ ပြဿနာကို ခဏ ကျော်သွားပါမယ်။
လောလောဆယ် sub-optimal routing ကို ခဏမေ့ထားပြီး ဆက်သွားပါမယ်။
OSPF ကို RIP ထဲကို redistribute လုပ်ပါမယ်။
R3(config)#router rip
R3(config-router)#redistribute ospf 1 metric 1
R4(config)#router rip
R4(config-router)#redistribute ospf 1 metric 1
ပြီးတဲ့အခါ R2 ရဲ့ RIP Route ကို ပြန်ကြည့်ကြည့်ပါ။

R2#show ip route rip
     1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/1] via 192.168.24.4, 00:00:15, FastEthernet2/0
R    192.168.34.0/24 [120/1] via 192.168.24.4, 00:00:15, FastEthernet2/0
                     [120/1] via 192.168.23.3, 00:00:18, FastEthernet0/0
Redistribute မလုပ်ခင်က 1.1.1.0 ရဲ့ next hop က R1 ဖြစ်ပေမယ့် Redistribute လုပ်လိုက်တဲ့အခါ next hop က R4 ဖြစ်သွားတာကိုတွေ့ပါမယ်။ ဒီမှာ ပြဿနာစ ပါပြီ။
1.1.1.1  ရဲ့ route ကို R2 ကနေ trace ကြည့်လိုက်ပါ။

R2#traceroute 1.1.1.1
Type escape sequence to abort.
Tracing the route to 1.1.1.1

  1 192.168.24.4 680 msec 176 msec 364 msec
  2 192.168.34.3 20 msec 20 msec 24 msec
  3 192.168.23.2 20 msec 32 msec 28 msec
  4 192.168.24.4 52 msec 72 msec 24 msec
  5 192.168.34.3 28 msec 44 msec 40 msec
  6 192.168.23.2 44 msec 48 msec 40 msec
  7 192.168.24.4 60 msec 60 msec 80 msec
  8 192.168.34.3 88 msec 60 msec 72 msec
  9 192.168.23.2 80 msec 60 msec 60 msec
 10 192.168.24.4 80 msec 108 msec 44 msec

Routing Loop ဖြစ်နေပါပြီ။
Loop ဖြစ်ရခြင်းအကြောင်းကတော့ R2 က 1.1.1.0/24 network ရဲ့ routing update ကို interface ၂ ခုကနေ ရနေလို့ပါ။ R1 ကနေ hop count 6 နဲ့ ရတယ်။ R3 ကနေ hop count 1 နဲ့ ရတယ်။
R2 က lowest hop count ကို ရွေးပြီး next hop အဖြစ် R3 ကို ရွေးလိုက်တယ်။ ဒါပါပဲ။
RIP က OSPF , EIGRP တို့လို Internal, External Route တွေ ကို ခွဲမမြင်နိုင်တဲ့အတွက် lowest metric ကိုရွေးလိုက်တာပါပဲ။
ဒီပြဿနာကို မရှင်းခင်မှာ Redistribution ရဲ့ Rule ကို နည်းနည်းရှင်းပြအုံးမယ်။
R2 မှာ ဖြစ်နေတဲ့ Metric ပြဿနာက တကယ်တော့ 1.1.1.0/24 network ကို ကျတော်တို့ RIP ကနေ OSPF ကို Redistribute လုပ်တယ်၊ နောက်တခါ OSPF ကနေ RIP ကို Redistribute လုပ်တာကနေ ဖြစ်လာတာပါ။
ဒီတော့ မှတ်ထားလိုက်ပါ။
Route Redistribution လုပ်တဲ့အခါ Routing Protocol X ကနေ Y ကို Redistribute လုပ်ပြီး Y ကနေ X ကို ပြန် Redistribute မလုပ်ရပေါ့ဗျာ။ ဘိုလိုပြောရမယ်ဆိုရင် “Redistribution Rule: Never advertise prefixes from routing protocol X into Y and then back into X.”
ကဲ…. အပေါ်က looping ပြဿနာကို ရှင်းကြစို့ဗျာ။
ရှင်းနည်း အများကြီးရှိတယ်ဗျ။ ဒီမှာတော့ ကျတော် Access-list နဲ့ ပဲ ရှင်းပြတော့မယ်ဗျာ။ ပို့စ် တော်တော်ရှည်နေလို့။
R3 နဲ့ R4 မှာ access-list ကို အောက်ကလို configure လုပ်လိုက်မယ်။

R3#(config)#ip access-list standard NATIVE_OSPF_ROUTES
R3#(config-std-nacl)#permit 192.168.34.0 0.0.0.255
R3#(config)#route-map NATIVE_OSPF permit 10
R3#(config-route-map)#match ip address NATIVE_OSPF_ROUTES
R3#(config-route-map)#route-map NATIVE_OSPF deny 20
R3#(config)#router rip
R3#(config-router)#redistribute ospf 1 metric 1 route-map NATIVE_OSPF

R4#(config)#ip access-list standard NATIVE_OSPF_ROUTES
R4#(config-std-nacl)#permit 192.168.34.0 0.0.0.255
R4#(config)#route-map NATIVE_OSPF permit 10
R4#(config-route-map)#match ip address NATIVE_OSPF_ROUTES
R4#(config-route-map)#route-map NATIVE_OSPF deny 20
R4#(config)#router rip
R4#(config-router)#redistribute ospf 1 metric 1 route-map NATIVE_OSPF

ပြီးတာနဲ့ R2 ရဲ့ Routing Table ကို ကြည့်လိုက်ပါ။ 1.1.1.0/24 network ရဲ့ next hop က R1 ပြန်ဖြစ်သွားတာကိုတွေ့ရပါမယ်။

R2#sh ip route rip
     1.0.0.0/24 is subnetted, 1 subnets
R       1.1.1.0 [120/6] via 192.168.12.1, 00:00:14, FastEthernet1/0

Traceroute လုပ်ကြည့်တဲ့အခါ လဲ looping ဖြစ်မနေတော့တာကို တွေ့ရပါလိ့မ်မယ်။

R2#traceroute 1.1.1.1
Type escape sequence to abort.
Tracing the route to 1.1.1.1
  1 192.168.12.1 64 msec 24 msec 16 msec
R2#

ကဲ…ပြဿနာပြေလည်သွားပါပြီ။ ဒါပေမယ့် ဒီနည်းလမ်းဟာ scalable တော့ မဖြစ်ပါဘူး။ တကယ်လို့ OSPF မှာ network prefix ထပ်တိုးလာခဲ့ရင် access-list မှာ ထပ်မံ ပြင်ဆင်ရမှာဖြစ်လို့ပါ။
ဒါပေမယ့် 101 ဆိုတဲ့အတိုင်း အခြေခံ လောက်သိစေချင်တဲ့အတွက် ဒီလောက်နဲ့ ပဲ ရပ်ပါတော့မယ်။
Administrative Distance Problem ဆိုတာ ရှိပါသေးတယ်။ ဒါပေမယ့် ဆက်မရေးတော့ပါဘူး။ AD တန်ဖိုးတွေကို adjust လုပ်ပြီးရှင်းတာကို ပြောတာပါပဲ။
Route Redistribution ကို အခြေခံလောက်နားလည်သွားပြီး Advance ပိုင်းများလေ့လာနိုင်ပါစေဗျာ။

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

ပျော်ရွှင်ပါစေဗျာ။
(Be knowledgeable, pass it on then)


No comments :

Post a Comment