a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 161|回复: 2

[CCNP] Cisco认证考试辅导:Switch命令(一)

[复制链接]
发表于 2012-8-3 20:20:19 | 显示全部楼层 |阅读模式
1.在基于IOS的交换机上设置主机名/系统名:   switch(config)# hostname hostname
; o5 L' C+ d4 ]8 j: p# }) m  在基于CLI的交换机上设置主机名/系统名:7 J' t" f+ E9 r, j* B
  switch(enable) set system name name-string- y* h5 g4 A" F% r; ~3 F' i+ H8 k& U
  2.在基于IOS的交换机上设置登录口令:
; w( q$ }4 Y; q6 e2 [2 P  switch(config)# enable password level 1 password
0 h4 q8 h  }( A6 O) W1 {  在基于CLI的交换机上设置登录口令:
- g, D0 t( t8 z& N6 [6 i  switch(enable) set password
* }( H6 v' }; }3 Z  switch(enable) set enalbepass
" W5 A) _4 a& Q5 a8 z! q  3.在基于IOS的交换机上设置远程访问:
/ a9 q* c  _! @( x9 h  switch(config)# interface vlan 1
* {) E0 h5 b: n4 d) C7 V  switch(config-if)# ip address ip-address netmask$ [0 W9 k# X3 u
  switch(config-if)# ip default-gateway ip-address
( ~  f- h4 Y2 H! |  在基于CLI的交换机上设置远程访问:% q3 S' c/ U: ~  k5 z& o3 `5 h* |6 n
  switch(enable) set interface sc0 ip-address netmask broadcast-address
; Z$ u  S& B1 U3 t: h) v  switch(enable) set interface sc0 vlan
  t, d0 @! A- f) M  switch(enable) set ip route default gateway
* ]4 b, ^4 Y5 {  c% G. A9 c  4.在基于IOS的交换机上启用和浏览CDP信息:
5 c6 N) S3 k9 s" U7 i& A& C  switch(config-if)# cdp enable! p) F6 Z7 @2 A
  switch(config-if)# no cdp enable
( e2 |0 M2 M& l3 ~) O4 C  为了查看Cisco邻接设备的CDP通告信息:
* r3 W6 f! N7 C% z5 |  switch# show cdp interface [type modle/port]
& _# w) s# `- u$ L  switch# show cdp neighbors [type module/port] [detail]9 o1 `# {5 n3 c/ ^8 L0 [% A6 n
  在基于CLI的交换机上启用和浏览CDP信息:
7 l3 G1 A! Z0 G; Z! f! N* q: m  switch(enable) set cdp {enable|disable} module/port, C3 X' w. A& [' m
  为了查看Cisco邻接设备的CDP通告信息:5 M, }: A  Y- i9 {9 m
  switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]0 b1 k* w$ B& ~. h) C: T
  5.基于IOS的交换机的端口描述:
# u4 f2 x( u3 w. ?* [% S* r1 i  switch(config-if)# description description-string
. V% A: c: ~( E3 k9 L  基于CLI的交换机的端口描述:
3 d! u& I' Z& U  switch(enable)set port name module/number description-string
* X3 _  y8 _/ c0 r/ f  6.在基于IOS的交换机上设置端口速度:  }7 N$ {0 G: `/ }1 m# x$ @
  switch(config-if)# speed{10|100|auto}
2 m& l$ m& ^2 U2 Y1 S8 u, z; S3 y! i  在基于CLI的交换机上设置端口速度:
3 \0 G* L3 x; m" Q3 P0 t6 }  switch(enable) set port speed moudle/number {10|100|auto}
# E  s8 G$ p* X  switch(enable) set port speed moudle/number {4|16|auto}9 A  [6 O6 _/ S) F3 f: A# U
  7.在基于IOS的交换机上设置以太网的链路模式:9 `) a8 F( E2 W+ k+ i2 w) a
  switch(config-if)# duplex {auto|full|half}7 f% m: v0 p% {9 B0 ?* V% C
  在基于CLI的交换机上设置以太网的链路模式:1 W: i4 E$ @6 _$ A0 b4 d
  switch(enable) set port duplex module/number {full|half}, ~3 D' ^( Q' `) k1 Z
  8.在基于IOS的交换机上配置静态VLAN:
5 P5 Y& L' n! ]+ J  switch# vlan database* ]. J/ P& S2 ~% C5 ~
  switch(vlan)# vlan vlan-num name vla" X0 Y. G6 [7 G$ J1 i3 O  ~% a% w% w
  switch(vlan)# exit- c; x1 ]; G. m
  switch# configure teriminal
/ c6 y% P- F- R# v: j$ k  switch(config)# interface interface module/number- q. ]# u0 A) B: h: a6 T
  switch(config-if)# switchport mode access9 R4 u% u* g; M( W5 c# f/ e( U0 c: H2 _+ j3 _
  switch(config-if)# switchport access vlan vlan-num1 O' H! t8 J: Y1 i
  switch(config-if)# end
回复

使用道具 举报

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

Cisco认证考试辅导:Switch命令(一)

</p>  在基于CLI的交换机上配置静态VLAN:3 L! g/ |, {8 f7 Q
  switch(enable) set vlan vlan-num [name name]! |' \$ V% F9 y% _4 z
  switch(enable) set vlan vlan-num mod-num/port-list
+ c( h0 }7 N" f6 z/ j9 N& q) W9 I  9. 在基于IOS的交换机上配置VLAN中继线:
$ o1 Z1 `" @0 t' ~1 h* {0 @  switch(config)# interface interface mod/port
% v  ^1 _% P! A' T8 [  switch(config-if)# switchport mode trunk6 B: I9 H/ ?1 H5 k% `$ M" @
  switch(config-if)# switchport trunk encapsulation {isl|dotlq}
