路由器常用配置命令

Cisco路由器常用配置命令汇总

启动接口,分配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路由协议:30秒更新一次

router(config)# router rip

router(config-if)# network Network-Number router(config-if)# ^z

配置IGRP路由协议:90秒更新一次

router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# ^z

配置Novell IPX路由协议:Novell RIP 60秒更新一次

router(config)# ipx routing [node address]

router(config)# ipx maximum-paths Paths

router(config)# interface Type Port

router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary]

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

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 ]

router(config)# frame-relay Protocol Protocol-Address DLCI

[ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ] -->

router(config-if)# keepalive Number

-->

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 ]

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

router(confin-if)# clock rate 64000 router(config-if)# ^z

配置PPP协议:

router(config)# username Name password Set-Password-Here

router(config)# interface Type Port

router(config-if)# encapsulation ppp

router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ]

router(config-if)# ppp pap sent-username Name password Password

router(config-if)# ^z

PAP单向认证配置实例:

验证方:

router-server(config)# username Client password 12345

router-server(config)# interface serial 0

router-server(config-if)# encapsulation ppp

router-server(config-if)# ppp authentication pap

router-server(config-if)# ^z

被验证方:

router-client(config-if)# encapsulation ppp

router-client(config-if)# ppp pap sent-username Client password 12345

router-client(config-if)# ^z

PAP双向认证配置实例:

路由器 A:

routerA(config)# username B password 12345

routerA(config)# interface serial 0

routerA(config-if)# encapsulation ppp

routerA(config-if)# ppp authentication pap

routerA(config-if)# ppp pap sent-username A password 54321 routerA(config-if)# ^z

路由器 B:

routerB(config)# username A password 54321

routerB(config)# interface serial 1

routerB(config-if)# encapsulation ppp

routerB(config-if)# ppp authentication pap

routerB(config-if)# ppp pap sent-username B password 12345 routerB(config-if)# ^z

CHAP单向认证配置实例:

验证方:

router-server(config)# username router-client password 12345 router-server(config)# interface serial 0

router-server(config-if)# encapsulation ppp

router-server(config-if)# ppp authentication chap

router-server(config-if)# ^z

被验证方:

router-client(config-if)# encapsulation ppp

router-client(config-if)# ppp authentication chap

router-client(config-if)# ppp chap hostname router-client router-client(config-if)# ppp chap password 12345

router-client(config-if)# ^z

CHAP双向认证配置实例:

路由器 A:

routerA(config)# username routerB password 12345

routerA(config)# interface serial 0

routerA(config-if)# encapsulation ppp

routerA(config-if)# ppp authentication chap

routerA(config-if)# ppp chap hostname routerA

routerA(config-if)# ppp chap password 54321

routerA(config-if)# ^z

路由器 B:

routerB(config)# username routerA password 54321

routerB(config)# interface serial 1

routerB(config-if)# encapsulation ppp

routerB(config-if)# ppp authentication chap

routerB(config-if)# ppp chap hostname routerB

routerB(config-if)# ppp chap password 12345

routerB(config-if)# ^z

Telnet使用:

routerA# terminal monitor

routerA# telnet IP-Address [ Router-Name ]

routerB# [ exit | logout ]

routerB# ++再按

routerA# show sessions

Connect-Number -->

routerA# Connect-Number

routerA# disconnect IP-Address [ Router-Name ]

routerA# show user

routerA# clear line [ 0 | 1 | 2 | 3 | 4 ]

禁止任何Telnet到本机:

router(config)# line vty 0 4

router(config-line)# access-class ACL-Number

router(config)# ^z

设置主机名:

router(config)# hostname Set-Hostname

router(config)# ^z

router(config)# ^z

设置用户模式密码:

router(config)# line console 0

router(config-line)# login

router(config-line)# password Set-Password

router(config-line)# ^z

设置Telnet密码:

router(config)# line vty 0 4

router(config-line)# login

router(config-line)# password Set-Password

router(config-line)# ^z

设置特权模式密码:

router(config)# enable password Set-Password

router(config)# enable secret Set-Password router(config)# ^z

给所有密码加密:

router(config)# service password-ancryption Set-Password-Here router(config)# no service password-ancryption router(config)# ^z

设置登录Banner:

router(config)# banner motd 分隔符 Set-Banner-InFORMation-Here 分隔符

设置接口的描述信息:

