Thursday, November 10, 2011

EIGRP Topology Using SSH in Gns3 via Ubuntu Linux

 SSH ဆိုတာကေတာ့ Secure Shell ျဖစ္ပါတယ္။သူ႔ရဲ့အလုပ္လုပ္ပံုနဲ႔ရြယ္ရြယ္ခ်က္ကေတာ့ Telnet နဲ႔ generally တူ ပါတယ္။Remote Device ေတြကို Monitoring လုပ္ဖို႔အတြက္ပါပဲ။သူလည္း Application Layer မွာအလုပ္ လုပ္တာ ပါပဲ။ဒါေပမယ့္ Presentation Layer နဲ႔နီးပါတယ္။Application, touching on Presentation လို႔ေျပာ ရမွာပါ။Telnet နဲ႔အ ဓိကဘာကြာလဲဆိုရင္ Telnet က Data ေတြကို Plain Text နဲ႔ transmit လုပ္ေနခ်ိန္မွာ Secure Shell(SSH) ကေတာ့ encrypt နဲ႔သြားပါတယ္။SSH က Port 22 နဲ႔အလုပ္လုပ္ပါတယ္။အခု EIGRP Topology တစ္ခုကို Gns3 မွာ SSH ကိုသံုးျပီး configuration လုပ္ႀကည့္တာေပါ့။


အေပၚကပံုေလးကေတာ့ Topology Simple ပံုေလးပါ။ကြ်န္ေတာ္တို႔က SSH ကေန Routing ကို Configure ခ် ခ်င္တာျဖစ္လုိ႔အရင္ဆံုး SSH ကို Enable ျဖစ္ေအာင္လုပ္ရပါမယ္။အဲ့ေနရာမွာ Telnet နဲ႔မတူတာအခ်ိဳ႕ရွိပါ တယ္။SSH enable လုပ္မယ္ဆိုရင္ေအာက္ပါအခ်က္ေတြလုိပါတယ္။အဲ့ဒါေတြကေတာ့....
  • Domain Name
  • Crypto Key
  • SSH Enable Password
တို႔ျဖစ္ပါတယ္။SSH Enable Password ဆိုတဲ့ေနရာမွာနွစ္မ်ိဳးရွိပါတယ္။ဒါကိုသူနဲ႔ဆိုင္ရာေနရာေရာက္မွဆက္ ပါမယ္။ေအာက္ကပံုေလးကေတာ့ Topology Simple ပံုေလးထဲက Router R3 ကုိConfiguration ခ်ထားပံုျဖစ္ပါ တယ္။


 အေပၚကပံုေလးကေတာ့ SSH ကို Configuration ခ်ထားတာပါ။ဒီေနရာမွာ SSH အေႀကာင္းကိုပဲအဓိကေျပာ ခ်င္တာျဖစ္လို႔ SSH ကို Configuration ခ်ပံုကိုပဲေအာက္မွာအေသးစိတ္ေရးပါ့မယ္။က်န္တာေတြကိုေတာ့ခ်န္ ထားခဲ့ပါမယ္။SSH Enable လုပ္ပံုကေတာ့..
Router>en
Router#config t                                          //Entering the global configuration mode
Router(config)ip domain-name uak.net       //Assign the Domain Name of the Router
Router(config)host ns0                               //Assign the Host Name of the Router
ns0(config)crypto key generate rsa             //Generating general purpose RSA Keys
The name for the key will be:ns0.uak.net
Choose the size of the key modulus in the range of 360 to 2048 for your
  General purpose keys.Choosing a key modulus greater than may take a
  a few minutes.
How many bits in the modulus [512] : 1024
% Generating 1024 bits RSA keys, keys will be non-exportable... [ok]
အခု Domain Name ရယ္ Crypto Key ရယ္ျပီးသြားပါျပီ။ေနာက္တစ္ခုက SSH အတြက္ Username နဲ႔ Password ပါ။အဲ့ေနရာမွာနွစ္မ်ိဳးသံုးလို႔ရပါတယ္။ပထမတစ္မ်ိဳးက...
ns0(config) line vty 0 15
ns0(config-line)login local    ဆိုပီးထားမယ္ဆိုရင္ Password မွာ Telnet မွာတုန္းကလိုပဲ Configure ခ်ရမွာျဖစ္ ပါတယ္။
ns0(config)username Jasmine password Sabae
 ေနာက္တစ္မ်ိဳးက line configuration မွာ 
