返回列表 發帖

Cisco 2960 設定示範

no service pad3 r( u# C& b+ a$ M
service timestamps debug datetime msec localtime show-timezone2 P! }! E4 F. Q' P
service timestamps log datetime localtime show-timezone# H* U: s& Y6 Z3 o
no service password-encryption
" _! `3 ^  U- z' ~# a!
2 R/ A8 ?9 p1 _7 I, t7 q  Dhostname MY_SWITCH      [[[ Set switch hostname ]]]
7 x6 x' O5 ^8 ~9 Z( g% t, {& Y!
1 ]7 s4 `, F; b+ \username XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0; O( D3 p! V, H# g  h0 p
enable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1% @& q6 _2 ?& p/ c* Z) T
!
1 Q8 `( q% G: S% bclock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]
4 C( i7 h! G; m! S0 p!* @. x; v. {: [2 B" k
vtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]7 \2 m0 J6 c  m' b+ B* L
!" s+ \  E  Q, y* J
spanning-tree mode pvst8 x- N9 u, _! Q$ C" P7 q
no spanning-tree optimize bpdu transmission- l- ~; B" R4 R! b" @2 ]0 e
spanning-tree extend system-id% ~& `" M; _& Y3 J4 G+ z) D
!
' I4 v  f9 b3 @  Ointerface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]2 u& P1 W8 M+ O8 G* P/ @. m
switchport mode access
& n9 F4 K% O, ^/ ~) l switchport access vlan 2
9 F3 x$ o# f7 R- ?( i2 J& _!
- I+ b% i1 ?' \+ X( c( Finterface FastEthernet0/25 q! s/ \" ?4 d; g8 W( d
switchport mode access( ~; I  z( A' _! U/ a
switchport access vlan 2
7 O7 ]4 u9 ]% `& Y. `, s!7 B9 [; b! [" |+ {6 j8 V
interface FastEthernet0/3
+ D$ j7 |$ T! v9 T) [, Fswitchport mode access6 ?5 ]* c, q( U
switchport access vlan 3* Y! W) j" Y& y3 Y0 w$ M
!8 e- Q; a7 t, B
interface FastEthernet0/4$ p- X2 @8 c, z/ i5 Q* W! Z1 J
switchport mode access' W; G5 Y) ~/ V6 ~# t
switchport access vlan 3
7 `" w& U  d2 ^: w3 l1 t!3 R9 m( _) u9 e, k/ o
interface FastEthernet0/59 \' Y# W3 R! ^& C/ w
switchport mode access' N& e: k) @7 K3 b
switchport access vlan 2
% y: i! r4 @& H0 n' L2 O4 W!) \5 d& }9 C' ~2 y# \" a
interface FastEthernet0/6
9 \7 r: O4 k# c0 d2 S/ xswitchport mode access
) j7 [0 I  W) s switchport access vlan 27 a; d! S5 ^8 u1 U! {
!
2 \- }4 \. V& `7 G9 j0 l: |interface FastEthernet0/7+ o( h  [& e1 r. G1 y
switchport mode access
/ E8 z$ N5 q3 O% _: Y% X0 `/ L switchport access vlan 3
) ]( N! B: V$ h: L!* q7 d3 F, b4 z7 Y2 F# D+ W: E5 \
interface FastEthernet0/85 F# o# y' V& [/ V/ @, F9 j
no ip address
/ @& ]. P" w( l1 C* ^- ]!$ Z( \( Z9 g- e) i$ g6 u
interface FastEthernet0/9- B. P4 ]+ |3 J8 [$ g2 U" g
no ip address' ]3 k) X6 M! e2 ^  y8 h0 J  V4 A
!0 o& ?+ B" Q+ U: v5 Q
interface FastEthernet0/10; R2 ?, H& c0 G) @
no ip address5 k5 ^, ^! B& r; T2 P, I' \+ L+ u
!& H/ L" D- f9 _  f  O
interface FastEthernet0/11$ a7 }- U: g2 ?( n/ k* H
switchport mode access/ U9 _; D0 `( q0 k
switchport access vlan 3
- W2 a; V) Z* r: L+ g' L; }+ p!/ X, g9 u+ ^: j" _. i
interface FastEthernet0/125 r- q! k: Y7 x
switchport mode access
& C8 S5 d! I! @ switchport access vlan 2; U3 V) W7 Q- o' q: N
!0 G" N5 y$ Y7 J/ {" B9 p. ?
interface FastEthernet0/13
; G) i/ D, {0 L9 D- H+ C# Mswitchport mode access% c% V2 Z: p, B/ g6 H9 Q, |/ z
switchport access vlan 3  ]6 X, L! u. @0 i0 I! K6 n+ J
!
7 u7 H2 d! t/ g# t9 F9 X( Ginterface FastEthernet0/142 e& W4 |4 q. l
no ip address
( J$ Y9 s1 v5 W7 @- g!
8 S2 I4 L% E4 {  @- K6 G4 Finterface FastEthernet0/15
* l# U) u$ w; x& S- e8 W1 I no ip address- D' u& z% w, V; ^( \
!  w$ Z5 ?9 ^+ P$ N. @
interface FastEthernet0/16; U, `3 W9 m9 E$ m7 C# |
no ip address
7 w& j( `" X* P! x" v+ n7 L!
. v3 x# W, R" A& z) zinterface FastEthernet0/17
1 T1 H6 L: ]; ?1 C' P* B- m7 V' V no ip address1 t; e+ G! [8 X  x$ U) F
!
  D, y; e  M3 J3 [1 Binterface FastEthernet0/185 E, `: y% r  y- Q% K
no ip address5 R: t; s4 P) m9 I
!
1 ]; m# m# g7 @9 d* ointerface FastEthernet0/19( E3 Y' C8 M' |3 s9 l- N' N
no ip address
9 k' G: Z! S: [, w' o" o!. P7 n' v4 U1 n/ z2 g& Q- s
interface FastEthernet0/20, v; J* h- A5 e+ L. G% u( O7 U/ q) K
no ip address# }$ A3 N5 {& j
!
2 G: @# V1 I+ }/ Tinterface FastEthernet0/216 e+ t+ `  O$ z' b9 M  s
no ip address' [% A: }/ \: l
!* j' A/ ^( U/ s+ B3 j
interface FastEthernet0/22
' w# o0 x) @3 C4 c4 m no ip address
- Q# d2 p1 i$ X5 L7 Y" R3 v!; S( e% s% c2 T% j: Y$ \! o( n
interface FastEthernet0/23
  t7 h# [/ z& n* s* L' m no ip address9 _' S: ?3 u" p. h0 c
