HCNA入門實(shí)驗(yàn)手冊(cè)(入門)_第1頁
HCNA入門實(shí)驗(yàn)手冊(cè)(入門)_第2頁
HCNA入門實(shí)驗(yàn)手冊(cè)(入門)_第3頁
HCNA入門實(shí)驗(yàn)手冊(cè)(入門)_第4頁
HCNA入門實(shí)驗(yàn)手冊(cè)(入門)_第5頁
已閱讀5頁,還剩75頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

試驗(yàn)一.命令行基礎(chǔ)

一、試驗(yàn)?zāi)康?/p>

掌握設(shè)備系統(tǒng)參數(shù)的配置措施,包括設(shè)備名稱、系統(tǒng)時(shí)間及系統(tǒng)時(shí)區(qū)

掌握Console口空閑超時(shí)時(shí)長時(shí)配置措施

掌握登錄信息的配置措施

掌握登錄密碼日勺配置措施

掌握保留配置文獻(xiàn)的措施

掌握配置路由器接口IP地址的措施

掌握測(cè)試兩臺(tái)直連路由器連通性的措施

掌握重吭設(shè)備日勺措施

掌握查看版本、目前配置、接口信息試驗(yàn)描述及組網(wǎng)

二、試驗(yàn)過程

環(huán)節(jié)一查看系統(tǒng)信息

執(zhí)行displayversion命令,查看路由器的軟件版本不硬件信息。

[Huawei]displayversion

HuaweiVersatileRoutingPlatformSoftware

VRP(R)software,Version5.130(AR2200V200R003C00)

Copyright(C)2023-2023HUAWEITECHCO.,LTD

HuaweiAR2220Routeruptimeis0week,0day,0hour,0minute

BKP0versioninformation:

1.PCBVersion:AR01BAK2AVER.NC

2.IfSupportingPoE:No

3.BoardType:AR2220

4.MPUSlotQuantity:1

5.LPUSlotQuantity:6

MPUO(Master):uptimeis0week,0day,0hour,0minute

MPUversioninformation:

1.PCBVersion:AR01SRU2AVER.A

2.MABVersion:0

3.BoardType:AR2220

4.BootROMVersion:0

命令回顯信息中包括了VRP版本,設(shè)備型號(hào)和啟動(dòng)時(shí)間等信息。

環(huán)節(jié)二修改系統(tǒng)時(shí)間

VRP系統(tǒng)會(huì)自動(dòng)保留時(shí)間,但假如時(shí)間不對(duì)的,可以在顧客規(guī)圖下執(zhí)行clock

timezone命令和clockdatetime命令修改系統(tǒng)時(shí)間。

<Huawei>clocktimezoneLocaladd08:00:00

<Huawei>clockdatetime12:00:002023-09-15

可以修改Local字段為目前地區(qū)的時(shí)區(qū)名稱。假如目前時(shí)區(qū)位于UTC+0時(shí)

區(qū)的西部,需要把a(bǔ)dd字段修改為minuSo

執(zhí)行displayclock命令查看生效的新系統(tǒng)時(shí)間。

<Huawei>displayclock

2023-09-1512:00:21

Sunday

TimeZone(DefaultZoneName):UTC+00:00

環(huán)節(jié)三協(xié)助功能和命令自動(dòng)補(bǔ)全功能

在系統(tǒng)中輸入命令時(shí),問號(hào)是通配符,Tab鍵是自動(dòng)聯(lián)想并補(bǔ)全命令的快捷

鍵。

<Huawei>display?

CellularCellularinterface

aaaAAA

access-userUseraccess

accounting-schemeAccountingscheme

acl<Group>aclcommandgroup

actualCurrentactual

adp-ipv4Ipv4information

adp-mplsAdp-mplsmodule

alarmAlarm

antennaCurrentantennathatoutputtingradio

anti-attackSpecifyanti-attackconfigurations

ap<Group>apcommandgroup

ap-auth-modeDisplayAPauthenticationmode

ap-elabelElectroniclabel

ap-licenseAPlicenseconfig

ap-performance-statisticDisplayAPperformancestatisticinformation

ap-profileDisplayAPprofileinformation

ap-regionDisplayAPregioninformation

ap-run-infoDisplayAPruninformation

ap-typeDisplayAPtypeinformation

ap-updateAPupdate

ap-whitelistAPwhitelist

apv2r3PAFfProductAdaptiveFile)

arp<Group>arpcommandgroup

More--

在輸入信息后輸入“?”可查看以輸入字母開頭的命令。如輸入“dis?”,

設(shè)備將輸出所有以dis開頭的命令。

在輸入的信息后增長空格,再輸入“?”,這時(shí)設(shè)備將嘗試識(shí)別輸入的I信息

