Quality of Service – Classification with Network-Based Application Recognition

ပြီးခဲ့တဲ့ ပို့စ်မှာ Access-List  ကိုသုံးပြီး Traffic ကို Classify လုပ်ပြခဲ့ပါတယ်။
အခုတခါတော့ Network-Based Application Recognition (NBAR) ကိုသုံးပြီး Traffic ကို Classify လုပ်ပုံကိုရှင်းပြပါအုံးမယ်။
အောက်က Topology ကိုပဲ သုံးပြီး Router 1 ရဲ့  Fa1/0 interface ကို ဝင်လာမယ့် Traffic တွေကိုထဲက Telnet ကို Classify လုပ်ကြည့်ပါမယ်။
(IP Address , Interface Configuration တွေကိုတော့ မိမိဖာသာပဲ Configure လုပ်ကြည့်ပါ။)


QoS ကို configure မလုပ်ခင် ကျတော် Router 1 ရဲ့ Fa1/0 ကို ဝင်လာတဲ့ Traffic ကို စစ်ပြပါမယ်။ အောက်မှာ ကြည့်ပါ။ ပထမဆုံး အနေနဲ့ nbar protocol-discovery ကို configure လုပ်ပေးဖို့လိုပါတယ်။

R1(config)#interface fastEthernet 1/0
R1(config-if)#ip nbar protocol-discovery

ပြီးတာနဲ့ အောက်ကလို စစ်နိုင်ပါတယ်။

R1#show ip nbar protocol-discovery


လောလောဆယ် တော့ protocl နေရာမှာ ping တခုပဲ ရှိနေတာကိုတွေ့ရမှာပါ။
တခြားဘယ်လို traffic, protocol တွေ ကိုယ့် router interface မှာ သွားနေတယ်ဆိုတာကို စစ်ဖို့ အတော်လေးကောင်းမွန်တဲ့နည်းလမ်းပေါ့ဗျာ။
ဒါပေမယ့် ဘယ် Traffic, Protocol ဆိုရင်တော့ ဘာလုပ်ဖို့ဆိုတဲ့ အလုပ်မျိုးလုပ်ဖို့အတွက် QoS ကို configure
လုပ်မယ်ဆိုရင်တော့ nbar ကို class-map အနေနဲ့ configure လုပ်ပေးရပါမယ်။
အောက်မှာကြည့်ပါ။

R1(config)#
R1(config)#class-map NBAR-Telnet
R1(config-cmap)#match protocol telnet

NBAR-Telnet ဆိုတဲ့ class-map တခုဖန်တီးပြီး match protocol ကိုတော့ telnet protocol ကိုသုံးတဲ့ traffic တွေကို classify လုပ်ဖို့အတွက် telnet ကို ပေးထားပါတယ်။
ပြီးတာနဲ့ policy-map ဆောက်ပေးရပါမယ်။

R1(config)#policy-map Restricted
R1(config-pmap)#class NBAR-Telnet

နောက်ဆုံးအနေနဲ့ ကိုယ်လိုချင်တဲ့ interface မှာ service-policy ကို attach လုပ်ပါမယ်။
ဒီမှာတော့ Fa1/0 ပေါ့။ ကျတော် traffic in ရော traffic out ရောကိုပါ စစ်ပါမယ်။

R1#config t
R1(config)#int fa1/0
R1(config-if)#service-policy input Restricted
R1(config-if)#service-policy output Restricted

ဒါဆို configuration လုပ်တာပြီးပါပြီ။
မှန်မမှန်စစ်ဖို့အတွက် R2 ကနေ R1 ကို Ping နဲ့ Telnet တွေသုံးပြီး traffic တွေပို့ကြည့်ပါ။

R2#ping 172.16.21.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.21.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/36/72 ms
R2#
R2#telnet 172.16.21.1
Trying 172.16.21.1 ... Open

