网络知识培训(第二部分)_第1页
网络知识培训(第二部分)_第2页
网络知识培训(第二部分)_第3页
网络知识培训(第二部分)_第4页
网络知识培训(第二部分)_第5页
已阅读5页,还剩178页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

网络知识培训普天润汇客户服务部詹玉刚E_mail:1第二部分Cisco路由器操作基础(IOS)IP路由(IPRouting)二层交换及虚拟局域网(VLAN)路由器设备管理2Cisco路由器操作基础(IOS)3网络技术培训(第二部分)一、Cisco路由器操作基础(IOS)CiscoIOS--CiscoInternetworkOperatingSystem,运行在Cisco路由器和一些交换机上的操作系统。

Cisco路由器的两种配置方式setupmode和CiscoIOSCommandLineInterface(CLI)模式

理解和使用CiscoInternetworkOperatingSystem(IOS)

连接到路由器

启动路由器

登陆到路由器

理解路由器提示符意思

理解CLI提示符意思

执行编辑和帮助属性

收集路由器基本信息

设置路由器密码

设置路由器标语

配置接口

设置主机名

配置接口描述

检验和保存路由器配置文件

检验路由配置4网络互连(Internetworking)一、Cisco路由器操作基础(IOS)连接到Cisco路由器--ConnectingtoCiscoRouter通过三种方式连接到Cisco路由器

1、控制口(console口)

2、辅助口(aux口)

3、Telnet方式5网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的启动顺序RmonEEPROMNVRAMRAM加电自检(POST)装载IOS装载配置文件运行应用进程6网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的启动顺序Step1、将IOS由flashmemory(EEPROM)装载入RAM7网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的启动顺序Step2、运行IOS8网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的启动顺序Step3、显示从POST获得的路由器的基本信息9网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的Setup配置模式10网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的Setup配置模式11网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouter路由器的Setup配置模式12网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启动Cisco路由器--BringupCiscoRouterCiscoCommandLine(CLI)用户接口13网络互连(Internetworking)一、Cisco路由器操作基础(IOS)登陆到Cisco路由器--LoggingintoCiscoRouterRouter>#用户执行模式--userexecmode(usermode)#Router>enableRouter##特权模式--privilegedmode#Router#disable

Router>#返回usermode#Router>logout#退出console#Routercon0isnowavailable

PressENTERtogetstarted.进入全局配置模式--GlobalConfigurationModeRouter#config

Configuringfromterminal,memory,ornetwork[terminal]?[Enter]Router(config)#Router#configt

Router(config)#14网络互连(Internetworking)一、Cisco路由器操作基础(IOS)CLI提示符接口(interface)配置模式Router(config)#interface?

AsyncAsyncinterface

BVIBridge-GroupVirtualInterface

FastEthernetFastEthernetInterface

SerialSerial

……………….Router(config)#interfacefastethernet0/0

Router(config-if)#接口配置模式Router(config)#interfacefastethernet0/0.?

<0-4294967295>FastEthernetinterfacenumber

Router(config)#interfacefastethernet0/0.1

Router(config-subif)#子接口(interface)配置模式子接口配置模式15网络互连(Internetworking)一、Cisco路由器操作基础(IOS)CLI提示符Line配置命令Router(config)#line?

auxAuxiliaryline

consolePrimaryterminalline

ttyTerminalcontroller

vtyVirtualterminal

……………….Router(config)#lineconsole0

Router(config-line)#line配置模式Router(config)#routerrip

Router(config-router)#路由协议配置模式路由协议配置命令16网络互连(Internetworking)一、Cisco路由器操作基础(IOS)编辑(EDITING)和帮助(HELP)功能Router#?

Execcommands:

access-enableCreateatemporaryAccess-listentry

access-profileApplyuser-profiletointerface

access-templateCreateatemporaryAccess-listentry

……………….Router#c?

clearclockconfigureconnectcopy

Router#clock?

Setsettimeanddate

Router#clockset?

hh:mm:ssCurrenttime

Router#clockset10:30:20?

<1-31>Dayofmonth

MONTHmonthofyear

Router#clockset10:30:2028?

MONTHMonthofyear

