a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 176|回复: 2

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

[复制链接]
发表于 2012-8-3 20:20:19 | 显示全部楼层 |阅读模式
1.在基于IOS的交流机上设置主机名/系统名:   switch(config)# hostname hostname$ a# x* y$ X! u
  在基于CLI的交流机上设置主机名/系统名:2 T/ p# J0 o' ]4 j4 t
  switch(enable) set system name name-string
) P' o& f' G; Y1 i1 Y% [" ]  2.在基于IOS的交流机上设置登录口令:' {5 O6 C" g7 {3 n3 f. D1 ~" M5 S9 `
  switch(config)# enable password level 1 password
5 ~/ V$ [0 f- [$ c8 C) }+ A  在基于CLI的交流机上设置登录口令:" m- H, `( A3 d7 G, P$ l, U
  switch(enable) set password) B) z* v- k: }, ?
  switch(enable) set enalbepass
1 ~% q9 ?  ?- i& B, M; l* X5 P( s  3.在基于IOS的交流机上设置远程访谒:
- g  C1 T! o4 k: G/ f2 y  switch(config)# interface vlan 14 f" ~6 K0 e6 y) O/ _) W8 H
  switch(config-if)# ip address ip-address netmask% K$ |2 y$ ]0 v
  switch(config-if)# ip default-gateway ip-address
2 e6 X; C7 L* a9 ?3 i6 H  在基于CLI的交流机上设置远程访谒:2 a" K  `: @+ e- l; o
  switch(enable) set interface sc0 ip-address netmask broadcast-address! `" y4 k0 t: Z$ }4 j1 E
  switch(enable) set interface sc0 vlan3 ]! B  N; \) ^. [/ Q
  switch(enable) set ip route default gateway) d2 c; T7 O3 Y1 ^( o
  4.在基于IOS的交流机上启用和浏览CDP信息:1 S" W5 h1 t% A; h% u( ?
  switch(config-if)# cdp enable
7 J5 f/ B- `9 t; y) C% m/ u  switch(config-if)# no cdp enable
- p$ m0 A! h6 H! r3 T. g6 }; l* L  为了查看Cisco邻人设备的CDP书记信息:
% N, d; a. n( K4 X9 n  switch# show cdp interface [type modle/port]0 x) }, ^/ ?8 g4 i* z
  switch# show cdp neighbors [type module/port] [detail]
- ?( y" m4 {1 h+ c3 R2 v5 h  在基于CLI的交流机上启用和浏览CDP信息:# e1 G  Y: s% |4 Q% \) ]
  switch(enable) set cdp {enable|disable} module/port
: z$ p4 u2 d! V, S) l  为了查看Cisco邻人设备的CDP书记信息:4 D9 d, J- @- D4 d5 j1 |
  switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]
8 G8 k, f7 C2 K. S3 M7 G% o# n! k) Q  5.基于IOS的交流机的端口描述:
, o8 P3 w5 `. ?3 f  switch(config-if)# description description-string
: |) |/ F: Q  y: h  基于CLI的交流机的端口描述:
; k8 t+ j" o6 l& B1 W  switch(enable)set port name module/number description-string
" C& e1 P. u. D9 A. B, [% U  6.在基于IOS的交流机上设置端口速度:
% \. i# [0 G' B" I  [6 o& Y  switch(config-if)# speed{10|100|auto}6 s% G) u: U3 k+ n% l/ T/ e
  在基于CLI的交流机上设置端口速度:
0 _3 m) }+ ~; U: l  switch(enable) set port speed moudle/number {10|100|auto}4 Q% b! a$ k. l$ p: Q) @
  switch(enable) set port speed moudle/number {4|16|auto}0 u' n$ @2 x  c, g. g9 x4 s- S+ s6 ^1 p
  7.在基于IOS的交流机上设置以太网的链路模式:' [7 j' s6 [* w! y. u$ x
  switch(config-if)# duplex {auto|full|half}; C. \" u( A* R" q6 W2 b
  在基于CLI的交流机上设置以太网的链路模式:
; k# q) `/ h! I2 P; c7 E  switch(enable) set port duplex module/number {full|half}  ?4 q5 `: m6 D4 K# O
  8.在基于IOS的交流机上设置装备摆设静态VLAN:
8 d0 |* ~0 ^( Q; L/ }  switch# vlan database
" n& |4 |) `, N4 B$ Y  switch(vlan)# vlan vlan-num name vla3 g2 c; x( {& ?: s) t
  switch(vlan)# exit
