a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 142|回复: 1

[综合] CISCO路由器配置命令详解及实例2

[复制链接]
发表于 2012-8-3 20:03:30 | 显示全部楼层 |阅读模式
三、设置对话过程 : ]- X6 @. M% R( I
+ f! q+ O" t# X% c& P) w
显示提示信息 ; j0 E. B* I+ n
全局参数的设置
9 P6 }$ D, g6 P8 e+ E/ ?( x' h$ w接口参数的设置
) P7 i+ V, f4 O4 \7 w显示结果
' m' U, _; C% P8 a8 A6 t# q利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。
+ J7 A& P' N2 ]进入设置对话过程后,路由器首先会显示一些提示信息:
" d5 u6 |7 i) ~: j2 c2 u  |--- System Configuration Dialog --- 8 m3 R* K9 [" M4 h  r
At any point you may enter a question mark ’?’ for help. : |. v: R' a5 l" C
Use ctrl-c to abort configuration dialog at any prompt.
+ F" f1 L+ X+ D: R1 S+ ~Default settings are in square brackets ’[]’.   e% d4 c; s  q# m  a
这是告诉你在设置对话过程中的任何地方都可以键入“?”得到系统的帮助,按ctrl-c可以退出设置过程,缺省设置将显示在‘[]’中。然后路由器会问是否进入设置对话: ) y# E8 i6 z+ U
Would you like to enter the initial configuration dialog? [yes]:
" N! {5 ?' c1 Z$ J如果按y或回车,路由器就会进入设置对话过程。首先你可以看到各端口当前的状况: $ K+ K: \% K& V5 @7 }
First, would you like to see the current interface summary? [yes]:
& r; ~3 t' b# n6 E, NAny interface listed with OK? value "NO" does not have a valid configuration
( r8 d, T; N0 A' O  j3 sInterface  IP-Address  OK?  Method  Status  Protocol
( H: ^* `/ a- u7 r1 e5 y) C+ P, QEthernet0  unassigned  NO  unset  up  up
! n! m% T& d9 j+ n2 J; aSerial0  unassigned  NO  unset  up  up 1 ~; r, q8 \' c! T0 l, ?, t
………  ………  …  ……  …  …
6 Q+ U" K7 r# m. }然后,路由器就开始全局参数的设置: 2 j" k' M: j  G4 d
Configuring global parameters:
2 ~/ V, [+ `* K& G0 i# [1.设置路由器名: + w+ i4 [, B: _8 x6 e! r
Enter host name [Router]:
& v% m+ ?' X3 {5 m+ Z- ^+ K2.设置进入特权状态的密文(secret),此密文在设置以后不会以明文方式显示: ; c2 y7 }" \9 M8 F
The enable secret is a one-way cryptographic secret used ; C& q* D' g* k: s8 L  o
instead of the enable password when it exists. 7 f1 r! ^# l) R# L% k% Q) g- w
Enter enable secret: cisco 9 n& n1 O$ F4 h) d$ }0 {
3.设置进入特权状态的密码(password),此密码只在没有密文时起作用,并且在设置以后会以明文方式显示:
- R& _6 R9 g% |3 aThe enable password is used when there is no enable secret
  K: R5 ~+ U# H4 Mand when using older software and some boot images. 4 W. e+ r5 m7 b! }% y. N
Enter enable password: pass
, X& X* o2 c. [4.设置虚拟终端访问时的密码: 9 r; `6 A& N% u# B' f, l
Enter virtual terminal password: cisco
  D; T, J! q/ [7 h7 J+ Y5.询问是否要设置路由器支持的各种网络协议: ) X2 [  y" R/ p! g7 ^/ q
Configure SNMP Network Management? [yes]:
. G. ]4 n/ ]: _* l2 w$ TConfigure DECnet? [no]:
/ }+ T, J. }  |Configure AppleTalk? [no]:
8 t- m3 {  n9 U% NConfigure IPX? [no]:
: `( K" b- v( C2 _4 _Configure IP? [yes]:
; {% N9 G: i2 U6 W0 l' Q0 iConfigure IGRP routing? [yes]: 8 b8 B# h, l3 f8 e- N) \9 G9 T
Configure RIP routing? [no]:
/ w; J$ u" N" p………
0 r* V! z, v# p  ^# q% i% h, @6.如果配置的是拨号访问服务器,系统还会设置异步口的参数: # Z" V# A3 g6 c4 ~
Configure Async lines? [yes]: ( n0 r8 V4 o4 \( y0 Z4 t" C
1) 设置线路的最高速度: . [; v" @9 I! G$ O3 q
Async line speed [9600]:
. u. M5 M# @$ e+ y2) 是否使用硬件流控: 7 R$ m: v# y1 E! L
Configure for HW flow control? [yes]: & \8 p# V2 m% x" z
3) 是否设置modem:
$ R5 ]8 \: S& Q+ UConfigure for modems? [yes/no]: yes & g' T9 j- T% f& N: s
4) 是否使用默认的modem命令: 0 J& g2 e. V! X+ J# f+ Y$ z' O. W
Configure for default chat s cript? [yes]:
) [6 z2 L  c7 Q" C0 @6 _5) 是否设置异步口的PPP参数: 5 d3 x8 C( m4 u
Configure for Dial-in IP SLIP/PPP access? [no]: yes
( v: _6 f+ ?" ~; g* v6) 是否使用动态IP地址:
- z4 [( v* u6 K0 QConfigure for Dynamic IP addresses? [yes]: 2 u$ x# Z* `0 Z5 u3 F1 V6 X
7) 是否使用缺省IP地址:
# E4 V7 I1 n0 m" IConfigure Default IP addresses? [no]: yes + G0 q+ `" `& Z. Y' t. v9 e6 H3 y
8) 是否使用TCP头压缩:   ]  v$ F, v# a8 z. k# j
Configure for TCP Header Compression? [yes]: 4 R5 r, i/ f3 ~
9) 是否在异步口上使用路由表更新: + l& R: s/ a! L% o
Configure for routing updates on async links? [no]: y 2 ~; E' T# m7 _
10) 是否设置异步口上的其它协议。
. p, c* j( i* I5 W8 @4 Q接下来,系统会对每个接口进行参数的设置。 2 Y* S4 T6 O3 R% K9 m7 L/ n
1.Configuring interface Ethernet0:
, B- N4 F: L4 R" p. n1) 是否使用此接口:
4 e6 O3 r: W5 d. t/ C% L/ hIs this interface in use? [yes]: ; B% |/ [/ K% G3 F- y
2) 是否设置此接口的IP参数:
1 O) M7 V" J2 b5 u) d8 [Configure IP on this interface? [yes]:
回复

使用道具 举报

 楼主| 发表于 2012-8-3 20:03:31 | 显示全部楼层

CISCO路由器配置命令详解及实例2

3) 设置接口的IP地址: , L; r% R8 ?# |% G
IP address for this interface: 192.168.162.2
- J/ K9 `% v: Z4) 设置接口的IP子网掩码:
* c) o( {3 _% u' k" W/ nNumber of bits in subnet field [0]:
7 q  y- F7 S! X) \, y' sClass C network is 192.168.162.0, 0 subnet bits; mask is /24
( x4 l$ `+ Y* p4 t在设置完所有接口的参数后,系统会把整个设置对话过程的结果显示出来: % l5 c! }8 {/ d! h& S
The following configuration command s cript was created:
9 y$ l. p0 o9 lhostname Router 5 t" t, v* c9 |  l
enable secret 5 $1$W5Oh$p6J7tIgRMBOIKVXVG53Uh1
/ r0 }& p* {" E$ o) u! aenable password pass % k( g5 J4 R2 P7 R" q; Q7 H- X) j
…………
" T$ P/ P5 X5 g3 C6 `  g: t* r1 N+ f, m请注意在enable secret后面显示的是乱码,而enable password后面显示的是设置的内容。 + M4 T, W( F: E# _2 J' J3 z, w
显示结束后,系统会问是否使用这个设置:
# u" A: Y: P" a8 L4 `Use this configuration? [yes/no]: yes 1 t! v% B8 D4 f0 o8 n
如果回答yes,系统就会把设置的结果存入路由器的NVRAM中,然后结束设置对话过程,使路由器开始正常的工作。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-4-29 03:00 , Processed in 0.290024 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表