Router#clockset10:30:2028august?

<1993-2035>Year

Router#clockset10:30:2028august2003?

<cr>

Router##帮助命令#Router#c?

clearclockconfigureconnectcopy

Router#clock?

Setsettimeanddate

Router#clockset?

hh:mm:ssCurrenttime

Router#clockset10:30:20?

<1-31>Dayofmonth

MONTHmonthofyear

Router#clockset10:30:2028?

MONTHMonthofyear

Router#clockset10:30:2028august?

<1993-2035>Year

Router#clockset10:30:2028august2003?

<cr>

Router#17网络互连(Internetworking)一、Cisco路由器操作基础(IOS)键入命令返回提示Router#c?

clearclockconfigureconnectcopy

Router#clock?

Setsettimeanddate

Router#clockset?

hh:mm:ssCurrenttime

Router#clockset10:30:20?

<1-31>Dayofmonth

MONTHmonthofyear

Router#clockset10:30:2028?

MONTHMonthofyeaRouter#clockset10:30:20

%Incompletecommand.

Router(config)#access-list110permithost

%Invalidinputdetectedat‘^’marker

Router#showte

%Ambiguouscommand:”showte”

Router#showte?

Tech-supporttemplateterminal#表明命令未完成#^#表明命令输入错误##表明命令不明确#18网络互连(Internetworking)一、Cisco路由器操作基础(IOS)高级编辑(EDITING)命令命令格式含义Ctrl+ACtrl+BCtrl+EEsc+BCtrl+FEsc+FCtrl+DBackSpaceCtrl+RCtrl+UCtrl+WCtrl+ZTab将光标移到行头部将光标移到行末尾将光标后移一个单词将光标后移一个字母将光标前移一个字母将光标前移一个单词删除光标前的一个字母删除光标前的一个字母重新显示上一行删除光标所在行删除一个单词结束配置模式返回执行(exec)模式结束一个键入的命令19网络互连(Internetworking)一、Cisco路由器操作基础(IOS)历史(history)命令命令格式含义Ctrl+P或ShowterminalCtrl+N或ShowhistoryTerminalhistorysize显示上最后键入的一条命令显示上一条命令列出10个键入的命令列出terminal配置和historysize大小改变history缓存大小,最大25620网络互连(Internetworking)一、Cisco路由器操作基础(IOS)showhistory命令Router#showhistory

en

shhistory

showterminal

shcdpnei

shver

shflash

shintfa0

shhistory

shints0/0

shints0/1Terminalhistorysize命令Router#terminalhistorysize2521网络互连(Internetworking)一、Cisco路由器操作基础(IOS)收集基本的路由信息命令Router#showversion

CiscoInternetworkOperatingSystemSoftwareIOS(tm)C2600Software(C2600-BIN-M),Version12.2(13)T1,RELEASESOFTWARE(fc1)TACSupport:Copyright(c)1986-2003byciscoSystems,Inc.CompiledSat04-Jan-0305:58byccaiImagetext-base:0x80008098,data-base:0x80C4AD94

ROM:SystemBootstrap,Version11.3(2)XA4,RELEASESOFTWARE(fc1)Routeruptimeis1week,2hours,39minutesSystemreturnedtoROMbyreloadSystemimage"flash:c2600-bin-mz.122-13.T1.bin"表明运行在路由器中的IOS版本表明运行在路由器中的rom版本表明路由器运行了多常时间,以及IOS文件名称22网络互连(Internetworking)一、Cisco路由器操作基础(IOS)收集基本的路由信息命令cisco2621(MPC860)processor(revision0x101)with27648K/5120KbytesofmemoryProcessorboardIDJAB0402040J(2308906173)M860processor:partnumber0,mask49Bridgingsoftware.X.25software,VersionFastEthernet/IEEE802.3interface(s)2Serialnetworkinterface(s)32Kbytesofnon-volatileconfigurationmemory.8192KbytesofprocessorboardSystemflash(Read/Write)Configurationregisteris0x210223网络互连(Internetworking)一、Cisco路由器操作基础(IOS)密码设置命令

consolepassword、AUXpassword、vty(telnet)password、enablepassword