3 O) V( ]7 g. g  switch(config-if)# switchport trunk allowed vlan remove vlan-list; ?. q. j8 t- Q8 C& |
  switch(config-if)# switchport trunk allowed vlan add vlan-list
* T# u- P- y+ q. Y8 M! b% Z  在基于CLI的交换机上配置VLAN中继线:
1 ^. I; X5 c0 O% U  switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]
" ^1 R2 |+ _& z( F  Vlan-range [isl|dotlq|dotl0|lane|negotiate]
  H' @; J" u; X, ?  10.在基于IOS的交换机上配置VTP管理域:9 x! D  s# k' D6 v& b2 s5 g) O
  switch# vlan database6 U, D$ t* S; c1 Y% o
  switch(vlan)# vtp domain domain-name
% o+ E) S7 g0 P( r0 }4 I/ @  在基于CLI的交换机上配置VTP管理域:+ v) l3 ^7 J$ f6 w0 m2 o# v
  switch(enable) set vtp [domain domain-name]
' z! d# U, l6 U$ A1.在基于IOS的交换机上设置主机名/系统名:
+ H+ r" k- R9 k2 j5 [3 Q/ O  switch(config)# hostname hostname
6 e+ T1 ~$ \! o" n" f5 J  在基于CLI的交换机上设置主机名/系统名:
3 @; H7 N- U1 E# k1 |  switch(enable) set system name name-string& i! P' @' M$ F) ~
  2.在基于IOS的交换机上设置登录口令:
