路由器常用配置命令 - 范文中心

路由器常用配置命令

08/21

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


相关内容

  • ZXR10 T40G交换机安装与配置手册
    中兴ZXR T40G万兆路由交换机 安装手册 中国电信集团系统集成有限责任公司 2008年9月 目录 1. ZXR10 T40G 体系介绍 .................................................. ...
  • 太原理工网络实验报告
    <计算机网络B > 实验报告 专业班级:软件1316 学号: 2013005793 姓名:戴超 指导教师:林健 时间:2015年12月5日 实验1 Packet Trace 基本使用 一. 实验目的 掌握CiscoPacketT ...
  • 网络故障排查方法典型经验
    网络故障排查方法典型经验 类型:桌面终端 关键字:网络故障,排查办法 1.引言 作为网管,经常会接到各种故障报修电话,其实总结一下,这些电话的主要内容不外乎两点,一类是计算机问题,一类是网络问题.所以,公司网管要做的,也是主要从这两个方面入 ...
  • 计算机网络工程师笔试面试题汇总
    网路学员面试常见问题: 1.请你修改一下LINUX的视频驱动和声音驱动 答: redhatlinux中用sndconfig来设置声卡,如果没有某个模块,就需要重新编译内核(编译最新发布的linux 内核),如果还不行,只好用ALSA 音效驱 ...
  • 20**年网络管理员考试模拟题
    互联网专业设备维护人员 考试题库 中国铁通湖南分公司 二○○九年五月 目录 一.填空题 ........................................................ 3 二.单选题 ........... ...
  • 网络安全测评-于东升
    信息安全等级测评师培训 网络安全测评 公安部信息安全等级保护评估中心 于东升 1内容目录 1.前 言 2.检 查 范 围 3 .检 查 内 容 4 .现 场 测 评 步 骤 2标准概述 2007年43号文<信息安全等级保护管理办法&g ...
  • 电脑查询系统的各种命令
    分享到i 贴吧 添加到搜藏 已解决 电脑查询系统的各种命令 悬赏分:0 - 解决时间:2007-9-1 17:13 跪求 提问者: 海港love 明 - 一级 最佳答案 winver---------检查Windows 版本 wmimgmt ...
  • 华为路由器命令
    华为华为路由器交换机配置命令大全 一.计算机命令 PCAlogin:root 使用root用户 password:linux 口令是linux #shutdown-hnow 关机 #init 0 关机 #logout 用户注销 #login ...
  • 基于RaspberryPi实现的智能家居
    摘 要 本文以树莓派为载体进行智能家居控制器的设计.在对现在三种市面上的网络电视的比较中引出毕设的主角--树莓派.首先是LINUX 系统常识性的介绍:然后是在ARM/LINUX平台上面开发应用的两种方法:调用系统已有资源.做程序(C 经典法 ...