7 o8 q" R" T+ \8 ~  switch# configure teriminal
4 t4 X: t8 O9 b: s  switch(config)# interface interface module/number9 ]0 ~4 ^* _& r8 q& E
  switch(config-if)# switchport mode access& a% B' d: G) A8 i& e
  switch(config-if)# switchport access vlan vlan-num
2 m7 ]# q1 k6 ~6 t6 k& I. v
/ d  w& U3 k9 `3 x, y  switch(config-if)# end
回复

使用道具 举报

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

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

</p>  在基于CLI的交流机上设置装备摆设静态VLAN:1 n3 `. m( L* e" ?5 Q: P; \$ J2 u
  switch(enable) set vlan vlan-num [name name]
, _- Y' a2 i7 e7 U' X3 g# H( h  switch(enable) set vlan vlan-num mod-num/port-list' X* }6 Q7 y  ^  |/ b
  9. 在基于IOS的交流机上设置装备摆设VLAN中继线:
! Y+ E3 Y, |# r4 I$ J  switch(config)# interface interface mod/port
+ N: K9 o. c( c8 s4 a* `  switch(config-if)# switchport mode trunk: x2 t# K7 ?# y: c. r- F0 n* D& v
  switch(config-if)# switchport trunk encapsulation {isl|dotlq}1 M, Y0 N4 [" U
  switch(config-if)# switchport trunk allowed vlan remove vlan-list
$ q+ T+ x& w( ~- d  switch(config-if)# switchport trunk allowed vlan add vlan-list
% D% K/ H) e- ^- r  在基于CLI的交流机上设置装备摆设VLAN中继线:1 Z2 a# k$ [, G! J9 R
  switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]
* P$ t1 }$ h- C3 c% A  Vlan-range [isl|dotlq|dotl0|lane|negotiate]# V; E  [' z. l2 H, [
  10.在基于IOS的交流机上设置装备摆设VTP打点域:7 i9 i6 k, M. U% L4 C5 X
  switch# vlan database
7 L& c( Y; Q* [% y  switch(vlan)# vtp domain domain-name
- V( ^& b- ^6 B3 j' G  在基于CLI的交流机上设置装备摆设VTP打点域:* ]' P  A2 _7 \. ^! t- e) a
  switch(enable) set vtp [domain domain-name]
# _. y0 Z4 |4 W( r" z1.在基于IOS的交流机上设置主机名/系统名:$ i/ }( N$ E* O) |* A) S, X
  switch(config)# hostname hostname8 _( C$ T% A) k* P- l
  在基于CLI的交流机上设置主机名/系统名:
: ^8 X$ @' u# g: S& {9 F* R$ S  switch(enable) set system name name-string. ^. A0 {; z6 _1 H3 f
  2.在基于IOS的交流机上设置登录口令:
" u6 ?( @6 M$ R- @. @/ u  switch(config)# enable password level 1 password* _; `2 A# X  m/ g3 h- J
  在基于CLI的交流机上设置登录口令:" |7 K2 H. T. Q+ f' a- O! q: I
  switch(enable) set password
3 M, }, ?* w! @! @7 z$ N  switch(enable) set enalbepass7 t3 W. C( X; t2 t; C) g. j
  3.在基于IOS的交流机上设置远程访谒:( g1 n% @0 D' k! r3 M5 o
  switch(config)# interface vlan 1. T; b, P! |3 D" x" F
  switch(config-if)# ip address ip-address netmask
4 b' F( @0 i# D2 S( K7 R7 l  switch(config-if)# ip default-gateway ip-address, q8 U6 j0 q) d! k
  在基于CLI的交流机上设置远程访谒:
$ ~; D7 Z' n% L2 m6 n  switch(enable) set interface sc0 ip-address netmask broadcast-address
# O. ?5 [4 M0 a- f( d" l! Z  switch(enable) set interface sc0 vlan
& C/ V# H5 z" v: v. N! Y  switch(enable) set ip route default gateway
& F0 b" A/ B  x% A; ~  b, ]) ^  4.在基于IOS的交流机上启用和浏览CDP信息:3 z0 G0 U8 t, q7 i; w- y: P
  switch(config-if)# cdp enable
2 x; F" u* R6 B: T, \  switch(config-if)# no cdp enable3 G  ~* k- J. X" V$ [$ \
  为了查看Cisco邻人设备的CDP书记信息:
% r$ Z* k- T! P. g  switch# show cdp interface [type modle/port]
2 s( P7 e1 n) s+ D; a" `  switch# show cdp neighbors [type module/port] [detail]
" @4 ?3 B+ o) D2 w9 y+ B* ^# s3 D: i  在基于CLI的交流机上启用和浏览CDP信息:
; R" x! s3 f2 |" j  switch(enable) set cdp {enable|disable} module/port1 m8 p0 |) y/ u7 r% A
  为了查看Cisco邻人设备的CDP书记信息:/ p! t4 n9 v# {

. x/ ]. G1 f+ F! N7 ?, ~  switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]
回复 支持 反对