所對(duì)應(yīng)的命令,然后輸出該命令的其他參數(shù)。例如輸入“dis?”,假如只有

display命令是以dis開頭的,那么設(shè)備將輸出display命令的參數(shù);假如以dis開

頭的命令尚有其他的,設(shè)備將報(bào)錯(cuò)。

此外可以使用鍵盤上Tab鍵補(bǔ)全命令,例如鍵入“dis”后,按鍵盤“Tab”

鍵可以將命令補(bǔ)全為"display”。如有多種以“dis”開頭的命令存在,則在多

個(gè)命令之間循環(huán)切換。

命令在7PR生歧義的狀況下可以使用簡寫,如“display”可以簡寫為“dis”

或或sp”等,“interface”可以簡寫為“int”或“inter”等。

環(huán)節(jié)四進(jìn)入系統(tǒng)視圖

使用system-view命令可以迎入系統(tǒng)規(guī)圖,這樣才可以配置接口、協(xié)議等內(nèi)

容。

<Huawei>system-view

Entersystemview,returnuserviewwithCtrl+Z.

[Huawei]

環(huán)節(jié)五修改設(shè)備名稱

配置設(shè)備時(shí),為了便于辨別,往往給設(shè)備定義不一樣的名稱。如下我們根據(jù)實(shí)

驗(yàn)拓?fù)鋱D,修改設(shè)備名稱,

修改R1路由器的設(shè)備名稱為Rio

[Huawei]sysnameRI

[RI]

修改R3路由器的設(shè)備名稱為R3o

[Huawei]sysnameR3