router(config-if)# description Set-Port-InFORMation-Here

router(config)# ^z

CDP的控制:

router(config-if)# cdp enable router(config-if)# no cdp enable router(config)# cdp run

router(config)# no cdp run

Ping的使用:

router# ping IP-Address

router# ping

Protocol :[ Protocol-Type ]

Target IP address:IP-Address

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:y

Sweep range of sizes [n]:

Tracke的使用:

router# trace IP-Address [ Host-Name ]

为Cisco 4000路由器指定媒体类型:

router(config-if)# media-type 10baset

router(config-if)# ^z

Cisco路由器常用配置命令汇总

启动接口,分配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路由协议:30秒更新一次

router(config)# router rip

router(config-if)# network Network-Number router(config-if)# ^z

配置IGRP路由协议:90秒更新一次

router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# ^z

配置Novell IPX路由协议:Novell RIP 60秒更新一次

router(config)# ipx routing [node address]

router(config)# ipx maximum-paths Paths

router(config)# interface Type Port

router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary]

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

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 ]

router(config)# frame-relay Protocol Protocol-Address DLCI

[ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ] -->

router(config-if)# keepalive Number

-->

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 ]

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

router(confin-if)# clock rate 64000 router(config-if)# ^z

配置PPP协议:

router(config)# username Name password Set-Password-Here

router(config)# interface Type Port

router(config-if)# encapsulation ppp

router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ]

router(config-if)# ppp pap sent-username Name password Password

router(config-if)# ^z

PAP单向认证配置实例:

验证方:

router-server(config)# username Client password 12345

router-server(config)# interface serial 0

router-server(config-if)# encapsulation ppp

router-server(config-if)# ppp authentication pap

router-server(config-if)# ^z

被验证方:

router-client(config-if)# encapsulation ppp

router-client(config-if)# ppp pap sent-username Client password 12345

router-client(config-if)# ^z

PAP双向认证配置实例:

路由器 A:

routerA(config)# username B password 12345

routerA(config)# interface serial 0

routerA(config-if)# encapsulation ppp

routerA(config-if)# ppp authentication pap

routerA(config-if)# ppp pap sent-username A password 54321 routerA(config-if)# ^z

路由器 B:

routerB(config)# username A password 54321

routerB(config)# interface serial 1

routerB(config-if)# encapsulation ppp

routerB(config-if)# ppp authentication pap

routerB(config-if)# ppp pap sent-username B password 12345 routerB(config-if)# ^z

CHAP单向认证配置实例:

验证方:

router-server(config)# username router-client password 12345 router-server(config)# interface serial 0

router-server(config-if)# encapsulation ppp

router-server(config-if)# ppp authentication chap

router-server(config-if)# ^z

被验证方:

router-client(config-if)# encapsulation ppp

router-client(config-if)# ppp authentication chap

router-client(config-if)# ppp chap hostname router-client router-client(config-if)# ppp chap password 12345

router-client(config-if)# ^z

CHAP双向认证配置实例:

路由器 A:

routerA(config)# username routerB password 12345

routerA(config)# interface serial 0

routerA(config-if)# encapsulation ppp

routerA(config-if)# ppp authentication chap

routerA(config-if)# ppp chap hostname routerA

routerA(config-if)# ppp chap password 54321

routerA(config-if)# ^z

路由器 B:

routerB(config)# username routerA password 54321

routerB(config)# interface serial 1

routerB(config-if)# encapsulation ppp

routerB(config-if)# ppp authentication chap

routerB(config-if)# ppp chap hostname routerB

routerB(config-if)# ppp chap password 12345

routerB(config-if)# ^z

Telnet使用:

routerA# terminal monitor

routerA# telnet IP-Address [ Router-Name ]

routerB# [ exit | logout ]

routerB# ++再按

routerA# show sessions

Connect-Number -->

routerA# Connect-Number

routerA# disconnect IP-Address [ Router-Name ]

routerA# show user

routerA# clear line [ 0 | 1 | 2 | 3 | 4 ]

禁止任何Telnet到本机:

router(config)# line vty 0 4

router(config-line)# access-class ACL-Number

router(config)# ^z

设置主机名:

router(config)# hostname Set-Hostname

router(config)# ^z

router(config)# ^z

设置用户模式密码:

router(config)# line console 0

router(config-line)# login

router(config-line)# password Set-Password

router(config-line)# ^z

设置Telnet密码:

