常用路由器(CISCO)安装调试文档 联系客服

发布时间 : 星期六 文章常用路由器(CISCO)安装调试文档更新完毕开始阅读b30d5ca30029bd64783e2ce5

华为通讯股份有限公司 PSMS系统文档 CISCO路由器的安装调试

Number of bits in subnet field [0]: 8

Class B network is 145.3.0.0, 8 subnet bits; mask is /24

The following configuration command script was created:

hostname R

enable secret 5 $1$I70z$3UhyLDAMY5x5880DorM2l0 enable password abcd line vty 0 4 password bb

snmp-server community public !

ip routing !

interface Ethernet0

ip address 23.23.33.33 255.255.255.0 !

interface Serial0

ip address 145.3.3.3 255.255.255.0 !

router igrp 1 network 23.0.0.0 network 145.3.0.0 ! end

Use this configuration? [yes/no]: y Building configuration...

Use the enabled mode 'configure' command to modify this configuration.

Press RETURN to get started!

%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down

%LINK-3-UPDOWN: Interface Ethernet0, changed state to up %LINK-3-UPDOWN: Interface Serial0, changed state to down %IP-5-WEBINST_KILL: Terminating DNS process %SYS-5-RESTART: System restarted --

Cisco Internetwork Operating System Software

IOS (tm) 1000 Software (CPA1005-XY-M), Version 11.1(5), RELEASE SOFTWARE

37

华为通讯股份有限公司 PSMS系统文档 CISCO路由器的安装调试

(fc1)

Copyright (c) 1986-1996 by Cisco Systems, Inc. Compiled Mon 05-Aug-96 12:42 by mkamson R>

加重字体为用户键入的, 表示回车。在执行完initial configuration dialog之后,用户输入的所有配置都存至NVRAM,路由器以后就使用该组配置进行工作。

对于Cisco 的路由器, 由于软件版本不同, 或由于路由器型号、配置不同, 其 Initial Dialog 过程可能有所不同,但主要配置内容基本一致。

进行完初始配置之后,还需要对路由器进行进一步配置。

三. 用终端命令配置Cisco路由器

在第一次进入Cisco配置界面时,系统的提示符为:Router>(注:此处Router为该台路由器的host name),此时只能做一些基本操作,如显示路由器的状态等,而不能进行任何设置操作。

通过执行enable命令,根据提示输入enable secret口令,进入特权模式,此时提示符为:Router#(有些软件版本为£),这时可以对路由器执行任何操作,配置各种参数,通过disable命令,可以退出特权模式返回至Router>状态下。

c1005>enable

Password: <- 此处输入enable secret口令,屏幕上不显示 c1005#disable c1005>

若要对路由器进入相关设置,需要在特权模式下执行config terminal命令,进入配置状态,这时指示符改为Router(Config)#,这时就可以进行相关的各种设置,若要从设置状态下返回,只需按即可。

c1005#config terminal

Enter configuration commands, one per line. End with CNTL/Z. c1005(config)#^Z c1005#

第三节 常用配置命令

一. 修改配置

若初始设置不正确,需要修改,则这时有两种做法。

38

华为通讯股份有限公司 PSMS系统文档 CISCO路由器的安装调试

做法一,首先删除原来的全部设置,执行write erase命令。

然后关掉路由器的电源,再重新打开电源,用initial configuration dialog来进行初始配置,重新设置所有的参数。

做法二,仅仅针对需要修改的参数重新设置,执行config terminal,进入

配置状态,进行手工配置,在配置完成后,按,回到Router#提示符下,通过执行write memory命令,将当前设置的参数存入NVRAM中。

二.使用帮助

Cisco IOS 软件的帮助系统非常完善,在任何时候都可以键入”?”获得帮助。例如, 在提示符#时不知应选择哪条命令, 这时可以按?

Router#?

Exec commands:

bfe For manual emergency modes setting clear Reset functions

clock Manage the system clock configure Enter configuration mode connect Open a terminal connection

copy Copy configuration or image data

debug Debugging functions (see also 'undebug') disable Turn off privileged commands

disconnect Disconnect an existing network connection enable Turn on privileged commands

erase Erase flash or configuration memory exit Exit from the EXEC

help Description of the interactive help system lock Lock the terminal

login Log in as a particular user logout Exit from the EXEC

mbranch Trace multicast route down tree branch

mrbranch Trace reverse multicast route up tree branch mrinfo Request neighbor and version information from a multicast router

mstat Show statistics after multiple multicast traceroutes --More--

这时按回车键继续显示下一行, 按空格键继续显示下一页, 按ESC键退出帮助 当想使用某一命令, 又记不清楚时, 亦可按”?”键

Router(config-if)#i?

idle-character ignore-dcd invert-txc ip

Router(config-if)#i

39

华为通讯股份有限公司 PSMS系统文档 CISCO路由器的安装调试

这时, 可继续键入”?”查寻下一部分关键字 Router(config-if)#ip ?

Interface IP configuration subcommands:

access-group Specify access control for packets

accounting Enable IP accounting on this interface address Set the IP address of an interface bandwidth-percent Set EIGRP bandwidth limit

broadcast-address Set the broadcast address of an interface directed-broadcast Enable forwarding of directed broadcasts dvmrp DVMRP interface commands gdp Gateway Discovery Protocol

hello-interval Configures IP-EIGRP hello interval

helper-address Specify a destination address for UDP broadcasts hold-time Configures IP-EIGRP hold time igmp IGMP interface commands

irdp ICMP Router Discovery Protocol

mask-reply Enable sending ICMP Mask Reply messages mobile Mobile Host Protocol

mroute-cache Enable fast-switching cache for incoming multicast packets

mtu Set IP Maximum Transmission Unit multicast IP multicast interface commands

multicast-threshold TTL threshold for multicast packets nhrp NHRP interface subcommands --More--

Router(config-if)#ip 然后可以继续查询,

Router(config-if)#ip addr ? A.B.C.D IP address

Router(config-if)#ip addr

依此类推, 直到键入正确的命令

三.设置IP地址

以下是一个设置(或修改)WAN口IP地址设置的例子:

c1005#config terminal

Enter configuration commands, one per line. End with CNTL/Z. c1005(config)#interface serial 0

c1005(config-if)#ip address 129.9.99.253 255.255.255.0 c1005(config-if)#^Z

40