C u hình switch c b n ơ
Mô t
C u hình các thông s c b n cho Catalys Switch v i giao di n ơ
dòng l nh CLI. Các tác v c n th c hi n bao g m đ t tên cho
switch, c u hình các interface vlan, c u hình đ telnet vào
switch….Dùng máy tr m k t n i v i switch qua k t n i console, ế ế
giao di n t ng tác ng i dùng s d ng trình HyperTerminal. ươ ườ
Đây là m t công c đu c MS Windows h tr .
Th c hi n
1. Kh i đ ng ngu n c a switch. Trên giao di n Hyper Terminal
hi n ra các thông s kh i t o trong quá trình kh i đ ng Switch.
% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]:
no
Press RETURN to get started!
00:04:13: %LINK-5-CHANGED: Interface Vlan1, changed state
to administratively down
00:04:14: %LINEPROTO-5-UPDOWN: Line protocol on
Interface Vlan1, changed state to down
Ng i dùng s đ c h i n u mu n vào các h p tho i đ c uườ ượ ế
hình t đ ng, tr l i NO (vì m c đích c a ng i dùng là mu n ườ
vào ch đ CLI (command line interface).ế
2. Vào enable mode xem c u hình m c đ nh c a switch
Switch>enable
Switch#show running-config
Building configuration...
Current configuration : 1473 bytes
!
version 12.1
!
hostname Switch
!
ip subnet-zero
!
spanning-tree mode pvst
spanning-tree extend system-id
!
interface FastEthernet0/1
no ip address
!
interface FastEthernet0/2
no ip address
!
interface FastEthernet0/3
no ip address
!
interface FastEthernet0/4
no ip address
!
interface FastEthernet0/5
no ip address
!
interface FastEthernet0/6
no ip address
!
interface FastEthernet0/7
no ip address
!
interface FastEthernet0/8
no ip address
!
interface FastEthernet0/9
no ip address
!
interface FastEthernet0/10
no ip address
!
interface FastEthernet0/11
no ip address
!
interface FastEthernet0/12
no ip address
!
interface GigabitEthernet0/1
no ip address
!
interface GigabitEthernet0/2
no ip address
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip http server
!
line con 0
line vty 5 15
!
end
3. Thi t l p các thông s cho switch nh hostname, enableế ư
password, console password và virtual terminal password. Các lo i
password s d ng có phân bi t ch th ng và ch hoa. Do đó ườ
ng i dùng c n phân bi t các ký t s d ng ch vi t hoa khácườ ế ế
v i ch viêt th ng. Ví d Cisco khác v i cisco. ườ
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Vnpro
Vnpro(config)#enable password cisco
Vnpro(config)#enable secret class
Vnpro(config)#line console 0
Vnpro(config-line)#password console
Vnpro(config-line)#login
Vnpro(config-line)#^Z
Switch h tr các Virtual Line dùng cho các phiên telnet. C n c u
hình password cho các line này m i có th telnet vào Switch (trình
t c u hình h tr telnet s trình bày sau). Đ xem thông tin v
các Virtual Line trên Switch: dùng l nh “show line”.
Vnpro#show line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns
Int
* 0 CTY - - - - - 0 0 0/0 -
1 VTY - - - - - 0 0 0/0 -
2 VTY - - - - - 0 0 0/0 -
3 VTY - - - - - 0 0 0/0 -
4 VTY - - - - - 0 0 0/0 -
5 VTY - - - - - 0 0 0/0 -
6 VTY - - - - - 0 0 0/0 -
7 VTY - - - - - 0 0 0/0 -
8 VTY - - - - - 0 0 0/0 -
9 VTY - - - - - 0 0 0/0 -
10 VTY - - - - - 0 0 0/0 -
11 VTY - - - - - 0 0 0/0 -
12 VTY - - - - - 0 0 0/0 -
13 VTY - - - - - 0 0 0/0 -
14 VTY - - - - - 0 0 0/0 -
15 VTY - - - - - 0 0 0/0 -
16 VTY - - - - - 0 0 0/0 -
C u hình password cho các line vty
Vnpro#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Vnpro(config)#line vty 0 4
Vnpro(config-line)#password cisco
Vnpro(config-line)#login
C u hình trên thi t b Cisco, m i dòng l nh do ng i dùng gõ ế ườ
vào. Sau khi nh n phím “enter” c u hình h th ng s l p t c
thay đ i. Vì v y, đ i v i các h th ng m ng th t, tr c khi thay ướ
đ i m t thông s nào đó c a thi t b , c n ph i sao l u l i c u ế ư
hình ban đ u đ có th khôi ph c l i khi c n thi t. ế
B c 4: c u hình Vlan.ướ
Ki m tra c u hình Vlan m c đ nh trên Switchế
Vnpro#show vlan
VLAN Name Status Ports
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gi0/1, Gi0/2
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode
Trans1 Trans2