Giáo trình Quản trị mạng CCNA

Hướng dẫn

1. Nối cáp

 Để đảm bảo an toàn thiết bị trong khi thực hành, cần phải tắt hoàn toàn nguồn

điện các thiết bị trong khi nối cáp. Dùng cáp Console nối cổng COM1 của máy

PC (dùng Terminal chuyển đổi từ DB-9 sang RJ45) với cổng Console của

Router.

 Kiểm tra lại dây và jack cắm đảm bảo đã nối chắc chắn.

2. Đăng nhập vào router

 Khởi động Windows, vào HyperTerminal

 Start – Programs – Accessories – Communicatons – Hyper Terminal

 Đặt tên và các thông số như hình

 Name:

 Icon: chọn biểu tượng tùy thích

 Connect using: COM1

pdf 100 trang kimcuc 5240
Bạn đang xem 20 trang mẫu của tài liệu "Giáo trình Quản trị mạng CCNA", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

Tóm tắt nội dung tài liệu: Giáo trình Quản trị mạng CCNA

Giáo trình Quản trị mạng CCNA
Quản trị mạng CCNA 
 1 
MỤC LỤC 
Phần 1 – TỔNG QUAN 
 OSI MODEL ........................................................................................................... 2 
 CABLE ............................................................................................................ 3 
 LỆNH CISCO CĂN BẢN ....................................................................................... 8 
 CISCO DISCOVERY PROTOCOL ..................................................................... 21 
 TELNET .......................................................................................................... 26 
 CRACK PASSWORD ........................................................................................... 30 
 BACKUP VÀ RESTORE ..................................................................................... 35 
Phần 2 – ĐỊNH TUYẾN 
 STATIC ROUTE ................................................................................................... 40 
 DYNAMIC ROUTING PROTOCOL RIP ............................................................ 48 
 DYNAMIC ROUTING PROTOCOL IGRP ......................................................... 53 
 DYNAMIC ROUTING PROTOCOL EIGRP ...................................................... 60 
 DYNAMIC ROUTING PROTOCOL OSPF ........................................................ 69 
Phần 3 – ACCESS-LIST 
 STANDARD IP ACCESS-LIST ........................................................................... 75 
 EXTENDED IP ACCESS-LIST ........................................................................... 80 
Phần 4 – NAT .......................................................................................................... 84 
 NAT Overload 
 Dynamic NAT 
 Static NAT 
Phần 5 – WAN 
 PPP .......................................................................................................... 90 
 FRAME-RELAY ................................................................................................... 95 
 ISDN 
Phần 6 - SWITCH 
 SWITCH (BASIC CONFIGURE) 
 VLAN 
 2 
OSI MODEL: 
OSI Model là một sự chuẩn hóa cho những chức năng Network. Làm cho tính phức tạp 
của network trở nên đơn giản hơn, cho phép các nhà phát triển modul hóa việc thiết kế. 
Phương pháp này cho phép nhiều nhà phát triển làm việc độc lập nhau để tạo ra những 
chức năng riêng biệt mà vẫn có thể hòa hợp thành một thể thống nhất một cách dễ dàng 
(plug-and-play). 
Mô hình OSI 
Application Giao diện người dùng Telnet 
 HTTP 
Presentation Chuẩn hóa dữ liệu ASCII 
 JPEG 
Session Thiết lập, quản lý và kết thúc các phiên giao dịch Operating systems 
 giữa các ứng dụng. Scheduling 
Transport Cung cấp việc vận tải đảm bảo và không đảm bảo TCP 
 UDP 
 SPX 
Network Cung cấp việc đánh địa chỉ luận lý – định tuyến các IP 
 gói dữ liệu IPX 
Datalink Tạo frames từ các bits của dữ liệu 802.2 
 Dùng địa chỉ MAC 802.3 
 Detect lỗi, nhưng không sửa lỗi HDLC 
Physical Tín hiệu số, xung điện – truyền ra connectors, cable EIA/TIA 
 V.35 
Protocol Data Unit (PDU) được sử dụng 
để giao tiếp giữa các lớp 
Encapsulation là phương pháp thêm 
header (phần đầu) và trailer (phần đuôi) 
khi data di chuyển qua mỗi lớp. Phía thiết 
bị nhận, sẽ tiến hành gở từng header ra khi 
qua mỗi lớp (De-encapsulation) 
Tóm lược Mô hình OSI: 
 OSI Model có 7 lớp, được chia làm 2 phần Application (5,6,7) và 
 Data flow (1,2,34) 
 Encapsulation là quá trình đóng gói: dữ liệu khi dịch chuyển qua các lớp sẽ được thêm header 
 và trailers 
 Phía thiết bị nhận, sẽ tiến hành de-encapstulation. 
 Collision domain: 1 4 4 4 
 Broadcast domain: 1 1 1 4 
 3 
