vtp配置實例

實驗要求及拓撲圖:
 
相關配置:
(1)配置vtp
配置3560:
S-3560#vlan  database
S-3560(vlan)#  vtp  domain  MYVTP   //vtp命名
S-3560(vlan)#  vtp  password CISCO   //建立密碼
S-3560(vlan)#  vtp  server        //vtp服務端
S-3560(vlan)#  exit
 
配置2950:
S-2950#vlan database
S-2950(vlan)#vtp domain MYVTP
S-2950(vlan)#vtp password CISCO
S-2950(vlan)#vtp client    //vtp客戶端
S-2950(vlan)#exit
 
(2)配置trunk:
配置3560:
S-3560#conf t
S-3560(config)#int f0/24
S-3560(config-if)#switchport mode trunk   //trunk模式
S-3560(config-if)#switchport trunk encapsulation ISL  //由於該模擬器的設備已經默認封裝,因此沒法執行,這條命令在特殊型號交換機上能夠執行
S-3560(config-if)#switchport trunk allowed vlan 2
S-3560(config-if)#switchport trunk allowed vlan add 3  //同時容許vlan 2 和vlan 3 通過
配置2950:
S-2950#conf t
S-2950(config)#int f0/24
S-2950(config-if)#switchport mode trunk
S-3560(config-if)#switchport trunk encapsulation ISL
S-2950(config-if)#switchport trunk allowed vlan 2
 
(3)建立vlan
3560:                                 //由於3560是vtp server,因此2950上無需建立vlan
S-3560#  vlan database
S-3560(vlan)#  vlan 2 name VLAN2   //建立vlan 2 並命名爲VLAN2
S-3560(vlan)#  vlan 3 name VLAN3
S-3560(vlan)#  exit
 
(4)配置端口到相應Vlan
配置3560:
S-3560(config)#  int  f0/1
S-3560(config-if)# switchport  mode  access
S-3560(config-if)# switchport  access  Vlan  2
S-3560(config-if)#  no shutdown
S-3560(config-if)# exit
S-3560(config)# int f0/2
S-3560(config-if)# Switchport  mode  access
S-3560(config-if)# Switchport  access  Vlan 2
S-3560(config-if)# no shutdown
S-3560(config-if)# exit               //f0/1 和f0/2 加入vlan 2
 
S-3560(config)# int f0/3
S-3560(config-if)# switch  mode  access
S-3560(config-if)# switch  access  vlan 3
S-3560(config-if)# no shutdown
S-3560(config-if)# exit
S-3560(config)# int f0/4
S-3560 (config-if)# switch mode access
S-3560(config-if)# switch access Vlan 3   //f0/3 和f0/4加入vlan 3
 
配置2950:
S-2950(config)# int f0/1
S-2950(config-if)# switch mode access
S-2950(config-if)# switch access Vlan 2
S-2950(config)# int f0/2
S-2950(config-if)# switch  mode  access
S-2950(config-if)# switch access Vlan  2  //f0/1和f0/2加入vlan 2
 
 
(5)配置網關
S-3560(config)# int Vlan2
S-3560(config-if)#  ip  address  10.2.0.254  255.255.255.0  //vlan 2 內pc機的默認網關
S-3560(config)#  int Vlan3
S-3560(config-if)# ip  address 10.3.0.254  255.255.255.0   //vlan 3 內pc機的默認網關
 
(6)vlan間通訊
S-3560#conf t
S-3560(config)#ip routing   //開啓路由功能
 
 
 
實驗結果驗證:
 
 
 
實驗結束!
 
 
本文出自 「 Way..」 博客,請務必保留此出處 http://neo1989.blog.51cto.com/963760/267524
相關文章
相關標籤/搜索