intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

VTP Revison, VTP Pasword, VTP Domain

Chia sẻ: Tran Viet Son | Ngày: | Loại File: DOC | Số trang:16

131
lượt xem
23
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

Bài Viết VTP Mode Tác giả Nguyễn Anh Hào VTP Revison Number, VTP Password, VTP Domain I/ Tổng quan về các VTP revision number Tác dụng của VTP là duy trì cấu hình của VLAN ,và đồng nhất trên toàn Network .VTP là

Chủ đề:
Lưu

Nội dung Text: VTP Revison, VTP Pasword, VTP Domain

  1. Bài Viết VTP Mode Tác giả Nguyễn Anh Hào VTP Revison Number, VTP Password, VTP Domain I/ Tổng quan về các VTP revision number Tác dụng của VTP là duy trì cấu hình của VLAN ,và đồng nhất trên toàn Network .VTP là protocol thông tin ,nó sử dụng frame trunk layer 2 để quản lý sự cộng vào hay xoá đi ,đặt tên lại các VLÁN trên toàn bộ Network từ 1 Switch trung tâm được đặt trong Server mode . VTP hoạt động chủ yếu là đồng nhất các thông tin VLAN trong 1 vùng VTP domain.Nó giảm đi sự cấu hình giống nhau trong các Switch. Bài lab sau đây sẽ miêu tả các đặc tính của Revision number ,vtp password ,vtp domain . Chúng ta chỉ cần dùng 2 thiết bị Cisco 2950 để làm được bài lab này . Switch 1 Switch 2 Vlan 1 Vlan 2 Vlan 3 Vlan 1 Vlan 4 Cấu hình đầu tiên ở bài lab này là sẽ cấu hình 2 Switch trên cùng 1 domain , sau đó cấu hình vtp password 2 bên khác nhau . Như vậy mặc dầu cổng trunk đã chạy . Nhưng 2 Switch vẫn chưa thấy được nhau . Chúng ta sẽ cấu hình lần lượt các Vlan 2,3 trên Switch1 và vlan 4 trên Switch2 . Sau khi cấu hình 2 trên . Chúng ta theo dõi Switch có số revision number cao hơn và sau đó cấu hình lại vtp password cho đúng , lúc này Switch có số revision number cao hơn sẽ update các vlan cho switch còn lại .
  2. II/ Cấu hình 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
  3. 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
  4. ! 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
  5. ! 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
  6. 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
  7. 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
  8. ! 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
  9. shutdown ! ip http server ! line con 0 line vty 5 15 ! end Các bước cấu hình : Bước 1 : cấu hình cho vtp domain name , vtp password Cấu hình dành cho Switch1 Switch1#vlan data Switch1(vlan)#vtp domain vnpro Switch1(vlan)#vtp password vnpro Cấu hình dành cho Switch2 Switch2#vlan data Switch2(vlan)#vtp domain vnpro Switch2(vlan)#vtp password vnpro1 Bước 2 : cấu hình trunk Ta thấy 2 vtp password của 2 Switch khác nhau . Vì vậy nếu như ta cấu hình trunk ở cả 2 đầu switch thì đường trunk cũng không chạy .Các Vlan sẽ không trao đổi thông tin cho nhau được .
  10. switch2(config)#int fa0/1 switch2(config-if)#switchport mode trunk switch2(config-if)#switchport mode trunk Do các Switch 2900 series hoạt động encapsulation dot1q ,nên ta không cần phải đánh lệnh switchport trunk encapsulation dot1q. Bước 3: Ta cấu hình các vlan ở 2 đầu switch , ở đay ta có thể dùng 2 cách : 1/Cấu hình trong vlan database ( vlan number name) 2/Cấu hình trong interface (switchport access vlan number ) Thường thì cách 2 phổ biến hơn cách 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 Bứơc 4: Chúng ta có thể xem các thông tin Vlan , và Vtp bằng các lệnh : show vtp status , show vlan brief switch2#show vtp status VTP Version :2
  11. 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 status VTP 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
  12. 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/4 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Switch1#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7, Fa0/8, Fa0/9, Fa0/10, Fa0/11, Fa0/12
  13. 2 VLAN0002 active Fa0/2 3 VLAN0003 active Fa0/3 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Như vậy các switch1 có số revision number cao hơn . Như vậy khi đường trunk hoạt động switch1 sẽ update vlan 2 ,3 cho switch 2 , và vlan 4 ở switch2 sẽ biết mất . Như vậy chúng ta có thể thấy tầm quan trọng của vtp password , nó chống các switch lạ khi cắm vào mạng sẽ gây ra sự xáo trộn các vlan . Bây giờ ta cấu hình vtp password vnpro và bật 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. Bây giờ ta xem quá trình biết đổi khi config các câu lệnh này . 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 1E 00:07:52: VTP LOG RUNTIME: Summary packet received, domain = vnpro,
  14. 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 Bây giờ chúng ta xem lại các vlan của Switch2 ,Switch có revision
  15. number bé hơn . 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ư vậy Vlan 4 không còn Switch2 , lúc này ta dùng lệnh show vtp status . switch2#show vtp status VTP 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
  16. 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 thấy số revision number lúc này của Switch 2 bằng 2 ,bằng với số của Switch1
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2