返回列表 發帖

Cisco 2960 設定示範

no service pad- O. }9 ?) z4 {1 w/ c2 T0 A
service timestamps debug datetime msec localtime show-timezone3 O4 m% w0 u: C; x
service timestamps log datetime localtime show-timezone
/ h$ a* W, u! I: n( t: F! ]" j; {no service password-encryption" s- `; q. z/ Z# U5 h% F
!/ U0 d+ _5 t0 ]+ ]' ]$ h
hostname MY_SWITCH      [[[ Set switch hostname ]]]+ r& ~; w/ L! f" R5 p. j8 f1 y/ e
!
; E+ z  P' N9 e$ e) O( v+ Ousername XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
  u9 b) }; _8 P7 h* Y' c! V, Fenable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1) q! X# p" a$ w5 l
!+ d4 w3 m- f0 F8 [( j( V
clock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]) @+ Q! C$ [: h& H) p
!# B! L& W3 \! B& c; r* J
vtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]
' M, W, t  y  h4 Y( y1 e!
0 Z7 b: m- ?* Y6 l3 Sspanning-tree mode pvst
& \( f0 ]6 G8 o9 y: R( z" `8 y4 sno spanning-tree optimize bpdu transmission
9 P7 p. o  c# R# nspanning-tree extend system-id
* |" H0 A! ^$ @3 k( ?!
5 ?; }4 O) t1 S" H' ^interface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]+ m! A9 ^& m. w6 n
switchport mode access( q2 S7 z1 f# N4 d2 `) o
switchport access vlan 2$ ?! q6 n: y  W( j) t- Q
!: k8 Z  _7 \, w& v+ K/ }1 s/ `
interface FastEthernet0/2
  b6 z# W) W; e* h# X" C* `) Kswitchport mode access
