စဥ္းစားမႈမပါဘဲ သင္ယူေသာ ပညာသည္ အခ်ည္းႏွီးျဖစ္၍ ၊ ပညာမရွိဘဲ စဥ္းစားျခင္းကား အလြန္ အႏၱရာယ္ၾကီးေပသည္။ (ကြန္ျဖဴးရွပ္)

Sunday, October 23, 2011

OSPF Topology in GNS3

မူရင္း  Win Tun Hlaing

Gns3မွာ OSPF Topology ေလးတစ္ခုလက္ေတြ႕လုပ္ႀကည့္ပါမယ္။ေအာက္ကပံုေလးက Topology simple ပံုေလးပါ။


ပံုေလးမွာ Router 3 လံုးသံုးထားပါတယ္။ပီးေတာ့ OSPF ကို multi-area ထားပါမယ္။ပီးေတာ့ Telnet နဲ႔ Remote ကေနလွမ္းပီး Configure လုပ္လို႔ရေအာင္ပါတစ္ခါတည္းလုပ္ပါမယ္။R1 ကို 2961series,R2 ကို 3600 series နဲ႔
R3 ကို 3700 series အသီးသီးသံုးပါမယ္။အခု Topology မွာ Serial link ေတြပါေနတာေႀကာင့္ အဲ့ဒီ serial link ေတြအတြက္ NM-4T ဆိုတဲ့ Module ကိုသံုးပါမယ္။ေနာက္ပီးကြ်န္ေတာ့္ရဲ့ပံုထဲမွာ Ethernet ေတြလည္းပါ
ပါတယ္။ဒါေႀကာင့္အဲ့အတြက္လည္း Ethernet Module ေတြလိုပါတယ္။ဒီမွာတာ့ GT96100-FE နဲ႔  NM-1FE-TX  နွစ္ခုထဲကႀကိဳက္တာသံုးလို႔ရပါတယ္။ကြ်န္ေတာ္ကဒီေနရာမွာ Interface Module ေတြ အေႀကာင္း ကိုေျပာ ခ်င္တာမ်ိဳးမဟုတ္ပဲ Topology ေလးကို Gns3 မွာအသံုးခ်ပံုကိုပဲအဓိကေျပာခ်င္တာပါ။ Nework  Module Interface ေတြနဲ႔ပတ္သတ္ပီးအေသးစိတ္ေလ့လာခ်င္ရင္ cisco website မွာေလ့လာလုိ႔ရပါ တယ္။NM-4T အတြက္ ဒီေနရာ ေလးမွာေလ့လာလို႔ရပါတယ္။

အေပၚကပံုေလးကေတာ့ Router ရဲ့ Module ေတြပဲျဖစ္ပါတယ္။အားလံုးပီးသြားရင္ကြ်န္ေတာ္တို႔ Router ေတြ ကို Power ႏိုးပါမယ္။Idle PC value Apply လုပ္ပါမယ္။အဲ့ဒါေတြကေတာ့ Gns3 Configuration ခ်ပံုမွာပါပီးပါျပီ။
 အေပၚကပံုေလးကေတာ့ Router R2 ကို Power ႏိုးထားတဲ့ပံုပါ။Router အားလံုး Power On ျပီးသြာင္းရင္ ပထမ ဆံုး Interface အသီးသီးကို Topology ပံုမွာပါတဲ့သက္ဆိုင္ရာ IP ေတြေပးပါမယ္။ပီးရင္ Router အသီးသီးကို Telenet နဲ႔ Enable Secret တို႔ကိုအသီးသီး Configure ခ်ပါမယ္။ေအာက္ကပံုေလးက Router1 ကို Configure
 ခ်ထားတဲ့ပံုပါ။
Router အသီးသီးရဲ့ Configure ခ်ပံုေတြကိုေအာက္မွာေရးေပးထားပါတယ္။
For Router1,
Router>enable                                                                    //enter the priviliage mode
Router#configure terminal                                                  //enter the configuration mode
Router(config)hostname R1                                               //setup host name to Router
R1(config)interface fastethernet0/0                                    //enter into the fast ethernet interface
R1(config-if)ip address 192.168.10.1 255.255.255.0     //setup the ip address to the fast ethernet  interface
R1(config-if)no shutdown                                              //start the interface into up
R1(config-if)interface serial1/0                                      //enter to the serial interface
R1(config-if)ip address 10.10.10.1 255.255.255.0       //setup the ip address to the interface
R1(config-if)clock rate 64000                                      //setup the clock rate for DTE
R1(config-if)no shutdown                                            //start the serial interface into up
R1(config-if)interface lo0                                             //start the look back interface
R1(config-if)ip address 1.1.1.1 255.255.255.0           //setup the look back interface ip address
R1(config-if)exit                                                         //exit from interface mode

