Sunday, December 31, 2017

Latest Kernel Installation on CentOS-7


      ပံုမွန္အားျဖင့္ CentOS7 မွာလက္ရိွစာေရးေနခ်ိန္အထိ Linux kernel version ေတြဟာ 3.x.x. နဲ႔ပဲလာျပီးေတာ့ေနာက္ဆံုး update ကိုတရား၀င္အားျဖင့္ support ေပးတာမ်ိဳးမေတြ႕ရပါဘူး။ မလိုအပ္တာေႀကာင့္လည္းျဖစ္ ႏိုင္ပါတယ္။အဲ့ေတာ့ကာ latest kernel ကို install လုပ္ခ်င္ရင္ေတာ့ ကိုယ့္ဟာကိုယ္ပဲ ELRepo ကိုကေန install လုပ္ရပါေတာ့မယ္။ ELRepo ဆိုတာသည္ RPM repository for Enterprise Linux Packages ျဖစ္ျပီးေတာ့ hardware issue ေတြျဖစ္တဲ့ video and graphic ၊ audio ၊ network နဲ႔ file system drivers packages ေတြဖက္ကိုအဓိ ထား develop လုပ္ပါတယ္။အဲ့ေတာ့ ပံုမွန္မဟုတ္တဲ့ third-party software ေတြ driver ေတြတခ်င္ရင္ elrepo ကိုသံုးရမွာပါ။        



        အေပၚကပံုေလးမွာ centos7.3 နဲ႔ nagios core ကိုတင္ထားတယ္။linux kernels ေတြကေတာ့ default ျဖစ္တဲ့ 3.x.xx version ေတြျဖစ္ပါတယ္။အဲ့မွာမွာ latest kernel ကိုစမ္းတင္ႀကည့္ပါမယ္။ Installation အဆင့္ ေတြကိုေတာ့သံုးဆင့္ေလာက္ပဲခြဲလုိက္ပါမယ္။
1)    Import the public key
2)  Install ELRepo for CentOS 7
3)  Installing New Kernel version
      Kernel အသစ္အတြက္ public-key ကို import မလုပ္မီမွာ လက္ရွိ အသံုးျပဳေနတဲ့ OS version နဲ႔ linux kernel verstion ကိုအရင္ check လုပ္ပါမယ္။

root@infra ~#cat /proc/version    (or)  root@infra ~#uname –mrs


        အေပၚပံုကလက္ရွိ login ၀င္ထားတဲ့ kernel ရဲ့ version ျဖစ္ပါတယ္။OS release version အတြကကိုေတာ့ ေအာက္ပါအတိုင္းႀကည့္ပါမယ္။OS release version ကေတာ့ 7.4 ပါ။သို႔ေသာ္စတင္ install လပ္စဥ္က 7.3 နဲ႔ပဲ installation လုပ္ထားတာပါ။


ျပီးရင္ေတာ့ wget သံုးျပီး public elrepo key ကို download ဆြဲပါမယ္။

root@infra ~]#wget https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
root@infra ~]#gpg --quiet --with-fingerprint RPM-GPG-KEY-elrepo.org


ေထြေထြထူးထူး error မရွိဘူးဆိုရင္ေတာ့ download လုပ္ထားတဲ့ public-key ကို import လုပ္လုိ႔ရပါျပီ။

root@infra ~]#sudo rpm --import RPM-GPG-KEY-elrepo.org


      key-import ျပီးသြားရင္ elrepo file ကို download လုပ္ပါမယ္။latest version ကိုသံုးပါမယ္။အဲ့အတြက္ elrepo official site မွာ သက္ဆိုင္ရာ OS version မ်ားအလိုက္ latest repo ေတြရွိပါတယ္။ CentOS7အတြက္ elrepo-release-7.0-3.el7.elrepo.noarch.rpm ျဖစ္ပါတယ္။ သို႔ေသာ္ဒါက အေသမွတ္စရာမလိုပါ။ latest ျဖစ္တာကိုသံုးရံုပါ။

root@infra ~#wget http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm


root@infra ~#yum install elrepo-release-7.0-3.el7.elrepo.noarch.rpm


               New kernel installation အတြက္လုိအပ္တဲ repo file ကို installation လုပ္လို႔ျပီးပါျပီ။ ဒီေနရာမွာ တခုနားည္ထားရမွာက အခု repo file ဟာ new kernel အတြက္လုိအပ္တာေတြအျပင္ အျခာ ေသာ third-party software မ်ားအတြက္ပါ သက္ဆိုင္ရာ repo data ေတြပါ၀င္ေနပါတယ္။ အခုကြ်န္ေတာ္တို႔က kernel ကိုပဲ installation လုပ္ခ်င္တာပါ။ အျခား software ေတြကို installation မလုပ္ခ်င္ပါဘူး။ အဲ့ဒါေလးကို ေတာ့မွတ္သားထားစခ်င္ပါတယ္။ အရင္ဆံုး available ျဖစ္တဲ့ kernel ေတြကို list လုပ္ႀကည့္ပါမယ္။ 

root@infra ~#yum list available --disablerepo='*' --enablerepo=elrepo-kernel