[R3J

環(huán)節(jié)六配置登錄信息

配置登陸標(biāo)詫信息來通行提醒戒通行登陸警告。執(zhí)行headershell

information命令配置登錄信息。

[RIJheadershellinformation"WelcometotheHuaweicertificationlab."

退出路由器命令行界面,再重新登錄命令行界面,查看登錄信息與否已經(jīng)修

改。

[Rl]quit

<Rl>quit

Configurationconsoleexit,oleasepressanykeytologon

WelcometotheHuaweicertificationlab.

<R1>

環(huán)節(jié)七配置Console口參數(shù)

默認(rèn)狀況下,通過Console口登陸無密碼,任何人都可以直接連接到設(shè)備,

速行配置。

為防止由此帶來的風(fēng)險(xiǎn),可以將Console接口登錄方式配置為密碼認(rèn)證方式,

密碼為明文形式的“huawei”。

空閑時(shí)間指的是給過沒有任何操作的一定期間后,會(huì)自助退出該配置界面,

再次登陸會(huì)根據(jù)系統(tǒng)規(guī)定,提醒輸入密碼通行驗(yàn)證。

設(shè)置空閑超時(shí)時(shí)間為20分鐘,默認(rèn)為10分鐘。

[RIJuser-interfaceconsole0

[Rl-ui-consoleO]authentication-modepassword

[Rl-ui-consoleO]setauthenticationpasswordcipherhuawei

[Rl-ui-consoleO]idle-timeout200

執(zhí)行displaythis命令查看配置成果。

[Rl-ui-consoleO]displaythis

[V200R003C01SPC200]

#

user-interfacecon0

authentication-modepassword

setauthenticationpassword

cipher%$%$fln,6>NZ6+~asi#J:WU%,#72Uy8cVINANXkT51E^RX;>#75,%$%$

idle-timeout200

退出系統(tǒng),并使用新配置的密碼登錄系統(tǒng).需要注意的是,在路由器第一次

初始化吭勵(lì)時(shí),也需要配置密碼。

[Rl-ui-consoleO]return

<Rl>quit

Configurationconsoleexit,oleasepressanykeytologon

WelcometoHuaweicertificationlab

<R1>

環(huán)節(jié)八配置接口IP地址卻描述信息

配置R1上GigabitEthernet0/0/0接口日勺IP地址。使用點(diǎn)分十通制格式(如

)戒根據(jù)子網(wǎng)掩碼前綴長度配置子網(wǎng)掩碼。

(Rl)interfaceGigabitEthernet0/0/0

[Rl-GigabitEthernet0/0/0]ipaddress24

[Rl-GigabitEthernet0/0/0]descriptionThisinterfaceconnectstoR3-G0/0/0

在目前接口規(guī)圖下,執(zhí)行displaythis命令查看配置成果。

[Rl-GigabitEthernetO/O/O]displaythis

[V200R003C00SPC200]

ft

interfaceGigabitEthernetO/O/O

descriptionThisinterfaceconnectstoR3-G0/0/0

#

Return

執(zhí)行displayinterface命令查看接口信息。

[Rl]displayinterfaceGigabitEthernetO/O/O

GigabitEthernetO/O/Ocurrentstate:UP

Lineprotocolcurrentstate:UP

Lastlineprotocoluptime:2023-10-0804:13:09

Description:ThisinterfaceconnectstoR3-G0/0/0

RoutePortjheMaximumTransmitUnitis1500

IPSendingFrames'FormatisPKTFMT_ETHNT_2,Hardwareaddressis5489-9876-830b

Lastphysicaluptime:2023-10-0803:24:01

Lastphysicaldowntime:2023-10-0803:25:29

Currentsystemtime:2023-10-0804:15:30

PortMode:FORCECOPPER

Speed:100,Loopback:NONE

Duplex:FULL,Negotiation:ENABLE

Mdi:AUTO

Last300secondsinputrate2296bits/sec,1packets/sec

Last300secondsoutputrate88bits/sec,0packets/sec

Inputpeakrate7392bits/sec,Recordtime:2023-10-0804:08:41

Outputpeakrate1120bits/sec,Recordtime:2023-10-080327:56

Input:3192packets,895019bytes

Unicast:0,Multicast:1592

Broadcast:1600,Jumbo:0

Discard:0,TotalError:0

CRC:0,Giants:0

Jabbers:0,Throttles:0

Runts:0,Symbols:0

Ignoreds:0,Frames:0

Output:181packets,63244bytes

Unicast:0,Multicast:0

Broadcast:181,Jumbo:0

Discard:0,TotalError:0

Collisions:0,ExcessiveCollisions:0

LateCollisions:0,Deferreds:0

Inputbandwidthutilizationthreshold:100.00%

Outputbandwidthutilizaticnthreshold:100.00%

Inputbandwidthutilization:0.01%

Outputbandwidthutilizaticn:0%

從命令回顯信息中可以看到,接口的物理狀態(tài)不協(xié)議狀態(tài)均為Up,表達(dá)對(duì)

應(yīng)的物理層不數(shù)據(jù)鏈路層均可用。

配置R3±GigabitEthernet0/0/0接口的IP地址不描述信息。

[R3]interfaceGigabitEthernet0/0/0

[R3-GigabitEthernet0/0/0]descriptionThisinterfaceconnectstoR1-G0/0/0

配置完畢后,通過執(zhí)行ping命令測(cè)試R1和R3間日勺連通性。

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=255time=35ms

Replyfrom:bytes=56Sequence=2ttl=255time=32ms

Replyfrom:bytes=56Sequence=3ttl=255time=32ms

Replyfrom:bytes=56Sequence=4ttl=255time=32ms

Replyfrom:bytes=56Sequence=5ttl=255time=32ms

pingstatistics—

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=32/32/35ms

環(huán)節(jié)九查看目前設(shè)備上存儲(chǔ)的文獻(xiàn)列表

在顧客規(guī)圖下執(zhí)行dir命令,查看目前目錄下的文獻(xiàn)列表。

<Rl>dir

Directoryofsdl:/

IdxAttrSize(Byte)DateTime(LMT)FileName

0-rw-1,738,816Mar14202311:50:24web.zip

1-rw-68,288,896Mar14202314:17:58

ar2220-v200r003c00spc200.cc

2-rw-739Mar14202316:01:17vrpcfg.zip

1,927,476KBtotal(1,856,548KBfree)

<R3>dir

Directoryofsdl:/

IdxAttrSize(Byte)DateTime(LMT)FileName

0-rw-1,738,816Mar14202311:50:58web.zip

1-rw-68,288,896Mar14202314:19:02

ar2220-v200r003c00spc200.cc

2-rw-739Mar14202316:03:04vrpcfg.zip

1,927,476KBtotal(1,855,076KBfree)

環(huán)節(jié)十管理設(shè)備配置文獻(xiàn)

執(zhí)行displaysaved-configuration命令查看保留的配置文獻(xiàn)。

<Rl>displaysaved-configuration

ThereisnocorrectconfigurationfileinFLASH

系統(tǒng)中沒有已保留的配置文獻(xiàn)。執(zhí)行save命令保留目前配置文獻(xiàn)。

<Rl>save

Thecurrentconfigurationwillbewrittentothedevice.

Areyousuretocontinue?(y/n)[n]:y

Itwilltakeseveralminutestosaveconfigurationfile,please

wait

Configurationfilehadbeensavedsuccessfully

Note:Theconfigurationfilewilltakeeffectafterbeingactivated

重新執(zhí)行displaysaved-configuration命令查看已保留的配置信息。

<Rl>displaysaved-configuration

[V200R003C00SPC200]

ft

sysnameRI

headershellinformation"V/elcometoHuaweicertificationlab"

boardadd0/1ISA

boardadd0/2ISA

outputomit

執(zhí)行displaycurrent-configuration命令查看目前配置信息。

<Rl>displaycurrent-configuration

[V200R003C00SPC200]

#

sysnameRI

headershellinformation"V/elcometoHuaweicertificationlab"

#

boardadd0/1ISA

boardadd0/2ISA

boardadd0/32FE

outputomit

一臺(tái)路由器可以存儲(chǔ)多種配置文獻(xiàn)。執(zhí)行displaystartup命令查看下次吭

勵(lì)時(shí)使用日勺配置文獻(xiàn)。

<R3>displaystartup

MainBoard:

Startupsystemsoftware:

sdl:/ar2220-v200r003c00spc200.cc

Nextstartupsystemsoftware:

sdl:/ar2220-v200r003c00spc200.cc

Backupsystemsoftwarefornextstartup:null

Startupsaved-configurationfile:null

Nextstartupsaved-configurationfile:sdl:/vrpcfg.zip

Startuplicensefile:null

Nextstartuplicensefile:null

Startuppatchpackage:null

Nextstartuppatchpackage:null

Startupvoice-files:null

Nextstartupvoice-files:null

刪除閃存中的配置文獻(xiàn)。

<Rl>resetsaved-configuration

Thiswilldeletetheconfigurationintheflashmemory.

Thedeviceconfigurationswillbeerasedtoreconfigure.

Areyousure?(y/n)[n]:y

Cleartheconfigurationinthedevicesuccessfully.

<R3>resetsaved-configuration

Thiswilldeletetheconfigurationintheflashmemory.

Thedeviceconfigurationswillbeerasedtoreconfigure.

Areyousure?(y/n)[n]:y

Cleartheconfigurationinthedevicesuccessfully.

環(huán)節(jié)十一重啟設(shè)備

執(zhí)行reboot命令重吭路由器。

<Rl>reboot

Info:Thesystemisnowcomparingtheconfiguration,pleasewait.

Warning:Alltheconfigurationwillbesavedtothenextstartupconfiguration.

Continue?[y/n]:n

Systemwillreboot!Continue?[y/n]:y

Info:systemisrebooting,pleasewait...

<R3>reboot

Info:Thesystemisnowcomparingtheconfiguration,pleasewait.

Warning:Alltheconfigurationwillbesavedtothenextstartupconfiguration.

Continue?[y/n]:n

Systemwillreboot!Continue?[y/n]:y

系統(tǒng)提醒與否保留目前配置,可根據(jù)試驗(yàn)規(guī)定決定與否保留目前配置。假如

無法確定與否保留,則不保留目前配置。

試驗(yàn)二3TP配置

一、試驗(yàn)?zāi)康?/p>

掌握修改互換機(jī)STP模式H勺措施

掌握修改橋優(yōu)先級(jí),控制根橋選舉的措施

掌握修改端口優(yōu)先級(jí),控制根端口和指定口選舉的措施

掌握邊緣端口的配置措施

二、試驗(yàn)描述及組網(wǎng)圖

您是企業(yè)的網(wǎng)絡(luò)管理員,為了防止網(wǎng)絡(luò)中的環(huán)路問題,需要在網(wǎng)絡(luò)中的互換機(jī)上配置STPo本

試驗(yàn)中,您還需要通過修改橋優(yōu)先級(jí)來控制STP的根橋選舉,并通過配置STP的某些特性來加

緊STP的收斂速度。

三、試驗(yàn)過程

環(huán)節(jié)一:

按上圖連線,配置主機(jī)的ip地址,并且檢查互換機(jī)的配置與否為初始狀態(tài)。

環(huán)節(jié)二:

設(shè)置互換機(jī)的stp模式為stp(華為互換機(jī)默認(rèn)啟動(dòng)stp,且模式為mstp),設(shè)置JC1的優(yōu)先

級(jí)為4096,JC2、JC3的優(yōu)先級(jí)為默認(rèn)值,并且配置連接PC的端口為邊緣端口。

JC1:

[JCl]stpmodestp

[JCl]stppriority4096//配置時(shí)優(yōu)先級(jí)必須是4096的倍數(shù)

[JCl]interfaceGigabitEthernet0/0/24

[JCl-GigabitEthernetO/O/24]stpedged-portenable

JC2:

[JC2]stpmodestp

[JC2-GigabitEthernetO/O/24]stpedged-portenable

JC3:

[JC3]stpmodestp

[JC3-GigabitEthernetO/O/24]stpedged-portenable

環(huán)節(jié)三:查看STP信息

[JCl]displaystp

[CISTGloballnfo][ModeSTP]

CISTBridge:4096.4clf-cc38-374c//修改后優(yōu)先級(jí)為4096

ConfigTimes:Hello2sMaxAge20sFwDly15sMaxHop20

ActiveTimes:Hello2sMaxAge20sFwDly15sMaxHop20

CISTRoot/ERPC:4096.4clf-cc38-374c/0

CISTRegRoot/IRPC:4096.4clf-cc38-374c/0

CISTRootPortld:0.0

BPDU-Protection:Disabled

TCorTCNreceived:14

TCcountperhello:0

STPConvergeMode:Normal

TimesincelastTC:0days0h:3m:55s

NumberofTC:12

LastTCoccurred:GigabitEthernetO/O/l

[JCl]displaystpbrief

MSTIDPortRoleSTPStateProtection

0GigabitEthernetO/O/1DESIFORWARDINGNONE

0GigabitEthernetO/O/3DESIFORWARDINGNONE

0GigabitEthernetO/O/24DESIFORWARDINGNONE

[JC2]displaystp

[CISTGloballnfo][ModeSTP]

CISTBridge:32768.4clf-ccba-711a//互換機(jī)的默認(rèn)優(yōu)先級(jí)是32768

ConfigTimes:HellD2sMaxAge20sFwDly15sMaxdop20

ActiveTimes:Hello2sMaxAge20sFwDly15sMaxHop20

CISTRoot/ERPC:4096,4clf-cc38-374c/20230

CISTRegRoot/IRPC:32768.4clf-ccba-711a/0

CISTRootPortld:1283//根端口的默認(rèn)優(yōu)先級(jí)是128

BPDU-Protection:Disabled

TCorTCNreceived:97

TCcountperhello:0

STPConvergeMode:Normal

TimesincelastTC:0days0h:7m:48s

NumberofTC:14

LastTCoccurred:GigabitEthernet0/0/3

[JC2]displaystpbrief

MSTIDPortRole?STPStateProtection

0GigabitEthernetO/O/2ALTEDISCARDINGNONE

0GigabitEthernetO/O/3ROOTFORWARDINGNONE

0GigabitEthernetO/O/24DESIFORWARDINGNONE

[JC3]displaystpbrief

MSTIDPortRoleeSTPStateProtection

0GigabitEthernetO/O/1ROOTFORWARDINGNONE

0GigabitEthernetO/O/2DESIFORWARDINGNONE

0GigabitEthernetO/O/24DESIFORWARDINGNONE

以上信息表明JC1是根橋,其上所有端口是指定端口(DESI),處在轉(zhuǎn)發(fā)狀態(tài)(FORWARDING).

JC2是非根橋,端口GigabitEthernetO/O/3是根端口,處在轉(zhuǎn)發(fā)狀態(tài),端口GigabitEthernetO/O/2

是備份端口(ALTE),處在阻塞狀態(tài)vJC3也是非根橋,端口GigabitEthernotO/0/l是根端口,

GigabitEthernetO/O/2是指定端口,處在轉(zhuǎn)發(fā)狀態(tài)。

試驗(yàn)三,靜態(tài)路由基礎(chǔ)

一、試驗(yàn)?zāi)康?/p>

掌握靜態(tài)路由日勺配置

掌握缺省路由配置

二、試驗(yàn)描述及組網(wǎng)

/32/32

loopback0Loopback0

/24/24

/24JC3

三、試驗(yàn)過程

試驗(yàn)任務(wù)一:

環(huán)節(jié)一:建立物理連接

按照拓?fù)鋱D進(jìn)行連接,所有設(shè)備配置為初始狀態(tài)。如下表配置各個(gè)設(shè)備的IP地址。

