返回列表 發帖

Cisco 2960 設定示範

no service pad
; h. |& j& t2 Eservice timestamps debug datetime msec localtime show-timezone- `: |" T+ ~$ m: g3 ]
service timestamps log datetime localtime show-timezone
3 a0 k# v/ k0 L2 H% ?# S# N8 p. k! ^+ hno service password-encryption
& N) E, p4 M8 Y!
, V" S7 B4 h" a9 J  {* {" Ahostname MY_SWITCH      [[[ Set switch hostname ]]]% x  `8 m" {( X8 X0 {
!
6 W+ Q8 |( m* d* G3 h4 jusername XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
7 L# ^3 M  Y4 K( Oenable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1' s1 ~$ z- v/ `4 ]/ a
!
9 I" M( H3 D& r5 m, R3 ?) {7 gclock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]
/ C  w+ z7 z4 w!$ @( A& Q+ N8 ~; n% q' P( x
vtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]
- j2 |* ], r" T" R0 L, z: r+ j!/ b, F2 `: l! k+ k# v4 e
spanning-tree mode pvst
( O3 G1 q" ~+ K8 R# x6 }0 ono spanning-tree optimize bpdu transmission( g" u7 u, I; O! y* d
spanning-tree extend system-id. m7 _" k/ ?: r& p5 v2 k1 c
!
* [  ?/ Y/ V& ]; H6 G: }$ ?interface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]
, e4 |0 [" w$ M2 F9 E* x switchport mode access
: D, |$ U& ~: r: _; U9 e switchport access vlan 2
8 l3 O7 k" W9 j/ f  z% ]8 F2 i!9 E5 Y0 Y3 ]. i0 k: O: @
interface FastEthernet0/2
7 H: M1 @* q2 \: I3 {3 g; ~switchport mode access+ x4 I! k0 L- q- c$ L" o: U7 D
switchport access vlan 2. z: X  Q6 L* J+ h/ K" a& o5 w
!) k7 C  ^, p! K  i* y+ K0 D  D
interface FastEthernet0/3
" z6 B+ e/ l3 T! p6 `  J1 e# _0 O& iswitchport mode access, l% U( K4 I  m  D+ M5 O! z
switchport access vlan 34 k! _, v" @% f& H4 ]5 _
!
; X0 P/ b1 e# [- @6 v" q, Vinterface FastEthernet0/4
4 n+ k3 k" @$ M2 gswitchport mode access
! T& F& @- l8 o9 ^8 [4 B6 H) i switchport access vlan 3
/ c% Q% k# A+ G. k" @3 ^4 Q!7 N1 o( B4 o" d, C- m! b2 M7 L
interface FastEthernet0/51 q( E) ], S* S& |) H
switchport mode access& R) @+ ]% v3 H' {) n0 Z/ J) Q
switchport access vlan 2  r: Q/ y- H0 j. K1 y
!2 v+ {  ?  a9 R4 q
interface FastEthernet0/68 U' a, m( N0 W+ U& i
switchport mode access
6 e- Q' a- G  P  K switchport access vlan 2
, W: M. d3 u4 h1 P+ a!  F  D: v1 f% {
interface FastEthernet0/7
0 c, }" F* S& z) d. rswitchport mode access& {* P/ u# J. J$ `" n
switchport access vlan 3
0 g( Z0 o" K* F9 X!
& l- g, `' T, [* N% Winterface FastEthernet0/8+ A* ]' k+ W9 O0 n. Z0 p
no ip address: E/ S! [+ f" R
!
! w- o( m! S" f* r( q" v" Ninterface FastEthernet0/9
+ L' \" z; r9 g1 v& X' A no ip address
/ v. I% s0 b9 j4 a/ `+ r1 j) R!6 S' `" C$ e+ w9 [: q
interface FastEthernet0/10& E! U" M9 }# L7 E( D- v
no ip address3 M  O7 W# u& H. {, u; A% D
!
# b& I$ |- h& G2 l! a" R( _: i) I+ Jinterface FastEthernet0/11
, s8 `7 k/ r/ |4 p' O$ n: Tswitchport mode access2 }5 S0 |0 y) d# d) O3 [. C
switchport access vlan 39 |4 H6 ~; j3 C  y- G
!- X$ O0 I; N, G
interface FastEthernet0/12! Y* G. ?9 V# X! H5 ?9 s
switchport mode access
8 h8 R2 F" I+ q: Y1 v2 N5 V$ { switchport access vlan 2
% i' a- M5 Q) b. i' j3 L!
' I6 ]1 D9 ^7 I  G6 M+ e5 v) |interface FastEthernet0/13
. u1 O' o4 K' z' aswitchport mode access
& h0 N: [9 F! F; ?. K; r switchport access vlan 34 z4 J2 z" Z0 z
!+ Q# Y$ O0 r; `2 T: O
interface FastEthernet0/14
6 p  }9 B5 \- G$ t/ @2 l; v& G no ip address+ G7 }4 l  W4 R& a4 W  e
!
  Z9 D0 F$ A; j0 f  s* Ointerface FastEthernet0/15