ဒီေနရာမွာ --disablerepo='*' ဆိုတာက repo data အားလံုးကို disable လုပ္လိုက္ပါျပီ။သို႔ေသာ္ေနာက္မွာ   --enablerepo=elrepo-kernel ပါတဲ့အတြက္ kernel နဲ႔ပါတ္သတ္တာေတြကိုေတာ့ list လုပ္ပါလို႔ဆိုလိုတာပါ။ ေအာက္ကပံုအတိုင္း command output ထြက္လာပါမယ္။available ျဖစ္တဲ့ kernel type ေတြအကုန္လံုး list လုပ္ထားေပးပါလိမ့္မယ္။


ဒီေနရာမွာ kernel-lt.x86_64 နဲ႔ kernel-ml.x86_64  ဆိုျပီးႏွစ္မ်ိဳးအဓိကေတြ႕ရပါမယ္။အခုက list လုပ္ထားတာပဲရွိေသးျပီး installation မလုပ္ရေသးပါဘူး။ႏွစ္မ်ိဳးထဲကတစ္မ်ိဳးကို install လုပ္ရမွာပါ။ကြ်န္ေတာ္ကေတာ့ long team support ျဖစ္တဲ့ kernel-lt.x86_64 ကို install လုပ္ပါမယ္။command ကေတာ့ျဖစ္ ေအာက္ပါအတိုင္းျဖစ္ပါတယ္။

root@infra ~#yum --disablerepo='*' --enablerepo=elrepo-kernel install kernel-lt


Mini stable ကို install လုပ္ခ်င္ရင္ေတာ့ေအာက္ပါ command အတိုင္းသြားပါမယ္။ေနာက္ဆံုးစာလံုးပဲ ကြာပါမယ္။က်န္တာကအတူတူပါပဲ။

root@infra ~#yum --disablerepo='*' --enablerepo=elrepo-kernel install kernel-ml

အဲ့ဒီေနာက္ reboot လုပ္ျပီးျပန္တက္လာရင္ kernel အသစ္နဲ႔ log-in လုပ္လို႔ရပါျပီ။ဒီေနရာမွာ kernel အသစ္ နဲ႔ default တက္မွာမဟုတ္ပါဘူး။ေအာက္ကပံုက manual ေရြးထားတာပါ။default တက္ခ်င္ရင္ေတာ့ grub ကို kernel 4.4 အေနနဲ႔ default ျဖစ္ေအာင္ config လုပ္ေပးရပါမယ္။


 အဲေတာ့ grub file က /etc/defaulf/ ေအာက္မွာရွိပါတယ္။ေအာက္ကပံုကိုႀကည့္ပါ။အဲ့မွာ vi နဲ႔ျဖစ္ျဖစ္ nano နဲ႔ပဲျဖစ္ျဖစ္ GRUB_DEFAULT=SAVED ဆိုတာကို GRUB_DEFAULT=0 ေျပာင္းေပးလုိက္ပါ။ေအာက္ကပံု ကေတာ့ေျပာင္း ျပီးသားပံုျဖစ္ပါတယ္။

ျပီးရင္ေအာက္ပါ command အတိုင္း update လုပ္ပါမယ္။ျပီးရင္ reboot လုပ္ပါမယ္။

root@localhost~#grub2-mkconfig -o /boot/grub2/grub.cfg


              ေနာက္တစ္ႀကိမ္ reboot ျပန္တက္ရင္ေတာ့ kernel 4.4 က default ျဖစ္ေနပါျပီ။အခုဒီ kernel upgrading လုပ္တဲ့ process ကို zabbix install လုပ္ထားတဲ့ vbox ေပၚမွာေကာ nagios install လုပ္ထားတဲ့ vbox ေပၚမွာ ပါစမ္းျပီးျဖစ္ပါတယ္။ သူ႔ရဲ့ core application system ကိုမသို႔မွထိခိုက္ျခင္းမရွိပါဘူး  ေကာင္းေကာင္းမြန္မြန္ အလုပ္လုပ္ပါတယ္။ သို႔ေသာ္ CentOS community အေနနဲ႔ latest kernel နဲ႔ပတ္သတ္ျပီး official recommend ေပးျခင္းမ်ိဳး support ေပးျခင္းမ်ိဳးမရွိပါဘူး။ ဒါေႀကာင့္ operational environment မွာဆိုရင္ upgrade လုပ္ဖို႔မလိုအပ္ရင္ေတာ့ မလုပ္တာပိုေကာင္းပါတယ္။ တကယ္လို႔ ကိုယ့္ desire ေႀကာင့္လုပ္ခ်င္တယ္ ဆိုရင္ေတာ့ critical data ေတြ backup အရင္လုပ္ျပီးမွ စမ္းႀကည့္ေစခ်င္ပါတယ္။ တခုခုခြ်တ္ေခ်ာ္လို႔ OS boot ျပန္မတက္ရင္save ျဖစ္ေအာင္ပါ။

ေလးစားစြာျဖင့္
Win Tun Hlaing

Friday, November 3, 2017

3G Modem Set-up in Mikrotik

Mikrotik Router Board ေတြမွာ 3G moden ေတြနဲ႔ internet အသံုးျပဳမယ္ဆုိရင္ အရင္ဆံုးသူနဲ႔ compatible ျဖစ္တဲ့ 3G moden ကိုရွာေဖြ၀ယ္ယူရမွာျဖစ္ပါတယ္။ျပီးေတာ့တန္းျပီး USB ေပါက္မွာထိုးရံုနဲ႔ Internet ထြက္မွာမဟုတ္ပါဘူး။ setting အခ်ိဳ႕ကိုေတာ့ configure လုပ္ေပးရမွာပါ။အရင္ဆံုး moden ကိုထိုးလုိက္ျပီ ဆိုတာနဲ႔ compatible ျဖစ္တဲ့ moden ဆိုရင္ PPP-Client interface ဟာ auto ေပၚလာရမွာပါ။ မေပၚလာဘူးဆိုရင္ေတာ့ compitable မျဖစ္လို႔ပါ။


