當前位置:首頁 » 存儲配置 » 使用vtp主要的配置命令有哪些

使用vtp主要的配置命令有哪些

發布時間: 2022-01-31 06:38:41

⑴ 思科交換機如何配置VTP

在一台交換機上配置 在另一台交換機上配置 vtp domain cisco vtp domain ciscovtp mode server vtp mode client這樣vtp就配置完成了,在這里domain 要一致,不然學不到vlan的信息。然後,就在server上創建和刪除VLAN,其它client都可以學得到vlan的一些信息。

⑵ 如何配置VTP

方法/步驟

  • 首先,打開思科模擬器軟體,連接三台交換機的連接線,將所有交換機互相連接起來,一台當伺服器,一台當客戶機,另外一台當透明模式。

⑶ 思科2960交換機配置命令都有哪些

(一)使能口令(enable
password),口令以明文顯示
使能密碼(enbale
secret),
口令以密文顯示
Switch.>
/*用戶直行模式提示符
Switch.>enable
/*進入特權模式
Switch.#
/*特權模式(進入前要輸入密文)
Switch.#config
terminal
/*進入全局配置模式
Switch.(config)#
/*配置模式提示符
Switch.(config)#
hostname
Pconline
/*設置主機名Pconline
Pconline(config)#
enable
password
cisco3560
/*設置使能口令為pconline
Pconline(config)#
enable
secret
cisco3560
/*設置使能密碼為network
Pconline(config)#
line
vty
0
15
/*設置虛擬終端線
Pconline(config-line)#
login
/*設置登陸驗證
Pconline(config-line)#
password
cisco3560
/*設置虛擬終端登陸密碼
二、
交換機VLAN設置
Switch.>
/*用戶直行模式提示符
Switch.>enable
/*進入特權模式
switch#vlan
database

進入VLAN設置
switch(vlan)#
vlan
2

建VLAN
2
switch(vlan)#no
vlan
2

刪vlan
2
switch(config)#int
f0/1

進入網路埠1
switch(config)#int
giga0/1
;
進入匯聚千兆口1
switch(config-if)#
plex
{auto
|
full
|
half}
設置埠為---自動/全雙工/半雙工
switch(config-if)#switchport
mode
trunk

當前埠設置為匯聚口
switch(config-if)#switchport
mode
access

當前埠設置為接入模式
switch(config-if)#switchport
trunk
allowed
vlan
1,2
;設置1,2號口允許的vlan

switch(config-if)#switchport
trunk
vlan
2

設置1號口允許的vlan
switch(config-if)#switchport
access
vlan
2

當前埠加入vlan
2
switch(config-if)#switchport
trunk
encap
dot1q

設置vlan
中繼
cisco網路中,交換機在區域網中最終穩定狀態的介面類型主要有四種:
access/
trunk/
multi/
dot1q-tunnel。
1、access:
主要用來接入終端設備,如PC機、伺服器、列印伺服器等。
2、trunk:
主要用在連接其它交換機,以便在線路上承載多個vlan。
3、multi:
在一個線路中承載多個vlan,但不像trunk,它不對承載的數據打標簽。
主要用於接入支持多vlan的伺服器或者一些網路分析設備。現在基本不使用此類接
口,在cisco的網路設備中,也基本不支持此類介面了。
4、dot1q-tunnel:
用在Q-in-Q隧道配置中。
switch(config)#vtp
domain

設置發vtp域名
switch(config)#vtp
password

設置發vtp密碼
switch(config)#vtp
mode
server
;設置發vtp模式
switch(config)#vtp
mode
client
;設置發vtp模式
三.
交換機設置IP地址
switch(config)#interface
vlan
1
進入vlan
1
switch(config-if)#ip
address
132.37.48.3
255.255.255.0;
設置交換機管理IP
switch(config)#ip
default-gateway
132.37.48.1
;設置交換機默認網關
switch(config)#end;
退出當前模式
Switch#conf
t
進入特權模式
Switch(config)#
interface
fa0/5
Switch(config-if)#
shutdown
關閉埠
Switch(config-if)#
no
shutdown
打開埠
四.
交換機顯示命令
特權模式下:
switch#write

保存配置信息
switch#show
vtp

查看vtp配置信息
switch#show
run

查看當前配置信息
switch#show
vtp
;
查看交換機vtp信息
switch#show
vlan

查看vlan配置信息
switch#show
interface

查看埠信息
Switch#show
interfaces
fastethernet
0/1
switchport
;顯示二層埠的狀
態,可以用來決定此口是否為二層或三層口。
switch#show
int
f0/0

查看指定埠信息
sw1924_b#show
ip;
查看上述設置環境
sw1924_b#show
versi;查看交換機的版本等信息
sw1924_b#show
running-config;查看交換機的當前運行配置等全部信息
sw1924_b#show
int
e0/1;查看交換機的第1個埠信息
基於埠的MAC地址綁定
Switch#config
terminal
#進入配置模式
Switch(config)#
Interface
fastethernet
0/1
#進入具體埠配置模式
Switch(config-if)#Switchport
port-secruity
#配置埠安全模式
Switch(config-if
)switchport
port-security
mac-address
MAC(主機的MAC地址)
#配置該埠要綁定的主機的MAC地址
Switch(config-if
)no
switchport
port-security
mac-address
MAC(主機的MAC地
址)
#刪除綁定主機的MAC地址

⑷ 有VTP配置的簡單命令嗎

創建VTP 域
switch(config)# vtp domian domain_name

配置交換機的VTP模式
switch(config)# vtp mode server | client | transparent

配置VTP口令
switch(config)# vtp password password

配置VTP修剪
switch(config)# vtp pruning

VTP版本的配置
switch(config)# vtp version 2

查看VTP的配置
switch# show vtp status

⑸ 如何從vtp客戶端查看服務端配置

vtp domain分成三種模式:server、client、transparent
server、transparent模式可以創建、刪除vlan,client模式則不能
比如說:位於server模式的中心三層交換機創建了一個vlan 11,此時它就發一個vtp廣播包告訴所有位於同一vtp域的所有支持vtp協議的交換機,這些交換機就學習到了這個信息,無需你手工再去為每一台交換機創建vlan 11。刪除vlan也是如此。
任何一台運行VTP的交換機可以工作在三種模式:VTP Server、VTP Client及VTP Transparent。
* VTP Server維護該VTP域中所有VLAN信息列表,可以增加、刪除或修改VLAN。
* VTP Client也維護該VTP域中所有VLAN信息列表,但不能增加、刪除或修改VLAN,任何變化的信息必須從VTP Server發布的通告報文中接收。
* VTP Transparent不參與VTP工作,它雖然忽略所有接收到的VTP信息,但能夠將接收到的VTP報文轉發出去。它只擁有本設備上的VLAN信息。
其中,VTP Server和VTP Client必須處於同一個VTP域,且一個交換機只能位於一個VTP域中。
把介面放入三層模式來配置被路由埠,用命令:
(interface) no switchport
接著指派一個IP地址給埠,啟用路由,並且指派路由協議:
(interface) ip address ip_address
(global) ip routing
(global) router protocol

⑹ 交換機上的VTP如何使用

五、VTP (VLAN Trunking Protocol)
配置VTP
sw1(config)#vtp domain ccie
sw1(config)#vtp mode server/client/transparent
sw1(config)#vtp version 2
sw1(config)#vtp password cisco
六、VTP Pruning
配置
sw1(config)#vtp pruning
sw1(config)#int f0/21
sw1(config-if)#switchport trunk pruning vlan remove 10

具體命令含義可以看看下面的介紹,很詳細!
http://www.china-ccie.com/ccie/lilun/switching/switching.html#5

補充:
server端只能有修改、增加、刪除vlan的功能,以及把server設備上的介面非配到vlan的功能。而client設備上的介面要在client設備上來分配。這么說你懂了不?
VTP的作用簡單說就是在一個設備上變更vlan而使下面的所有client端同步,這樣就省了去各個client端來重復vlan這個操作。而要想把client端的介面劃分到vlan這個操作在server上做是做不到滴!!

⑺ 普通交換機常用配置命令

a、更改遠程TELNNET密碼
Switch#configure terminal
Switch(config)#line vty 0 4
Switch(config-line)#password qycx123
Switch(config-line)#login
Switch(config-line)#exit
b、更改進入全局配置模式時的密碼
Switch#configure terminal
Switch(config)#enable secret qycx123
思科交換機常用命令——創建並劃分VLAN
a、創建VLAN
Switch#vlan database
Switch(vlan)#vlan 99 name office (創建vlan 99 並命名為office)
b、將埠劃分至vlan
Switch(config)#interface fastEthernet 0/8
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 99 (將8號快速以太口劃分至vlan 99)
思科交換機常用命令——調試命令
a、顯示所有配置命令:Switch#show run
b、顯示所有介面狀態:Switch#show ip int brief
c、顯示所有VLAN的信息:Switch#show vlan brief
cisco交換機還是比較常用的,於是我研究了一下Cisco交換機命令的大總結,在這里拿出來和大家分享一下,希望對大家有用。我所針對的都是Cisco的設備而言的,華為的可以跟據手冊來查,配置都是差不多的,這里華子就不多寫華為的設備了,了解的也不是很多。
Cisco交換機命令之使用Telnet遠程式管理
switch(config)#interface vlan 1 進入vlan 1
switch(config-if)#ip address 設置IP地址
switch(config-if)#ip default-gateway 設置默認網關
switch(config)#line vty 0 4 進入虛擬終端
switch(config-line)#login 允許登錄
switch(config-line)#password xx 設置登錄口令
switch#exit 返回命令
Cisco交換機命令之控制台口令
switch(config)#line console 0 進入控制台口
switch(config-line)#login 允許登錄
switch(config-line)#password xx 設置登錄口令
switch#exit 返回命令
Cisco交換機命令之基本介面配置
switch(config)#interface f0/1 進入f0/1介面
switch(config-if)#plex full 配置全雙工模式
switch(config-if)#speed 100 配置速率
switch(config-if)#description to ***** 介面描述
switch(config)#ip domain-name ***.com 設置或名伺服器
switch(config)#mac-address-table aging-time 設置mac表超時時間
switch#write 保存配置信息
switch# running-config startup-config 保存當前配置nvram
switch#erase startup-config 清除配置文件
Cisco交換機命令之交換機VLAN設置:
switch#vlan database 進入VLAN設置
switch(vlan)#vlan 2 建VLAN 2
switch(vlan)#name 名字 建VLAN 2的名稱
switch(vlan)#no vlan 2 刪vlan 2
注:刪除vlan時原屬於此vlan的埠處於非激活狀態,直到重新分配為止。
switch(config)#int f0/1 進入埠1
switch(config-if)#switchport mode access 當前埠工作莫試
switch(config-if)#switchport access vlan 2 當前埠加入vlan 2
switch(config-if)#switchport mode trunk 設置為干線
switch(config-if)#switchport trunk encapsulation dot1q 設置vlan 中繼協議
switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干線
switch(config-if)#switchport trunk allowed vlan add 1,2 ; 從Trunk中添加vlans
switch(config-if)#switchport trunk allowed vlan remove 1,2 ;從Trunk中刪除vlans
switch(config-if)#switchport trunk pruning vlan remove 1,2 ;從Trunk中關閉局部修剪
Cisco交換機命令之乙太網通道配置
switch(config)#interface range fasternet0/1 - 2 將fasternet0/1和0/2 口捆綁
switch(config-if)#channel-group 1 mode on 配置以太通道模式
switch(config-if)#port-channel load-balance {dst-mac | src-mac}在鏈路間實現負載均衡
switch#show etherchannel 1 summary 查看通道信息
switch#show etherchannel load-balance 查看通道信息
Cisco交換機命令之vtp配置
switch(config)#vtp domain 設置vtp域名
switch(config)#vtp password 設置vtp密碼
switch(config)#vtp mode server 設置vtp伺服器模式
switch(config)#vtp mode client 設置vtp客戶機模式
switch(config)#vtp mode transparent 設置vtp 透明模式
switch(config)#vtp version 設置vtp版本
switch(config)#vtp pruning 啟用vtp修解
switch(config)#no vtp pruning 關閉vtp修解
注:要想從vtp中減少一台交換機只需將該交換機vtp 名更改
Cisco交換機命令之生成樹stp:
switch(config)#spanning-tree vlan 啟用stp生成樹(基於vlan)
switch(config)#spanning-tree vlan root primary 指定根交換機(基於vlan)
switch(config)#spanning-tree vlan root secondary 指定備用根交換機(基於vlan)
switch(config)#spanning-tree vlan priority 指定交換機優先順序(基於vlan)
switch(config)#no spanning-tree vlan priority 將交換機的優先順序恢復默認值(基於vlan)
switch(config-if)#spanning-tree vlan cost 指定埠成本(起用trunk的埠模式下)
switch(config-if)#spanning-tree vlan port-prioty 指定交換機埠優先順序(基於vlan)
switch(config-if)#spanning-tree portfast 配置速埠(連接終端設備的埠狀態)如pc機
switch(config)#spanning-tree uplinkfast 配置上行速埠
switch(config)#spanning-tree vlan hello-time 配置交換機hello時間(基於vlan)
switch(config)#spanning-tree vlan forward-time 修改轉發延遲計時器(基於vlan)
switch(config)#spanning-tree vlan max-time 修改最大老化時間(基於vlan)
switch#show spanning-tree summery 檢測vlan生成樹配置
switch#show spanning-tree vlan detail 瀏覽詳細生成樹配置信息
switch#show spanning-tree interface detail 瀏覽詳細生成樹埠配置信息
Cisco交換機命令之交換機顯示命令:
switch#show vtp status 查看vtp配置信息
switch#show running-config 查看當前配置信息
switch#show vlan 查看vlan配置信息
switch#show interface 查看埠信息
switch#show int f0/0 查看指定埠信息
switch#dir flash: 查看快閃記憶體
switch#show version 查看當前版本信息
switch#show mac-address-table aging-time 查看mac超時時間
switch#show cdp cisco設備發現協議 (可以查看聆接設備)
switch#show cdp traffic 杳看接收和發送的cdp包統計信息
switch#show cdp neighbors 查看與該設備相鄰的cisco設備
switch#show interface f0/1 switchport 查看有關switchport的配置
switch#show cdp neighbors 查看與該設備相鄰的cisco設備

⑻ 思科三層交換機配置命令

1. 交換機支持的命令:
交換機基本狀態:
switch: ;ROM狀態, 路由器是rommon>
hostname> ;用戶模式
hostname# ;特權模式
hostname(config)# ;全局配置模式
hostname(config-if)# ;介面狀態

交換機口令設置:
switch>enable ;進入特權模式
switch#config terminal ;進入全局配置模式
switch(config)#hostname ;設置交換機的主機名
switch(config)#enable secret xxx ;設置特權加密口令
switch(config)#enable password xxa ;設置特權非密口令
switch(config)#line console 0 ;進入控制台口
switch(config-line)#line vty 0 4 ;進入虛擬終端
switch(config-line)#login ;允許登錄
switch(config-line)#password xx ;設置登錄口令xx
switch#exit ;返回命令

交換機VLAN設置:
switch#vlan database ;進入VLAN設置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;刪vlan 2
switch(config)#int f0/1 ;進入埠1
switch(config-if)#switchport access vlan 2 ;當前埠加入vlan 2
switch(config-if)#switchport mode trunk ;設置為干線
switch(config-if)#switchport trunk allowed vlan 1,2 ;設置允許的vlan
switch(config-if)#switchport trunk encap dot1q ;設置vlan 中繼
switch(config)#vtp domain ;設置發vtp域名
switch(config)#vtp password ;設置發vtp密碼
switch(config)#vtp mode server ;設置發vtp模式
switch(config)#vtp mode client ;設置發vtp模式

交換機設置IP地址:
switch(config)#interface vlan 1 ;進入vlan 1
switch(config-if)#ip address ;設置IP地址
switch(config)#ip default-gateway ;設置默認網關
switch#dir flash: ;查看快閃記憶體

交換機顯示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看當前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看埠信息
switch#show int f0/0 ;查看指定埠信息
補充 :
3層交換機多出的就是路由能力,體現在vlan的互相通信功能和埠的路由能力,下面介紹:
開啟路由功能:ip routing
進入vlan 配置網段網關與路由配置介面相同
interface vlan 1
ip 192.168.1.1 255.255.255.0
路由配置與路由器配置相同只是把介面換為VLAN+VLAN號,開啟介面路由功能,進入介面配置:no swichport

⑼ vtp配置問題

LZ好,>進入配置模式:
switch#configure terminal
>配置VTP域名:
switch(config)#vtp domain test
>配置VTP運行模式:
switch(config)#vtp mode server
>配置VTP口令:
switch(config)#vtp password 2 3 7
switch(config-if)#end
switch#show interface fa0/3 switchport
-
trunking vlans active:1-4,6,7,200
pruning vlans enable :4-6,8-1001
例3(在管理域中關閉VTP修剪)
switch#config t
switch(config)#no vtp pruning
switch#show vtp status
-
vtp pruning mode :disabled(修剪已關閉)
<3>VTP版本設置
switch(config)#vtp version 2(配置為版本2)
switch(config)#no vtp version 2(回到版本1)
switch#show vtp terminal
VTP V2 mode :enable
只有在VTP伺服器模式下才能變更VTP版本
3、在VTP域內增加、減少交換機的配置方法
<1>增加交換機
新加入的交換機的VTP配置號比所要加入的域中原來的VTP伺服器上的配置號要低.
添加過程:
>清除配置:(或其他的方法)
switch(config)#erase startup-config
switch(config)#end
switch#reload
>配置VTP運行模式:
switch(config)#vtp domain test
>配置VTP運行模式
switch(config)#vtp mode server
switch(config)#end
switch#show vtp status
<2>減少交換機
switch(config)#vtp domain test-a
switch(config)#end
switch#show vtp status
VTP模式

當交換機是在VTP Server或透明的模式,能在交換機配置VLAN。當交換機配置在VTP Server或透明的模式,使用CLI、控制台菜單、MIB(當使用SNMP簡單網路管理協議管理工作站)修改VLAN配置。

一個配置為VTP Server模式的交換機向鄰近的交換機廣播VLAN配置,通過它的Trunk從鄰近的交換機學習新的VLAN配置。在Server模式下可以通過MIB,CLI,或者控制台模式添加、刪除和修改VLAN。

例如:增加了一個VLAN,VTP將廣播這個新的VLAN,Server和Client機的Trunk網路埠准備接收信息。

在交換機自動轉到VTP的Client模式後,它會傳送廣播信息並從廣播中學習新的信息。但是,不能通過MIB、CLI、或者控制台來增加、刪除、修改VLAN。VTP Client端不能保持VLAN信息在非易失存儲器中。當啟動時,它會通過Trunk網路埠接受廣播信息,學習配置信息。

在VTP透明的模式,交換不做廣播或從網路學習VLAN配置。當一個交換機是在VTP透明的模式,能通過控制台、CLI、MIB來修改、增加、刪除VLAN。

為使每一個VLAN能夠使用,必須使VTP知道。並且包含在Trunk port 的准許列表中,一個快速乙太網ISL Trunk自動為VLAN傳輸數據,並且從一個交換機到另一個交換機。

需要注意的是如果交換在VTP Server模式接收廣播包含128多個VLAN,交換自動地轉換向VTP Client模式。

更改交換機從VTP Client模式向VTP透明的模式,交換機保持初始、唯一128VLAN並刪除剩餘的VLAN。

傳送VTP信息

每個交換機用VTP廣播Trunk埠的管理域,定義特定的VLAN邊界,它的配置修訂號,已知VLAN和特定參數。在一個VTP管理域登記後交換機才能工作。

通過Trunk,VTP Server向其它交換機傳輸信息和接收更新。VTP Server也在NVRAM中保存本VTP管理域信息中 VLAN的列表。 VTP能通過統一的名字和內部的列表動態顯示出管理域中的VLAN。

VTP信息在全部Trunk連接上傳輸,包括ISL、IEEE802.10、LANE。VTP MIB為VTP提供SNMP工具,並允許瀏覽VTP參數配置。

VTP建立共用的配置值和分布下列的共用的配置信息:

* VLAN IDs(ISL)

* 仿效LAN的名字(ATM LANE)

* IEEE802.10 SAID值(FDDI)

* VLAN中最大的傳輸單元(MTU)大小

* 幀格式
CDP:思科發現協議(CDP:Cisco Discovery Protocol)

思科發現協議 CDP 基本上是用來獲取相鄰設備的協議地址以及發現這些設備的平台。CDP 也可為路由器的使用提供相關介面信息。CDP 是一種獨立媒體協議,運行在所有思科本身製造的設備上,包括路由器、網橋、接入伺服器和交換機。需要注意的是,CDP是工作在 Layer 2 的協議,默認情況下,每60秒以 01-00-0c-cc-cc-cc 為目的地址發送一次組播通告,當達到180秒的holdtime上限後仍未獲得鄰居設備的通告時,將清除鄰居設備信息。

SNMP 中結合使用 CDP 管理信息基礎 MIB,能使網路管理應用獲知設備類型和相鄰設備的 SNMP 代理地址,並向這些設備發送 SNMP 查詢請求。Cisco 發現協議支持 CISCO-CDP-MIB。

CDP 運行在所有的媒體上,從而支持子網訪問協議 SNAP,包括區域網、幀中繼和非同步傳輸模式 ATM 物理媒體。CDP 只運行於數據鏈路層,因此,支持不同網路層協議的兩個系統彼此相互了解。

CDP 配置的每台設備發送周期性信息,如我們所知的廣告到組播地址。每台設備至少廣告一個地址,在該地址下,它可以接收 SNMP 信息。廣告包括生存期,或保持時間等信息,這些信息指出了在取消之前接收設備應該保持 CDP 信息的時間長短。此外每台設備還要注意其它設備發出的周期性 CDP 信息,從中了解相鄰設備信息並決定那些設備的媒體介面什麼時候增長或降低。

CDP 版本2,是目前該協議使用最普遍的版本,它具有更高的智能設備跟蹤等性能。支持該性能的報告機制,提供快速差錯跟蹤功能,有利於縮短停機時間(Downtime)。報告差錯信息可以發送到控制台或日誌伺服器(Logging Server),這些差錯信息包括連接埠上不匹配(Unmatching)的本地 VLAN IDs(IEEE 802.1Q)以及連接設備間不匹配的埠雙向狀態。
VTP是通過CDP信息來傳遞/同步VLAN信息的 只要在A配置Server模式 並配置域名 在客戶端配置Client模式並配置相同的域名只要在服務端添加修改Vlan信息都會同步客戶端 你懂吧?不懂好好看看書. 32084希望對你有幫助!

熱點內容
阿里雲伺服器上傳源碼後怎麼修改 發布:2024-09-23 10:24:01 瀏覽:715
逍遙安卓怎麼使用手柄 發布:2024-09-23 10:16:14 瀏覽:61
奧鵬學生平台默認密碼是多少 發布:2024-09-23 10:07:09 瀏覽:897
出錯訪問升級中 發布:2024-09-23 10:02:01 瀏覽:675
伺服器如何鏡像 發布:2024-09-23 09:41:58 瀏覽:524
java格林時間 發布:2024-09-23 08:51:43 瀏覽:301
直播眾籌源碼 發布:2024-09-23 08:40:14 瀏覽:550
好口碑ip伺服器託管 發布:2024-09-23 08:32:06 瀏覽:780
手機如何設置服務密碼 發布:2024-09-23 08:20:07 瀏覽:543
小兔雲伺服器 發布:2024-09-23 08:15:07 瀏覽:810