R1(config)username HninSi password Rose               //setup the User name and password to login
R1(config)enable secret 1234                                   //setup the enable secret for Router
R1(config)line vty 0 15                                             //enter the virtual terminal line
R1(config-line)login local
R1(config-line)end                                                   //exit from the line
R1#write memory                                                   //saving configurations to the NVRAM

For Router2,
Router>enable                                                                     //enter the priviliage mode
Router#configure terminal                                                    //enter the configuration mode
Router(config)hostname R2                                                //setup host name to Router
R2(config)interface fastethernet0/0                                     //enter into the fast ethernet interface
R2(config-if)ip address 192.168.30.1 255.255.255.0        //setup the ip address to the fast ethernet  interface
R2(config-if)no shutdown                                                 //start the interface into up
R2(config-if)interface serial1/0                                         //enter to the serial interface
R2(config-if)ip address 10.10.10.2 255.255.255.0         //setup the ip address to the interface
R2(config-if)no shutdown                                               //start the serial interface into up
R2(config-if)interface serial1/1                                       //enter to the serial interface
R2(config-if)ip address 172.16.0.1 255.255.255.0        //setup the ip address to the serial interface
R2(config-if)clock rate 64000                                       //setup the clock rate for DTE
R2(config-if)no shutdown                                             //starting the serial interface into up
R2(config-if)interface lo0                                             //start the look back interface
R2(config-if)ip address 2.2.2.2 255.255.255.0           //setup the look back interface ip address
R2(config-if)exit                                                         //exit from interface mode
R2(config)username Sabae password jasmine            //setup the User name and password to login
R2(config)enable secret asdfg                                   //setup the enable secret for Router
R2(config)line vty 0 15                                             //enter the virtual terminal line
R2(config-line)login local
R2(config-line)end                                                   //exit from the line
R2#write memory                                                   //saving configurations to the NVRAM


အေပၚကပံုေလးကေတာ့ Router3 ကိုConfigure ခ်ထားပံုေလးပါ။Configuration ခ်တဲ့ေနရာမွာပထမဆံုးအေန ကေတာ့ Router ရဲ့ Console ကေန၀င္ပီးခ်ေပးရမွာျဖစ္ပါတယ္။ေနာက္အႀကိမ္မ်ားမွာေတာ့ Telnet ကေနလွမ္း configure လို႔ရပါျပီ။ပီးရင္ကိုယ္ IP ေပးထားတဲ့ Interface ေတြရဲ့အေျခေနေလးကိုတစ္ခ်က္ေလာက္ျပန္ႀကည့္ ႀကည့္ပါမယ္။ေအာက္ကပံုေလးကေတာ့ Interface ေတြရဲ့ Status ေတြကိုျပန္ႀကည့္ထားတဲ့ပံုပါ။



လက္ရွိအေျခေနထိ Network ေတြကို Route မလုပ္ရေသးပါဘူး။ဒါေႀကာင့္ Direct ျဖစ္ေနတဲ့ Network ရဲ့ Interface IP ကလြဲရင္ က်န္တဲ့ Remote Network ရဲ့ Interface IP ေတြကို ping လုပ္လို႔ရမွာမဟုတ္ပါ။ဆိုလိုတာ က Router1 ကေန 10.10.10.2 ကို ping လုပ္လို႔ရပါမယ္။ဘာလို႔လဲဆိုေတာ့ Direct Network ျဖစ္ေနလို႔ပါ။အခု telnet နဲ႔၀င္ရင္လည္း Direct Network ရဲ့ Interface ကေနတစ္ဆင့္ပဲ၀င္ရမွာျဖစ္ပါတယ္။ဘာလို႔လဲဆိုေတာ့ Route မလုပ္ရေသးလို႔ပါ။Route လုပ္ပီးရင္ေတာ့ ႀကိဳက္ရာ Remote Network ရဲ့ InterfaceIP ကေန၀င္လို႔ရပါျပီ ဒါဆိုရင္အခု OSPF နဲ႔ Route လုပ္ပါမယ္။Router1 ကေနပဲက်န္တာေတြအကုန္လံုးကို telnet နဲ႔ Configure လုပ္ ပါမယ္။ေအာက္မွာ Configure လုပ္တဲ့ Command ေလးေတြပါ။

For Routing,

R1>en
R1#config t
R1(config)router ospf 1
R1(config-router)net 192.168.10.0 0.0.0.255 area 0
R1(config-router)net 10.10.10.0 0.0.0.255 area 0
R1(config-router)net 1.1.1.0 0.0.0.255 area 0
R1(config-router)end
R1#wr
R1#telnet 10.10.10.2
Trying 10.10.10.2

User Access Vertification
Username:Sabae
Password:jasmine
R2>en
Password:asdfg
R2#config t
R2(config)router ospf 1
R2(config-router)net 10.10.10.0 0.0.0.255 area 0
R2(config-router)net 172.16.0.0 0.0.0.255 area 1
R2(config-router)net 2.2.2.0 0.0.0.255 area 0
R2(config-router)net 192.168.30.0 0.0.0.255 area 0
R2(config-router)end
R2#wr
R2#telnet 172.16.0.2
Trying 172.16.0.2