設(shè)備名稱接口IP地址

JC1LoopbackO

G0/0/0

JC2G0/0/0

G0/0/1

JC3G0/0/1

LoopbackO1

環(huán)節(jié)二:測(cè)試路由器間的連通性,如下所示:

通過查看路由表,發(fā)現(xiàn)此時(shí)路由器中只有直連網(wǎng)段的路由

此時(shí)我們來測(cè)試JC1和JC3之間的連通性,如下:

PING:56databytes,pressCIRL_Ctobreak

.191.3.1configurationshavebeenchanged.Thecurrentchangenumberis5,thec

hangeloopcountis0,andthemaximumnumberofrecordsis4095.

Requesttimeout

Requesttimeout

Requesttimeout

Requesttimeout

Requesttimeout

—pingstatistics—

5packet(s)transmitted

0packet(s)received

100.00%packetloss

從以上顯示我們可以看到,JC1和JC3之間是不可以進(jìn)行通信的。

環(huán)節(jié)三:配置靜態(tài)路由

我們只在JC1和JC3JL配置靜態(tài)路由。

JC1:

JC3:

配置完畢后,在路由器上查看路由表。例如在JC1上查看路由表,如下:

[JCl]displayiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:7Routes:7

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

0/0/0

0/0/0

測(cè)試JC1和JC3之間的可達(dá)性。在JC1上用Ping命令測(cè)試到JC3的G0/0/1口的可達(dá)性,如

