What is Software Define Networking – Part1 (Install OpenDayLight on Ubuntu)

825

ဒီနေ့ တွေးမိတာလေးရှိတယ်ဗျာ့ ခုဆို ကိုဗစ်နဲ့..မို့  အိမ်မှာနေရင်းနဲ့ Challenge လေးတွေလုပ်နေတာကို မြင်တော့ .. 

အိမ်မှာနေရင် ကမ္ဘာကြီးကို ကယ်တင်နေတဲ့ ညီ/ညီမတွေ skillတိုးဖို့ WFH လုပ်နေရတော့ အရင်ကထက် အချိန် နည်းနည်းပိုမယ်လို့ ယူဆပြီး ကိုယ်တွေ နည်းပညာပိုင်းအတွက် လဲ Challenge လေးတစ်ခုလုပ်ချင်ပါတယ်ဗျာ။  

အဲ့ချဲလန့်လေးကတော့ Technical (eg, arduion, raspberry pi, Network, Linux,etc,..)ပိုင်းနဲ့ ပါတ်သက်တဲ့ Document/Guide လေးတွေ ရေးပေးပြီး .. နောက်ထပ် လူ ၄ ယောက်ကို Tag တွဲပြီး ရေးဖို့ challenge လုပ်ဖို့ပါပဲ .. အိမ်နေရင် နားနေမယ့် ကလေးတွေလဲ  Skill တက်တာပေါ့ဗျာ.. Challenge လုပ်ရင်း ရေးဖို့ကတော့ အောက်ကစာသားလေးကို ကူးပေးလို့ရပါတယ် ခင်ဗျာ့ ။။

*************************************************************************************************************

Hello ကျွန်တော် ခန်ဖြိုး ကနေပြီးတော့ အိမ်မှာနေရင် ကမ္ဘာကြီးကို ကယ်တင်နေတဲ့ ညီ/ညီမတွေ skill improve ဖို့ အတွက် .. နည်းပညာပိုင်း Challenge လေးကို ကျွန်တော့် accept လုပ်တဲ့ အနေနဲ့.. What is Software Define Networking ဆိုတဲ့ Topic လေးရေးထားပါတယ်ဗျာ.. ကျွန်တော် ချဲလန့်လုပ်ချင်တဲ့ Bro တွေကတော့ ko Thiha Thit, ko – Ko Ko Ye, ko Han Hgwe Htun, ko Htin Linn Aye တို့ ပဲဖြစ်ပါတယ် Accept လုပ်ဖြစ်တယ်ဆိုရင်တော့ Topic တစ်ပုဒ်ရေးပြီး နောက်ထပ် ထပ် သင့်အကောင့်ထဲ က သူငယ်ချင်း ၄ ယောက်ကို  Tag ပေးပါဗျာ့ .. 

One day, you’ll leave this world behind. 

So live a life you will remember. ^_^

*************************************************************************************************************
PDF Download (Please download with Chrome Browser)

ခုကျွန်‌တော်ပြောပြချင်တဲ့ အကြောင်းအရာလေးကတော့  SDN (Software Define Networking) ဆိုတာကို ရှင်းပြပေးမှာပါပဲဖြစ်ပါတယ်။။အရင်ခေတ် Tradition Router/Switch device (ခုလက်ရှိလဲ industry မှာ သုံးနေဆဲပါ) တွေမှာဆို Control Plane နဲ့ Data Plane ရှိနေတယ်ဆိုတာကို သိနေရပါမယ်။ 

Control Plane  ဆိုတာက Packet တွေရဲ့ Destistation ကိုကြည့်ပြီး ဘယ်ကိုပို့ရမယ် ဘယ်ကနေ သွားရမယ် ဆိုတာကို MAC address Table, Routing Table စတာတွေကို ကြည့်ပြီး ဆုံဖြတ်ရပါတယ်။ အဲ့လို့ ဝင်လာတဲ့ Packet တွေ သက်ဆိုင်ရာ လမ်းကြောင်းကို ပို့ဖို့အတွက် ဆုံဖြတ်ချက်ကို Control Plane က တာဝန်ယူ လုပ်ဆောင်ပေးပါတယ်။ 