9 P! {! A, ~# j+ o& C  switch(config)# enable password level 1 password
( u7 A0 U% P( m4 y. S5 ~( w8 B  在基于CLI的交换机上设置登录口令:
! M$ B/ E+ S0 P- C1 R/ p  switch(enable) set password
3 P, {# G8 P. t" Z. L. f  switch(enable) set enalbepass
; V; e5 c+ j8 b7 k4 K0 d  3.在基于IOS的交换机上设置远程访问:5 N$ t! @3 @" k. V9 m0 p9 U
  switch(config)# interface vlan 14 \; J; K2 A6 v5 B' F6 P5 N5 J9 c9 @
  switch(config-if)# ip address ip-address netmask
/ d. w/ V  b( `0 a) @  switch(config-if)# ip default-gateway ip-address
: }, T9 y9 ~; O2 R5 O  在基于CLI的交换机上设置远程访问:- e" u& A8 x) K+ f
  switch(enable) set interface sc0 ip-address netmask broadcast-address
7 h0 I( X, _; S0 j" B. b" @# D  switch(enable) set interface sc0 vlan
, g$ U& M7 R( F1 E; U5 z+ Q  switch(enable) set ip route default gateway& f' Q& j7 P! X4 m% x: N) L9 [
  4.在基于IOS的交换机上启用和浏览CDP信息:
/ r5 \5 M! a2 A  switch(config-if)# cdp enable
# S% s( F" T+ a& w  switch(config-if)# no cdp enable. n; ?- k' O4 w0 d" N3 V7 U
  为了查看Cisco邻接设备的CDP通告信息:
! M: [( J) k  C) O  switch# show cdp interface [type modle/port]
5 U; e% U* y" R% a$ ?  switch# show cdp neighbors [type module/port] [detail]
: H. O& U4 U/ Y4 j1 b. z, V: \  在基于CLI的交换机上启用和浏览CDP信息:& W% X* D7 o# h  x4 i5 G5 b
  switch(enable) set cdp {enable|disable} module/port
. V* }( Q1 n( Y% G3 O- c+ j" C  为了查看Cisco邻接设备的CDP通告信息:: i! d* U9 ?* E$ _, Z/ l. e' ^
  switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]
! Z$ X( k. R! c: l  5.基于IOS的交换机的端口描述:
, {/ M' _: ?# V  switch(config-if)# description description-string) ?1 X6 h! t0 ?$ ~7 R
  基于CLI的交换机的端口描述:
/ ^* F7 a+ p5 g$ |' m  switch(enable)set port name module/number description-string
! T& ~. ^8 F: k  6.在基于IOS的交换机上设置端口速度:. S* d& r0 S0 L6 P2 \7 f
  switch(config-if)# speed{10|100|auto}2 h( y4 [9 o* l& ]+ H) ~
  在基于CLI的交换机上设置端口速度:
2 ]: ]( M- m: k0 s5 \7 Q  switch(enable) set port speed moudle/number {10|100|auto}+ Y% ?. C) A! d( V
  switch(enable) set port speed moudle/number {4|16|auto}
8 c; y, w( U8 d0 f  7.在基于IOS的交换机上设置以太网的链路模式:. t) r4 P$ A  I  P. \7 c
  switch(config-if)# duplex {auto|full|half}
* i; F7 ~+ V8 k, {  在基于CLI的交换机上设置以太网的链路模式:
4 y7 {5 |4 |( n$ |  switch(enable) set port duplex module/number {full|half}5 a  {7 z8 A* J2 i
  8.在基于IOS的交换机上配置静态VLAN:
- ^. o- F  E9 {1 i+ ^2 U; q9 C  switch# vlan database# D! `: E- a. j8 m
  switch(vlan)# vlan vlan-num name vla
5 t, _! [5 B8 o3 t  switch(vlan)# exit
7 d' o/ L0 s, X, s) I3 L4 s& |$ j& |1 U2 h0 }
  switch# configure teriminal
回复 支持 反对

使用道具 举报

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

Cisco认证考试辅导:Switch命令(一)

</p>  switch(config)# interface interface module/number
1 y5 g+ e. I# _  switch(config-if)# switchport mode access
: s: n7 u7 D8 F; ^, x; v' a5 C0 l  switch(config-if)# switchport access vlan vlan-num
+ t. e1 w3 Z* f" \% L  switch(config-if)# end
* `/ l  {7 [5 \  在基于CLI的交换机上配置静态VLAN:$ T& z; \0 d' o7 O6 J) @
  switch(enable) set vlan vlan-num [name name]: ~+ L- b3 G% B& W
  switch(enable) set vlan vlan-num mod-num/port-list5 k6 U* ^6 N& _# H
  9. 在基于IOS的交换机上配置VLAN中继线:
* T* D1 I! s' f3 p  switch(config)# interface interface mod/port
$ c% l) G3 p& b6 M  switch(config-if)# switchport mode trunk" |  i3 ^+ I0 V7 k( H8 _* }
  switch(config-if)# switchport trunk encapsulation {isl|dotlq}
$ \1 L; f0 x" ~  switch(config-if)# switchport trunk allowed vlan remove vlan-list
  ]6 ~: v! k1 F2 D% C  switch(config-if)# switchport trunk allowed vlan add vlan-list
5 J& ]# Q& }* F. p3 s# _  在基于CLI的交换机上配置VLAN中继线:
& f' N. p( ~9 j  switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]
0 }' O; S' K; q( k7 \- c  Vlan-range [isl|dotlq|dotl0|lane|negotiate]
. n9 b5 w' N% u! E* Z  10.在基于IOS的交换机上配置VTP管理域:: t" F. K) D' {. B1 ~7 b  v
  switch# vlan database" \. W2 N* T$ T' @* I' K/ x
  switch(vlan)# vtp domain domain-name
% x5 W; W* g) D8 n0 t; H  在基于CLI的交换机上配置VTP管理域:6 j0 v0 Q- W3 P5 O  m" n
  switch(enable) set vtp [domain domain-name]0 v5 F8 u+ j' u' f" O
switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority
4 L' l4 y; c1 B% `; a  在基于CLI的交换机上调整端口ID:
5 o1 p  G1 D% r+ R  switch(enable) set spantree portpri {mldule/port}priority
3 [- q+ o6 u4 K  switch(enable) set spantree portvlanpri {module/port}priority [vlans]
$ h2 {5 g! U) a! E  g  17. 在基于IOS的交换机上修改STP时钟:1 r  w% U' [! l6 I* N% h
  switch(config)# spanning-tree [vlan vlan-list] hello-time seconds; b1 d" O. {' x+ m
  switch(config)# spanning-tree [vlan vlan-list] forward-time seconds1 H0 b" a( t" |! W& L& M, T% H
  switch(config)# spanning-tree [vlan vlan-list] max-age seconds3 ]6 e, c3 Q% R6 k% M
  在基于CLI的交换机上修改STP时钟:. g" \9 i, [1 i# i% F
  switch(enable) set spantree hello interval[vlan]
5 Q, P9 E, W* d+ ]) l  switch(enable) set spantree fwddelay delay [vlan]
& t0 b! l6 N1 J0 s8 p  switch(enable) set spantree maxage agingtiame[vlan]
& [) Y1 O0 l5 K  18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:
1 X, z/ F% j) C  switch(config-if)#spanning-tree portfast
8 X! a" _+ J: q# n0 T% L$ @  在基于CLI的交换机端口上启用或禁用Port Fast 特征:& r' \, I& ~5 ]9 w2 Q5 K/ a
  switch(enable) set spantree portfast {module/port}{enable|disable}
; ]. I+ F3 W# a9 B' o1 a- ^$ {) [6 M  19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:
4 h0 G$ q' b/ S9 [  e  switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]4 s3 x9 m: G7 E0 F5 x& I. K1 n
  在基于CLI的交换机端口上启用或禁用UplinkFast 特征:) g. Z( D: ?6 G( o$ q% d
  switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]
, P* l* p) d: ?  20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-2 06:45 , Processed in 0.288924 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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