Tải bản đầy đủ (.pdf) (16 trang)

Tài liệu Switch Vlan VTP Tiếng Việt ppt

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (103.04 KB, 16 trang )

1
Lab Networking 2:
CấuhìnhSwitch, VLANs, VTP
PDF created with pdfFactory trial version www.pdffactory.com
2
Nộidung
• CấuhìnhSwitch
• CấuhìnhVTP
• CấuhìnhVLANs
• ĐịnhtuyếngiữacácVLANs
• Thamkhảo:
– CấuhìnhPortSecurity
– CấuhìnhPortFast
– Cấu hình UplinkFast
– Cấu hình BackboneFast
PDF created with pdfFactory trial version www.pdffactory.com
3
Sơđồ mạng( Topology )
V
L
A
N
3
V
L
A
N
2
VLAN
3
V


L
A
N
4
V
LA
N
2
PDF created with pdfFactory trial version www.pdffactory.com
4
CấuhìnhSwitch
• Chọnconsole cable cósốhiệutương ứngvớiPC
• Bật điện
• Mở HyperTerminal:
– Port settings: chọn Restore Defaults
– OK
• Khicóthôngbáo: … configuration dialog [y/n] ? Nhập n vàEnter,
switch sẽ chuyểnvàoUser EXEC mode :
– Switch>
• Chuyểnsang Privileged EXEC mode:
– Switch> enable
– Switch#
PDF created with pdfFactory trial version www.pdffactory.com
5
CấuhìnhSwitch
• Kiểmtracấuhìnhcũ:
– Switch# show vlan
• Nếucóvlan đãtạothìxoádữliệucũvà reload lạiswitch về cấuhình
mặc định:
– Switch# erase startup-config

– Switch# delete flash: vlan.dat
– Switch# reload
• Saukhikhởi độnglại, chuyểnswitch sang chếđộ Privileged EXEC:
– Switch#
• Chuyểnsang Global Configuration mode:
– Switch# configure terminal
– Switch(config)#
PDF created with pdfFactory trial version www.pdffactory.com
6
CấuhìnhSwitch
• Gántênchoswitch:
– Switch(config)# hostname SW1
– Dùnglệnhtươngtựđểđặttênchocácswitch cònlạilà SW2, SW3
• Đặtpassword hạnchế truynhậpvàoPrivileged mode:
– Switch(config)# enable password <password> (đâylàpassword
chưa đượcmãhoá)
– Hoặcsửdụngpassword mãhoábằngthuậttoánMD5:
– Switch(config)# enable secret <password>
• Thiếtlậppassword đăngnhậpbằnggiao thứcTelnet:
– Switch(config)# line vty0 4
– Switch(config-line)# password <password>
– Switch(config-line)# login
PDF created with pdfFactory trial version www.pdffactory.com
7
CấuhìnhSwitch
• Gán IP address và default gateway để chophéptruynhậptớiswitch
bằngTelnet vàcác ứngdụngTCP/IP khác
• GánIP address (nêndùngVLAN1):
– Switch(config)# interface VLAN1
– Switch(config-if)# ipaddress <ip_address> <subnet_mask>

– Switch(config-if)# no shutdown
• Gán default gateway :
– Switch(config)# ipdefault-gateway <ip_address>
• KiểmtraMAC address table:
– Switch# show mac-address-table
• Ghilạicấuhình:
– Switch# copy running-configstartup-config
• Thoátkhỏicácmứccấuhình: nhậplệnh exit hoặc end hoặc ctrl+z
PDF created with pdfFactory trial version www.pdffactory.com
8
CấuhìnhVTP
• CấuhìnhVTP trên SW1
• Cách1:
– SW1(config)# vtpversion 2
– SW1(config)# vtpdomain <name>
– SW1(config)# vtppassword <password>
– SW1(config)# vtpmode server
• Cách2:
– SW1# vlandatabase
– SW1(vlan)# vtpv2-mode
– SW1(vlan)# vtpdomain <name>
– SW1(vlan)# vtppassword <password>
– SW1(vlan)# vtpserver
PDF created with pdfFactory trial version www.pdffactory.com
9
CấuhìnhVTP
• CấuhìnhVTP trên SW2, SW3:
• Cách1:
– SW2(config)# vtpversion 2
– SW2(config)# vtpdomain <name>

