Tài Liệu Thực Hành Môn Thiết Kế Mạng Lan
Trang 1Biên So n: ng Quý Page 1
Lo i cáp gì k t n i c ng Ethernet trên PC t im t c ng trên switch?
Lo i cáp gì k t n i c ng Ethernet trên Switch c ng đ n c ng Ethernet trên Router ?
Lo i cáp gì k t n i c ng Ethernet trên Router c ng Ethernet trên PC? _
Trang 2Biên So n: ng Quý Page 2
Ph n 2: Xóa File c u hình trong NVRAM và Reload (Kh i đ ng l i) Routers
B c 1: Thi t l p k t n i t i router R1
• s d ng cáp console, k t n i port RS 232 trên PC1 t i port console trên router R1
• ch n PC1 và sau đó ch n Desktop tab Ch n Terminal trên Desktop tab
• gi c u hình m c đ nh và ch n OK: Bits Per Second = 9600 Data Bits = 8 Parity = None Stop
Bits = 1 Flow Control = None
• bây gi chúng ta đã vào consoled c a R1 Nh n Enter đ n d u nh c c a Router
xóa c u hình dùng l nherase startup-config Nh n Enter khi xu t hiên [confirm] nh v y chúng ta
đã xóa file c u hình c a Router ch a trong NVRAM
System configuration has been modified Save? [yes/no]: no
Proceed with reload? [confirm]
Nh n Enter khi xu t hi n [confirm] h i chúng ta có mu n kh i đ ng l i router không Sau khi router
K t thúc qua trình kh i đ ng ch n các b c nh c u hình bên d i:
Would you like to enter the initial configuration dialog? [yes/no]: no
Would you like to terminate autoinstall? [yes]: [Press Return]
Press Enter to accept default
Press RETURN to get started!
B c 5: C u hình l p l i t b c 1 t i b c 4 trên router R2
Ph n 3: C u hình c b n trên Router R1
B c 1: Thi t l p m t HyperTerminal session t i router R1
B c 2: Vào ch đ privileged EXEC mode
Router>enable
Router#
Trang 3Biên So n: ng Quý Page 3
B c 3: Vào ch đ global configuration mode
B c 6: C u hình m t kh u cho EXEC mode
C u hìnhm t kh u cho EXEC mode s d ng l nhenable secret password t m t kh u là“class
R1(config)#enable secret class
R1(config)#
T i sao c n đ n l nhenable password password ?
_ _
B c 7: C u hình message-of-the-day banner
C u hinh m t message-of-the-day banner s d ng l nh banner motd
R1(config)#banner motd &
Enter TEXT message End with the character '&'
Trang 4Biên So n: ng Quý Page 4
C u hình FastEthernet0/0 interface v i đ a ch IP address 192.168.1.1/24
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#
B c 11: C u hình ip cho Serial0/0/0 interface
C u hình Serial0/0/0 interface v i đ a ch ip: IP address 192.168.2.1/24 t clock rate là 64000
Chú ý: Interface Serial 0/0/0 s b t (up) ch khi interface serial trên Router R2 đ c c u hình hoàn t t
B c 12: Tr l i ch đ privileged EXEC mode
S d ng l nh end đ tr v privileged EXEC mode
R1(config-if)#end
R1#
B c 13: L u c u hình trên Router R1
L u c u hình trên router R1 s d ng l nh copy running-config startup-config
R1#copy running-config startup-config
Building configuration
[OK]
R1#
Ph n 4: Th c hiên c u hình c b n cho Router R2
B c 1: Trên Router R2, l p l i các b c c u hình t B c 1 t i B c 9 nh Ph n 3 trên
B c 2: C u hình đ a ch ip cho Serial 0/0/0 interface
C u hình Serial 0/0/0 interface v i đ a ch IP address 192.168.2.2/24
R2(config)#interface serial 0/0/0
R2(config-if)#ip address 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state
to up
R2(config-if)#
B c 3: C u hình đ a ch cho FastEthernet0/0 interface
C u hình đ a ch choFastEthernet0/0 interface v i đ a ch IP address 192.168.3.1/24
R2(config-if)#interface fastethernet 0/0
R2(config-if)#ip address 192.168.3.1 255.255.255.0
R2(config-if)#no shutdown
Trang 5Biên So n: ng Quý Page 5
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R2(config-if)#
B c 4: Tr v ch đ privileged EXEC mode
S d ng l nh end đ tr v ch đ privileged EXEC mode
R2(config-if)#end
R2#
B c 5: L u c u hình c a Router R2
L u c u hình c a router R2 s d ng l nh copy running-config startup-config
R2#copy running-config startup-config
B c 1: Ki m tra b ng đ nh tuy n c a Router s d ng l nh Show ip route
Dùng l nh show ip route Chúng ta th y trên 2 Router R1 và R2 có 2 đ ng route Và c 2 đ u b t đ u
b ng ch ”C ” ây là nh ng k t n i tr c ti p trên Router (các interface c a Router)
R1#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0/0
-
R2#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
Trang 6Biên So n: ng Quý Page 6
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.2.0/24 is directly connected, Serial0/0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
B c 2: ki m tra c u hình c a Interface
S d ng l nh show ip interface brief đ ki m tra nhanh tr ng thái các interface c a các router
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 192.168.2.1 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES manual administratively down down
-
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.3.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 192.168.2.2 YES manual up up
Serial0/0/1 unassigned YES unset down down
Vlan1 unassigned YES manual administratively down down
N u các tr ng thái làup và up, lúc này các đ ng route s trong b ng routing table (b ng đ nh tuy n)
Ki m tra l i b ng đ nh tuy n b ng l nh show ip route
B c 3: Ki m tra k t n i
Ki m tra k t n i t PC đ n default gateway
T PC k t n i đ n Router R1, có th ping đ c default gateway hay không?
T PC k t n i đ n Router R2, có th ping đ c default gateway hay không?
N u không kh c ph c l i theo các b c ki m tra sau:
3 ki m tra tr ng thái c a các interface trên Router s d ng l nh show ip interface brief
Các tr ng thái c a các interface cóup và up hay không?
N u chúng ta tr l i các câu h i trên là yes, lúc này chúng ta s th c hiên l nh ping đ n default gateway thành công
B c 4: Ki m tra k t n i gi a router R1 và R2
T router R1, có th ping t i router R2 s d ng l nh ping 192.168.2.2?
T router R2, có th ping t i router R1 s d ng l nh ping 192.168.2.1?
N u không kh c ph c l i theo các b c ki m tra sau:
1 Ki m tra cáp
Router có k t n i tr c ti p v i nhau không?
Tín hi u đèn k t n i (link) trên các port có liên quan có sáng không?
2 Ki m tra file c u hình trên router
Chúng có đúng v i mô hình không?
C u hình câu l nh clock rate trên thi t b là DCE ?
3 Ki m tra tr ng thái c a các interface trên Router s dung l nhshow ip interface brief
Trang 7Biên So n: ng Quý Page 7
Tr ng thái c a chúng là“up” và “up”?
N u chúng ta tr l i các câu h i trên là yes, lúc này chúng ta s th c hiên l nh ping thành công t R2 t i
R1 và t R2 t i R3
Ph n 7: Nh n xét
B c 1: Ki m tra ping t máy tính k t n i router R1 t i máy tính k t n i t i router R2
Ping không thành công
B c 2: Ki m tra ping t máy tính k t n i tr c ti p v i router R1 t i router R2
Ping không thành công
B c 3: : Ki m tra ping t máy tính k t n i tr c ti p v i router R2 t i router R1
Ping không thành công
Lý do t i sao ng n c n vi c truy n thông (ping) gi a các thi t b nh trên?
Trang 8
Biên So n: ng Quý Page 8
Lab c u hình đ nh tuy n t nh (Static Route)
Ph n 1: C m cáp, Xóa c u hình, và kh i đ ng l i Routers
B c 1: K t n i cáp nh mô hình
B c 2: Xóa toàn b c u hình c a Router
Xóa toàn b c u hình c a Router dùng l nh: erase startup-config và sau đó dùng l nh reload đ kh i
đ ng l i router Ch n no n u Router h i chúng ta có l u l i c u hình không.
Trang 9Biên So n: ng Quý Page 9
Ph n 3: C u hình các interface trên Router
B c 1: c u hình interface Fastethernet 0/0 trên router R1
B c 2: i n vào câu l nh đ ki m tra b ng routing table
Ki m tra b ng Routing table trên Router R1
S d ng l nh gì ?
R1#
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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.3.0 is directly connected, FastEthernet0/0
B c 3: C u hình cho interface serial 0/0/0 trên router R1 k t n i t i router R2
is_up: 0 state: 0 sub state: 1 line: 0 has_route: False
B c 4: C u hình clock rate cho router R1
Có th c u hình nhi u t c đ cho interface S d ng d u “? “ đ ch n clockrate t ng ng đây chúng ta c u hình t c đ là 64000 bps
R1(config-if)#clock rate 64000
is_up: 0 state: 0 sub state: 1 line: 0 has_route: False
Trang 10Biên So n: ng Quý Page 10
B c 5: nh p vào câu l nh c n thi t đ đ m b o r ng interface serial 0/0/0 đã đ c c u hình tr n
v n
Chúng ta s th c hi n l nh gì ?
R1(config-if)# _
Sau khi c u hình xong l nh này chúng ta có th thây thông báo hi n th nh d i:
is_up: 0 state: 0 sub state: 1 line: 0 has_route: False
%LINK-3-UPDOWN: Interface Serial0/0/0, changed state to down
B c 6: C u hình cho interface serial 0/0/0 trên router R2 k t n i t i router R1
is_up: 0 state: 6 sub state: 1 line: 0
B c 7: nh p vào câu l nh c n thi t đ đ m b o r ng interface serial 0/0/0 đã đ c c u hình tr n
v n
Chúng ta s th c hi n l nh gì ?
R2(config-if)# _
Sau khi c u hình xong l nh này chúng ta có th thây thông báo hi n th nh d i:
is_up: 0 state: 4 sub state: 1 line: 0
%LINK-3-UPDOWN: Interface Serial0/0/0, changed state to up
is_up: 1 state: 4 sub state: 1 line: 0
RT: add 172.16.2.0/24 via 0.0.0.0, connected metric [0/0]
RT: interface Serial0/0/0 added to routing table
is_up: 1 state: 4 sub state: 1 line: 0
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to
up
is_up: 1 state: 4 sub state: 1 line: 0
B c 8: i n vào câu l nh đ ki m tra b ng routing table trên R1 and R2
Ki m tra b ng Routing table trên Router R1 và R2 S d ng l nh gì ?
R1# _
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
Trang 11Biên So n: ng Quý Page 11
R2# _
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
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.2.0 is directly connected, Serial0/0/0
Ph n 4: Th c hi n vi c c u hình t t c các interface trên các Router
B c 1: C u hình các interface còn l i c a router R2
C u hình đ a ch ip address c a các interface trên router R2 nh mô hình
B c 2: C u hình các interface trên router R3
C u hình đ a ch ip address c a các interface trên router R3 nh mô hình
Ki m tra k t n i t các Pc đên gateway c a chúng
T PC1, có th ping t i default gateway?
T PC2, có th ping t i default gateway?
T PC3, có th ping t i default gateway?
Ki m tra tr ng thái c a các interface trên các router R1, R2, R3 s d ng l nh: show ip interface brief
B c 2: S d ng l nh ping đ i v i nh ng k t n i không tr c ti p
T PC3, Có th ping đ n PC1?
T PC3, Có th ping đ n PC2?
T PC2, Có th ping đ n PC1?
T router R1, có th ping t i router R3?
Nh ng l nh ping này s không thành công Lý do t i sao?
Trang 12
Biên So n: ng Quý Page 12
Ph n 7: Ki m tra b ng Routing table (b ng đ nh tuy n) trên t t c các Router
B c 1: Ki m tra b ng Routing table trên t t c các router R1, R2, R3
R1#
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
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.2.0 is directly connected, Serial0/0/0
C 172.16.3.0 is directly connected, FastEthernet0/0
M ng nào có trên mô hình m ng mà l i không có trong b ng routing table c a router R1?
R2# _
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.1.0 is directly connected, FastEthernet0/0
C 172.16.2.0 is directly connected, Serial0/0/0
C 192.168.1.0/24 is directly connected, Serial0/0/1
M ng nào có trên mô hình m ng mà l i không có trong b ng routing table c a router R2?
R3# _
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
M ng nào có trên mô hình m ng mà l i không có trong b ng routing table c a router R3?
T i sao t t c các m ng (network) không có trong b ng routing tables c a m i router?
_
_
Trang 13Biên So n: ng Quý Page 13
Ph n 8: C u hình m t Static Route s d ng đ a ch Next-Hop
B c 1: C u hình static routes v i m t đ a ch next-hop, s d ng cú pháp:
Router(config)# ip route network-address subnet-mask ip-address
network-address:— a ch m ng đích c n thêm vào b ng Routing table
subnet-mask— a ch subnet mask c a m ng đích
B c 2: Xem b ng routing table đ ki m tra đ ng static route m i thêm vào
Chú ý v i ch “S” trong b ng routing table, có ngh a đây là 1 đ ng static route
R3# _
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
S 172.16.1.0 [1/0] via 192.168.1.2
C 192.168.1.0/24 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
Ph n 9: C u hình Static Route s d ng Exit Interface
B c 1: C u hình static routes v i m t đ a ch next-hop, s d ng cú pháp:
Router(config)# ip route network-address subnet-mask exit-interface
network-address— a ch m ng đích c n thêm vào b ng Routing table
subnet-mask— a ch subnet mask c a m ng đích
exit-interface—Interface đi ra ngoai, interface có th chuy n gói tin đ n đ c m ng đích.
Trên router R3, c u hình đ ng static route t im ng 172.16.2.0 s d ng interface Serial 0/0/0 trên
R3 nh là exit interface
R3(config)# ip route 172.16.2.0 255.255.255.0 Serial0/0/1
R3(config)#
Trang 14Biên So n: ng Quý Page 14
B c 2: Xem b ng routing table đ ki m tra đ ng static route m i thêm vào
R3#
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 2 subnets
S 172.16.1.0 [1/0] via 192.168.1.2
S 172.16.2.0 is directly connected, Serial0/0/1
C 192.168.1.0/24 is directly connected, Serial0/0/1
C 192.168.2.0/24 is directly connected, FastEthernet0/0
R3#
Chú ý: có th s d ng cách câu hình static route Ph n 8 ho c Ph n 9 đ c u hình đ nh tuy n trên các
router (có th chon 1 trong 2 cách đ c u hình static route)
T router R1, có th ping t i router R3?
Nh ng l nh ping này bây gi s thành công Lý do t i sao?
Trang 15
Biên So n: ng Quý Page 15
Lab c u hình đ nh tuy n đ ng (Dynamic Route)
Ph n 1: C m cáp, Xóa c u hình, và kh i đ ng l i Routers
B c 1: K t n i cáp nh mô hình
B c 2: Xóa toàn b c u hình c a Router
Xóa toàn b c u hình c a Router dùng l nh: erase startup-config và sau đó dùng l nh reload đ kh i
đ ng l i router Ch n no n u Router h i chúng ta có l u l i c u hình không.
Trang 16Biên So n: ng Quý Page 16
Ph n 3: Câu hình đ a ch cho các interface Serial và Ethernet
B c 1:Câu hình cho các interface trên router R1, R2, R3
C u hình đ a ch cho các interface trên router R1, R2, R3 v i đ a ch IP addresses nh mô hình
B c 2: ki m tra tr ng thái, đ a ch c a các interfaces trên router
S d ng l nh show ip interface brief
B c 3: C u hình interface Ethernet trên các PC1, PC2, PC3
C u hình đ a ch ip và default gateway cho các PC1, PC2, PC3 nh trong b ng đ a ch
B c 4: ki m tra k t n i t PC đ n default gateway
S d ng l nh ping t pc đ n đ a ch ip c a default gateway
Ph n 4: C u hình RIP
B c 1: B t ch c n ng dynamic routing trên router
B t ch c n ng đ nh tuy n đ ng RIP trên router, dùng l nh router rip trong global configuration mode
R1(config)#router rip
R1(config-router)#
B c 2: Khai báo các đ a ch m ng network addresses
Khai báo đ a ch các m ng k t n i tr c ti p v i router, s d ng l nh network
%SYS-5-CONFIG_I: Configured from console by console
R2#copy run start
B c 4: : C u hình RIP trên router R3 s d ng l nh “router rip” và “network”
R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.5.0
Trang 17Biên So n: ng Quý Page 17
R3(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
R3# copy run start
Ph n 5: Ki m tra RIP Routing
B c 1: S d ng l nh “Show ip route” đ ki m tra b ng đ nh tuy n trên t t c các router
R1#show 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.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, Serial0/0/0
C 192.168.2.0/24 is directly connected, Serial0/0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/0
C 192.168.4.0/24 is directly connected, Serial0/0/1
C 192.168.4.0/24 is directly connected, Serial0/0/1
C 192.168.5.0/24 is directly connected, FastEthernet0/0
T router R1, có th ping t i router R3?
Nh ng l nh ping này bây gi s thành công Lý do t i sao?
Trang 18
Biên So n: ng Quý Page 18
Lab Câu Hình Switch C B n
Trang 19Biên So n: ng Quý Page 19
Ph n 1: K t n i t i Switch
B c 1: k t n i S1 and PC1
• s d ng cáp console, k t n i port RS 232 trên PC1 t i port console trên switch S1
• ch n PC1 và sau đó ch n Desktop tab Ch n Terminal trên Desktop tab
• gi c u hình m c đ nh và ch n OK: Bits Per Second = 9600 Data Bits = 8 Parity = None Stop
Bits = 1 Flow Control = None
• bây gi chúng ta đã vào consoled c a S1 Nh n Enter đ n d u nh c c a Switch
B c 2: ki m tra k t qu
Ph n 2:
LAB 1:
B c 1: trong user EXEC mode, đánh l nh “?” Li t kê các l nh s d ng trong mode này
Trong user EXEC mode, câu l nh s b gi i h n và v i ch m c đích là ki m tra
B c 2: s d ng l nh enable vào ch đ privileged EXEC mode
Switch>enable
Switch#
Chuy n t > sang #
B c 3: trong privileged EXEC mode, đánh l nh “?” Li t kê các l nh s d ng trong mode này
B c 4: vào ch đ global configuration mode
Switch#configure terminal
Switch(config)#
B c 5: trong global configuration mode, đánh l nh “?”.Li t kê các l nh s d ng trong mode này
B c 6: c u hình hostname cho switch là “S1”
Trang 20Biên So n: ng Quý Page 20
S d ng l nh ip address và no shutdown đ khai báo đúng IP address/subnet mask và activate
interface
S1(config-if)#ip address 172.17.99.11 255.255.255.0
S1(config-if)#no shutdown
B c 9: Ki m tra LANs qu n lý v a cài đ t
Ki m tra cài đ t trên Interface VLAN 99
S1#show interface vlan 99
Vlan99 is up, line protocol is up
Hardware is EtherSVI, address is 001b.5302.4ec1 (bia 001b.5302.4ec1)
Internet address is 172.17.99.11/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:06, output 00:03:23, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
4 packets input, 1368 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicast)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
1 packets output, 64 bytes, 0 underruns
0 output errors, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
B c 10: vào mode c u hình cho port Fa0/18
S1(config-if)#interface fa0/18
S1(config-if)#
B c 11: đ t ch đ port là mode access
S d ng l nh switchport mode access
S1(config-if)#switchport mode access
B c 12: gán VLAN99 t i port
C u hình port Fa0/18 là thành viên c a VLAN 99, s d ng l nh switchport access vlan 99
S1(config-if)#switchport access vlan 99
B c 13: thoát c u hình interface configuration mode
S d ng l nh exit đ thoat ch đ interface configuration mode và vào ch đ global configuration mode
B c 14: t m t kh u truy c p cho Switch
Vào ch đ config-line mode t console t m t kh u login là cisco Sau đó c u hình vty lines 0 to 15
v i m t kh u cisco
Trang 21Biên So n: ng Quý Page 21
S1#configure terminal
Enter the configuration commands, one for each line When you are finished,
return to global configuration mode by entering the exit command or pressing
t m t kh u enable secret password là class M t kh u này b o v truy c p t i privileged EXEC mode
S1(config)#enable secret class
B c 15: L u l i c u hình
L u file c u hình trong Ram vào NVRAM c a switch đ đ m b o c u hình trên switch s không m t đi khi
t t switch
S1#copy running-config startup-config
Destination filename [startup-config]?[Enter] Building configuration [OK]
S1#
B c 16: Ki m tra l i k t qu Các l nh đã c u hình b ng l nh “Show running-config”
Switch# show running-config
B c 17: Ki m tra file c u hình trong NVRAM
Xem c u hình trong NVRAM, s d ng l nh show startup-config trong privileged EXEC mode
S1#show startup-config
B c 1: ki m tra Cisco IOS software version đang ch y trên switch
S1#show version
Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc
Compiled Wed 12-Oct-05 22:05 by pt_team
<output omitted>
The version is listed in the first line
B c 2: ki m tra Cisco IOS images trên flash memory
S1#show flash
Directory of flash:/
3 -rw- 4414921 <no date> c2960-lanbase-mz.122-25.FX.bin
2 -rw- 4670455 <no date> c2960-lanbase-mz.122-25.SEE1.bin