a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 150|回复: 2

[CCNP] CCNP指导:Switch命令汇总(一)

[复制链接]
发表于 2012-8-3 20:20:19 | 显示全部楼层 |阅读模式
1.在基于IOS的交流机上设置主机名/系统名:   switch(config)# hostname hostname/ p! A: J& ]: \% `8 W
  在基于CLI的交流机上设置主机名/系统名:
' z$ L* W. t! ^% U  switch(enable) set system name name-string
" X3 ?2 M* q+ _) Y. b  2.在基于IOS的交流机上设置登录口令:8 d3 k: T: {! F
  switch(config)# enable password level 1 password! Z1 w/ G4 m% s! O9 L+ z/ x0 s( @
  在基于CLI的交流机上设置登录口令:
' y3 ]" o+ O0 u- E/ \  switch(enable) set password
3 w1 @, u, e3 u* R. R  a$ d; X$ e  switch(enable) set enalbepass
) K# i' Q7 V; L' p5 ~  3.在基于IOS的交流机上设置远程访谒:
. J7 o( k; J! Q, L/ I' ~1 v  switch(config)# interface vlan 11 m! z" Z4 r% U0 V3 v0 e7 X
  switch(config-if)# ip address ip-address netmask
- I# r# T" P/ D7 N8 W. K  switch(config-if)# ip default-gateway ip-address; L" I5 X5 k" R$ W: Y$ M
  在基于CLI的交流机上设置远程访谒:0 ]" O/ c2 Z  j6 U4 z& i
  switch(enable) set interface sc0 ip-address netmask broadcast-address