下:

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=254time=70ms

Replyfrom:bytes=56Sequence=2ttl=254time=40ms

Replyfrom:bytes=56Sequence=3ttl=254time=60ms

Replyfrom:bvtes=56Sequence=4ttl=254time=30ms

Replyfrom:bytes=56Sequence=5ttl=254time=70ms

—10.13.2pingstatistics一

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=30/54/70ms

我們可以看到是可以Ping通的。

不過,假如在JC1上Ping如下:

PING:56databytes,pressCTRL_Ctobreak

Requesttimeout

Requesttimeout

Requesttimeout

Requesttimeout

Requesttimeout

--pingstatistics—

5packet(s)transmitted

0packet(s)received

100.00%packetloss

成果如下:

PING:56databytes,pressCTRL_Ctobreak

Requesttimeout

Requesttimeout

Requesttimeout

Requesttimeout

Requesttimeout

pingstatistics-

5packet(s)transmitted

0packet(s)received

100.00%packetloss

我們發(fā)現(xiàn)此時(shí)是不通的。為何呢???我們來分析一下:通過查看路由表,我們發(fā)現(xiàn)JC2的

路由表中沒有到/32和.1/32的路由。

那么,我們?cè)贘C2上配置靜態(tài)路由,如下:

我們?cè)賮頊y(cè)試:

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=254time=90ms

