標題:
Cisco 2960 設定示範
[打印本頁]
作者:
admin
時間:
2011-12-1 23:50
標題:
Cisco 2960 設定示範
no service pad
2 v' [$ w9 b/ l# l0 U- p
service timestamps debug datetime msec localtime show-timezone
J$ R( ?( H# }/ g5 m/ W
service timestamps log datetime localtime show-timezone
& j9 H: a1 w! Z2 b* {$ Z9 L
no service password-encryption
- R; r# @. {# |: g
!
2 r1 R' N# j; i3 @
hostname MY_SWITCH
[[[ Set switch hostname ]]]
( |; }9 }! x$ r1 b. S# p
!
1 _8 T4 S; r0 K0 ]+ R7 i) W# w" ]/ x
username XXXXX secret 5 $1$i/aq$6gVcvlv2b7H6cLeDUGnhw0
5 b) O" a4 ]. S5 U
enable secret 5 $1$4KgT$eQ0xNzP8Q5lTdtLm/hFHJ1
4 |: ?( z. D' g) g# E. A
!
" g* e0 A) [7 a
clock timezone HKT 8
[[[ Set Hong Kong Time Zone ]]]
3 S5 l* S+ I2 ^
!
j& b# U+ ^) L# R% s
vtp mode transparent
[[[ VTP = Vlan trunking protocol ]]]
* ]4 w* ]2 E2 d4 n6 F
!
' s6 }& V3 n! P7 e+ Q% t8 v
spanning-tree mode pvst
8 a$ q' v: a# R6 s0 D" k/ s0 ~
no spanning-tree optimize bpdu transmission
( H, F, {0 _' ]/ T6 s
spanning-tree extend system-id
5 B4 ?- B9 S0 E. Z; K
!
N' p9 }* J/ J. N ]6 ?
interface FastEthernet0/1
[[[ Set access port in certain ports to allow certain Vlan ]]]
& W' r4 H1 t/ q; c4 |$ M" [7 B5 y
switchport mode access
# X3 X$ G/ D1 L7 u) W) l
switchport access vlan 2
+ l8 I$ ?/ b% d& {* C+ d
!
# F% e e3 e* K+ d2 F2 Q
interface FastEthernet0/2
4 p7 N# p* w0 R3 X% \
switchport mode access
6 H' ^3 A8 |" f& x: b: o+ ~
switchport access vlan 2
/ C( F N# D) H" E# H
!
3 g T1 w. d x* g+ O/ \& D+ S
interface FastEthernet0/3
# @" T- N% y# i1 [8 @3 S! e
switchport mode access
( l7 D) }$ ?7 d( v1 ^& \
switchport access vlan 3
1 u7 H$ ]" d9 e
!
% Z7 A! k5 ?; I+ l
interface FastEthernet0/4
- ~8 @- R1 P6 q! s i% W
switchport mode access
* x! k; k7 A: ^( M, o+ s/ D0 ?
switchport access vlan 3
+ ?$ f/ R8 J7 f# {; e% Z
!
! y+ h! T5 e D( J
interface FastEthernet0/5
5 D6 s( [+ e' K- ?7 [/ A
switchport mode access
4 K. r) v2 e8 H
switchport access vlan 2
; S( Z# ?/ j, l3 P- e, s/ @
!
4 \9 X: c, c) T9 ]
interface FastEthernet0/6
1 ?* x9 L: O# y* Q. S
switchport mode access
9 L( Y4 Z6 R* p& k& H. L: [ K. U( R
switchport access vlan 2
& [# f: G( A7 ]/ q2 r# s: M. C, S
!
! M" j. m( b; K w* q6 o& t
interface FastEthernet0/7
3 A9 `7 n1 s) \( K; \
switchport mode access
0 q9 ?1 Q6 k$ J0 J
switchport access vlan 3
/ ?6 e+ z1 o% [) v4 t
!
9 ^8 D q& B1 g- a7 d9 N
interface FastEthernet0/8
' _6 M' N, p0 V' g ?- O- k3 d0 O" f' n
no ip address
/ X. e4 {2 \/ C1 J5 V2 [7 F+ U" K
!
2 w3 B8 X2 O9 R2 ^/ U! A
interface FastEthernet0/9
+ C7 E' a& V( l
no ip address
! \5 K! S% e; i3 C
!
& h5 ~3 g, A6 u G- m2 Q! \) r
interface FastEthernet0/10
4 l: j1 }, ]0 ^8 F
no ip address
" t* w& |, b5 e/ B3 `
!
! e* W" H3 ~+ G. V; v1 ^" A
interface FastEthernet0/11
* `9 m5 q+ _! @8 n5 _: I
switchport mode access
0 ] } B. L5 g* I$ P
switchport access vlan 3
D$ n: C7 T; D4 s, V: g
!
* U* v, b& @5 a+ Z/ E2 E
interface FastEthernet0/12
4 T) E" F$ @2 ?' Q% @$ p% p! G( c
switchport mode access
- T- a; [" _; P6 w |5 L
switchport access vlan 2
6 h6 [: D) ~5 m; v3 ?( Q) R3 E
!
* B4 G3 R* ]/ H
interface FastEthernet0/13
& g1 I; s: V0 {0 A& a
switchport mode access
" a1 U; H9 N$ ?/ E1 b/ P: s* [7 Z
switchport access vlan 3
- d8 q; ]5 W4 Y' _
!
: w: P ?" d; ~' c( k4 s
interface FastEthernet0/14
( L2 \6 {3 t0 b' ^ z
no ip address
+ p7 g+ S* e: w
!
$ j4 ?% k' b# o8 l m
interface FastEthernet0/15
+ @: b# Q7 \7 |, J) h- S3 R
no ip address
2 _+ ]3 ?7 w M3 }( k
!
0 Y H/ {/ c( |& r2 v
interface FastEthernet0/16
; a" _1 X2 [7 x4 ?7 F9 I
no ip address
4 B2 x3 j4 H' K" |- H% T# c
!
7 s+ `. V+ Z6 u
interface FastEthernet0/17
8 Y4 m7 F* s8 c2 d
no ip address
8 ? x/ F Z! F7 G2 W+ h
!
6 p; l) C; _: g% E
interface FastEthernet0/18
) X4 [$ `, z* I" N2 l8 |7 t
no ip address
3 h$ ?. V# m* L
!
- e8 T& g6 X9 Q3 D L1 t
interface FastEthernet0/19
% f2 g) j3 e/ H$ t
no ip address
+ f8 e6 H/ A& I W3 ~. i
!
5 y. h7 C$ A, d! s
interface FastEthernet0/20
, b+ h/ @# \5 z( O# ]$ ]9 @
no ip address
3 a, q6 y6 b2 x. G) L
!
+ K6 e( e0 i) n6 ]
interface FastEthernet0/21
4 }1 U8 \$ H! x6 W2 }) t
no ip address
7 k+ t9 L" R" e" C9 ?
!
% m6 \# M6 _9 o- N
interface FastEthernet0/22
) |* y4 b, K# k
no ip address
0 Z. B; U$ B% {& C% W
!
0 P% f( v) {6 S P* T+ ?# C
interface FastEthernet0/23
& y9 E! d; o8 S
no ip address
9 J* q/ ]4 k6 P
!
* m, Z9 c5 E. J- x" _4 e
interface FastEthernet0/24
- M8 R, ]! H% g9 D. u
no ip address
- `! e$ o! l$ Y' ?8 g
!
# F( L, K; t. K! w5 u& k, X0 Q' N
interface GigabitEthernet0/1
[[[ Set trunk mode in uplink ports ]]]
# n R; t/ O# i
switchport mode trunk
5 f& Q+ R& U* |: |; J9 G
!
$ e. g* n: G" Y1 }* m. G
interface GigabitEthernet0/2
S$ W& \2 P' e/ t
switchport mode trunk
; x8 I1 h7 i1 Y4 m! [, `
!
- h9 k7 U5 |9 A2 i5 v- ~( |: C7 |
interface Vlan1
[[[ Vlan 1 = native Vlan ]]]
4 @3 B+ A; F- x/ _* Z2 T9 B
ip address 172.18.25.203 255.255.255.0
, C c) L( \8 J; E4 Y
!
. R) b2 |: Y$ s: l" ^/ k' l0 T
interface Vlan2
: @8 Q# E' E- l, s4 f& [7 M) O4 w
ip address 172.18.25.203 255.255.255.0
/ I1 J- S" F H
!
+ H. y5 w3 V7 y0 A
interface Vlan3
4 k9 ^4 Y3 i& J. s
ip address 172.18.25.203 255.255.255.0
( J. }8 l# u m& q! {% P
!
( Z6 d# `" `# [2 k
ip default-gateway 172.18.25.44
[[[ Set gateway IP address ]]]]
9 \' o8 I4 q. N5 ]3 z/ n" o3 v
!
A% d* ~9 C% J! @; y; i
snmp-server community admin1234 RO
2 w7 R( |+ x& A) Q# f/ h
logging 172.18.25.37
[[[ Set log server IP address ]]]
~2 Z& E# }" |) G, }
!
$ H+ i% Y9 P$ i `+ a
line con 0
1 s" B& j1 h+ ]& U. _( C0 l/ c! k
password XXXXX
6 T% o' B: e7 R4 c8 Z, [% r
line vty 0 4
. r% L" B7 v5 @4 L* n) ]
line vty 5 15
( C# y8 a! S7 ]
!
& k" S% K( d5 r) L
ntp clock-period 17179912
[[[ NTP = network time protocol ]]]
( e+ T: B8 | p9 }3 e& X
ntp server 172.38.225.218
+ W4 E! G% B p* Z* ?7 E
end
歡迎光臨 How2Do (http://forum.how2do.com.hk/)
Powered by Discuz! 7.2