Board logo

標題: Cisco 2960 設定示範 [打印本頁]

作者: admin    時間: 2011-12-1 23:50     標題: Cisco 2960 設定示範

no service pad9 l! W; O2 l5 w: X+ Y8 r5 U5 q9 t
service timestamps debug datetime msec localtime show-timezone
+ }- \" i1 h9 u! L9 B0 ^service timestamps log datetime localtime show-timezone
7 G! l) R* ?; D$ @& j; @5 A& Dno service password-encryption; q9 I) p$ h8 U: r% I0 C
!
* [2 U( |2 Y, vhostname MY_SWITCH      [[[ Set switch hostname ]]]
' |& k" H! x- ]+ h- ]1 S# u" O+ A!
% j) Q( Y# L! ]% }; {1 g, vusername XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
( r9 c5 E# I  k" Xenable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1
" h8 |/ }& a# u, U: D!& a& B: \6 D1 s
clock timezone HKT 8      [[[ Set Hong Kong Time Zone ]]]
( N8 ^6 H+ y# H) [$ n!4 ^6 p/ J7 z% {
vtp mode transparent               [[[ VTP = Vlan trunking protocol ]]]6 f, ~# B+ r& y
!( g- [& y- |3 Q) s9 h
spanning-tree mode pvst
, X& T8 c0 }* E  h' h# nno spanning-tree optimize bpdu transmission( }5 W0 R* u+ y0 E1 H& l1 S
spanning-tree extend system-id! y. t& _, `& t% w' l9 y( w0 ?+ |$ W
!
3 o5 V8 U; i! \& N8 F4 C. Ainterface FastEthernet0/1      [[[ Set access port in certain ports to allow certain Vlan ]]]
) L! R: `3 ~1 c, Z8 o( ^ switchport mode access
8 L7 C7 L& q4 P8 G, o switchport access vlan 2& t1 j- e" P' a( U
!
6 A' U9 A) k; \interface FastEthernet0/2
# @; B9 X' Y! Yswitchport mode access" J8 @( C$ k. Q, L. C" m! Q8 o& t
switchport access vlan 2
8 R7 L. D3 }% d% K! l7 f!6 C3 d; Y( i/ U: V2 S& X' O
interface FastEthernet0/3
# M  s! [" F" b: Q$ Z7 b; Wswitchport mode access. c, A3 Y# r4 I# d
switchport access vlan 35 f* Y4 |" r) ^0 q0 s
!
) n' D5 l% D: k7 `3 J) v+ Jinterface FastEthernet0/4. y, |% V, {: n+ n4 y% l% c
switchport mode access; h- V' h/ b! L1 g  p
switchport access vlan 3
+ O8 u3 {' W) ]!
8 C1 ^2 a/ O3 B* e! b! f+ Zinterface FastEthernet0/5
1 P8 W, Z3 `) q* t1 g# Qswitchport mode access
% w8 ^* E; ], P; \; Z# N( j switchport access vlan 2$ I5 v/ l5 n0 B* q/ |
!
: Q4 z( w8 \+ f7 L# N5 Zinterface FastEthernet0/6, _5 T. I! n1 T) ]" `3 t5 o
switchport mode access
& F: U- k, \' O) C switchport access vlan 2
6 b  i! _- D/ \!
2 y# B* M7 P# H$ W8 X/ f' ^+ O- zinterface FastEthernet0/72 `5 F3 Q' M0 |. Q- D, j
switchport mode access( w. r! ^9 H" ]" g# I! K
switchport access vlan 3
: t( g7 [& k& M; K!
8 A+ v$ R! F" ]interface FastEthernet0/8
6 ]& L$ s* l0 ?7 E no ip address
4 F9 r5 s& k/ j8 p4 l& Q# ?* a!
, w% d6 m9 h5 @3 \interface FastEthernet0/9
' [) K7 r' t) o no ip address' I* g3 D8 E" T
!
& B& T0 F& y- Binterface FastEthernet0/10" \/ X  P  M# r
no ip address
* u" l1 k* W( ^! i!
: H+ s: D9 ^  _4 j% ^' W' Linterface FastEthernet0/11
: k( _3 `( O6 _; J8 f# y% k4 vswitchport mode access. U! u+ v- G+ A9 I% u% l6 l/ _
switchport access vlan 3
0 K0 {3 v) p9 V  J3 ~/ n!
. S2 E5 R. G$ E5 {/ ?interface FastEthernet0/12/ D( g* b; a- F$ K2 o2 L( l$ C
switchport mode access
5 g  O4 z0 L4 D1 p$ F0 V switchport access vlan 25 h- K1 ^! r9 }3 ^  T$ o+ \/ g
!+ x6 |0 X6 O% r$ E) f
interface FastEthernet0/13! o$ W) J! B, U+ Y, M! [; z$ K
switchport mode access# S/ K& _9 T( k
switchport access vlan 30 d8 _! E# r/ g% n5 c
!  [2 J$ K0 C; J0 W( p
interface FastEthernet0/14
8 v3 Z3 D4 p- b$ P1 J no ip address- L. s9 N6 ~% j. i7 r) r% D5 v2 j2 }
!
- p1 Z) M% a0 L4 R3 i% zinterface FastEthernet0/15
" C/ P% Z7 u9 }. W: ` no ip address; P; F6 w/ T: T/ d3 ^: _, V
!: q2 |7 B* @$ H+ B$ X) n( B( G6 b$ y
interface FastEthernet0/16
1 W% P- t; j% m3 k7 n# [ no ip address
! O2 O/ d- p1 K; R# P- k0 q2 V!
% G$ ?& E* Z# F/ p4 h# k4 L$ [interface FastEthernet0/17
0 x# N7 C8 g- E- L7 ]2 J; k3 J no ip address1 }/ d1 ]% ?) y  w2 n9 T7 d) c
!
9 H/ g! p1 R  q/ l$ ointerface FastEthernet0/180 b2 t; ~& Y6 ?1 x, r+ a/ s
no ip address  b! H7 a0 N1 b. T
!
- i  j: y0 z, Q* O3 u' x& N" y% Ninterface FastEthernet0/19
5 p, [& u4 ^3 S0 [8 ~* b no ip address) ]8 O* F4 m9 q5 l1 q3 ^
!! @. x- Y7 E& v
interface FastEthernet0/20" Q; C3 m2 l6 N. Y, H; o
no ip address
9 j+ x' h& [7 j!: y$ q8 N; `4 ~! R: Q
interface FastEthernet0/211 ]$ Q! t1 U- x1 q9 X
no ip address
, E& f- `3 l; \/ o!- X, ?- v% w) F  W
interface FastEthernet0/22
% X5 @$ X% m' L: H% U5 A no ip address
& {- y5 K8 z8 Y( Q" n!
& F; l  {- j. Ointerface FastEthernet0/23, E. Q3 d+ y9 G, Q9 g
no ip address3 _+ H) a4 K* c) }
!
1 e, v! y, p$ X) ]0 ~5 f: cinterface FastEthernet0/248 |$ ~7 M( W0 j
no ip address
+ A+ q8 w; u- u9 F( l; ^% ?) `% O+ N!
& h. f. Y' O9 o) J( Qinterface GigabitEthernet0/1    [[[ Set trunk mode in uplink ports  ]]]: [* Q, \" z2 J
switchport mode trunk
0 a4 {) {5 z# [# ?2 ]!
1 O7 }0 a6 O. e+ \4 |& s& q" Linterface GigabitEthernet0/2
6 [1 N7 Q1 m" o( ^( N0 S switchport mode trunk
: a5 ]7 m, q3 Q( X& {( G!+ ~* N3 ?) g% r
interface Vlan1             [[[ Vlan 1 = native Vlan ]]]4 V: F5 U8 U8 q/ K
ip address 172.18.25.203 255.255.255.0
& X  v' g! G7 `, l( P  N1 d5 ?!
2 U* \/ K- [, t0 k, f+ Ginterface Vlan2% e6 {: H0 ?. j( u; d) W9 {
ip address 172.18.25.203 255.255.255.0: ~5 E0 R. @8 A+ Q' D( F
!
  D( \4 V6 F0 T$ @/ h; Qinterface Vlan3
/ `& m+ w! a5 Q" ]3 m0 i- Y% q ip address 172.18.25.203 255.255.255.0
* Z# l+ g2 x1 E5 I8 |7 e6 |3 h/ |!
4 n, \3 c, }4 p8 i8 `  P. n7 Aip default-gateway 172.18.25.44        [[[ Set gateway IP address  ]]]]; @" ^( A: {5 e  u* g+ N& }
!
. i$ C0 z: a, T0 k- }; ]4 esnmp-server community admin1234 RO
" w6 Y& k4 ], mlogging 172.18.25.37     [[[ Set log server IP address ]]]" p8 i" I- s( ^8 J$ _
!
3 k/ x: ?$ z; V5 bline con 00 V8 d. Y4 w$ `6 W% {2 Z7 j# M0 ^; @
password XXXXX
; [4 m% h  u5 L1 [' N( sline vty 0 4
: s1 t/ d8 n) e& \/ l" k! E( iline vty 5 15+ B' q. b; s2 C! H) ]3 n9 `1 H' q
!
- @  ^! z8 [  ~0 @& ~, i2 c* z, Vntp clock-period 17179912             [[[ NTP = network time protocol ]]]
  X8 W( K* U' G! f6 zntp server 172.38.225.218( Y, q5 Q! m7 ?- G# @; X' n) @
end





歡迎光臨 How2Do (http://forum.how2do.com.hk/) Powered by Discuz! 7.2