router(config)# line vty 0 4

router(config-line)# login

router(config-line)# password Set-Password

router(config-line)# ^z

设置特权模式密码:

router(config)# enable password Set-Password

router(config)# enable secret Set-Password router(config)# ^z

给所有密码加密:

router(config)# service password-ancryption Set-Password-Here router(config)# no service password-ancryption router(config)# ^z

设置登录Banner:

router(config)# banner motd 分隔符 Set-Banner-InFORMation-Here 分隔符

设置接口的描述信息:

router(config-if)# description Set-Port-InFORMation-Here

router(config)# ^z

CDP的控制:

router(config-if)# cdp enable router(config-if)# no cdp enable router(config)# cdp run

router(config)# no cdp run

Ping的使用:

router# ping IP-Address

router# ping

Protocol :[ Protocol-Type ]

Target IP address:IP-Address

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:y

Sweep range of sizes [n]:

Tracke的使用:

router# trace IP-Address [ Host-Name ]

为Cisco 4000路由器指定媒体类型:

router(config-if)# media-type 10baset

router(config-if)# ^z


相关文章

  • 思科路由登陆方式及常用命令
  • telnet 你的路由器地址 然后输入密码,一般为CISCO , 然后ENA ,输入密码CISCO 这样就进到了特权模式了, CONF T 回车 进入配置模式, 想配置什么就在这里配置好了. 顺便给你点命令吧 思科命令大全 Access-e ...查看


  • CISCO路由器常用命令
  • CISCO 路由器常用命令 做为网管这一项是必备的技能 有些命令让许多朋友记得头痛 我就分批次贴在这儿吧 忘了可以上来看看:) 一.如何登陆到路由器 可以用终端通过console连接,也可以通过TCP/IP来连接例: c:\>teln ...查看


  • 路由器命令使用.端口配置和静态路由配置实验报告
  • 实验三 路由器命令使用.端口配置和静态路由配置 [实验类型]验证性实验 [实验时间]2学时. [背景描述] 学校两个校区各是一个独立的局域网,为了能共享资源,每个校区出口利用一台路由器进行连接,两台路由器间申请了一条2M的DDN专线进行相连 ...查看


  • 技巧:几个简单测试网络的常用命令
  • 看下面的几个网络测试命令,了解和掌握它们将会有助于你更好地使用和维护网络. Ping命令 用来测试一帧数据从一台主机传输到另一台主机所需的时间,从而判断主响应时间.该命令主要是用来检查路由是否能够到达,由于该命令的包长非常小,所以在网上传递 ...查看


  • 计算机网络实验报告
  • 实验题目 一. Windows 常用网络设置与网络命令 一. 实验目的 学习在Windows 系统中进行网络配置.用ping ipconfig/winipcfg命令工具来进行网络测试.使用tracert 路由跟踪命令.使用netstat . ...查看


  • 企业网络搭建与维护课程标准
  • <企业网络搭建与维护>课程标准 一.课程性质与任务 本课程是中职计算机应用专业的一门工作项目课程.主要任务是使学生掌握计算机网络技术的基础知识和基本技能,了解计算机网络技术的发展趋势,培养其创新精神.创业能力.实践能力,使之成为 ...查看


  • ZXR10 T40G交换机安装与配置手册
  • 中兴ZXR T40G万兆路由交换机 安装手册 中国电信集团系统集成有限责任公司 2008年9月 目录 1. ZXR10 T40G 体系介绍 .................................................. ...查看


  • 天融信防火墙NGFW4000配置手册
  • 天融信防火墙NGFW4000快速配置手册 目 录 一. 防火墙的几种管理方式 . ............................................................................... ...查看


  • 网络常见故障维修
  • 网络常见故障处理方法 1. 网络突然中断 网卡IP 地址的设置错误 右键点击网上邻居,在弹开菜单中选择属性,然后继续右键点击本地网络,在 弹开菜单中选择属性,进入本地连接属性栏,之后双击INTERNET 协议( TCP/IP), 可才看到自 ...查看


  • 实训总结模版
  • 佛山科学技术学院 实训总结 实训项目(实践教学环节) 组建局域网 专业班级 10教技3 姓名 梁夏 学号 2010914328 指导教师 王玉龙 成绩 日期 2009-12-16 实训总结的内容:一.实训目的:二.实训内容:三.实训过程:四 ...查看


热门内容