User Access Vertification
Username :Chary
Password : flower
R3>en
Password:ilu123
R3#config t
R3(config)router ospf 1
R3(config-router)net 172.16.0.0 0.0.0.255 area 1
R3(config-router)net 3.3.3.0 0.0.0.255 area 1
R3(config-router)net 192.168.50.0 0.0.0.255 area 1
R3(config-router)end
R3#wr

 အခုဆိုရင္ Router ေတြအားလံုးကို Telnet ကေနတစ္ဆင့္ OSPF Routing ကို Configure ခ်ျပီးပီျဖစ္ပါတယ္။ျပီး ရင္ Routing table ေတြရဲ့အေျခေနေတြ၊Interface ေတြရဲ့အေျခေနေတြ၊Neighbor Router ေတြရဲ့အေျခေနသည္ တို႔ ကိုျပန္လည္ check up လုပ္နုိင္ပါတယ္။လိုအပ္ရင္ telnet ကေနတစ္ဆင့္ပဲ configure ခ်နိုင္ပါတယ္။
ေအာက္ကပံုကေတာ့ Router ေတြရဲ့ Routing Table Statue ကိုႀကည့္ထားတဲ့ပံုပါ။အဲ့ေနရာမွာတကယ့္လက္ေတြ႔ မွာဆိုရင္ေတာ့ Router အားလံုးရဲ့ status ကိုတစ္ခါတျပိဳင္တည္းႀကည့္ခ်င္တယ္ဆိုရင္ telnet နဲ႔မွပဲရမွာပါ။ ဒီမွာတာ့ simulation လုပ္ေနတာျဖစ္လို႔ computer တစ္လံုးတည္းကေနတစ္ျပိဳင္တည္းႀကည့္နုိင္ပါတယ္။




အေပၚကပံုကေတာ့ Router ေတြရဲ့ Interface အသီးသီး ကို telnet ကေနတစ္ဆင့္ႀကည့္ထားတဲ့ပံုပါ။ဒီေနရာမွာ OSPF Routing Information ေတြကိုျပန္ႀကည့္တဲ့ command ေတြထဲကမွအသံုးမ်ားတာေတြကိုေအာက္မွာေေရး ထားေပးပါတယ္။
R1#show ip ospf interface s0/0
R1#show ip ospf neighbor
R1#show ip protocol
R1#show ip route
R1#show ip ospf database

အထက္ပါ command မ်ားအနက္ show ip route command သည္ routing table ကိုႀကည့္ေသာ command ျဖစ္ပီး အျခားေသာ Routing Protocol မ်ားတြင္လည္းအသံုးျပဳနိုင္ေပသည္။show ip ospf neighbor သည္ neighbor router မ်ား၏ adjacency state ကိုႀကည့္ရွုေသာ command ျဖစ္သည္။


အထက္မွပံုမွာ sh ip ospf interface နွင့္ sh ip neighbor တို႔ကို အသံုးျပဳထားပံုျဖစ္သည္။sh ip ospf interface command ဟာဆိုရင္ Interface IP address,Area Assignment,Process ID,Router ID,Network type,Cost Priority,DR/DBR election information,Hello and Dead timer intervals,Adjacent neighbor information တို႔ကိုျပ သေပးပါတယ္။အခုဒီပံုမွာ R2 ဟာ OSPF Topology အရ Area border Router ျဖစ္ပါတယ္။ကြ်န္ေတာ့္အေနနဲ႔ Topology သေဘာကိုေျပာခ်င္တာမ်ိဳးမဟုတ္ပဲ Gns3 မွာ OSPF Topology တစ္ခုကိုဘယ္လို apply လုပ္တယ္ ဆိုတာကိုပဲေျပာခ်င္တာျဖစ္ပါတယ္။အခုဟာက simulation လုပ္ေနတာျဖစ္လုိ႔ လက္ေတြ႕နဲ႔ေတာ့အနည္းငယ္ ကြဲလြဲပါတယ္။သုိ႔ေသာ္လည္း cisco ios image အစစ္ေတြကို emulate လုပ္ထားတာမို႔အစစ္နည္းပါးအတိုင္း function ေတြကိုအသံုးခ်လို႔ရေစပါတယ္။ေနာက္မ်ားအခ်ိန္ရရင္ အျခားေသာအေႀကာင္းရာမ်ားျဖစ္တဲ့ Access List တည္ေဆာက္ပံုတို႔၊NAT တုိ႔ Virtual LAN စသည္တို႔ကိုလည္းGns3 ေပၚမွာဘယ္လို apply လုပ္တယ္ဆို တာေရးေပးပါအံုးမယ္။

ေလးစားစြာျဖင့္
Win Tun Hlaing
Related Posts Plugin for WordPress, Blogger...