: U& i, v1 E4 g) Q/ f no ip address
9 Y  S2 O0 ?4 E2 M1 \$ c!4 H* U* A' R4 i1 w3 |
interface FastEthernet0/16
( x$ y# R& S1 q. \ no ip address
! f' |% V0 ~- H/ ]+ h!
0 w/ R. ~9 R( c% e/ Pinterface FastEthernet0/17* Z% K, R/ k' t/ Q- H/ }, a- L" [8 L$ s4 ~
no ip address
4 P; ^% ~" t. {/ u!2 `; O! H% ]. ^" m% [9 f' i+ E
interface FastEthernet0/18
4 h: ~2 |% y1 x+ @2 S no ip address
& m% e6 I" x- p; k$ ]- X% ~  p  u!
- t% b, }/ o. o- j  I7 }0 {interface FastEthernet0/19
; I8 E+ i9 Q6 T" V" s no ip address
1 f) h; s2 s- i+ T  ]- _!
/ B1 i) |: V8 y. b3 S: X0 w$ H; [interface FastEthernet0/200 K: h! A/ ~" E3 Q  Z
no ip address
6 G2 C0 H. ~0 u- u! z) g5 X* U4 P!
+ c% s& w' d- g7 t% [interface FastEthernet0/21
" e& J4 v9 w! W$ w  {6 O no ip address2 {, t( a+ D: S" @
!: h! Y, S4 l( z
interface FastEthernet0/22, J' u# Z0 ^, S; `
no ip address' K* ?7 s6 O. \0 H- Z
!' Q$ X2 g/ ~8 x+ ?; a; L: {8 B  |* j
interface FastEthernet0/233 ^3 Q  x6 D/ }. j/ M% Z
no ip address+ n2 c$ f$ A1 T7 o/ d5 C
!+ I! h% o6 ?) L' L
interface FastEthernet0/241 z6 x8 M# m5 s' E0 X! X# [# r
no ip address. `) ?7 U2 t7 i( B6 m6 h
!" b5 v1 p( N! I: |' z0 v1 a
interface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]]- s' Y- h9 h$ }  l, F0 u: X+ _
switchport mode trunk
! f- R8 u. p' G6 Q6 Q. s!
4 r1 [" S  I- d5 s! q( T2 w% l5 v9 finterface GigabitEthernet0/2  S# c' X+ @8 S) }( B) a3 ^
switchport mode trunk" a* d' `2 ]& e- {+ Z( ?9 b& Y
!& f9 X; Z- v2 N* g: B
interface Vlan1             [[[ Vlan 1 = native Vlan ]]]
& Z, D3 N5 l3 g" \; Z ip address 172.18.25.203 255.255.255.0
3 p7 O& t) R9 C2 N. f. I( `. Y!
# \$ D: a; n- t5 g; l: T8 e) [interface Vlan2
3 |% Y$ W" r1 F6 Z* e ip address 172.18.25.203 255.255.255.0
3 ]  M: `6 f2 X4 r, ~1 Y!
2 B4 J! @# S! p- winterface Vlan3
; O3 ^, m2 `% M ip address 172.18.25.203 255.255.255.0; F! j$ s) I- P! a) c6 [5 P) `
!
. u' g  j9 w; a, M6 ^  lip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]
# |3 t4 ^: L& g3 L4 C+ ?; q' j, x$ @!
6 O$ G% _: ~5 j/ T! |1 |snmp-server community admin1234 RO
- g2 D9 m$ O% D  ologging 172.18.25.37     [[[ Set log server IP address ]]]# O2 J2 Z# `/ n4 K. @* g4 O- T+ H
!% C3 o5 g: M3 G* X8 [
line con 0. |+ }4 o4 E  I" m( {6 r5 t
password XXXXX1 j2 H4 {$ b1 c* i+ d/ L9 u
line vty 0 43 R+ S  i: S' P# u/ j
line vty 5 15
' d  b) p! v/ O1 w7 C!
6 R5 K9 v3 Y; O+ T. y4 p8 o; Rntp clock-period 17179912             [[[ NTP = network time protocol ]]]
" O) j& ?+ e; i3 [, g6 `ntp server 172.38.225.218: P' J0 p; K: N9 s4 k) |
end
Bill Tang     MSN:billtang@openplatform.com.hk
Openplatform Technology Co.,Ltd. 資訊坊科技有限公司  
無線工程施工、方案設計、無線產品、天饋材料、終端設備綜合供應商
Tel: 852-27491011  Fax: 852-81483532

返回列表