配置路由器需要知道的命令_路由器的配置命令大全

2020-02-28 其他范文 下载本文

配置路由器需要知道的命令由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“路由器的配置命令大全”。

基础实验

语法:

在特权模式下设置路由器时间:

Router#clock set {hh:mm: day month year}

解释:

路由器本地的时间标识。

配置实例:

Router#clock set 15:50:43 9 May 2009

Router #

*May 9 15:50:43.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 08:

11:06 UTC Sat May 9 2009 to 15:50:43 UTC Sat May 9 2009, configured from console

by console.Router #show clock

15:54:00.867 UTC Sat May 9 2009

Router #conf t

实验1.13 设置空闲超时

目标:

熟练掌握如何设置空闲超时时间

设备需求:

Cisco 1841 路由器一台

用配置线连接PC机的串口和路由器的Console口。

语法:

1. 从全局配置模式进入线路配置模式,进入控制台口线路: Router(config)#line console {number} 2. 启用光标跟随:

Router(config-line)#logging synchronous 3.设置当键盘多少时间内无动作,自动被路由器弹出到用户模式以外,即退出,如果设置为0分0秒代表永不超时:

Router(config-line)#exec-timeout {minute} {second} 解释:

所谓光标跟随,是指当我们在输入命令的时候,不会被一些日志信息或debug命令产生的调试命令所冲断。缺省模式该特性是没有启用的。

配置实例一

Router(config)#exit

Router #

May 9 15:58:36.795: %SYS-5-CONFIG_I: Configured from consol

Router #conf t

Enter configuration commands, one per line.End with CNTL/Z.Router(config)#line console 0

Router(config-line)#logging synchronous

Router(config-line)#end

Router #

May 9 15:59:39.399: %SYS-5-CONFIG_I: Configured from console by console

Router #conf t

Router #conf terminal

Enter configuration commands, one per line.End with CNTL/Z.配置实例二

Router #show clock

16:01:18.251 UTC Sat May 9 2009

Router #conf t

Enter configuration commands, one per line.End with CNTL/Z.Router(config)#line console 0

Router(config-line)#exec-timeout 20 0

Router(config-line)#end

Router #

May 9 16:01:52.499: %SYS-5-CONFIG_I: Configured from console by console

Router #show clock

16:02:20.331 UTC Sat May 9 2009

Router #

Router # exit Router con0 is now available Pre RETURN to get started.Router>

实验1.1.4 标语与描述

目标:

熟练掌握如何为路由器设置标语信息和描述信息。

设备需求:

Cisco 1841路由器一台。

用配置线连接PC机的串口和路由器的Console口。

语法:

1. 进入全局配置模式,设置标语信息: Router(config)#banner motd # {text} # 2. 进入接口配置模式:

Router(config-if)#interface {type} {number} 3. 为路由器接口设置描述信息: Router(config-if)#description {text}

解释:

在设置标语信息的时候,以#号做为分隔符,并按下回车键。描述语句的本地的一个标识,它只在本地可见,并且Cisco IOS 执行命令的时候会跳过它。

配置实例一

Router #conf t

Enter configuration commands, one per line.End with CNTL/Z.Router(config)#banner motd #

Enter TEXT meage.End with the character '#'.Hello!

#

Router(config)#end

Router #

May 9 16:08:21.787: %SYS-5-CONFIG_I: Configured from console by console

Router #exit Router con0 is now available Pre RETURN to get started.Hello!

Router>

配置实例二 Router >en

Paword:

Router #conf t

Enter configuration commands, one per line.End with CNTL/Z.Router(config)#interface fastethernet0/0 Router(config-if)#description LAN Sales Router(config-if)#end Router # May 9 16:11:14.779: %SYS-5-CONFIG_I: Configured from console by console Router #show running-config interface fastEthernet0/0 Building configuration...Current configuration : 135 bytes!interface FastEthernet0/0 description LAN Sales ip addre 192.168.2.1 255.255.255.0 speed auto half-duplex no mop enabled end

实验1.1.5 特权模式口令

目标:

熟练掌握如何为路由器特权模式设置密码。

设备要求:

Cisco 1841 路由器一台。

用配置线连接PC机串口和路由器的Console口。

语法:

进入全局配置模式,设置密码:

Router(config)#enable {paword | secret} {paword}

解释:

两种密码的区别在于,前者是一些低版本 Cisco IOS 软件的认证方式,并且密码是基于文明的;后者是目前Cisco IOS 软件最常用的认证方式,它基于MD5加密的。如果同时设置了两种认证方式,他们的口令必须不一样。但是,我们推荐使用后者进行认证,并且如果同时设置了两种认证方式,只有后者生效。密码区分大小。

配置实例:

Router #conf t

Enter configuration commands, one per line.End with CNTL/Z.Router(config)#enable paword Router

Router(config)#enable secret Router

The enable secret you have chosen is the same as your enable paword.This is not recommended.Re-enter the enable secret.Router(config)#enable secret cisco

