返回列表 發帖

Cisco 2960 設定示範

no service pad
, d: w+ l9 W2 R: P: F8 ~5 \service timestamps debug datetime msec localtime show-timezone
5 n7 K& I0 N/ eservice timestamps log datetime localtime show-timezone8 v! Q: j1 b. O' L0 W1 o( F6 l
no service password-encryption! [) w+ Y' e; x" X
!
% ~' S" [3 C- i, Yhostname MY_SWITCH      [[[ Set switch hostname ]]], A- Q+ C( ]- h9 K5 @  o
!
* V  p  |& t5 s1 b  S% \, Wusername XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
( z& o! m# v2 {3 ~3 e0 Renable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1( f1 y# m! {) i! c1 C1 \
!
& D9 ~. C/ |) J" j- Pclock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]
1 [2 |8 F7 t3 `' x2 R, E!. }  G7 a' g  r" H# V
vtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]& F% }3 u+ e( {2 n2 c9 V* e
!
, k! C! O: ~5 J- C/ ospanning-tree mode pvst* v/ e3 @( P, ]1 F
no spanning-tree optimize bpdu transmission# z$ G- B8 t/ ?: r1 m' y
spanning-tree extend system-id$ Q1 ~+ ^. N8 _3 o, z* X
!
" @, b. p) v/ r! J* p4 jinterface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]
; |6 O9 N2 x! y" p. K7 T3 B switchport mode access
5 p' s* d( s4 C. O switchport access vlan 2
7 L4 @9 G4 b  J6 L# ?!
& F; P* l1 L$ y: _5 Vinterface FastEthernet0/2: y: y3 o2 t% D
switchport mode access
5 p1 b1 t0 W5 J  i- ~ switchport access vlan 2
4 Q6 w/ O* }/ C!( N5 M4 n0 R2 \# t! s1 n
interface FastEthernet0/3, ], R  |* E; n1 k
switchport mode access' k7 J9 I* o/ h+ E% ?5 n1 O
switchport access vlan 3
. ]+ y; z& T6 A  M8 p, `  c!' ]$ O( v% Y; g( F1 |7 L
interface FastEthernet0/4
& T9 x" p( [2 c' fswitchport mode access
& ?  h+ ^" M9 [! ]) E$ _  R switchport access vlan 3! b6 Q; q+ v: s6 d6 d. b( G
!
: F: ]/ G9 r, R0 @2 A! G/ T$ Ointerface FastEthernet0/5
; D' s; i- c4 T8 k7 Uswitchport mode access
7 A! u5 F2 w- V switchport access vlan 2
! A  d) V" e, M!/ T: t1 u6 }2 g/ i/ o' O1 s5 V
interface FastEthernet0/68 ]7 H4 W+ r7 A, t, F1 j8 I
switchport mode access- M  l) F3 q: `0 U4 {
switchport access vlan 2
3 s2 s! v, G0 Z% e. v) f!2 l7 u; Q. `+ T  b! L
interface FastEthernet0/7
. |# A! n0 O; J1 g; \- ?switchport mode access) \; @8 x! \2 B) O+ M) w
switchport access vlan 3
$ M' Y2 r. z( v: Z2 k9 ^!1 ]" a- {/ n' b+ ^0 p+ [# }1 w  Q
interface FastEthernet0/8$ A; Z( z. Y  v; b& C7 F7 P
no ip address
+ @, h/ U4 `9 k8 q. j  K2 t* w!8 Y4 D( V" t1 \1 s1 ]
interface FastEthernet0/9
) ~! m$ C6 u7 T no ip address
" Z! a8 v0 O4 t: i9 W0 c!
' m0 g8 n4 \1 hinterface FastEthernet0/10% W' I8 Z: i5 P8 ], ^
no ip address
8 ~2 F0 m2 l" }) i% n: S!$ ?: P: U! ?  s8 ?8 ~* Y1 m: |* V
interface FastEthernet0/11. a: b5 E  ^" x' t* W9 T
switchport mode access
) L- R. L7 T. ^2 q. a switchport access vlan 3
# m+ b3 s, z2 a2 l! T$ G; \9 ?!: i* E% n' m- {' S! X% B
interface FastEthernet0/12
/ W' K! H9 a, s/ uswitchport mode access
1 l8 S0 h! O. G) z: b switchport access vlan 2
7 _- B# g# e) O  J6 a8 G!# y  e; I0 g; C" \# I+ c: ^, g7 D
interface FastEthernet0/13/ Q' x5 {1 L' J8 Y, f( m  J. a. U
switchport mode access: D1 j1 D" X2 ]0 M9 h# C& F7 C. m
switchport access vlan 3
* e3 y3 [2 _! o!
6 o: z( |  J- e8 Minterface FastEthernet0/14
$ w0 U8 \9 t! A1 G# D, g no ip address7 C( F# ]( J3 V# ]0 o; Z
!# u* w8 W- s( a5 e/ `( F8 p: \
interface FastEthernet0/150 v1 G1 _5 T4 x
no ip address
! J: ]; N: v% i!
  w4 i9 |4 j' ~' y) P8 ~/ f: tinterface FastEthernet0/16
  J* p! A! x3 V% g' z3 y/ X no ip address/ S: C, a8 g; Y
!
5 `6 Y  d: y( E! l4 rinterface FastEthernet0/173 s- k9 J& a9 Y& `
no ip address
  \4 Y2 _# }! ?; Z0 N% k2 Y* Z, R2 y% @!2 R8 M/ \. ~/ l9 h& n% U
interface FastEthernet0/18
9 {& V. ?$ b( V! k" k no ip address/ b, R* S/ W4 [3 o) s6 ~
!
5 G5 m* w& ^1 o7 Ninterface FastEthernet0/190 C) u3 b/ P5 ?. i: g, f+ O$ ?
no ip address- I: i! o% d! ?' ?
!" T$ a/ T# Q( d- M) `. O
interface FastEthernet0/20! d1 r& `9 k+ u/ i: |2 w; k9 T
no ip address
: @% Q/ g' g' @: `!
. B- `* h- t+ U, H* R" U2 ^7 ainterface FastEthernet0/218 p/ n$ u$ j9 t4 v: k
no ip address, x- F! o1 c. B8 a. M  {
!4 @' Q3 k! v3 h2 K
interface FastEthernet0/222 _7 Z8 V1 o$ J5 x! x( ~6 f- t
no ip address* V4 m4 ^2 n* X3 t" l1 H3 K
!
2 L/ \9 N- g- @5 S- minterface FastEthernet0/23/ {0 M" d/ e* G
no ip address: p) R% D7 R7 g" x$ h& T) A
!/ H, v, [# [3 ~* ~
interface FastEthernet0/24
" w5 C% w0 ?6 u1 S$ O7 e8 f/ ?. W' F no ip address
+ h, O( Y% B4 F7 z( e2 S!
" K, L4 W" \/ x8 w# ~  X( C0 Minterface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]]3 _. }8 s1 h6 s3 \8 k, E5 }
switchport mode trunk, @4 ]% |1 O, g7 s6 w
!
4 r2 \1 H7 ~1 N: Vinterface GigabitEthernet0/2
" ~  ^/ H$ N7 }9 d9 \/ a switchport mode trunk3 ]. i6 M! D. C2 h7 t  L+ q- j( N
!
  J+ ?4 j5 z$ ~interface Vlan1             [[[ Vlan 1 = native Vlan ]]]' T, ~5 G# f0 X# g4 a
ip address 172.18.25.203 255.255.255.0
* H2 [6 ^' Y' {$ f! S!$ k: Y7 X; H$ `( K, q- v
interface Vlan2: d* N# V( m, l. i: V) P' _
ip address 172.18.25.203 255.255.255.0" |- m# e% Y9 z# X5 g
!
) f% [4 \# W7 K: s% f% ^- B2 L9 sinterface Vlan3$ x- |) E% z& S2 p4 x2 z( G3 G
ip address 172.18.25.203 255.255.255.0) X* U- C' }% k3 b5 {0 w5 _
!( ~% @9 u$ t. T0 V0 N% ]; p
ip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]
* C5 ]- p) b7 |5 h!
9 d, ]6 F( e8 G1 j7 G. o4 V/ _snmp-server community admin1234 RO
+ e, \: H# I# `6 k0 h( tlogging 172.18.25.37     [[[ Set log server IP address ]]]
9 P, `9 d, h1 D2 L% X: p; Z!+ D; P3 B" p2 Q: A7 l$ z
line con 0, R6 [5 |- C. L9 w" I' ~
password XXXXX+ l6 E! y0 x6 {% @, E- Q+ ~
line vty 0 4" b0 V: g" l% V% \: T% u
line vty 5 15
" V. U; L$ o9 ^6 }8 A$ K! [!* t8 ~5 M6 E- C' L
ntp clock-period 17179912             [[[ NTP = network time protocol ]]]
- L" T3 P) ]0 ~; s) [ntp server 172.38.225.2185 J4 M7 D) t, Z8 q
end
Bill Tang     MSN:billtang@openplatform.com.hk
Openplatform Technology Co.,Ltd. 資訊坊科技有限公司  
無線工程施工、方案設計、無線產品、天饋材料、終端設備綜合供應商
Tel: 852-27491011  Fax: 852-81483532

返回列表