ျပီးရင္system>resource>USB ကိုႀကည့္ပါ။ ဒါဆိုရင္USB moden ရဲ့ vendorနဲ႔ speed ကိုျမင္ရမွာျဖစ္ပါတယ္။


ျပီးရင္ေတာ့ Internet ထြက္ဖို႔အတြက္ PPP-Client-Interface တစ္နည္းအားျဖင့္ PPP outgoing interface ကို setup စျပီးလုပ္ပါမယ္။ PPP-Client-Interface ကိုႏွစ္ေနရာမွာျမင္ႏိုင္ပါတယ္။တစ္ခုက interfaces list ေအာက္မွာ ေနာက္တစ္ခု ppp list ရဲ့ေအာက္မွာပါ။ အဲ့ႏွစ္ခုလံုးကအတူတူပါပဲ။ က်ြန္ေတာ္ကေတာ့ ပိုရွင္း သြားေအာင္ PPP list ေအာက္က ေန setup လုပ္ပါမယ္။ PPP interface setting မွာ General ၊ PPP ၊ Status ၊ Traffic ဆိုျပီးေတာ့ sub-setting ေလးခုပါပါတယ္။ အရင္ဆံုး General Tab ေအာက္မွာ Name ၊ Type ၊ Port ၊ APN ၊PIN ဆိုတဲ့ attribute ေတြကိုထည့္ေပးရမွာပါ။


Name ကေတာ့ႀကိဳက္တာေပးလုိ႔ရတယ္။ကြ်န္ေတာ္ကေတာ့ပံုထဲကအတိုင္း 3G-Internet ဆိုျပီးထားလုိက္တယ္။Type ကေတာ့ PPP Client ပဲသြားေျပာင္းလို႔မရပါဘူး။ Port မွာေတာ့ usb1 အဲ့ဒါက moden ရဲ့ physical interface ျဖစ္ျပီး သူသည္လည္း default ကိုပဲေရႊးေပးရမွာပါ။ အဲ့ေနရာမွာတစ္ခုရွိတယ္။ Port မွာ usb1 သို႔ usb2 ေပၚမေနပဲ unknown ျပေနတာမ်ိဳးဆို compitable မျဖစ္လို႔ပါ။ အဲ့ေတာ့ကြ်န္ေတာ္ တို႔က mikrotik နဲ႔တြဲသံုးခ်င္ရင္ သူနဲ႔compitable ျဖစ္တာကိုပဲရွာ ၀ယ္ရမယ့္သေဘာပါ။ compitable ျဖစ္တဲ့ list ကိုလည္း mikrotik website မွာေဖာ္ျပ ထားပါတယ္။ေနာက္ APN မွာေတာ့ Ooredoo သံုးထားလုိ႔ Internet ဆိုျပီးထည့္ပါမယ္။MPT ဆိုရင္ေတာ့ mptnet ဆိုျပီးထည့္ရမွာပါ။PIN မွာေတာ့ ဘာမွထည့္စရာ မလိုပါဘူး။ဒါက သက္ဆိုင္ရာ Operator ေတြနဲ႔လည္းဆိုင္ပါ တယ္။ျပီးရင္ေတာ့ PPP setting ကိုသြားပါမယ္။ PPP Setting ေအာက္မွာ User ၊ Password ၊ Remote Address ၊ Keepalive Timeout ေတြ setting ေတြရွိျပီး Username နဲ႔ Password မွာ ဒီတိုင္း Blank ထားပါမယ္။ ဘာလို႔ဆိုကြ်န္ေတာ္တို႔ mpt ျဖစ္ျဖစ္ Ooredoo ျဖစ္ျဖစ္ mobile phone ေတြမွာ setting ခ်ိန္ရင္ username နဲ႔ password ေပးစရာမလိုပါဘူး။ အဲ့ဒါေႀကာင့္မို႔ပါ။ သို႔ေသာ္အခ်ိဳ႕ႏိုင္ငံေတြက operator ေတြမွာေတာ့ username နဲ႔ password သတ္မွတ္ထားရွိတာမ်ိဳးရွိပါတယ္။ အဲ့ဒါမ်ိဳးဆိုရင္ေတာ့ထည့္ ေပးရပါမယ္။ Keepalive Timeout ကိုေတာ့ default အတိုင္း 30 ပဲထားပါမယ္။နာက္ျပီးေအာက္ဖက္မွာ Dial on DemandUse Peer DNSAdd Default Route ဆိုျပီး check box နဲ႔ setting သံုးခုရွိပါတယ္။ Dial on Demand ကိုအမွန္ျခစ္ျဖဳတ္ရပါမယ္။ မလိုလုိ႔ပါ။ Use Peer DNS နဲ႔ Add Default Route ကိုေတာ့ အမွန္ျခစ္ေပးရပါမယ္။ ျပီးရင္ေတာ့ Apply>Ok ေပးလုိက္ပါ။ ဒီအခ်ိန္ထိ interface က disable ျဖစ္ေနတုန္းပါ။


ျပီးရင္ PPP-Client Interface ကို Enable လုပ္ပါမယ္။


