</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 |