enablesecretRouter#configt

Router(config)#lineaux0

Router(config-line)#login

Router(config-line)#passwordtodd#新版本不需要这行#Router#configt

Router(config)#linecon0

Router(config-line)#login

Router(config-line)#passwordtodd1

Router(config)#linecon0

Router(config-line)#exec-time00

Router(config-line)#loggingsynchronous24网络互连(Internetworking)一、Cisco路由器操作基础(IOS)密码设置命令

consolepassword、AUXpassword、vty(telnet)password、enablepassword

enablesecretRouter#configt

Router(config)#linevty04

Router(config-line)#login

Router(config-line)#passwordtoddRouter#configt

Router(config)#linevty04

Router(config-line)#nologin25网络互连(Internetworking)一、Cisco路由器操作基础(IOS)密码加密Router#shrunning-config

[outputcut]

!

enablesecret5$1$rFbM$8.aXocHg6yHrM/zzeNkAT.

enablepasswordtodd1

!

[outputcut]

linecon0

passwordtodd1

Login

lineaux0

passwordtodd

Login

linevty04

passwordtodd2

Login

!

End

Router#26网络互连(Internetworking)一、Cisco路由器操作基础(IOS)密码加密Router#configt

Router(config)#servicepassword-encryption

Router(config)#^Z

Router#shrunning-config

[outputcut]

!

enablesecret5$1$rFbM$8.aXocHg6yHrM/zzeNkAT.

enablepassword70835434A0D

!

[outputcut]

linecon0

password7111D160113

Login

lineaux0

password7071B2E484A

Login

linevty04

password70835434A0D

Login

!

End

Router#27网络互连(Internetworking)一、Cisco路由器操作基础(IOS)标语(banner)设置Router#banner?

LINEcbanner-textc,where'c'isadelimitingcharacter

execSetEXECprocesscreationbanner

incomingSetincomingterminallinebanner

loginSetloginbanner

motdSetMessageoftheDaybannerRouter(config)#bannermotd?

LINEcbanner-textc,where'c'isadelimitingcharacter

Router(config)#bannermotd#

EnterTEXTmessage.Endwiththecharacter'#'.

$Anetwork,thenyoumustdisconnectimmediately.

#

Router(config)#^Z

Router#

00:25:12:%SYS-5-CONFIG_I:Configuredfromconsolebyconsole

Router#exit

Routercon0isnowavailable

PressRETURNtogetstarted.

IfyouarenotauthorizedtobeinAnetwork,then

youmustdisconnectimmediately.

Router>28网络互连(Internetworking)一、Cisco路由器操作基础(IOS)路由器接口配置--网络地址、介质类型、带宽等命令Router(config)#intserial?

<0-9>Serialinterfacenumber

Router(config)#intserial5

Router(config-if)#

Router(config)#intethernet?

<0-0>Ethernetinterfacenumber

Router(config)#intethernet0

Router(config-if)#interfacetypenumber#以cisco2522为例#29网络互连(Internetworking)一、Cisco路由器操作基础(IOS)路由器接口配置--网络地址、介质类型、带宽等命令Router(config)#intfastethernet?

<0-1>FastEthernetinterfacenumber

Router(config)#intfastethernet0

%Incompletecommand.

Router(config)#intfastethernet0?

/

Router(config)#intfastethernet0/?

<0-1>FastEthernetinterfacenumber

Router(config)#intfa0/0

Router(config-if)#media-type?

100BaseXUseRJ45for-TX;SCFOfor–FX

MIIUseMIIconnector#以cisco2600为例##inttypeslot/port#30网络互连(Internetworking)一、Cisco路由器操作基础(IOS)启用路由器接口Router#shintethernet0

Ethernet0isadministrativelydown,lineprotocolisdown

[outputcut]

Router#configt

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

Router(config)#intethernet0

Router(config-if)#noshutdown

Router(config-if)#^Z

00:57:08:%LINK-3-UPDOWN:InterfaceEthernet0,changedstatetoup

00:57:09:%LINEPROTO-5-UPDOWN:LineprotocolonInterfaceEthernet0,

changedstatetoup

Router#shintethernet0

