返回列表 發帖

Cisco 2960 設定示範

no service pad
& S, G( I' k. t6 a& M4 B( rservice timestamps debug datetime msec localtime show-timezone/ P: n- K; [7 d! I( L8 y
service timestamps log datetime localtime show-timezone
; B, {1 N# |2 zno service password-encryption9 I) b9 U: e5 j2 d4 V
!
9 [5 ~! b8 K9 n7 a, ]hostname MY_SWITCH      [[[ Set switch hostname ]]]
5 ?7 {  P) `$ T!
% Q' E/ w' S2 P* v7 `% U0 V9 jusername XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
. E: f0 N9 K/ Yenable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1
/ m1 Z- e3 r/ }% k9 C' |/ c' p!! M  c* f7 _, c  |! ~+ q
clock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]
8 ?6 ]5 A! b' S% l( o!3 O  T$ d3 w- ~4 L
vtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]
# K( d+ q; g5 w+ Y7 L!
) q+ S- d% _3 P4 {; U8 Z) D. e. p7 zspanning-tree mode pvst7 Y% \# N4 h9 N1 Z# ?8 j: d
no spanning-tree optimize bpdu transmission
) Q7 P0 ^1 N* B0 j, m" U. \( ^1 lspanning-tree extend system-id
1 K  _- G/ I+ S/ H# ?  V! M!4 H/ L* J5 v9 F& H! B
interface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]) c  d6 n8 Q2 ^& l) h
switchport mode access- N0 \3 V! x! w+ {, p  g
switchport access vlan 2
# |) L, S3 o. }( L" W! z! U!) {' y9 Z# A+ l3 M$ ?7 q- S6 P4 L
interface FastEthernet0/2) |$ D. I, V6 U4 P) k; Q) ?. O
switchport mode access
$ P3 {( X% z0 c4 H3 G, J% x5 }* k! J switchport access vlan 2/ W$ M) a' ~- s9 V9 G& t5 T
!
: t7 ^% p! X( r( B9 Finterface FastEthernet0/3( P; V: t% Y2 q8 h( w6 U
switchport mode access& Z+ ~% a* N( O* L$ C" c
switchport access vlan 3
8 a' `- P3 x/ y2 m& v7 _/ S! p!
& C% g% U8 F; D& Ginterface FastEthernet0/44 X. m3 O  U' A5 v5 D
switchport mode access
9 l: L4 `3 B6 H. E; ~" | switchport access vlan 3
: Z. |) h4 s6 b9 p/ S8 E8 I!3 i$ c$ ~& n4 a% I/ r$ R% }
interface FastEthernet0/50 r% A- f) y' n) b" c  ^7 `
switchport mode access
2 E! K- V+ @/ Q$ U2 t2 h switchport access vlan 2
0 z+ F5 y1 `* P* y% F0 x& O; {. q7 t!! {( S, E% K% E; P% g  n- a
interface FastEthernet0/6
" d5 F2 Q$ z# S. P9 R" bswitchport mode access
5 D9 o1 w" X% `- I- m/ { switchport access vlan 2
" t& X1 Q2 V) `* {!6 ]2 Q; M: s' c4 B( V4 V
interface FastEthernet0/7
2 d, N6 C9 N  P( Z8 a; \+ v% w. V9 sswitchport mode access
  G2 G. B6 W9 [- r4 K3 X+ _- T4 m" a7 S switchport access vlan 3' d0 q) i9 c, S' m: {' H
!2 N; ^6 g9 y7 b5 p3 b. N  t  n
interface FastEthernet0/8
: N4 z& e# g7 K) J9 _ no ip address
3 u. _9 R* M3 A- B7 b6 T/ F" ?0 r!" q* t5 {6 v! Q/ p$ \8 a
interface FastEthernet0/97 q1 a1 P% w; X
no ip address( \* ?* y" }. X4 q
!
. y- X6 b6 {" ~5 }# Uinterface FastEthernet0/10
7 h& e, v6 p5 E0 g8 E# v9 I no ip address
* N4 s; X4 V6 t- h# Z0 N# V!) u' Z  t; e, F" T' {7 t
interface FastEthernet0/11* z8 Z. O+ G( ^& _4 a' x$ }6 |; j
switchport mode access3 R$ f5 V1 V! J  L, S5 i* R
switchport access vlan 3: y: C7 j5 V" U$ r
!# `! t9 i  ?3 j1 i( `
interface FastEthernet0/12
9 o; h7 K/ q- |' S. eswitchport mode access. _0 a2 f# [1 F' m
switchport access vlan 2
% j# f- y# j: Y2 H7 R!
, P4 J; l/ p7 c$ _/ j: Z& f. Cinterface FastEthernet0/13
; w, ?5 \  @( e) u% I; Cswitchport mode access
) ~! }4 W# y/ j2 S  Y: U switchport access vlan 3
9 n7 r( o' @+ x' e& D4 Z, S' h!# D: B( v% W3 t/ \, t- C) k0 G
interface FastEthernet0/14
/ I, d  W' A! q+ N8 I) r- A9 H, T  v no ip address& Y6 V% m- G9 \2 d# d+ x- O
!) q# t- S+ V$ W) A! Y1 n
interface FastEthernet0/15$ S- k* v9 w1 I5 H1 `
no ip address
. z" v3 f( O. ]3 m!0 U, m2 k* {! ?" o( N
interface FastEthernet0/16
+ s& W1 h1 ?" | no ip address
. ]4 [4 C3 \( l: X4 P!5 A2 Z& I5 _( x3 X( m3 y# _) J
interface FastEthernet0/17
( j) t9 o1 B2 ], e/ F no ip address
  F  A" f5 H: y, w!. A4 d; H" Q4 D: W  u0 K
interface FastEthernet0/18; o/ h/ c) I& w3 q' n& ]9 p- e  Q
no ip address
& G/ l- S6 B; E  [( v6 ^$ v!, h% d. W! k% {& O( p2 t' w8 Y, p
interface FastEthernet0/19$ T8 g$ [0 J6 C# U
no ip address
3 m+ W" U7 d0 J! Z9 t/ Y' V!
9 p- i6 Y0 Q( V  c' [: A9 Uinterface FastEthernet0/20) I$ r6 X8 [6 O; x: G: ~5 P
no ip address
8 _, i1 g. ^; ?. l2 m6 r9 X8 p/ @!
1 E/ y6 X# n: {; X2 c0 xinterface FastEthernet0/21$ b3 \3 Z% H/ V2 o
no ip address
) m+ b0 H# w. ~) h8 `  e1 Y7 b8 N!( F' P  f. W. N7 {# |
interface FastEthernet0/22
4 z; l3 K# S' Z5 q no ip address
; ]2 I: w$ }2 I6 Q/ u5 T' [/ L0 T1 ?1 l!9 [- C7 R2 H- Q& B$ y
interface FastEthernet0/23  S, C2 X3 {4 }9 W& Q, b
no ip address; i& B2 x" ~* M
!6 d( g4 S) g" B4 G: I
interface FastEthernet0/24
. \, U2 E' u! `/ u no ip address
: [7 H; w5 r4 y" {1 J: A4 n!& B' ~& V" T  ]" ^- C
interface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]], b9 O4 w& @8 {! x& ]
switchport mode trunk
+ G0 r) A9 o# C4 o/ W4 Y' K4 {- X# X!
. i( X$ w5 N2 @interface GigabitEthernet0/2
: G1 @5 }8 P) e$ z switchport mode trunk$ b. D, l" U( x! j) s& [/ E
!
" \0 j; L* ~, Binterface Vlan1             [[[ Vlan 1 = native Vlan ]]]" p! j& E" V* R$ ~+ \% ^
ip address 172.18.25.203 255.255.255.0+ J$ c, C5 s8 {" M' [5 R
!- l, m5 d& O, x5 [
interface Vlan2
) _  d# i$ Q7 U1 D ip address 172.18.25.203 255.255.255.0
; ^% P9 t$ |( Q# t$ W!2 V2 G1 H; ]" C' \% U& h
interface Vlan3! a# W0 k2 ^* V" S) A
ip address 172.18.25.203 255.255.255.0$ K5 I& t( o# [$ s1 Q* O2 H
!/ b, R+ W, K( c
ip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]; \, q- _  E+ S5 {# E( e1 M% @
!5 M9 `" G, S4 N; \8 P' f
snmp-server community admin1234 RO6 y! E5 y& J6 W3 y
logging 172.18.25.37     [[[ Set log server IP address ]]]& _; n! w0 J+ H3 I: G
!
; Y3 c& |' s- S% l7 O8 _' zline con 0
; \5 y+ ~# g9 `* ~6 d password XXXXX* l# o6 X' L' T% k
line vty 0 4/ H6 j0 d0 m9 E
line vty 5 15
* `- p6 b- [7 M' m!# i8 B, p) M. ~6 W, H( i' p- R
ntp clock-period 17179912             [[[ NTP = network time protocol ]]]
8 _7 H$ ?$ k+ Ontp server 172.38.225.218$ ~1 B9 w5 f) h( @& z1 ?! f
end
Bill Tang     MSN:billtang@openplatform.com.hk
Openplatform Technology Co.,Ltd. 資訊坊科技有限公司  
無線工程施工、方案設計、無線產品、天饋材料、終端設備綜合供應商
Tel: 852-27491011  Fax: 852-81483532

返回列表