အဲ့ေနာက္မွာေတာ့ PPP-Client interface ဟာ connected ျဖစ္ေနပါျပီ။တစ္နည္းအားျဖင့္ Internet ရေနပါျပီ။သို႔ေသာ္ ကြ်န္ေတာ္တို႔ NAT setting ေလးျပင္ဖို႔က်န္ေနပါေသးတယ္။


ပံုမွန္အားျဖင့္ NAT မွာ out-going interface ကို Ethernet ပဲ default ထားတာပါ။cable internet ေပါ့။သို႔ေသာ္ ကြ်န္ေတာ္တို႔က 3G ကေန internet ထြက္မွာပါ။ဒါေႀကာင့္ default setting ျဖစ္တဲ႔ cable internet ေနရာမွာ 3G interface ကိုေျပာင္းေပးရပါမယ္။ အဲ့အတြက္ IP>Firewall>NAT ကိုသြားပါမယ္။NAT ကေန General မွာ Chain:srcnat နဲ႔ Out.Interface မွာ PPP-Client-Interface ကိုေရြးေပးလိုက္ပါ။ဒါဆို Internet ထြက္သြားပါျပီ။


အားလံုးျပီးလို႔ေသခ်ာသြားေအာင္ Connection Test လုပ္ထားပံုေလးကိုႀကည့္ပါ။Internet Speed ကေတာ့ သက္ဆိုင္ရာ Operator နဲ႔ Location ေပၚမွာမူတည္ပါတယ္။ေနာက္ျပီးသံုးတဲ့ Moden အမ်ိဳးစားနဲ႔လည္းဆိုင္ ပါတယ္။


Additional Reference အေနနဲ႔ေလ့လာခ်င္ရင္ေတာ့ 3G modem support for Mikrotik အတြက္ ဒီေနရာ ရယ္ ၊ 3G modem setup for mikrotik အတြက္ ဒီေနရာ က youtube channel မွာ ေလ့လာႏိုင္ပါတယ္။

ေလးစားစြာျဖင့္
Win Tun Hlaing

Sunday, August 26, 2012

EIGRP Matrix Calculation(Part-2)



In Above Topology,
Outgoing interfaces for remote networks 172.16.0.0/23,172.16.2.0/23,172.16.4.0/23 from Snoe Router is Snoe's f0/0 and Sophia's Lo0,Lo1,Lo2.
Outgoing interfaces for remote networks 200.0.0.8/29 from Snoe Router is Snoe's f0/0 and Sophia's f0/1.
Outgoing interfaces for remote networks 200.0.0.16/30,200.0.0.20/30 from Snoe Router is Snoe's f0/0,Sophia's f0/1 and Kasi's Lo0,Lo1.


Router        Outgoing Interface         Bandwidth                   Delay    
Snoe                  f0/0                        100000 Kbits         100 microsecond
Sophia               f0/1                        10000 Kbits           1000 microsecond
Sophia               Lo0                        8000000 Kbits       5000 microsecnond
Kasi                   Lo0                        8000000 Kbits       5000 microsecnond


Snoe>enable
Snoe#show ip route eigrp
  200.0.0.0/24 is variably subnetted,4 subnets,2 masks