Ethernet0isup,lineprotocolisup[outputcut]#检查端口状态##启用端口#31网络互连(Internetworking)一、Cisco路由器操作基础(IOS)配置路由器接口地址Router(config)#inte0

Router(config-if)#ipaddress

Router(config-if)#noshut

Router(config-if)#ipaddresssecondary

Router(config-if)#^ZRouter#shrun

Buildingconfiguration...

Currentconfiguration:

[outputcut]

!

interfaceEthernet0

ipaddresssecondary

ipaddress

!#配置端口IP地址##为端口配置第二个地址##校验端口配置第#32网络互连(Internetworking)一、Cisco路由器操作基础(IOS)配置路由器serial接口Router#configt

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

Router(config)#ints0

Router(config-if)#clockrate?

Speed(bitspersecond)

1200

2400

4800

9600

19200

38400

56000

64000

72000

125000

148000

250000

500000

<300-4000000>Chooseclockratefromlistabove.,1#配置serial端口时钟#33网络互连(Internetworking)一、Cisco路由器操作基础(IOS)配置路由器serial接口Router(config-if)#ints0

Router(config-if)#clockrate64000

%Error:ThiscommandappliesonlytoDCEinterfaces

Router(config-if)#ints1

Router(config-if)#clockrate64000

Router>shcontrollerss0

HDunit0,idb=0x297DE8,driverstructureat0x29F3A0

buffersize1524HDunit0,V.35DCEcable

Router(config-if)#bandwidth?

<1-10000000>Bandwidthinkilobits

Router(config-if)#bandwidth64#配置serial端口时钟#34网络互连(Internetworking)一、Cisco路由器操作基础(IOS)配置路由器主机名、描述Router#configt

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

Router(config)#hostnameTodd

Todd(config)#hostnameAtlanta

Atlanta(config)#

#配置路由器名称#Atlanta(config)#inte0

Atlanta(config-if)#descriptionSalesLan

Atlanta(config-if)#ints0

Atlanta(config-if)#descWantoMiamicircuit:6fdda4321

Atlanta#shrun

[cut]

interfaceEthernet0

descriptionSalesLan

ipaddress0

noipdirected-broadcast

!

interfaceSerial0

descriptionWantoMiamicircuit:6fdda4321

noipaddress#配置接口描述#Atlanta#shinte0

Ethernet0isup,lineprotocolisup

HardwareisLance,addressis0010.7be8.25db(bia0010.7be8.25db)

Description:SalesLan

[outputcut]

Atlanta#shints0

Serial0isup,lineprotocolisup

HardwareisHD64570

Description:WantoMiamicircuit:6fdda432135网络互连(Internetworking)一、Cisco路由器操作基础(IOS)查看和保存路由器配置

DRAM--(running-congfig文件)

NVRAM--(startup-config文件)Atlanta#copyrunstart

Destination[startup-config]?[Enter]

Warning:AttemptingtooverwriteanNVRAMconfigurationpreviously

writtenbyadifferentversionofthesystemimage.

OverwritethepreviousNVRAMconfiguration?[confirm][Enter]

Buildingconfiguration...#保存DRAM中的配置文件到NVRAM中#Atlanta#shrun

Buildingconfiguration...

Currentconfiguration:

!

version12.0

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnameAtlanta

ipsubnet-zero

frame-relayswitching

!

[outputcut]#查看DRAM中配置文件#36网络互连(Internetworking)一、Cisco路由器操作基础(IOS)查看和保存路由器配置

DRAM--(running-congfig文件)

NVRAM--(startup-config文件)Atlanta#shstart

Using4850outof32762bytes

!

version12.0

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnameAtlanta

!

ipsubnet-zero

frame-relayswitchingAtlanta#erasestartup-config

Erasingthenvramwillremoveallfiles!Continue?[confirm][Enter]

[OK]

Eraseofnvram:complete

Atlanta#shstart

%%Non-volatileconfigurationmemoryisnotpresent

Atlanta#reload#查看NVRAM中配置文件##删除NVRAM中配置文件#37网络互连(Internetworking)一、Cisco路由器操作基础(IOS)使用showinterface命令Router#shint?

AsyncAsyncinterface