Replyfrom:bytes=56Sequence=2ttl=254time=50ms

Replyfrom:bytes=56Sequence=3ttl=254time=90ms

Replyfrom:bytes=56Sequence=4ttl=254time=80ms

Replyfrom:bytes=56Sequence=5ttl=254time=60ms

pingstatistics

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=50/74/90ms

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=254time=60ms

Replyfrom:bytes=56Sequence=2ttl=254time=60ms

Replyfrom:bytes=56Sequence=3ttl=254time=50ms

Replyfrom:bytes=56Sequence=4ttl=254time=70ms

Replyfrom:bytes=56Sequence=5ttl=254time=90ms

一pingstatistics一

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=50/66/90ms

可見已經(jīng)實(shí)現(xiàn)了各網(wǎng)段之間的互通。

試驗(yàn)任務(wù)二:配置缺省路由

在路由器上合理的配置靜態(tài)路由可以減少路由表中表項(xiàng)數(shù)量,節(jié)省路由表空間,加緊路由匹

配速度。

默認(rèn)路由常常使用在末端網(wǎng)絡(luò)中。末端網(wǎng)絡(luò)是指僅有一種出口連接外部的網(wǎng)絡(luò)。我們?cè)贘C1

和JC3上用Loopback口來模擬末端網(wǎng)絡(luò),那么我們就可以在JC1和JC3上配置默認(rèn)路由。

環(huán)節(jié)一:建立物理連接

清空任務(wù)一的配置,并根據(jù)任務(wù)一建立重新建立物理連接。

環(huán)節(jié)二:配置默認(rèn)路由

JC1配置:

JC2配置:

[JC2]iproute-static32

JC3配置:

測(cè)試各路由器之間的連通性:

在JC1上使用Ping命令測(cè)試:

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=254time=80ms

Replyfrom10.13.2:bytes=56Sequence=2ttl=254time=80ms

Replyfrom:bytes=56Sequence=3ttl=254time=70ms

Replyfrom:bytes=56Sequence=4ttl=254time=60ms

Replyfrom:bytes=56Sequence=5ttl=254time=30ms

一pingstatistics一

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=30/64/80ms

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=254time=40ms

Replyfrom:bytes=56Sequence=2ttl=254time=30ms

Replyfrom:bytes=56Sequence=3ttl=254time=70ms

Replyfrom:bytes=56Sequence=4ttl=254time=60ms

ReplyfromlO.l.^.l:bytes-56Sequence-5ttl-254time-30ms

—pingstatistics一

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=30/46/70ms

PING:56databytes,pressCTRL_Ctobreak

Replyfrom:bytes=56Sequence=lttl=254time=60ms

Replyfrom:bytes=56Sequence=2ttl=254time=50ms

Replyfrom:bytes=56Sequence=3ttl=254time=70ms

Replyfrom:bytes=56Sequence=4ttl=254time=70ms

Replyfrom:bytes=56Sequence=5ttl=254time=60ms

—pingstatistics—

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=50/62/70ms

通過測(cè)試,我們發(fā)現(xiàn)各路由器之間是彼此互通的

我們?cè)贘C1上查看路由表:

[JCl]displayiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:6Routes:6

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