အဲ့လို Control plane ရဲ့  Decision ကို လိုက်ပြီး သက်ဆိုင်ရာ Route လမ်းကြောင်းတွေကို ပို့ဖို့အတွက် Data Planeက တာဝန်ယူပြီး ပို့ဆောင်ပေးပါတယ်.. Control Plane သည် Intelligent ရှိတဲ့ Braine နဲ့ အလားတူပါတယ် သူက လုပ်ရမယ့် decision တွေ ချပေးပါတယ်.. Control Plane ချပေးတဲ့ Decision တွေအတိုင်း Data Planeက သက်ဆိုင်ရာ Route လမ်းကြောင်းအတိုင်း  Forward လုပ်ပေးပါတယ် ရမယ်‌နော့် 😉 

  • Data plane refers to all the functions and processes that forward packets/frames from one interface to another.
  • Control plane refers to all the functions and processes that determine which path to use. Routing protocols, spanning tree, ldp, etc are examples.

 ကျွန်တော်တို့ Networking Field ထဲမှာဆို အရင်တုန်းက Device (Router, Switch, etc,..) တွေသည် စက်ထဲမှာ Control Plane + Data Plane (Hardware base) အတူတစ်ကွ အလုပ် လုပ်ကျတယ်ဆိုတာကို သဘောပေါက်မယ်လို့ ယူဆပြီး ဆက်လိုက်ကျရအောင်နော့ 

ခုဒီဘက်ခေက်မှာစပြီး သုံးနေကျတဲ့ SDN (Software Define networking) ရဲ့ ရည်ရွယ်ချက်ကတော့ Control + Data – Plane ဖြစ်နေတာကို Control Plane ကို သတ်သတ်ခွဲထုတ်ပြီး Centralize ဖြစ်အောင် Controler (Eg, OpenDay Light, HPE VAN,etc,..) တစ်နေရာထဲကနေ ထိန်းချုပ် ဆုံးဖြတ်ပေးဖို့ ပဲဖြစ်ပါတယ်။ DataPlane ကတော့ စက်မှာကျန်ခဲ့မှာပါ။ OpenDayLight (ODL) controller ကိုသုံးပြီးတော့ ရှင်းပြပေးသွားမှာပါ.. Open Source ဖြစ်ပြီး GNS3/Ubuntu မှာ အလွယ်တစ်ကူ Setup လုပ်လို့ရတာမို့.. Hand-on လုပ်ရင်း Theory concept လေးမိသွားအောင်လို့ပါ။ 

အဲ့အတွက် Controller ဆီက information ရဖို့.. Controller နဲ့ ဆက်သွယ်ဖို့ Protocol တစ်ခုလိုပါတယ်.. Controller သည် Openflow ဆိုတဲ့ communication Protocol ကို Standard အနေဲ့သုံးပြီး OpenFlow support ရတဲ့  Devices (Router/Switch) တွေကို OF protocol ကနေတစ်ဆင့် ဆက်သွယ်ပါတယ်။ Hand-on Pritice လုပ်တဲ့ အချိန်ကျ GNS3 မှာ openvSwitch (OVS) တွေကို သုံးပါမယ်

နောက်ထပ် သိရမယ့် Term တစ်ခုကတော့ OpenvSwitch (OVS) ပဲ ဖြစ်ပါတယ်။ OVS ဆိုတဲ့ သူ့နာမည်အတိုင်းပဲ Virtualization သုံးတဲ့ Virtual switch ပါ Apache 2 license အောက်မှာရှိတဲ့ Open Source Project တစ်ခုဖြစ်ပါတယ်။ OVS ကို Network automation တွေလုပ်ဖို့ Design လုပ်ထားတာပါ။ NetFlow, sFlow, IPFIX, RSPAN, CLI, LACP, 802.1ag စတဲ့ protocol တွေကို Support လုပ်ပါတယ်ဗျာ့။

For more Detail >> https://superuser.openstack.org/articles/openvswitch-openstack-sdn/ Plz read it 😉 

ခုထိ ပြောနေတဲ့ OpenFlow (OF), Controller (Eg, OpenDayLight), OpenvSwitch ဆိုတာ SDN မှာဆို southbound လို့ခေါ် တဲ့အပိုင်းဘက်ခြမ်းကို ပဲ ပြောပြရသေးတာပါ… အခေါ်အဝေါ်အသစ် တွေက များတယ် ဆိုပြီး စိတ်မရှုတ်သွားပါနဲ့.. ဖြေးဖြေးချင်း လေ့လာ ကျပါဆို့။ 

ခုပုံမှာဆိုရင် South နဲ့ North သည် မြေပုံလိုပါပဲ အပေါ်ဘက် North ဖြစ်ပြီး အောက်ဘက်ကတော့ South ပဲဖြစ်ပါတယ်။ South ရဲ့ Function သည် physical device တွေ Virtaul node တွေနဲ့ applies လုပ်ဖို့ဖြစ်ပြီး North Bound ကတော့ ‌REST APIs (Application Programming Interface) တွေကိုသုံးပြီး Design (depent on industry requirement) ပေါ်မှာမူတည်ပြီးတော့ business or operations support systems (BSS/OSS) Application တွေအတွက် အလုပ်လုပ်ပါတယ်။