CABLE: 
1. Cáp xoắn 4 đôi: 
 Là cáp thông tin chuẩn STP/UTP Cat-5, gồm có 8 sợi xoắn với nhau thành từng đôi 
 một theo mã màu: Cam-Trắng và Cam; Lục-Trắng và Lục; Dương-Trắng và Dương; 
 Nâu-Trắng và Nâu. Hai đầu cáp nối với Jack cắm RJ-45. 
 Tùy theo chuẩn màu của 2 đầu Jack RJ-45 mà ta phân biệt thành các loại sau: 
STT Đôi Màu sắc Chức năng STT Đôi Màu sắc Chức năng 
 1 3 Trắng Lá Phát 1 3 Trắng Cam Phát 
 2 3 Lá Phát 2 3 Cam Phát 
 3 2 Trắng Cam Thu 3 2 Trắng Lá Thu 
 4 1 Dương Chưa dùng 4 1 Dương Chưa dùng 
 5 1 Trắng Dương Chưa dùng 5 1 Trắng Dương Chưa dùng 
 6 2 Cam Thu 6 2 Lá Thu 
 7 4 Trắng Nâu Chưa dùng 7 4 Trắng Nâu Chưa dùng 
 8 4 Nâu Chưa dùng 8 4 Nâu Chưa dùng 
Cáp thẳng (Straight-Through Cable): 
Hai đầu sử dụng chuẩn T568B (hoặc T568A). Sơ đồ nối dây cáp thẳng như sau : 
Cáp chéo (Crossover Cable): 
Có một đầu sử dụng chuẩn T568A, một đầu sử dụng chuẩn T568B. 
Sơ đồ nối dây cáp chéo như sau: 
 4 
Trường hợp sử dụng 
Các thiết bị mạng được chia làm hai nhóm: 
 - Nhóm 1: Hub, Switch 
 - Nhóm 2: Các thiết bị còn lại (Router, Computer, ) 
Khi đấu nối hai thiết bị cùng nhóm: dùng cáp chéo (crossover) 
Khi đấu nối hai thiết bị khác nhóm: dùng cáp thẳng (straight-through) 
Đối với Switchs: 
 5 
 2. Cáp Serial: 
 Là cáp thông tin (data cable) có 2 đầu nối với jack cắm DB-60, một đầu nối với 
 thiết bị DCE, đầu còn lại nối với thiết bị DTE. Sử dụng: Nối 2 cổng Serial của 2 
 Router, hoặc cổng serial Router với tổng đài số, Frame-Relay 
3. Cáp console: 
 hay còn gọi là cáp Roll : Rolled-over Cable 
 Sơ đồ nối dây cáp Console như sau : 
 Cáp console có thể được 
 bấm lại theo sơ đồ sau: 
 1 – 8 
 2 – 7 
 3 – 6 
 4 – 5 
 5 – 4 
 6 – 3 
 7 – 2 
 2 – 1 
 6 
Làm quen với chế độ dòng lệnh (CLI) và một số lệnh của router Cisco 
Hướng dẫn 
 1. Nối cáp 
 Để đảm bảo an toàn thiết bị trong khi thực hành, cần phải tắt hoàn toàn nguồn 
 điện các thiết bị trong khi nối cáp. Dùng cáp Console nối cổng COM1 của máy 
 PC (dùng Terminal chuyển đổi từ DB-9 sang RJ45) với cổng Console của 
 Router. 
 Kiểm tra lại dây và jack cắm đảm bảo đã nối chắc chắn. 
 2. Đăng nhập vào router 
 Khởi động Windows, vào HyperTerminal 
 Start – Programs – Accessories – Communicatons – Hyper Terminal 
 Đặt tên và các thông số như hình 
 Name: 
 Icon: chọn biểu tượng tùy thích 
 Connect using: COM1 
 7 