BVIBridge-GroupVirtualInterface

CTunnelCTunnelinterface

DialerDialerinterface

FastEthernetFastEthernetIEEE802.3

LoopbackLoopbackinterface

MFRMultilinkFrameRelaybundleinterface

MultilinkMultilink-groupinterface

NullNullinterface

SerialSerial

TunnelTunnelinterface

VifPGMMulticastHostinterface

Virtual-TemplateVirtualTemplateinterface

Virtual-TokenRingVirtualTokenRing

accountingShowinterfaceaccounting

crbShowinterfacerouting/bridginginfo

dampeningShowinterfacedampeninginfo

。。。。。。。。。。。。。。。。。。。。。。。。。<cr>#showinterface命令#38网络互连(Internetworking)一、Cisco路由器操作基础(IOS)使用showinterface命令Router#shintfastethernet0/0

FastEthernet0/0isup,lineprotocolisup

HardwareisAmdFE,addressis00b0.6483.2320(bia00b0.6483.2320)

Description:connectiontoLAN40

Internetaddressis3/27

MTU1500bytes,BW100000Kbit,DLY100usec,

reliability255/255,txload1/255,rxload1/255

EncapsulationARPA,loopbacknotset

Keepaliveset(10sec)

Full-duplex,100Mb/s,100BaseTX/FX

ARPtype:ARPA,ARPTimeout04:00:00

Lastinputnever,output00:00:04,outputhangnever

Lastclearingof"showinterface"countersnever

Inputqueue:0/75/0/0(size/max/drops/flushes);Totaloutputdrops:0

Queueingstrategy:fifo

Outputqueue:0/40(size/max)

5minuteinputrate0bits/sec,0packets/sec

5minuteoutputrate0bits/sec,0packets/sec

0packetsinput,0bytes

Received0broadcasts,0runts,0giants,0throttles

0inputerrors,0CRC,0frame,0overrun,0ignored,0watchdog

0inputpacketswithdribbleconditiondetected

84639packetsoutput,8551135bytes,0underruns

0outputerrors,0collisions,16interfaceresets

0babbles,0latecollision,0deferred

0lostcarrier,0nocarrier

0outputbufferfailures,0outputbufferssout#showinterface命令#39网络互连(Internetworking)一、Cisco路由器操作基础(IOS)使用showinterface命令Router#shintfa0/0

FastEthernet0/0isup,lineprotocolisup

表明物理层状态表明数据链路层状态Router#shintS0/0

FastEthernet0/0isup,lineprotocolisdown

物理层状态正常表明数据链路层问题Router#shintfa0/0

FastEthernet0/0isdown,lineprotocolisdown

物理层状态问题Router#shintfa0/0

FastEthernet0/0isadministrativelydown,lineprotocolisdown

管理员使用了shutdown命令40网络互连(Internetworking)一、Cisco路由器操作基础(IOS)使用showinterface命令Router#shints0/0

Serial0/0isup,lineprotocolisup

HardwareisHD64570

MTU1500bytes,BW1544Kbit,DLY20000usec,reliability255/255,txload1/255,rxload1/255

EncapsulationHDLC,loopbacknotset,keepaliveset(10sec)

Lastinputnever,outputnever,outputhangnever

Lastclearingof"showinterface"countersnever

Queueingstrategy:fifo

Outputqueue0/40,0drops;inputqueue0/75,0drops

5minuteinputrate0bits/sec,0packets/sec

5minuteoutputrate0bits/sec,0packets/sec

0packetsinput,0bytes,0nobuffer

Received0broadcasts,0runts,0giants,0throttles

0inputerrors,0CRC,0frame,0overrun,0ignored,0abort,0packetsoutput,

0bytes,0underruns

0outputerrors,0collisions,16interfaceresets

0outputbufferfailures,0outputbufferssout

0carriertransitions

