|
楼主 |
发表于 2006-2-21 20:15:56
|
显示全部楼层
来自:福建宁德
<STRONG>CISCO路由器配置<BR><BR></STRONG>Cisco 路由配置语句汇总 <BR><BR>启动接口,分配IP地址: <BR>router> <BR>router> enable <BR>router# <BR>router# configure terminal <BR>router(config)# <BR>router(config)# interface Type Port <BR>router(config-if)# no shutdown <BR>router(config-if)# ip address IP-Address Subnet-Mask <BR>router(config-if)# ^z <BR><BR>配置RIP路由协议:30秒更新一次 <BR>router(config)# router rip <BR>router(config-if)# network Network-Number <--通告标准A,B,C类网--> <BR>router(config-if)# ^z <BR><BR>配置IGRP路由协议:90秒更新一次 <BR>router(config)# router igrp AS-Number <-- AS-Number范围1~65535--> <BR>router(config-if)# network Network-Number <--通告标准A,B,C类网--> <BR>router(config-if)# ^z <BR><BR>配置Novell IPX路由协议:Novell RIP 60秒更新一次 <BR>router(config)# ipx routing [node address] <BR>router(config)# ipx maximum-paths Paths <--设置负载平衡,范围1~512--> <BR>router(config)# interface Type Port <BR>router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <--通告标准A,B,C类网--> <BR>router(config-if)# ^z <BR><BR>配置DDR: <BR>router(config)# dialer-list Group-Number protocol Protocol-Type permit[list ACL-Number] <BR>router(config)# interface bri 0 <BR>router(config-if)# dialer-group Group-Number <BR>router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number <BR>router(config-if)# ^z <BR><BR>配置ISDN: <BR>router(config)# isdn swith-type Swith-Type <--配置ISDN交换机类型,中国使用basic-net3--> <BR>router(config-if)# ^z <BR><BR><BR><BR><BR>配置Frame Relay: <BR>router(config-if)# encapsulation frame-relay [cisco | ietf ] <BR>router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] <BR>router(config-if)# bandwidth kilobits <BR>router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ] <BR><--配置静态Invers ARP表: <BR>router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ] <BR>--> <BR><--设置Keepalive间隔: <BR>router(config-if)# keepalive Number <BR>--> <BR><--为本地接口指定DLCI: <BR>router(config-if)# frame-lelay local-dlci Number <BR>--> <BR><--子接口配置: <BR>router(config-if)# interface Type Port.Subininterface-Number [ multipoint | point-to-point ] <BR>router(config-subif)# ip unnumbered Interface <BR>router(config-subif)# frame-lelay local-dlci Number <BR>--> <BR>router(config-if)# ^z <BR><BR>配置标准ACL: <BR>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--> <BR>router(config)# interface Type Port <BR>router(config-if)# ip access-group Access-List-Number [ in | out ] <BR>router(config-if)# ^z <BR><BR>配置扩展ACL: <BR>router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ] <BR>router(config)# interface Type Port <BR>router(config-if)# ip access-group Access-List-Number [ in | out ] <BR>router(config-if)# ^z <BR><BR>配置命名ACL: <BR>router(config)# ip access-list [ standard | extended ] ACL-Name <BR>router(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-List-Test-Conditions ] <BR>router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Access-List-Test-Conditions ] <BR>router(config [ std- | ext- ] nacl)# ^z <BR>router(config)# interface Type Port <BR>router(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ] <BR>router(config-if)# ^z <BR><BR>配置DCE时钟: <BR>router# show controllers Type Port <--确定DCE接口--> <BR>router(confin-if)# clock rate 64000 <--进入DCE接口设置时钟速率--> <BR>router(config-if)# ^z <BR><BR>配置PPP协议: <BR>router(config)# username Name password Set-Password-Here <--验证方建立数据库--> <BR>router(config)# interface Type Port <BR>router(config-if)# encapsulation ppp <--启动PPP协议--> <BR>router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <--选择PPP认证--> <BR>router(config-if)# ppp pap sent-username Name password Password <--发送验证信息--> <BR>router(config-if)# ^z <BR><BR>PAP单向认证配置实例: <BR>验证方: <BR>router-server(config)# username Client password 12345 <--验证方建立数据库--> <BR>router-server(config)# interface serial 0 <BR>router-server(config-if)# encapsulation ppp <BR>router-server(config-if)# ppp authentication pap <--选择使用PAP实现PPP认证--> <BR>router-server(config-if)# ^z <BR>被验证方: <BR>router-client(config-if)# encapsulation ppp <BR>router-client(config-if)# ppp pap sent-username Client password 12345 <--发送验证信息--> <BR>router-client(config-if)# ^z <BR><BR>PAP双向认证配置实例: <BR>路由器 A: <BR>routerA(config)# username B password 12345 <BR>routerA(config)# interface serial 0 <BR>routerA(config-if)# encapsulation ppp <BR>routerA(config-if)# ppp authentication pap <BR>routerA(config-if)# ppp pap sent-username A password 54321 <BR>routerA(config-if)# ^z <BR>路由器 B: <BR>routerB(config)# username A password 54321 <BR>routerB(config)# interface serial 1 <BR>routerB(config-if)# encapsulation ppp <BR>routerB(config-if)# ppp authentication pap <BR>routerB(config-if)# ppp pap sent-username B password 12345 <BR>routerB(config-if)# ^z <BR><BR><BR><BR>CHAP单向认证配置实例: <BR>验证方: <BR>router-server(config)# username router-client password 12345 <BR>router-server(config)# interface serial 0 <BR>router-server(config-if)# encapsulation ppp <BR>router-server(config-if)# ppp authentication chap <BR>router-server(config-if)# ^z <BR> |
|