Đây là dạng cơ bản nhất để có thể thông qua một máy tính cấu hình các thiết bị cisco. 
Nhưng cách thức này rất bị động, vì một máy tính chỉ cấu hình được một router. 
 Trong thực tế phòng LAB, ta thường đấu nối 
 theo sơ đồ sau, để cấu hình các router thông 
 qua Terminal Server. 
 Terminal Server cung cấp truy cập out-of-
 band, nghĩa là có thể sử dụng telnet để truy 
 cập router thông qua cổng console hay cổng 
 aux. Termial server là router có các 
 Asynchronous port nối trực tiếp với console 
 port của các thiết bị router, switch. 
 8 
LỆNH CISCO CĂN BẢN: 
Giao diện terminal khi vừa khởi động router 
F3: 7712008+112808+595100 at 0x3000060 
 Restricted Rights Legend 
Use, duplication, or disclosure by the Government is 
subject to restrictions as set forth in subparagraph 
(c) of the Commercial Computer Software - Restricted 
Rights clause at FAR sec. 52.227-19 and subparagraph 
(c) (1) (ii) of the Rights in Technical Data and Computer 
Software clause at DFARS sec. 252.227-7013. 
 cisco Systems, Inc. 
 170 West Tasman Drive 
 San Jose, California 95134-1706 
Cisco Internetwork Operating System Software 
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(1)T, RELEASE SOFTWARE (fc1) 
Copyright (c) 1986-2000 by cisco Systems, Inc. 
Compiled Thu 16-Mar-00 16:10 by ccai 
Image text-base: 0x0303F64C, data-base: 0x00001000 
cisco 2500 (68030) processor (revision D) with 4096K/2048K bytes of memory. 
Processor board ID 03874635, with hardware revision 00000000 
Bridging software. 
X.25 software, Version 3.0.0. 
1 Ethernet/IEEE 802.3 interface(s) 
2 Serial network interface(s) 
32K bytes of non-volatile configuration memory. 
8192K bytes of processor board System flash (Read ONLY) 
 --- System Configuration Dialog --- 
Would you like to enter the initial configuration dialog? [yes/no]: n 
Would you like to terminate autoinstall? [yes]: 
  
Press RETURN to get started! Bấm Enter để bắt đầu 
 vào cấu hình router 
00:01:01: %IP-5-WEBINST_KILL: Terminating DNS process 
00:01:07: %SYS-5-RESTART: System restarted -- 
Cisco Internetwork Operating System Software 
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(1)T, RELEASE SOFTWARE (fc1) 
Copyright (c) 1986-2000 by cisco Systems, Inc. 
Compiled Thu 16-Mar-00 16:10 by ccai 
00:01:07: %LINK-5-CHANGED: Interface Ethernet0, changed state to 
administratively down 
00:01:07: %LINK-5-CHANGED: Interface Serial1, changed state to administratively 
down 
00:01:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed 
state to down 
00:01:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed 
state to down 
Router> 
 9 
Bấm ? tại Router>? để xem trợ giúp tại mode này có bao nhiêu lệnh tất cả 
Router>? 
Exec commands: 
 access-enable Create a temporary Access-List entry 
 access-profile Apply user-profile to interface 
 clear Reset functions 
 connect Open a terminal connection 
 disable Turn off privileged commands 
 disconnect Disconnect an existing network connection 
 enable Turn on privileged commands 
 exit Exit from the EXEC 
 help Description of the interactive help system 
 lock Lock the terminal 
 login Log in as a particular user 
 logout Exit from the EXEC 
 mrinfo Request neighbor and version information from a multicast 
 router 
 mstat Show statistics after multiple multicast traceroutes 
 mtrace Trace reverse multicast path from destination to source 
 name-connection Name an existing network connection 
 pad Open a X.29 PAD connection 
 ping Send echo messages 
 ppp Start IETF Point-to-Point Protocol (PPP) 
 resume Resume an active network connection 
 --More-- 
Vào Priviledge mode: 
Router>enable 
Router# 
Để quay lại user mode bằng lệnh disable 
Router>enable 
Router# 
Router#disable 
Router> 
Để thoát hẳn trở ra khỏi chế độ dòng lệnh 
Router con0 is now available 
Press RETURN to get started. 
Router>enable 
Router#logout 
Router con0 is now available 
Press RETURN to get started. 
 10 