ပြီးတာနဲ့ service-policy မှာ match ဖြစ်တဲ့ traffic တွေကိုအောက်မှာပြထားသလို စစ်ကြည့်ပါ။ ကျတော် highlight လုပ်ပြထားတာကိုကြည့်ရင် policy အလုပ်လုပ်တာကိုတွေ့ရမှာပါ။

R1#show policy-map interface fa1/0
 FastEthernet1/0

  Service-policy input: Restricted

    Class-map: NBAR-Telnet (match-all)
      7 packets, 423 bytes
      5 minute offered rate 0000 bps
      Match: protocol telnet

    Class-map: class-default (match-any)
      9 packets, 816 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any

  Service-policy output: Restricted

    Class-map: NBAR-Telnet (match-all)
      5 packets, 331 bytes
      5 minute offered rate 0000 bps
      Match: protocol telnet

    Class-map: class-default (match-any)
      21 packets, 2202 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any
R1#
R1#show ip nbar protocol-discovery


ကဲ… ဒီလောက်ဆို Network-Based Application Recognition (NBAR) ကို QoS နဲ့သုံးပြီး Traffic တွေကို ဘယ်လို Classify လုပ်လဲ ဆိုတာကိုသိပြီလို့ထင်ပါတယ်။

ပျော်ရွှင်ပါစေဗျာ။

(Be knowledgeable, pass it on then)

Quality of Service - Classification with Access-List on Cisco IOS Router

QoS အကြောင်း သီအိုရီပြောပြီးပါပြီ။
ဒီတခါ Cisco IOS Router တွေမှာ Traffic ကို Access-List သုံးပြီး Classification လုပ်ဖို့ ဘယ်လို Configure လုပ်လဲ ဆိုတာ ရေးပါမယ်။
Access-List နဲ့ QoS Classification လုပ်ဖို့ Configure လုပ်တဲ့အခါ
-          - Access-List ဆောက်မယ်
-          - Class-map ဆောက်မယ်
-          - Policy-map ဆောက်မယ်
-          - လိုချင်တဲ့ Interface မှာ apply လုပ်မယ်ဆိုပြီး အဆင့်လေးဆင့်ရှိပါတယ်။
ဥပမာအနေနဲ့ အောက်က Topology မှာ R2 ရဲ့ incoming SSH Traffic ကို Classify လုပ်ကြည့်ပါမယ်။


ဒီအတွက် အပေါ်က အဆင့်တွေအတိုင်းလုပ်သွားပါမယ်။ (Interface , IP Address, SSH Key နဲ့ SSH စမ်းဖို့အတွက် login username , password တွေကို မိမိဘာသာ configure လုပ်ကြည့်ပါ။)
Access-List ဆောက်ပါမယ်။ ပုံမှန် Access-list တွေဆောက်ပြီးရင် interface မှာ သွားပြီး apply လုပ်လိုက်ရုံပါပဲ။ QoS မှာတော့ မဟုတ်ပါဘူး။ Modular Quality of Service Command-Line Interface (MQC) ဆိုတာကို သုံးရပါတယ်။ အခုတော့ SSH ဆိုတဲ့ access-list name နဲ့ port 22 ကို allow လုပ်တဲ့ access-list ကို အောက်ကအတိုင်းဆောက်ပါပြီ။

R2(config)#ip access-list extended SSH
R2(config-ext-nacl)#permit tcp any any eq 22
R2(config-ext-nacl)#exit
နောက်အဆင့်အနေနဲ့ Class-map ကို configure လုပ်ပါမယ်။ class-map မှာ matching လုပ်ဖို့ option တွေအများကြီးရှိတဲ့အထဲက အလွယ်ဆုံး access-group ဆိုတာကိုပဲ ရွေးပြီး class-map name ကိုလဲ SSH လို့ပဲ ပေးပါမယ်။

R2(config)#class-map SSH
R2(config-cmap)#match access-group name SSH
R2(config-cmap)#exit