0/0/0

試驗(yàn)四.RIP配置

一、試驗(yàn)?zāi)康?/p>

加深RIP協(xié)議原理的理解

理解RIP實(shí)現(xiàn)運(yùn)行的機(jī)制

掌握RIP路由配置

熟悉RIP路由維護(hù)

二、試驗(yàn)描述及組網(wǎng)

/24

GEOWD

Ethernet0/0/0

/24

/24

Ethernet(MJ/1Ethernet0/0/1

PCAPCB

通過配置Rip實(shí)現(xiàn)各個(gè)網(wǎng)段互通,在路由器上與主機(jī)相連日勺接口應(yīng)用silent-interface命令。

三、試驗(yàn)過程

試驗(yàn)任務(wù)一:配置RIPvl

本試驗(yàn)重要通過在路由器上配置RIPvl協(xié)議,到達(dá)PC之間可以互訪的目的。通過本次試驗(yàn),

學(xué)院應(yīng)當(dāng)可以掌握RIP協(xié)議的基本配置。

環(huán)節(jié)一:搭建試驗(yàn)環(huán)境

設(shè)備名稱接口IP地址網(wǎng)關(guān)

JC1G0/0/0—

EthO/O—

JC2G0/0/0—

EthO/O—

PCA—

PCB—

按照上圖進(jìn)行連接并配置IP地址。

測(cè)試PC到網(wǎng)關(guān)的可達(dá)性,以JC1為例

Ping:32databytes,PressCtrl_Ctobreak

From:bytes=32seq=lttl=255time=15ms

From:bytes=32seq=2ttl=255time=15ms

From:bytes=32seq=3ttl=255time=15ms

From:bytes=32seq=4ttl=255time=16ms

From:bytes=32seq=5ttl=255time=16ms

―pingstatistics--

5packet(s)transmitted

5packet(s)received

0.00%packetloss

round-tripmin/avg/max=15/15/16ms

查看路由器的路由表,以JC1為例:

[JCl]displayiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:6Routes:6

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

環(huán)節(jié)二:配置RIP

JC1:

(JCl]rip

JC2:

UC2]rip

查看路由表,以JC1為例:

[JCl]displayiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:7Routes:7

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

0/0/0

測(cè)試PC之間的可達(dá)性。在PCA上使用Ping命令測(cè)試到PCB的可達(dá)性。

Ping:32databytes,PressCtrl_Ctobreak

Requesttimeout!

From:bytes=32seq=2ttl=126time=63ms

From:bytes=32seq=3ttl=126time=47ms

From:bytes=32seq=4ttl=126time=47ms

From:bytes=32seq=5ttl=126time=63ms

---pingstatistics…

5packet(s)transmitted

4packet(s)received

20.00%packetloss

round-tripmin/avg/max=0/55/63ms

可以看到PC之間實(shí)現(xiàn)了互通。

在JC1上用命令displayrip查看:

[JCl]displayrip

PublicVPN-instance

RIPprocess:1

RIPversion:1//RIP版本一

Preference:100

Checkzero:Enabled

Default-cost:0

Summary:Enabled

Host-route:Enabled

Maximumnumberofbalancedpaths:32

Updatetime:30secAgetime:180sec

Garbage-collecttime:120sec//RIP的3個(gè)更新計(jì)時(shí)器

Gracefulrestart:Disabled

BFD:Disabled

Silent-interfaces:None

Default-route:Disabled

Verify-source:Enabled

Networks:

Configuredpeers:None

Numberofroutesindatabase:3

Numberofinterfacesenabled:2

Triggeredupdatessent:3

Numberofroutechanges:1

Numberofrepliestoqueries:1

NumberofroutesinADVDB:3

環(huán)節(jié)三:silent-interface的應(yīng)用

在之前的試驗(yàn)中,路由器從每個(gè)啟用rip日勺接口收發(fā)協(xié)議報(bào)文,包括與PC相連的接口。實(shí)

際上,PC并不需要接受RP協(xié)議報(bào)文,我們可以用silent-interface命令使接口只接受而不發(fā)

送協(xié)議報(bào)文。

JC1:

[JCl-rip-l]silent-interfaceEthernet0/0/0

JC2:

[JC2-rip-l]silent-interfaceEthernet0/0/0

配置完畢后,我們用debugging命令查看,可以發(fā)現(xiàn),RIP不再從接口Eth0/0發(fā)送協(xié)議報(bào)文

To

RIP是通過計(jì)時(shí)器來維護(hù)路由表的,路由器在180s后沒收到對(duì)某路由項(xiàng)的更新,就會(huì)將該路

由項(xiàng)從路由表中撤銷。下面我們來驗(yàn)證一下:

