Professional Documents
Culture Documents
Lab Tong Hop CCNA PDF
Lab Tong Hop CCNA PDF
Mc Tiu :
- Gip hc vin bt u lm quen vi cc lnh c bn trn Cisco IOS
- n tp li cc lnh lin quan n : t IP cho Switch, cc loi mt khu,
Port-Security
Lab cu hnh Switch c bn:
II.
Yu cu :
-S dng Packet Tracer kt ni m hnh nh trn
-Xa ton b cu hnh hin ti ca Swicth
-Cc lnh xem thng tin
-Cu hnh hostname, a ch IP
-Cc loi mt khu
-Tc v duplex
-Tnh nng PortSecurity
1. Kt ni cp v xa cu hnh cho Switch:
- S dng ng cp thng kt ni t PC n Switch
- S dng PC kt ni vo cng console ca Switch hoc vo tab CLI ca thit b
tin hnh cu hnh
- Xa cu hnh Switch
Switch> enable
Switch# erase startup-config
Switch# reload
2. Cc lnh kim tra thng tin :
-
Switch#show running-config
-
Switch#show version
-
Ni dung b nh Flash
Switch#show flash:
Hoc
Switch#dir flash:
Switch#dir flash:
6 drwx 4480 Mar 1 1993 00:04:42 +00:00 html
618 -rwx 4671175 Mar 1 1993 00:06:06 +00:00 c2960-lanbase-mz.122-25.SEE3.bin
32514048 bytes total (24804864 bytes free)
-
Switch#show startup-configure
startup-config is not present
-
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#exit
S1#copy running-config startup-config
Destination filename [startup-config]? (enter)
Building configuration...
[OK]
S1#show startup-config
Using 1170 out of 65536 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname S1
!
<output omitted>
3. Cc loi mt khu :
-
S1(config)#line console 0
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
-
S1(config)#line vty 0 4
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
-
S1#configure terminal
S1(config)#interface fastethernet 0/18
S1(config-if)#speed 100
S1(config-if)#duplex auto
S1(config-if)#end
-
Lu cu hnh
configuration...
S1#show mac-address-table
6. Cu hnh tnh nng Port Security :
-
Tnh nng Port Security c th gip ta qun l vic truy cp vo tng cng ca
Switch gm: PC c MAC no c lt ni n cng, tng s MAC c kt ni
Cc bc cu hnh nh sau
III.
- Cc cu lnh tr gip
- Cc cu lnh kim tra
- Cu hnh tn switch
- Cu hnh password
- Cu hnh a ch IP v default gateway
3. Cu hnh Hostname :
Switch# configure terminal
Switch(config)# hostname 2960Switch
10
4. Cc loi password
2960Switch(config)#enable password cisco
2960Switch(config)#line console 0
2960Switch(config-line)#login
2960Switch(config-line)#password cisco
2960Switch(config-line)#exit
2960Switch(config-line)#line vty 0 4
2960Switch(config-line)#login
2960Switch(config-line)#password cisco
2960Switch(config-line)#exit
2960Switch(config-if)# ip address
172.16.10.2 255.255.0.0
2960Switch(config)#ip default-gateway
172.16.10.1
2960Switch(config-if)# description
Thm mt on m t cho interface ny.
FinaceVLAN
* Ch : i vi dng switch 2960 c 12 hoc 24 Fast Ethernet port th tn ca cc port
11
12
Gii thiu :
Bo mt l mt yu t rt quan trng trong network,v th n rt c quan tm v s dng
mt khu l mt trong nhng cch bo mt rt hiu qu.S dng mt khu trong router c th
gip ta trnh c nhng s tn cng router qua nhng phin Telnet hay nhng s truy cp trc
tip vo router thay i cu hnh m ta khng mong mun t ngi la.
I.
Mc ch :
Ci t c mt khu cho router, khi ng nhp vo, router phi kim tra cc loi mt khu
cn thit.
II.
III.
M t bi lab v hnh :
IV.
V.
13
VII.
Mt khu l TTG
14
Mt khu l cisco
Router(config)#exit
Lu : khi ta ci t cng lc 2 loi mt khu enable secret v enable password th
Router s kim tra mt khu c hiu lc mnh hn l enable secret. Khi mt khu secret khng
cn th lc mt khu enable password s c kim tra, hy th kim tra li bng cch thot
ra li mode User ri vo li mode Privileged bng lnh enable Router s hi mt mu khai bo
bng lnh enable secret
Cu hnh mt khu bng lnh Line
Mt khu cho ng Telnet (Line vty)
Router(config)#line vty 0 4
password l class
Router(config-line)#password class
Router(config-line)#login
m ch ci t password
Router(config-line)#exit
Mt khu cho cng console :
Router(config)#line console 0
m ng Line Console
cng Console th 0
Router(config-line)#password cert
password l cert
m ch ci t password
Router(config-line)#login
Router(config-line)#exit
password l router
Router(config-line)#login
Router(config-line)#exit
Sau khi t xong mt khu,ta thot ra ngoi ch Privileged mode, dng lnh Show runningconfig xem li nhng password cu hnh :
Router#show running-config
Building configuration...
Current configuration : 550 bytes
version 12.1
no service single-slot-reload-enable
15
password ci t ch khng m ha
hostname Router
password secret c
m ha mc nh cp 5
enable password cisco
!
line con 0
password cert
login
line aux 0
password router
login
line vty 0 4
password class
login
!
End
Dng lnh Show running-config ta s thy c cc password c u hnh, nu mun m ha
tt c cc password ta dng lnh Service password-encryption trong mode config.
Router(config)#service password-encryption
Router(config)#exit
16
Building configuration...
enable secret 5 $1$6bgK$prmkIPVMht7okiCQ5EQ2o/
enable password 7 094F471A1A0A
password c m ha cp 7
line con 0
password c m ha cp 7
password 7 15110E1E10
login
line aux 0
password 7 060503205F5D
login
!
End
Password:cert
Router>ena
Password:TTG
Router#
Cc loi mt khu khc nh Line Vty ,Line aux s c kim tra khi s dng n chc nng
VIII.
17
Nu mun g b mt khu truy cp cho loi mt khu no ta dng lnh no trc cu lnh
gn cho loi mt khu .
V d : Mun g b mt khu secret cho router
Router(config)#no enable secret
Router(config)#exit
Bng cch tng t,ta c th g b mt khu cho cc loi mt khu khc.
Ph lc cc lnh lin quan n bi lab :
IX.
1. Cc ch cu hnh ca router
Router>
Ch User.
Router#
Ch Privileged (cng c gi l ch
EXEC)
Router(config)#
Ch Global Configuration
Router(config-if)#
Ch Interface Configuration
Router(config-subif)#
Ch Subinterface Configuration
Router(config-line)#
Ch cu hnh Line.
Router(config-router)#
Ch Router Configuration
Chuyn vo ch cu hnh ca
Interface S0/0/0.
ISP
l ty chn).
Router(config-if)# ip address
192.168.10.1 255.255.255.0
18
Router(config-if)# no shutdown
Bt Interface.
Chuyn vo ch cu hnh ca
0/0
Router(config-if)# description
Accounting LAN
ty chn)
Router(config-if)# ip address
192.168.20.1 255.255.255.0
Interface
Router(config-if)# no shutdown
Bt Interface
Router(config-line)# logging
Synchronous
19
Gii thiu :
Telnet l mt giao thc u cui o( Vitural terminal),l mt phn ca chng giao thc
TCP/IP.Giao thc ny cho php to kt ni vi mt thit b t xa v thng qua kt ni ny, ngi
s dng c th cu hnh thit b m mnh kt ni vo.
II.
Mc ch :
Bi thc hnh ny gip bn hiu v thc hin c nhng cu hnh cn thit c th thc
hin cc phin Telnet t host vo Router hay t Router vo Router.
III. M t bi lab v hnh :
I.
IV.
20
Router TTG1:
TTG1(config)#enable password cisco
TTG1(config)#exit
Bn thc hin li vic kt ni Telnet, t Host vo Router TTG1:
C:\Documentsand settings\Administrator>Telnet 10.0.0.1
User Access Verification
Password: TTG1
21
TTG1>ena
Password: cisco
TTG1#
T y bn c th thc hin vic thay i cu hnh cho cc thit b m khng cn phi thng
qua cng Console.
Kim tra vic Telnet bng lnh Show line
TTG1#show line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
* 0 CTY
5
0
0/0
1 AUX 9600/9600 0
0
0/0
* 2 VTY
- 1
0
0/0
* 3 VTY
- 7
0
0/0
* 4 VTY
- 4
0
0/0
5 VTY
- 1
0
0/0
6 VTY
- 0
0
0/0
Du * biu th nhng line bn ang s dng Telnet,theo nh bng trn,bng ang s dng 3
dng line Telnet qua li gia 2 Router TTG1 qua cc port 2,3,4.
Ct Uses ch s ln bn s dng ng line .
Thot khi cc phin Telnet : chng ta s dng lnh Exit hay lnh Disconnect
Ngt mt kt ni Telnet : chng ta s dng lnh clear line
Mc d Telnet gip mnh c th qun l thit b t xa nhng c kh nng l mt khu
qun tr thit b do Telnet khng m ha d liu khi truyn ra bn ngoi, cc bn c th tham
kho thm video TelnetvsSsh ti a ch
http://www.mediafire.com/download.php?y2z4ghm0wmw thy r hn
Vy an ton hn ta nn s dng dch v SSH thay cho Telnet khi mun cu hnh thit b t xa,
cch cu hnh nh sau :
Cu hnh SSH :
To username/password chng thc trong phin SSH, trong trng hp ny l
TTG/123
TTG1(config)# username TTG password 123
Khai bo domain name tham gia vo qu trnh to kha m ha d liu trong phin
SSH
TTG1(config)# ip domain-name truongtan.edu.vn
To kha m ha d liu
TTG1(config)#crypto key generate rsa
Chuyn sang s dng SSH version 2
TTG1(config)#ip ssh version 2
22
V.
23
Router(config-line)# login
TTG1>telnet TTG2
TTG1>telnet 172.16.20.1
TTG1>TTG2
TTG1>connect TTG2
TTG1>172.16.20.1
TTG2>exit
TTG2>logout
ca router TTG1
TTG1>resume
TTG1>disconnect
Hin th nhng kt ni m bn m
n cc router khc.
TTG1#show users
24
2. Cu hnh SSH
TTG1(config)# username TTG password
123
TTG1(config)# ip domain-name
truongtan.edu.vn
To kha m ha d liu
TTG1(config)#line vty 0 4
TTG1(config-line)#login local
TTG1(config-line)#transport input ssh
25
26
27
28
- Vo Edit > Preferences > Dynamips > Trong mc Excutable Path chn ng dn n tp tin
dynamip-wxp.exe trong th mc ci t GNS3 , sau bm vo nt Test kim tra li hot
ng ca Dynamip
29
3.Bt u cu hnh :
Nhn phi chut ln thit b chon Console bt u cu hnh
30
31
- Click vo Cloud,ti Generic Ethernet NIO chn card mng router cn kt ni n,nu
khng r card no c th dng Network device list.cmd pht hin,
32
33
I.
YU CU
1. S dng Packet Tracer cu hnh bi Lab bn
2. t mt khu Console l Cisco, dch v Telnet,Enable Secret cho Center Router,SW1,SW2 l
class
3. S dng lnh service password-encryption m ha cc loi mt khu khng c m ha
4. Cu hnh a ch IP nh m hnh bn
5. T cc PC th telnet n SW1,SW2,Router
6. Chuyn sang s dng SSH thay cho Telnet trn CenterRouter vi username: TTG ,
password:cisco
7. T cc PC th ssh n cc router
8. Video tham kho cu hnh : http://www.mediafire.com/download.php?zx2xmdeitmw
II.
CC BC THC HIN:
34
35
- SW2:
Switch>enable
Switch#configure terminal
Switch(config)#hostname SW2
- t mt khu cho cng console
SW2(config)#line console 0
SW2(config-line)#login
SW2(config-line)#password cisco
SW2(config-line)#exit
- t mt khu cho dch v Telnet
SW2(config)#line vty 0 4
SW2(config-line)#login
SW2(config-line)#password class
SW2(config-line)#exit
- t mt khu khi chuyn t mode User sang Privilege
SW2(config)#enable secrect class
3. S dng lnh service password-encryption m ha cc loi mt khu khng c m ha :
- S dng lnh show running-configure xem li thng tin cc mt khu hin ti
- m ha cc mt khu khng c m ha mc nh, ta c th s dng lnh service
password-encryption chuyn sang Type-7 password. Ln lt trn Center Router, SW1,
SW2 di chuyn sang mode config v nhp lnh service password-encryption
CenterRouter(configure)# service password-encryption
SW1(configure)# service password-encryption
SW2(configure)# service password-encryption
- S dng li lnh show running-configure v so snh tnh trng cc mt khu so vi trc lc
nh lnh
CenterRouter#show running-config
Building configuration...
Current configuration : 766 bytes
!
version 12.4
service password-encryption
!
hostname CenterRouter
!
!
!
36
37
4. Cu hnh a ch IP nh m hnh bn :
- CenterRouter:
CenterRouter(config)#interface fa0/1
CenterRouter (config-if)#ip address 192.168.1.1 255.255.255.0
CenterRouter (config-if)#no shutdown
CenterRouter (config)#interface fa0/0
CenterRouter (config-if)#ip address 192.168.2.1 255.255.255.0
CenterRouter (config-if)#no shutdown
- SW1:
SW1(config)#interface vlan 1
SW1(config-if)#ip address 192.168.1.5 255.255.255.0
SW1(config-if)#exit
SW1(config)#ip default-gateway 192.168.1.1
- SW2:
38
SW2(config)#interface vlan 1
SW2(config-if)#ip address 192.168.2.5 255.255.255.0
SW1(config-if)#exit
SW2(config)#ip default-gateway 192.168.2.1
- Cc PC trn SW2 s nhn IP ng t DHCP Server li a ch 192.168.2.10
+ Cu hnh a ch cho DHCP Server : Desktop IP Configuration
39
40
41
42
LAB 6: WIRELESS
I.
Yu cu :
Cc bc tin hnh :
43
44
45
46
47
48
49
50
51
III. Cu hnh :
Ta cu hnh cc bc nh sau trn 2 router DN v HCM:
Bc 1 : Cu hnh cho php truy cp http v https
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
-Bt 1 trong 2 dch v HTTP hoc HTTPS
HTTP :
Router(config)# ip http server
Hoc HTTPS :
52
53
54
55
- Tm thi tt chc nng chn Pop-up Blocker trn trnh duyt bng cch vo Tool Pop-up
Blocker Turn-Off Pop-Up Blocker
- By gi trn PC ta truy cp vo Web https://172.16.1.1 login vo giao din Web ca
Router. Ta nhp username v password ca bc 2 chng thc,sau khi chng thc thnh cng
ta c giao din ca SDM nh sau :
56
- Tip theo ta vo Edit > Preferences > chn Preview commands before delivering to router nh
vy ta c th xem trc cc lnh SDM sp chuyn xung router cu hnh
57
58
Next
59
60
61
(Chn interface fa0/1 l Passive v trnh qung b thng tin nh tuyn nhm sang nhm
khc)
Sau lp li bc 8 trn router HCM
III.
Bi tp lm thm :
IV.
62
63
64
+ Truongtan.edu.vn c Ip l 2.2.2.2
65
*a ch mng
DHCPServer(dhcp-config)#default-router 192.168.1.1
*Gateway
DHCPServer(dhcp-config)#dns-server 192.168.1.5
*DNS Server
DHCPServer(dhcp-config)#exit
66
-Thng thng khi cp pht IP ng ta thng dnh ring khong 10 IP u tin khng cp pht
trong DHCP dnh cho cc thit b, Server cn IP tnh, trong trng hp ny ta s loi khng cp
pht cc IP t 192.168.1.1 n 192.168.1.10
DHCPServer(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
3.Kim tra li cu hnh DHCP trn PC :
-DHCP client s cu hnh ch nhn IP ng nu thy thng tin IP ang c cp pht nh
bn di chng t DHCP hot ng tt
-Kim tra li cc IP c cp pht trn DHCP server bng lnh show ip dhcp binding
DHCPServer# show ip dhcp binding
IP address
Client-ID/
Lease expiration
Type
Hardware address
192.168.1.11
0060.5C66.56B6
--
Automatic
67
-Nh chng ta thy ngoi vic cp pht t ng IP, DHCP cn c th cp pht a ch DNS
server, domain name kim tra nh sau :
+ DNS bng lnh nslookup
+Thng tin DNS, DHCP, Domain name : ipconfig /all
( hin ti PacketTracer cha h tr tt nhng lnh ny )
DHCP RELAY
I.
Gii thiu :
-Giao thc DHCP l 1 giao thc c s dng rt ph bin trong vic cp pht IP ng
cho cc my client, cc bn c th xem li cch cu hnh trn router Cisco ti y
-Nh chng ta bit nhn c Ip t DHCP Server cc my tnh phi gi broadcast
gi tin DHCP Discovery trn mng ca mnh, vy iu g xy ra khi DHCP Server v
Client khng nm cng mng v mc nh router chn d liu dng broadcast. Trong
trng hp ny ta s c 2 cch gii quyt:
+Mi mng s c t mt DHCP server : cch ny khng hiu qu v s c qu nhiu
DHCP server khi cng ty trin khai nhiu mng gy kh khn trong vic qun l v trin
khai
+S dng mt DHCP Server cp pht Ip ng cho tt c cc mng thng qua k thut
DHCP Relay: cch ny c nhiu u im hn ch cn trin khai mt DHCP cng 1 lc
cp pht ip cho nhiu mng kt hp vi lnh ip helper-address bt dch v DHCP
Relay, khi cu hnh lnh ny Router khi nhn c d liu UDP broadcast trn cng ca
mnh s unicast n mt Ip nh trc (IP cu DHCP Server trong trng hp ny)
Cch hot ng ca DHCP Relay:
68
2. DHCP Relay Agent trn cng mng vi Client s nhn gi tin v chuyn n DHCP server
bng tn hiu Unicast.
3. DHCP server dng tn hiu Unicast gi tr DHCP Relay Agent mt gi DHCP Offer
69
5. Sau khi nhn c gi tin DHCP Offer, client Broadcasts tip gi tin DHCP Request.
6. DHCP Relay Agent nhn gi tin DHCP Request t Client v chuyn n DHCP server
cng bng tn hiu Unicast.
70
7. DHCP server dng tn hiu Unicast gi tr li cho DHCP Relay Agent mt gi DHCP ACK.
8. DHCP Relay Agent Broadcasts gi tin DHCP ACK n Client. n y l hon tt quy trnh
tip nhn x l v chuyn tip thng tin ca DHCP Relay Agent.
71
II.
M hnh bi lab :
72
-Trn 2 router lu cu hnh bng lnh copy run start sau tin hnh tt router v gn them
module WIC-2T b sung thm cng Serial cho router, sau s dng cp Serial kt ni
theo ng m hnh
DHCP Router :
DHCPServer(config)#interface s0/0/0
DHCPServer(config-if)#ip address 192.168.2.1 255.255.255.0
DHCPServer(config-if)#no shutdown
*Cp xung ng h cho DCE
73
74
*a ch mng
DHCPServer(dhcp-config)#default-router 192.168.3.1
*Gateway
DHCPServer(dhcp-config)#dns-server 192.168.1.5
*DNS Server
DHCPServer(dhcp-config)#exit
-Loi 10 IP u tin khng cp pht
DHCPServer(config)#ip dhcp excluded-address 192.168.3.1 192.168.3.10
-Cu hnh DHCP Relay trn interface fa0/1 ca router TTG
TTGRouter(config)#interface fa0/1
TTGRouter(config-if)#ip helper-address 192.168.2.1
-Kim tra li vic nhn IP trn PC mng 192.168.3.0
75
*IP ca DHCPServer
III.
-Lp thc hnh thm 2 bi lab ny bng cch cu hnh thng qua SDM trn phn mm GNS3,
tham kho thm video ti a ch
IV.
DHCPServer (dhcp-config)#network
192.168.1.0 255.255.255.0
DHCPServer(dhcp-config)#default-router
192.168.1.1
DHCPServer(dhcp-config)#dns-server
192.168.1.5
Khai bo DNS
76
77
Gii thiu :
nh tuyn (Routing) l 1 qu trnh m Router thc thi v s chuyn mt gi tin(Packet)
t mt a ch ngun (soucre)n mt a ch ch(destination) trong mng.Trong qu trnh ny
Router phI da vo nhng thng tin nh tuyn a ra nhng quyt nh nhm chuyn gi tin
n nhng a ch ch nh trc.C hai loI nh tuyn c bn l nh tuyn tnh (Static
Route) v nh tuyn ng (Dynamic Route)
nh tuyn tnh (Static Route) l 1 qu trnh nh tuyn m thc hin bn phI cu
hnh bng tay(manually) tng a ch ch c th cho Router.
Mt dng mc nh ca nh tuyn tnh l Default Routes, d ng ny c s dng
cho cc mng ct (Stub Network)
nh tuyn ng (Dynamic Route) y m mt dng nh tuyn m khi c cu hnh
dng ny, Router s s dng nhng giao thc nh tuyn nh RIP(Routing Information
Protocol),OSPF(Open Shortest Path Frist),IGRP(Interior Gateway Routing Protocol) thc
thi vic nh tuyn mt cch t ng (Automatically) m bn khng phi cu hnh trc tip bng
tay.
II.
M t bi lab v hnh :
- hnh bi lab nh hnh, PC n i vi router bng cp cho. Hai router ni vi nhau bng cp
serial. a ch IP ca cc interface v PC nh hnh v.
- Bi lab ny gip bn thc hin cu hnh nh tuyn tnh cho 2 router, lm cho 2 router c kh
nng nhn thy c nhau v c cc mng con trong n.
2. Cu hnh nh tuyn tnh (Static Route)
Chng ta cu hnh cho cc router v PC nh sau :
Router TTG1 :
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
78
TTG1(config)#interface fa0/0
TTG1(config-if)#ip address 10.0.0.1 255.255.255.0
TTG1(config-if)#no shutdown
TTG1(config-if)#exit
TTG1(config)#interface s0/0/0
TTG1(config-if)#ip address 192.168.0.1 255.255.255.0
TTG1(config-if)#no shutdown
TTG1(config-if)#exit
Router TTG2 :
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG2(config)#interface fa0/0
TTG2(config-if)#ip address 11.1.0.1 255.255.255.0
TTG2(config-if)#no shutdown
TTG2(config-if)#exit
TTG2(config)#interface s0/0/0
TTG2(config-if)#ip address 192.168.0.2 255.255.255.0
TTG2(config-if)#no shutdown
TTG2(config-if)#exit
Host 1 :
IP 10.0.0.2
Subnetmask: 255.255.255.0
Gateway: 10.0.0.1
Host 2 :
IP: 10.0.1.2
79
Subnetmask: 255.255.255.0
Gateway:10.0.1.1
- Chng ta tin hnh kim tra cc kt ni bng cch :
Ping t Host1 sang a ch 10.0.0.1
80
TTG2#
00:33:59: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3
00:33:59: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable
00:34:04: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3
00:34:04: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable
00:34:09: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3
00:34:09: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable
00:34:14: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3
00:34:14: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable
- Ping t Host 1 sang a ch 10.0.1.1
81
82
- Chng ta kim tra bng nh tuyn ca cc router bng lnh show ip route
TTG1#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
10.0.0.0/24 is subnetted, 2 subnets
C
83
84
end
TTG2#show run
Building configuration...
ip classless
ip route 10.0.0.0 255.255.255.0 Serial0/0/0
ip http server
- Bn thc hin thnh cng vic nh tuyn cho 2 Router kt ni c vi nhau c cc mng
con ca chng, bn cng c th m rng hnh ra thm vi 3, 4 hay 5 hop thc hnh vic
cu hnh nh tuyn tnh tuy nhin bn thy r vic cu hnh ny tng i rc ri v di dng
nht l i vi mi trng Internet bn ngoi,v vy bn s phi thc hin vic cu hnh nh
tuyn ng cho Router bi sau.
III.
Trong :
255.255.255.0 172.16.10.2
Trong :
85
0.0.0.0 172.16.10.2
M ch debug ti Router
86
YU CU
87
LAB 10 : RIPv2
I.
Gii thiu :
RIP (Routing Information Protocol) l mt giao thc nh tuyn dng qung b thng tin v a
ch m mnh mun qung b ra bn ngoi v thu thp thng tin hnh thnh bng nh tuyn (Routing
Table)cho Router. y l loi giao thc Distance Vector s dng tiu ch chn ng ch yu l da vo
s hop (hop count) v cc a ch m Rip mun qung b c gi i dng Classful (i vi RIP verion
1) v Classless (i vi RIP version 2).
V s dng tiu ch nh tuyn l hop count v b gii hn s hop l 15 nn giao thc ny ch c s
dng trong cc mng nh (di 15 hop).
M t bi lab v hnh :
II.
III.
Mc tiu :
88
IV.
-Trc khi cu hnh nh tuyn bng RIPv2 cho 2 router chng ta s thy ngi t PC1 khng th ping
c n router TTG2 v l do Router TTG2 thng tin v mng 10.0.0.0/24 ( LAN1) nm u
- Sauk hi cu hnh RIPv2 th PC1 phi ping c n TTG2
Cc bc cu hnh :
- Trc tin bn cu hnh cho cc thit b nh sau:
Router TTG1
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface serial 0/0/0
TTG1(config-if)#ip address 192.168.1.1 255.255.255.0
TTG1(config-if)#no shutdown
TTG1(config-if)#clock rate 64000
TTG1(config-if)#exit
TTG1(config)#interface fastethernet 0/0
TTG1(config-if)#ip address 10.0.0.1 255.255.0.0
TTG1(config-if)#no shutdown
TTG1(config-if)#exit
Router TTG2
Router>enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface serial 0/0/0
TTG2(config-if)#ip address 192.168.1.2 255.255.255.0
TTG2(config-if)#no shutdown
TTG2(config-if)#clock rate 64000
TTG2(config-if)#exit
TTG2(config)#interfacae fastethernet 0/0
TTG2(config-if)#ip address 11.0.0.1 255.255.255.0
89
TTG2(config-if)#no shutdown
TTG2(config-if)#exit
Host1 :
IP 10.0.0.2
Subnet mask:255.255.255.0
Gateway:10.0.0.1
Host2 :
IP: 11.0.0.2
Subnet mask:255.255.255.0
Gateway:11.0.0.1
- Bn thc hin vic kim tra cc kt ni bng lnh Ping
Ping t Host1 sang a ch 10.0.0.1
90
Ping a ch 192.168.0.2
Ping a ch 192.168.0.1
91
92
TTG2#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
11.0.0.0/24 is subnetted, 1 subnets
C
C
93
Nhn xt : Bn thy rng thng tin a ch ca cc mng m bn thc hin lnh Ping khng thnh
cng khng c lu trn bng nh tuyn
TTG1(config)#router rip
TTG1(config-router)#network 192.168.0.0
TTG1(config-router)#network 10.0.0.0
TTG1(config-router)#exit
TTG2(config)#router rip
TTG2(config-router)#network 11.0.0.0
TTG2(config-router)#network 192.168.0.0
TTG2(config-router)#exit
- Bn xem li bng thng tin nh tuyn:
TTG1#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
10.0.0.0/24 is subnetted, 1 subnets
C
TTG2#show ip route
94
C
C
Nhn xt : Bn thy rng trn bng thng tin nh tuyn, Router TTG1 lin kt RIP vi mng
11.0.0.0/8 qua cng Serial 0(192.168.0.2) v Router TTG2 lin kt vi mng 10.0.0.0/8 qua cng
Serial 0(192.168.0.1)
Ch : V Rip gi i ch theo dng classfull nn subnet mask s c s dng defaul i vi cc lp
mng.
- Lc ny bn thc hin li lnh Ping gia cc Router v cc Host:
T Host1 bn thc hin lnh Ping:
95
96
- Bn thy rng cc kt ni thnh cng. n y bn hon tt vic cu hnh RIP cho mng
trn c th trao i thng tin vi nhau.Nhng tm hiu r hn v RIP bn thc hin tip tc
cc bc cu hnh nh sau:
- Bn gi nguyn cu hnh ca Router TTG 1 v thay i cu hnh ca Router TTG 2 t RIP
version 1 sang RIP version 2 v kim tra :
TTG2(config)#router rip
TTG2(config-router)#version 2
- Bn m ch debug trn 2 Router kim tra gi tin:
TTG1#debug ip packet
IP packet debugging is on
TTG2#debug ip packet
IP packet debugging is on
- Lc ny bn thc hin lnh Ping t Host 1 vo cc a ch khng lin kt trc tip vi n c chy
RIP
TTG2#
01:49:58: IP: s=10.0.0.2 (Serial0/0/0), d=192.168.0.2 (Serial0/0/0), len 60, rcvd 3
97
TTG2#
01:55:30: IP: s=10.0.0.2 (Serial0/0/0), d=11.0.0.1, len 60, rcvd 4
01:55:30: IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable
01:55:35: IP: s=10.0.0.2 (Serial0/0/0), d=11.0.0.1, len 60, rcvd 4
01:55:35: IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable
01:55:40: IP: s=10.0.0.2 (Serial0/0/0), d=11.0.0.1, len 60, rcvd 4
01:55:40: IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable
- Nhng d liu khi bn m ch debug cho thy khi bn thc hin lnh Ping t Host1 n cc a ch
nh:192.168.0.2 v 11.0.0.1 gi tin u nhn c ti im ch,tuy nhin gi tin tr v ti a ch ny
khng tm c a ch 10.0.0.2(Host1) t bng nh tuyn ca Router TTG 2(unroutable) do Router
ny c cu hnh RIP version 2
TTG2#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
98
99
- Th kim tra li kt ni gia 2 PC sau khi chuyn RIP version trn TTG1 bng lnh Ping v kt
qu lnh phi thnh cng
Ph lc cc lnh lin quan n bi lab :
V.
1. Cu lnh ip classless :
Router(config)# ip classess
Router(config)# no ip classess
100
Router(config-router)# no network
w.x.y.z
tuyn ca RIP.
Router(config-router)# version 2
Router(config-router)# version 1
version 1
version 2
101
version 1 2
Router(config-router)# no auto-
summary
Router(config-router)# passive-
interface s0/0/0
Router(config-router)# neighbor
a.b.c.d
nh tuyn
Router(config-router)# no ip split-
horizon
Router(config-router)# ip split-horizon
Router(config-router)# maximum-
paths x
x (4 l mc nh, cn 6 s l ti a).
Router(config-router)# default-
information orginate
4. X l li vi RIP :
102
Router#show ip route
103
YU CU
1) Hc vin s thc hnh trn thit b Cisco 2801
2) S dng mng 172.(15+X).0.0/16 chia subnet vi X l s th t ca nhm
3)S dng RIPv2 nh tuyn
4)Cc PC phi i c internet
5)Sauk khi nh tuyn xong, kim tra li thng tin nh tuyn bng cc lnh :
+ Show ip route
+ Ping ra internet t PC v router
+ T PC dng lnh tracert ra internet lit k ng i t ngun n ch
104
Gii thiu
CDP(Cisco Discovery Protocol) l 1 giao thc ca Cisco, giao thc ny hot ng lp
2(data link layer) trong m hnh OSI, n c kh nng thu thp v ch ra cc thng tin ca cc
thit ln cn c kt ni trc tip, nhng thng tin ny rt cn thit v hu ch cho bn trong
qu trnh x l s c mng.
Mc ch
Bi thc hnh ny gip bn hiu r v giao thc CDP v cc thng s lin quan, nm c
chc nng ca cc lnh trong giao thc ny.
Ch : CDP ch cung cp thng tin ca thit b kt ni trc tip vi n, tri vi cc giao thc
nh tuyn. Giao thc nh tuyn c th cung cp thng tin ca cc mng xa, hay kt ni gin
tip qua nhiu router.
II.
III.
M t bi lab v hnh
Router TTG1 :
Router> enable
Router#configure terminal
Router<config>#hostname TTG1
TTG1<config>#interface serial 0/0/0
TTG1<config-if>#ip address 192.168.1.2 255.255.255.0
105
TTG1<config-if>#no shutdown
TTG1<config-if>#clock rate 64000
TTG1<config-if>#exit
TTG1<config>#interface serial 0/0/1
TTG1<config-if>#ip address 192.168.2.2 255.255.255.0
TTG1<config-if>#no shutdown
TTG1<config-if>#clock rate 64000
TTG1<config-if>#exit
TTG1<config>#
Router TTG2 :
Router> enable
Router#configure terminal
Router<config>#hostname TTG2
TTG2<config>#interface serial 0/0/0
TTG2<config-if>#ip address 192.168.1.1 255.255.255.0
TTG2<config-if>#no shutdown
TTG2<config-if>#clock rate 64000
TTG2<config-if>#exit
TTG2<config>#
Router TTG3 :
Router> enable
Router#configure terminal
Router<config>#hostname TTG2
TTG2<config>#interface serial 0/0/0
TTG2<config-if>#ip address 192.168.2.1 255.255.255.0
TTG1<config-if>#no shutdown
TTG1<config-if>#clock rate 64000
TTG1<config-if>#exit
TTG1<config>#
Lu : V CDP l 1 giao thc ring ca Cisco nn n c mc nh khi ng, v vy khi
ta dng lnh Show run,nhng thng tin v giao thc ny s khng c hin th.Giao thc ny
c th hot ng trn c Router v Switch
V.
Lnh Show CDP neighbors : dng xem thng tin ca cc thit b xung quanh c
lin kt trc tip(lnh ny s dng trong mode Privileged)
TTG1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID
Local Intrfce Holdtme Capability Platform Port ID
106
TTG3
TTG2
Ser 0/0/1
Ser 0/0/0
149
134
R
R
2523
2500
Ser 0/0/1
Ser 0/0/0
Lnh Show CDP neighbors detail : dng xem chi tit thng tin ca cc thit b lin
kt trc tip.
TTG1#show cdp neighbors detail
------------------------Device ID: TTG3(thit b lin kt trc tip l TTG3)
Entry address(es): IP address: 192.168.2.1(a ch cng lin kt trc tip)
Platform: cisco 2523, Capabilities: Router (loi thit b lin kt: Cisco Router 2523)
Interface: Serial0/0/1, Port ID (outgoing port): Serial0/0/1 (lin kt trc tip qua cng
Serial0/0/1)
Holdtime : 124 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong (Thng tin v h iu hnh ca thit b lin kt)
advertisement version: 2
------------------------Device ID: TTG2(thit b lin kt trc tip l TTG2)
Entry address(es): IP address: 192.168.1.1(a ch cng lin kt)
Platform: cisco 2500, Capabilities: Router(loi thit b lin kt l Cisco Router 2500)
Interface: Serial0/0/0, Port ID (outgoing port): Serial0/0/0 (lin kt qua cng Serial0/0/0)
Holdtime : 168 sec (thi gian gi gi tin l 168 sec)
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong(Thng tin chi tit v phin bn v h iu
hnh ca thit b)
advertisement version: 2
Lnh Show CDP interface : hin th thng tin CDP v tng cng,cch ng gi v c
timer,hold-time.
107
Lnh Show CDP traffic : hin th b m CDP bao gm s lng gi packet gi, nhn
v b li.
TTG1#show cdp traffic
CDP counters :
Total packets output: 128, Input: 115
108
109
TTG3#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
- S dng giao thc CDP t Router TTG3 xem thng tin v cc thit b lin kt trc tip:
TTG3#show cdp neighbors detail
------------------------Device ID: TTG1
Entry address(es):
IP address: 192.168.2.2
Platform: cisco 2500, Capabilities: Router
Interface: Serial0/0/1, Port ID (outgoing port): Serial0/0/1
Holdtime : 144 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JK8OS-L), Version 12.2(1d), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Sun 03-Feb-02 22:01 by srani
advertisement version: 2
- Bn thy r t Router TTG3 ta ping khng thy c Router TTG1 nhng dng giao thc CDP
bn vn nhn c thng tin ca thit b lin kt. y l u im ca giao thc CDP. u im
ny s rt hu ch cho bn khi x l s c mng.
VI. Ph lc cc lnh lin quan n bi lab :
Router#show cdp
Hin th thng tin ca CDP nh cc tham
s thi gian.
Router#show cdp neighbors
110
Router(config)#cdp holdtime x
Router(config)#cdp timer x
Router(config)#cdp run
Router(config-if)#cdp enable
Xa bng CDP.
Router#debug cdp ip
111
112
Gii thiu :
- Flash l 1 b nh c th xa, c dng lu tr h iu hnh v mt s m lnh.B nh
Flash cho php cp nht phn mm m khng cn thay th chip x l.Ni dung Flash vn c
gi khi tt ngun.
- Bi lab ny gip bn thc hin vic np IOS (Internetwork Operating System) Image t
Flash trong Router Cisco vo TFTP server to bn IOS Image d phng v np li IOS Image
t t TFTP sever vo Cisco Router chy t Flash(khi phc phin bn c hay update phin bn
mi) thng qua giao thc truyn TFTP (Trivial file transfer protocol)
II.
M t bi lab v hnh :
113
Cc bc thc hin :
Chng ta s cu hnh cho router TTG v PC (ng vai tr nh mt TFTP server) nh sau :
PC :
IP Address : 10.1.0.2
Subnetmask : 255.0.0.0
Gateway
: 10.1.0.1
Router TTG :
Router>enable
Router#configure terminal
Router(config)#hostname TTG
TTG(config)#interface fa0/1
TTG(config-if)#ip address 10.1.0.1 255.0.0.0
TTG(config-if)#no shutdown
TTG(config-if)#exit
114
115
Dng lnh Show Flash xem b nh Flash v lu tn file IOS li chun b copy
xung TFTP
TTG#show flash
System flash directory:
File Length Name/status
1 16505800 /c2500-jk8os-l.122-1d.bin
[16505864 bytes used, 271352 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)
a ch TFTP server
116
- Bn thc hin xong vic np IOS t Flash vo TFTP server, sau y bn thc hin
li vic np mt IOS c sn t TFTP server vo li flash ca mt Router.
t PC.
Gi s bn c 2 file IOS c sn trong TFTP server
117
tn hay a ch ni lu
Flash (TFTP Server)
Tn file ngun
Tn file ch
118
1 8039140 /c2500-i-l.121-26.bin
[8039204 bytes used, 349404 available, 8388608 total]
Accessing file 'c2500-i-l.121-26.bin' on 192.168.14.2...
Loading c2500-i-l.121-26.bin from 192.168.14.2 (via Ethernet0): ! [OK]
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased qu trnh xa flash
Loading c2500-i-l.121-26.bin from 192.168.14.2 (via Ethernet0): !!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
qu trnh np Flash
119
Lu : l trong c qu trnh copy flash t TFTP server vo Router hay t Router vo TFTP
server bn u phi chy chng trnh TFTP server trn PC.
120
IV.
imagename
mt image-name t Flash
image-name 172.16.10.3
3.bin
Address or name of remote host [ ]?
192.168.119.20
Destination filename [c2600-js-l_121-
3.bin]?
server.
192.168.119.20
Source filename [ ]? c2600-js-l_121-
3.bin
server.
121
3.bin]?
server.
Nu b nh flash b y, th s cn phi
xa trc khi thc hin vic copy.
122
Gii thiu :
- Mt khu truy cp l rt hu ch trong lnh vc bo mt, tuy nhin i khi n cng em l i
phin toi nu chng may bn qun mt mt khu truy nhp.Bi thc hnh khi phc mt khu
cho Cisco Router ny gip bn khi phc li mt khu ng nhp vo Router .
Lu : t mt khu cho Router c ngha r t ln trong kha cnh security,n ngn cn c
cc phin Telnet t xa vo Router thay i cu hnh hay thc hin nhng mc ch khc.Bn
nn trnh nhm ln gia hai khi nim bo mt v khi phc mt khu,bn c th khi phc
hay thay i c mt khu ca Router khng c ngha l mc bo mt ca Router khng cao
v khi phc mt khu cho Router, iu kin tin quyt l bn phi thao tc trc tip trn
Router, iu ny c ngha l b n phi c s chp nhn ca Admin hay k thut vin qun l
Router.
II.
M t bi lab v hnh :
III.
123
Bc 1 : bn khi ng li Router
System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
Copyright (c) 1986-1995 by cisco Systems
2500 processor with 8192 Kbytes of main memory n Ctrl Break khng cho
Router np d liu t NVRAM
Abort at 0x103AA7E (PC)
romon> confreg 0x2142 S dng lnh ny thay i thanh ghi sang 0x2142
124
!
version 12.1
no service single-slot-reload-enable
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
enable secret 5 $1$AqeQ$yB00zFjHxIiVoHLnbLEhh1 password secret
c m ho
enable password cisco
!
end
TTG(config)#exit
125
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong
Image text-base: 0x03042000, data-base: 0x00001000
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142
TTG(config)#exit
Xem li thanh ghi hin hnh:
TTG#show version
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-I-L), Version 12.1(26), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sat 16-Oct-04 02:44 by cmong
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142 (will be 0x2102 at next reload) thanh ghi hin
hnh l 0x2102
126
TTG#
V.
127
Thay i gi tr ca Configuration
Register thnh 2102
Router #reload
Khi ng li Router
128
Gii thiu :
Trong bi lab ny chng ta se thc hin recovery password ca mt switch
M t bi lab v hnh :
II.
- Ni cp console gia PC vi switch. Chng ta s tin hnh recovery password trn switch 2950
trong bi lab ny.
III. Thc hin :
- kho st vic recovery password r rng hn ,chng ta s cu hnh tn v password cho
switch trc khi tin hnh recovery password cho switch
- Chng ta cu hnh tn v password cho switch nh sau :
Switch#configure terminal
Switch(config)#hostname TTG
TTG(config)#enable password cisco
TTG(config)#enable secret TTG
- Sau khi cu hnh xong chng ta lu vo NVRAM v xem li cu hnh trong NVRAM tr c
khi tin hnh recovery password cho switch.
TTG#copy run start
Destination filename [startup-config]?
Building configuration...
129
TTG#show start
TTG#sh start
Using 1186 out of 32768 bytes
version 12.1
hostname TTG
enable secret 5 $1$s22D$vCe6IFIeKLhUPZqgm6QZ6/
enable password cisco
Chng ta tin hnh recovery password theo cch bc sau :
Bc 1 : tt ngun switch, sau gia nt MODE trn switch 2950 trong lc bt ngun
li. Khi mn hnh hin nhng thng bo sau, ta nh nt MODE ra.
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA2, RELEASE
SOFTWARE (fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Sun 07-Nov-04 23:14 by antonino
(mt s thng bo c lc b)
flash_init
load_helper
boot
Bc 2: Chng ta nhp flash_init bt u cu hnh cho cc file ca flash. Nhp cu
lnh dir flash: xem cc file c cha trong flash. Sau chng ta i tn file config.text thnh
config.bak (v cu hnh ca chng ta lu ph n trc c switch cha trong file ny) bng
cu lnh sau : rename flash:config.text flash:config.bak Sau chng ta reload li switch bng
cu lnh boot
Bc 3 : Trong qu trnh khi ng switch s hi :
Continue with the configuration dialog? [yes/no] :
Chng ta nhp vo NO, b qua cu hnh ny. Sau khi khi ng xong chng ta vo
mode privileged.
Switch>en
130
Switch#
- Sau chng ta chuyn tn file config.bak trong flash thnh config.text bng cch :
Switch#rename flash:config.bak flash:config.text
- Ri cu hnh NVRam vo RAM bng cu lnh sau :
Switch#copy flash:config.text system:running-config
Bc 4 : g b tt c cc loi password
TTG#conf t
TTG(config)#no enable password
TTG(config)#no enable secret
IV.
Switch: flash_init
Khi to b nh flash
switch: boot
Khi ng li switch
i li tn ca file cu hnh tr v tn
flash:config.text
mc nh.
system:running-config
131
Switch#copy running-config
startupconfig
vi mt khu mi c cu hnh.
132
I.
1.
2.
3.
4.
5.
6.
7.
8.
9.
II.
III.
1.
2.
Yu Cu :
Trin khai m hnh kt ni trn Cisco Lab
S dng mng 192.168.X.0/24 chia subnet cc mng ca router N,HN,HCM :
t mt khu cho line vty,console,enable secrect cho cc router l TTG,
S dng RIPv2 nh tuyn gia router N,HN,HCM :
nh tuyn cc Router kt ni n Internet, Internet ch dng Static route :
Cc PC phi ping c n cc mng ca Internet :
Kim tra li thng tin nh tuyn bng cc lnh :
T PC th telnet ,ssh ln router v lu cu hnh
Copy cu hnh, IOS t cc router n lu trn TFTP Server
Mc Tiu :
- Gip cc hc vin nm r li cc kin thc lin quan n phn 1 ca chng trnh
CCNA bao gm cc phn : a ch IP, subnet, nh tuyn tnh v ng ( Static Route,
RIPv2 ), cc loi mt khu, sao lu d phng cu hnh, IOS
Cc Bc Cu Hnh :
Trin khai m hnh kt ni trn Cisco Lab
S dng mng 192.168.2.0/24 ( bi lab s dng X=2, cc nhm nh thay gi tr ca
X = STT m gio vin phn ) chia subnet cc mng ca router N,HN,HCM :
+S subnet cn
: 5 subnet
133
+S bit mn
: 256 -224 = 32
IP dng c
+Lit k subnet
1-192.168.2.0/27
2-192.168.2.32/27
3-192.168.2.64/27
4-192.168.2.96/27
5-192.168.2.128/27
6-192.168.2.160/27
7-192.168.2.192/27
8-192.168.2.224/27
192.168.2.225--- 192.168.2.254
134
i tn mc nh ca router
Router(config)#hostname DN
DN(config)#username ttg password 123 Username v mt khu chng thc trong SSH
DN(config)#ip domain-name truongtan.edu.vn t domain name cho router
135
Router#show ip route
Router#show ip protocols
- T cc PC ca HN, HCM, N s dng lnh ping kim tra kt ni nu khng thnh cng trn
cc router th s dng lnh show ip interface brief kim tra li trng thi vt l v a ch ip
ca cc cng
HN#show ip interface brief
Interface
IP-Address
FastEthernet0/0
192.168.2.33
YES manual
FastEthernet0/1
unassigned
Serial0/0/0
192.168.2.97
YES manual
up
Serial0/0/1
up
Serial0/1/0
192.168.1.1
YES manual
Serial0/1/1
unassigned
YES manual
YES
manual
Protocol
up
up
up
administratively down
up
up
up
down
136
137
138
3. M t bi lab v hnh :
139
140
TTG1(config-if)#exit
TTG1(config)#interface loopback 0
TTG1(config-if)#ip address 10.0.0.1 255.255.0.0
TTG1(config-if)#exit
TTG1(config)#
Router TTG2
Router>enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface s1/0
TTG2(config-if)#ip address 192.168.1.2 255.255.255.0
TTG2(config-if)#no shutdown
TTG2(config-if)#clock rate 64000
TTG2(config-if)#exit
TTG2(config)# interface s1/1
TTG2(config-if)# ip address 170.1.0.1 255.255.0.0
TTG2(config-if)#no shutdown
TTG2(config-if)#clock rate 64000
TTG2(config-if)#exit
TTG2(config)#interface loopback 0
TTG2(config-if)#ip address 11.1.0.1 255.0.0.0
TTG2(config-if)#exit
TTG1(config)#interface E0
TTG2(config-if)# ip address 15.1.0.1 255.0.0.0
TTG2(config-if)#no shutdown
141
TTG2(config-if)#exit
TTG2(config)#
Router TT3
Router>enable
Router#configure terminal
Router(config)#hostname TTG3
TTG3(config)#interface s1/0
TTG3(config-if)#ip address 170.1.0.2 255.255.0.0
TTG3(config-if)#no shutdown
TTG3(config-if)#clock rate 64000
TTG3(config-if)#exit
TTG3(config)#interface loopback 0
TTG3(config-if)#ip address 12.1.0.1 255.255.255.252
TTG3(config-if)#exit
TTG3(config)#
- Trc khi cu hnh OSPF mi ngi cn ch n gi tr WildcasdMask c tnh theo cc
ly 255.255.255.255 tr cho gi tr SubnetMask ca mng cn tham gia vo qu trnh qung b
ca OSPF. V d : cn cho mng 192.168.1.0/24 c qung b trong OSPF:
+ Mng 192.168.1.0/24 c Subnetmask l 255.255.255.0 nn gi tr WildcasdMask l :
255.255.255.255 255.255.255.0 = 0.0.0.255
- Sau khi cu hnh interface cho cc router, ta tin hnh cu hnh OSPF nh sau
Router TTG1:
TTG1(config)#router ospf 10
TTG1(config-router)#network 192.168.1.0 0.0.0.255 area 0
TTG1(config-router)# network 10.0.0.0 0.0.255.255 area 0
Router TTG2 :
142
TTG2(config)#router ospf 10
TTG2(config-router )#network 192.168.1.0 0.0.0.255 area 0
TTG2(config-router )#network 170.1.0.0 0.0.255.255 area 0
TTG2(config-router )#network 15.0.0.0 0.255.255.255 area 0
TTG2(config-router )#network 11.0.0.0 0.255.255.255 area 0
Router TTG3 :
TTG3(config)#router ospf 10
TTG2(config-router )#network 170.1.0.0 0.0.255.255 area 0
TTG2(config-router )#network 12.1.0.0 0.0.0.3 area 0
- Ngoi ra chng ta c th cu hnh OSPF cho c ba router theo cch sau:
TTG1(config)#router ospf 10
TTG1(config-router)#network 192.168.1.1 0.0.0.0 area 0
TTG1(config-router)# network 10.0.0.1 0.0.0.0 area 0
TTG2(config)#router ospf 10
TTG2(config-router)#network 192.168.1.2 0.0.0.0 area 0
TTG2(config-router)#network 170.1.0.1 0.0.0.0 area 0
TTG2(config-router)#network 11.1.0.1 0.0.0.0 area 0
TTG2(config-router)#network 15.1.0.1 0.0.0.0 area 0
TTG3(config)#router ospf 10
TTG3(config-router)#network 170.1.0.2 0.0.0.0 area 0
TTG3(config-router)#network 12.1.0.1 0.0.0.0 area 0
- Sau khi qung b cc mng ca router xong chng ta kim tra li bng nh tuyn ca cc
router bng cu lnh show ip route
TTG1#sh ip route
143
144
145
- Sau khi cu hnh xong chng ta kim tra li bng nh tuyn ca cc router :
TTG1#sh ip route
Gateway of last resort is not set
O 170.1.0.0/16 [110/128] via 192.168.1.2, 00:00:53, Serial1/0
10.0.0.0/16 is subnetted, 1 subnets
C
146
cho
- Trong trng hp bi lab, chng ta c hai cch gii quyt vn ny. Cch th nht l cu
hnh cho mng ca interface S0 ca router TTG3 thuc area 0. Lc ny, router TTG3 ng vai
tr l mt router bin. Cch th hai l cu hnh cho mng ca interface S1 router TTG2 thuc
area 1, lc ny router TTG2 ng vai tr l router bin.
- Chng ta s kho st cch 1 (cu hnh cho mng interface S0 ca TTG3 thuc area0). Cch 2
c thc hin tng t
147
Cch cu hnh :
TTG3(config)#router ospf 1
TTG3(config-router)#no network 170.1.0.0 0.0.255.255 area 1
TTG3(config-router)#network 170.1.0.0 0.0.255.255 area 0
- Sau khi cu hnh xong, chng ta kim tra li bng nh tuyn ca cc router :
TTG1#show ip route
Gateway of last resort is not set
10.0.0.0/16 is subnetted, 1 subnets
C
TTG2#show ip route
148
TTG3#show ip route
Gateway of last resort is not set
10.0.0.0/32 is subnetted, 1 subnets
O
149
- Mt mt cng OSPF trn router cn c mt cha kha chng thc s dng khi gi cc thng
tin OSPF cho cc router khc cng kt ni vi cng . Cha kha ny s dng to ra d liu
chng thc (Authenticationg data) t trong phn header ca gi OSPF. Mt m ny c th di
n 8 k t. Bn cu hnh chng thc nh sau :
Router(config-if)#ip ospf authentication-key password
Router(config-if)#ip ospf authentication
Hoc
Router(config-router)#area area-id authentication
Cc lnh thc hin trong bi lab :
Router TTG1
TTG1>enable
TTG1#configure terminal
TTG1(config)#interface s1/0
TTG1(config-if)#ip ospf authentication-key plaint
TTG1(config-if)#ip ospf authentication
TTG1(config-if)#exit
TTG1(config)#
Router TTG2
TTG2>enable
TTG2#configure terminal
TTG2(config)#interface s1/0
TTG2(config-if)#ip ospf authentication-key plaint
TTG2(config-if)#ip ospf authentication
TTG2(config-if)#exit
TTG2(config)# interface s1/1
TTG2(config-if)#ip ospf authentication-key plaintpas
TTG2(config-if)#ip ospf authentication
150
TTG2(config-if)#exit
TTG2(config)#
Router TTG3
TTG3)enable
TTG3#configure terminal
TTG3(config)# interface s1/1
TTG3(config-if)#ip ospf authentication-key plaintpas
TTG3(config-if)#ip ospf authentication
TTG3(config-if)#exit
TTG3(config)#
- C ch chng thc PlainText khng c an ton do mt khu khng c m ha tr c khi
gi ra bn ngoi nn an ton hn ta nn chuyn qua ch chng thc bng MD5, cch cu
hnh nh sau
Router(config-if)#ip ospf message-digest-key key-id encryption-type md5 key
Router(config-if)#ip ospf authentication message-digest
Hoc
Router(config-router)#area area-id authentication message-digest
- chuyn qua chng thc MD5 trc tin ta cn b ch chng thc PlainText hin ti trn
cc Router TTG1,2,3
TTG1(config)#interface s1/0
TTG1(config-if)#no ip ospf authentication-key plaint
TTG1(config-if)#no ip ospf authentication
TTG1(config-if)#exit
Tng t cho cc router cn li
- Chuyn qua cu hnh chng thc MD5
Router TTG1
TTG1>enable
151
TTG1#configure terminal
TTG1(config)#interface s1/0
TTG1(config-if)#ip ospf message-digest-key 1 md5 keymd5 mt khu
TTG1(config-if)#ip ospf authentication message-digest cu hnh phng thc chng
thc l MD5
TTG1(config-if)#exit
TTG1(config)#
Router TTG2 :
TTG2>enable
TTG2#configure terminal
TTG2(config)#interface s1/0
TTG2(config-if)#ip ospf message-digest-key 1 md5 keymd51
TTG2(config-if)#ip ospf authentication message-digest
TTG2(config-if)#exit
TTG2(config)# interface s1/1
TTG2(config-if)# ip ospf message-digest-key 1 md5 keymd52
TTG2(config-if)#ip ospf authentication message-digest
TTG2(config-if)#exit
TTG2(config)#
Router TTG3
TTG3>enable
TTG3#configure terminal
TTG3(config)# interface s1/1
TTG3(config-if)# ip ospf message-digest-key 1 md5 keymd52
TTG3(config-if)#ip ospf authentication message-digest
152
TTG3(config-if)#exit
TTG3(config)#
- Cc cu lnh show dng kim tra cu hnh OSPF :
IV.
Gii thch
Show ip protocol
Show ip route
Show ip ospf
Gii thch
Xa ton b bng nh tuyn
153
Bo co mi s kin ca OSPF
154
Router TTG1
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface E0
TTG1(config-if)#no shutdown
TTG1(config-if)#ip address 10.1.0.1 255.255.255.0
TTG1(config-if)#exit
TTG1(config)#interface S0
155
Router TTG2
Router>enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface E0
TTG2(config-if)#no shutdown
TTG2(config-if)#ip address 11.1.0.1 255.255.0.0
TTG2(config-if)#exit
TTG2(config)#interface S0
TTG2(config-if)#no shutdown
TTG2(config-if)#clock rate 64000
TTG2(config-if)#ip address 192.168.0.2 255.255.255.0
TTG2(config-if)#exit
TTG2(config)#
Sau khi cu hnh xong a ch IP cho cc interface ca router TTG1, TTG2 chng ta tin hnh
cu hnh EIGRP cho cc router nh sau:
TTG1(config-router)#network 192.168.0.0
TTG2(config)#router eigrp 100
TTG2(config-router)#network 11.0.0.0 0.0.255.255
TTG2(config-router)#network 192.168.0.0
156
t IP cho cc PC:
PC 1
IP address
PC 2
10.1.0.2
IP address
Subnet Mask :
255.255.0.0
Subnet Mask :
255.255.0.0
Gateway
10.1.0.1
Gateway
11.1.0.1
11.1.0.2
TTG2#show ip route
Gateway of last resort is not set
D 10.0.0.0/8 [90/2195456] via 192.168.0.1, 00:11:35, Serial0
C
Trong bng nh tuyn ca router TTG2 c cc route n mng ca TTG1, v TTG1 ping
thnh cng n loopback ca TTG2.
3. Cu hnh summary v chng thc EIGRP :
157
Router TTG1
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface s0/0/0
TTG1(config-if)#no shutdown
TTG1(config-if)#clock rate 64000
TTG1(config-if)#ip address 192.168.1.1 255.255.255.0
TTG1(config-if)#exit
TTG1(config)#interface loopback 0
TTG1(config-if)#ip address 10.0.0.1 255.255.0.0
TTG1(config-if)#exit
TTG1(config)#interface loopback 1
TTG1(config-if)#ip address 10.1.0.1 255.255.0.0
TTG1(config-if)#exit
TTG1(config)#interface loopback 2
TTG1(config-if)#ip address 10.2.0.1 255.255.0.0
TTG1(config-if)#exit
TTG1(config)#interface loopback 3
TTG1(config-if)#ip address 10.3.0.1 255.255.0.0
158
TTG1(config-if)#exit
TTG1(config)#
Router TTG2
Router>enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface s0/0/0
TTG2(config-if)#no shutdown
TTG2(config-if)#clock rate 64000
TTG2(config-if)#ip address 192.168.1.2 255.255.0.0
TTG2(config-if)#exit
TTG2(config)#interface loopback 4
TTG2(config-if)#ip address 11.4.0.1 255.255.0.0
TTG2(config-if)#exit
TTG2(config)#interface loopback 5
TTG2(config-if)#ip address 11.5.0.1 255.255.0.0
TTG2(config-if)#exit
TTG2(config)#interface loopback 6
TTG2(config-if)#ip address 11.6.0.1 255.255.0.0
TTG2(config-if)#exit
TTG2(config)#interface loopback 7
TTG2(config-if)#ip address 11.7.0.1 255.255.0.0
TTG2(config-if)#exit
TTG2(config)#
Chng ta cu hnh EIGRP cho cc router nh sau :
159
Router TTG1
TTG1(config)#router eigrp 10
TTG1(config-router)#network 10.0.0.0
TTG1(config-router)#network 192.168.1.0
TTG1(config-router)#exit
TTG1(config)#
Router TTG2
TTG2(config)#router eigrp 10
TTG2(config)#network 11.0.0.0
TTG2(config-router)#network 192.168.1.0
TTG2(config-router)#exit
TTG2(config)#
Cu hnh summary cho EIGRP :
Mc nh EIGRP bt tnh nng auto-summary t ng summary cc subnet ca cng
mt network v a ch network chnh khi qung b. V d nh bi Lab, TTG1 kt ni trc tip
cc mng con 10.0.0.0/16, 10.1.0.0/16, 10.2.0.0/24, 10.3.0.0/16 nhng khi qung b ra s0/0/0
EIGRP s t ng summary li thnh 10.0.0.0/8. Trong hu ht cc trng hp, vic t ng
tng hp ny c u im l gip cho bng nh tuyn ngn gn.
Tuy nhin, trong mt s trng hp khng nn s dng ch t ng tng hp ng
i ny. V d trong mng khng lin tc ( discontinuos network ) nh m hnh trn th ch
ny phi tt i trnh gy ra li v nh tuyn.
Router(config-router)#no auto-sumary
- By gi chng ta xt bng nh tuyn ca 2 Router sau khi tt Auto-summary
Bng nh tuyn sau khi tt Auto-Summary :
Router TTG1
TTG1#configure terminal
TTG1(config)#router eigrp 10
TTG1(config-router)#no auto-summary
160
TTG1(config-router)#exit
Router TTG2
TTG2#configure terminal
TTG2(config)#router eigrp 10
TTG2(config-router)#no auto-summary
TTG2(config-router)#exit
- Kim tra li bng nh tuyn
TTG1#show ip route
Gateway of last resort is not set
10.0.0.0/16 is subnetted, 4 subnets
C
161
162
Mask
163
164
TTG2(config)#exit
- Tin hnh lu cu hnh trn 2 router
TTG2#copy running-config startup-config
V.
Gii thch
Show ip protocol
Gii thch
165
166
167
- SW2 :
SW2-VTPClient(config)#interface g1/1
SW2-VTPClient(config-if)#switchport mode trunk
SW2-VTPClient(config-if)#exit
- SW3 :
SW3-VTPClient(config)#interface g1/2
SW3-VTPClient(config-if)#switchport mode trunk
SW3-VTPClient(config-if)#exit
3. Cc lnh kim tra cu hnh VTP, Trunking :
- SW1-VTPServer #show vtp password
VTP Password: 123
- SW1-VTPServer#show vtp status
VTP Version
:2
Configuration Revision
:0
:7
: Server
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
168
Port
Mode
Encapsulation Status
Native vlan
G1/1
on
802.1q
trunking
G1/2
on
802.1q
trunking
Port
G1/1
1-1005
G1/2
1-1005
Port
G1/1
1,2,3
G1/2
1,2,3
Port
G1/1
1,2,3
G1/2
1,2,3
169
170
To VLAN 3 v chuyn vo ch cu
hnh VLAN configuration
Switch(config-vlan)# exit
Lu cu hnh VLAN
2. Gn port vo VLAN
Switch(config)# interface fastethernet 0/1
171
4. Xa cu hnh VLAN
Switch# delete flash:vlan.dat
Switch(config)# no vlan 5
Chuyn vo ch cu hnh ca
interface fa0/1
Switch(config-if)#switchport trunk
encapsulation isl
172
Switch(config-if)#switchport trunk
encapsulation dot1q
Switch(config-if)#switchport trunk
encapsulation negotiate
173
To mt subinterface fa0/0.1 v ng
fastethernet 0/0.1
Router(config-subif)#encapsulation
dot1q 10
7. To VLAN
7.1. S dng ch VLAN Configuration
174
Switch(config)# vlan 3
To VLAN 3 v chuyn vo ch cu
hnh VLAN configuration
Switch(config-vlan)# name
Engineering
Switch(config-vlan)# exit
Lu cu hnh VLAN
Switch(vlan)# vlan 10
To Vlan 10 v tn ca vlan ny s l
VLAN0010 theo mc nh
Switch(vlan)# apply
8. Gn port vo VLAN
Switch(config)# interface fastethernet 0/1
access
access
175
vlan 10
Switch(config)# no vlan 5
Hoc
Switch# vlan database
Switch(vlan)# no vlan 5
Switch(vlan)# exit
Chuyn vo ch cu hnh ca
176
interface fa0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk
encapsulation isl
Switch(config-if)#switchport trunk
encapsulation dot1q
Switch(config-if)#switchport trunk
encapsulation negotiate
177
178
database
Switch(vlan)# vtp client
Switch(vlan)#vtp pruning
179
To mt subinterface fa0/0.1 v ng
fastethernet 0/0.1
Router(config-subif)#encapsulation
dot1q 10
Router(config-subif)# encapsulation
dot1q 1 native
180
181
182
:2
Configuration Revision
:0
:5
: Server
: Disabled
VTP V2 Mode
: Disabled
: Disabled
183
MD5 digest
SW1(config)#vtp version 2
SW1(config)#vtp domain TTG
Changing VTP domain name from NULL to TTG
SW1(config)#vtp password cisco
Setting device VLAN database password to cisco
SW1(config)#vtp mode server
Device mode already VTP SERVER.
- Thng tin VTP trn SW1 sau khi cu hnh
SW1#show vtp status
VTP Version
:2
Configuration Revision
:0
:5
: Server
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
184
:2
Configuration Revision
:1
: 250
:5
: Client
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
185
:2
Configuration Revision
:1
: 250
:5
: Client
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
186
SW1(config-if)#switchport nonegotiate
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#interface fa0/22
187
SW2(config)#interface fa0/22
SW2(config-if)# switchport trunk encapsulation dot1q
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport nonegotiate
SW2(config-if)#no shutdown
- SW3:
SW3(config)#interface fa0/23
SW3(config-if)# switchport trunk encapsulation dot1q
SW3(config-if)#switchport mode trunk
SW3(config-if)#switchport nonegotiate
SW3(config-if)#no shutdown
Mode
Encapsulation Status
Native vlan
Fa0/20
on
802.1q
trunking
Fa0/22
on
802.1q
trunking
Fa0/23
on
802.1q
trunking
Port
Fa0/20
1-4094
Fa0/22
1-4094
Fa0/23
1-4094
Port
Fa0/20
Fa0/22
188
Fa0/23
Port
1
Vlans in spanning tree forwarding state and not pruned
Fa0/20
none
Fa0/22
Fa0/23
Router:
Router#config terminal
Enter configuration commands, one per line. End with C
Router(config)#interface fa0/0
Router(config-if)#description Gateway cho VLAN1
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface fa0/0.2
Router(config-subif)#description Gateway cho VLAN2
Router(config-subif)#encapsulation dot1Q 2
Router(config-subif)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#exit
Router(config)#interface fa0/0.3
Router(config-subif)#description Gateway cho VLAN3
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#exit
Router(config)#interface fa0/0.4
Router(config-subif)#description Gateway cho VLAN4
189
Router(config-subif)#encapsulation dot1Q 4
Router(config-subif)#ip address 192.168.4.1 255.255.255.0
Router#show ip interface brief
Interface
IP-Address
Protocol
FastEthernet0/0
192.168.1.1
YES
manual up
up
FastEthernet0/0.2
192.168.2.1
YES
manual up
up
FastEthernet0/0.3
192.168.3.1
YES
manual up
up
FastEthernet0/0.4
192.168.4.1
YES
manual up
up
FastEthernet0/1
unassigned
Serial0/1/0
unassigned
Serial0/1/1
unassigned
SW1#show vlan
VLAN Name
Status
Ports
default
active
1002 fddi-default
act/unsup
190
1003 trcrf-default
act/unsup
1004 fddinet-default
act/unsup
1005 trbrf-default
act/unsup
Status
Ports
default
active
Accounting_Network
active
Engineering_Network
active
191
Markeeting_Network
active
1002 fddi-default
act/unsup
1003 trcrf-default
act/unsup
1004 fddinet-default
act/unsup
1005 trbrf-default
act/unsup
:2
Configuration Revision
:4
:8
: Server
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
Status
Ports
default
active
192
Accounting_Network
active
Engineering_Network
active
Markeeting_Network
active
1002 fddi-default
act/unsup
1003 trcrf-default
act/unsup
1004 fddinet-default
act/unsup
1005 trbrf-default
act/unsup
:2
Configuration Revision
:4
:8
: Client
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
:2
Configuration Revision
:4
193
:8
: Client
: TTG
: Disabled
VTP V2 Mode
: Enabled
: Disabled
MD5 digest
Status
Ports
default
active
Accounting_Network
active
Engineering_Network
active
Markeeting_Network
active
1002 fddi-default
act/unsup
1003 trcrf-default
act/unsup
1004 fddinet-default
act/unsup
194
1005 trbrf-default
act/unsup
Status
Ports
default
active
Accounting_Network
active
Engineering_Network
active
Markeeting_Network
active
195
IP-Address
Protocol
Vlan1
192.168.1.11
YES manual
up
up
IP-Address
Protocol
Vlan1
192.168.1.12
YES manual
up
up
IP-Address
Protocol
Vlan1
192.168.1.13
YES manual
up
196
up
197
198
SW3(config-if)#switchport nonegotiate
SW3(config-if)#no shutdown
- Kim tra SW1 hin ti c phi l rootbridge cha bn lnh show spanning-tree
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee (Giao thc chy mc nh l PVST+)
Root ID Priority
Address
32769
(Roo tBrigdeID)
000a.b8f3.ec40
Cost
19
Port
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Root FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0002
Spanning tree enabled protocol ieee
Root ID Priority
Address
Cost
32770
000a.b8f3.ec40
19
199
Port
22 (FastEthernet0/22)
Bridge ID Priority
Address
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Root FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0003
Spanning tree enabled protocol ieee
Root ID Priority
Address
32771
000a.b8f3.ec40
Cost
19
Port
22 (FastEthernet0/22)
0018.192e.ddc0
Prio.Nbr Type
200
Fa0/20
Desg FWD 19
128.20 P2p
Fa0/22
Root FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0004
Spanning tree enabled protocol ieee
Root ID Priority
Address
32772
000a.b8f3.ec40
Cost
19
Port
22 (FastEthernet0/22)
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Root FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
- cu hnh cho SW1 l Root Bridge cho tt c VLAN ta tin hnh thay i Priority ca SW1
thnh gi tr thp hn gi tr mc nh 32768 ca cc switch khc
Ch : Gi tr ca Priority phi l bi s ca 4096
SW1(config)#spanning-tree vlan 1-4 priority 4096
- Kim tra li thng tin STP sau khi i Priority
SW1#show spanning-tree
201
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority
Address
4097
0018.192e.ddc0
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0002
Spanning tree enabled protocol ieee
Root ID Priority
Address
4098
0018.192e.ddc0
0018.192e.ddc0
202
Interface
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0003
Spanning tree enabled protocol ieee
Root ID Priority
Address
4099
0018.192e.ddc0
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0004
Spanning tree enabled protocol ieee
Root ID Priority
Address
4100
0018.192e.ddc0
203
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
204
IP : 192.168.3.10
SM : 255.255.255.0
GW : 192.168.3.1 (cng Fa0/0.3 trn router TTG1)
Port : Fa0/6
PC-VLAN4 :
IP : 192.168.4.10
SM : 255.255.255.0
GW : 192.168.4.1 (cng Fa0/0.4 trn router TTG1)
Port : Fa0/11
- T cc PC ca VLAN 1,2,3,4 phi ping c nhau ,c th s dng thm lnh tracert kim
tra ng i ca gi tin t VLAN ny qua VLAN khc
205
206
- SW1:
SW3(config)#spanning-tree mode rapid-pvst
- Kim tra li cu hnh PVRST+ trn SW1
SW1#show spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority
Address
4097
0018.192e.ddc0
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0002
Spanning tree enabled protocol rstp
Root ID Priority
Address
4098
0018.192e.ddc0
207
Bridge ID Priority
Address
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0003
Spanning tree enabled protocol rstp
Root ID Priority
Address
24579
000a.b8f3.ee00
Cost
19
Port
23 (FastEthernet0/23)
Bridge ID Priority
Address
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
208
Fa0/23
Root FWD 19
128.23 P2p
VLAN0004
Spanning tree enabled protocol rstp
Root ID Priority
Address
24580
000a.b8f3.ee00
Cost
19
Port
23 (FastEthernet0/23)
0018.192e.ddc0
Prio.Nbr Type
Desg FWD 19
128.20 P2p
Fa0/22
Desg FWD 19
128.22 P2p
Fa0/23
Root FWD 19
128.23 P2p
4097
0018.192e.ddc0
19
209
Port
23 (FastEthernet0/23)
000a.b8f3.ee00
Prio.Nbr Type
Desg FWD 19
128.21 P2p
Fa0/23
Root FWD 19
128.23 P2p
VLAN0002
Spanning tree enabled protocol rstp
Root ID Priority
Address
4098
0018.192e.ddc0
Cost
19
Port
23 (FastEthernet0/23)
000a.b8f3.ee00
Prio.Nbr Type
Desg FWD 19
128.1
P2p
Fa0/21
Desg FWD 19
128.21 P2p
210
Fa0/23
Root FWD 19
128.23 P2p
VLAN0003
Spanning tree enabled protocol rstp
Root ID Priority
Address
24579
000a.b8f3.ee00
000a.b8f3.ee00
Prio.Nbr Type
Desg FWD 19
128.6
P2p
Fa0/21
Desg FWD 19
128.21 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VLAN0004
Spanning tree enabled protocol rstp
Root ID Priority
Address
24580
000a.b8f3.ee00
000a.b8f3.ee00
211
Prio.Nbr Type
Desg FWD 19
128.21 P2p
Fa0/23
Desg FWD 19
128.23 P2p
VI.
Switch(config)#spanning-tree vlan 5
Sa i switch priority t gi tr mc nh
l 32768 thnh mt gi tr thp hn
cho php switch c th tr thnh mt
root switch trong vlan 5
* Ch : Nu tt c cc switch khc u c kh
nng h tr System ID m rng,
th switch c cu hnh bng cu lnh
trn s khi to li gi tr priority l
24576. Nu c mt s switch c gi tr
priority c cu hnh thp hn 24576,
th switch s c gn gi tr priority
l 4096 l gi tr priority thp nht trong
s cc switch.
Switch(config)#spanning-tree vlan 5
212
root primary
Switch(config)#spanning-tree vlan 5
root secondary
gigabitethernet 0/1
gi0/1
Switch(config-if)#spanning-tree cost
100000
hot ng ch access
Switch(config-if)#spanning-tree vlan 5
cost 1000000
priority 12288
5 l 12288
213
gigabitethernet 0/1
Switch#show spanning-tree summary
214
215
216
Layer3SW(config-if)#exit
Layer3SW(config)#interface port-channel 2
Layer3SW(config-if)#exit
Layer3SW(config)#interface range fa0/3 4
Layer3SW(config-if-range)#channel-group 2 mode active
- AccessSW1:
AccessSW1(config)#interface port-channel 1
AccessSW1(config-if)#exit
AccessSW1(config)#interface range fa0/1 2
AccessSW1(config-if-range)#channel-group 1 mode active
- AccessSW2:
AccessSW2(config)#interface port-channel 2
AccessSW2(config-if)#exit
AccessSW2(config)#interface range fa0/1 2
AccessSW2(config-if-range)#channel-group 2 mode active
3. S dng giao thc VTP ng b thng tin VLAN gia cc Switch:
- Layer3SW:
Layer3SW(config)#vtp domain TTG
Layer3SW(config)#vtp password 123
Layer3SW(config)#vtp mode server
- AccessSW1:
AccessSW1(config)#vtp domain TTG
AccessSW1(config)#vtp password 123
AccessSW1(config)#vtp mode client
- AccessSW2:
217
218
- AccessSW1:
AccessSW1(config)#interface range fa0/5 - 9
AccessSW1(config-if-range)#switchport access vlan 2
AccessSW1(config-if-range)#exit
AccessSW1(config)#interface range fa0/10 - 14
AccessSW1(config-if-range)#switchport access vlan 3
AccessSW1(config-if-range)#exit
AccessSW1(config)#interface range fa0/15 19
AccessSW1(config-if-range)#switchport access vlan 4
AccessSW1(config-if-range)#exit
AccessSW1(config)#interface range fa0/20 - 24
AccessSW1(config-if-range)#switchport access vlan 5
- AccessSW2:
AccessSW2(config)#interface range fa0/5 - 9
AccessSW2(config-if-range)#switchport access vlan 2
AccessSW2(config-if-range)#exit
AccessSW2(config)#interface range fa0/10 - 14
AccessSW2(config-if-range)#switchport access vlan 3
AccessSW2(config-if-range)#exit
AccessSW2(config)#interface range fa0/15 19
AccessSW2(config-if-range)#switchport access vlan 4
AccessSW2(config-if-range)#exit
AccessSW2(config)#interface range fa0/20 - 24
AccessSW2(config-if-range)#switchport access vlan 5
6. m bo Layer3 Switch l RootBrdge trong STP:
219
220
Ip Address : 192.168.2.10
Subnet Mask: 255.255.255.0
Gateway
: 192.168.2.1
PCVLAN3 :
Ip Address : 192.168.3.10
Subnet Mask: 255.255.255.0
Gateway
: 192.168.3.1
PCVLAN4 :
Ip Address : 192.168.4.10
Subnet Mask: 255.255.255.0
Gateway
: 192.168.4.1
PCVLAN5 :
Ip Address : 192.168.5.10
Subnet Mask: 255.255.255.0
Gateway
: 192.168.5.1
- Sau t cc PC s dng lnh Ping kim tra qu trnh nh tuyn thnh cng hay khng, kt
qu cc PC phi Ping c ln nhau
8.nh tuyn gia Layer3 Switch v Router:
- Layer3SW:
Layer3SW(config)#interface fa0/5
Layer3SW(config-if)#no switchport
Layer3SW(config-if)#ip address 192.168.6.1 255.255.255.0
Layer3SW(config-if)#no shutdown
Layer3SW(config-if)#exit
- Cu hnh giao thc nh tuyn RIPv2
Layer3SW(config)#router rip
221
Layer3SW(config-router)#version 2
Layer3SW(config-router)#network 192.168.2.0
Layer3SW(config-router)#network 192.168.3.0
Layer3SW(config-router)#network 192.168.4.0
Layer3SW(config-router)#network 192.168.5.0
Layer3SW(config-router)#network 192.168.6.0
- Router DNG :
Router(config)#hostname DNG
DNG(config)#interface fa0/0
DNG(config-if)#ip address 192.168.6.2 255.255.255.0
DNG(config-if)#no shutdown
DNG(config-if)#exit
DNG(config)#router rip
DNG(config-router)#version 2
DNG(config-router)#network 192.168.6.0
- Kim tra bng nh tuyn ca Router v Layer3Switch s dng lnh show ip route
Mt s lnh lin quan n bi Lab :
1. Cu hnh Port Channel
Layer3SW(config)#interface range fa0/1 - 4
Layer3SW(config-if-range)#switchport mode
trunk
encapsulation dot1q
ch trunk.
trunk.
222
Layer3SW(config)#interface port-channel 1
fastethernet 0/1 2
Layer3SW(config-if-range)#channel-group 1
mode active
223
Gii thiu:
- Mt trong nhng cng c rt quan trng trong Cisco Router c dng trong lnh vc
security l Access List. y l mt tnh nng gip bn c th cu hnh trc tip trn Router
to ra mt danh sch cc a ch m bn c th cho php hay ngn cn vic truy cp vo mt a
ch no .
- Access List c 2 loi l Standard Access List v Extended Access List.
+ Standard Access List: y l loi danh sch truy cp m khi cho php hay
ngn cn vic truy cp,Router ch kim tra mt yu t duy nht l a ch ngun(Source Address)
+ Extended Access List: y l loi danh sch truy cp m rng hn so vi loi
Standard,cc yu t v a ch ngun, a ch ch,giao thc,port..s c kim tra trc khi
Router cho php vic truy nhp hay ngn cn.
M t bi lab v hnh :
- Bi Lab ny gip bn thc hin vic cu hnh Standard Access List cho Cisco Router
vi mc ch ngn khng cho host truy cp n router TTG2, ( X l s th t ca nhm do ging
vin phn )
II.
III.
Cu hnh router :
224
- Router TTG1 :
Router> enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface s0/1/0
TTG1(config-if)#ip address 192.168.1.1 255.255.255.0
TTG1(config-if)#no shutdown
TTG1(config-if)#exit
TTG1(config)#interface fa0/1
TTG1(config-if)#ip address 10.X.0.1 255.255.255.0
TTG1(config-if)#no shutdown
- Router TTG2
Router> enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface s0/1/0
TTG2(config-if)#ip address 192.168.1.2 255.255.255.0
TTG2(config-if)#no shutdown
TTG2(config-if)#exit
TTG2(config)#interface fa0/1
TTG2(config-if)#ip address 11.X.0.1 255.255.255.0
TTG2(config-if)#no shutdown
- PC1:
IP Address:10.X.0.2
Subnet mask:255.255.255.0
225
226
- Bn thy lnh Ping thc hin vn thnh cng, l do l bn cha m ch Access list trn
interface s0/1/0 ca router TTG2
TTG1(config)#interface s0/1/0
TTG1(config-if)#ip access-group 1 in
227
- Sau khi apply access list vo interface s0/1/0, ta ping t PC1 n TTG2.
- Bn thy lnh Ping vn khng thnh cng, l do l khi khng tm thy a ch source (a ch
l) trong danh sch Access list, router s mc nh thc hin Deny any,v vy bn phi thay i
mc nh ny. Sau y l lnh debug ip packet ti TTG2 khi thc hin lnh ping trn.
228
- Bn thy lnh Ping thnh cng, n y bn cu hnh xong Standard Access List.
Mt s lnh lin quan n bi lab :
1. To ACL Standard
229
Router(config)#access-list 10 permit
Tt c cc gi tin c a ch IP ngun l
172.16.0.0 0.0.255.255
Tt c cc gi tin c a ch IP ngun l
Tt c cc gi tin ca tt c cc mng s
Router(config-if)#ip access-group 10 in
Hin th tt c cc ACL c gn vo
interface.
Router#show access-lists
230
router.
Router#show access-list access-list-
number
ch ra trong cu lnh.
4. Xa ACL
Router(config)#no access-list 10
Xa b ACL c ch s l 10.
231
Gii thiu :
- bi trc bn thc hin vic cu hnh Standard Access List, bi Lab ny bn s tip tc tm
hiu su hn v Extended Access List. y l m rng ca Standard Access List, trong qu trnh kim tra,
Router s kim tra cc yu t v a ch ngun, ch,giao thc v port
M t bi lab v hnh :
- Mc ch ca bi Lab:Bn thc hin cu hnh Extended Access List sao cho PC1
khng th Telnet vo Router TTG2 nhng vn c th duyt web qua Router TTG2
II.
III.
Cu hnh router :
232
PC1:
IP Address:10.X.0.2
Subnet mask:255.255.255.0
Gateway:10.X.0.1
PC2:
IP Address:11.X.0.2
Subnet mask:255.255.255.0
Gateway:11.X.0.1
Router TTG1:
Router> enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface s0/1/0
TTG1(config-if)#ip address 192.168.1.1 255.255.255.0
TTG1(config-if)#no shutdown
TTG1(config-if)#exit
TTG1(config)#interface fa0/1
TTG1(config-if)#ip address 10.X.0.1 255.255.255.0
TTG1(config-if)#no shutdown
Router TTG2 :
Router> enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface s0/1/0
TTG2(config-if)#ip address 192.168.1.2 255.255.255.0
TTG2(config-if)#no shutdown
233
TTG2(config-if)#exit
TTG2(config)#interface fa0/1
TTG2(config-if)#ip address 11.X.0.1 255.255.255.0
TTG2(config-if)#no shutdown
-Cu hnh nh tuyn cho 2 router bng OSPF
Router TTG1 :
TTG1(config)#router ospf 1
TTG1(config-router)#network 10.X.0.0 0.255.255.255 area 0
TTG1(config-router)#network 192.168.1.0 0.0.0.255 area 0
TTG1(config-router)#exit
Router TTG2 :
TTG1(config)#router ospf 1
TTG1(config-router)#network 11.X.0.0 0.255.255.255 area 0
TTG1(config-router)#network 192.168.1.0 0.0.0.255 area 0
TTG1(config-router)#exit
- Bn thc hin lnh Ping kim tra qu trnh nh tuyn.Sau khi chc chn rng qu trnh nh
tuyn thnh cng.
- Ti Router TTG2 bn thc hin cu lnh:
TTG2(config)#ip http server //Cu lnh ny dng gi mt http server trn Router//
- To username v password dng chng thc cho Web Server
TTG2(config)#username TTG2 password cisco
- Lc ny Router s ng vai tr nh mt Web Server
- Sau khi qu trnh nh tuyn thnh cng,b n thc hin cc bc Telnet v duyt Web t
PC1 vo Router TTG2.
- Ch : thnh cng vic Telnet bn phi Login cho ng line vty v t mt khu
cho ng ny( y l Cisco)
TTG2(config)#line vty 0 4
234
TTG2(config-line)#login
TTG2(config-line)#password cisco
Telnet :
Duyt web :
235
236
Duyt Web :
- thnh cng bc duyt Web,bn thc hin cu lnh thay i vic Deny any mc
nh ca Access List.
TTG2(config)#access-list 101 permit ip any any
- Bn ch rng cc cu lnh trong Access List extended khng ging nh trong Access
List Standard v trong Access List Extended,Router s kim tra c a ch ngun,ch,giao thc
v port..Permit ip any any c ngha l cho php tt c cc a ch ngun v ch khc(khng tm
thy trong danh sch Access List) chy trn nn giao thc IP i qua.
Lc ny bn thc hin li qu trnh duyt web
237
238
out
239
240
Gii thiu :
Nat (Network Address Translation) l mt giao thc dng cung cp s chuyn i IP
trong 1 min a ra mt mi trng khc thng qua mt IP c ng k chuyn i
thng tin gia 2 mi trng (either Local or Global) .
u im ca NAT( Network Nat Translation ) l chuyn i cc IP adress ring trong mng
n IP adress inside c Cung cp khi ng k .
Cc loi a ch :
II.
III. Cu hnh :
- Chng ta cu hnh cho cc router nh sau :
241
Router TTG2 :
Router#conf igure terminal
TTG2(config)#enable password cisco
TTG2 (config)#hostname TTG2
TTG2config)#interface s0/1/0
TTG2 (config-if)#ip address 192.168.0.2 255.255.255.0
TTG2 (config-if)# no shutdown
TTG2 (config-if)#clock rate 64000
TTG2 (config)#interface fa0/1
TTG2 (config-if)#ip address 11.1.0.1 255.255.255.0
TTG2 (config-if)#no shutdown
Router TTG1 :
TTG1(config)#interface serial 0/1/0
TTG1(config-if)#ip address 192.168.0.1 255.255.255.0
TTG1(configure-if)#clockrate 64000
TTG1(config)#ip nat outside cu hnh interface S0/1/0l interface outside
TTG1(config)#interface fa0/1
TTG1(config-if)#ip address 10.1.0.1 255.255.255.0
TTG1(config-if)#ip nat intside Cu hnh interface Fa0/0 l interface inside
TTG1(config-if)#no shutdown
- Chng ta tin hnh cu hnh Static NAT cho TTG1 bng cu lnh :
TTG1(config)#ip nat inside source static 10.1.0.2 172.17.0.1
Cu lnh trn c ngha l : cc gi tin xu t pht t PC1 khi qua router ( vo t interface
Fa0/1) TTG1 ra ngoi( ra khi interface S0/1/0) s c i a ch IP source t 10.1.0.2 thnh
a ch 172.17.0.1 (y l a ch c ng k vi ISP)
- Chng ta tin hnh t Static Route cho 2 Router TTG2 v TTG1.
242
Inside local
10.1.0.2
Outside local
---
Outside global
---
243
- T ngoi ISP ( TTG2 ) mun ping vo PC1 hay cc server bn trong mng LAN ca khch
hng bng cch ping vo a ch publish ang c NAT trn TTG1 v bn ngoi internet ch kt
ni c n IP ny
244
3. X l li vi cu hnh NAT
Router#debug ip nat
245
Gii thiu :
NAT (Network Address Translation) dng chuyn i cc private address thnh a ch
public address. Cc gi tin t mng ni b ca user gi ra ngoi, khi n router bin a ch IP
source s c chuyn i thnh a ch public m user ng k v i ISP. iu ny cho php
cc gi tin t mng ni b c th c gi ra mng ngoi (Internet).
NAT c cc loi : NAT static, NAT pool, NAT overload.
NAT static cho php chuyn i mt a ch ni b thnh mt a ch public.
NAT pool cho php chuyn i cc a ch ni b thnh mt trong dy a ch public.
NAT overload cho php chuyn i cc a ch ni b thnh mt a ch public
Trong k thut NAT overload, router s s dng thm cc port cho cc a ch khi chuyn
i.
II.
III.
ip nat inside source {list {accesslistnumber | name} pool name [overload] | static
localip globalip}
Cho php chuyn a ch ni b thnh a ch public
ip nat pool name startip endip {netmask | prefixlength prefixlength} [type rotary]
To NAT pool
debug ip nat
Xem hot ng ca NAT
M t bi lab v hnh :
246
- hnh bi lab nh hnh trn. Router TTG1 c cu hnh inteface loopback 0, loopback 1,
loopback 2. Router TTG2 c cu hnh interface loopback 0. Hai router c ni vi nhau bng
cp Serial. Ta gi lp 3 lp mng lo0, lo1, lo2 l nhng mng bn trong, khi cc traffic bn
trong mng ny i ra ngoi ( ra khi S0/1/0) tt c s c chuyn i a ch thnh 192.168.1.1
IV.
Cu hnh router :
Hai router c cu hnh cc interface nh sau :
Router TTG1 :
Router>enable
Router#configure terminal
Router(configure)# hostname TTG1
TTG1(configure)# interface Loopback0
TTG1(configure-if)# ip address 10.1.0.1 255.255.0.0
TTG1(configure-if)#exit
TTG1(configure)# interface Loopback1
TTG1(configure-if)# ip address 11.1.0.1 255.255.0.0
TTG1(configure-if)#exit
TTG1(configure)# interface Loopback2
TTG1(configure-if)# ip address 12.1.0.1 255.255.0.0
TTG1(configure-if)#exit
TTG1(configure)#interface Serial0/1/0
247
248
TTG1(config-if)#exit
- Sau khi bt debug NAT, chng ta s ping n loopback0 ca TTG2 t loopback0 ca TTG1. Ta
gi lp traffic t host 10.1.0.1 n mng 13.1.0.1. Lc ny khi traffic ca 10.1.0.1 qua S0 s
chuyn i a ch.
TTG1#ping
Protocol [ip]:
249
250
Inside local
Outside local
Outside global
icmp 172.1.1.1:2459
10.1.0.1:2459
13.1.0.1:2459
13.1.0.1:2459
icmp 172.1.1.1:2460
10.1.0.1:2460
13.1.0.1:2460
13.1.0.1:2460
icmp 172.1.1.1:2461
10.1.0.1:2461
13.1.0.1:2461
13.1.0.1:2461
icmp 172.1.1.1:2462
10.1.0.1:2462
13.1.0.1:2462
13.1.0.1:2462
icmp 172.1.1.1:2463
10.1.0.1:2463
13.1.0.1:2463
13.1.0.1:2463
251
Inside local
Outside local
Outside global
icmp 172.1.1.1:6407
11.1.0.1:6407
13.1.0.1:6407
13.1.0.1:6407
icmp 172.1.1.1:6408
11.1.0.1:6408
13.1.0.1:6408
13.1.0.1:6408
icmp 172.1.1.1:6409
11.1.0.1:6409
13.1.0.1:6409
13.1.0.1:6409
icmp 172.1.1.1:6410
11.1.0.1:6410
13.1.0.1:6410
13.1.0.1:6410
icmp 172.1.1.1:6411
11.1.0.1:6411
13.1.0.1:6411
13.1.0.1:6411
TTG1#ping
252
Protocol [ip]:
Target IP address: 13.1.0.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 12.1.0.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.1.0.1, timeout is 2 seconds:
..
Success rate is 0 percent (0/5)
- i vi 12.1.0.1, chng ta khng ping ra ngoi c v mng 12.1.0.0/16 b cm trong
access list 1.
- ng router TTG2, chng ta ping xung cc loopback ca router TTG1
TTG2#ping 10.1.0.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
TTG2#ping 11.1.0.1
253
254
172.1.1.1/24 n 172.1.1.5/24
255
IPv6 Lab
256
HN(config-if)#interface s0/2/1
HN(config-if)#ipv6 address 2001:db8:1:6::1/64
HN(config)#interface s0/1/1
HN(config-if)#ipv6 address 2001:db8:1:4::1/64
HN(config)#interface s0/2/0
HN(config-if)#ipv6 address 2001:db8:1:5::1/64
HN(config)#interface loopback 1
HN(config-if)#ipv6 address 2001:db8:1:2::/64 eui-64
DN:
DN(config)#interface s0/1/1
DN(config-if)#ipv6 address 2001:db8:1:4::2/64
DN(config)#interface loopback 1
DN(config-if)#ipv6 address 2001:db8:1:1::/64 eui-64
HCM:
HCM(config)#interface s0/1/1
HCM(config-if)#ipv6 address 2001:db8:1:5::2/64
HCM(config)#interface loopback 1
HCM(config-if)#ipv6 address 2001:db8:1:3::/64 eui-64
2.Kim tra li cu hnh ipv6 trn 4 router:
S dng cc lnh show ipv6 interface,show ipv6 interface brief
HCM#show ipv6 interface brief
FastEthernet0/0
[administratively down/down]
unassigned
FastEthernet0/1
[up/up]
unassigned
257
Serial0/1/0
[administratively down/down]
unassigned
Serial0/1/1
[up/up]
FE80::20A:B8FF:FE21:738C
2001:DB8:1:5::2
ipv6 address
Loopback1
[up/up]
FE80::20A:B8FF:FE21:738C
2001:DB8:1:3:20A:B8FF:FE21:738C
258
259
HN#ping 2001:db8:1:4::2
HN(config)#interface s0/1/1
HN(config-if)#ipv6 rip TTG enable
HN(config)#interface s0/2/1
HN(config-if)#ipv6 rip TTG enable
HN(config)#interface s0/2/0
260
261
C 2001:DB8:1:2::/64 [0/0]
via ::, Loopback1
L 2001:DB8:1:2:218:73FF:FE1C:379E/128 [0/0]
via ::, Loopback1
R 2001:DB8:1:3::/64 [120/2]
via FE80::20A:B8FF:FE21:738C, Serial0/2/0
C 2001:DB8:1:4::/64 [0/0]
via ::, Serial0/1/1
L 2001:DB8:1:4::1/128 [0/0]
via ::, Serial0/1/1
C 2001:DB8:1:5::/64 [0/0]
via ::, Serial0/2/0
L 2001:DB8:1:5::1/128 [0/0]
via ::, Serial0/2/0
C 2001:DB8:1:6::/64 [0/0]
via ::, Serial0/2/1
R 2001:DB8:1:7::/64 [120/2]
via FE80::218:73FF:FE1C:2DCA, Serial0/2/1
L FE80::/10 [0/0]
via ::, Null0
L FF00::/8 [0/0]
via ::, Null0
6.T router DN v HCM th ping n Internet
DN#ping 2001:db8:1:6::2
Type escape sequence to abort.
262
Router(config)#interface
fastethernet 0/0
fa0/0
Router(config-if)#ipv6 enable
263
264
Gii thiu :
PPP (Point-to-Point Protocol) l giao thc ng gi c s dng thc hin kt ni
trong mng WAN. PPP bao gm LCP (Link Control Protocol) v NCP (Network Control
Protocol). LCP c dng thit lp kt ni point-to-point, NCP dng cu hnh cho cc giao
thc lp mng khc nhau.
PPP c th c cu hnh trn cc interface vt l sau :
Asynchronous serial : cng serial bt ng b
Synchronous serial : cng serial ng b
High-Speed Serial Interface (HSSI) : cng serial tc cao
Integrated Services Digital Network (ISDN)
Qu trnh to session ca PPP gm ba giai on (phase):
Link-establishment phase
Authentication phase (ty chn)
Network layer protocol phase
Ty chn xc nhn (authentication) gip cho vic qun l mng d dng hn. PPP s
dng hai cch xc nhn l PAP (Password Authentication Protocol) v CHAP (Challenge
Handshake Authentication Protocol).
encapsulation ppp
Cu hnh cho interface s dng giao thc PPP
265
III.
M t bi lab v hnh :
Cu hnh router :
a) Bc 1 : t tn v a ch cho cc interface
Router TTG1 :
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(configure)#interface s0/1/0
TTG1(configure-if)#ip address 192.168.1.1 255.255.255.0
TTG1(configure-if)#clockrate 64000
TTG1(configure-if)#exit
Router TTG2 :
Router>enable
266
Router#configure terminal
Router(config)#hostname TTG2
TTG2(configure)#interface s0/1/0
TTG2(configure-if)#ip address 192.168.1.2 255.255.255.0
TTG2(configure-if)#clockrate 64000
TTG2(configure-if)#exit
- Chng ta s kim tra trng thi ca cc cng bng cu lnh show ip interface brief
TTG2#sh ip interface brief
Interface
IP-Address
Protocol
Fastethernet0/0
unassigned
Serial0/1/0
192.168.1.2
YES manual up
Serial0/1/1
unassigned
up
- Cng serial ca router TTG2 up. Lm tng t kim tra trng thi cc cng ca router
TTG1.
- Chng ta s dng cu lnh show interfaces serial bit c cc thng s ca interface serial
cc router
TTG2#sh interfaces serial 0/1/0
Serial0/1/0 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,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:02, output 00:00:01, 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: weighted fair
267
268
IP-Address
OK? Method
Status
FastEthernet0/0
unassigned
YES unset
Serial0/1/0
192.168.1.1
YES manual
up
Serial0/1/1
unassigned
YES unset
269
Protocol
down
270
271
272
273
274
- ngha ca cc cu thng bo :
Dng thng bo 1 : TTG2 gi thng bo challenge n router TTG1
Dng thng bo 2 : TTG2 nhn thng bo challenge t router TTG1
Dng thng bo 3 : TTG2 gi response n router TTG1
Dng thng bo 4 : TTG2 nhn response t router TTG1
Dng thng bo 5 : TTG2 gi xc nhn thnh cng n TTG1
Dng thng bo 6 : TTG2 nhn xc nhn thnh cng t TTG1
Dng thng bo 7 : Trng thi ca interface serial c chuyn sang UP
- Hai interface serial ca router TTG1 v TTG2 UP, chng ta ng router TTG2 ping n
interface serial 0/1/0 ca router TTG1 kim tra
TTG2#ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 14.1.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/44/60 ms
- Nu nh name v password trong cu lnh username name password password khng ng th
trng thi ca interface s b down. Do qu trnh xc nhn gia hai interface s s dng name v
password ny. Nu nh khng khp th kt ni s b hy
Mt s lnh lin quan n bi lab :
1. Cu hnh PPP PAP v CHAP
Router(config)#interface serial
0/0/0
s0/0/0.
Router(config-if)#encapsulation ppp
Router(config)#username routerb
password cisco
275
Router(config-if)#ppp
authentication pap
Router(config-if)#ppp
authentication chap
Router(config-if)#ppp
Router#debug ppp
276
277
Gii thiu :
Frame Relay l k thut m rng ca k thut ISDN. Frame relay s dng k thut
chuyn mch gi thit lp mt mng WAN. Frame Relay to ra nhng ng kt ni o
ni cc mng LAN li vi nhau to thnh mt mng WAN. Mng Frame Relay s dng cc
switch kt ni cc mng li vi nhau. K thut Frame Relay c s dng rng ri ngy nay,
do c gi thnh r hn rt nhiu so vi leased line.
Frame Relay hot ng lp Data link trong OSI v s dng giao thc LAPF (Link
Access Procedure for Frame Relay). Frame Relay s dng cc frame chuyn d liu qua li
gia cc thit b u cui ca user (DTE) thng qua cc thit b DCE ca mng Frame Relay.
ng kt ni gia hai DTE thng qua mng Frame Relay c gi l mt mch o (VC
: Virtual Circuit). Cc VC c thit lp bng cch gi cc thng ip bo hiu (signaling
message) n mng; c gi l switched virtual circuits (SVCs). Nhng ngy nay, ngi ta
thng s dng permanent virtual circuits (PVCs) to kt ni. PVC l cc ng kt ni c
cu hnh trc bi cc Frame Relay Switch v cc thng tin chuyn mch ca gi c lu trong
switch.
Trong Frame Relay, nu mt frame b li th s b hy ngay m khng c mt thng bo
no.
Cc router ni vi mng Frame Relay c th c nhiu ng kt ni o n nhiu mng
khc nhau. Do , Frame Relay gip chng ta tit kim rt nhiu v khng cn cc mng phi
lin kt trc tip vi nhau.
Cc ng kt ni o (VC) c cc DLCI (Data Link Channel Identifier) ca ring n.
DLCI c cha trong cc frame khi n c chuyn i trong mng Frame Relay.
Trong Frame Relay, ngi ta thng s dng mng hnh sao kt ni cc mng LAN
vi nhau hnh thnh mt mng WAN (c gi l hub and spoke topology)
278
trong hnh ny, mng trung tm c gi l hub, cc mng remote1, remote2, remote3,
remote4 v remote5 c gi l spoke. Mi spoke ni vi hub bng mt ng kt ni o (VC).
Trong hnh trn nu ta mun cc spoke c th lin lc c vi nhau th ch cn to ra cc VC
gia cc spoke vi nhau. hnh ny gip ta to ra mt mng WAN c gi thnh r hn rt
nhiu so vi s dng leased line, do cc mng ch cn mt ng ni vi mng Frame Relay.
Frame Relay s dng split horizon chng lp. Split horizon khng cho php routing
update tr ngc v interface gi. V trong frame relay, chng ta c th to nhiu ng PVC
trn mt interface vt l, do s b lp nu khng c split horizon.
Trong mng WAN s dng leased line, cc DTE c ni trc tip vi nhau nhng trong mng
s dng Frame Relay, cc DTE c ni vi nhau thng qua mt mng Frame Relay gm nhiu
Switch. Do chng ta phi map a ch lp mng Frame Relay vi a ch IP ca DTE u xa.
Chng ta c th map bng cch s dng cc cu lnh. Nhng vic ny c th c thc hin t
ng bng LMI v Inverse ARP. LMI (Local Management Interface) c trao i gia DTE v
DCE (Frame Relay switch), c dng kim tra hot ng v thng bo tnh trng ca VC,
iu khin lung, v cung cp s DLCI cho DTE. LMI c nhiu loi l : cisco (chun ring ca
Cisco), ansi (theo chun ANSI Annex D) v q933a (theo chun ITU q933 Annex A). Khi router
mi c ni vi mng Frame Relay, router s gi LMI n mng hi tnh trng. Sau
mng s gi li router mt thng ip LMI vi cc thng s ca ng VC c cu hnh.
Khi router mun map mt VC vi a ch lp mng, router s gi thng ip Inverse ARP bao
gm a ch lp mng (IP) ca router trn ng VC n vi DTE u xa. DTE u xa s gi
li mt Inverse ARP bao gm a ch lp mng ca n, t router map a ch ny vi s DLCI
ca VC.
II.
279
III.
framerelay switching
Cu hnh cho router hot ng nh mt frame relay switch
M t bi lab v hnh :
Cu hnh router :
- Chng ta cu hnh cho cc interface ca router TTG1 v TTG2 nh sau :
280
Router TTG1 :
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface Loopback0
TTG1(config-if)#ip address 10.1.0.1 255.255.255.0
TTG1(config-if)#interface Serial0/1/0
TTG1(config-if)# ip address 192.168.1.1 255.255.255.0
TTG1(config-if)#no shutdown
TTG1(config-if)#exit
TTG1(config)#router rip
TTG1(config-router)#network 10.0.0.0
TTG1(config-router)# network 192.168.1.0
Router TTG2 :
Router>enable
Router#configure terminal
Router(config)#hostname TTG2
TTG2(config)#interface Loopback0
TTG2(config-if)#ip address 11.1.0.1 255.255.255.0
TTG2(config-if)#interface Serial0/1/0
TTG2(config-if)# ip address 192.168.1.2 255.255.255.0
TTG2(config-if)#no shutdown
TTG2(config-if)#exit
TTG2(config)#router rip
281
TTG2(config-router)#network 11.0.0.0
TTG2(config-router)# network 192.168.1.0
- Chng ta tin hnh cu hnh frame realy cho hai router TTG1 v TTG2
TTG1(config)#interfae s0/1/0
TTG1(config-if)#encapsulation frame-relay
TTG2(config)#interface s0/1/0
TTG2(config-if)#encapsulation frame-relay
TTG2(config-if)#frame-relay lmi-type ansi
- Sau khi cu hnh frame relay cho router TTG1 v TTG2, chng ta s cu hnh cho router
FrameSwitch tr thnh mt frame relay switch nh sau :
FrameSwitch(config)#frame-relay switching
FrameSwitch(config)#interface s0/1/0
FrameSwitch(config-if)#encapsulation frame-relay
FrameSwitch(config-if)#frame-relay lmi-type ansi
FrameSwitch(config-if)#frame-relay intf-type dce Cu hnh interface serial 0
l Frame Relay DCE
FrameSwitch(config-if)#clock rate 64000
282
Inactive
Deleted
Static
Local
Switched
Unused
output pkts 3
in bytes 186
dropped pkts 1
in BECN pkts 0
in DE pkts 0
in FECN pkts 0
out DE pkts 0
pvc create time 00:01:04, last time pvc status changed 00:00:40
PVC Statistics for interface Serial1 (Frame Relay DCE)
Active
Inactive
Deleted
Static
Local
Switched
283
Unused
output pkts 3
in bytes 200
dropped pkts 0
in FECN pkts 0
out DE pkts 0
out bcast bytes 0
pvc create time 00:00:45, last time pvc status changed 00:00:43
DLCI USAGE ch cho ta bit hai interface S0/1/0, S0/1/1 hot ng ch frame relay
switch v ACTIVE. ng thi thng bo ca cu lnh cn cho ta bit c s gi
c chuyn mch qua interface (Num Pkts Switched 3).
- Nh vy, t kt qu trn ta bit c rng router FrameSwitch ang hot ng nh mt Frame
Relay Switch.
- Chng ta s kim tra tnh trng ca LMI gia router FrameSwitch v hai router TTG1, TTG2
bng cu lnh show frame lmi
FrameSwitch#show frame lmi
LMI Statistics for interface Serial0/1/0 (Frame Relay DCE) LMI TYPE = ANSI
Invalid Unnumbered info 0
Invalid Information ID 0
LMI Statistics for interface Serial0/1/1 (Frame Relay DCE) LMI TYPE = ANSI
Invalid Unnumbered info 0
284
Invalid Information ID 0
Input Dlci
Output Intf
Output Dlci
Status
Serial0/1/0
102
Serial0/1/1
201
active
Serial0/1/1
201
Serial0/1/0
102
active
- Kt qu cu lnh cho chng ta bit rng traffic n interface serial0/1/0 vi DLCI 102s
c chuyn mch qua serial0/1/1 vi DLCI 201; ngc li, traffic n serial0/1/1 vi
DLCI 201 s c chuyn mch qua serial0/1/0 vi DLCI 102. ng thi cu lnh cng
ch ra l c hai DLCI u hot ng.
- Chuyn sang router TTG1, chng ta s kim tra xem DLCI 102 trn interface serial0/0/0
c hot ng hay cha bng cch :
TTG1#sh frame-relay pvc
PVC Statistics for interface Serial0/0/0 (Frame Relay DTE)
Active
Inactive
Deleted
Static
Local
Switched
Unused
DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0
input pkts 8
output pkts 7
in bytes 646
285
dropped pkts 0
in BECN pkts 0
in DE pkts 0
in FECN pkts 0
out DE pkts 0
pvc create time 00:02:58, last time pvc status changed 00:02:38
- Nhn xt : Interface serial0/0/0 ca router TTG1 hot ng nh mt frame relay DTE, v
DLCI 102 hot ng.
- Mc nh Cisco s dng Inverse ARP map a ch IP u xa ca PVC vi DLCI ca
interface u gn. Do chng ta khng cn phi thc hin thm bc ny. kim tra vic ny
chng ta s dng cu lnh show frame-relay map
TTG1#sh frame-relay map
Serial0/1/0 (up): ip 192.168.1.2 dlci 102(0xC9,0x3090), dynamic,
broadcast, status defined, active
- Kt qu cu lnh cho ta bit, DLCI 102 hot ng trn interface serial0/0/0 v c map vi
a ch IP 102.168.1.2 ca router TTG2, v vic map ny l t ng.
- Lp li cc bc tng t kim tra cho router TTG2
TTG2#sh frame-relay pvc
PVC Statistics for interface Serial0/0/0 (Frame Relay DTE)
Active
Inactive
Deleted
Static
Local
Switched
Unused
DLCI = 201, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0/0
input pkts 10
output pkts 11
dropped pkts 0
in BECN pkts 0
in bytes 858
in FECN pkts 0
286
in DE pkts 0
out bcast pkts 11
out DE pkts 0
out bcast bytes 934
pvc create time 00:04:05, last time pvc status changed 00:04:05
287
Router(config)#interface serial
0/0/0
s0/0/0.
Router(config-if)#encapsulation
frame-relay
Router(config-if)#encapsulation
frame-relay ietf
Router(config-if)#frame-relay
288
Gii thiu :
- Fame relay hu nh rt ph bin trong cng ngh WAN .Frame Relay cung cp nhiu hn
cc c tnh v cc li nhun vic kt ni point -to- point WAN .
III.
M t bi lab v hnh :
Cu hnh :
289
FR-SWITCHING :
Router>enable
Router#configure terminal
Router(config)#hostname FRSwitch
FRSwitch(config)#interface s0/1/0
FRSwitch(config-if)# encapsulation frame-relay
FRSwitch(config-if)# clockrate 64000
FRSwitch(config-if)#frame-relay intf-type dce
FRSwitch(config-if)# frame-relay route 102 interface Serial0/1/1 201 thc hin route cho cc
PVC, lnh ny khi thy DLCI n S0/1/0 l 102 s y frame ny ra S0/1/1 v i thnh DLCI
201
FRSwitch(config-if)# frame-relay route 103 interface Serial0/2/0 301
FRSwitch(config-if)#exit
FRSwitch(config)#interface s0/1/1
FRSwitch(config-if)#encapsulation frame-relay
FRSwitch(config-if)# clockrate 64000
FRSwitch(config-if)#frame-relay intf-type dce
FRSwitch(config-if)# frame-relay route 201 interface Serial0/1/0 102
FRSwitch(config-if)#exit
FRSwitch(config)#interface s0/2/0
FRSwitch(config-if)#encapsulation frame-relay
FRSwitch(config-if)# clockrate 64000
FRSwitch(config-if)#frame-relay intf-type dce
FRSwitch(config-if)# frame-relay route 301 interface Serial0/1/0 103
Router TTG1:
Router>enable
Router#configure terminal
Router(config)#hostname TTG1
TTG1(config)#interface loopback 0
290
291
TTG2(config-if)#exit
TTG2(config)#interface Serial0/1/0.201 point-to-point
TTG2(config-if)# ip address 192.168.4.2 255.255.255.0
TTG2(config-if)# frame-relay interface-dlci 201
TTG2(config-if)#exit
TTG2(config)#router eigrp 100
TTG2(config-router)# network 192.168.2.0
TTG2(config-router)# network 192.168.4.0
TTG2(config-router)#exit
Router TTG3 :
Router>enable
Router#configure terminal
Router(config)#hostname TTG3
TTG3(config)#interface loopback 0
TTG3(config-if)#ip address 192.168.3.1 255.255.255.0
TTG3(config-if)#exit
TTG3(config)#interface s0/1/0
TTG3(config-if)#encapsulation frame-relay
TTG3(config-if)#no shutdown
TTG3(config-if)#exit
TTG3(config)#interface Serial0/1/0.301 point-to-point
TTG3(config-if)# ip address 192.168.5.2 255.255.255.0
TTG3(config-if)# frame-relay interface-dlci 301
TTG3(config-if)#exit
TTG3(config)#router eigrp 100
292
output pkts 14
in bytes 1448
dropped pkts 0
in FECN pkts 0
in BECN pkts 0
in DE pkts 0
out DE pkts 0
pvc create time 00:17:21, last time pvc status changed 00:04:16
- Chng ta s dng cu lnh sau xem thng tin v LMI
TTG1#sh frame-relay lmi
LMI Statistics for interface Serial0/1/0 (Frame Relay DTE) LMI TYPE = ANSI
Invalid Unnumbered info 0
Invalid Information ID 0
293
output pkts 17
in bytes 1590
dropped pkts 0
in FECN pkts 0
in BECN pkts 0
in DE pkts 0
out DE pkts 0
pvc create time 00:06:22, last time pvc status changed 00:07:02
DLCI = 103, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE =
Serial0/1/0
input pkts17
output pkts 16
in bytes 1620
dropped pkts 0
in FECN pkts 0
in BECN pkts 0
in DE pkts 0
out bcast pkts 0
out DE pkts 0
out bcast bytes 0
pvc create time 00:06:13, last time pvc status changed 00:09:19
PVC Statistics for interface Serial0/1/1 (Frame Relay DCE)
DLCI = 201, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE =
Serial0/1/1
- i vi lnh show frame pvc ta cn ch cc ch sau ca PVC status :
ACTIVE : C 2 u ca Frame relay PVC trng thi hot ng
294
IP-Address
Protocol
Loopback0
192.168.2.1
YES manual up
up
Serial0/1/0
unassigned
YES unset up
up
Serial0/1/0.201
192.168.4.2
YES manual up
up
Serial0/1/1
unassigned
down
295
To mt subinterface point-to-point c
296
point-to-point
ch s l 103
297
298