思科路由器基本配置與常用配置命令(simple for CCNA)
本文針對實際操作問題,詳細的給大家羅列出思科路由器基本的配置和常用的配置命令,相信看過此文會對你有所幫助。
啟動接口,分配IP地址:
router>
router> enable
router#
router# configure terminal
router(config)#
router(config)# interface Type Port
router(config-if)# no shutdown
router(config-if)# ip address IP-Address Subnet-Mask
router(config-if)# ^z
配置RIP路由協(xié)議:30秒更新一次
router(config)# router rip
router(config-if)# network Network-Number <--通告標準A,B,C類網(wǎng)-->
router(config-if)# ^z
配置IGRP路由協(xié)議:90秒更新一次
router(config)# router igrp AS-Number <-- AS-Number范圍1~65535-->
router(config-if)# network Network-Number <--通告標準A,B,C類網(wǎng)-->
router(config-if)# ^z配置Novell IPX路由協(xié)議:Novell RIP 60秒更新一次
router(config)# ipx routing [node address]
router(config)# ipx maximum-paths Paths <--設置負載平衡,范圍1~512-->
router(config)# interface Type Port
router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <--通告標準A,B,C類網(wǎng)-->
router(config-if)# ^z配置DDR:
router(config)# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number]
router(config)# interface bri 0
router(config-if)# dialer-group Group-Number
router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number
router(config-if)# ^z配置ISDN:
router(config)# isdn swith-type Swith-Type <--配置ISDN交換機類型,中國使用basic-net3-->
router(config-if)# ^z
配置Frame Relay:
router(config-if)# encapsulation frame-relay [cisco | ietf ]
router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ]
router(config-if)# bandwidth kilobits
router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]
<--配置靜態(tài)Invers ARP表:
router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ]
-->
<--設置Keepalive間隔:
router(config-if)# keepalive Number
-->
<--為本地接口指定DLCI:
router(config-if)# frame-lelay local-dlci Number
-->
<--子接口配置:
router(config-if)# interface Type Port.Subininterface-Number [ multipoint | point-to-point ]
router(config-subif)# ip unnumbered Interface
router(config-subif)# frame-lelay local-dlci Number
-->
router(config-if)# ^z配置標準ACL:
router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] <-- Access-List-Number 范圍:1~99標準ACL;100~199擴展ACL;800~899標準IPX ACL;900~999擴展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL-->
router(config)# interface Type Port
router(config-if)# ip access-group Access-List-Number [ in | out ]
router(config-if)# ^z配置擴展ACL:
router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]
router(config)# interface Type Port
router(config-if)# ip access-group Access-List-Number [ in | out ]
router(config-if)# ^z配置命名ACL:
router(config)# ip access-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)# interface Type Port
router(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]
router(config-if)# ^z配置DCE時鐘:
router# show controllers Type Port <--確定DCE接口-->
router(confin-if)# clock rate 64000 <--進入DCE接口設置時鐘速率-->
router(config-if)# ^z配置PPP協(xié)議:
router(config)# username Name password Set-Password-Here <--驗證方建立數(shù)據(jù)庫-->
router(config)# interface Type Port
router(config-if)# encapsulation ppp <--啟動PPP協(xié)議-->
router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <--選擇PPP認證-->
router(config-if)# ppp pap sent-username Name password Password <--發(fā)送驗證信息-->
router(config-if)# ^zPAP單向認證配置實例:
驗證方:
router-server(config)# username Client password 12345 <--驗證方建立數(shù)據(jù)庫-->
router-server(config)# interface serial 0
router-server(config-if)# encapsulation ppp
router-server(config-if)# ppp authentication pap <--選擇使用PAP實現(xiàn)PPP認證-->
router-server(config-if)# ^z
被驗證方:
router-client(config-if)# encapsulation ppp
router-client(config-if)# ppp pap sent-username Client password 12345 <--發(fā)送驗證信息-->
router-client(config-if)# ^zPAP雙向認證配置實例:
【編輯推薦】