D   200.0.0.8/29 [90/284160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   200.0.0.16/30 [90/412160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   200.0.0.20/30 [90/412160] via 200.0.0.3, 1:44:39, FastEthernet0/0
  172.16.0.0/23 is subnetted,3 subnets
D   172.16.4.0 [90/156160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   172.16.0.0 [90/156160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   172.16.2.0 [90/156160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   192.168.4.0/23 [90/156160] via 200.0.0.2, 1:44:39, FastEthernet0/0
D   192.168.6.0/23 [90/156160] via 200.0.0.2, 1:44:39, FastEthernet0/0
D   192.168.0.0/22 [90/156160] via 200.0.0.2, 1:44:39, FastEthernet0/0

EIGRP Matrix Formula

metric = [K1 * bandwidth+(K2 * bandwidth)/(256 - load)+K3 * delay] * [K5/(reliability + K4)]



Eigrp matrix weight K1=1,K2=0,K3=1,K4=0,K5=0.
Metric = bandwidth + delay 

The lest Metric Formula for Cisco's Router,
Metric={(10,000,000/slowest bandwidth in kbps)+(total delay in microsecond /10)}*256
Slowest bandwidth in kbps=Only one interface's bandwidth that have lowest bandwidth among all                      outgoing interfaces to desire remote
Total delay in microsecond=The sum of the all outgoing interface's delay.

D   200.0.0.8/29 [90/284160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   200.0.0.8/29 [90/412160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   200.0.0.8/29 [90/412160] via 200.0.0.3, 1:44:39, FastEthernet0/0

Sophia's f0/0 has lowest bandwidth,
Metric={(10,000,000/slowest bandwidth in kbps)+(total delay in microsecond /10)}*256
Metric={(10,000,000/10000)+(1100 /10)}*256
Metric={1000+110}*256
Metric={1110}*256 = 284160

Metric={(10,000,000/slowest bandwidth in kbps)+(total delay in microsecond /10)}*256
Metric={(10,000,000/10000)+(6100 /10)}*256
Metric={(1000)+(610)}*256 
Metric=(1610)*256  =412160

D   172.16.4.0 [90/156160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   172.16.0.0 [90/156160] via 200.0.0.3, 1:44:39, FastEthernet0/0
D   172.16.2.0 [90/156160] via 200.0.0.3, 1:44:39, FastEthernet0/0

Total delay=Snow's f0/0+Sophia's Lo0 = 100 +5000=5100 microsecond
Lowest Bandwidth Interface=Snow's Interface =100000 Kbits
Metric={(10,000,000/slowest bandwidth in kbps)+(total delay in microsecond /10)}*256
Metric={(10,000,000/100000)+(5100/10)}*256
Metric={(100)+(510)}*256
Metric={610}*256 = 156160


 ေလးစားစြာျဖင့္
WinTunHlaing


Tuesday, May 1, 2012

EIGRP Metric Calculation(Part-1)

EIGRP Routing Protocol က Cisco Proprietary ျဖစ္ျပီး အျခားေသာ routing protocol ေတြနဲ႔မတူတဲ့ အခ်က္ကေတာ့ Bandwidth,Delay,Reliability,Load တို႔ကို Metric တြက္ရာမွာသံုးပါတယ္..။ EIGRP Metric မတြက္မီေအာက္ပါတို႔ကိုေသခ်ာနားလည္ဖို႔ေတာ့လိုအပ္ပါတယ္..။

1.Feasible distance(FD)
2.Advertised distance(AD)
3.Successor
4.Feasible Successor
5.Neighborship Table
6.Topology table
7.Routing Table

EIGRP Metric တြက္တဲ့အေႀကာင္းကိုပဲအဓိကေရးမွာျဖစ္လုိ႔ Metric တြက္ရာမွာအဓိကအေရးပါတာေလးေတြ ကိုပဲေရးပါ့မယ္။ Successor ဆိုတာသည္ Primary Route ျဖစ္ျပီး Remote Network တစ္ခုအတြက္ the best route ရွိတဲ့ path ျဖစ္ပါတယ္။Routing Table မွာ တိုက္ရိုက္ေတြ႕ရတဲ့ Route မ်ားသည္ Successor Route မ်ားျဖစ္ပါတယ္။Feasible Successor ကေတာ့ Buckup Route ျဖစ္ျပီး Topology Table ထဲမွာသိမ္းထား ပါတယ္။EIGRP က Feasible Successor 16 ခုထိသိမ္းထားေပးနိုင္ျပီး အေကာင္း ဆံုး Metric ရွိတဲ့ Route ကို Routing table ထဲသို႔ဆြဲတင္ျပီး Successor ျဖစ္လာေစပါတယ္။
Advertised Distance ကေတာ့ Neighbor Router ကေန Report လုပ္တဲ့ Remote Network ရဲ့ Metric ျဖစ္ပါ တယ္။တစ္နည္းအားျဖင့္ Neighbor Router မွသည္ target Destination network ရဲ့ cost လို႔ လည္းေျပာလို႔ရ ပါတယ္။Feasible Distance ဆိုတာကေတာ့ Local Router နွင့္ Next-hop Router မ်ားႀကားမွာရွိတဲ့ Advertised Distance မ်ားေပါင္းလဒ္ျဖစ္ျပီး EIGRP Metric လည္းျဖစ္ပါတယ္။တစ္နည္းအား ျဖင့္ Feasible Distance သည္ EIGRP Metric ျဖစ္ပါတယ္။
 
EIGRP Metric ကိုေအာက္ပါ Formula အတိုင္းတြက္ယူရမွာျဖစ္ပါတယ္။

metric = [K1 * bandwidth+(K2 * bandwidth)/(256 - load)+K3 * delay] * [K5/(reliability + K4)]
 
အထက္ပါ Topology ေလးမွ Sophia Router မွသည္ 172.16.1.0/24သို႔လည္းေကာင္း၊ 200.0.0.132/30 သို႔လည္းေကာင္း၊200.0.0.136/30 သို႔လည္းေကာင္း FD မ်ားကိုအသီးသီးတြက္ႀကည့္ ပါမယ္။Sophia မွ 200.0.0.136/30 သို႔ Sophia’s s0/0,Kaylar’s s1/1,Mable’s Lo0 Interfaces မ်ား သည္ outgoing interfaces မ်ားျဖစ္ပါတယ္။ထို႔အတူ Sophia မွ 200.0.0.132/32 Remote network အတြက္ Sophia’s s0/0 နွင့္ Kaylar s1/1 တို႔သည္ Outgoing interface မ်ားျဖစ္ပါတယ္။သက္ဆိုင္ရာ outgoing interface မ်ားကို မွင္ေရာင္မ်ားျဖင့္ highlight ျပထားပါတယ္။
ကြ်န္ေတာ္တုိ႔ Metric Formula ထဲမွာ K Value ေတြပါတယ္။အဲ့ဒါေတြကေတာ့ Metric Weight ေတြပါ။အ ခု Sophia ကေန Remote Network ေတြကို Metric တြက္မွာျဖစ္လို႔ Show ip protocol ဆိုတဲ့ command နဲ႔ K value ေတြႀကည့္နုိင္ပါတယ္။အဲ့မွာ EIGRP metric weight K1=1,K2=0,K3 =1, K4=0,K5=0 ဆိုျပီးေတြ႕ရပါ မယ္။ေအာက္ပါပံုေလးကအတုိင္းျဖစ္ပါတယ္.။

ဒါေႀကာင့္ K တန္ဖိုးေတြအစားသြင္းလုိက္ရင္ေအာက္ပါအတုိင္း Summarize ျဖစ္သြားမွာပါ

metric = bandwidth + delay 

Bandwidth ဆိုရာမွာ Remote Network သုိ႔ Outgoing Interface မ်ားစြာရွိသည့္အနက္မွ Bandwidth အနည္းဆံုး Interface ရဲ့ Bandwidth တစ္ခုကိုသာလွ်င္ယူရမွာပါ။Delay ဆိုတဲ့ ေနရာမွာေတာ့ ရွိသမွ် Outgoing Interface အားလံုးရဲ့ စုစုေပါင္းကိုယူရမွာျဖစ္ပါတယ္။Cisco Router မ်ားအတြက္ EIGRP Metric ကိုေအာက္ပါအ တုိင္းတြက္ထုတ္နုိင္ပါတယ္။

Metric={(10,000,000/slowest bandwidth in kbps)+(total delay in microsecond /10)}*256
 
Metric ကိုတြက္ဖို႔ရာ သက္ဆိုင္ရာ outgoing interface မ်ားရဲ့ Delay နဲ႔ Bandwidth ကိုသိရွိဖို႔ လိုပါတယ္။show interface interface-number command ကိုသံုးပါမယ္။ Show ip interface မဟုတ္ပါ။show interface ျဖစ္ပါ သည္။ကြာျခားခ်က္ကေတာ့ show ip interface command က Interface ေတြရဲ့ Layer3 information ေတြကို အဓိကျပတာျဖစ္ပါတယ္။အထက္ပံုေလးထဲကအတိုင္း Remote Network ရဲ့ Feasible Distance ေတြကိုတြက္ ႀကည့္ပါမယ္။

D      200.0.0.136/30  [90/2809856] via 200.0.0.130, 00:05:19, Serial0/0
D      200.0.0.140/30  [90/2809856] via 200.0.0.130, 00:05:19, Serial0/0
D      200.0.0.132/30  [90/2681856] via 200.0.0.130, 00:06:07, Serial0/0


Router       Outgoing Interface          Bandwidth(kbps)          Delay(microsecond)
Sophia            s0/0                                  1544                            20000
Kayla             s1/1                                  1544                            20000
Kayla             Lo0                               8000000                             5000
Mable            Lo0                               8000000                             5000

200.0.0.132/30 Remote Network ရဲ့ Metric ကိုတြက္ဖုိ႔ရာ Sopia ရဲ့ s0/0 နဲ႔ Kayla ရဲ့ s1/1 ဆိုတဲ့ outgoing နွစ္ခုရွိပါတယ္။နွစ္ခုလံုးက Bandwidth တူေနတဲ့အတြက္ တစ္ခုကိုပဲယူပါမယ္။သို႔ေသာ္တစ္ခု ကငယ္ေနခဲ့မယ္ဆို ရင္ငယ္တဲ့ေကာင္ကိုပဲယူပါမယ္။ Delay က်ေတာ့နွစ္ခုလံုးရဲ့ေပါင္းလဒ္ျဖစ္ပါတယ္။

Metric={(10,000,000/1544)+[(20000+20000)]/10}*256
         ={6476.683937823834+4000)*256
         ={6476+4000}*256 = 2681856
200.0.0.136/30 အတြက္ကေတာ့ Mable ရဲ့ Lo0 interface ကိုပါ Outgoing အေနနဲ႔ယူရမွာပါ။ Delay ကေတာ့ အားလံုးေပါင္းလဒ္ျဖစ္ပါတယ္။Bandwidth ကေတာ့ထံုးစံတအတိုင္းအေသးဆံုးတစ္ခုကိုပဲယူ ပါမယ္။:)

Metric = {(10,000,000/1544)+[(20000+20000+5000)/10]}*256
          = {6476.683937823834+4500}*256
          = {6476+4500}*256 = 2809856 
172.16.1.0/24 အတြက္ကေတာ့ Sophia ရဲ့ s0/0 နဲ႔ Kayla ရဲ့ Lo0 interface မ်ားက outgoing interface မ်ားျဖစ္ပါတယ္။ဒါေႀကာင့္သူ႔ရဲ႕ Metric ကိုေအာက္ပါအတုိင္းတြက္ယူနုိင္ပါတယ္။

D     172.16.2.128/26 [90/2297856] via 200.0.0.130, 00:06:51, Serial0/0
D     172.16.1.0/24 [90/2297856] via 200.0.0.130, 00:06:51, Serial0/0
D     172.16.2.64/26 [90/2297856] via 200.0.0.130, 00:06:51, Serial0/0
 
Metric = { (10,000,000/1544)+[(20000+5000)/10)]}*256
         = {6476.683937823834 + 2500}*256
         = {6476+2500}*256 = 2297856


အထက္ပါ Metric တန္ဖိုးမ်ားသည္ Interface ၏ Bandwidth ေပၚတြင္အေျခခံကာတြက္ခ်က္ထားျခင္းျဖစ္ပါ သည္။သို႔ရာတြင္လက္ေတြ႕တြင္ Manual တြက္ယူရျခင္းမ်ိဳးလည္းရွိနုိင္ပါသည္။ဥပမာအားျဖင့္ Interface Bandwidth သည္ T1(1544Kb/s) ရွိေသာ္ လည္း actual bandwidth တန္ဖိုးက 1024Kb/s ျဖစ္ေနျခင္းမ်ိဳးျဖစ္ နိုင္ပါသည္။EIGRP Metric Calculation ကို ပိုမိုအကြ်မ္း၀င္ေစရန္ ေနာက္ထပ္ Topology ပံုစံတစ္မ်ိဳးျဖင့္ EIGRP Calculation(Part-2) ကိုထပ္မံေရးသားေပးပါမည္ခင္ဗ်ား...။:)

ေလးစားစြာျဖင့္
WinTunHlaing

 

Sunday, February 19, 2012

Cisco Tunneling Basic


Network တစ္ခုေပၚမွာ Tunnel ေဖာက္တယ္ဆိုတာကေတာ့ အရွင္းဆံုး Definition ဖြင့္ရရင္ physical Network တစ္ ခုေပၚမွာ Logical Network တစ္ခုသုိ႔မဟုတ္တစ္ခုထက္ပိုေသာ Logical Network မ်ားကိုတည္ေဆာက္ျခင္းပဲျဖစ္ပါ တယ္။Tunnel တစ္ခု သို႔ တစ္ခုထက္ပို တဲ့ Tunnel ေတြကို physical Network တစ္ခုမွာတည္ေဆာက္နုိင္ပါတယ္။ Tunnel တည္ေဆာက္ရန္ အတြက္ေတာ့ Tunneling Protocol ေတြကိုသံုးရ မွာပါ။အခုေအာက္ေဖာ္ျပပါ Topology ပံုေလးထဲကအတိုင္း Basic Tunnel တစ္ခုကိုတည္ေဆာက္ႀကည့္ပါမယ္။


Topology ထဲမွာ 200.0.0.32/30,172.16.0.0/27,10.0.0.0/24,200.0.0.36/30 Network ေလးခုက EIGRP နဲ႔ Route လုပ္ထားျပီး လုပ္ထားျပီး physical links ေတြျဖစ္ပါတယ္။ဆိုလိုတာက Real Network Interface ကိုအသံုးျပဳ ထားတဲ့ Network ေတြျဖစ္ပါတယ္။ေနာက္တစ္စုျဖစ္တဲ့ 172.16.0.32/30,200.0.0.0/27, 172.16.0.64/30 Network ေတြကေတာ့ Tunnel ေပၚကေနတစ္ဆင့္ Route လုပ္မွာပါ။

Sophia Router Configuration
Mable Router Configuration
Kayla Router Configuration

အခုဆိုရင္ Mabel၊Sophia နဲ႔ Kayla Router သံုးလံုးကို EIGRP Routing Protocol ျဖင့္ခ်ိတ္ဆက္ထားျပီး Router တစ္လံုးနဲ႔တစ္လံုး ping လုပ္လို႔ရေနမွာပါ။အခု Mable နဲ႔ Kayla Router ႏွစ္လံုးကို Basic Logical Tunnel Network တည္ေဆာက္ႀကည့္ပါမယ္။Tunnel Network တစ္ခုတည္ေဆာက္ရန္အနည္းဆံုးေတာ့ Physical Network တစ္ခု ရွိေနရမည္ျဖစ္ျပီး 200.0.0.0/32 သည္ Logical Tunnel အတြက္ Subnet ျဖစ္ပါတယ္။ထို႔ေႀကာင့္ Topology ပံုအရ...


Router Tunnel Physical Interface Tunnel Source Address Tunnel Destination Address
Mabel s0/0 200.0.0.1 10.0.0.2
Kayla s1/0 200.0.0.2 172.16.0.2

Tunnel Configuration on Mable Router
Tunnel Configuration on Kayla Router




Saturday, February 11, 2012

OSPF Authentication


Authentication လုပ္တယ္ဆိုတာ Traffic ေတြကိုပိုျပီး Secure ျဖစ္ေအာင္လုပ္ျခင္းပဲျဖစ္ပါတယ္။Network ေပၚက traffic ေတြဟာ Authentication လုပ္ထားခဲ့ရင္ ပံုမွန္ထက္စာလွ်င္ေတာ့ပိုလံုျခံဳမွာပါ။Authentication လုပ္တယ္ဆို တဲ့ေနရာမွာလည္း အမ်ိဳးမ်ိဳးရွိပါတယ္။အခုဒီမွာေတာ့ Network Level Authentication ျဖစ္ပါတယ္။


အေပၚကပံုေလးအတိုင္း OSPF Topology ကို Authentication လုပ္မွာပါ။ ေနာက္ျပီးဒီမွာ VLSM သေဘာတ ရားေလးလည္းအနည္းငယ္ထည့္ထားပါတယ္။ဘာလို႔လဲဆိုေတာ့အခ်ိဳ႕ခ်ိဳ႕ေသာ ညီမငယ္၊ညီငယ္ေလးေတြ VLSM နဲ႔ CIDR ကိုမသဲကြဲဘူးျဖစ္ေနလို႔ပါ။နွစ္ခုလံုးက Class Full မဟုတ္တာေတာ့မွန္ပါတယ္။Subnet ႀကီးတစ္ခုကို Split လုပ္တဲ့အခါမွာ Class Full မဟုတ္ခဲ့ရင္ CIDR ျဖစ္ပါတယ္။သို႔ေသာ္ CIDR တိုင္း Variable Length ျဖစ္ခ်င္မွျဖစ္မွာ ပါ။အေပၚက Topology ပံုထဲမွာ 201.0.0.0/24 ဆိုတဲ့ Subnet ႀကီးကို 201.0.0.0/26 တစ္ခု၊201.0.0.128/30 201.0.0.132/30,201.0.0.136/30 ဆိုျပီးယူသံုးထားပါတယ္။အေသးစိတ္တြက္ပံုကိုေတာ့ ေအာက္မွာျပထားပါ တယ္။

  Network       Subnet Mask                                Binary Form                                   CIDR
 201.0.0.0     255.255.255.0       11111111.11111111.11111111.00000000           /24

အထက္က Network ကို ေအာက္ကပံုစံ အတုိင္း Split လုပ္လုိ္က္ပါမယ္။(*) ျပထားတဲ့ Split Subnet ေတြကိုပဲ Topology မွာသံုးမွာပါ။က်န္တာေတြကေတာ့ Reserve ေပါ့။

  Network        Subnet Mask                          Binary Form                                      CIDR
* 201.0.0.0      255.255.255.192      11111111.11111111.11111111.11000000   /26
   201.0.0.64    255.255.255.192      11111111.11111111.11111111.11000000   /26
* 201.0.0.128  255.255.255.192      11111111.11111111.11111111.11000000   /26
   201.0.0.192  255.255.255.192      11111111.11111111.11111111.11000000   /26

အေပၚမွာ(*) mark ျပထားတဲ့ Subnet ေတြထဲကမွ 201.0.0.0/26 ကို Routing လုပ္ရာမွာသံုးျပီး 201.0.0.128/26 Subnet ကိုေတာ့ ေအာက္မွာျပထားတဲ့ပံုစံအတိုင္းထပ္ခြဲပါအံုးမယ္။အဲ့ထဲကမွ (*) mark ျပထား တဲ့သံုးခုကိုပဲ Loopback အတြက္သံုးမွာျဖစ္ျပီးက်န္တာေတြကေတာ့ Reserve အေနနဲ႔ပဲထားလိုက္မွာပါ။ISP မွာ လိုအပ္ခ်က္အရ public IP ေတာင္းခံခဲ့ရင္လည္းအဲ့လိုမ်ိဳး Reserve လုပ္ထားတဲ့ Address ေတြထဲကပဲေပးတာျဖစ္ ပါတယ္။

        Network         Subnet Mask                           Binary Form                                   CIDR
      201.0.0.128  255.255.255.192      11111111.11111111.11111111.11000000            /26

     Network         Subnet Mask                         Binary Form                                       CIDR
 * 201.0.0.128    255.255.255.252      11111111.11111111.11111111.11111100            /30
 * 201.0.0.132    255.255.255.252      11111111.11111111.11111111.11111100            /30
 * 201.0.0.136    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.140    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.144    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.148    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.152    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.156    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.160    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.164    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.168    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.172    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.176    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.180    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.184    255.255.255.252      11111111.11111111.11111111.11111100            /30
   201.0.0.188    255.255.255.252      11111111.11111111.11111111.11111100            /30


အေပၚကပံုေလးမွာ OSPF Routing Process အသက္၀င္ေနပါျပီ။သို႔ေသာ္ Authentication တာ့မလုပ္ထားေသးပါ။
OSPF Routing ကို Authentication လုပ္မယ္ဆိုရင္ OSPF Authentication Password လိုအပ္မွာျဖစ္ပါတယ္။ ဒီေနရာမွာေတာ့ Topology ထဲမွာကအတိုင္းပဲသံုးမွာပါ။။Topology မွာ Router သံုးလံုးရွိတဲ့အနက္ Nika နဲ႔ Mabel ဆိုတဲ့ Router ႏွစ္လံုးႀကားက Link ကို Authentication အရင္လုပ္ပါမယ္။သက္ဆိုင္ရာ Interface ထဲကို၀င္ျပီး Interface Configuration Mode မွာ Configure လုပ္ရမွာပါ။ေအာက္ပါပံုစံအတုိင္းျဖစ္ပါတယ္။

Nika(config)#interface serial s1/0                                //entering to the serial 1/0 interface
Nika(config-if)#ip ospf authentication message-digest   //set the authentication
Nika(config-if)#ip ospf authentication-key BabyLay       //set the authentication password


အေပၚကပံုေလး မွာ Nika Router ကို MD5(message digest 5) နဲ႔ Authenticate လုပ္ထားတာပါ။သို႔ေသာ္တ ဖက္ Neighbor Router မွာ Configure မခ်ရေသးမီ(confirm) မျဖစ္မီမွာ Routing Process ဟာခဏတာ Down သြားမွာပါ။ေနာက္တစ္ဆင့္ကေတာ့ Neighbor Router ျဖစ္တဲ့ Mabel မွာ Configure ခ်ရမွာပါ။။ေအာက္ပါအတိုင္း ပဲျဖစ္ပါတယ္။

Mable(config)#interface serial s0/0                              //entering to the serial 0/0 interface
Mable(config-if)#ip ospf authentication message-digest        //set the authentication
Mable(config-if)#ip ospf authentication-key BabyLay         //set the authentication password


အထက္ပါအတိုင္း Confirm ျဖစ္ျပီးေနာက္မွာ Routing Process ဟာတစ္ဖန္အသက္ျပန္၀င္လာမွာပါ။သို႔ေသာ္ MD5 နဲ႔ Authenticate လုပ္ထားတဲ့ Secure Connection ျဖစ္ေနပါျပီ။က်န္တဲ့ connection တစ္ဖက္ကိုလည္း အထက္ပါအတိုင္းပဲ Configure ခ်ေပးရမွာပါ။Authentication Password ပဲကြာပါလိမ့္မယ္။က်န္တာကေတာ့ အတူတူပဲျဖစ္ပါတယ္။

ေလးစားစြာျဖင့္
Win Tun Hlaing