!
4 A6 t: _$ H$ m9 Qinterface FastEthernet0/24
* d& e) T6 _6 H# k no ip address
' E8 e' ~$ d- F$ Q7 [( [!
$ }+ |7 w6 W: {2 I' t& I9 G% ~& Ointerface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]]
7 m2 s3 W5 q4 p- `( ]! ? switchport mode trunk- T# e$ S' d! p  f0 r
!' N5 }7 _, f+ m
interface GigabitEthernet0/2
) O1 ^! y8 W4 ? switchport mode trunk
: y7 ]( B; {' C; s1 g0 s5 ~!7 B5 S8 K  y' l
interface Vlan1             [[[ Vlan 1 = native Vlan ]]]
$ [- `2 X$ v, C! C ip address 172.18.25.203 255.255.255.0
$ W' u8 D# G) d4 Y' p9 L+ }7 B!
8 n9 ]7 Y" ^) V* M% B- b7 Finterface Vlan2$ N+ S) }5 T' x+ y  L7 J
ip address 172.18.25.203 255.255.255.0
/ H2 s4 M$ P: C/ v8 |2 q! X!
; T( D0 |# G$ q' v3 qinterface Vlan38 S3 t6 T1 T. d! s
ip address 172.18.25.203 255.255.255.0
- e8 N: f( Y6 b$ Z/ X!' X5 E3 ]+ y0 F4 y7 t* f/ U% t
ip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]
4 M& O$ p1 l! W$ |!) J9 V5 u% U( b, y5 S; d. P
snmp-server community admin1234 RO) m5 X5 G) O6 S! r, r
logging 172.18.25.37     [[[ Set log server IP address ]]]
1 ~) u2 @# h# ~( J+ T2 Y!
/ I! M2 z- d3 zline con 0
9 F! L3 w% }) Q# W; g password XXXXX
& ]2 c4 u' ?( `2 O! ]" d3 U1 uline vty 0 4& q" E2 p  b/ j. M
line vty 5 15
  o( }/ C4 a/ O4 b7 i!/ m) ]' d6 Z3 U
ntp clock-period 17179912             [[[ NTP = network time protocol ]]]. y' N7 B8 V7 }
ntp server 172.38.225.218
# f. X" w3 |' H2 m  E) Nend
Bill Tang     MSN:billtang@openplatform.com.hk
Openplatform Technology Co.,Ltd. 資訊坊科技有限公司  
無線工程施工、方案設計、無線產品、天饋材料、終端設備綜合供應商
Tel: 852-27491011  Fax: 852-81483532

返回列表