– SW2(config)# vtppassword <password>
– SW2(config)# vtpmode client
• Cách2:
– SW2# vlandatabase
– SW2(vlan)# vtpv2-mode
– SW2(vlan)# vtpdomain <name>
– SW2(vlan)# vtppassword <password>
– SW2(vlan)# vtpclient
• KiểmtracấuhìnhVTP
– Switch# show vtpstatus
PDF created with pdfFactory trial version www.pdffactory.com
10
CấuhìnhVLANs
• TạoVLAN2, VLAN3, VLAN4 trên SW1:
• Cách1:
– SW1(config)# vlan <number>
– SW1(config-vlan)# name <name>
• Cách2:
– SW1# vlandatabase
– SW1(vlan)# vlan <number> name <name>
PDF created with pdfFactory trial version www.pdffactory.com
11
CấuhìnhVLANs
• Gánport choVLAN
• Gán1 dãyport:
– Vídụ: gánport từ F0/1-F0/5 choVLAN2
– Switch(config)# interface range F0/1 –5
– Switch(config-if-range)# switchportmode access
– Switch(config-if-range)# switchportaccess vlan2
• Gán1 port:

– Vídụ: gánport F0/10 choVLAN3
– Switch(config)# interface F0/10
– Switch(config-if)# switchportmode access
– Switch(config-if)# switchportaccess vlan3
PDF created with pdfFactory trial version www.pdffactory.com
12
CấuhìnhVLANs
• CấuhìnhVLAN Trunk:
• Mặc địnhtrênswitch CISCO 2950, khi2 switch kếtnốivớinhau, port
kếtnốisẽtựđộngchuyểnthànhTrunk mode. Giaothứctagging mặc
địnhlà802.1Q
• CấuhìnhTrunk port:
– Vídụ: gánport F0/21 thànhTrunk port
– Switch(config)# interface F0/21
– Switch(config-if)# switchportmode trunk
• Thamkhảo: nếuswitch hỗ trợ cả 2 giaothức802.1Q vàISL thìcần
chọnchínhxác1 giaothức:
– Switch(config-if)# switchporttrunk encapsulation <dot1q | isl>
PDF created with pdfFactory trial version www.pdffactory.com
13
CấuhìnhVLANs
• KiểmtraVLAN
– Switch# show vlan
– Switch# show vlanbrief
• Kiểmtraport:
– Switch# show interface <interface> switchport
– Switch# show interface <interface> trunk
PDF created with pdfFactory trial version www.pdffactory.com
14
ĐịnhtuyếngiữacácVLANs

• Vídụ: Cấuhìnhrouter làmdefault gateway
• Kíchhoạtcổngvậtlý:
– R1(config)# interface FastEthernet0/0
– R1(config-if)# no shutdown
• Cấuhìnhsub-interface trêncổngFastEthernet0/0 tương ứngVLAN1:
– R1(config)# interface FastEthernet0/0.1
– R1(config-subif)# description management VLAN1
– R1(config-subif)# encapsulation dot1q 1
– R1(config-subif)# ipaddress 192.168.1.1 255.255.255.0
• Cấuhìnhtươngtựchocácsub-interface khác:
– R1(config)# interface <FastEthernet0/0.number>
– R1(config-subif)# description <management VLAN_number>
– R1(config-subif)# encapsulation <dot1q> <vlan_number>
– R1(config-subif)# ipaddress <192.168.1.1 255.255.255.0>
PDF created with pdfFactory trial version www.pdffactory.com
15
Thamkhảo
• CấuhìnhPortSecurity
• Cáccấuhìnhchung:
– Switch(config)# interface <interface>
– Switch(config-if)# switchportmode access
– Switch(config-if)# switchportport-security
• Xác địnhsốđiạchỉ MAC đượcphépkếtnốivớiinterface củaswitch, từ
1-132, mặc địnhlà1:
– Switch(config-if)# switchportport-security maximun <value>
• Gántĩnhmộtđịachỉ MAC:
– Switch(config-if)# switchportport-security mac-address <mac-
address>
• Học động địachỉ MAC vàlưutrongfile cấuhình running-config:
– Switch(config-if)# switchportport-security mac-address sticky

• Kiểmtratrạngtháicủaport security:
– Switch# show port security
PDF created with pdfFactory trial version www.pdffactory.com
16
Thamkhảo
• CấuhìnhPortFast:
– Switch(config)# interface < interface>
– Switch(config-if)# spanning-tree portfast
• Cấu hình UplinkFast:
– Switch(config)# spanning-tree uplinkfast
• Cấu hình BackboneFast:
– Switch(config)# spanning-tree backbonefast
PDF created with pdfFactory trial version www.pdffactory.com

×