DCD=downDSR=downDTR=downRTS=downCTS=down41网络互连(Internetworking)一、Cisco路由器操作基础(IOS)使用showipinterface命令Router#shipinterfaceFastEthernet0/0isup,lineprotocolisupInternetaddressis/24Broadcastaddressis55AddressdeterminedbysetupcommandMTUis1500bytesHelperaddressisnotsetDirectedbroadcastforwardingisdisabledOutgoingaccesslistisnotsetInboundaccesslistisnotsetProxyARPisenabledSecuritylevelisdefaultSplithorizonisenabled[outputcut]42网络互连(Internetworking)一、Cisco路由器操作基础(IOS)使用showipinterfacebrief命令Router#shipintbriefInterfaceIP-AddressOK?MethodStatusProtocolFastEthernet0/03YESmanualupupFastEthernet0/18YESmanualupupSerial0/0YESmanualupupSerial0/1unassignedYESNVRAMadministrativelydowndown

Router#shcontrollersserial0/0

HDunit0,idb=0x1229E4,driverstructureat0x127E70

buffersize1524HDunit0,V.35DTEcable

cpb=0xE2,eda=0x4140,cda=0x4000

Router#shcontrollersserial0/1

HDunit1,idb=0x12C174,driverstructureat0x131600

buffersize1524HDunit1,V.35DCEcable

cpb=0xE3,eda=0x2940,cda=0x2800使用showcontrollers命令43IP路由(IPRouting)44网络互连(Internetworking)二、IP路由(IPRouting)路由协议(Routingprotocol)&可路由协议(Routedprotocol)网络A网络B网络C网络DRIP、OSPF等网络AIP、IPX等45网络互连(Internetworking)二、IP路由(IPRouting)IP路由基础

IP网络中的主机和路由器必须配置IP地址

路由(Routing)是用来将数据包从一个网络的一个主机上通过internetwork发送到另外不同网络的一个主机上。

路由不关心主机,它只关心网络,只关心到达目的网络的最佳路径。

目的主机的逻辑网络地址(IP地址)用来指导路由包通过可路由的网络到达目的网络,然后使用主机的硬件地址将数据包送到正确的目的主机上。

路由器可路由数据包的最小条件:

目的地址

可以学习到远程网络的邻居路由器

可能到达所有远程网络的路由表

到达每个网络的最佳路由

如何去校验和维护路由信息

获得路由信息的方法:

手工的--staticrouting(静态路由)

自动的--dynamicrouting(动态路由)46网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IPF0/27F0/26F0/0S0/0LAB_ALAB_BLAB_CS0/0

DCES0/1

DCES0/0F0/0F0/0F0/2F0/3F0/3F0/2F0/4F0/4F0/5F0/5路由器网络地址接口ip地址Lab_Afa0/0Lab_As0/0Lab_Bs0/0Lab_Bs0/1Lab_Bfa0/0Lab_Cs0/0Lab_Cfa0/047网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置路由器LAB_ARouter>en

Router#configt

Router(config)#hostnameLab_A

Lab_A(config)#enablesecrettodd

Lab_A(config)#interfacefa0/0

Lab_A(config-if)#ipaddress

Lab_A(config-if)#descriptionLab_ALANConnection

Lab_A(config-if)#noshut

Lab_A(config-if)#interfaceserial0/0

Lab_A(config-if)#ipaddress

Lab_A(config-if)#descriptionWANConnectiontoLab_B

Lab_A(config-if)#noshut

Lab_A(config-if)#exit

Lab_A(config)#lineconsole0Lab_A(config-line)#passwordtodd

Lab_A(config-line)#login

Lab_A(config-line)#lineaux0

Lab_A(config-line)#passwordtodd

Lab_A(config-line)#login

Lab_A(config-line)#linevty04

Lab_A(config-line)#passwordtodd

Lab_A(config-line)#login

Lab_A(config-line)#exit

Lab_A(config)#bannermotd#

ThisistheLab_Arouter

#

Lab_A(config)#^z

Lab_A#copyrunning-configstartup-config

Destination[startup-config]?[Enter]