Lệnh giúp đỡ (?) rất hữu dụng, bạn có thể dùng trong bất kỳ chế độ nào, Router sẽ đưa ra 
các lệnh được phép sử dụng và ý nghĩa của lệnh đó. 
Ví dụ muốn đánh lệnh enable tại user mode để vào Priviledge mode, nhưng bạn lại quên, 
không nhớ rõ lệnh enable phải đánh như thế nào, bạn chỉ cần đánh e? 
Router>e? 
enable exit 
Router liệt kê cho biết, ngay tại mode này có 2 lệnh bắt đầu bằng chữ e là lệnh enable và 
lệnh exit. 
Bây giờ, bạn đánh vào : 
Router>en? 
enable 
Router liệt kê cho biết chỉ có 1 lệnh tại mode này là lệnh enable, do vậy ta có thể đánh tắt 
lệnh enable = en cũng được. 
Router>en 
Router# 
 Như vậy, dấu hỏi được đặt liền kề vào lệnh (không có khoảng trắng) sẽ cho ta 
 biết những lệnh nào có trong mode này bắt đầu bằng những chữ trước ? 
Tại priviledg mode, ví dụ bạn muốn xem tiếp các phần của lệnh show, bạn gõ : 
Router#show ? 
 access-expression List access expression 
 access-lists List access lists 
 accounting Accounting data for active sessions 
 adjacency Adjacent nodes 
 aliases Display alias commands 
 arp ARP table 
 async Information on terminal lines used as router 
........................................................................................... 
........................................................................................... 
........................................................................................... 
 cops COPS information 
 debugging State of each debugging option 
 --More— 
 traffic-shape traffic rate shaping configuration 
 users Display information about terminal lines 
 version System hardware and software status 
 vtemplate Virtual Template interface information 
 whoami Info on current tty line 
 x25 X.25 information 
 x29 X.29 information 
router liệt kê cho ta thấy tất cả những sub-comand đi theo sau lệnh show, tại đây bạn lưu ý 
có sub-command là version, dùng để xem tình trạng của hardware và software 
 11 
Router#s? 
*s=show send set setup show 
slip start-chat systat 
 //có 4 lệnh bắt đầu bằng chữ s, nhưng lệnh show được ưu tiên (có dấu * 
 đứng trước lệnh show), tức là chỉ cần đánh vào là s, thì router vẫn tự hiểu 
 là ta đang cần đánh lệnh show. Nhưng thông thường ta đánh tắt là sh. 
Router#sh 
Router#show v? 
version vtemplate 
 // có 2 lệnh sub-command 
Router#show ve? 
version 
Router#show ve 
Router#show version 
Router#sh ver 
Cisco Internetwork Operating System Software 
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(1)T, RELEASE SOFTWARE 
(fc1) 
Copyright (c) 1986-2000 by cisco Systems, Inc. 
Compiled Thu 16-Mar-00 16:10 by ccai 
Image text-base: 0x0303F64C, data-base: 0x00001000 
ROM: System Bootstrap, Version 11.0(10c), SOFTWARE 
BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), 
RELEASE SOFT 
WARE (fc1) 
Router uptime is 55 minutes 
System returned to ROM by reload 
System image file is "flash:R1_Flash_New" 
cisco 2511 (68030) processor (revision M) with 2048K/2048K bytes of 
memory. 
Processor board ID 20475723, with hardware revision 00000000 
Bridging software. 
X.25 software, Version 3.0.0. 
1 Ethernet/IEEE 802.3 interface(s) 
2 Serial network interface(s) 
16 terminal line(s) 
32K bytes of non-volatile configuration memory. 
8192K bytes of processor board System flash (Read ONLY) 
 --More— 
Configuration register is 0x2102 
Router# 
 12 
