1. 在基于IOS的交换机上设置主机名/系统名:/ g4 W- M/ A* k- X" M/ `
switch(config)# hostname hostname) \% m/ V+ P9 [8 K- z7 c) W0 i! p
在基于CLI的交换机上设置主机名/系统名:
! P5 `' J" I/ L% [switch(enable) set system name name-string
: f( x& H: g3 S# M6 W' P2 g/ [5 Z2.在基于IOS的交换机上设置登录口令:) }) L1 D2 F4 v' B
switch(config)# enable password level 1 password
3 G+ z3 S3 c9 [' S. }在基于CLI的交换机上设置登录口令:
4 y3 B5 x( X2 q8 C1 dswitch(enable) set password: e% Q6 b+ S9 u* l3 c
switch(enable) set enalbepass
7 N+ [# F; ]* ?$ k' ^& g1 z. c3.在基于IOS的交换机上设置远程访问:
; M7 o6 z9 G9 g2 w, `switch(config)# interface vlan 1
- R3 B9 \5 I! ?) r9 ~- j' X: Hswitch(config-if)# ip address ip-address netmask! C% z) S& p+ F) @
switch(config-if)# ip default-gateway ip-address7 f* f% u5 ~5 f( R3 l! N
在基于CLI的交换机上设置远程访问:' k/ ]/ C k0 @" g0 M/ z
switch(enable) set interface sc0 ip-address netmask broadcast-address
1 W4 V" v7 G* Y3 Q) Aswitch(enable) set interface sc0 vlan
8 |; O' O( A' p' C) c5 X- Y } `6 ~switch(enable) set ip route default gateway
S* O9 L0 B7 a1 {4 p; Y4.在基于IOS的交换机上启用和浏览CDP信息:
' X6 P4 A/ G' C, fswitch(config-if)# cdp enable( L% R/ A$ h, c. D
switch(config-if)# no cdp enable5 T! h; q! k8 p
为了查看Cisco邻接设备的CDP通告信息:* A$ _8 N1 j& z$ V0 ~
switch# show cdp interface [type modle/port]( ] @: j, Q3 T/ N/ b" `
switch# show cdp neighbors [type module/port] [detail]$ t, g% p! }. a4 f8 ?. ~$ u" f
在基于CLI的交换机上启用和浏览CDP信息:
) i6 P A+ h) P3 n# p# Y* mswitch(enable) set cdp {enable|disable} module/port
" d5 a h4 U4 z, W I: c" B! {9 J为了查看Cisco邻接设备的CDP通告信息:9 A/ ~% `, t9 o
switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]
( B5 F4 g" c% _+ Z+ {; U5.基于IOS的交换机的端口描述:
: t* I7 I. g( K; K" X3 @switch(config-if)# description description-string% I) O1 }. u8 {2 j+ Y! F
基于CLI的交换机的端口描述:
$ S; @7 a+ D& D6 k: S6 Xswitch(enable)set port name module/number description-string
0 L- E) q. C2 N9 p6 }* i' w6.在基于IOS的交换机上设置端口速度:3 ]& a8 _3 L' y) O) l& k
switch(config-if)# speed{10|100|auto}
: Q! v2 {) E: t9 e/ g1 c在基于CLI的交换机上设置端口速度:
0 w" G# o9 g. V1 j; Z: _switch(enable) set port speed moudle/number {10|100|auto}
: J+ G5 z# t9 E* sswitch(enable) set port speed moudle/number {4|16|auto}# c) G9 c/ L2 q( L% J
7.在基于IOS的交换机上设置以太网的链路模式:
L/ V6 q: N$ y, k' Z9 Aswitch(config-if)# duplex {auto|full|half}6 @ z, ~% B; r4 u& O
在基于CLI的交换机上设置以太网的链路模式:
) v) ]1 u" Q# w$ ^" Pswitch(enable) set port duplex module/number {full|half}. x) U+ K( [: g
8.在基于IOS的交换机上配置静态VLAN:& y; S$ j7 X/ k8 r7 ?- w
switch# vlan database5 y7 X/ `& r$ _' O
switch(vlan)# vlan vlan-num name vla6 k" |( E8 O, n+ B; K( Y6 W( d
switch(vlan)# exit$ O, D" i$ l4 D( z# @$ I
switch# configure teriminal
! X3 t7 b- f. p8 |switch(config)# interface interface module/number* j) ~# Q: y9 v3 {0 K2 C! `0 E
switch(config-if)# switchport mode access
1 Q3 G# v% U- A4 U1 nswitch(config-if)# switchport access vlan vlan-num1 e5 |2 ]1 q" y5 K: d* I0 c
switch(config-if)# end
0 u9 z7 j* O9 m' x- }在基于CLI的交换机上配置静态VLAN:. z9 p, @% A T0 ?+ x3 n1 |
switch(enable) set vlan vlan-num [name name]+ l( g0 p0 z( P$ l, P
switch(enable) set vlan vlan-num mod-num/port-list0 a# W2 o0 U1 |5 W, L
9. 在基于IOS的交换机上配置VLAN中继线:) f* j& ]. l E$ i7 D" v, D
switch(config)# interface interface mod/port( V; c C( i" P3 M* j4 a
switch(config-if)# switchport mode trunk
0 H' r+ |' P) uswitch(config-if)# switchport trunk encapsulation {isl|dotlq}
# r" h* C9 Y9 y1 a+ nswitch(config-if)# switchport trunk allowed vlan remove vlan-list# x3 {3 A! ?9 s) m- C' r
switch(config-if)# switchport trunk allowed vlan add vlan-list/ D; [/ q$ y" \: a2 d5 X' j+ b
在基于CLI的交换机上配置VLAN中继线:
8 ^" @: g: d; L Eswitch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate]9 K M1 j7 \/ B' V- n6 u7 t6 w8 i
Vlan-range [isl|dotlq|dotl0|lane|negotiate]# j1 n, n- I* P3 \' v
10.在基于IOS的交换机上配置VTP管理域:1 o$ ]$ N( K8 q* x
switch# vlan database/ V* {. Z4 Q; ~7 h( g1 k. W
switch(vlan)# vtp domain domain-name# [0 R- x- K! |0 k
在基于CLI的交换机上配置VTP管理域:2 f, J: g6 ^! C* V1 W
switch(enable) set vtp [domain domain-name]
1 G& m# g& G1 \& m11.在基于IOS的交换机上配置VTP 模式:
* I8 H6 o2 y0 o; Yswitch# vlan database& r6 w1 P5 M! i- A; r
switch(vlan)# vtp domain domain-name
# H% _; `( L8 p/ Q6 sswitch(vlan)# vtp {sever|cilent|transparent}
' @7 \* ]' b( }, a8 a) pswitch(vlan)# vtp password password
8 d! ]1 V" t- M6 N/ ?在基于CLI的交换机上配置VTP 模式:
; V0 C4 D. H2 pswitch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]
& X" W0 ?8 m: b# n& D0 l0 h12. 在基于IOS的交换机上配置VTP版本:
4 }: n% n, U$ I0 K& T: Aswitch# vlan database
" M8 B7 ^- a7 p+ Uswitch(vlan)# vtp v2-mode
; k0 k" y0 A$ V, w" i在基于CLI的交换机上配置VTP版本:5 K! C' w" T0 Z4 m
switch(enable) set vtp v2 enable: m( I8 e8 I' \9 w
13. 在基于IOS的交换机上启动VTP剪裁:& e# W; e6 p5 A: |2 a* T: R* _
switch# vlan database
% g7 r/ O6 O5 f# Mswitch(vlan)# vtp pruning$ A9 L4 a+ w) p9 B
在基于CL I 的交换机上启动VTP剪裁:
" V3 _& \" F @& W0 u# K- V; Qswitch(enable) set vtp pruning enable$ c, k3 r' S: i3 Q9 k0 e
14.在基于IOS的交换机上配置以太信道:2 }0 z- `2 f$ e; y0 N2 t. }
switch(config-if)# port group group-number [distribution {source|destination}]8 ~4 @# B- M: j: v0 [
在基于CLI的交换机上配置以太信道:
+ j) n9 V1 {1 q9 j3 ^switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto}
) E2 f/ W+ s" Z( @15.在基于IOS的交换机上调整根路径成本:- E4 a, P- U6 X3 ]
switch(config-if)# spanning-tree [vlan vlan-list] cost cost- G4 k4 g( S0 Z7 l9 j" U, Q
在基于CLI的交换机上调整根路径成本:
4 ~, [- @3 M6 l9 P/ A( ^! Gswitch(enable) set spantree portcost moudle/port cost
- {3 Q* r8 C) i9 `; B! }switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]
, H+ l7 l. y, S% z: C9 O/ x16.在基于IOS的交换机上调整端口ID:
3 o0 l8 Q- C7 H2 ]# ~8 o8 a8 y- Y# ^switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority& l# O3 D1 ^% t
在基于CLI的交换机上调整端口ID:1 K- g$ z: j! U
switch(enable) set spantree portpri {mldule/port}priority# k7 g" L( u) j: @' g3 a
switch(enable) set spantree portvlanpri {module/port}priority [vlans]% p/ l, Z/ J9 V7 \2 Y/ A( f' q
17. 在基于IOS的交换机上修改STP时钟:( G& s1 ~# ?& Y8 Y
switch(config)# spanning-tree [vlan vlan-list] hello-time seconds" q. K- ^6 h4 R. l$ i' L
switch(config)# spanning-tree [vlan vlan-list] forward-time seconds& a/ y, m x! K- Z8 C8 t3 }; h0 e4 `
` switch(config)# spanning-tree [vlan vlan-list] max-age seconds
v) Z1 |- ?! p( a在基于CLI的交换机上修改STP时钟:( j& y5 x9 N x {4 N. l; X
switch(enable) set spantree hello interval[vlan]
' J! [$ M! l& wswitch(enable) set spantree fwddelay delay [vlan]& |* @/ q. x4 Z3 T; Y9 Y; Q
switch(enable) set spantree maxage agingtiame[vlan] N; c8 u$ {* P
18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:
# I' Z, y9 u0 E. ^ d) j+ uswitch(config-if)#spanning-tree portfast) Q2 C. \, c( Q1 t
在基于CLI的交换机端口上启用或禁用Port Fast 特征: s4 Y8 X' H6 S- _% M2 X, W: I
switch(enable) set spantree portfast {module/port}{enable|disable}2 }, g9 T6 Z( s1 z
19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:
% N% V4 N& G: B* x9 v8 T# aswitch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]& Y# W4 x: G( {5 |" J
在基于CLI的交换机端口上启用或禁用UplinkFast 特征:
2 h% ?7 ?* u3 E: g- lswitch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]
6 |4 R7 M) }) C1 b; \20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name e% q/ ?2 F1 J( k3 z7 z
21. 为了从一条中继链路上删除VLAN,可使用下列命令:
) r8 {6 i: ]) ]3 U) mswitch(enable) clear trunk module/port vlan-range
+ ^. }( w! d7 Q8 ]4 y! }3 @! N, b22. 用show vtp domain 显示管理域的VTP参数.
4 L1 `( F& r5 m& |0 I23. 用show vtp statistics显示管理域的VTP参数.
0 ?; h" _) W! P8 \3 c24. 在Catalyst交换机上定义TrBRF的命令如下:
) h6 J) v8 ~0 @5 F5 {& @2 L% Z8 Cswitch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]
& K4 L% \5 I, ?25. 在Catalyst交换机上定义TrCRF的命令如下:
5 }( H3 [' O S. [6 Bswitch (enable) set vlan vlan-num [name name] type trcrf
, g2 I( C) }! D" s5 M0 T- c5 K{ring hex-ring-num|decring decimal-ring-num} parent vlan-num5 h7 E4 e) N- }
26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:& ?7 U c: H: I- d
switch(enable) set vlan vlan-num mod-num/port-num# y. R+ q* T9 w2 Q7 Z
27. 命令show spantree显示一个交换机端口的STP状态.! i/ f" x% r; Q, F
28. 配置一个ELAN的LES和BUS,可以使用下列命令:
/ v, J$ M8 m) L3 v! C8 b/ P/ b; P* GATM (config)# interface atm number.subint multioint8 m1 \" A4 f+ Y
ATM(config-subif)# lane serber-bus ethernet elan-name
* J. O5 R% I( N$ s6 u29. 配置LECS:9 w* N. O$ g! t: O+ ]2 W; w( T* H
ATM(config)# lane database database-name
$ m# U) n: m0 k0 V dATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address
7 {4 j$ Z2 x( k1 R: w- ^8 A6 ZATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address
Z- d( n! ?! F) ~8 MATM(lane-config-databade)# name …( D* u4 ~% ^. f
30. 创建完数据库后,必须在主接口上启动LECS.命令如下:
, _: W: v" S5 _ p2 QATM(config)# interface atm number
m' m, z' x5 c6 }( N" fATM(config-if)# lane config database database-name8 {/ N: @ \' {9 P
ATM(config-if)# lane config auto-config-atm-address1 f) Z" T* C. e1 x% r# z
31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:
3 K7 n( K& r& H4 o. F) _8 O. ]ATM(config)# interface atm number.subint multipoint& N! M' R# P6 q' e; [, p1 N
ATM(config)# lane client ethernet vlan-num elan-num
- z$ |' j/ ?8 I% z F- a32. 用show lane server 显示LES的状态.
6 v, I! p, o" m' o$ C) I8 b33. 用show lane bus显示bus的状态.8 M: I" @* L# \9 ]
34. 用show lane database显示LECS数据库可内容.9 |6 h/ {7 U u/ z& G
35. 用show lane client显示LEC的状态.
- r9 Y2 _% v. k. I& c36. 用show module显示已安装的模块列表.( [. {: z- Y+ y9 j
37. 用物理接口建立与VLAN的连接:
' S, `) u- ~( ]) a! }1 R9 H% ^router# configure terminal0 Z6 D/ }0 v; m) T% O7 p
router(config)# interface media module/port
. l+ H9 J+ @* I( M+ A9 Qrouter(config-if)# description description-string
. y2 C1 [1 o( n) q# d& u9 Vrouter(config-if)# ip address ip-addr subnet-mask
% Y0 m, Q4 E! hrouter(config-if)# no shutdown% _' D7 w E0 X+ {, U5 h. a
38. 用中继链路来建立与VLAN的连接:
( a: Y1 L$ R7 d$ n1 m* F: E* S% N, jrouter(config)# interface module/port.subinterface# m2 x& [# A( n2 L
router(config-ig)# encapsulation[isl|dotlq] vlan-number8 |* u$ ?1 C j3 ~. f
router(config-if)# ip address ip-address subnet-mask
4 h. k6 }" I: @, q/ l4 P7 K" J39. 用LANE 来建立与VLAN的连接:
9 h1 ]) L, x: h% m0 A4 y# t9 Qrouter(config)# interface atm module/port; a1 s: i0 p0 l
router(config-if)# no ip address
* B B) h1 _5 y5 u3 {router(config-if)# atm pvc 1 0 5 qsaal
' {5 @7 w; g* I. q& ^router(config-if)# atm pvc 2 0 16 ilni7 V# n, n( }. N2 ~# W2 @# W
router(config-if)# interface atm module/port.subinterface multipoint
- I b# g) N: mrouter(config-if)# ip address ip-address subnet-mask
# \* g, {% v/ g5 b, b8 frouter(config-if)# lane client ethernet elan-num
p! L8 e' m) h2 _0 C3 Wrouter(config-if)# interface atm module/port.subinterface multipoint
, h5 [" R8 {4 n0 \router(config-if)# ip address ip-address subnet-name" s6 x% _- [; X
router(config-if)# lane client ethernet elan-name
3 L- V1 U0 h' erouter(config-if)# …% n7 B- N$ `$ _
40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:
% \. F: v! n! G! _; X; d: Vrouter(config)# ip routing% n( ~# t$ w0 ^
router(config)# router ip-routing-protocol
4 D1 k+ ]" a0 V& G( Mrouter(config-router)# network ip-network-number
# ?! a- | z0 H4 w+ ~router(config-router)# network ip-network-number
- {4 F: t) E& Y% S0 w41. 配置默认路由:
0 n" }; A2 x# Qswitch(enable) set ip route default gateway6 _+ N4 q$ z/ |+ h; ?# g+ m- w
42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:
6 [/ s& _2 k' t+ i% f- Prouter(config)# interface interface number
, H/ `$ v; F& M% F* B" A: brouter(config-if)# mls rp vlan-id vlan-id-num
5 O0 U, e8 ?, N8 x, y& P% E43. 在路由处理器启用MLSP:( t6 K3 O+ O0 A& d" o
router(config)# mls rp ip
. G1 N0 A( Q9 |% h' D. T1 @5 t44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:8 l) J: X7 V1 ?) c" V
router(config)# interface interface number% A# l8 i* [! }" F% p
router(config-if)# mls rp vtp-domain domain-name
8 Y- Y- u' I* p& v45. 查看指定的VTP域的信息:' H8 t2 D+ k% @6 K0 b; [# d9 I5 l
router# show mls rp vtp-domain vtp domain name/ F1 `! J, j, k* o. {
46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:- ?" a+ J$ l0 m7 Q# z% D
router(config-if)#mls rp management-interface& W V* [( c0 M! B3 p9 b9 ~- j
47. 要检验MLS-RP的配置情况:' y5 c2 c8 L" k q6 w
router# show mls rp
- K& D( Q7 d7 A" M; u Y* _3 O48. 检验特定接口上的MLS配置:
3 }: I {/ ]1 C% n' u Qrouter# show mls rp interface interface number8 e. @: ]5 [: d* K; z( S
49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:
! v0 u$ n+ k. Z* R4 F2 Dset mls flow [destination|destination-source|full]
* d/ K2 a2 o8 Y50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:) A. L) j5 l2 \ y
router(config)# mls rp ip input-acl2 c6 x/ z; v, n; x; S; m
51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:
4 I- _1 u5 W* M% I/ ?! \8 S+ Aswitch(enable) set mls enable
3 L+ X u- Y6 u% W52. 若想改变老化时间的值,可在特权模式下输入以下命令:% H) L) Y# O" {; k5 \
switch(enable) set mls agingtime agingtime |