熟练掌握 Cisco 路由器配置的预备知识Word文档格式.docx
- 文档编号:17150492
- 上传时间:2022-11-28
- 格式:DOCX
- 页数:18
- 大小:21.84KB
熟练掌握 Cisco 路由器配置的预备知识Word文档格式.docx
《熟练掌握 Cisco 路由器配置的预备知识Word文档格式.docx》由会员分享,可在线阅读,更多相关《熟练掌握 Cisco 路由器配置的预备知识Word文档格式.docx(18页珍藏版)》请在冰豆网上搜索。
6.设置对话状态这是一台新路由器开机时自动进入的状态,在特权命令状态使用SETUP命令也可进入此状态。
这时可通过对话方式对路由器进行设置。
三、设置对话过程
利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。
进入设置对话过程后,路由器首先会显示一些提示信息:
---SystemConfigurationDialog---Atanypointyoumayenteraquestionmark'
?
'
forhelp.
Usectrlctoabortconfigurationdialogatanyprompt.
Defaultsettingsareinsquarebrackets'
[]'
.
这是告诉你在设置对话过程中的任何地方都可以键入“?
”得到系统的帮助,按ctrl-c可以退出设置过程,缺省设置将显示在'
中。
然后路由器会问是否进入设置对话:
Wouldyouliketoentertheinitialconfigurationdialog?
[yes]:
如果按y或回车,路由器就会进入设置对话过程。
首先你可以看到各端口当前的状况:
First,wouldyouliketoseethecurrentinterfacesummary?
[yes]
:
AnyinterfacelistedwithOK?
Value"
NO"
doesnothaveavalidconfigurationInterfaceIP-AddressOK?
NethodStatusProtocol
Ethernet0unassignedNOunsetupup
Serial0unassignedNOunsetupup
………………………
然后,路由器就开始全局参数的设置:
Configuringglobalparameters:
1.设置路由器名:
Enterhostname[Router]:
2.设置进入特权状态的密文(secret),此密文在设置以后不会以明文方式显示:
Theenablesecretisaone-waycryptographicsecretusedinsteadoftheenablepasswordwhenitexists.--Enterenablesecret:
cisco
3.设置进入特权状态的密码(password),此密码只在没有密文时起作用,并且在设置以后会以明文方式显示:
Theenablepasswordisusedwhenthereisnoenablesecretandwhenusingoldersoftwareandsomebootimages.--Enterenablepassword:
pass
4.设置虚拟终端访问叶的密码:
--Entervirtualterminalpassword:
5.询问是否要设置路由器支持的各种网络协议:
--ConfigureSNMPNetworkManagement?
--ConfigureDECnet?
[no]:
--ConfigureAppleTalk?
--ConfigureIPX?
--ConfigureIP?
--ConfigureIGRProuting?
--ConfigureRIProuting?
6.如果配置的是拨号访问服务器,系统还会设置异步口的参数:
--ConfigureAsynclines?
1)设置线路的最高速度:
--Asynclinespeed[9600]:
2)是否使用硬件流控:
--ConfigureforHWflowcontrol?
3)是否设置modem:
--Configureformodems?
[yes/no]:
yes
4)是否使用默认的modem命令:
--Configurefordefaultchatscript?
5)是否设置异步口的PPP参数:
--configureforDial-inIPSLIP/PPPaccess?
[no]
6)是否使用动态IP地址:
-
-ConfigureforDynamicIPaddresses?
7)是否使用缺省IP地址:
--ConfigureDefaultIPaddresses?
8)是否使用TCP头压缩:
--ConfigureforTCPHeaderCompression?
9)是否在异步口上使用路由表更新:
Configureforroutingupdatesonasynclinks?
y
10)是否设置异步口上的其它协议。
接下来,系统会一个接口连行参数的设置。
7.ConfiguringinterfaceEthernet0:
1)是否使用此接口:
--Isthisinterfaceinuse?
2)是否设置此接口的IP参数:
--ConfigureIPonthisinterface?
3)设置接口的IP地址:
--IPaddressforthisinterface:
192.168.162.2
4)设置接口的IP子网掩码:
--Numberofbitsinsubnetfield[0]:
--ClassCnetworkis192.168.162.0,0subnetbits;
maksis/24
在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来:
Thefollowingconfigurationcommandscriptwascreated:
hostnameRouter
enablesecret5$1$W5Oh$6J7tIgRMBOIKVXVG53Uh1
enablepasswordpass
…………
请注意在enablesecret后面显示的是乱码,而enablepassword后面显示的是设置的内容。
显示结束后,系统会问是否使用这个设置;
Usethisconfiguration?
如果回答yes,系统就会把设置的结果存入路由器的NVRAM中,然后结束设置对话过程,使路由器开始正常的工作。
四、常用命令
1.帮助在IOS操作中,无论任何状态和位置,都可以键入“?
”得到系统的帮助。
2.改变命令状态进入特权命令状态enable
退出特权命令状态disable
进入设置对话状态setup
进入全局设置状态configterminal
退出全局设置状态end
进入端口设置状态interfacetypeslot/number
进入子端口设置状态interfacetypenumber.Subinterface[point-to-point|multipoint]
进入线路设置状态linetypeslot/number
进入路由设置状态routerprotocol
退出局部设置状态exit
3.显示命令
查看版本及引导信息showversion
查看运行设置showrunning-config
查看开机设置showstartup-config
显示端口信息showinterfacetypeslot/number
显示路由信息showiprouter
4拷贝命令
用于IOS及CONFIG的备份和升级
5.网络命令
登录远程主机 telnethostname/IPaddress
网络侦测 pinghostname/IPaddress
路由跟踪 tracehostname/IPaddress
6.基本设置命令
全局设置 configterminal
设置访问用户密码 usernameusernamepasswordpassword
设置特权密码 enablesecretpassword
设置路由器名 hostnamename
设置静态路由 iproutedestinationsubnet-masknext-hop
启动IPX路由 ipxrouting
端口设置 interfacetypeslot/number
设置IP地址 ipaddressaddresssubnet-mask
设置IPX网络 ipxnetworknetwork
激活端口 noshutdown
物理线路设置 linetypenumber
启动登录进程 login[local|tacacsserver]
设置登录密码 passwordpassword
Cisco
路由器配置语句汇总
启动接口,分配IP地址:
router>
enable
router#
router#configureterminal
router(config)#
router(config)#interfaceTypePort
router(config-if)#noshutdown
router(config-if)#ipaddressIP-AddressSubnet-Mask
router(config-if)#^z
配置RIP路由协议:
30秒更新一次
router(config)#routerrip
router(config-if)#networkNetwork-Number<
--通告标准A,B,C类网-->
配置IGRP路由协议:
90秒更新一次
router(config)#routerigrpAS-Number<
--AS-Number范围1~65535-->
配置NovellIPX路由协议:
NovellRIP60秒更新一次
router(config)#ipxrouting[nodeaddress]
router(config)#ipxmaximum-pathsPaths<
--设置负载平衡,范围1~512-->
router(config-if)#ipxnetworkNetwork-Number[encapsulationencapsulation-type][secondary]<
配置DDR:
router(config)#dialer-listGroup-NumberprotocolProtocol-Typepermit[listACL-Number]
router(config)#interfacebri0
router(config-if)#dialer-groupGroup-Number
router(config-if)#dialermapProtocol-TypeNext-Hop-AddressnameHostnameTelphone-Number
配置ISDN:
router(config)#isdnswith-typeSwith-Type<
--配置ISDN交换机类型,中国使用basic-net3-->
配置FrameRelay:
router(config-if)#encapsulationframe-relay[cisco ietf]
router(config-if)#frame-relaylmi-type[ansi cisco q933a]
router(config-if)#bandwidthkilobits
router(config-if)#frame-relayinvers-arp[Protocol][dlci]
<
--配置静态InversARP表:
router(config)#frame-relayProtocolProtocol-AddressDLCI[Broadcast][ietf cisco][payload-compress packet-by-packet]
-->
--设置Keepalive间隔:
router(config-if)#keepaliveNumber
--为本地接口指定DLCI:
router(config-if)#frame-lelaylocal-dlciNumber
--子接口配置:
router(config-if)#interfaceTypePort.Subininterface-Number[multipoint point-to-point]
router(config-subif)#ipunnumberedInterface
router(config-subif)#frame-lelaylocal-dlciNumber
配置标准ACL:
router(config)#access-listAccess-List-Number[permit deny]source[source-mask]<
--Access-List-Number范围:
1~99标准ACL;
100~199扩展ACL;
800~899标准IPXACL;
900~999扩展IPXACL;
1000~1099IPXSAPACL;
600~699AppleTalkACL-->
router(config-if)#ipaccess-groupAccess-List-Number[in out]
配置扩展ACL:
router(config)#access-listAccess-List-Number[permit deny][Protocol Protocol-Number]sourcesource-wildcard[Source-Port]destinationdestination-wildcard[Destination-Port][established]
配置命名ACL:
router(config)#ipaccess-list[standard extended]ACL-Name
router(config[std- ext-]nacl)#[permit deny][IP-Access-List-Test-Conditions]
router(config[std- ext-]nacl)#no[permit deny][IP-Access-List-Test-Conditions]
router(config[std- ext-]nacl)#^z
router(config-if)#ipaccess-group[ACL-Name 1~199][in out]
配置DCE时钟:
router#showcontrollersTypePort<
--确定DCE接口-->
router(confin-if)#clockrate64000<
--进入DCE接口设置时钟速率-->
配置PPP协议:
router(config)#usernameNamepasswordSet-Password-Here<
--验证方建立数据库-->
router(config-if)#encapsulationppp<
--启动PPP协议-->
router(config-if)#pppouthentication[chap chappap papchap pap]<
--选择PPP认证-->
router(config-if)#ppppapsent-usernameNamepasswordPassword<
--发送验证信息-->
PAP单向认证配置实例:
验证方:
router-server(config)#usernameClientpassword12345<
router-server(config)#interfaceserial0
router-server(config-if)#encapsulationppp
router-server(config-if)#pppauthenticationpap<
--选择使用PAP实现PPP认证-->
router-server(config-if)#^z
被验证方:
router-client(config-if)#encapsulationppp
router-client(config-if)#ppppapsent-usernameClientpassword12345<
router-client(config-if)#^z
PAP双向认证配置实例:
路由器A:
routerA(config)#usernameBpassword12345
routerA(config)#interfaceserial0
routerA(config-if)#encapsulationppp
routerA(config-if)#pppauthenticationpap
routerA(config-if)#ppppapsent-usernameApassword54321
routerA(config-if)#^z
路由器B:
routerB(config)#usernameApassword54321
routerB(config)#interfaceserial1
routerB(config-if)#encapsulationppp
routerB(config-if)#pppauthenticationpap
routerB(config-if)#ppppapsent-usernameBpassword12345
routerB(config-if)#^z
CHAP单向认证配置实例:
router-server(config)#usernamerouter-clientpassword12345
router-server(config-if)#pppauthenticationchap
router-client(config-if)#encapsulation
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 熟练掌握 Cisco 路由器配置的预备知识 熟练 掌握 路由器 配置 预备 知识