路由器命令.docx

上传人:b****2 文档编号:11757560 上传时间:2023-06-02 格式:DOCX 页数:8 大小:16.25KB
下载 相关 举报
路由器命令.docx_第1页
第1页 / 共8页
路由器命令.docx_第2页
第2页 / 共8页
路由器命令.docx_第3页
第3页 / 共8页
路由器命令.docx_第4页
第4页 / 共8页
路由器命令.docx_第5页
第5页 / 共8页
路由器命令.docx_第6页
第6页 / 共8页
路由器命令.docx_第7页
第7页 / 共8页
路由器命令.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

路由器命令.docx

《路由器命令.docx》由会员分享,可在线阅读,更多相关《路由器命令.docx(8页珍藏版)》请在冰点文库上搜索。

路由器命令.docx

路由器命令

路由器命令

router>用户模式

1:

进入特权模式enable

router>enable

router#

2:

进入全局配置模式configureterminal

router>enable

router#configureterminal

router(conf)#

3:

交换机命名hostnameroutera以routerA为例

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routera(conf)#

4:

配置使能口令enablepasswordcisco以cisco为例

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#enablepasswordcisco

5:

配置使能密码enablesecretciscolab以cicsolab为例

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#enablesecretciscolab

6:

进入路由器某一端口interfacefastehernet0/17以17端口为例

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#interfacefastehernet0/17

routerA(conf-if)#

进入路由器的某一子端口interfacefastethernet0/17.1以17端口的1子端口为例

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#interfacefastehernet0/17.1

7:

设置端口ip地址信息

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#interfacefastehernet0/17以17端口为例

routerA(conf-if)#ipaddress192.168.1.1255.255.255.0配置交换机端口ip和子网掩码

routerA(conf-if)#noshut是配置处于运行中

routerA(conf-if)#exit

8:

查看命令show

router>enable

router#showversion察看系统中的所有版本信息

showinterfacevlan1查看交换机有关ip协议的配置信息

showrunning-configure查看交换机当前起作用的配置信息

showinterfacefastethernet0/1察看交换机1接口具体配置和统计信息

showmac-address-table查看mac地址表

showmac-address-tableaging-time查看mac地址表自动老化时间

showcontrollersserial+编号查看串口类型

showiprouter查看路由器的路由表

9:

cdp相关命令

router>enable

router#showcdp查看设备的cdp全局配置信息

showcdpinterfacefastethernet0/17查看17端口的cdp配置信息

showcdptraffic查看有关cdp包的统计信息

showcdpnerghbors列出与设备相连的cisco设备

10:

csico2600的密码恢复

重新启动路由器,在启动过程中按下win+break键,使路由器进入rommonitor

在提示符下输入命令修改配置寄存器的值,然后重新启动路由器

remmon1>confreg0x2142

remmon2>reset

重新启动路由器后进入setup模式,选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中,为使路由器恢复密码后配置不变把startup-config中配置保存到running-config中,然后重新设置enable密码,并把配置寄存器改回0x2102:

router>enable

router#copystartup-configrunning-config

router#configureterminal

router(conf)#enablepasswordcisco

router(conf)#config-register0x2102

保存当前配置到startup-config,重新启动路由器。

router#copyrunning-configstartup-config

router#reload

11:

路由器telnet远程登录设置:

router>en

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#enablepasswordcisco以cisco为特权模式密码

routerA(conf)#interfacefastethernet0/1以17端口为telnet远程登录端口

routerA(conf-if)#ipaddress192.168.1.1255.255.255.0

routerA(conf-if)#noshut

routerA(conf-if)#exit

routerA(conf)linevty04设置0-4个用户可以telnet远程登陆

routerA(conf-line)#login

routerA(conf-line)#passwordedge以edge为远程登录的用户密码

主机设置:

ip192.168.1.2主机的ip必须和交换机端口的地址在同一网络段

netmask255.255.255.0

gate-way192.168.1.1网关地址是交换机端口地址

运行:

telnet192.168.1.1

进入telnet远程登录界面

password:

edge

routera>en

password:

cisco

routera#

12:

配置路由器的标识banner$……………$

在全局配置的模式下利用“banner”命令可以配置路由器的提示信息,所有连接到路由器的终端都会收到。

router>en

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#bannermotd$Thisisaptechcompany’router!

Pleasedon’tchangetheconfigurationwithoutpermission!

$13:

配置接口标识description………

接口标识用于区分路由器的各个接口。

router>en

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#interfacefastethernet0/1以0/1接口为例

routerA(conf-if)#descriptionthisisafastEthernetportusedtoconnectingthecompany’sintranet!

14:

配置超时

超时适用于设置在多长时间没有对console进行配置,自动返回exec会话时间。

默认为10分钟。

router>en

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#lineconsole0

routerA(conf-if)#exec-timeout00第一个“0”代表分钟,第二个“0”代表秒

15:

配置串口参数

两台路由器通过串口连接需要一个做为DTE,一个做为DCE。

DCE设备要向DTE设备提供时钟频率和带宽。

DCE配置:

router>en

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#interfaceserial0/0

routerA(conf_if)#clockrate64000提供时钟频率为64000

routerA(conf_if)#bandwidth64提供带宽为64

DTE配置:

路由器串口配置ip地址

router>en

router#configureterminal

router(conf)#hostnamerouterB

routerB(conf)#interfaceserial0/0

routerB(conf_if)#ipaddress192.168.1.1255.255.255.0

16:

静态路由的配置

配置路由器A的主机名和接口参数

router>enable

router#configureterminal

router(conf)#hostnamerouterA

routerA(conf)#interfacefastethernet0/1路由器A的1端口为两路由器的连接端口

routerA(conf-if)#ipaddress192.168.2.1255.255.255.0

routerA(conf-if)#noshutdown

routerA(conf-if)#exit

routerA(conf)#interfacefastethernet0/0路由器A的0端口为与主机的连接端口

routerA(conf-if)#ipaddress192.168.1.2255.255.255.0

routerA(conf-if)#noshutdown

主机A的ip地址为192.168.1.1

255.255.255.0

192.168.1.2

配置路由器B的主机名和接口参数

router>enable

router#configureterminal

router(conf)#hostnamerouterB

routerB(conf)#interfacefastethernet0/0路由器B的0端口为两路由器的连接端口

routerB(conf-if)#ipaddress192.168.2.2255.255.255.0

routerB(conf-if)#noshutdown

routerB(conf-if)#exit

routerB(conf)#interfacefastethernet0/1路由器B的1端口为与主机的连接端口

routerB(conf-if)#ipaddress192.168.3.1255.255.255.0

主机B的ip地址为192.168.3.2

255.255.255.0

192.168.3.1

配置路由器A的静态路由表

routerA(conf)#iprouter192.168.3.0255.255.255.0192.168.2.2

配置路由器B的静态路由表

routerA(conf)#iprouter192.168.1.0255.255.255.0192.168.2.1

在routerA和routerB上配置默认路由

routerA(conf)#iproute0.0.0.00.0.0.0192.168.2.2

routerA(conf)#ipclassless

routerB(conf)#iproute0.0.0.00.0.0.0192.168.2.1

routerB(conf)#ipclassless

在routerA和routerB上配置动态路由(RIP)

routerA(conf)#routerrip

routerA(conf)#network192.168.1.0

routerA(conf)#network192.168.2.0

routerB(conf)#routerrip

routerB(conf)#network192.168.2.0

routerB(conf)#network192.168.3.0

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2