CISCO常用配置命令及参数(5)
4 d0 L8 L* x# |' i# V Telnet使用: ) {9 ~) V- Y5 x
routerA# terminal monitor
# @3 P g# g5 a3 f1 a0 s routerA# telnet IP-Address [ Router-Name ] % `# ? L- Y$ w v
routerB# [ exit | logout ] 4 {$ _' y6 F; b* y, h+ L
routerB# ++再按
% U; |; y( G; K! S* H1 H O routerA# show sessions
' z: h6 ^! z5 N. W5 f7 H c( r routerA# Connect-Number % Q; a5 `+ c0 h- n" j. u
routerA# disconnect IP-Address [ Router-Name ] # n8 N& e. H! \) T
routerA# show user
. Z& z9 _; u W) F routerA# clear line [ 0 | 1 | 2 | 3 | 4 ] 5 D9 y, L7 y) K: u! e& M8 \* v3 {
6 J1 L& {- s5 {" |' d 禁止任何Telnet到本机:
' @+ F* J- _$ `/ |. G1 C router(config)# line vty 0 4 , Y; X( P# q6 R I \4 u& b M& n
router(config-line)# access-class ACL-Number 3 ?5 K- U$ W" B- q s
router(config)# ^z
' B( J, c; u$ Z3 U' i 4 \! T- V# B( S5 C0 A# L7 b
设置主机名: ; Y- O/ P+ o/ u4 b
router(config)# hostname Set-Hostname ! ?0 g' j2 \, E' [: }
router(config)# ^z
% i- X6 q# l) O1 `" h2 C router(config)# ^z ! O7 u8 x" I2 [1 \' ^0 f
7 |. i6 [* K& I$ ?4 h3 H2 a
设置用户模式密码:
* b# Z% }$ z5 c6 w0 C( g6 q. l+ K3 C router(config)# line console 0
4 ?- o/ T8 ~1 i4 g3 b. j router(config-line)# login , X7 U$ X5 M, F* a5 _
router(config-line)# password Set-Password . ~+ [8 ?4 T, {5 {) T, ^. e
router(config-line)# ^z
0 Y% J- j. k0 T3 k 设置Telnet密码: # x7 R2 x0 ^- u+ L" x' A3 h
router(config)# line vty 0 4 8 F" J' A; M$ |7 y0 k, x" s
router(config-line)# login 1 S- r1 Q7 E* @" i6 O
router(config-line)# password Set-Password % C2 D9 Y/ F, ^7 ^- ?3 N3 b
router(config-line)# ^z
/ V1 c' \: i$ _ + q. `% u& [( Z
设置特权模式密码: 8 e6 I4 T* L. }7 d/ x
router(config)# enable password Set-Password # g* g" T% a! A6 a$ \/ u
router(config)# enable secret Set-Password
# ~5 M2 w: ?& X0 T! s0 z router(config)# ^z
; p" t* y: f& q8 a6 Y) Z# }
. g, I" |* m- t3 b 给所有密码加密:
* @; V) B* {9 k7 c* ` router(config)# service password-ancryption Set-Password-Here
6 j' x+ E3 p( T* q _ router(config)# no service password-ancryption 4 t* Y% d* J8 k' G' [" ~, z, A
router(config)# ^z ( o8 W. U& Y# i
. f4 H+ @" T$ r7 [" S( V
设置登录Banner: j' x6 m) O1 N! ]6 |
router(config)# banner motd 分隔符 Set-Banner-Information-Here 分隔符
! Q! B: p! b# i$ b2 K 7 o: U* ^( r, n/ l8 J' v9 n
设置接口的描述信息: 3 q6 O5 ~5 q, W$ [+ I# U
router(config-if)# description Set-Port-Information-Here 5 G/ q7 X5 f9 S2 m4 c) G
router(config)# ^z 9 a. f1 R1 W6 ` Y
, D/ n; B$ `) r CDP的控制: 5 X8 T# T0 j3 E- K. i
router(config-if)# cdp enable # M7 K5 G; ?8 _- v
router(config-if)# no cdp enable 1 \3 {, P, W+ z) L
router(config)# cdp run - L7 [& D4 I/ w; D6 x
router(config)# no cdp run
2 ?" ~& p7 N& V' e% `
" p3 V: S1 [ c( s3 [* ?* X- h Ping的使用:
& C' M6 _7 E1 w+ } router# ping IP-Address
7 {- ^2 h8 U8 [; c5 x router# ping 2 `8 f! N% U" Z, H7 X# r( Y8 R
Protocol [ip]:[ Protocol-Type ] ; E8 s; M9 d! @6 C j
Target IP address:IP-Address 2 o4 l2 u- g/ i S# _' J
Repeat count [5]:
: r6 _ W: l% E0 i1 E" k" C8 C Datagram size [100]: 7 `: Z' X- }; B( V) @3 @9 M0 M
Timeout in seconds [2]: / k$ U7 W7 y8 g( `
Extended commands [n]:y & J1 d, G& s* z% F) s
Sweep range of sizes [n]: |