Lab_A#48网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置路由器LAB_ALab_A#shiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B–BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E–EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefault,U-per-userstaticroute,o-ODR,P-periodicdownloadedstaticroute,T–trafficengineeredrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,FastEthernet0/0C/24isdirectlyconnected,Serial0/0Lab_A#49网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置路由器LAB_BLab_B#shiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B–BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E–EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefault,U-per-userstaticroute,o-ODR,P-periodicdownloadedstaticroute,T–trafficengineeredrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,Serial0/0C/24isdirectlyconnected,Serial0/1CisdirectlyconnectedFastEthernet0/0Lab_B#50网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置路由器LAB_BLab_C#shiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B–BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E–EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefault,U-per-userstaticroute,o-ODR,P-periodicdownloadedstaticroute,T–trafficengineeredrouteGatewayoflastresortisnotsetC/24isdirectlyconnected,FastEthernet0/0C/24isdirectlyconnected,Serial0/0Lab_C#51网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

静态路由--staticrouting

iproute[destination_network][mask][next-hop_addressorexitinterface][administrative_distance][permanent]Lab_A(config)#iprouteLab_A(config)#iprouteLab_A(config)#iprouteLAB_A

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/052网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

静态路由--staticrouting

iproute[destination_network][mask][next-hop_addressorexitinterface][administrative_distance][permanent]Lab_A#shiproute

[outputcut]

S[1/0]via

S[1/0]via

S[1/0]via

Cisdirectlyconnected,Serial0/0

Cisdirectlyconnected,FastEthernet0/0LAB_A

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/053网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

静态路由--staticrouting

iproute[destination_network][mask][next-hop_addressorexitinterface][administrative_distance][permanent]Lab_B(config)#iprouteLab_B(config)#iprouteLAB_B

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/054网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

静态路由--staticrouting

iproute[destination_network][mask][next-hop_addressorexitinterface][administrative_distance][permanent]Lab_B#shiproute

[outputcut]

S[1/0]via

Cisdirectlyconnected,Serial0/1

Cisdirectlyconnected,FastEthernet0/0

Cisdirectlyconnected,Serial0/0

S[1/0]viaLAB_B

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/055网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

静态路由--staticrouting

iproute[destination_network][mask][next-hop_addressorexitinterface][administrative_distance][permanent]Lab_C(config)#iprouteLab_C(config)#iprouteLab_C(config)#iprouteLAB_C

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/056网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

静态路由--staticrouting

iproute[destination_network][mask][next-hop_addressorexitinterface][administrative_distance][permanent]Lab_C#shiproute

[outputcut]

Cisdirectlyconnected,FastEthernet0/0

Cisdirectlyconnected,Serial0/0

S[1/0]via

S[1/0[via

S[1/0]viaLAB_C

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/057网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

校验我们的配置Lab_A#ping

Typeescapesequencetoabort.Sending5,100-byteICMPEchosto,timeoutis2seconds:

!!!!!

Successrateis80percent(4/5),round-tripmin/avg/max=64/66/68msNetworks

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/058网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

配置默认路由(defaultrouting)Lab_C(config)#noiprouteLab_C(config)#noiprouteLab_C(config)#noiprouteLab_C(config)#iprouteNetworks

F0/0S0/0LAB_ALAB_BLAB_CS0/0S0/1S0/0F0/0F0/0Stub网络(网络C)

网络只有一个出口59网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

配置动态路由(dynamicrouting)--RIP(RoutingInformationProtocol)

在internetwork应用中,有两种路由协议:

内部网关协议(interiorgatewayprotocol)--IGP

外部网关协议(exteriorgatewayprotocol)--EGP

自治域--autonomous(AS)AS101AS102IGPIGPEGP60网络互连(Internetworking)二、IP路由(IPRouting)在一个较大的网络上路由IP--配置IP路由(iprouting)

配置动态路由(dynamicrouting)--RIP(RoutingInformationProtocol)

路由协议基础

AdministrativeDistances(管理距离)

AD(管理距离)用来评估从邻居路由器接收到的路由信息的价值,AD(管理距离)是从0到255的整数,其中0表示这条路由是最有价值的,255表明不会有数据流量使用这条路由。

相同的路由信息,则路由器选择较低的AD的哪条路由,如果AD相同,则路由器选择metrics(度量)较低的路由,如果metrics也相同,则路由协议在多条路径间作负载均衡(load-balance)。源路由默认ADConnectedinterface0

Staticroute1

EIGRP90

IGRP100

OSPF

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论