《HCNA入门基础实验介绍材料(入门基础).doc》由会员分享,可在线阅读,更多相关《HCNA入门基础实验介绍材料(入门基础).doc(57页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、.-实验一.命令行基础一、实验目标掌握设备系统参数的配置方法,包括设备名称、系统时间及系统时区掌握Console口空闲超时时长的配置方法掌握登录信息的配置方法掌握登录密码的配置方法掌握保存配置文件的方法掌握配置路由器接口IP地址的方法掌握测试两台直连路由器连通性的方法掌握重吭设备的方法掌握查看版本、当前配置、接口信息实验描述及组网二、实验过程步骤一 查看系统信息执行display version命令,查看路由器的软件版本不硬件信息。Huaweidisplay version Huawei Versatile Routing Platform SoftwareVRP (R) software,
2、Version 5.130 (AR2200 V200R003C00)Copyright (C) 2011-2012 HUAWEI TECH CO., LTDHuawei AR2220 Router uptime is 0 week, 0 day, 0 hour, 0 minuteBKP 0 version information: 1. PCB Version : AR01BAK2A VER.NC2. If Supporting PoE : No3. Board Type : AR22204. MPU Slot Quantity : 15. LPU Slot Quantity : 6MPU 0
3、(Master) : uptime is 0 week, 0 day, 0 hour, 0 minuteMPU version information : 1. PCB Version : AR01SRU2A VER.A2. MAB Version : 03. Board Type : AR22204. BootROM Version : 0命令回显信息中包含了VRP版本,设备型号和启动时间等信息。步骤二修改系统时间VRP系统会自动保存时间,但如果时间不正确,可以在用户规图下执行clocktimezone命令和clock datetime命令修改系统时间。clock timezone Loca
4、l add 08:00:00clock datetime 12:00:00 2013-09-15可以修改Local字段为当前地区的时区名称。如果当前时区位于UTC+0时区的西部,需要把add字段修改为minus。执行display clock命令查看生效的新系统时间。display clock2013-09-15 12:00:21SundayTime Zone(Default Zone Name) : UTC+00:00步骤三帮助功能和命令自动补全功能在系统中输入命令时,问号是通配符,Tab键是自动联想并补全命令的快捷键。display ? Cellular Cellular interfac
5、e aaa AAA access-user User access accounting-scheme Accounting scheme acl acl command group actual Current actual adp-ipv4 Ipv4 information adp-mpls Adp-mpls module alarm Alarm antenna Current antenna that outputting radio anti-attack Specify anti-attack configurations ap ap command group ap-auth-mo
6、de Display AP authentication mode ap-elabel Electronic label ap-license AP license config ap-performance-statistic Display AP performance statistic information ap-profile Display AP profile information ap-region Display AP region information ap-run-info Display AP run information ap-type Display AP
7、type information ap-update AP update ap-whitelist AP white list apv2r3 PAF(Product Adaptive File) arp arp command group - More -在输入信息后输入“?”可查看以输入字母开头的命令。如输入“dis ?”,设备将输出所有以dis开头的命令。在输入的信息后增加空格,再输入“?”,这时设备将尝试识别输入的信息所对应的命令,然后输出该命令的其他参数。例如输入“dis ?”,如果只有display命令是以dis开头的,那么设备将输出display命令的参数;如果以dis开头的命令还
8、有其他的,设备将报错。另外可以使用键盘上Tab键补全命令,比如键入“dis”后,按键盘“Tab”键可以将命令补全为“display”。如有多个以“dis”开头的命令存在,则在多个命令之间循环切换。命令在丌収生歧义的情况下可以使用简写,如“display”可以简写为“dis”或“disp”等,“interface”可以简写为“int”或“inter”等。步骤四进入系统视图使用system-view命令可以迚入系统规图,这样才可以配置接口、协议等内容。system-viewEnter system view, return user view with Ctrl+Z.Huawei步骤五修改设备名称
9、配置设备时,为了便于区分,往往给设备定义不同的名称。如下我们依照实验拓扑图,修改设备名称。修改R1路由器的设备名称为R1。Huaweisysname R1R1修改R3路由器的设备名称为R3。Huaweisysname R3R3步骤六配置登录信息配置登陆标诧信息来迚行提示戒迚行登陆警告。执行header shellinformation命令配置登录信息。R1header shell information Welcome to the Huawei certification lab.退出路由器命令行界面,再重新登录命令行界面,查看登录信息是否已绉修改。R1quitquitConfigurati
10、on console exit, please press any key to log onWelcome to the Huawei certification lab.步骤七配置 Console 口参数默认情况下,通过Console口登陆无密码,任何人都可以直接连接到设备,迚行配置。为避免由此带来的风险,可以将Console接口登录方式配置为密码认证方式,密码为明文形式的“huawei”。空闲时间指的是绉过没有任何操作的一定时间后,会自劢退出该配置界面,再次登陆会根据系统要求,提示输入密码迚行验证。设置空闲超时时间为20分钟,默认为10分钟。R1user-interface consol
11、e 0R1-ui-console0authentication-mode passwordR1-ui-console0set authentication password cipher huaweiR1-ui-console0idle-timeout 20 0执行display this命令查看配置结果。R1-ui-console0display thisV200R003C01SPC200#user-interface con 0authentication-mode passwordset authentication passwordcipher %$%$fIn6NZ6*as(#J:WU
12、%,#72Uy8cVlNNXkT51E RX;#75,%$%$idle-timeout 20 0退出系统,并使用新配置的密码登录系统。需要注意的是,在路由器第一次初始化吭劢时,也需要配置密码。R1-ui-console0returnquitConfiguration console exit, please press any key to log onWelcome to Huawei certification lab步骤八配置接口 IP 地址和描述信息配置R1上GigabitEthernet 0/0/0接口的IP地址。使用点分十迚制格式(如255.255.255.0)戒根据子网掩码前缀长
13、度配置子网掩码。R1interface GigabitEthernet 0/0/0R1-GigabitEthernet0/0/0ip address 10.0.13.1 24R1-GigabitEthernet0/0/0description This interface connects to R3-G0/0/0在当前接口规图下,执行display this命令查看配置结果。R1-GigabitEthernet0/0/0display thisV200R003C00SPC200#interface GigabitEthernet0/0/0description This interface
14、connects to R3-G0/0/0ip address 10.0.13.1 255.255.255.0#Return执行display interface命令查看接口信息。R1display interface GigabitEthernet0/0/0GigabitEthernet0/0/0 current state : UPLine protocol current state : UPLast line protocol up time : 2013-10-08 04:13:09Description:This interface connects to R3-G0/0/0Rou
15、te Port,The Maximum Transmit Unit is 1500Internet Address is 10.0.13.1/24IP Sending Frames Format is PKTFMT_ETHNT_2, Hardware address is 5489-9876-830bLast physical up time : 2013-10-08 03:24:01Last physical down time : 2013-10-08 03:25:29Current system time: 2013-10-08 04:15:30Port Mode: FORCE COPP
16、ERSpeed : 100, Loopback: NONEDuplex: FULL, Negotiation: ENABLEMdi : AUTOLast 300 seconds input rate 2296 bits/sec, 1 packets/secLast 300 seconds output rate 88 bits/sec, 0 packets/secInput peak rate 7392 bits/sec,Record time: 2013-10-08 04:08:41Output peak rate 1120 bits/sec,Record time: 2013-10-08
17、03:27:56Input: 3192 packets, 895019 bytesUnicast: 0, Multicast: 1592Broadcast: 1600, Jumbo: 0Discard: 0, Total Error: 0CRC: 0, Giants: 0Jabbers: 0, Throttles: 0Runts: 0, Symbols: 0Ignoreds: 0, Frames: 0Output: 181 packets, 63244 bytesUnicast: 0, Multicast: 0Broadcast: 181, Jumbo: 0Discard: 0, Total
18、Error: 0Collisions: 0, ExcessiveCollisions: 0Late Collisions: 0, Deferreds: 0Input bandwidth utilization threshold : 100.00%Output bandwidth utilization threshold: 100.00%Input bandwidth utilization : 0.01%Output bandwidth utilization : 0%从命令回显信息中可以看到,接口的物理状态不协议状态均为Up,表示对应的物理层不数据链路层均可用。配置 R3 上Gigabi
19、tEthernet 0/0/0 接口的IP 地址不描述信息。R3interface GigabitEthernet 0/0/0R3-GigabitEthernet0/0/0ip address 10.0.13.3 255.255.255.0R3-GigabitEthernet0/0/0description This interface connects to R1-G0/0/0配置完成后,通过执行ping命令测试R1和R3间的连通性。ping 10.0.13.3PING 10.0.13.3: 56 data bytes, press CTRL_C to breakReply from 10.
20、0.13.3: bytes=56 Sequence=1 ttl=255 time=35 msReply from 10.0.13.3: bytes=56 Sequence=2 ttl=255 time=32 msReply from 10.0.13.3: bytes=56 Sequence=3 ttl=255 time=32 msReply from 10.0.13.3: bytes=56 Sequence=4 ttl=255 time=32 msReply from 10.0.13.3: bytes=56 Sequence=5 ttl=255 time=32 ms- 10.0.13.3 pi
21、ng statistics -5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 32/32/35 ms步骤九查看当前设备上存储的文件列表在用户规图下执行dir命令,查看当前目录下的文件列表。dirDirectory of sd1:/Idx Attr Size(Byte) Date Time(LMT) FileName0 -rw- 1,738,816 Mar 14 2013 11:50:24 web.zip1 -rw- 68,288,896 Mar 14 2013 14:17:
22、58ar2220-v200r003c00spc200.cc2 -rw- 739 Mar 14 2013 16:01:17 vrpcfg.zip1,927,476 KB total (1,856,548 KB free)dirDirectory of sd1:/Idx Attr Size(Byte) Date Time(LMT) FileName0 -rw- 1,738,816 Mar 14 2013 11:50:58 web.zip1 -rw- 68,288,896 Mar 14 2013 14:19:02ar2220-v200r003c00spc200.cc2 -rw- 739 Mar 14
23、 2013 16:03:04 vrpcfg.zip1,927,476 KB total (1,855,076 KB free)步骤十管理设备配置文件执行display saved-configuration命令查看保存的配置文件。display saved-configurationThere is no correct configuration file in FLASH系统中没有已保存的配置文件。执行save命令保存当前配置文件。saveThe current configuration will be written to the device.Are you sure to cont
24、inue? (y/n)n:yIt will take several minutes to save configuration file, pleasewait.Configuration file had been saved successfullyNote: The configuration file will take effect after being activated重新执行display saved-configuration命令查看已保存的配置信息。display saved-configurationV200R003C00SPC200#sysname R1header
25、 shell information Welcome to Huawei certification lab#board add 0/1 1SAboard add 0/2 1SAoutput omit执行display current-configuration命令查看当前配置信息。display current-configurationV200R003C00SPC200#sysname R1header shell information Welcome to Huawei certification lab#board add 0/1 1SAboard add 0/2 1SAboard
26、add 0/3 2FEoutput omit一台路由器可以存储多个配置文件。执行display startup命令查看下次吭劢时使用的配置文件。display startupMainBoard:Startup system software:sd1:/ar2220-v200r003c00spc200.ccNext startup system software:sd1:/ar2220-v200r003c00spc200.ccBackup system software for next startup: nullStartup saved-configuration file: nullNex
27、t startup saved-configuration file: sd1:/vrpcfg.zipStartup license file: nullNext startup license file: nullStartup patch package: nullNext startup patch package: nullStartup voice-files: nullNext startup voice-files: null删除闪存中的配置文件。reset saved-configurationThis will delete the configuration in the
28、flash memory.The device configurations will be erased to reconfigure.Are you sure? (y/n)n:yClear the configuration in the device successfully.reset saved-configurationThis will delete the configuration in the flash memory.The device configurations will be erased to reconfigure.Are you sure? (y/n)n:y
29、Clear the configuration in the device successfully.步骤十一 重启设备执行reboot命令重吭路由器。rebootInfo: The system is now comparing the configuration, please wait.Warning: All the configuration will be saved to the next startup configuration.Continue ? y/n:nSystem will reboot! Continue ? y/n:yInfo: system is reboot
30、ing ,please wait.rebootInfo: The system is now comparing the configuration, please wait.Warning: All the configuration will be saved to the next startup configuration.Continue ? y/n:nSystem will reboot! Continue ? y/n:y系统提示是否保存当前配置,可根据实验要求决定是否保存当前配置。如果无法确定是否保存,则不保存当前配置。实验二.STP配置一、实验目标掌握修改交换机STP模式的方法
31、掌握修改桥优先级,控制根桥选举的方法掌握修改端口优先级,控制根端口和指定口选举的方法掌握边缘端口的配置方法二、实验描述及组网图您是公司的网络管理员,为了避免网络中的环路问题,需要在网络中的交换机上配置STP。本实验中,您还需要通过修改桥优先级来控制STP的根桥选举,并通过配置STP的一些特性来加快STP的收敛速度。 三、实验过程步骤一:按上图连线,配置主机的ip地址,并且检查交换机的配置是否为初始状态。步骤二:设置交换机的stp模式为stp(华为交换机默认开启stp,且模式为mstp),设置JC1的优先级为4096,JC2、JC3的优先级为默认值,并且配置连接PC的端口为边缘端口。JC1:JC
32、1stp mode stpJC1stp priority 4096 / 配置时优先级必须是4096的倍数JC1interface GigabitEthernet 0/0/24JC1-GigabitEthernet0/0/24stp edged-port enableJC2:JC2stp mode stpJC2-GigabitEthernet0/0/24stp edged-port enableJC3:JC3stp mode stpJC3-GigabitEthernet0/0/24stp edged-port enable步骤三:查看STP信息JC1display stp -CIST Globa
33、l InfoMode STP-CIST Bridge :4096 .4c1f-cc38-374c / 修改后优先级为4096Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20CIST Root/ERPC :4096 .4c1f-cc38-374c / 0CIST RegRoot/IRPC :4096 .4c1f-cc38-374c / 0CIST RootPortId :0.0BPDU-Protection :DisabledTC o
34、r TCN received :14TC count per hello :0STP Converge Mode :Normal Time since last TC :0 days 0h:3m:55sNumber of TC :12Last TC occurred :GigabitEthernet0/0/1JC1display stp brief MSTID Port Role STP State Protection 0 GigabitEthernet0/0/1 DESI FORWARDING NONE 0 GigabitEthernet0/0/3 DESI FORWARDING NONE
35、 0 GigabitEthernet0/0/24 DESI FORWARDING NONEJC2display stp -CIST Global InfoMode STP-CIST Bridge :32768.4c1f-ccba-711a / 交换机的默认优先级是32768Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20CIST Root/ERPC :4096 .4c1f-cc38-374c / 20000CIST RegRoot/
36、IRPC :32768.4c1f-ccba-711a / 0CIST RootPortId :128.3 / 根端口的默认优先级是128BPDU-Protection :DisabledTC or TCN received :97TC count per hello :0STP Converge Mode :Normal Time since last TC :0 days 0h:7m:48sNumber of TC :14Last TC occurred :GigabitEthernet0/0/3JC2display stp brief MSTID Port Role STP State P
37、rotection 0 GigabitEthernet0/0/2 ALTE DISCARDING NONE 0 GigabitEthernet0/0/3 ROOT FORWARDING NONE 0 GigabitEthernet0/0/24 DESI FORWARDING NONEJC3display stp brief MSTID Port Role STP State Protection 0 GigabitEthernet0/0/1 ROOT FORWARDING NONE 0 GigabitEthernet0/0/2 DESI FORWARDING NONE 0 GigabitEth
38、ernet0/0/24 DESI FORWARDING NONE以上信息表明JC1是根桥,其上所有端口是指定端口(DESI),处于转发状态(FORWARDING).JC2是非根桥,端口GigabitEthernet0/0/3是根端口,处于转发状态,端口GigabitEthernet0/0/2是备份端口(ALTE),处于阻塞状态。JC3也是非根桥,端口GigabitEthernet0/0/1是根端口,GigabitEthernet0/0/2是指定端口,处于转发状态。实验三.静态路由基础一、实验目标掌握静态路由的配置掌握缺省路由配置二、实验描述及组网三、实验过程实验任务一:步骤一:建立物理连接按照
39、拓扑图进行连接,所有设备配置为初始状态。以下表配置各个设备的IP地址。设备名称接口IP地址JC1Loopback010.1.1.1/32G0/0/010.1.2.1/24JC2G0/0/010.1.2.2/24G0/0/110.1.3.1/24JC3G0/0/110.1.3.2/24Loopback010.1.4.1/24步骤二:测试路由器间的连通性,如下所示:通过查看路由表,发现此时路由器中只有直连网段的路由此时我们来测试JC1和JC3之间的连通性,如下:JC1-LoopBack0ping 10.1.4.1 PING 10.1.4.1: 56 data bytes, press CTRL_C
40、 to breakMar 16 2016 08:22:15-08:00 JC1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 5, the change loop count is 0, and the maximum number of records is 4095. Request time out Request time out Request time out Request time o
41、ut Request time out - 10.1.4.1 ping statistics - 5 packet(s) transmitted 0 packet(s) received 100.00% packet loss从以上显示我们可以看到,JC1和JC3之间是不能够进行通信的。步骤三:配置静态路由我们只在JC1和JC3上配置静态路由。JC1:JC1ip route-static 10.1.3.0 24 10.1.2.2JC1ip route-static 10.1.4.0 24 10.1.2.2JC3:JC3ip route-static 10.1.3.0 24 10.1.2.2JC
42、3ip route-static 10.1.4.0 24 10.1.2.2配置完成后,在路由器上查看路由表。例如在JC1上查看路由表,如下:JC1display ip routing-table Route Flags: R - relay, D - download to fib-Routing Tables: Public Destinations : 7 Routes : 7 Destination/Mask Proto Pre Cost Flags NextHop Interface 10.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0 10.1.2.0/24 Direct 0 0 D 10.1.2.1 GigabitEthernet0/0/0 10.1.2.1/32 Direct