ပြီးတာနဲ့ Class-map နဲ့ တွဲသုံးမယ့် Policy-map ကို create လုပ်ပါမယ်။ NO-SSH ဆိုတဲ့ name နဲ့ policy-map ကို create လုပ်ပြီး SSH ဆိုတဲ့ class-map နဲ့ တွဲပါမယ်။ ဒီနေရာ မှာ ကျတော်တို့ အနေနဲ့ QoS Action တွေဖြစ်တဲ့ Traffic ကို Queuing လုပ်ခိုင်းမလား၊ Marking လုပ်ခိုင်းမလား စတာတွေကို policy အနေနဲ့ ထည့်ခိုင်းနိုင်ပါတယ်။ ဒီမှာတော့ ကျတော်တို့ က Traffic ကို Class ပဲ ခွဲမှာဆိုတော့ ဘာမှ မထည့်ထားပါဘူး။

R2(config)#policy-map NO-SSH
R2(config-pmap)#class SSH
R2(config-pmap-c)#exit
R2(config-pmap)#exit

နောက်ဆုံးအဆင့် ဖြစ်တဲ့ လိုချင်တဲ့ Interface မှာ QoS ကို Apply လုပ်ပါမယ်။ ဒါမှ QoS Policy က ကိုယ်လိုချင်တဲ့ Action ကို ဖြစ်စေချင်တဲ့ Interface မှာဖြစ်အောင်လုပ်ပေးနိုင်မှာပါ။

R2(config)#int fa1/0
R2(config-if)#service-policy input NO-SSH
R2(config-if)#exit

ကဲ ပြီးတာနဲ့ R1 ကနေ R2 ကို SSH connection နဲ့ login လုပ်ကြည့်ပါ။
ပြီးရင် R2 မှာ အောက်ကအတိုင်း command လေးတွေရိုက်ပြီး ကိုယ့် QoS Classification အလုပ်လုပ်လား မလုပ်လား စစ်နိုင်ပါတယ်။

R1#ssh -l admin 172.16.21.2
Password:
R2>en
Password:
R2#
R2#exit

R2#show policy-map int fa 1/0
 FastEthernet1/0

  Service-policy input: NO-SSH

    Class-map: SSH (match-all)
      30 packets, 2806 bytes
      5 minute offered rate 0000 bps
      Match: access-group name SSH

    Class-map: class-default (match-any)
      0 packets, 0 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any

R1#ping 172.16.21.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.21.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/37/68 ms
R1#

R2#show policy-map int fa 1/0
 FastEthernet1/0

  Service-policy input: NO-SSH

    Class-map: SSH (match-all)
      44 packets, 3968 bytes
      5 minute offered rate 0000 bps
      Match: access-group name SSH

    Class-map: class-default (match-any)
      5 packets, 570 bytes
      5 minute offered rate 0000 bps, drop rate 0000 bps
      Match: any
R2#

အပေါ်မှာ ပြထားတာကိုကြည့်ရင် ကျတော်တို့ R2 မှာ configure လုပ်ထားတဲ့ policy-name, class-map နဲ့ access-list တွေက အသက်ဝင်နေတာကို တွေ့ရမှာပါ။
ကဲ…ဒီလောက်ဆို Cisco IOS Router တွေမှာ Access-List ကိုသုံးပြီး QoS Classification ကို ဘယ်လို အသုံးချရလဲ ဘယ်လို configure လုပ်ရလဲဆိုတာ သိလောက်ပြီထင်ပါတယ်။
နောက်ပို့စ်မှာ Classification ကိုပဲ Network-Based Application Recognisation (NBAR) နဲ့ configure လုပ်ပြီး အသုံးပြုပုံကို ထပ်ရေးပါအုံးမယ်။

ပျော်ရွှင်ပါစေဗျာ။

(Be knowledgeable, pass it on then)

Border Gateway Protocol - 4

အခုမှ စ ဖတ်မယ့်သူတွေအနေနဲ့ Border Gateway Protocol 1,2,3 ကို အောက်က လင့်တွေမှာ ဖတ်နိုင်ပါတယ်။