Router(config)#exit

Router #

May 9 16:21:50.403: %SYS-5-CONFIG_I: Configured from console by console

Router #exit

Router con0 is now available Pre RETURN to get started.Router >enable

Paword:

Router #show running-config

Building configuration...Current configuration : 1189 bytes!

!Last configuration change at 16:21:50 UTC Sat May 9 2009!

version 12.3

service timestamps debug datetime msec

service timestamps log datetime msec

no service paword-encryption!

hostname R1!

boot-start-marker boot-end-marker!enable secret 5 $1$u3Hk$hMxVJeG6x9fR1ebFWE7N40 enable paword Router!--More--

实验1.1.6 远程登陆及其余模式口令

目标:

熟练掌握如何为路由器各个配置模式设密码。

设备需求:

Cisco 1841 路由器一台。

用配置线连接PC机的串口和路由器的Console 口。

语法:

1.从全局配置模式进入线路配置模式,进入控制台口线路:

Router(config)#line {console | aux | vty}{start-number}[ens-number] 2.设置密码:

Router(config-line)#paword {paword} 3.启用登陆:

Router(config-line)#login

解释:

当设置密码之后,如果不启用登陆命令,退出之后,路由器是不会提示输入密码的。控制台线路密码为控制台线路所用;辅接口(AUX)线路密码为辅助接口线路所用;虚拟终端(VTY)是为 telnet 会话所用,路由根据Cisco IOS 软件版本不同,支持多条VTY会话数目也不同。所有密码是以文明方式保存在DRAM(running-config)文件里的。

配置实例:

Router(config)#line console 0

Router(config-line)#paword cisco

Router(config-line)#login

Router(config)#line aux 0

Router(config-line)#paword cisco

Router(config-line)#login

Router(config-line)#exit

Router(config)#line vty 0 4

Router(config-line)#paword cisco

Router(config-line)#login

Router(config-line)#end

Router #exi

May 9 16:26:40.791: %SYS-5-CONFIG_I: Configured from console by console

Router #exit

Router con0 is now available Pre RETURN to get started.User Acce Verification Paword: Router >

实验1.1.7 关闭DNS查询

目标:

熟练掌握如何为路由器关闭DNS查询功能。

设备需求:

Cisco 1841 路由器一台。

用配置线连接PC机的串口和路由器的Console 口。

语法:

全局配置模式下,关闭DNS查询功能: Router(config)#no ip domain lookup

解释:

默认情况下,路由器的DNS查询是启用的,即当你错误的输入一条 Cisco IOS 软件无法识别的命令的时候,路由器会把这个命令当作主机名,然后向DNS服务器进行查询。一般实验性的环境中,如果我们没有DNS服务器,因为输入错误的命令而造成无用的查询,是非常耗时的。因此我们可以关闭这一功能。

配置实例:

R1#Router

Translating “Router”...domain server(255.255.255.255)

Translating “Router”...domain server(255.255.255.255)

Translating “Router”...domain server(255.255.255.255)

% Unknown command or computer name, or unable to find computer addre

Router #configure terminal Enter configuration commands, one per line.End with CNTL/Z.Router(config)#no ip domain lookup Router(config)#end Router # May 9 16:30:29.163: %SYS-5-CONFIG_I: Configured from console by console Router #Router Translating “Router” % Unknown command or computer name, or unable to find computer addre Router #

教学—路由器基本配置命令

1、路由器模式的转换:用户模式: router> 权限低,只能查看,输入“enable ”命令进入到特权模式特权模式: router#权限高,输入“configure terminal” 命令进入到全局模式全局模式......

华为路由器防火墙配置命令总结

华为路由器防火墙配置命令总结(上)2006-01-09 14:21:29 标签:命令 配置 防火墙 华为 休闲一、acce-list 用于创建访问规则。(1)创建标准访问列表acce-list [ normal | special ]......

华为路由器防火墙配置命令总结

华为路由器防火墙配置命令2013-3-30 一、acce-list 用于创建访问规则。(1)创建标准访问列表acce-list [ normal | special ] listnumber1 { permit | deny } source-addr [ so......

华为路由器防火墙配置命令总结

华为路由器防火墙配置命令总结acce-list 用于创建访问规则。 (1)创建标准访问列表 acce-list [ normal | special ] listnumber1 { permit | deny } source-addr [ source-ma......

路由器配置

其实LAN用路由器有两种办法:1、是把WLAN的进线(电信拉进你家的网线)插在路由器的WAN口(与众不同的那个口),然后登陆路由器设置页面,设置路由器PPPOE的账号和密码,需要上网的所有电脑......

《配置路由器需要知道的命令.docx》
将本文的Word文档下载,方便收藏和打印
推荐度:
配置路由器需要知道的命令
点击下载文档
相关专题 路由器的配置命令大全 命令 路由器 路由器的配置命令大全 命令 路由器
[其他范文]相关推荐
[其他范文]热门文章
下载全文