ccna实验手册.docx
- 文档编号:7729540
- 上传时间:2023-01-26
- 格式:DOCX
- 页数:51
- 大小:67.60KB
ccna实验手册.docx
《ccna实验手册.docx》由会员分享,可在线阅读,更多相关《ccna实验手册.docx(51页珍藏版)》请在冰豆网上搜索。
ccna实验手册
目录
实验一、配置STP与VTP2
实验二、静态路由10
实验三、RIP路由协议13
实验四、RIPv1与EIGRP在不连续网络下的比较20
实验五、访问列表与telnet访问控制26
实验六、静态、动态NAT与PAT30
实验七、帧中继链路上运行EIGRP34
实验八、背靠背帧中继39
实验九、配置ISDNDDR43
实验一、配置STP与VTP
环境:
三台交换机,形成一个全互连结构,sw3为2950,sw1和sw2为2900xl;
要求:
设置sw3为VTPserver,设置sw1和sw2为VTPclient,域名为cisco,密码为:
cisco,在server创建vlan10(name:
aa)和vlan20(name:
bb);设置sw3为vlan1的根桥,sw1为vlan10的根桥,sw2为vlan20的根桥;
初始化配置:
Sw#showvlan查看vlan信息
Sw#Deletevlan.dat用此命令将vlan删除
Sw#showstartup-config查看一下NVRAM是否保存了配置
Sw#erasestartup-config清空配置文件
Sw#reload重新启动交换机
sw>enable
sw#configterminal
sw(config)#hostnamesw1
sw1(config)#noipdomain-lookup关闭域名查找
sw1(config)#lineconsole0
sw1(config-line)#loggingsynchronous命令输入达到同步
sw1(config-line)#exec-timeout00设置永不超时
sw1(config-line)#exit
步骤一、配置VTP
sw3的配置:
sw3(config)#vtpmodeserver在sw3上启用vtpserver
DevicemodealreadyVTPSERVER.
sw3(config)#vtpdomaincisco设置域名
ChangingVTPdomainnamefromNULLtocisco
sw3(config)#vtppasswordcisco设置密码
SettingdeviceVLANdatabasepasswordtocisco
sw1的配置:
sw1#vlandatabase进入vlan数据库
sw1(vlan)#vtpclient启用VTPclient模式
SettingdevicetoVTPCLIENTmode.
sw1(vlan)#vtpdomaincisco作用到cisco域中
ChangingVTPdomainnamefromNULLtocisco
sw1(vlan)#vtppasswordcisco设置密码与server端相同
SettingdeviceVLANdatabasepasswordtocisco.
sw1(vlan)#exit使配置生效
InCLIENTstate,noapplyattempted.
Exiting....
sw2的配置:
sw2#vlandatabase
sw2(vlan)#vtpclient
SettingdevicetoVTPCLIENTmode.
sw2(vlan)#vtpdomaincisco
ChangingVTPdomainnamefromNULLtocisco
sw2(vlan)#vtppasswordcisco
SettingdeviceVLANdatabasepasswordtocisco.
sw2(vlan)#exit
sw2#
步骤二、启用干道端口
sw3的配置:
sw3(config)#interfacefa0/23
sw3(config-if)#switchportmodetrunk启用trunk端口
sw3(config-if)#interfacefa0/24
sw3(config-if)#switchportmodetrunk
sw1的配置:
sw1(config)#interfacefa0/23
sw1(config-if)#switchporttrunkencapsulationdot1q封装干道协议
sw1(config-if)#switchportmodetrunk启用trunk模式
sw1(config-if)#
sw1(config)#interfacefa0/24
sw1(config-if)#switchporttrunkencapsulationdot1q
sw1(config-if)#switchportmodetrunk
sw2的配置:
sw2(config)#interfacefa0/23
sw2(config-if)#switchporttrunkencapsulationdot1q
sw2(config-if)#switchportmodetrunk
sw2(config)#interfacefa0/24
sw2(config-if)#switchporttrunkencapsulationdot1q
sw2(config-if)#switchportmodetrunk
步骤三、测试vtp状态及创建vlan
sw3的状态:
sw3#showvtpstatus显示vtp状态
VTPVersion:
2
ConfigurationRevision:
0配置修订号
MaximumVLANssupportedlocally:
254
NumberofexistingVLANs:
5
VTPOperatingMode:
servervtp模式
VTPDomainName:
ciscovtp域名
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0x3F0x170xC80xB80x5A0xE30x010x66
Configurationlastmodifiedby0.0.0.0at0-0-0000:
00:
00
创建vlan:
sw3(config)#vlan10创建VLAN10
sw3(config-vlan)#nameaa命名为aa
sw3(config-vlan)#exit应用配置
sw3(config)#vlan20创建VLAN20
sw3(config-vlan)#namebb命名为bb
sw3(config-vlan)#exit
sw3(config)#
sw3的状态:
sw3#showvtpstatus在sw3显示vtp的状态
VTPVersion:
2
ConfigurationRevision:
2server的修订号
MaximumVLANssupportedlocally:
254
NumberofexistingVLANs:
7vlan也已经增加
VTPOperatingMode:
server
VTPDomainName:
cisco
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0x980x310xCF0xA00xA70x170x730x66
Configurationlastmodifiedby0.0.0.0at3-1-9300:
52:
05
sw2的状态:
sw2#showvtpstatus
VTPVersion:
2
ConfigurationRevision:
2已经同步了server
MaximumVLANssupportedlocally:
254
NumberofexistingVLANs:
7
VTPOperatingMode:
Client
VTPDomainName:
cisco
VTPPruningMode:
Disabled
VTPV2Mode:
Disabled
VTPTrapsGeneration:
Disabled
MD5digest:
0x980x310xCF0xA00xA70x170x730x66
Configurationlastmodifiedby0.0.0.0at3-1-9300:
52:
05
sw1的vlan信息:
sw1#showvlan显示vlan信息
VLANNameStatusPorts
----------------------------------------------------------------------------
1defaultactiveFa0/1,Fa0/2,Fa0/3,Fa0/4,
Fa0/5,Fa0/6,Fa0/7,Fa0/8,
Fa0/9,Fa0/10,Fa0/11,Fa0/12,
Fa0/13,Fa0/14,Fa0/15,Fa0/16,
Fa0/17,Fa0/18,Fa0/19,Fa0/20,
Fa0/21,Fa0/22,Fa0/23,Fa0/24
10aaactive已经同步了vlan的信息
20bbactive
步骤四、配置PVST
sw3(config)#spanning-treevlan1rootprimary设置为vlan1的根桥
Sw1(config)#spanning-treevlan10priority4096设置为vlan10的根桥
Sw2(config)#spanning-treevlan20priority4096设置为vlan20的根桥
步骤五、显示STP的信息
sw1的生成树信息:
sw1#showspanning-treebrief显示每VLAN生成树信息
VLAN1
SpanningtreeenabledprotocolIEEE
ROOTIDPriority24577
Address0007.eb06.1740非vlan1的根桥
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority32768
Address0030.803d.f640
HelloTime2secMaxAge20secForwardDelay15sec
VLAN10
SpanningtreeenabledprotocolIEEE
ROOTIDPriority4096
Address0030.803d.f641为vlan10的根桥
Thisbridgeistheroot
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority4096
Address0030.803d.f641
HelloTime2secMaxAge20secForwardDelay15sec
VLAN20
SpanningtreeenabledprotocolIEEE
ROOTIDPriority4096
Address00b0.645f.34c2非vlan20的根桥
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority32768
Address0030.803d.f642
HelloTime2secMaxAge20secForwardDelay15sec
sw2的生成树信息:
sw2#showspanning-treebrief
VLAN1
SpanningtreeenabledprotocolIEEE非vlan1的根桥
ROOTIDPriority24577
Address0007.eb06.1740
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority32768
Address00b0.645f.34c0
HelloTime2secMaxAge20secForwardDelay15sec
VLAN10
SpanningtreeenabledprotocolIEEE
ROOTIDPriority4096非vlan10的根桥
Address0030.803d.f641
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority32768
Address00b0.645f.34c1
HelloTime2secMaxAge20secForwardDelay15sec
VLAN20
SpanningtreeenabledprotocolIEEE
ROOTIDPriority4096为vlan20的根桥
Address00b0.645f.34c2
Thisbridgeistheroot
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority4096
Address00b0.645f.34c2
HelloTime2secMaxAge20secForwardDelay15sec
sw3的生成树信息:
sw3#showspanning-tree
VLAN0001
Spanningtreeenabledprotocolieee
RootIDPriority24577为vlan1的根桥
Address0007.eb06.1740
Thisbridgeistheroot
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority24577(priority24576sys-id-ext1)
Address0007.eb06.1740
HelloTime2secMaxAge20secForwardDelay15sec
AgingTime300
VLAN0010
Spanningtreeenabledprotocolieee
RootIDPriority4096非vlan10的根桥
Address0030.803d.f641
Cost19
Port24(FastEthernet0/24)
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority32779(priority32768sys-id-ext11)
Address0007.eb06.1740
HelloTime2secMaxAge20secForwardDelay15sec
AgingTime300
VLAN0020
Spanningtreeenabledprotocolieee
RootIDPriority4096非vlan20的根桥
Address00b0.645f.34c2
Cost19
Port23(FastEthernet0/23)
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority32780(priority32768sys-id-ext12)
Address0007.eb06.1740
HelloTime2secMaxAge20secForwardDelay15sec
AgingTime300
InterfaceRoleStsCostPrio.NbrType
------------------------------------------------------------------------
Fa0/23RootFWD19128.23P2p
Fa0/24AltnBLK19128.24P2p
步骤六、显示当前配置结果
Sw1的配置结果:
sw1#showrunning-config
!
hostnamesw1
!
spanning-treevlan10priority4096
!
noipdomain-lookup
!
interfaceFastEthernet0/23
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/24
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
end
sw2的配置结果:
sw2#showrunning-config
hostnamesw2
!
spanning-treevlan20priority4096
!
noipdomain-lookup
!
interfaceFastEthernet0/23
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
interfaceFastEthernet0/24
switchporttrunkencapsulationdot1q
switchportmodetrunk
!
end
sw3的配置结果:
sw3#showrunning-config
!
hostnamesw3
!
noipdomain-lookup
!
spanning-treevlan1priority24576
!
interfaceFastEthernet0/23
switchportmodetrunk
!
interfaceFastEthernet0/24
switchportmodetrunk
!
End
实验二、静态路由
环境:
两台2500系列路由器通过串口相连。
要求:
在R1和R2上启用静态路由,使两端网络能够互通。
步骤一、基本配置
Router>
Router>enable
Router#configterminal
Router(config)#hostnameR1
R1(config)#noipdomain-lookup
R1(config)#lineconsole0
R1(config-line)#loggingsynchronous
R1(config-line)#exec-timeout00
R1(config-line)#exit
步骤二:
接口配置
R1的配置:
R1(config)#interfaces0
R1(config-if)#ipaddress30.1.1.1255.255.255.0
R1(config-if)#clockrate64000时钟速率端
R1(config-if)#noshutdown
R1(config-if)#interfaceloopback0
R1(config-if)#ipaddress10.1.1.1255.255.255.0
R1(config-if)#
R2的配置:
Router(config)#hostnameR2
R2(config)#interfaces1
R2(config-if)#ipaddress30.1.1.2255.255.255.0
R2(config-if)#noshutdown
R2(config-if)#interfaceloopback0
R2(config-if)#ipaddress20.1.1.1255.255.255.0
R2(config-if)#exit
R2(config)#
步骤三、指定静态路由
R1(config)#
R1(config)#iproute20.1.1.0255.255.255.0serial0指定静态路由
R2(config)#
R2(config)#iproute10.1.1.0255.255.255.030.1.1.1指定静态路由
步骤四、作ping测试
R1#ping
Protocol[ip]:
TargetIPaddress:
20.1.1.1目的地址
Extendedcommands[n]:
y是否用扩展命令
Sourceaddressorinterface:
10.1.1.1源地址
!
!
!
!
!
显示已通
步骤五、显示静态路由条目
R1#showiproute
Codes:
C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP
D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGP
i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,ia-IS-ISinterarea
*-candidatedefault,U-per-userstaticroute,o-ODR
P-periodi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ccna 实验 手册