http://www.ictformyanmar.com/2016/05/border-gateway-protocol-1.html

http://www.ictformyanmar.com/2016/05/border-gateway-protocol-2.html

http://www.ictformyanmar.com/2016/05/border-gateway-protocol-3.html

BGP Case Studies တွေကို လေ့လာတဲ့အခါ အောက်ကပုံမှာ ပြထားသလိုမျိုး eBGP ကို Load Balancing လုပ်ရတာမျိုးကိုတွေ့ရမှာပါ။


ပုံမှန်အားဖြင့် eBGP router ၂ လုံးကို Parallel Link နဲ့ အခုလို ချိတ်ထားတဲ့အခါမှာ BGP က link တခုကိုပဲ ရွေးပြီး packet တွေကို send မှာဖြစ်ပြီး load balancing ရမှာ မဟုတ်ပါဘူး။
ဒီအတွက် loopback interface ဆိုတာကို သုံးဖို့လိုလာပါတယ်။ ဒါပေမယ့် loopback ကိုသုံးဖို့ ဆိုတာမှာ သူ့ကို create , configure လုပ်လိုက်ရုံနဲ့မရပါဘူး။ နောက်တဆင့်လိုပါသေးတယ်။
ဘာလိုတာလဲ ဆိုတာကို လေ့လာကြည့်ရအောင်။

ပထမဆုံးအနေနဲ့ Router Interface နဲ့ IP Address တွေကို configure လုပ်ပြီး eBGP ၊ static route တွေကို configure လုပ်ပါ။
(ကိုယ့်ဖာသာ ကိုယ် လုပ်ကြည့်ကြည့်ပါ။)
ကျတော်ကတော့ ဒီမှာ Static Route နဲ့ eBGP ပိုင်းကိုပဲ configure လုပ်ပြထားပါတယ်။

R1(config)#
R1(config)#router bgp 100
R1(config-router)#neighbor 192.168.2.2 remote-as 200
R1(config-router)#neighbor 192.168.2.2 update-source loopback 0
R1(config-router)#neighbor 192.168.2.2 ebgp-multihop 2
R1(config-router)#

R2(config)#
R2(config)#router bgp 200
R2(config-router)#neighbor 192.168.1.1 remote-as 100
R2(config-router)#neighbor 192.168.1.1 update-source loopback 0
R2(config-router)#neighbor 192.168.1.1 ebgp-multihop 2
R2(config-router)#

စက္ကန့်အနည်းငယ်စောင့်ပြီးတာနဲ့ eBGP neighbor up ဖြစ်တာကိုတွေ့ပါမယ်။

R1(config-router)#
*Jun  2 14:40:09.215: %BGP-5-ADJCHANGE: neighbor 192.168.2.2 Up

R2(config-router)#
*Jun  2 14:40:09.115: %BGP-5-ADJCHANGE: neighbor 192.168.1.1 Up

အိုကေ...ကျတော်တို့လိုချင်တဲ့ load balancing ရပါပြီ။

R1#show ip route static
S     192.168.2.0/24 [1/0] via 172.16.21.2
                     [1/0] via 172.16.12.2

R2#show ip route static
S     192.168.1.0/24 [1/0] via 172.16.21.1
                     [1/0] via 172.16.12.1

ဒီပို့စ်ရဲ့ အဓိက ဇာတ်လိုက်တွေကတော့ update-source ဆိုတဲ့ command နဲ့ loopback ပါပဲ။
ပုံမှန်အားဖြင့် iBGP တွေမှာသာ loopback ကို အသုံးပြုကြပေမယ့် အခုလိုမျိုး eBGP load balancing လိုဟာအတွက်လည်း loopback ကို အသုံးချတာပေါ့ဗျာ။

ဒီမှာ ပြချင်တာက loopback interface နဲ့ update-source ဆိုတာပါပဲ။

ဆက်ပါအုံးမယ်။

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