Vào chế độ Global-configuration-mode, dùng lệnh configuration terminal 
Rourter#config terminal //có thể đánh tắt là : conf t 
Router(config)# 
Đặt tên cho router là R1 
Router(config)#hostname R1 
R1(config)# 
Đặt banner cho Router : 
R1(config)#banner motd & chao mung cac ban den voi CCNA tai NHAT NGHE & 
R1(config)#end 
R1#logout 
Sau khi làm xong banner thì bạn logout rồi vào lại router sẽ thấy banner mỗi khi kết nối 
vào router 
Các lệnh đặt thông số cho line console : 
R1>en 
R1#conf t 
Enter configuration commands, one per line. End with CNTL/Z. 
r1(config)#line console 0 
r1(config-line)#loggin sync //dùng để tự động xuống hàng 
r1(config-line)#exec-timeout 0 0 //dùng đặt thời gian timeout 
r1(config-line)#end 
R1# 
Sau khi làm xong lệnh loggin sync thì trên màn hình console không còn hiện tượng bị mất 
con trỏ. Lệnh exec-timeout X Y có hai tham số X là phút, Y là giây. Dùng để đặt thời gian 
tự khóa router nếu không gõ phím nào bất kỳ. Với thời gian 0 0 có nghĩa là không bao giờ 
timeout. (Chỉ nên áp dụng trên thiết bị phòng LAB) 
Để vào mode interface : 
R1>en 
R1#conf t 
Enter configuration commands, one per line. End with CNTL/Z. 
R1(config)#interface ethernet 0 //lệnh tắt int e0 
R1(config-if)#exit 
Đặt địa chỉ IP cho interface ethernet 0 
R1(config)#interface ethernet 0 
R1(config-if)#ip address 192.168.2.151 255.255.255.0 
R1(config-if)#no shutdown //để up int e0 lên. 
R1(config-if)#end 
Đặt description cho interface : 
R1#conf t 
Enter configuration commands, one per line. End with CNTL/Z. 
R1(config)#int e0 
R1(config-if)#description day la int noi vao mang lan 
R1(config-if)#end 
R1#sh int e0 
Sau khi làm xong lệnh description cho int e0, bạn dùng lệnh sh int e0 để kiểm tra kết quả. 
R1#sh int e0 
 ... meout is 2 seconds: 
..... 
Success rate is 0 percent (0/5) 
RA#sh int s 0 
Serial0 is up, line protocol is down 
 Hardware is HD64570 
 Internet address is 192.168.1.1/24 
 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 
 Encapsulation PPP, loopback not set, keepalive set (10 sec) 
 LCP REQsent 
 Closed: ipcp, cdp 
 Last input 00:00:03, output 00:00:01, output hang never 
 Last clearing of "show interface" counters never 
 Input queue: 0/75/0 (size/max/drops); Total output drops: 0 
 92 
 Queueing strategy: weighted fair 
 Output queue: 0/64/0 (size/threshold/drops) 
 Conversations 0/2 (active/max active) 
 Reserved Conversations 0/0 (allocated/max allocated) 
 5 minute input rate 0 bits/sec, 0 packets/sec 
 5 minute output rate 0 bits/sec, 0 packets/sec 
 34 packets input, 3197 bytes, 0 no buffer 
 Received 28 broadcasts, 0 runts, 0 giants 
 1 input errors, 1 CRC, 0 frame, 0 overrun, 0 ignored, 1 abort 
Bây giờ, ta sẽ đóng gói PPP cho interface s0 của RB: 
RB(config)#int s 0 
RB(config-if)#encap ppp 
RB#sh int s0 
Serial0 is up, line protocol is up 
 Hardware is HD64570 
 Internet address is 192.168.1.2/24 
 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255 
 Encapsulation PPP, loopback not set, keepalive set (10 sec) 
 LCP Open 
 Open: ipcp, cdp 
 Last input 00:00:02, output 00:00:02, output hang never 
 Last clearing of "show interface" counters never 
 Input queue: 0/75/0 (size/max/drops); Total output drops: 0 
 Queueing strategy: weighted fair 
 Output queue: 0/64/0 (size/threshold/drops) 
RB#p 192.168.1.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echoes to 192.168.1.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms 
Phương pháp đóng gói PPP có nhiều lựa chọn thêm cho cấu hình, trong đó có phầm lựa 
chọn phương thức chứng thực: 
RA(config) #int s0 
RA(config-if)#ppp authentication chap 
RB(config)#int s0 
RB(config-if)#ppp authentication chap 
Lúc này, RA và RB vẫn chưa làm việc với nhau được, vì chưa có username và password 
để chứng thực lẫn nhau: 
Kiểm tra bằng lệnh debug ppp authentication 
RA# 
PPP Serial0: Send CHAP challenge id=7 to remote 
PPP Serial0: CHAP challenge from RB 
PPP Serial0: USERNAME RB not found. 
PPP Serial0: Unable to authenticate for peer. 
RA# 
PPP Serial0: Send CHAP challenge id=8 to remote 
PPP Serial0: CHAP challenge from RB 
PPP Serial0: USERNAME RB not found. 
PPP Serial0: Unable to authenticate for peer. 
RA# 
 93 