& O/ K7 G' ?" w9 u/ U! n+ A switchport access vlan 2, p6 a2 m4 c9 O, i
!4 j) f7 P% p# i0 U
interface FastEthernet0/3
- S) n* S' ]+ F! i* {5 F% X: Pswitchport mode access
) u" Z; u* d1 b8 ^# b switchport access vlan 3% ?* B4 ~8 C, v8 ]1 j
!
; o- j" B8 y* l" V( s; \- |5 jinterface FastEthernet0/4& s- I3 j) g$ X4 r
switchport mode access
" B# ^( V# {% u switchport access vlan 3# x; _/ i0 h1 g8 `4 ~. Z+ a
!
2 M8 h+ R! M# Tinterface FastEthernet0/5
' O, j$ n/ s& a, ^0 D0 ^* e: r: Uswitchport mode access  u/ x& D0 W4 W: Q
switchport access vlan 2& A7 W7 W: E" y: w
!: A, p; l  h3 W  Z( ?, B% M
interface FastEthernet0/65 E9 }2 W; Y9 q
switchport mode access3 d% ]( d5 g* d7 U- h
switchport access vlan 2
* d! Y; W+ ?  u!
% D/ {8 m4 b8 }% s" binterface FastEthernet0/75 L& l( u; m9 g- d
switchport mode access
; i0 B! I# m, [% t, W) f switchport access vlan 3
( k1 w( B+ x; z!
- z6 y. ?8 o5 n7 {interface FastEthernet0/8. k' u- x: V  I" m2 B! C3 P
no ip address0 t6 ]0 l9 w* G, u* k
!$ ~+ u% s5 _. K' r
interface FastEthernet0/9& d7 h+ w1 I8 C7 f; k* {
no ip address' E, d7 L9 G# J, v, L
!, N. N6 ]& j4 R* p, Z- r+ A; I
interface FastEthernet0/10
7 c1 c/ Q3 J: `* n5 A* t no ip address
$ K6 k1 j' W) }, Z3 A/ Z; }!
. h& ^; K8 [2 K1 r" A5 einterface FastEthernet0/110 Q! }8 P' W& z! x/ N- V9 G/ H
switchport mode access
+ X; r6 a* w; O# t% }- L& a switchport access vlan 3
/ r" d: V! u; D6 }!
& r' A3 q/ j( w, D( ?5 pinterface FastEthernet0/12. G! }6 i- S& D9 ]( L$ b
switchport mode access
# N2 u- U3 l5 M switchport access vlan 2: a' ^* w9 s9 |' c( z3 {
!
, S5 e  e  Z& f% u4 N3 uinterface FastEthernet0/132 a* p. k3 V, K8 c; N
switchport mode access
* x( M# n% W2 T8 i% U switchport access vlan 3
6 ?. D, e5 Z0 ?  W$ f; V!
* L4 C5 P+ C6 j$ C+ g; {( A% ?interface FastEthernet0/14
% O/ ^  p3 G: h: w, C* V' }" B no ip address
7 ^4 ^# v+ j2 ~! d0 j% C9 M. @!: k6 x/ R: G# C: O1 S
interface FastEthernet0/15
3 s- C4 ?, N& p/ ?: Q- M7 K no ip address
, G0 U. b" d: _3 m2 l  x. W!
2 o7 B) g' L: c4 H& ?2 jinterface FastEthernet0/161 a6 ]& j/ z4 i( I3 [, G; n
no ip address
4 h$ w, N: q$ P0 Y# B!! g3 D/ ~1 T. a2 L
interface FastEthernet0/17
; k, L' b! ]1 s+ C no ip address! K* j) K% y" I% T% U( f% d
!. B) u# s6 i% Z0 z
interface FastEthernet0/18
2 {, L% b6 o4 y1 T no ip address
+ W( @( u/ m$ ~& j!
: C/ G; ?  q: [: M. Jinterface FastEthernet0/19
2 u5 T6 X2 j6 C! y# ~- n1 w no ip address
9 r1 Z. j" q. M4 l3 U2 y2 F!$ j7 m  F. ~# l+ L
interface FastEthernet0/20
  f: Z' x9 S6 ~6 o0 O6 E! | no ip address/ r. R1 q- ?4 b8 |1 x. Z6 T0 C
!
* [: S/ p/ R# D8 linterface FastEthernet0/21
8 D9 c; n7 {' d' c# f no ip address6 c: |. ?  d0 C
!
! b: y' `0 M0 B& uinterface FastEthernet0/22
4 E( J5 p3 N( H no ip address+ Q7 K! b2 I$ c2 G8 y7 K% r1 U
!2 g) T" m& S3 s* W$ N& y* O- n
interface FastEthernet0/23
" u' Z* V$ s# }9 D# T no ip address
0 J, t( I* p  N) g+ E, @!4 N0 {; J, [$ r4 e+ R$ E
interface FastEthernet0/24% p! c% t/ `! K) z3 L( U
no ip address
' T' j: ^  d5 \!$ F2 `# a& r8 X$ W" J: `' A
interface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]]' G' u& }; F) E8 ^9 |* k
switchport mode trunk
, Z9 u, I! @: x!3 D( ^& B$ G! O) R. r6 Q
interface GigabitEthernet0/2& z& T8 D1 d0 z2 g2 O* x
switchport mode trunk
7 H$ r+ H. @5 [/ P* \( @/ ^!5 a& h% e% r) z
interface Vlan1             [[[ Vlan 1 = native Vlan ]]]
- {" F) `' Z7 `3 I4 d( s ip address 172.18.25.203 255.255.255.01 |7 u' a+ c3 v: M( b4 f
!
; N. |  i2 x' q6 Jinterface Vlan22 I* G$ }: x- ^2 e
ip address 172.18.25.203 255.255.255.03 O) g- u+ }& ^; H) r' |/ t
!
. |0 o2 ?8 q1 U" |9 E  h- `2 vinterface Vlan3# \4 j( }: z/ L0 C2 H% g3 I9 I
ip address 172.18.25.203 255.255.255.0
/ g. Q' I/ A. p/ S' L5 K. W!: N) J6 h! `- E
ip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]
  j! i% J/ Q! m& c( e8 Y!  |% y& p" A! P! A3 e
snmp-server community admin1234 RO$ J& ~* K: n" a2 y3 J
logging 172.18.25.37     [[[ Set log server IP address ]]]
6 Q: Q8 q1 Z: ^6 }1 F7 O  S!
$ R7 V% Z- l. B# _8 U9 T; tline con 0+ o* x0 t/ |$ F0 {. Z/ V
password XXXXX, G# ]6 Z' E* B" v6 c2 c7 j0 T
line vty 0 49 e3 q0 X. l7 ]
line vty 5 156 ^' X) v/ Q/ D9 M/ l# \" p2 N7 H+ j
!4 r/ p' p! [& ~( @5 d0 {- _: g
ntp clock-period 17179912             [[[ NTP = network time protocol ]]]
* C/ [. Q2 w/ ^- Kntp server 172.38.225.218+ W. n, o& k5 [; L$ s; t! k
end
Bill Tang     MSN:billtang@openplatform.com.hk
Openplatform Technology Co.,Ltd. 資訊坊科技有限公司  
無線工程施工、方案設計、無線產品、天饋材料、終端設備綜合供應商
Tel: 852-27491011  Fax: 852-81483532

返回列表