使用道具 举报

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

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

</p>  5.基于IOS的交流机的端口描述:! R, H$ y, D+ T7 f$ Y8 t
  switch(config-if)# description description-string
  R: o- s/ e$ T/ l# Z5 l6 W  基于CLI的交流机的端口描述:* P4 C+ U8 q0 q8 Y5 _1 }3 h
  switch(enable)set port name module/number description-string. p! s+ T! ]7 j; S3 e
  6.在基于IOS的交流机上设置端口速度:: j+ T  o% o% q# Z2 j
  switch(config-if)# speed{10|100|auto}
' I9 }/ J1 J* F6 H1 N1 J( l  在基于CLI的交流机上设置端口速度:* Q& S2 N6 a1 ]+ ?6 z+ V5 Q
  switch(enable) set port speed moudle/number {10|100|auto}
  U) j% ~0 L# O. z+ g; G  switch(enable) set port speed moudle/number {4|16|auto}
) j! i  ?" r# O, X+ q5 W; n0 X) G  7.在基于IOS的交流机上设置以太网的链路模式:
5 w& E1 Y3 |5 T  R$ N2 h# h  switch(config-if)# duplex {auto|full|half}
4 t( P2 G. l  j' u; I) g  在基于CLI的交流机上设置以太网的链路模式:5 H8 B; }! ~( b& C& r" p2 s$ f
  switch(enable) set port duplex module/number {full|half}
# Z+ G  V& O$ M) a! Z$ J  8.在基于IOS的交流机上设置装备摆设静态VLAN:# D  I6 z" `0 T. I. S3 p- ^
  switch# vlan database$ p& U+ M2 E: K4 b
  switch(vlan)# vlan vlan-num name vla
1 O$ U/ S( ^- P7 I  switch(vlan)# exit
; H  u+ Q8 o/ I3 B6 b; \! R6 ]  switch# configure teriminal7 _# S" l. J, s- E1 F1 z
  switch(config)# interface interface module/number9 [% v2 o' G1 J! U- g! X
  switch(config-if)# switchport mode access5 m7 `! @0 ?: t# Z4 `
  switch(config-if)# switchport access vlan vlan-num
7 w. J3 `* I, {  T1 p1 K  switch(config-if)# end
4 y. O. v" v3 ]: Q: @% Z5 {  在基于CLI的交流机上设置装备摆设静态VLAN:' K; K1 t3 Q, ~: i8 O3 e8 B
  switch(enable) set vlan vlan-num [name name]
. B; V( s1 \# F/ A& B  switch(enable) set vlan vlan-num mod-num/port-list
( c5 U8 a4 `  Q4 K  9. 在基于IOS的交流机上设置装备摆设VLAN中继线:3 K" C% M9 V6 Z0 T# G3 Q
  switch(config)# interface interface mod/port
  B: ]8 G) q7 d- B# k  switch(config-if)# switchport mode trunk