我們?cè)贘C1的G0/0/0接口上使用silent-interface命令,接著我們?cè)贘C1上查看路由表,如

下:

[JC2-rip-l]disiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:7Routes:7

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

0/0/0

可以看到,在JC1日勺路由表中尚有到的路由0

180s后,再來查看路由表和RIP路由表:

[JC2]displayiprouting-table

RouteFlags:R-relay,D-dcwnloadtofib

RoutingTables:Public

Destinations:6Routes:6

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

可以看到路由192.16820已經(jīng)不存在了。這時(shí),我們來查看RIP路由表:

[JC2]displayrip1route

RouteFlags:R-RIP

A-Aging,G-Garbage-collect

PeeronGigabitEthernetO/O/O

Destination/MaskNexthopCostTagFlagsSec

Garbage-collect計(jì)時(shí)器

發(fā)目前RIP路由表中還存在該路由,120s后來使用displayrip1route己經(jīng)沒有任何顯示。

試驗(yàn)任務(wù)二:RIPV2的配置

RIPvl協(xié)議自身存在有一定的局限性,在主類網(wǎng)絡(luò)隔離非持續(xù)子網(wǎng)的狀況下,不可以對(duì)的日勺

學(xué)習(xí)到路由。而RIPV2彌補(bǔ)了RIPvl的局限性,同步可以支持驗(yàn)證。

環(huán)節(jié)一:搭建試驗(yàn)環(huán)境

清空任務(wù)一的配置并按照任務(wù)一進(jìn)行連接,按下表配置IP地址。

設(shè)備名稱接口IP地址網(wǎng)關(guān)

JC1G0/0/0—

EthO/O/O—

JC2G0/0/0—

EthO/O/O1—

PCA—

PCB—

環(huán)節(jié)二:配置RIPvl

JC1:

[JCl]rip

JC2:

[JC2]rip

查看路由表

(JCl)displayiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:6Routes:6

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

JC1的路由表中沒有/24網(wǎng)段的路由。

在JC1上打開debugging:

<JCl>terminalmonitor

<JCl>terminaldebugging

<JCl>debuggingrip1packet

在JC1上打開debugging:

Mar18202317:17:46.470.1-08:00HuaweiRIP/7/DBG:6:12227:RIP1:Sendingresp

Mar18202317:17:46.470.2-08:00HuaweiRIP/7/DBG:6:12247:Packet:Version1,

Cmdresponse,Length24

Mar18202317:17:46.470.3-08:00HuaweiRIP/7/DBG:6:12296:Dest,Cost

1

分析:RIPvl發(fā)送日勺更新報(bào)文中不具有掩碼信息,因此出現(xiàn)錯(cuò)誤。

環(huán)節(jié)三:配置RIPv2

JC1;

[JCl]rip

[JCl-rip-l]version2

[JCl-rip-l]undosummary

JC2:

[JC2]rip

[JC2-rip-l]version2

[JC2-rip-l]undosummary

配置完畢后,在JC1上查看路由表,如下,

[JCl-rip-l]displayiprouting-table

RouteFlags:R-relay,D-downloadtofib

RoutingTables:Public

Destinations:7Routes:7

Destination/MaskProtoPreCostFlagsNextHopInterface

0/0/0

0/0/0

0/0/0

在JC1上打開debugging,如下:

Mar18202317:31:21.4303-08:00JC1RIP/7/DBG:6:12247:Packet:Version2,Cmd

response,Length24

Mar18202317:31:21.430.4-08:00JC1RIP/7/DBG:6:12315:Dest,Next

hop,Cost1,Tag0

Mar18202317:35:28.480.1-08:00JC1RIP/7/DBG:6:12227:RIP1:Sendingrespons

eoninterfaceGigabitEthernetO/O/Ofromto

可以看到RIPv2是以組播的形式發(fā)送協(xié)議報(bào)文的,組播地址為224.009。以組播的形式進(jìn)行

更新,既減少了資源的揮霍,又最大程度地減少了對(duì)其他網(wǎng)絡(luò)設(shè)備的干擾。同步,RIP協(xié)議

報(bào)文中包具有掩碼信息,保證了信息交互的對(duì)的性。

試驗(yàn)五.OSPF配置

一、試驗(yàn)?zāi)康?/p>

掌握單區(qū)域OSPF配置措施

掌握OSPF優(yōu)先級(jí)的配置措施

二、試驗(yàn)描述及組網(wǎng)

分別用串口線和雙絞線將兩臺(tái)路由器相連,通過配置OSPF實(shí)現(xiàn)各網(wǎng)段互通互通。

Loopback0Loopback。

1.1.1.1/322.2.2.2/32

10.1.1.2/24

SerialOJOJO

JC2

串口線相連

Loopback0LCopback0

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論