返回列表 發帖

Cisco 2960 設定示範

no service pad
# P, v4 q7 f9 u3 Xservice timestamps debug datetime msec localtime show-timezone
2 [$ `! x2 y/ c% q! Hservice timestamps log datetime localtime show-timezone% W4 r# C. q: x
no service password-encryption
/ n. {% [3 a6 u, V" P: g!9 g8 l3 l* w1 j' u
hostname MY_SWITCH      [[[ Set switch hostname ]]]
- m, K$ X1 G0 B3 z!
& }9 q" M: z1 \( \3 H- ausername XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
  [( b% F+ U3 a  w3 \enable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1
4 N* g3 L- w0 w- J!
( ]* u! {/ e4 {! y0 N: w5 x. \clock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]. h8 B% ~' h% ^
!
8 i$ E: i0 |: Svtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]1 c% Q- [2 m7 a7 P
!) W2 e% |+ p& ~4 \
spanning-tree mode pvst
0 T0 B. h  D# Z0 Eno spanning-tree optimize bpdu transmission& X4 C; J+ B) J" }6 _
spanning-tree extend system-id8 W) n% H: B" @% s6 j
!! q) d7 K; J3 n1 p! J# y# e9 B5 ^# E
interface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]8 n: B" d4 ^: U
switchport mode access. K' d( M7 D* V( ?% a' U
switchport access vlan 2
: S# l9 B* X3 T$ T!
# _5 ~6 a( e- l' S& o+ C- sinterface FastEthernet0/2' ~2 L4 F( |- K' y/ r) _% L- F
switchport mode access$ O- K' @1 \, D) W8 _7 w* y) B
switchport access vlan 2
6 x3 D9 m1 R3 t$ Y. R2 J!+ A6 a0 ?/ u6 v5 z+ ^' p
interface FastEthernet0/3. o# `  o/ G  Q5 O  H! t
switchport mode access
6 o" Q+ |( N6 J( g( h switchport access vlan 3
/ m7 ?' g. }2 X8 M& y) ]!  C/ l, }  z" c; q! Z3 {& a% O
interface FastEthernet0/45 k, t' U! Q( o; V0 u; Q4 B& l
switchport mode access4 x  M8 F, b; E0 F
switchport access vlan 39 B' M, l1 L9 `7 F8 a* J- F- E
!' y, d7 h. b$ |. L. g8 Q
interface FastEthernet0/5
# A* }' \% |9 t; H# {5 T: Dswitchport mode access3 Z; l' w' H" E
switchport access vlan 2+ a" Z1 f% T) j! a
!  }& I! O& m5 k6 d- M
interface FastEthernet0/6
" u8 ~- i( e3 X1 U* n' A2 r6 W% yswitchport mode access
" v8 N, B) O! s6 T$ r  Y' K% R7 t switchport access vlan 2$ H( ?6 H, h) g% x& j
!* F; x% q+ K8 \
interface FastEthernet0/7' F- I  }+ v- p" A9 }* F& Z  n
switchport mode access9 V* P- a+ x( e% G! N, _, j
switchport access vlan 3; G: U8 `( n. t9 L; N$ o
!
. D/ ?: n+ s+ @! ~* uinterface FastEthernet0/8! u5 M, s, k2 j  j* @3 D
no ip address
4 n" v; c2 V! G7 X!
. F. \& Z# o/ q- |interface FastEthernet0/9
0 j% p& V' D2 o  E no ip address
; p( H' q8 N. s8 J$ i% D!( s; F7 O  i* v
interface FastEthernet0/10- ^% n$ T0 _, f' R7 j
no ip address: `; M( P* a' m
!
0 d2 ]+ q! ?0 m' B! }4 hinterface FastEthernet0/11
; B: b6 U  b, g1 e+ x" m/ [switchport mode access
5 ?! l5 ]) g5 D, v switchport access vlan 3! v$ C' P* K( u* p
!8 {2 e3 T, x- E" _. l
interface FastEthernet0/12
! I% G) m# ]$ f9 @" Yswitchport mode access
  _6 d; r4 v- ? switchport access vlan 2