Tạo username RB trên RA với password là: nhatnghe và tạo username RA trên RB với 
password nhatnghe (password phải giống nhau ở cả 2 bên là bắt buộc). 
RA#conf t 
RA#username RB password nhatnghe 
RB#conf t 
RB#username RA password nhatnghe 
RA# 
%LINK-3-UPDOWN: Interface Serial0, changed state to up 
PPP Serial0: Send CHAP challenge id=36 to remote 
PPP Serial0: CHAP challenge from RB 
PPP Serial0: CHAP response id=36 received from RB 
PPP Serial0: Send CHAP success id=36 to remote 
PPP Serial0: remote passed CHAP authentication. 
PPP Serial0: Passed CHAP authentication with remote. 
RA# 
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to 
up 
RA# 
Ping kiểm tra thử 
RA#ping 192.168.1.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms 
Để tiết kiệm băng thông, PPP cho phép tiến hành nén dữ liệu trước khi truyền đi, và giải 
nén dữ liệu khi nhận được. 
Để nén, dùng lệnh : compress stac 
Cấu hình compress cho RA, ping thử vài lần đến RB, sau đó dùng lệnh show compress để 
xem thống kê về việc nén, giải nén, ta thấy tỉ lệ là 0 vì do bên RB chưa khai báo compress: 
RA(config-if)#compress stac 
RA# 
00:40:14: %SYS-5-CONFIG_I: Configured from console by console 
R13#ping 192.168.1.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/30/32 ms 
R13#ping 192.168.1.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/30/32 ms 
R13#ping 192.168.1.2 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: 
!!!!! 
 94 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/30/32 ms 
RA#sho compress 
 Serial0 
 Software compression enabled 
 uncompressed bytes xmt/rcv 0/0 
 1 min avg ratio xmt/rcv 0.000/0.000 
 5 min avg ratio xmt/rcv 0.000/0.000 
 10 min avg ratio xmt/rcv 0.000/0.000 
 no bufs xmt 0 no bufs rcv 0 
 resyncs 0 
 Additional Stacker Stats: 
 Transmit bytes: Uncompressed = 0 Compressed = 0 
 Received bytes: Compressed = 0 Uncompressed = 0 
Khai báo compress cho RB: 
RB(config)#int s0 
RB(config-if)#compress stac 
RB(config-if)#shut 
RB(config-if)#no shut 
RB#ping 192.168.1.1 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms 
RB#ping 192.168.1.1 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms 
RB#ping 192.168.1.1 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms 
RB#sho compress 
 Serial0 
 Software compression enabled 
 uncompressed bytes xmt/rcv 3156/3176 
 1 min avg ratio xmt/rcv 3.067/2.810 
 5 min avg ratio xmt/rcv 0.871/0.928 
 10 min avg ratio xmt/rcv 0.871/0.928 
 no bufs xmt 0 no bufs rcv 0 
 resyncs 0 
 Additional Stacker Stats: 
 Transmit bytes: Uncompressed = 0 Compressed = 766 
 Received bytes: Compressed = 814 Uncompressed = 0 
 95 
FRAME RELAY: 
 Sơ đồ nối dây và địa chỉ IP 
Trong lab này yêu cầu bạn thực hiện trước các câu lệnh trong phần XÓA CẤU HÌNH 
ROUTER trang 19, sau đó thực hiện tiếp phần TÓM TẮT trang17. Lưu ý khi đặt số IP 
ADD theo sơ đồ. Hạn chế tham khảo tài liệu trong khi thực hiện các lệnh cũ. 
Trong sơ đồ này, RA làm nhiệm vụ giả lập môi trường truyên thông FRAME RELAY. 
Cấu hình để Router RA làm nhiệm vụ Frame-relay Switch: 
RA(config)#frame-relay switching 
RA(config)#int s0 
RA(config-if)#no ip address 
RA(config-if)#clock rate 64000 
RA(config-if)#encapsulation frame-relay 
RA(config-if)#no shut 
RA(config-if)#frame-relay lmi-type cisco 
RA(config-if)#frame-relay intf-type dce 
RA(config-if)#frame-relay route 500 int s1 600 
RA(config)#int s1 
RA(config-if)#no ip add 
RA(config-if)#clock rate 64000 
RA(config-if)#encapsulation frame-relay 
RA(config-if)#no shut 
RA(config-if)#frame-relay lmi-type ansi 
RA(config-if)#frame-relay intf-type dce 
RA(config-if)#frame-relay route 600 int s0 500 
 96 