Theory ပြောတာခန နားပြီး Hand lab လုပ်ဖို့ လိုအပ်ချက်ထဲက တစ်ခုဖြစ်တဲ့ ODL (OpenDayLight controller) ကို Setup လုပ်ကြည့်ကျပါစို့။ 

ပထမဆုံး http://releases.ubuntu.com/16.04/ ကနေပြီးတော့ Ubuntu 16.04 (LTS) ကို ဒေါင်းပါပြီး Virtual machine အနေနဲ့ Install လုပ်ပါ။

ODL သည် java base ဖြစ်တာမို့ Java ကို install လုပ်ပေးဖို့ လိုပါတယ် အောက်ပါ command အတိုင်း terminal မှာ ရိုက်ပြီး install လုပ်ပါ။

sudo apt-get install default-jre-headless

အဲ့နောက်မှာတော့ Java path လမ်းကြောင်း ပေးဖို့အတွက် .bashrc ရဲ့ အောက်ဆုံးမှာ အောက်ပါ စာကြောင်းလဲ ထည့်ပေးလိုက်ပါဗျာ.. မထည့် ပဲ termial မှာပဲ  Run မယ်ဆိုရင် tempory အနေနဲ့ပဲ ဝင်သွားမှာပါ အဲ့ကြောင့် permenet ဖြစ်အောင် လို့ ~/.bashrc မှာ ထည်ပေးလိုက်တာပါ။

export JAVA_HOME=/usr/lib/jvm/default-java

.bashrc မှာ ထည့်ထားတဲ့ ကောင်လေးအလုပ် လုပ်ဖို့ အောက်ပါ command လေး Run ပေးပါ..  Source သည် file မှာ ရှိနေတဲ့ content တွေကို execute လုပ်ပေးတဲ့ command လေးမို့ updateဖြစ်အောင် run ပေးမှ JAVA_HOME ကို သိသွားမှာပါ။

  • source is a bash shell built-in command that executes the content of the file passed as argument, in the current shell.

source ~/.bashrc

အဲ့နောက် wget နဲ့ tar.gz ဖိုင်လေးကို ဒေါင်းလုတ်ဆွဲပါ။

wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.4.0-Beryllium/distribution-karaf-0.4.0-Beryllium.tar.gz

ဒေါင်းပြီးသွားရင်တော့ ရလာတဲ့ tar.gz လေးကို အောက်ပါ command ဖြင့် Extractလုပ်ပါ။

tar -xvf distribution-karaf-0.4.0-Beryllium.tar.gz

အောက်ပါ command ကိုသုံးပြီးတော့ ODL (OpenDayLight) ကို စပြီး run နိုင်ပါပြီ။ 

./distribution-karaf-0.4.0-Beryllium/bin/karaf ဆိုပြီးတော့ karaf ကို လှမ်းပြီး run လိုက်တာပါ

ODL serverအတွက် Basic Setup တော့ပြီးသွားပါပြီ အဲ့နောက် လိုအပ်တဲ့ additional feature လေးတွေကို ထပ်ထည့်ဖို့ အောက်ပါ command ကို run ပါ။

opendaylight-user@root> feature:install odl-restconf odl-l2switch-switch odl-mdsal-apidocs odl-dlux-all

  • odl-restconf – feature for restconf protocol support for OpenDaylight users
  • odl-l2switch-switch – feature which gives layer 2 learning switch functionality to controller
  • odl-l2switch-switch – feature for api documentation
  • odl-dlux-all – GUI for OpenDaylight

ODL ထဲကို လှမ်းဝင်ဖို့ VM ရဲ့ IP ကို ifconfig နဲ့ စစ်ကြည့်ပါ။

စစ်ကြည့်လိုက်တဲ့ အခါမှာ IP သည်  192.168.57.3 နဲ့ ရှိနေတာကို တွေရပါတယ်။ web browser ကနေလှမ်းဝင်ရင် Port  8181 ကို သုံးပြီး ODL ကို လှမ်းပြီး access လုပ်ပါမယ်၊

Username – admin, password – admin နဲ့ ဝင်လိုက်ရင် controller ထဲကိုရောက်သွားပါ လိမ့်မယ်။ အဲ့တာဆိုရင်တော့ odlကို Ubuntu မှာ အောင်အောင် မြင်မြင်နဲ့ install လုပ်ပြီးသွားပါပြီ။… Part2 ကျရင်တော့ openflow သုံးပြီး control လုပ်တာ.. Mininet သုံးပုံသုံးနည်း command တွေကို ဆက်ပြီး ပြောပါပေးမှာပဲ ဖြစ်ပါတယ်။

Relative – Linux commands “cheat sheet”
https://www.pcwdld.com/linux-commands-cheat-sheet

Happy_Learning_at_Stay_Home ^_^

With Best Regards,

Core Network Team Leader @Ericsson Myanmar

Khant Phyo