; S' M$ V9 Y$ b6 d  switch(config-if)# switchport trunk encapsulation {isl|dotlq}
* L* ^+ u# s" d2 Z  switch(config-if)# switchport trunk allowed vlan remove vlan-list) D$ y0 P7 H3 L' R' Z" C- e9 z
  switch(config-if)# switchport trunk allowed vlan add vlan-list2 \7 j; w6 w4 }4 q0 \3 _
  在基于CLI的交流机上设置装备摆设VLAN中继线:# d8 P! L% h+ Q( P/ m1 i
  switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]% N; k  e% Z, X3 U6 r
  Vlan-range [isl|dotlq|dotl0|lane|negotiate]
4 k* R; k/ K# z7 s& R4 }0 _1 ]  10.在基于IOS的交流机上设置装备摆设VTP打点域:
: v, b/ P! u/ c) ~& k  switch# vlan database1 T/ h2 z. j% M( s2 ~
  switch(vlan)# vtp domain domain-name) s% w! A  I' G: s' J" o* {7 @
  在基于CLI的交流机上设置装备摆设VTP打点域:! @4 h+ v* a8 v: d
  switch(enable) set vtp [domain domain-name]
' m% p+ y4 U9 yswitch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority; ?( }8 u" g8 o6 a, M0 p4 o  d
  在基于CLI的交流机上调整端口ID:9 \6 P4 _* U# t. N# K  |& o
  switch(enable) set spantree portpri {mldule/port}priority7 ]' R: P- o6 |  L5 i7 \
  switch(enable) set spantree portvlanpri {module/port}priority [vlans]
" n% Q! I$ R+ S, d1 j& d( s3 f  17. 在基于IOS的交流机上改削STP时钟:
5 q8 _) J# m+ H0 D9 M; U" r( y  r5 u( e  switch(config)# spanning-tree [vlan vlan-list] hello-time seconds- ?" p3 z+ V. _; O$ [* H# [
  switch(config)# spanning-tree [vlan vlan-list] forward-time seconds
% R4 q" s/ J" g5 O8 T  switch(config)# spanning-tree [vlan vlan-list] max-age seconds7 x. e+ S$ x8 @4 t
  在基于CLI的交流机上改削STP时钟:( i8 s+ ]( h& y- N
  switch(enable) set spantree hello interval[vlan]
: o" ^0 c5 |) o% G  switch(enable) set spantree fwddelay delay [vlan]
1 }% V( C0 j# z  c( h! {  switch(enable) set spantree maxage agingtiame[vlan]
0 a1 J( q) L7 f, i- J  18. 在基于IOS的交流机端口上启用或禁用Port Fast 特征:1 |/ L. E+ z  N% W( l6 c
  switch(config-if)#spanning-tree portfast1 a8 t% u7 |4 R7 Q3 l  ?
  在基于CLI的交流机端口上启用或禁用Port Fast 特征:) `! ?! g. _% z  y2 k6 j
  switch(enable) set spantree portfast {module/port}{enable|disable}9 [# Q! M, }6 \
  19. 在基于IOS的交流机端口上启用或禁用UplinkFast 特征:
0 W, J; |8 H4 k1 B$ s  a& p  switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]
4 r/ v& \$ w% j' l7 G  在基于CLI的交流机端口上启用或禁用UplinkFast 特征:, D- c, ]6 ~  X9 B( w' k* r3 o
  switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]& G' T& G! |; J% m& E- T% O
  20. 为了将交流机设置装备摆设成一个集群的呼吁交流机,首先要给打点接口分配一个IP地址,然后使用下列呼吁: switch(config)# cluster enable cluster-name cv
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-27 06:06 , Processed in 0.243394 second(s), 26 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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