Cấu hình Router RB với DLCI=500, LMI=cisco: 
1. Khai báo phương thức đóng gói là Fram-relay 
RB(config-if)#int s0 
RB(config-if)#ip add 192.168.10.1 255.255.255.0 
RB(config-if)#encapsulation frame-relay 
RB(config-if)#no shut 
RC(config-if)#int s1 
RC(config-if)#ip add 192.168.10.2 255.255.255.0 
RC(config-if)#encapsulation frame-relay 
RC(config-if)#no shut 
Xem frame-relay map hiện tại, Dynamic là do invert ARP hỗ trợ: 
RB#sh fram pvc map 
Serial1 (up): ip 192.168.10.2 dlci 500(0x258,0x9480), dynamic, 
 broadcast,, status defined, active 
RC#sh fram pvc map 
Serial1 (up): ip 192.168.10.1 dlci 600(0x258,0x9480), dynamic, 
 broadcast,, status defined, active 
RC#ping 192.168.10.1 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms 
2. Trong trường hợp ISP không cho phép Invert ARP hoạt động, phải dùng lệnh Map IP ở 
cả hai đầu kết nối: 
RB(config)#int s0 
RB(config-if)#frame-relay map ip 192.168.10.2 500 
RC(config)#int s1 
RC(config-if)#frame-relay map ip 192.168.10.1 600 
Xem frame-relay map hiện tại chỉ còn lại là static, sau khi đã đánh lệnh frame-relay map: 
RB#sh fram pvc map 
Serial1 (up): ip 192.168.10.2 dlci 500(0x258,0x9480), static, 
 CISCO, status defined, active 
RC#sh fram pvc map 
Serial1 (up): ip 192.168.10.1 dlci 600(0x258,0x9480), static, 
 CISCO, status defined, active 
Trong trường hợp này, ta thấy không có tham số broadcast do đó các loại tín hiệu 
broadcast không gửi được trên đường truyền này, để thử các trương hợp xảy ra, ta cấu hình 
các router RB và RC dùng RIP để routing, nhận thấy là các router không thể routing được. 
RB(config)#int loo 1 
RB(config-if)#ip add 192.168.9.9 255.255.255.0 
RB(config-if)#exit 
RB(config)#router rip 
RB(config-router)#net 192.168.10.0 
RB(config-router)#net 192.168.9.0 
RB(config-router)#^Z 
 97 
RC(config)#int loop1 
RC(config-if)#ip add 192.168.7.7 255.255.255.0 
RB(config)#router rip 
RB(config-router)#net 192.168.10.0 
RB(config-router)#net 192.168.7.0 
RB(config-router)#^Z 
Ping RB kiểm tra thử: 
RC#ping 192.168.10.1 
Type escape sequence to abort. 
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds: 
!!!!! 
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms 
Do không làm việc được với tín hiệu broadcast nên không nhân được quảng báo Routing 
table từ Router RB qua: 
Dùng lệnh debug ip rip: không hề thấy nhận được broadcast 
 và show ip route: không biết được các NET_ID của các router khác: 
RC#debug ip rip 
RIP protocol debugging is on 
RC# 
01:18:52: RIP: sending v1 update to 255.255.255.255 via Loopback1 
(192.168.7.7) 
01:18:52: RIP: build update entries 
01:18:52: network 192.168.10.0 metric 1 
01:18:52: RIP: sending v1 update to 255.255.255.255 via Serial1 
(192.168.10.2) 
01:18:52: RIP: build update entries 
01:18:52: network 192.168.7.0 metric 1 
01:18:52: subnet 192.168.10.0 metric 1 
RC#sh ip 
01:19:20: RIP: sending v1 update to 255.255.255.255 via Loopback1 
(192.168.7.7) 
01:19:20: RIP: build update entries 
01:19:20: network 192.168.10.0 metric 1 
01:19:20: RIP: sending v1 update to 255.255.255.255 via Serial1 
(192.168.10.2) 
01:19:20: RIP: build update entries 
01:19:20: network 192.168.7.0 metric 1 
01:19:20: subnet 192.168.10.0 metric 1 
RC#sh ip route 
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP 
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 
 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP 
 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS 
inter area 
 * - candidate default, U - per-user static route, o - ODR 
 P - periodic downloaded static route 
Gateway of last resort is not set 
C 192.168.10.0/24 is directly connected, Serial1 
C 192.168.7.0/24 is directly connected, Loopback1 
Cho phép broadcast trên cả Router RB và RC: 
 98 
