S1 C11 Configuring and Testing Your Network

Component Router

  • CPU //Xu ly trung tam
  • RAM //Noi chua cac tien trinh de CPU truy xuat va xu ly
  • NVRAM //Luu cau hinh vao day, moi khi khoi dong lai router se vao day lay lai cau hinh
  • ROM //Thong tin co ban cua nha san xuat
  • FLASH //Luu tru du lieu va cai dat HDH
  • MAIN //Ket noi cac thiet bi voi nhau
  • IOS //HDH ket no va dieu khien toan bo cac thiet bi phan cung

Role of Internetwork Operating System (IOS)

  • Basic routing and switching functions
  • Reliable and secure access to networked resources
  • Network scalability
  • Using Cisco Command Line Interface (CLI) to configuration

Access Methods

  • Console //Pho bien nhat
  • AUX port //Truy cap tu xa qua modem
  • Telnet or SSH //Truy cap vat ly qua cong FastEthernet, Serial, chi cau hinh khi da cau hinh IP cua router

IOS

  • Level: 0->15 15~ADMIN, mode 2->14 do admin tao ra de phan quyen cho nguoi dung
  • User mode = Level 1 Khi lan dau truy cap vao router (ping, show, enable, …) Router>
  • Privileged mode (Level 15) (telnet, reload, console terminal, config, …) Router#
  • Global mode (hostname, iproute, …) Router(config)#
  • Muon cau hinh gi se vao cac mode tuong ung
    • Router(config-if)
    • Router(config-router) //cau hinh dinh tuyen
    • Router(config-line)

//Ban dau o User mode, danh lenh Enable de vao che do Privileged mode

Router>Enable

//Privileged Mode vao Global mode danh configure terminal

Router#configure terminal
Router(config)#

//Muon thoat tung mode thi danh lenh exit

Router(config)#exit

Router#
Router#exit
Router>

Describing the use of commands

  • boldface //tu khoa lenh
  • italics //gia tri tham so
  • [X] //option lua chon
  • [X | Y] //nhieu option co the chon 1 trong 2

Context Sensitive Help ‘?’

Hot Key and Shortcuts

  • Tab //Hoan thanh lenh neu chua biet tiep VD: clo[tab] -> clock
  • Ctrl+R //Hien thi lai dong lenh vua danh
  • Ctrl+Z //Thoat ra
  • Ctrl+C //Ngat tien trinh dang xu ly
  • Ctrl+Shift+6 //Ngat khi translating

Basic Configure

Name Device

Router>
Router>enable
Router#
Router#configure terminal
Router(config)#
Router(config)#hostname R //Doi ten thiet bi sang R
R(config)#
R(config)#hostname R1
R1(config)#
R1(config)#no hostname R1 //Huy cau lenh dang truoc, them ‘no’ vao cau lenh dang truoc
R(config)#

Set Password

  • Console password
  • VTY password //SSH & Telnet
  • Enable password//Pass tu lv 1->15

Dat password cho console

R(config)#
R(config)#line console 0
R(config-line)# password class //Dat password = ‘class’
R(config-line)#login
R(config-line)#exit //Neu muon ve mode 2 danh end
R(config)#

Dat password cho VTY

R(config)#
R(config)#line vty 0 4 //5 phien ~ 5 nguoi truy cap vao cung luc
R(config-line)#password class
R(config-line)#login
R(config-line)#exit
R(config)#

Dat password cho enable

Router(config)#
Router(config)#enable password cisco //pass ‘cisco’ khong duoc ma hoa
Router(config)#enable secret cisco //pass ‘cisco’ duoc MD5 ma hoa

Set Banner //Dat thong bao

Router(config)#banner motd #ABCXYZ# //Dat thong diep la ABCXYZ; motd = message of the day

Xem cac cau hinh da thiet lap

Router#show running-config //Xem cac cau hinh, an enter de xem dong tiep, space de xem trang tiep theo

Cau hinh cong cho router

R(config)#interface fa0/0 //Cau hinh cho cong FastEthernet 0/0
R(config-if)#
R(config-if)#ip address 192.168.1.1 255.255.255.0
R(config-if)#description connect to LAN1 //mo ta cho cong fa0/0
R(config-if)#no shutdown
R(config-if)#exit
R(config)#

Chu y duong Serial thi 1 dau la DCE thi cau hinh //DCE cung cap toc do truyen neu ket noi giua 2 router

R(config)#interface s0/0/0
R(config-if)#
R(config-if)#ip address 192.168.0.1 255.255.255.0
R(config-if)#description connect to R2
R(config-if)#clock rate 64000 //toc do truyen bit tren giay thong thuong la 64000
R(config-if)#no shutdown
R(config-if)#exit
R(config)#

Backup tu RAM running-config vao NVRAM startup-config

R#copy running-config startup-config
R#reload //khoi dong lai router

Removing all config

R#erase startup-config

Dat dia chi default route cho routing table

R1(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0

Gui file len FTP Server

Mo CMD go ftp, nhap username va password. Go put ‘ten file’ de upload file len FTP server

Backup cau hinh len TFTP Server

R1#copy running-config tftp

Nhap dia chi IP cua TFTP Server va  ten file can luu

Cau hinh cong loopback

R1(config)#interface loopback 100
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-ip)#description loop back 100
R1(config-ip)#exit
R1(config)#