6 N8 s5 ?. Y% D4 G) Q, C& |8 D!/ t/ E( z0 z- M' J; I5 q( S
interface FastEthernet0/131 ?- S4 b- C9 J7 X& E
switchport mode access0 `& F; P$ Q+ L9 V/ j, P
switchport access vlan 3! x/ [) F4 r$ y$ Y- Q" ]
!
- J$ i( P- N8 w7 ~interface FastEthernet0/14
9 n. d3 k0 ^6 ^7 J) m" L' L no ip address$ K" a  @4 ]4 t+ k
!0 b3 k: P! G% }6 e
interface FastEthernet0/15) C: L9 q- ], ]5 C" i( t+ i
no ip address- {. {! |, J! B8 e! I9 Z
!
1 V9 E/ R, h- F+ n+ t5 B9 einterface FastEthernet0/16
& E, m4 J6 q5 V, x- e) s no ip address
& T! t' n" [5 d!* `0 \3 N3 U% s: g+ ]
interface FastEthernet0/178 w; `9 |* H( T% [
no ip address
! [! C, d) Z6 ~/ x!
: C. z1 d2 Q1 o. J5 u- p5 `interface FastEthernet0/180 b" n# `2 i& i3 a( r4 }
no ip address
1 k' I* r: O# _" @& s/ o# c4 M# C!9 V: S2 H. Y  a) m% t& i( q! I
interface FastEthernet0/19
2 u% ?6 a6 Z7 |; t) i no ip address8 c, q% D4 ?8 X' M$ }3 o9 `
!
7 B) n6 _1 d6 q1 y& g  t4 Minterface FastEthernet0/20
/ Z( I+ _% ^( x$ |* ~! ~ no ip address. A; o) i- n  Q0 o# Y9 m
!
7 C% v. b1 }# L6 yinterface FastEthernet0/21
1 a( O/ R2 ]5 `, f% S/ Y, R% l no ip address! G2 h- |0 ~" k0 _
!, \1 o0 o# n  ]& Z4 t1 m
interface FastEthernet0/22( l0 \* f( B9 m7 i' i; v
no ip address
" @' \* O8 @2 q3 o. J!
0 A# v+ D6 O% r5 s" Jinterface FastEthernet0/23
  X& N! K- b& y, E, o) q no ip address0 m8 W) h$ {+ I$ J* k0 C: b
!% a1 y: C( c2 b$ \
interface FastEthernet0/24, G0 i1 N; G5 M- q" D" ?6 `
no ip address
8 g3 Q0 k: r) |* D+ q!
1 J/ C- e! ^. Cinterface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]]: d% j; n" I( ^. N& m
switchport mode trunk- V6 l+ ^8 j  u7 @! c
!) ^3 L! F' ^' a4 G% E8 `4 ^
interface GigabitEthernet0/2# t* `4 o7 M! `2 h2 h
switchport mode trunk
$ w  Y# {: W1 n; q$ J4 y. B!
' G! N4 I2 f5 linterface Vlan1             [[[ Vlan 1 = native Vlan ]]]/ C. c6 d& m: t  g! S: n
ip address 172.18.25.203 255.255.255.02 P* ~: e2 K- V2 r7 O/ G1 F
!
; _1 w% [+ p. Linterface Vlan2% x$ B' q9 B/ N" H3 ?4 o) i
ip address 172.18.25.203 255.255.255.0
5 z8 {5 }" B4 j6 A!. N7 g- w/ ?2 W8 y- i
interface Vlan3
! b" W9 _0 N' n- @7 J; Q% Z* b ip address 172.18.25.203 255.255.255.07 D, v' U( S7 V  R( |# x% N
!
5 z. c$ z  t+ X. q5 }% Nip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]
4 F, h# X4 W; V  `; C- M& x!7 n, y* K- d6 G
snmp-server community admin1234 RO4 V' _) Y3 a6 G2 l! ?8 O
logging 172.18.25.37     [[[ Set log server IP address ]]]( V5 ]# \% k& H7 V* _% O4 v
!
; n5 \( [% @' @! E6 u1 Vline con 0
. _. J6 P. J/ p' ]4 U/ P. d$ F password XXXXX! X+ l! k% d8 R3 O# V  t- j* U
line vty 0 4
8 J( x' i- c+ k8 C7 yline vty 5 15! x, x: V3 V9 c
!
6 O% w! N( _+ Yntp clock-period 17179912             [[[ NTP = network time protocol ]]]. B4 a% e4 @) e0 g2 p  z
ntp server 172.38.225.218
+ v, E5 K; t3 y- Zend
Bill Tang     MSN:billtang@openplatform.com.hk
Openplatform Technology Co.,Ltd. 資訊坊科技有限公司  
無線工程施工、方案設計、無線產品、天饋材料、終端設備綜合供應商
Tel: 852-27491011  Fax: 852-81483532

返回列表