Bài Viết VTP Mode.doc
Transcript of Bài Viết VTP Mode.doc
Bi Vit VTP Mode
Bi Vit VTP Mode
Tc gi Nguyn Anh Ho
VTP Revison Number, VTP Password, VTP Domain
I/ Tng quan v cc VTP revision number
Tc dng ca VTP l duy tr cu hnh ca VLAN ,v ng nht trn ton Network .VTP l protocol thng tin ,n s dng frame trunk layer 2 qun l s cng vo hay xo i ,t tn li cc VLN trn ton b Network t 1 Switch trung tm c t trong Server mode . VTP hot ng ch yu l ng nht cc thng tin VLAN trong 1 vng VTP domain.N gim i s cu hnh ging nhau trong cc Switch.
Bi lab sau y s miu t cc c tnh ca Revision number ,vtp password ,vtp domain .
Chng ta ch cn dng 2 thit b Cisco 2950 lm c bi lab ny .
Cu hnh u tin bi lab ny l s cu hnh 2 Switch trn cng 1 domain , sau cu hnh vtp password 2 bn khc nhau . Nh vy mc du cng trunk chy . Nhng 2 Switch vn cha thy c nhau . Chng ta s cu hnh ln lt cc Vlan 2,3 trn Switch1 v vlan 4 trn Switch2 . Sau khi cu hnh 2 trn . Chng ta theo di Switch c s revision number cao hn v sau cu hnh li vtp password cho ng , lc ny Switch c s revision number cao hn s update cc vlan cho switch cn li .
II/ Cu hnh
Switch1#show run Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch1
!
ip subnet-zero
!
interface FastEthernet0/1
shutdown
encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 2
!
interface FastEthernet0/3
switchport access vlan 3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface VLAN1
no ip directed-broadcast
no ip route-cache
!
!
line con 0
transport input none
stopbits 1
line vty 5 15
!
end
switch2#show run
Building configuration...
Current configuration : 1431 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname switch2
!
!
ip subnet-zero
!
spanning-tree extend system-id
!
!
interface FastEthernet0/1
switchport mode trunk
no ip address
!
interface FastEthernet0/2
no ip address
!
interface FastEthernet0/3
no ip address
!
interface FastEthernet0/4
switchport access vlan 4
switchport mode access
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 FastEthernet0/13
no ip address
!
interface FastEthernet0/14
no ip address
!
interface FastEthernet0/15
no ip address
!
interface FastEthernet0/16
no ip address
!
interface FastEthernet0/17
no ip address
!
interface FastEthernet0/18
no ip address
!
interface FastEthernet0/19
no ip address
!
interface FastEthernet0/20
no ip address
!
interface FastEthernet0/21
no ip address
!
interface FastEthernet0/22
no ip address
!
interface FastEthernet0/23
no ip address
!
interface FastEthernet0/24
no ip address
!
interface Vlan1
no ip address
no ip route-cache
shutdown
!
ip http server
!
line con 0
line vty 5 15
!
end
Cc bc cu hnh :
Bc 1 : cu hnh cho vtp domain name , vtp password
Cu hnh dnh cho Switch1
Switch1#vlan data
Switch1(vlan)#vtp domain vnpro
Switch1(vlan)#vtp password vnpro
Cu hnh dnh cho Switch2
Switch2#vlan data
Switch2(vlan)#vtp domain vnpro
Switch2(vlan)#vtp password vnpro1
Bc 2 : cu hnh trunk
Ta thy 2 vtp password ca 2 Switch khc nhau . V vy nu nh ta cu hnh trunk c 2 u switch th ng trunk cng khng chy .Cc Vlan s khng trao i thng tin cho nhau c .
switch2(config)#int fa0/1
switch2(config-if)#switchport mode trunk
switch2(config-if)#switchport mode trunk
Do cc Switch 2900 series hot ng encapsulation dot1q ,nn ta khng cn phi nh lnh switchport trunk encapsulation dot1q.
Bc 3: Ta cu hnh cc vlan 2 u switch , ay ta c th dng 2 cch :
1/Cu hnh trong vlan database ( vlan number name) 2/Cu hnh trong interface (switchport access vlan number )
Thng th cch 2 ph bin hn cch 1 :
switch2(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 4
% Access VLAN does not exist. Creating vlan 4
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 2
% Access VLAN does not exist. Creating vlan 2
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 3
% Access VLAN does not exist. Creating vlan 3
Bc 4: Chng ta c th xem cc thng tin Vlan , v Vtp bng cc lnh : show vtp status , show vlan brief
switch2#show vtp statusVTP Version : 2
Configuration Revision : 1
Maximum VLANs supported locally : 64
Number of existing VLANs : 6
VTP Operating Mode : Server
VTP Domain Name : vnpro
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x36 0x49 0xE4 0xF2 0xAE 0x7E 0x61 0xF2 Configuration last modified by 0.0.0.0 at 3-1-93 00:02:46
Local updater ID is 0.0.0.0 (no valid interface found)
Switch1#show vtp statusVTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 68
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : vnpro
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x0D 0x70 0x99 0x70 0x5D 0x07 0x9C 0xAB Configuration last modified by 0.0.0.0 at 3-1-93 00:14:24
switch2#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, 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
4 VLAN0004 active Fa0/41002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Switch1#show vlanVLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7,
Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/122 VLAN0002 active Fa0/23 VLAN0003 active Fa0/31002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
Nh vy cc switch1 c s revision number cao hn . Nh vy khi ng trunk hot ng switch1 s update vlan 2 ,3 cho switch 2 , v vlan 4 switch2 s bit mt . Nh vy chng ta c th thy tm quan trng ca vtp password , n chng cc switch l khi cm vo mng s gy ra s xo trn cc vlan . By gi ta cu hnh vtp password vnpro v bt debug sw-vlan
Vtp event
switch2#debug sw-vlan vtp event
vtp events debugging is on
switch2(vlan)#vtp pass vnpro
Setting device VLAN database password to vnpro.
switch2(vlan)#apply
APPLY completed.
By gi ta xem qu trnh bit i khi config cc cu lnh ny .
switch2#
00:07:52: VTP LOG RUNTIME: Transmit vtp summary, domain vnpro, rev 1, followers 0
MD5 digest calculated = 36 49 E4 F2 AE 7E 61 F2 7D 60 00 2D 22 36 66 1E00:07:52: VTP LOG RUNTIME: Summary packet received, domain = vnpro, rev = 2, followers = 0
00:07:52: VTP LOG RUNTIME: Summary packet rev 2 greater than domain vnpro rev 1
00:07:52: VTP LOG RUNTIME: Domain vnpro currently not in updating state
00:07:52: VTP LOG RUNTIME: Summary packet with followers field zero
00:07:52: VTP LOG RUNTIME: Transmit vtp request, domain vnpro, start value 0
00:07:53: VTP LOG RUNTIME: Summary packet received, domain = vnpro, rev = 2, followers = 1
00:07:53: VTP LOG RUNTIME: Summary packet rev 2 greater than domain vnpro rev 1
00:07:53: VTP LOG RUNTIME: Domain vnpro currently not in updating state
00:07:53: VTP LOG RUNTIME: Subset packet received, domain = vnpro, rev = 2, seq = 1, length = 272
00:07:53: VTP LOG RUNTIME: Transmit vtp summary, domain vnpro, rev 2, followers 1
MD5 digest calculated = 0D 70 99 70 5D 07 9C AB C8 B9 1D 31 DF EB A7 76
00:12:58: VTP LOG RUNTIME: Transmit vtp summary, domain vnpro, rev 2, followers 0
MD5 digest calculated = 0D 70 99 70 5D 07 9C AB C8 B9 1D 31 DF EB A7 76
00:18:03: VTP LOG RUNTIME: Summary packet received, domain = vnpro, rev = 2, fol
lowers = 0
00:18:03: VTP LOG RUNTIME: Summary packet rev 2 equal to domain vnpro rev 2
By gi chng ta xem li cc vlan ca Switch2 ,Switch c revision number b hn .
switch2#show vtp vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, 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
2 VLAN0002 active
3 VLAN0003 active
Nh vy Vlan 4 khng cn Switch2 , lc ny ta dng lnh show vtp status .
switch2#show vtp statusVTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 64
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : vnpro
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x36 0x49 0xE4 0xF2 0xAE 0x7E 0x61 0xF2 Configuration last modified by 0.0.0.0 at 3-1-93 00:02:46
Local updater ID is 0.0.0.0 (no valid interface found)
Ta thy s revision number lc ny ca Switch 2 bng 2 ,bng vi s ca Switch1 .