, J4 ~4 C, u6 S& Q+ O  switch(enable) set interface sc0 vlan
2 F- i& O! w9 O/ y7 z! R' s  switch(enable) set ip route default gateway
5 L4 P' z# Z" V8 A. T  4.在基于IOS的交流机上启用和浏览CDP信息:' p) K- `0 c4 |6 r( g
  switch(config-if)# cdp enable/ M) u1 I: T: U' \7 e4 O* \  f& y& q
  switch(config-if)# no cdp enable
; U- U5 b/ }! J) [  为了查看Cisco邻人设备的CDP书记信息:
" X; L4 c/ e( ?# T& \  switch# show cdp interface [type modle/port]
) D3 z- U5 J/ J2 r1 |/ h6 q+ @  switch# show cdp neighbors [type module/port] [detail]
& Y! H- ?# n- Z2 }  在基于CLI的交流机上启用和浏览CDP信息:
/ g9 x' P9 e- z# N  switch(enable) set cdp {enable|disable} module/port  {2 g3 O$ b: g, p
  为了查看Cisco邻人设备的CDP书记信息:5 M5 D% r3 D4 |* e
  switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]  R' [/ j+ ~: t$ x, G& H& X
  5.基于IOS的交流机的端口描述:
1 S9 m( J3 L, b; P! j  switch(config-if)# description description-string6 ^) j- m1 w* H+ s( y
  基于CLI的交流机的端口描述:
' U, a8 n# n6 t" t3 a* q& F  switch(enable)set port name module/number description-string
. a. R2 @0 E" [1 H: |  6.在基于IOS的交流机上设置端口速度:
" r) r7 {  v: R& N8 I3 J  switch(config-if)# speed{10|100|auto}
' T! O/ C: t0 Z+ |, a  在基于CLI的交流机上设置端口速度:1 ]$ r- T$ Z) M8 f
  switch(enable) set port speed moudle/number {10|100|auto}
4 J& W8 p: b3 o, v. j  switch(enable) set port speed moudle/number {4|16|auto}
. \' k+ c8 W; R' `; |! Z2 f: k  7.在基于IOS的交流机上设置以太网的链路模式:
% E6 w; X) [% K6 f6 S' T* R  switch(config-if)# duplex {auto|full|half}
* v0 K5 @6 G) N7 b% S5 D  在基于CLI的交流机上设置以太网的链路模式:
: y- a$ I& W+ h; ]0 Y+ s; u  switch(enable) set port duplex module/number {full|half}  _$ k) Y7 {$ z" v* P$ n
  8.在基于IOS的交流机上设置装备摆设静态VLAN:
/ B+ b$ H* q: G5 C' u  switch# vlan database
; X: \4 }7 \" `! t8 X1 p6 C  switch(vlan)# vlan vlan-num name vla
+ I! Z. _9 I( a  switch(vlan)# exit
" Y) f; Q! E# s5 S  G1 z  switch# configure teriminal5 E( q8 j/ l, h4 ?! N
  switch(config)# interface interface module/number
1 `# l3 A2 h% B' o+ Y; c  switch(config-if)# switchport mode access
/ {+ q) H7 R7 }; R2 e) t& T% m+ u  switch(config-if)# switchport access vlan vlan-num
7 Y$ ?* H6 F( [6 o
3 [+ m% z$ g  L9 w  switch(config-if)# end
回复

使用道具 举报

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

CCNP指导:Switch命令汇总(一)

</p>  在基于CLI的交流机上设置装备摆设静态VLAN:5 t0 z5 ^* L! _- M6 q- _
  switch(enable) set vlan vlan-num [name name]$ ?5 q3 D* G, E0 q
  switch(enable) set vlan vlan-num mod-num/port-list
2 P6 Y; |5 K3 T& X  K9 a! D  9. 在基于IOS的交流机上设置装备摆设VLAN中继线:
9 r: C1 y3 o6 g  switch(config)# interface interface mod/port
3 L* k  _% t' p0 f2 K4 j9 j  switch(config-if)# switchport mode trunk
7 _5 y( h0 M* R' \* r' F  switch(config-if)# switchport trunk encapsulation {isl|dotlq}6 o; Y$ E9 Q% v6 c% u
  switch(config-if)# switchport trunk allowed vlan remove vlan-list  R/ I9 [2 W( C, v, k8 K
  switch(config-if)# switchport trunk allowed vlan add vlan-list
9 w, S3 D/ P: m5 r$ s8 u  在基于CLI的交流机上设置装备摆设VLAN中继线:- W3 a9 K1 ?2 n+ U, H" m: j
  switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]1 X. `0 @% L$ f: F9 X( H" x. b% D* q
  Vlan-range [isl|dotlq|dotl0|lane|negotiate]0 v+ \7 M9 i. t+ m( w: M, ^6 c9 f
  10.在基于IOS的交流机上设置装备摆设VTP打点域:: R+ P+ q! v: d/ o
  switch# vlan database
: K8 w: D* U" ~1 h  switch(vlan)# vtp domain domain-name( l8 f' M: D8 f! ~9 m7 N/ g
  在基于CLI的交流机上设置装备摆设VTP打点域:
+ w' I% o$ L9 i  switch(enable) set vtp [domain domain-name]
0 r9 d, c; L! b0 H1.在基于IOS的交流机上设置主机名/系统名:
! s0 n& r3 z  m* `0 Q( f5 F- c  switch(config)# hostname hostname
+ _4 J2 S3 t0 V; `, Y, ~; N' V  在基于CLI的交流机上设置主机名/系统名:' M: X8 z. {+ m( n# f# w( k
  switch(enable) set system name name-string; l4 b9 h) {4 H! _" W" Z' t
  2.在基于IOS的交流机上设置登录口令:$ p) b7 ^' d3 E, K0 o
  switch(config)# enable password level 1 password7 s7 \- \" N  @5 u2 c1 M
  在基于CLI的交流机上设置登录口令:
0 q. |" o9 q! n! c4 s: j  switch(enable) set password
# Z1 U! {" q2 e% [8 Y  switch(enable) set enalbepass
8 T: a5 m% w4 E  3.在基于IOS的交流机上设置远程访谒:( h7 r0 |  H% _4 o0 v
  switch(config)# interface vlan 14 Z- f" W, P1 @( a" G- m! h) U) g- C
  switch(config-if)# ip address ip-address netmask" k7 i$ {% Y) D' t2 e6 }* {& j
  switch(config-if)# ip default-gateway ip-address
5 a+ N: O- S+ B0 b4 l6 a* ]' O  在基于CLI的交流机上设置远程访谒:
4 @) @; M& D0 V4 u, H; W  switch(enable) set interface sc0 ip-address netmask broadcast-address
: O$ V' }6 A5 W" \9 o% ^# v# A  switch(enable) set interface sc0 vlan6 v% f. n# X9 ~
  switch(enable) set ip route default gateway+ s8 {# J: n3 {' B7 r
  4.在基于IOS的交流机上启用和浏览CDP信息:
- m4 F. ], E0 S0 l# ~  switch(config-if)# cdp enable
6 W5 Z  Y$ X5 M: i  f* ?  switch(config-if)# no cdp enable
# o+ N# q8 q' N, v5 @, n  为了查看Cisco邻人设备的CDP书记信息:/ G" T5 s, n0 R/ ^" o
  switch# show cdp interface [type modle/port]
  h3 S! g" q: n* l! Z# D  switch# show cdp neighbors [type module/port] [detail]
7 b3 E6 M# Y! I4 l" p4 {  在基于CLI的交流机上启用和浏览CDP信息:
! r4 z0 n% j1 D0 _0 Z4 R  switch(enable) set cdp {enable|disable} module/port
7 B' N' g7 E" F+ C: N' T8 |: f5 F  为了查看Cisco邻人设备的CDP书记信息:4 _, Z$ v4 y+ W' A8 v) `0 g
  _3 [8 A& `1 L) j0 `5 }
  switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]
回复 支持 反对

使用道具 举报

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

CCNP指导:Switch命令汇总(一)

</p>  5.基于IOS的交流机的端口描述:
/ O4 J) M  i, o! t$ C  switch(config-if)# description description-string
8 U# @2 r1 D/ Q+ W8 l/ _$ W  基于CLI的交流机的端口描述:. P9 P7 n1 K3 F
  switch(enable)set port name module/number description-string3 v2 ^% \% }+ F& V8 X( x0 Z
  6.在基于IOS的交流机上设置端口速度:
: L9 R* {7 s5 D  switch(config-if)# speed{10|100|auto}
) _" _  [3 y1 Z. A  在基于CLI的交流机上设置端口速度:
3 N6 {+ P  U6 p3 z& `5 k  switch(enable) set port speed moudle/number {10|100|auto}# X9 @# r, V% H; U3 `* Y
  switch(enable) set port speed moudle/number {4|16|auto}5 C8 j/ l+ Z7 @* w; K) A
  7.在基于IOS的交流机上设置以太网的链路模式:( P% z& B; B! K0 J
  switch(config-if)# duplex {auto|full|half}' `) C" L% t3 n' L
  在基于CLI的交流机上设置以太网的链路模式:( Y3 I# N- m* i5 `' s3 P! J1 S
  switch(enable) set port duplex module/number {full|half}& ~( A+ I  p/ @% T
  8.在基于IOS的交流机上设置装备摆设静态VLAN:
- t" X+ [; W1 D' I6 k  switch# vlan database6 u) D' S! U4 ?/ L! c
  switch(vlan)# vlan vlan-num name vla+ l7 Y# U5 j: i2 \+ X  z+ y
  switch(vlan)# exit
3 g( @) {6 |: X+ b% H& n  switch# configure teriminal/ e% g1 b* b& G1 Z5 `
  switch(config)# interface interface module/number8 q+ ~" [" ?/ Q* {9 G5 ?
  switch(config-if)# switchport mode access
& U5 F  f) ~: J0 C6 |4 K  switch(config-if)# switchport access vlan vlan-num
; `; D* z, ^+ b4 O  switch(config-if)# end% Q" I/ b  x3 L/ W2 H
  在基于CLI的交流机上设置装备摆设静态VLAN:% v" n& Y4 T  {% j  K7 _
  switch(enable) set vlan vlan-num [name name]& G$ p9 ~# h- ?, c, s
  switch(enable) set vlan vlan-num mod-num/port-list
$ |; g: v0 N* C  l1 r( |0 y4 x3 [  9. 在基于IOS的交流机上设置装备摆设VLAN中继线:
5 m4 j( D2 V% w- U" g* k# }/ \6 j  switch(config)# interface interface mod/port
& M" q' g" s& [' M$ T; V0 b  switch(config-if)# switchport mode trunk
+ S+ G2 Y$ k! \5 Y+ F  switch(config-if)# switchport trunk encapsulation {isl|dotlq}
+ B; ^7 @5 B: Z+ p0 r/ Y" U  switch(config-if)# switchport trunk allowed vlan remove vlan-list3 I, Y4 Q6 c& @! h/ d/ E
  switch(config-if)# switchport trunk allowed vlan add vlan-list
8 u  O+ F" y& r! W2 X! }2 Y  在基于CLI的交流机上设置装备摆设VLAN中继线:
2 V* k& I0 [5 R& K+ U$ Q1 ~  switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]5 _" E$ `% J8 o
  Vlan-range [isl|dotlq|dotl0|lane|negotiate]
  j# i8 U0 K0 z9 @& ?# r  10.在基于IOS的交流机上设置装备摆设VTP打点域:+ s$ L, q1 F5 z% r4 S6 ^. D
  switch# vlan database& \* {1 o1 ^9 x% R& s; m
  switch(vlan)# vtp domain domain-name
$ V8 I2 r% [" v' B3 G  在基于CLI的交流机上设置装备摆设VTP打点域:
- G/ ^! F. f, \  switch(enable) set vtp [domain domain-name]
1 N% _/ j9 m6 B' Yswitch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority
0 U) K' e  [( D  g4 [  在基于CLI的交流机上调整端口ID:
$ h# u/ t) p" B( Y! _  switch(enable) set spantree portpri {mldule/port}priority
6 {! U! p0 r$ _% M8 V2 n  switch(enable) set spantree portvlanpri {module/port}priority [vlans]9 I' _% g& V) u- S
  17. 在基于IOS的交流机上改削STP时钟:
+ }- r( N/ Y% o& F  switch(config)# spanning-tree [vlan vlan-list] hello-time seconds
; O" @! n3 ]4 L+ v& [0 F  G  switch(config)# spanning-tree [vlan vlan-list] forward-time seconds7 P. R7 @- {; S0 Z. U
  switch(config)# spanning-tree [vlan vlan-list] max-age seconds4 p1 m% D: L, J$ c, \
  在基于CLI的交流机上改削STP时钟:
5 \% I: s. z4 l  @$ r8 K  switch(enable) set spantree hello interval[vlan]
+ b- a( X+ A- _* o+ z2 C& }  switch(enable) set spantree fwddelay delay [vlan]9 M4 m8 a) x$ F1 }7 ^1 d- C
  switch(enable) set spantree maxage agingtiame[vlan]  ~7 G* f8 x/ S/ P& K
  18. 在基于IOS的交流机端口上启用或禁用Port Fast 特征:
2 n& ~( i) W4 n, W4 l6 P; N  switch(config-if)#spanning-tree portfast
* K( [: e& _2 N  在基于CLI的交流机端口上启用或禁用Port Fast 特征:& v% H# _* \- T0 j; y$ k! L
  switch(enable) set spantree portfast {module/port}{enable|disable}. S$ R7 Y) O) D+ T0 Z" m; e6 h# I
  19. 在基于IOS的交流机端口上启用或禁用UplinkFast 特征:
+ y4 O& v1 u. j5 \$ l( ]$ a$ B0 w  switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]
' i9 S3 u2 v( ?! P. _1 p' q  在基于CLI的交流机端口上启用或禁用UplinkFast 特征:( V. J/ p9 ?- G
  switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]* V8 \. E0 R1 N6 T: F/ C
  20. 为了将交流机设置装备摆设成一个集群的呼吁交流机,首先要给打点接口分配一个IP地址,然后使用下列呼吁: switch(config)# cluster enable cluster-name cv
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-5 17:45 , Processed in 0.262120 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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