RB(config)#int s 0 
RB(config-if)#frame-re map ip 192.168.10.2 500 broadcast 
RC(config)#int s 1 
RC(config-if)#frame map ip 192.168.10.1 600 broadcast 
Ngay lập tức cả 2 bên sẽ nhận được broadcast của nhau update được routing table: 
Router RB: 
01:19:45: RIP: received v1 update from 192.168.10.2 on Serial0 
01:19:45: 192.168.7.0 in 1 hops 
01:19:45: 192.168.10.0 in 1 hops 
01:19:47: RIP: sending v1 flash update to 255.255.255.255 via Loopback1 
(192.168.9.9) 
01:19:47: RIP: build flash update entries 
01:19:47: network 192.168.7.0 metric 2 
01:19:47: RIP: sending v1 flash update to 255.255.255.255 via Serial0 
(192.168.10.1) 
01:19:47: RIP: build flash update entries 
01:19:47: network 192.168.7.0 metric 2 
01:20:01: RIP: sending v1 update to 255.255.255.255 via Loopback1 
(192.168.9.9) 
01:20:01: RIP: build update entries 
01:20:01: network 192.168.7.0 metric 2 
01:20:01: network 192.168.10.0 metric 1 
01:20:01: RIP: sending v1 update to 255.255.255.255 via Serial0 
(192.168.10.1) 
01:20:01: RIP: build update entries 
01:20:01: network 192.168.7.0 metric 2 
01:20:01: network 192.168.9.0 metric 1 
01:20:01: subnet 192.168.10.0 metric 1 
RB# 
01:20:03: RIP: received v1 update from 192.168.10.2 on Serial0 
01:20:03: 192.168.9.0 in 2 hops 
01:20:11: RIP: received v1 update from 192.168.10.2 on Serial0 
01:20:11: 192.168.7.0 in 1 hops 
01:20:11: 192.168.9.0 in 2 hops 
01:20:11: 192.168.10.0 in 1 hops 
RB#sh ip route 
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP 
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 
 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP 
 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS 
inter area 
 * - candidate default, U - per-user static route, o - ODR 
 P - periodic downloaded static route 
Gateway of last resort is not set 
C 192.168.9.0/24 is directly connected, Loopback1 
C 192.168.10.0/24 is directly connected, Serial0 
R 192.168.7.0/24 [120/1] via 192.168.10.2, 00:00:03, Serial0 
 99 
Router RC: 
01:19:45: RIP: sending v1 update to 255.255.255.255 via Loopback1 
(192.168.7.7) 
01:19:45: RIP: build update entries 
01:19:45: network 192.168.10.0 metric 1 
01:19:45: RIP: sending v1 update to 255.255.255.255 via Serial1 
(192.168.10.2) 
01:19:45: RIP: build update entries 
01:19:45: network 192.168.7.0 metric 1 
01:19:45: subnet 192.168.10.0 metric 1 
RC(config-if)# 
01:19:48: RIP: received v1 update from 192.168.10.1 on Serial1 
01:19:48: 192.168.7.0 in 2 hops 
RC(config-if)#^Z 
RC# 
01:19:57: %SYS-5-CONFIG_I: Configured from console by console 
RC# 
01:20:01: RIP: received v1 update from 192.168.10.1 on Serial1 
01:20:01: 192.168.7.0 in 2 hops 
01:20:01: 192.168.9.0 in 1 hops 
01:20:01: 192.168.10.0 in 1 hops 
RC# 
01:20:03: RIP: sending v1 flash update to 255.255.255.255 via Loopback1 
(192.168.7.7) 
01:20:03: RIP: build flash update entries 
01:20:03: network 192.168.9.0 metric 2 
01:20:03: RIP: sending v1 flash update to 255.255.255.255 via Serial1 
(192.168.10.2) 
01:20:03: RIP: build flash update entries 
01:20:03: network 192.168.9.0 metric 2 
RC# 
RC#sh ip route 
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP 
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 
 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP 
 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS 
inter area 
 * - candidate default, U - per-user static route, o - ODR 
 P - periodic downloaded static route 
Gateway of last resort is not set 
R 192.168.9.0/24 [120/1] via 192.168.10.1, 00:00:07, Serial1 
C 192.168.10.0/24 is directly connected, Serial1 
C 192.168.7.0/24 is directly connected, Loopback1 
Có thể xem lại: 
RC#sh fram map 
Serial1 (up): ip 192.168.10.1 dlci 600(0x258,0x9480), static, 
 broadcast, 
 CISCO, status defined, active 

File đính kèm:

  • pdfgiao_trinh_quan_tri_mang_ccna.pdf