Professional Documents
Culture Documents
ThietKeMang
ThietKeMang
Mc lc
Hng dn thc hnh Thit k mng...................................................................................1
1 Lm quen vi chng trnh Router Sim......................................................................2
1.1 Thit lp mt mng trong Router Sim.................................................................2
1.2 Kt ni cc thit b trong Router Sim..................................................................3
1.3 Net Detective.......................................................................................................3
2 Cu hnh Router...........................................................................................................5
2.1 ng nhp vo router...........................................................................................5
2.2 Xem thng tin mt router....................................................................................5
2.3 t Password cho router......................................................................................5
2.4 Cu hnh cho router.............................................................................................6
3 Ci t Routing............................................................................................................6
3.1 Cu hnh Static routing........................................................................................6
3.2 Cu hnh Default routing.....................................................................................7
3.3 Cu hnh RIP routing...........................................................................................7
3.4 Cu hnh IGRP routing........................................................................................7
4 Cu hnh Switch...........................................................................................................8
4.1 Kt ni n Switch v t password....................................................................8
4.2 t hostname cho Switch....................................................................................9
4.3 t IP Address cho Switch..................................................................................9
4.4 Cu hnh VLANs...............................................................................................10
4.5 Cu hnh Trunk port...........................................................................................12
Trong Switch 1900 cng 26 c xc nh bi trunk A v cng f0/27 l trunk B............13
5 Backup v Restore Cisco Router IOS........................................................................13
5.1 K thut hi phc mt khu...............................................................................13
5.2 Sao chp d phng Cisco IOS...........................................................................14
5.3 Hi phc hoc nng cp IOS.............................................................................15
5.4 Sao lu d phng cu hnh Cisco......................................................................17
5.5 Hi phc Cu hnh Cisco Router t tftp server.................................................18
5.6 S dng Cisco Discovery Protocol ly thng tin v cc thit b lng ging.18
5.7 S dng telnet....................................................................................................20
5.8 To mt bng cc Host trn mt Router v ly IP ca mt Host.......................23
6 Cu hnh IPX Routing...............................................................................................24
6.1 Cu hnh nh tuyn IPX c bn........................................................................24
6.2 Cu hnh IPX cho Internetwork (mng o trong sim).......................................24
6.3 Kim tra li IPX Internetwork...........................................................................25
6.4 Thm mt mng IPX ph..................................................................................26
6.5 Thm mt mng IPX ph s dng Subinterface................................................27
6.6 Kim tra li vi CDP v IPX ping.....................................................................28
7 Cu hnh Access-Lists................................................................................................28
7.1 Danh sch a ch IP chun cho php truy cp vo mng..................................28
1
7.2 Kim tra li Danh sch truy cp chun..............................................................28
7.3 Gn mt Danh sch IP truy cp mng vo mt dng VTY...............................29
7.4 Danh sch IP truy cp mng m rng................................................................29
7.5 Kim tra li danh sch truy cp IP m rng......................................................31
7.6 Danh sch truy cp IPX chun...........................................................................31
7.7 Kim tra li danh sch truy cp IPX chun.......................................................31
8 Cu hnh Truy cp t xa.............................................................................................32
8.1 Cu hnh PPP Encapsulation..............................................................................32
8.2 Kim tra PPP Encapsulation..............................................................................33
8.3 Cu hnh PPP Authentication dng CHAP........................................................33
8.4 Kim tra PPP Authentication.............................................................................34
8.5 Tm hiu v Cu hnh Frame Relay...................................................................35
8.6 Cu hnh Frame Relay Switching......................................................................36
8.7 Cu hnh Frame Relay vi Subinterface............................................................38
8.8 Kim tra li Frame Relay...................................................................................39
2
1 Lm quen vi chng trnh Router Sim
Chng trnh Router Sim l mt chng trnh gi lp dng cho vic thit lp mt
mng my tnh vi cc thit b nh: Router, Switch v cc my tnh.
Cc mn chnh trong trong RouterSim:
Simulation Screen
3
2. Nhp chut trn cc cng mun kt ni, v d: E0, S0, S1.
4
2 Cu hnh Router
2.1 ng nhp vo router
5
2.3.2 Password cho console port, auxiliary port v Telnet
- S dng lnh line c password user mode cho cc cng ph nh:
Router(config)#line ?
<0-6> First Line number
aux Auxiliary line
console Primary terminal line
vty Virtual terminal
Trong :
o aux: config router qua modem
o console : config router thng qua console port
o vty : config router qua telnet. (Nu khng c t password th khng th
s dng Telnet cu hnh router)
- Line [aux/console/vty] [0]
- Login
- Password <pass>
2.3.3 M ha mt m
- Config t
- Service password-encryption
- Bt u t password nh trn
- No service password-encryption
3 Ci t Routing
3.1 Cu hnh Static routing
Chng ta s phi xy dng bng routing tnh cho mi router => c th dn ng
cho ton mng. Chng ta phi cu hnh cho tt c cc router th vic tm ng mi
c th hot ng c.
6
Cc lnh cu hnh router:
- con t
- ip route NetID Subnetmask DestIP
-
- exit
- show ip route
V d:
Router#con t
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.20.1
Router(config)#ip route 172.16.30.0 255.255.255.0 172.16.20.1
Router(config)#ip route 172.16.40.0 255.255.255.0 172.16.20.1
Router(config)#exit
Router#
V d:
Router>en
Router#con t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.20.1
Router(config)#ip classless
Router(config)#exit
Router#
7
- ^z
4 Cu hnh Switch
4.1 Kt ni n Switch v t password
Nhp p vo switch cn cu hnh s nhn c cc thng tin sau:
Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Enterprise Edition Software
Ethernet Address: 00-30-80-C7-BE-C0
[M] Menus
[K] Command Line
Enter Selection:K
Chng ta s kim tra cc password bng cch thot ra ngoi v login vo li. Ban
u s l password vo user mode v tip theo l password cho privileged
mode.
Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Enterprise Edition Software
Ethernet Address: 00-30-80-C7-BE-C0
8
PCA Number: 73-3122-04
PCA Serial Number: FAB033723WJ
Model Number: WS-C1912-A
System Serial Number: FAB0338S10A
Power Supply S/N: APQ032404SA
PCB Serial Number: FAB033723WJ,73-3122-04
-------------------------------------------------
[M] Menus
[K] Command Line
Enter Selection:
Enter password: ****
CLI session with the switch is open.
To end the CLI session, enter [Exit].
>en
Enter password:****
#
9
S dng cc lnh sau ci t IP cho switch:
PMMang01#show ip
IP Address: 0.0.0.0
Subnet Mask: 0.0.0.0
Default Gateway: 0.0.0.0
Management VLAN: 1
Domain name:
Name server 1: 0.0.0.0
Name server 2: 0.0.0.0
HTTP server : Enabled
HTTP port : 80
RIP : disabled
PMMang01#con t
Enter configuration commands, one per line. End with CNTL/Z.
PMMang01(config)#ip address 172.16.10.16 255.255.255.0
PMMang01(config)#ip default-gateway 172.16.10.1
PMMang01(config)#exit
PMMang01#sh ip
IP Address: 172.16.10.16
Subnet Mask: 255.255.255.0
Default Gateway: 172.16.10.1
Management VLAN: 1
Domain name:
Name server 1: 0.0.0.0
Name server 2: 0.0.0.0
HTTP server : Enabled
HTTP port : 80
RIP : disabled
PMMang01#
10
VLAN Type SAID MTU Parent RingNo BridgeNo Stp Trans1 Trans2
--------------------------------------------------------------------------
1 Ethernet 100001 1500 0 0 0 Unkn 0 0
2 Ethernet 100002 1500 0 0 0 Unkn 0 0
4 Ethernet 100003 1500 0 0 0 Unkn 0 0
1002 FDDI 101002 1500 0 0 0 Unkn 0 0
1003 Token-Ring 101003 1500 0 0 0 Unkn 0 0
1004 FDDI-Net 101004 1500 0 0 0 IEEE 0 0
1005 Token-Ring-Net 101005 1500 0 0 0 IBM 0 0
--------------------------------------------------------------------------
PMMang1#
PMMang1#con t
Enter configuration commands, one per line. End with CNTL/Z.
PMMang1(config)#int e0/1
PMMang1(config-if)#vlan-membership ?
dynamic Set VLAN membership type as dynamic
static Set VLAN membership type as static
PMMang1(config-if)#vlan-membership static ?
<1-1005> ISL VLAN index
PMMang1(config-if)#vlan-membership static 1
PMMang1(config-if)#int e0/2
PMMang1(config-if)#vlan-membership static 2
PMMang1(config-if)#int e0/4
PMMang1(config-if)#vlan-membership static 4
PMMang1(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
PMMang1#show vlan
VLAN Name Status Ports
--------------------------------------
1 sales Enabled 3,5-12, AUI, A, B
2 marketing Enabled 2
4 mis Enabled 4
1002 fddi-default Suspended
1003 token-ring-default Suspended
1004 fddinet-default Suspended
1005 trnet-default Suspended
--------------------------------------
PMMang1#
11
9 1 Static
10 1 Static
11 1 Static
12 1 Static
AUI 1 Static
A 1 Static
B 1 Static
PMMang1#
PMMang1(config-if)#trunk on
PMMang1(config-if)#
Trong :
Interface tr thnh trunk ch khi thit b kt ni c cu hnh on hoc
desirable.
Nu thit b kt ni c cu hnh hoc on, desirable hoc auto n s dn xp
tr thnh trunk port.
Interface l cng ISL trunk th n s khng iu nh vi bt k thit b no
gn vo n.
kim tra cc trunk port chng ta s dng lnh show trunk [port_number]
PMMang1#sh trunk ?
A Trunk A
B Trunk B
PMMang1#sh trunk a
DISL state: On , Trunking: On , Encapsulation type: ISL
PMMang1#
Trong Switch 1900 cng 26 c xc nh bi trunk A v cng f0/27 l trunk B.
12
Bng cch thay i thanh ghi cu hnh ta c th hi phc mt khu.
Bit 6 ca thanh ghi cu hnh c s dng xc nh cho Router bit l c cu hnh t
NVRAM hay khng. Gi tr mc nh ca thanh ghi cu hnh l 0x2102 (bit 6 = 0).
hi phc mt khu ta cn phi bt bit 6 ln tc l yu cu Router b qua khng c cu
hnh t NVRAM. Gi tr cn t cho thanh ghi cu hnh bt bit 6 l 0x2142.
1. Ta c th xem gi tr ca thanh ghi cu hnh hin thi bng lnh show version.
2500A#show version
CiscoInternetworkOperatingSystemSoftware
IOS(tm)2500Software(C2500JSL),Version12.0(8),RELEASESOFTWARE
(fc1)
[outputcut]
Configurationregisteris0x2102
Dng cui cho bit gi tr ca thanh ghi cu hnh.
2. Ta c th thay i gi tr bng lnh config-register.
2500A(config)#configregister0x0101
2500A(config)#^Z
2500A#shver
[cut]
Configurationregisteris0x2102(willbe0x0101atnextreload)
Lu l cc thay i trn router ch c tc dng sau khi router khi ng li.
3. Vi router 2500A ta g lnh reload ti du nhc c quyn (privileged mode)
2500A#reload
4. Khi router ang khi ng nhn ctrl-delete, ta s vo ch qun l ROM
SystemBootstrap,Version11.0(10c),SOFTWARE
Copyright(c)19861996byciscoSystems
2500processorwith14336Kbytesofmainmemory
Abortat0x10151E4(PC)
>
Lu l i vi router thc th nhn ctrl-break
5. thay i thanh ghi cu hnh ca cc router 2500 nhn o. N s hin ra mt menu
cc la chn ci t cho thanh ghi cu hnh. thay i thanh ghi cu hnh ta nhp lnh
o/r sau l gi tr mi ca thanh ghi cu hnh.
SystemBootstrap,Version11.0(10c),SOFTWARE
Copyright(c)19861996byciscoSystems
2500processorwith14336Kbytesofmainmemory
Abortat0x1098FEC(PC)
>o
Configurationregister=0x2102atlastboot
Bit#Configurationregisteroptionsettings:
15Diagnosticmodedisabled
14IPbroadcastsdonothavenetworknumbers
13BootdefaultROMsoftwareifnetworkbootfails
1211Consolespeedis9600baud
10IPbroadcastswithones
08Breakdisabled
07OEMdisabled
06Ignoreconfigurationdisabled
0300Bootfileiscisco22500(or'bootsystem'command)
>o/r0x2142
Sau khi thay i thanh ghi cu hnh bt bit 6. Ta nhn i khi to li router
>o/r0x2142
13
>i
SystemBootstrap,Version11.0(10c),SOFTWARE
Copyright(c)19861996byciscoSystems
6. Cho php router khi ng li hon ton, n s cho ta vo ch Setup
7. Chn No vo ch setup v g enable vo ch c quyn
8. G copy startup-config running-config, lnh ny s chp tp tin config sn ln b
nh. Bi v ta vt qua im i mt khu nn ta by gi ang trong phn cu hnh.
9. i mt khu v lu cu hnh li
10. i thanh ghi cu hnh tr li 0x2102
2500A#configt
2500A(config)#configregister0x2102
nh vy l ta thnh cng trong vic hi phc mt khu trn Router 2500A
11. i vi cc router 2600 th c mt s thao tc hi khc
sau khi khi ng ta nhn ctrl-delete
2600A#reload
SystemBootstrap,Version11.3(2)XA4,RELEASESOFTWARE(fc1)
Copyright(c)1999byciscoSystems,Inc.
TAC:Home:SW:IOS:Specialsforinfo
PC=0xfff0a530,Vector=0x500,SP=0x680127b0
C2600platformwith32768Kbytesofmainmemory
PC=0xfff0a530,Vector=0x500,SP=0x80004374
monitor:command"boot"abortedduetouserinterrupt
rommon1>
12. thay i thanh ghi cu hnh trn 2600 ta dng confreg
rommon1>confreg0x2142
sau khi ng li
rommon1>reset
13. Sau khi khi ng li ta chn no vo ch setup, sau lm tng t cc bc
nh 2500
2500A#showflash
Systemflashdirectory:
File Length Name/status
1 8121000 c2500jsl.11218.bin
[8121064bytesused,8656152available,16777216total]
16384KbytesofprocessorboardSystemflash(ReadONLY)
2500A#
14
2. Lu tn tp tin trong v d l c2500jsl.11218.bin. Tn ca file xc nh
nn v c cu thnh nh sau:
- c2500 l nn.
- j ch ta bit file l mt enterprise image
- s ch ta bit bao gm c phn kh nng m rng.
- l ch ta bit n c th xo khi flash v khng nn.
- 11.2-18 l s xem li
- .bin cho bit Cisco IOS l tp tin thi hnh c.
3. Dng cui cng cho bit flash c 16Mb tc l tha ch cho mt file 10Mb ca chng
ta. Khi kim tra li dung lng ca b nh flash c th cha file ta mun, ta tin
hnh cng vic sao chp d phng.
4. B quyt thnh cng l phi bo m phi c mt kt ni tt n my tftp. Ta c th
kim tra iu ny bng cch ping n my t mn hnh console ca router nh sau:
2500A#ping172.16.60.3
Typeescapesequencetoabort.
Sending5,100byteICMPEchosto172.16.60.2,timeoutis2seconds:
!!!!!
Successrateis100percent(5/5),roundtripmin/avg/max=4/4/8ms
5. Sau khi ping my tftp m bo IP ca n ang hot ng, bn c th dng lnh sao
chp tftp sao chp IOS n my nh di y. Lu rng sau khi nhn enter tn
ca tp tin trong b nh c hin th. iu ny lm bn d dng hn.
2500A#copyflashtftp
Systemflashdirectory:
FileLengthName/status
18121000c2500jsl.11218.bin
[8121064bytesused,8656152available,16777216total]
Addressornameofremotehost[255.255.255.255]?172.16.60.3
Sourcefilename?c2500jsl.11218.bin
Destinationfilename[c2500jsl.11218.bin]?(pressenter)
Verifyingchecksumfor'c2500jsl.11218.bin')file#1)...OK
Copy'/c2500jsl.11218'fromFlashtoserver
as'/c2500jsl.11218'?[yes/no]y
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!![outputcut]
Uploadtoserverdone
Flashcopytook00:02:30[hh:mm:ss]
2500A#
trong v d trn, ton b b nh flash c chp thnh cng vo my tftp. a ch ca
my xa chnh l a ch ca my tftp. Tp tin ngun chnh l tp tin trn b nh flash.
15
****NOTICE****
Flashloadhelperv1.0
Thisprocesswillacceptthecopyoptionsandthenterminate
thecurrentsystemimagetousetheROMbasedimageforthecopy.
Routingfunctionalitywillnotbeavailableduringthattime.
Ifyouareloggedinviatelnet,thisconnectionwillterminate.
Userswithconsoleaccesscanseetheresultsofthecopyoperation.
********
Proceed?[confirm](pressreturn)
2. Sau khi nhn enter xc nhn l bn hiu v router cn phi khi ng li, router s
hin th nh di y. Khi router s dng my tftp, n s nh a ch ny v ch yu
cu bn khng nh li m thi.
Systemflashdirectory:
FileLengthName/status
18121000/c2500jsl.11218
[8121064bytesused,8656152available,16777216total]
Addressornameofremotehost[172.16.60.3]?(press return)
3. Dng i lnh k l tn ca tp tin m bn mun chp vo flash. Tn tp tin cn nng
cp l c2500-js65i-l.120-9.bin.
Sourcefilename?c2500js56il.1209.bin
Destinationfilename[c2500js56il.1209.bin]?(pressreturn)
Accessingfile'c2500js56il.1209.bin'on172.16.60.3...
Loadingc2500js56il.1209.binfrom172.16.60.3(viaEthernet0):![OK]
4. Sau khi bn cho router ng dn v tn tp tin, n s hi bn xc nhn rng bn
hiu ni dung ca flash s b xo. Bn s c hi 3 ln m bo chc l bn thc s
mun xo b nh flash. Nu bn cha thc hin lnh copy run start, bn s c yu cu
lm iu bi v router cn phi khi ng li.
Eraseflashdevicebeforewriting?[confirm](press return)
Flashcontainsfiles.Areyousureyouwanttoerase?[confirm](press return)
Systemconfigurationhasbeenmodified.Save?[yes/no]:y
Buildingconfiguration...
[OK]
Copy'c2500js56il.1209.bin'fromserver
as'c2500js56il.1209.bin'intoFlashWITHerase?[yes/no]y
5. Sau khi xc nhn xo b nh flash, router phi khi ng li chy mt h iu hnh
IOS nh t ROM bi v bn khng th xo flash file nu n ang c s dng. Ton b
nhng g cha trong flash s b xo v tp tin t my tftp s c chp vo b nh flash.
%SYS5RELOAD:Reloadrequested
%FLH:c2500js56il.1209.binfrom172.16.60.3toflash...
Systemflashdirectory:
FileLengthName/status
18121000/c2500jsl.11218
[8121064bytesused,8656152available,16777216total]
Accessingfile'c2500js56il.1209.bin'on172.16.60.3...
Loadingc2500js56il.1209.bin.from172.16.60.3(viaEthernet0):
![OK]
Erasingdevice...
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Loadingc2500js56il.1209.binfrom172.16.60.3(viaEthernet0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!![outputcut]
Dng cha cc k t e cho bit ni dung ca flash ang c xo. Mi du chm than (!)
tc alf mt phn ca UDP c truyn.
6. Mt khi chp xong, bn s nhn c thng ip sau:
16
[OK10935532/16777216bytes]
Verifyingchecksum...OK(0x2E3A)
Flashcopytook0:06:14[hh:mm:ss]
%FLH:Rebootingsystemafterdownload
Sau khi tp tin c chp vo flash v checksum xong, router s khi ng li chy
tp tin IOS mi.
Lu l trong bi tp s khng c tp tin thc. y ch l bi tp th hin n thc hin
nh th no.
17
OverwritethepreviousNVRAMconfiguration?[confirm](pressreturn)
Buildingconfiguration...
[OK]
4. By gi khi bn chy show starting-config, phin bn l 12.0:
2500A#showstartupconfig
Using487outof32762bytes
!
version12.0
5. Khi tp tin c chp vo NVRAM, bn c th to mt sao lu d phng th hai
vo my tftp bng cch dng lnh copy running-config tftp (copy run tftp) nh sau:
2500A#copyruntftp
Addressornameofremotehost[]?172.16.60.3
Destinationfilename[2500Aconfg]?2500Aconfg
!!
487bytescopiedin12.236secs(40bytes/sec)
2500A#
6. Lu l ch xut hin hai du chm than (!), tc l 2 UDP ack. Nu tn my cu
hnh, lnh s t ng dng tn my cng vi confg nh l tn ca tp tin
18
1. u tin ly thng tin CDP trn router ca bn bng cch ly CDP Timer v Holdtime
Information. Dng lnh show cdp (sh cdp) s cho bit hai tham s CDP chung m c th
cu hnh trn thit b ca Cisco. Kt qu xut ra ging nh sau:
Router#sh cdp
GlobalCDPinformation:
SendingCDPpacketsevery60seconds
Sendingaholdtimevalueof180seconds
Router#
- CDP Timer cho bit khong thi gian gia cc packet CDP c gi i n tt c cc
cng hot ng.
- CDP holdtime l khong thi gian m thit b s gi packet nhn c t thit b lng
ging.
C Cisco router v switch dng chung tham s.
2. S dng lnh chung xem cdp holdtime v cdp timer cu hnh chng trn router.
Router#configt
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
Router(config)#cdp?
holdtimeSpecifytheholdtime(insec)tobesentinpackets
timerSpecifytherateatwhichCDPpacketsaresent(insec)
run
Router(config)#cdptimer90
Router(config)#cdpholdtime240
Router(config)#^Z
3. bn c th tt CDP hon ton trn router bng lnh no cdp run trong ch cu hnh
chung ca router (global configuration mode). Bt CDP dng cdp run.
Router(config)#no cdp run
Router(config)#cdp run
Router(config)#^Z
4. tt hoc m CDP trn mt cng router, dng no cdp enable v cdp enable.
Router(config)#interfaceethernet0
Router(configif)#nocdpenable
Router(configif)#cdpenable
Router(configif)#^Z
5. Lnh show cdp neighbor (sh cdp nei) cho bit thng tin v cc thit b kt ni trc
tip. Cn phi nh cc CDP packet khng c gi thng qua Cisco switch v bn ch
thy nhng g kt ni trc tip. Trn mt router kt ni n switch, bn s khong thy cc
thit b kt ni n switch. Sau y l kt qu thc hin trn 2500A.
Todd2500A#shcdpnei
CapabilityCodes:RRouter,TTransBridge,BSourceRouteBridge
SSwitch,HHost,IIGMP,rRepeater
DeviceID Local Intrfce Holdtme Capability Platform PortID
1900C Eth 0 238 TS 1900 1
2500E Ser 0 138 R 2500 Ser0
Todd2501#
Di y l bng gii thch cc ct hin th ca router
Ct Gii thch
Device ID Hostname ca thit b kt ni trc tip
Local Interface Cng hoc giao din m bn nhn c CDP packet t n.
Holdtime Thi gian Reuter gi thng tin nhn t thit b .
Capability Chc nng ca cc lng ging nh router, switch, repeater. M kh
nng c lit k ti phn u ca mn hnh kt qu
19
Platform Loi ca thit b Cisco. Trong mn hnh xut trn, mt Cisco 2509,
Cisco 2511 v Catalyst 5000 gn vo switch. 2509 ch thy switch v
router 2501 qua cng tun t 0 ca n.
Port ID Cng hoc giao din ca thit b lng ging m t CDP packet pht
ra.
6. Mt lnh khc cung cp thng tin ca cc lng ging l show cdp neighbor detail
(show cdp nei de) v c th chy trn router ln switch. Lnh ny cho bit thng tin chi
tit v mi thit b kt ni vo n nh mt router xut sau:
Todd2500A#shcdpneighbordetail
DeviceID:1900C
Entryaddress(es):
IPaddress:172.16.60.2
Platform:cisco1900,Capabilities:TransBridgeSwitch
Interface:Ethernet0,PortID(outgoingport):1
Holdtime:166sec
Version:
V9.00
DeviceID:2500E
Entryaddress(es):
IPaddress:172.16.20.1
Platform:cisco2500,Capabilities:Router
Interface:Serial0,PortID(outgoingport):Serial0
Holdtime:154sec
Version:
CiscoInternetworkOperatingSystemSoftware
IOS(tm)3000Software(IGSJL),Version11.1(5),RELEASE
SOFTWARE(fc1)Copyright(c)19861996byciscoSystems,
Inc.CompiledMon05Aug9611:48bymkamson
Todd2500E#
Trn y cho bit tn v a ch IP ca cc thit b kt ni trc tip. Ngoi mt s thng
tin ging nh lnh sh cdp nei, cn c thm phin bn ca IOS.
7. Lnh show cdp entry * hin th thng tin tng t nh show cdp nei de. Sau y l v
d ca lnh ny.
Todd2509#shcdpentry*
DeviceID:1900C
Entryaddress(es):
IPaddress:172.16.60.2
Platform:cisco1900,Capabilities:TransBridgeSwitch
Interface:Ethernet0,PortID(outgoingport):1
Holdtime:166sec
Version:
V9.00
DeviceID:2500E
Entryaddress(es):
IPaddress:172.16.20.1
Platform:cisco2500,Capabilities:Router
Interface:Serial0,PortID(outgoingport):Serial0
Holdtime:154sec
Version:
CiscoInternetworkOperatingSystemSoftware
IOS(tm)3000Software(IGSJL),Version11.1(5),RELEASE
20
SOFTWARE(fc1)Copyright(c)19861996byciscoSystems,
Inc.CompiledMon05Aug9611:48bymkamson
Todd2500E#
8. Lnh show cdp traffic hin th thng tin ng truyn ca interface, bao gm c s
lng CDP packet gi v nhn v cc li vi CDP. Kt qu ca lnh trn router.
2500A#shcdptraffic
CDPcounters:
Packetsoutput:13,Input:8
Hdrsyntax:0,Chksumerror:0,Encapsfailed:0
Nomemory:0,Invalidpacket:0,Fragmented:0
2500A#
21
2600A#configt
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
2600A(config)#linevty04
2600A(configline)#login
2600A(configline)#passwordtodd
2600A(configline)#^Z
2600A#
5. By gi kt ni vi router mt ln na (t 2500A)
Todd2500A#172.16.10.2
Trying172.16.10.2...Open
UserAccessVerification
Password:
2600A>
6. Nh l mt khu VTY l mt khu ch ngi dng, khng phi mt khu enable
Sau y l kt qu khi th chuyn sang ch c quyn sau khi telnet vo 2600A:
2600A>en
%Nopasswordset
2600A>
y l mt chc nng bo mt tt. Bn khng mun ai ch telnet vo thit b ca bn
v c th ch enable l vo c ch c quyn. Bn phi nhp mt khu enable hoc
enable secret password s dng telnet cu hnh thit b ca bn t xa.
22
1user(s)nowactiveonManagementConsole.
UserInterfaceMenu
[M]Menus
[K]CommandLine
EnterSelection:
23
1. Mt bng host cung cp vic phn gii tn ch cho router m n c xy dng. Lnh
to mt bng host l:
iphostnameip_address
2. Sau y l v d v cu hnh mt bng host vi 2 phn t cung cp tn cho router
2500E v switch 1900C:
2500A#configt
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
2500A(config)#iphost?
WORDNameofhost
2500A(config)#iphost2500e?
<065535>Defaulttelnetportnumber
A.B.C.DHostIPaddress(maximumof8)
2500A(config)#iphost2500e172.16.10.1?
A.B.C.DHostIPaddress(maximumof8)
<cr>
2500A(config)#iphost2500e172.16.10.1
2500A(config)#iphost1900c172.16.60.2
2500A(config)#^Z
3. xem bng host, ta dng lnh show hosts nh sau:
2500A#shhosts
Defaultdomainisnotset
Name/addresslookupusesdomainservice
Nameserversare255.255.255.255
HostFlagsAgeTypeAddress(es)
2500e(perm,OK)0IP172.16.10.1
1900c(perm,OK)0IP172.16.60.2
2500A#
Trong kt qu trn, bn c th thy 2 tn host v a ch IP tng ng. Ch perm trong
ct flag cho bit phn t ny c cu hnh bng tay. Nu l temp th n c cung cp
bi DNS.
4. kim tra xem bng host c lm vic khng, ti du nhc i lnh g tn host tc l
s dng telnet. Dng tn host telnet vo thit b xa, sau nhn Ctrl-Shift-6, sau
X tr v mn hnh 2500A.
2500A#2500e
Trying2500e(172.16.10.1)...Open
UserAccessVerification
Password:
2500E>(control+shift+6,then x)
2500A#
2500A#1900c
Trying1900c(172.16.60.2)...Open
Catalyst1900ManagementConsole
Copyright(c)CiscoSystems,Inc.19931999
Allrightsreserved.
EnterpriseEditionSoftware
EthernetAddress:00B064756BC0
PCANumber:73312204
PCASerialNumber:FAB040131E2
ModelNumber:WSC1912A
SystemSerialNumber:FAB0401U0JQ
PowerSupplyS/N:PHI033108SD
PCBSerialNumber:FAB040131E2,73312204
24
1user(s)nowactiveonManagementConsole.
UserInterfaceMenu
[M]Menus
[K]CommandLine
EnterSelection:(control+shift+6,then x)
2500A#
5. Lu trong cc phn t xut ra bng lnh show session di y th tn host c
hin th thay v a ch IP bi v a ch IP c x l.
2500A#shsess
Conn Host Address Byte Idle ConnName
1 1900c172.16.60.20 0 1900c
*2 2500e172.16.10.10 0 2500e
2500A#
6. Bn c th xo tn host t bng bng cch s dng lnh no ip host nh sau:
2500A(config)#noiphost2500e
25
2500A(configif)#interfaceserial0
2500A(configif)#ipxnetwork20
2500A(configif)#^z
2500A#
2. Kt ni n router 2500B, 2500C, 2500D, 2500E v cu hnh n nh sau:
2500B>enable
2500B#configt
2500B(config)#ipxrouting
2500B(config)#interfaceethernet0
2500B(configif)#ipxnetwork70
2500B(configif)#interfaceserial0
2500B(configif)#ipxnetwork30
2500B(configif)#^z
2500B#
2500C>enable
2500C#configt
2500C(config)#ipxrouting
2500C(config)#interfaceethernet0
2500C(configif)#ipxnetwork80
2500C(configif)#interfaceserial0
2500C(configif)#ipxnetwork40
2500C(configif)#^z
2500C#
2500D>enable
2500D#configt
2500D(config)#ipxrouting
2500D(config)#interfaceethernet0
2500D(configif)#ipxnetwork90
2500D(configif)#interfaceserial0
2500D(configif)#ipxnetwork50
2500D(configif)#^z
2500D#
2500E>enable
2500E#configt
2500E(config)#ipxrouting
2500E(config)#interfaceethernet0
2500E(configif)#ipxnetwork10
2500E(configif)#interfaceserial0
2500E(configif)#ipxnetwork20
2500E(configif)#interfaceserial1
2500E(configif)#ipxnetwork30
2500E(configif)#^z
2500E#
3. Kt ni n router 2600A v cu hnh nh sau:
2600A>enable
2600A#configt
2600A(config)#ipxrouting
2600A(config)#interfacefastethernet0/0.1
2600A(configsubif)#ipxnetwork10
2600A(configsubif)#interfacefastethernet0/0.2
2600A(configsubif)#ipxnetwork2
2600A(configsubif)#interfacefastethernet0/0.3
2600A(configsubif)#ipxnetwork3
26
2600A(configsubif)#interfaceserial0/0
2600A(configif)#ipxnetwork40
2600A(configif)#interfaceserial0/1
2600A(configif)#ipxnetwork50
2600A(configif)#^z
2600A#
27
2. Kim tra li cu hnh ny bng lnh show running-config. Bn s nhn thy hai mng
IPX chy trong cng Ethenet 0.
3. G lnh show ipx route. Lu l mng IPX 60a c hin th l kt ni trc tip
nhng vi mt k t c tc l secondary.
4. Thm mt mng IPX ph chy theo kiu frame Ethernet_II trn router 2500B. Dng s
mng IPX 70a.
2500B#configt
2500B(config)#interfaceethernet0
2500B(configif)#ipxnetwork70aencapsulationarpasecondary
2500B(configif)#^z
2500B#
5. Thm mt mng IPX ph chy theo kiu frame SNAP trn router 2500C. S dng s
mng IPX l 70a.
2500C#configt
2500C(config)#interfaceethernet0
2500C(configif)#ipxnetwork80aencapsulationsnapsecondary
2500C(configif)#^z
2500C#
Vic ci t nhiu loi mng khc nhau nh vy l khng cn thit trong thc t. y ch
l hng dn hiu v cch thc ci t cho 4 kiu frame khc nhau ca IPX.
1. Cho n lc ny, trn router 2500A, ta c hai kiu frame c cu hnh l 802.3 v
802.2. Ta cu hnh Ethernet_II v SNAP s dng hai subinterface.
2500A#configt
2500A(config)#interfaceethernet0.1
2500A(configsubif)#ipxnetwork60bencaparpa
2500A(configsubif)#interfaceethernet0.2
2500A(configsubif)#ipxnetwork60cencapsnap
2500A(configsubif)#^z
2500A#
Vic cu hnh quan trng nht cn lu l s subinterface .1 v .2. Bn c th s dng
bt k s no. Lu l lnh encapsulation c s dng trong subinterface thay v
secondary v chng ta cng s dng s mng IPX khc.
2. Trn router 2500B, chng ta c 802.3 v Ethernet_II. Cu hnh 802.2 v SNAP s
dng 2 subinterface.
2500B#configt
2500B(config)#interfaceethernet0.1
2500B(configsubif)#ipxnetwork70bencapsap
2500B(configsubif)#interfaceethernet0.2
2500B(configsubif)#ipxnetwork70cencapsnap
2500B(configsubif)#^z
2500B#
28
3. Trn router 2500C, chng ta c 802.3 v SNAP. Cu hnh 802.2 v SNAP dng 2
subinterface.
2500C#configt
2500C(config)#interfaceethernet0.1
2500C(configsubif)#ipxnetwork80bencapsap
2500C(configsubif)#interfaceethernet0.2
2500C(configsubif)#ipxnetwork80cencaparpa
2500C(configsubif)#^z
2500C#
4. Bi v ta khng thm mt mng ph trn router 2500D, by gi ta s ci t nh l bi
luyn tp. Thrm 3 kiu frame cn li vo 2500D s dng s mng IPX 90a, 90b, 90c.
To 802.2 s dng secondary v Ethernet_II, SNAP dng subinterface.
2500D#configt
2500D(config)#interfaceethernet0
2500D(configif)#ipxnetwork90aencapsulationsapsecondary
2500D(configif)#interfaceethernet0.1
2500D(configsubif)#ipxnetwork90bencaparpa
2500D(configsubif)#interfaceethernet0.2
2500D(configsubif)#ipxnetwork90cencapsnap
2500D(configsubif)#^z
2500D#
Bn c th kim tra li mng IPX bng cch s dng cc lnh CDP v IPX Ping. Lnh
CDP c th s dng tm a ch IPX ca router lng ging v sau a ch c th s
dng vi lnh IPX Ping.
1. Kt ni n 2500A v dng CDP tm a ch IPX ca 2500E.
2500A#showcdpneighbordetail
2. Dng a ch IPX m CDP hin th Ping router 2500E
2500A#pingipxaddress
3. Telnet vo 2500E v ly a ch IPX ca 2500B, sau tr v 2500A console v ping
2500B vi IPX.
2500A#telnet172.16.20.1
2500E#showcdpneighbordetail
2500E#[cntl+shift+6thenx]
2500A#pingipxaddress
7 Cu hnh Access-Lists
7.1 Danh sch a ch IP chun cho php truy cp vo mng
29
2. Kt ni vo 2500A v to mt danh sch truy cp m cm truy cp t G v H khi mun
vo 172.16.60.0
2500A#configt
2500A(config)#accesslist10denyhost172.16.80.3
2500A(config)#accesslist10denyhost172.16.90.3
2500A(config)#accesslist10permitany
Lu l danh sch ny cn phi c to gn vi mng ch nht, v th m ta to ti
2500A.
30
2600A(config)#accesslist10permitany
1. Kim tra rng G v H c th telnet vo 2600A.
2. Kt ni vo 2600A v cm telnet i vi G v H nhng cho php cc thit b khc
telnet vo 2600A.
2600A(config)#line vty 0 4
2600A(configline)#access-class 10 in
2600A(configline)#^z
2600A#
3. p dng danh sch truy cp trc tip vo cc dng VTY v khng phi interface.
2600A(config)#line vty 0 4
2600A(configline)#access-class 10 in
2600A(configline)#^z
2600A#
4. Kim tra rng G v H khng th telnet vo 2600A.
5. Kitm tra rng 2500C vn c th telnet vo 2600A.
2500C#telnet172.16.40.1
Chng ta s xo danh sch truy cp IP chun trn 2500A v thay bng mt danh sch
ngn gn hn. Chng ta cn G v H s dng cc dch v trong mng 172.16.60.0 nhng
ta khng cho php telnet vo switch 1900C.
1. Xo danh sch truy cp khi 2500A
2500A#configt
2500A(config)#noaccesslist10
2. Xo danh sch truy cp khi cng serial 0 ca 2500A
2500A(config)#interfaceserial0
2500A(configif)#noipaccessgroup10in
Lu ch cn nhp no access-list 10 on xo danh sch truy cp nhng bn phi nhp
ton b lnh xo danh sch khi cng ca router.
3. Kim tra thy G v H c th ping 172.16.60.2 v 3.
4. To danh sch truy cp trong 2500A cm telnet vo 172.16.60.0 nhng vn cho G
v H ping E.
2500A#configt
2500A(config)#accesslist110denytcphost172.16.80.3
172.16.60.00.0.0.255eqtelnet
2500A(config)#accesslist110denytcphost172.16.90.3
172.16.60.00.0.0.255eqtelnet
2500A(config)#accesslist110permitipanyany
31
Danh sch tng t c th xy dng trn 2600A v 2500E. C th ni tt nht cu
hnh danh sch ny l trn 2600A v lc cc gi c gng vt ra Fastethernet 0/0. iu
ny cho php dng cc packet s b t chi khi n 172.16.60.0 nhng trc khi n c
a vo mng xng sng.
6. Nu bn mun dng cc gi gn vi ngun, to danh sch truy cp IP m rng trn
2600A. u tin xo cu hnh trn 2500A.
2500A#configt
2500A(config)#noaccesslist110
7. Xo danh sch truy cp trn serial 0 ca 2500A.
2500A(config)#interfaceserial0
2500A(configif)#noipaccessgroup110in
8. To mt danh sch truy cp trn 2600A cm telnet vo 172.16.60.0 nhng vn cho
php G v H ping E.
2600A#configt
2600A(config)#accesslist110denytcphost172.16.80.3
172.16.60.00.0.0.255eqtelnet
2600A(config)#accesslist110denytcphost172.16.90.3
172.16.60.00.0.0.255eqtelnet
2600A(config)#accesslist110permitipanyany
9. By gi p dng danh sch ny cho cng fastethernet 0/0 ca 2500A lc cc gi ra
khi router n 172.16.60.0
2600A(config)#interfacefastethernet0/0
2600A(configif)#ipaccessgroup110out
2600A(configif)#^z
2600A#
10. Kim tra danh sch truy cp bng cch th telnet 172.16.60.2
Tt c cc thit b khc phi c th telnet vo 172.16.60.2.
Danh sch truy cp IPX c cu hnh tng t nh cc danh sch khc. Bn dng lnh
access-list to cho mnh danh sch truy cp ca cc kim tra packet v sau p dng
vo danh sch cho mt cng vi lnh access-group.
32
Danh sch truy cp IPX chun s dng my ngun hoc ch hoc a ch mng lc.
cch cu hnh rt ging vi cu hnh cho IP.
Cc tham s cu hnh danh sch truy cp IPX chun l
access-list 800-899 deny/permit source_address destination_address
Ta s cu hnh danh sch truy cp IPX chun trn 2600A chn mng IPX 70 khng b
hin th n 2500C v 2500D. iu ny rt ch li trong mt mng sn xut khi bn
khng mun mng Lan ca phng ti chnh b hin ra trn mng.
2. p dng danh sch truy cp ny cho cng fastethernet 0/0 vi lnh ipx access-group.
2600A(config)#interfacefastethernet0/0
2600A(configif)#ipxaccessgroup110in
2600A(configif)#^z
2600A#
Sau mt vi giy, 2600A, 2500C v 2500D s khng th thy mt tuyn no n IPX 70
trong bng nh tuyn IPX.
Chng lm cc cng vic kim tra danh sch truy cp IPX hu nh tng t vi vic
kim tra cho IP.
1. Kim tra li mng IPX 70 bit rng n khng xut hin trong bng nh tuyn ca
2600A.
2600A#showipxroute
2. Kim tra li mng IPX 70 bit n khng xut hin trong bng nh tuyn ca 2500D
2500D#showipxroute
3. Kim tra li mng IPX 70 bit n khng xut hin trong bng nh tuyn ca 2500E
2500E#showipxroute
4. Dng lnh show access-list kim tra li danh sch ca bn trn 2600A.
2600A#showaccesslist
5. xem ring danh sch truy cp IPX, dng lnh show ipx access-list
2600A#showipxaccesslist
6. Bn cng c th dng lnh show access-list 810
2600A#showaccesslist810
7. Kim tra li cng m danh sch truy cp ang p dng trn router 2600A bng cch
dng lnh show ipx interface
2600A#showipxinterface
33
8 Cu hnh Truy cp t xa
8.1 Cu hnh PPP Encapsulation
Encapsulation l s kt hp mt cu trc bn trong mt cu trc khc (VD: d liu theo
chun TCP/IP c ng gi bn trong mt frame ATM.). Tm dch l ng gi.
PPP l mt giao thc tng data-link c s dng qua cc thit b truyn thng quay s
tun t khng ng b v s dng LCP xy dng v duy tr kt ni data-link. Mc
ch c bn ca PPP l vn chuyn cc packet tng th 3 thng qua mt lin kt im-
im ca tng Data Link.
Giao thc HDLC (High-Level Data-Link Control) l mt giao thc im-im s dng
trn cc ng leased line. Khng c s dng xc thc trong HDLC v l chun ng gi
mc nh c dng bi cc router Cisco trn cc kt ni tun t ng b. Cisco HDLC
l mt phng thc c quyn giao tip vi bt k nh cung cp h tr HDLC no. Nu
bn mun hoc cho php xc thc trn kt ni tun t hoc kt ni t router Cisco n
router ca cc nh cung cp khc, khi cn phi cu hnh PPP trn cng serial.
Phn ny s hng dn bn cu hnh PPP trn 4 mng tun t v thay th HDLC thnh
mt phng thc ng gi trn lin kt tun t.
Mt khi thay th HDLC bng phng thc encapsulation tun t, bn cn kim tra li
xem mng ca mnh c cn ang hot ng.
u tin phi kim tra bng lnh show ip route bo m tt c cc tuyn IP v IPX
u n.
34
1. T cc router u s dng lnh show ip route kim tra mng vn hot ng.
2. T 2600A, dng lnh interface thy ng gi lin kt tun t.
2600A#showinterfaces0/0
2600A#showinterfaces0/1
3. T 2500E, kim tra encapsulation bng lnh show interface
2500E#showinterfaces0
2500E#showinterfaces1
35
2500A(configif)#pppauthenticationchap
2500A(configif)#^z
2500A#
2. Kt ni n 2500B to 2500E vi mt khu cisco.
2500B#configt
2500B(config)#username2500Epasswordcisco
2500B(config)#interfaceserial0
2500B(configif)#pppauthenticationchap
2500B(configif)#^z
2500B#
3. Kt ni n 2500C v to 2600A vi mk cisco.
2500C#configt
2500C(config)#username2600Apasswordcisco
2500C(config)#interfaceserial0
2500C(configif)#pppauthenticationchap
2500C(configif)#^z
2500C#
4. Kt ni n 2500D v to 2600A vi mk cisco.
5. Kt ni n 2600A v to 2500C, 2500D vi mk cisco.
2500E#configt
2500E(config)#username2500Apasswordcisco
2500E(config)#username2500Bpasswordcisco
2500E(config)#interfaceserial0
2500E(configif)#pppauthenticationchap
2500E(configif)#interfaceserial1
2500E(configif)#pppauthenticationchap
2500E(configif)#^z
2500E#
Frame Relay cung cp mt cng giao tip gia DTE (data terminal equipment) v DCE
(data circuit-terminating equipment, nh l switch). DTE bao gm cc thit b u cui,
36
PC, router, bridgescustomer-owned end node v cc thit b mng. DCE bao gm cc
thit b carrier-owned internetworking.
Tng t, Frame Relay s dng c PVC (Permanent Virtual Circuit) v SVC (Switched
Virtual Circuit dnh cho dial up), mc d hu ht cc mng Frame Relay dng PVC.
Virtual circuit ny cung cp mt ng dn y n mng ch trc khi gi frame
u tin i.
Cu hnh Frame Relay Encapsulation
Khi cu hnh FR trn router Cisco, bn cn phi xc nh n nh l mt encapsulation
trn cng serial. Ch c 2 loi encapsulation: Cisco v IETF (Internet Engineering Task
Force). Kt qu xut di y th hin hai phng thc encapsulation khc nhau khi
chn FR trn router cisco ca bn
RouterA(config)#int s0
RouterA(configif)#encapsulation frame-relay ?
ietfUseRFC1490encapsulation
<cr>
Encapsulation mc nh l Cisco tr khi bn nhp bng tay IETF. Ngoi ra, Cisco l kiu
dng kt ni gia hai thit b Cisco. Bn s c la chn s dng IETF encapsulation
nu bn cn phi kt ni gia mt thit b Cisco v mt thit b khc khng phi ca
Cisco.
Frame Relay DLCI
FR virtual circuit (PVC) c xc nh bi Data Link Connection Identifier (DLCI). Mt
nh cung cp dch v Frame Relay nh cng ty in thoi thng thng s gn gi tr
DLCI, gi tr c dng trong FR phn bit gia cc VC trn mng. Bi v rt nhiu
VC c th b ngt trn mt cng FR nhiu im, nhiu DLCI thng c lin kt vi n.
i vi thit b IP ti mi im cui ca mt VC, giao tip, a ch IP ca chng cn
phi map n cc DLCI. Vic lin kt ny c th thc hin nh l mt mt thit b nhiu
im m c th xc nh mng RT mt VC ch thch hp cho cc packet c gi qua
thit b vt l. Vic lin kt ny cng c th thc hin t ng bi IARP (Inverse ARP)
hoc bng tay thng qua lnh Frame Relay map.
S DLCI dng ch nh mt PVC thng c gn bi nh cung cp v bt u l 16.
Cu hnh mt s DLCI p dng vo mt cng th hin di y:
2500A(configif)#framerelayinterfacedlci?
<161007>DefineaDLCIaspartofthecurrentsubinterface
2500A(configif)#framerelayinterfacedlci16
Frame Relay RMI
Local Management Interface (LMI) c pht trin vo nm 1990 bi Cisco System,
StrataCom, Northern Telecom v Digital Equipment Corporation, sau tr thnh Gang-
of-four LMI hay Cisco LMI. Nhm ny nhn giao thc Frame Relay c bn t CCIT v
thm phn m rng vo cc tnh nng ca giao thc cho php thit b mng giao tip
d dng vi mng Frame Relay.
37
LMI l chun tn hiu gia mt thit b CPE (router) v mt frame switch. LMI chu trch
nhim qun l v duy tr trng thi gia cc thit b ny.
Nu bn khng dng tnh nng auto-sense ca LMI, bn phi kim tra nh cung cp
Frame Relay xc nh kiu no c dng. Kiu mc nh l Cisco, tuy nhin bn c
th i sang ANSI hay Q.933A. Ba kiu LMI khc nhau ny c m t trong phn kt
qu di y:
2500A(configif)#framerelaylmitype?
cisco
ansi
q933a
2500A(configif)#framerelaylmitypeansi
Bn c th c nhiu VC trn mt cng serial v coi chng nh l cc cng khc nhau, c
th gi chng l subinterface. tng xem subinterface nh l mt hardware interface
c nh ngha bi IOS. Mt thun li m ta t c thng qua s dng subinterface l
kh nng gn cc c im ca cc tng mng khc nhau vo mi subinterface v VC
nh l nh tuyn IP trn mt VC v IPX trn mt VC khc.
Subinterface vi Frame Relay
Bn nh ngha subinterface vi lnh int s0.subinterface numbet nh sau: u tin bn
ci t encapsulation trn cng serial, sau bn c th nh ngha subinterface.
2500A(config)#int s0
2500A(config)#encapsulation frame-relay
2500A(config)#int s0.?
<04294967295>Serialinterfacenumber
2500A(config)#int s0.16 ?
multipointTreatasamultipointlink
pointtopointTreatasapointtopointlink
Bn c th nh ngha hu nh khng gii hn cc subinterface trn mt cng vt l.
Trong v d trn, chng ta chn subinterface 16 bi v s i din cho s DLCI gn
cho cng . Tuy nhin, bn c th chn bt k s no khc gia 0 v 4.292.967.295.
38
2500E(configline)#login
2500E(configline)#password cisco
2500E(configline)#line console 0
2500E(configline)#login
2500E(configline)#password cisco
2500E(configline)#^z
2500E#
4. Kt ni vi 2600A v cu hnh hostname v mt khu.
Router>enable
Router#config t
Router(config)#hostname 2600A
2600A(config)#enable secret todd
2600A(config)#line vty 0 4
2600A(configline)#login
2600A(configline)#password cisco
2600A(configline)#line console 0
2600A(configline)#login
2600A(configline)#password cisco
2600A(configline)#^z
2600A#
Mt khi router ca bn r rng, bn c th bin chng thnh mt frame relay switch
vi lnh frame-relay switching. Tuy nhin, l phn d. Bn cn phi lin kt mi
DLCI trn switch. C hai router ch c 2 kt ni, v th s khng tn nhiu thi gian
nhng bn c c t PVC nn s phi mt cng mt cht.
39
2500E(configif)#^z
2500E#
6. Kt ni n 2600A v cu hnh Frame Switching
2600A#configt
2600A(config)#framerelayswitching
2600A(config)#interfaceserial0/0
2500A(config)#clockrate56000
2500A(configif)#frameintftypedce
2600A(configif)#framerelayroute16interfaceserial0/117
2600A(configif)#interfaceserial0/1
2600A(configif)#framerelayroute17interfaceserial0/016
2600A(configif)#^z
2600A#
By gi th c hai router frame-relay u c cu hnh, bn phi cu hnh router xa.
40
4. Kt ni n 2500C v cu hnh cng serial 0 vi Frame Relay subinterface. S dng
chung a ch IP v s mng IPX v Frame Relay switching router khng kt ni.
2500C#configt
2500C(config)#interfaceserial0
2500C(configif)#noipaddress
2500C(configif)#noipxnetwork
2500C(configif)#encapsulationframerelay
2500C(configif)#interfaceserial0.16pointtopoint
2500C(configsubif)#ipaddress172.16.10.1255.255.255.0
2500C(configsubif)#ipxnetwork10
2500C(configsubif)#framerelayinterfacedlci16
2500C(configsubif)#^z
2500C#
5. Kt ni n 2500D v lm tng t
2500D#configt
2500D(config)#interfaceserial0
2500D(configif)#noipaddress
2500D(configif)#noipxnetwork
2500D(configif)#encapsulationframerelay
2500D(configif)#interfaceserial0.16pointtopoint
2500D(configsubif)#ipaddress172.16.10.2255.255.255.0
2500D(configsubif)#ipxnetwork10
2500D(configsubif)#framerelayinterfacedlci17
2500D(configsubif)#^z
2500D#
6. Kim tra kt ni Frame-Relay ang hot ng. Ping t 2500C n 2500D
2500C#ping172.16.10.2
C nhiu cch kim tra li trng thi ca cc cng v PVC ca bn khi b dng Frame
Relay Encapsulation. Vn c th dng lnh show frame-relay vi du ? bit cc thng
s ca lnh.
2500A>shoframe?
ipshowframerelayIPstatistics
lmishowframerelaylmistatistics
mapFrameRelaymaptable
pvcshowframerelaypvcstatistics
routeshowframerelayroute
trafficFrameRelayprotocolstatistics
1. Lnh show frame-relay lmi s ho bit thng k ca mt giao thng LMI trao i
gia router ni b v Frame Relay switch.
2500A#shframelmi
LMIStatisticsforinterfaceSerial0(FrameRelayDTE)LMITYPE=CISCO
InvalidUnnumberedinfo0 InvalidProtDisc0
InvaliddummyCallRef0 InvalidMsgType0
InvalidStatusMessage0 InvalidLockShift0
InvalidInformationID0 InvalidReportIELen0
InvalidReportRequest0 InvalidKeepIELen0
NumStatusEnq.Sent0 NumStatusmsgsRcvd0
NumUpdateStatusRcvd0 NumStatusTimeouts0
41
Router#
Kt qu hin th cho bit cc li LMI cng vi loi LMI.
2. Lnh show frame pvc s lit k tt c cc PVC c cu hnh v s DLCI. N cung
cp trng thi ca mi kt ni PVC v thng k truyn ti. N cng cho bn s lng
packet BECN v FECN nhn c trn router.
2500A#shoframepvc
PVCStatisticsforinterfaceSerial0(FrameRelayDTE)
DLCI=16,DLCIUSAGE=LOCAL,PVCSTATUS=ACTIVE,INTERFACE=Serial0.1
inputpkts50977876outputpkts41822892inbytes3137403144
outbytes3408047602droppedpkts5inFECNpkts0
inBECNpkts0outFECNpkts0outBECNpkts0
inDEpkts9393outDEpkts0
pvccreatetime7w3d,lasttimepvcstatuschanged7w3d
xem thng tin v PVC 16, g lnh show frame-relay pvc 16.
3. Bn cng c th dng lnh show interface kim tra thng lng LMI. Lnh ny hin
th thng tin v encapsulation cng vi thng tin ca lp 2 v 3.
LMI DLCI, in m trong lnh, c dng nh ngha kiu LMI c dng. Nu l
1023, l kiu mc inh Cisco. Nu LMI DLCI l 0, l ANSI LMI.
2500A#shoints0
Serial0isup,lineprotocolisup
HardwareisHD64570
MTU1500bytes,BW1544Kbit,DLY20000usec,rely255/255,load2/255
EncapsulationFRAMERELAY,loopbacknotset,keepaliveset(10sec)
LMIenqsent451751,LMIstatrecvd451750,LMIupdrecvd164,DTELMIup
LMIenqrecvd0,LMIstatsent0,LMIupdsent0
LMIDLCI1023LMItypeisCISCOframerelayDTE
Broadcastqueue0/64,broadcastssent/dropped0/0,interfacebroadcasts
839294
Lnh show interface hin th thng tin dng, giao thc, DLCI v LMI.
4. Lnh show frame map cho bn bit vic lin kt tng mng vi DLCI (Network layer-
to-DLCI mapping)
2500A#showframemap
Serial0(up):ipx10.0007.7842.3575dlci16(0x10,0x400),
dynamic,broadcast,,statusdefined,active
Serial0(up):ip172.16.10.1dlci16(0x10,0x400),dynamic,
broadcast,,statusdefined,active
Lu l c hai loi lin kt, mt cho IP v 1 cho IPX. Thm vo , a ch ca tng
mng c cung cp bi giao thc Inverse ARP (IARP). Nu mt ngi qun tr lin kt
cc a ch ny, kt qu hin th s cho l static.
42