VLAN VTP配置
VLAN 的配置一、● VLAN 配置的步驟 全局配置模式下, 輸入VLAN ID,進(jìn)入VLAN 配置模式:Switch(config)#vlan {vlan-id}● 為VLAN 設(shè)置名字. 可選:
VLAN 的配置
一、
● VLAN 配置的步驟 全局配置模式下, 輸入VLAN ID,進(jìn)入VLAN 配置模式:
Switch(config)#vlan {vlan-id}
● 為VLAN 設(shè)置名字. 可選:
Switch(config-vlan)#name {vlan-name}
● 創(chuàng)建了以太網(wǎng)VLAN 之后, 接下來把交換機(jī)端口分配到特定的VLAN 里. 假如你把端口分配進(jìn)了不存在的VLAN 里, 那么新的VLAN 將自動(dòng)被創(chuàng)建. 進(jìn)入接口配置模式: Switch(config)#interface {interface}
● 定義VLAN 端口的成員關(guān)系, 把它定義為層2接入端口:
Switch(config-if)#switchport mode access
● 把端口分配進(jìn)特定的VLAN 里:
Switch(config-if)#switchport access vlan {vlan-id}
● 配置中繼端口, 定義中繼模式:
Switch(config-if)#switchport trunk encapsulation
{isl|dot1q|negotiate}
● 定義端口為層2的中繼端口:
Switch(config-if)#switchport mode {dynamic auto|dynamic desirable|trunk}
,二、 配置示例
交換機(jī)Asuqa 配置如下:
Asuqa#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Asuqa(config)#vlan 2
Asuqa(config-vlan)#name Sales Asuqa(config-vlan)#vlan 3
Asuqa(config-vlan)#name Tech Asuqa(config-vlan)#interface f0/2 Asuqa(config-if)#switchport mode access Asuqa(config-if)#switchport access vlan 2 Asuqa(config-if)#no shutdown Asuqa(config-if)#interface f0/3
Asuqa(config-if)#switchport mode access Asuqa(config-if)#switchport access vlan 3 Asuqa(config-if)#no shutdown Asuqa(config-if)#interface f0/1 Asuqa(config-if)#switchporttrunk
encapsulation dot1q
Asuqa(config-if)#switchport mode trunk Asuqa(config-if)#no shutdown Asuqa(config-if)#end
Asuqa#
三、 switch#
show vlan biref
交換機(jī)Aiko 配置如下:
Aiko#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Aiko(config)#vlan 2
Aiko(config-vlan)#name Sales Aiko(config-vlan)#vlan 3
Aiko(config-vlan)#name Tech Aiko(config-vlan)#interface f0/3 Aiko(config-if)#switchport mode access Aiko(config-if)#switchport access vlan 2 Aiko(config-if)#no shutdown Aiko(config-if)#interface f0/5
Aiko(config-if)#switchport mode access Aiko(config-if)#switchport access vlan 3 Aiko(config-if)#no shutdown Aiko(config-if)#interface f0/1 Aiko(config-if)#switchport
trunk
encapsulation dot1q
Aiko(config-if)#switchport mode trunk Aiko(config-if)#no shutdown Aiko(config-if)#end
Aiko#
,VTP 協(xié)議
(VLAN Trunking Protocol )
四、
●
●
●
● VTP 概述 一個(gè)能夠宣告VLAN 配置信息的信息系統(tǒng) 通過一個(gè)共有的管理域,維持VLAN 配置信息的一致性 VTP 只能在主干端口發(fā)送要宣告的信息 支持混合的介質(zhì)主干連接(快速以太網(wǎng), FDDI, ATM)
五、 VTT 的3種模式
六、 VTP 是如何工作的?
VTP 裁剪——通過阻止不必要數(shù)據(jù)的泛洪傳送來增加可用的帶寬
七、
●
VTP 配置步驟
全局配置模式下, 定義VTP 模式:
Switch(config)#vtp mode {server|client|transparent}
●
定義VTP 域名, 在同一VLAN 管理域的交換機(jī)的VTP 域名必須相同. 該域名長(zhǎng)度為1到32字符:
Switch(config)#vtp domain {domain-name}
●
設(shè)置VTP 域的密碼, 同一VTP 域里的交換機(jī)的VTP 域的密碼必須一致, 密碼長(zhǎng)度為8到64字符. 可選:
Switch(config)#vtp password {password}
八、
配置示例
交換機(jī)Asuqa 配置如下: Asuqa#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Asuqa(config)#vtp domain Aiko Changing VTP domain name from NULL to Aiko
Asuqa(config)#vtp mode server Device mode already VTP SERVER. Asuqa(config)#vtp password Asuqa Setting device VLAN database password to Asuqa
Asuqa(config)#end
交換機(jī)Aiko 配置如下: Aiko#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Aiko(config)#vtp domain Aiko
Changing VTP domain name from NULL to Aiko
Aiko(config)#vtp mode client Setting device to VTP CLIENT mode. Aiko(config)#no vlan 2
VTP VLAN configuration not allowed when device is in CLIENT mode.
Aiko(config)#vtp password Asuqa Setting device VLAN database password to Asuqa
Aiko(config)#end