ns0(config)line vty 0 15
ns0(config-line)transport input ssh   ဆိုပီးထားခဲ့မယ္ဆိုရင္ ေတာ့ Password မွာအေပၚကလို Configure လုပ္ လို႔မရေတာ့ပါ။ေအာက္ကပံုစံအတိုင္းလုပ္ေပးရမွာျဖစ္ပါတယ္။
ns0(config)username Jasmine secret Sabe  

ေနာက္တစ္ခုက ssh ကိုအေသးစိတ္ Configure ခ်တာပါ။ေအာက္မွာႀကည့္ပါ။
ns0(config)#ip ssh ?
  authentication-retries   Specify number of authentication retries
  break-string                break-string
  logging                       Configure logging for SSH
  maxstartups                Maximum concurrent sessions allowed
  port                           Starting (or only) Port number to listen on
  rsa                             Configure RSA keypair name for SSH
  source-interface         Specify interface for source address in SSH connections
  time-out                     Specify SSH time-out interval
  version                       Specify protocol version to be supported         

အဲ့ဒါေတြအထဲမွာမွ SSH Version ရယ္ authentication အႀကိမ္အေရတြက္ရယ္၊Time Out ျဖစ္မယ္ အခ်ိန္ရယ္ ကိုပဲျပင္ပါ့မယ္။ေအာက္မွာႀကည့္ပါ။
ns0(config)ip ssh version ?
<1-2>  Protocol version
ns0(config)ip ssh version 2                                    //Configure SSH version
ns0(config)ip ssh authentication-retries ?
<0-5>    Number of authentication retries
ns0(config)ip ssh authentication-retries  3               //Configure Authentication Times
ns0(config)#ip ssh time-out ?            
<1-120>  SSH time-out interval (secs)

ns0(config)ip ssh time-out 30                                 //Configure Time Out Interval
ေနာက္ထပ္ Router ေတြကိုလည္းအဲ့လိုပဲ Configuration ခ်ရမွာပါ။SSH Password ကေတာ့ ႀကိဳက္ရာပံုစံနဲ႔ သံုးနုိင္ပါတယ္။Router အားလံုးမွာ SSH Configuration ခ်ပီးသြားရင္ေတာ့ ကြ်န္ေတာ္တို႔ SSH ကိုသံုးပီး Routing Table ေတြကို Configure လုပ္လုိ႔ရပါျပီ။ေအာက္ကပံုေလးကိုႀကည့္ပါ။



ေနာက္ပီးေတာ့ကိုယ္ Generate လုပ္ထားတဲ့ crypto key ေတြ၊Configure ခ် ထားတဲ့ SSH status ေတြကိုလည္း တစ္ဖန္ျပည္ျပီးႀကည့္နုိင္ပါတယ္။အေပၚကပံုေလးအတိုင္းပါပဲ။:)
 SSH ဟာ authentication အတြက္ crypto key ေတြကိုသံုးတာျဖစ္လုိ႔ telnet ထက္စာရင္ပိုျပီး secure ျဖစ္ပါ တယ္။ဒါေပမယ့္ Telnet နဲ႔နွိုင္းယွဥ္ရင္ encrypt နဲ႔သြားတာျဖစ္လို႔ bandwidth ကိုပိုျပီး overhead ျဖစ္ေစပါတယ္။
အဲ့ေလာက္ဆိုရင္ SSH အတြက္လံုေလာက္ပီလို႔ထင္ပါတယ္။အေသးစိတ္ေလ့လာခ်င္ရင္ကြ်န္ေတာ္ Configure လုပ္ထားတဲ့ Simple ေလးကို ဒီေနရာ မွာယူနုိင္ပါတယ္။အာလံုးပဲအဆင္ေျပႀကပါေစ။:)

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










2 comments:

  1. Share ျပီး ျပီလားဗ်ာ....share လုိက္ျပီ

    ReplyDelete
  2. ဖိုင္က လင္႔ပ်က္ေနၿပီဗ်ာ မီဒီယာက ၿဖစ္ၿဖစ္ လုပ္ပါအုန္း အကိုေရ

    ReplyDelete