思科交換機的配置基礎

㈠網絡設備的初始化配置

可網管交換機(三層交換機除外)無需配置便可做爲傻瓜交換機使用,可是沒有配置的交換機將不能發揮其功能和安全性。沒有配置的路由器沒法實現網絡之間的通訊。html

2,網絡設備的管理方式數據庫

外置配置源api

控制檯(超級終端),虛擬終端(Telnet),網管工做站(Cisco的CiscoWork,HP的OpenView),TFTP服務器安全

3,CLI服務器

一種基於DOS 命令行的軟件系統,對大小寫不敏感,能夠縮寫命令和參數。網絡

Cisco IOS命令行 須要在各自的命令模式下才能執行,所以,想執行某個命令,必須進入相應的配置模式。session

4,Cisco IOS 共包括7種不一樣的命令模式dom

用戶模式,特權模式,全局配置模式,Config-VLAN 模式,VLAN配置模式,接口配置模式,ide

Line配置模式。工具

模式

訪問方法

提示符

退出方法

用途

User Exec

開始默認模式

Switch>

quit或

end或

exit

改變終端設置,執行基本測試,顯示系統信息

Privileged Exec

Switch>enable

Switch#

校驗鍵入的命令,該模式由密碼保護

Gobal Configuration

Switch#config

Switch(config)#

將配置的參數應用於整個網絡設備

Config-vlan

Switch(config)#vlan vlan-id

Switch(config-vlan)#

配置VLAN 參數。

VLAN configuration

Switch#vlan database

Switch(vlan)#

在VLAN database 中爲VLAN 1-1005配置VLAN 參數

Interface Configuration

Switch(config)#interface

Switch(config-if)#

爲Ethernet interfaces等 配置參數

Line Configuration

Switch#line

Switch(config-line)#

爲terminal line 配置參數


5,幫助,在#提示符後 輸入 ? 可查看那些命令可用

6,命令的簡略方式 show running-config 可簡寫成sh run

7,no執行命令相反的活動 如 no shutdown, 將命令恢復默認值如no speed

8,使用CiscoNetwork Assistant配置交換機

團體和集羣,

團體最多容納40個鏈接網絡設備的設備組,Network Assintant 使用Cisco Discovery Protocol的自動查找能力來找出合格的網絡設備,並將它添加到團體中。

9.CiscoSDM Express

用於爲路由器快速設置LAN鏈接和Internet鏈接的管理工具

一次進入 Cisco Router(SDM)小記

10, CiscoPacket Tracer

思科交換機路由器 模擬軟件


如下配置 粗體是命令的關鍵字 ,斜體是參數, {}可選其一

㈡思科交換機經常使用的配置

配置複用端口

Switch# configure terminal

Switch(config)# interface interface-id

Switch(config-if)# media-type {auto-select |rj45 | sfp}

Switch(config-if)# end

Switch# show interface interface-id transceiver properties

(保存配置)

Switch#copy running-config startup-config

配置速率,雙工和自動翻轉

Switch(config-if)# speed {10 | 100 |1000|auto|nonegotiate}

Switch(config-if)# duplex {auto |full |half }

Switch(config-if)# mdix auto

Switch#show controllers ethernet-controller interface-id phy

配置流控制

Switch(config-if)# flowcontrol {receive |send |} { on | off | desired

查看模塊或端口狀態

Switch# show module all

檢查指定模塊的狀態

Switch# show module mod_num

⑴當須要查看端口工做狀態時,可以使用下述命令

Swtich#show interface status

Switch#show interface interface-id

禁用並從新啓用接口

Switch(config-if)# shutdown

Switch(config-if)#no shutdown

配置EthernetChannel

使用端口匯聚協議(PAgP)能夠很容易在有EtherChannel能力的端口間,自動創建Fast EtherChannel 和Gigabit EtherChannel 鏈接,進行信息的交流。該協議具備學習相鄰端口組動態和信息的能力。PAgP是EtherChannel的加強版,它支持在EtherChannel上的Spanning Tree和Uplink Fast功能,並支持自動配置EtherChannel的捆綁。Uplink Fast也是Cisco交換機技術,可以保證交換機在幾秒種內快速從失敗中恢復。

EtherChannel簡介

使用端口匯聚協議(PagP, Port Aggregation Protocol)或鏈路匯聚控制協議(LACP,Link Aggration Control Protocol)能夠將交換機之間,交換機和路由器之間,以及交換機與服務器之間的最多8條鏈路綁定在一塊兒,疊加其傳輸帶寬,使網絡設備之間的通訊更加快速與順暢。


PagP協議支持的模式

auto 當增測PAgP設備時,將只啓用PAgP。將接口置於被動協商狀態,能夠對接收到的PagP作出響應,可是不主動發送PAgP包進行協商

desirable 無條件啓用PAgP。將接口置於主動協商狀態,經過發送PAgP包,主動與其餘接口進行協商

on 將接口強行指定至Channel。只有兩個on模式接口組相連時,EtherChannel纔可用。

non-silent (可選)若是交換機鏈接有PAgP能力的夥伴,能夠將接口配置爲nonsilent(非沉默)運行。若是沒有爲auto 或 desirable 模式指定non-silent關鍵字,默認爲silent 。

採用PAgP協議時,如下幾種模式能夠構建EtherChannel:

一個接口爲 desiable 模式 ,另外一個接口爲 desiable 或 aut哦模式。

一個接口爲 auto 模式,另外一個接口爲desiable模式。

LACP協議支持的模式:

Active 當偵測到LACP設備時,將只啓用LACP .激活端口的主動協商狀態,經過發送LACP包,與其餘接口進行主動協商。

Passive 當偵測到LACP 設備時,將只啓用LACP,將端口置於被動協商狀態,能夠對接收到的LDCP做出響應,可是,不能主動發送LACP包進行協商。


Switch#config terminal

2建立Port-channel接口。port_channel_number 取值範圍爲1-48

Switch(config)# interface port-channel  port_channel_number

3將接口置於三層模式

Switch(config-if)#no switchport

4爲該EtherChannel指定IP地址和子網掩碼。

Switch(config-if) # ip address ip_address subnet_mask

5返回全局配置模式

Switch(config-if)#exit

6選擇配置的物理接口,

Switch(config)#interface {fastethernet|gigabitethernet} slot/port

7建立三層路由接口

Switch(config-if)#no switchport

8確保該物理接口沒有IP地址

Switch(config-if)#no ip address

9將接口配置爲port-channel並指定爲PAgP 或LDCP模式

Switch(config-if)#channel-group channel-group-number mode { auto [non-silent] | desirable[non-silent] |on} |{active | passive}

Switch(config-if)#end

10查看配置

Switch#show running-config

Switch#show running-config interface port-channel port_channel_number

實例 略

移除端口和EtherChannel

1從EtherChannel中移除接口

Switch#config terminal

Switch(config)# interface interface-id

從EtherChannel中移除接口

Switch(config-if)#no channel-group

Switch(config-if)#end

Swtich# show running-config

保存配置

Switch#copy running-config startup-config

2移除EtherChannel

Switch# configure terminal

Switch(config)#no interface port-channel port_channel_number

Switch(config-if)#end

查看配置

Switch# show etherchannel summary

配置VLAN

VLAN Trunk簡介

VLAN用於將端口指定爲不一樣的虛擬局域網,從而隔離彼此的之間的廣播和直連通訊,提升網絡的傳輸效率和安全性。Trunk 用於藉助一個接口實現不一樣交換機之間多VLAN的傳輸。

  1. VLAN 的做用

下降移動和變動管理成本,控制廣播,加強安全性,網絡監督和管理自動化

  1. Trunk的功能

能夠將同一交換機的不一樣端口劃分爲同一VLAN ,並且還能夠設置跨越交換機的VLAN 。

不一樣交換機上具備相同ID的VLAN 之間,可藉助一條鏈路實現彼此之間的鏈接。用於鏈接VLAN的鏈路,稱之爲VLAN中繼


VTP 簡介

VTP (VLAN TrunkingProtocol ,VLAN 中繼協議)是一種消息協議,用於在VTP域內同步VLAN 信息(VLAN 的添加,刪除和重命名),而沒必要在每臺交換機上配置相同的VLAN 信息,從而實現VLAN配置的一致性。使用VTP,能夠在一個或多個交換機上創建配置修改中心。

VTP域(也稱爲VLAN管理域),由一個或多個相互鏈接,使用相同VTP域名的交換機組成。一臺交換機只能配置一個VTP域。

若是一個交換機收到一箇中繼傳來的VTP通告,它將繼承管理域名和VTP配置版本號,而且再也不理睬不一樣的管理域名或更早的配置版本號。

VTP模式(三種):

Server 服務器

Client客戶端

Transparent透明模式

VTP的配置規則:

VTP域中VTP版本要相同

當在交換機上啓用VTP版本2時,同一域中可以運行版本2的交換機都將啓用版本2,配置前確保域中交換機都能運行版本2。

Token Ring 環境必須啓用版本2,

在VTP server上啓用(禁用)修剪將致使整個管理域啓用(禁用)修剪。


VLAN 的配置規則

在配置VLAN時,應遵循如下規則:

在VTP客戶端,服務器和透明模式中,交換機支持1005個VLAN。

標準序列VLAN 的ID爲1~1001 。VLAN 號爲1002~1005的是Token Ring 和FDDI VLAN.

VLAN 1~1005的VLAN 配置一般被保存在VLAN數據庫中。若是VTP模式是透明模式的,VTP和VLAN 配置也保存在交換機運行配置(running configuration)文件中。

VTP透明模式中,交換機也支持VLANID 1006~4094 ,該擴展序列和配置選項被限制。擴展序列VLAN 不能保存在VLAN 數據庫。

配置VTP服務器

在一個局域網中,一般只須要配置1~2個VTP服務器,可將核心交換機配置爲VTP服務器。在該交換機上配置VLAN,併爲VLAN指定IP地址信息,其餘交換機做爲VTP客戶端,接受並更新VTP服務器中的VLAN配置,從而使VLAN配置,修改和管理實現自動化和全網統一。

配置VTP服務器的步驟,將交換機設置爲VTP服務器模式;將交換機端口指定到相應的VLAN;建立一個VLAN Trunk,用於實現與其餘交換機的通訊。

Switch# config terminal

Switch(config)#vtp mode server

Switch(config)#vtp domain domain-name

(設置VTP域密碼,密碼長度爲8-64個字符)

Switch(config)#vtp password password

Switch(config)#end

配置VTP客戶端

若要使交換機接受VTP服務器對VLAN的配置,從而實現VLAN添加,刪除和修改的自動化,就必須將設置爲VTP客戶端。事實上,除了VTP服務器外的全部交換機都應該配置爲VTP客戶端。

配置 VTP客戶端的步驟, 將交換機設置爲VTP客戶端模式;將交換機端口指定到相應的VLAN;建立一個VLAN Trunk,用於實現與其餘交換機的通訊。

Switch(config)#vtp mode client

Switch(config)#vtp domain domain-name

(設置VTP域密碼,密碼長度爲8-64個字符)

Switch(config)#vtp password password

(略)

VTP客戶端雖然沒必要建立VLAN,可是必須以手工方式將端口指定爲不一樣的VLAN,若是不將端口指定至VLAN ,那麼該交換機的全部端口都將與級聯端口在同一VLAN.


查看配置

Switch#show vtp status

保存配置)

Switch#copy running-config startup-config

啓用版本2

Switch(config)#vtp version 2

配置VTP透明模式

Switch(config)#vtp mode transparent

建立VLAN並將端口指定到VLAN

第1步 進入全局配置模式

Switch#config terminal

第2步 以太網VLAN ID 取值範圍爲1-1001,其中vlan 1爲系統默認VLAN不能被建立,也不能被刪除

Switch(config)# vlan vlan-id

第3步 爲VLAN 命名,可不配置名稱,名稱默認爲VLAN ID前加多個0

Swtich(config-vlan)# name vlan-name

第4步 返回全局配置模式

Swtich(config-vlan)# exit

第5步 進入接口模式

Switch(config)# interface interface-id

或者

Switch(config)# interface range interface-range

第6步 爲端口(第二層訪問端口)定義VLAN成員模式

Switch(config-if)# switchport mode access

第7步 將接口添加至指定的VLAN

Switch(config-if)# switchport access vlan vlan-id

第8步 退出接口配置模式

Switch(config)# end

第9步 查看 VLAN 配置

Switch(config)#show vlan {id |name|brief} vlan_name


清除接口配置

Switch(config)# default interface interface-id

刪除某個VLAN

Switch(config)# no vlan vlan-id

刪除所有VLAN

Switch# delete flash:vlan.dat

Delete filename [vlan.dat]?回車鍵

Delete flash:/vlan.dat? [confirm]回車鍵

配置VLAN Trunk

Trunk 端口不能是安全端口

Trunk 端口能夠是EtherChannel組成員,可是組中全部Trunk必須具備相同的配置。包括:容許VLAN列表;每一個VLAN的STP端口優先級,STPPort Fast設置;Trunk狀態,若是端口組中的一個端口不是Trunk,全部端口也將再也不是Trunk

在PVST模式下,建議配置很少於24個Trunk端口,在MST模式下,建議配置很少於40個Trunk端口。

Switch(config)#interface interface-id

Switch(config-if)#switchport mode trunk

配置ISL 或802.1Q封裝,若是兩端都是Cisco交換機用ISL封裝

Switch(config-if)#switchport trunk encapsulation {isl| dot1q | nogotiate}

Switch(config-if)#switchport trunk allow vlan {all|add|except|remove} vlan-list

爲802.1Q指定本地VLAN ,若不指定本地VLAN ,默認爲VLAN 1

Switch(config-if)#switchport trunk native vlan vlan-id

配置STP

STP ,PVST, RSTP,MSTP的介紹

Switch#config terminal

Switch(config)# spanning-tree mode {pvst |mst| rapid-pvst}

Switch(config)#end

Switch#show spanning-tree vlan vlan-id

對於較早的交換機

Switch(config)#spanning-tree vlan vlan_id

Switch(config)# no spanning-tree vlan vlan_id

配置根交換機

當VLAN 中存在拓撲環時,應當經過根交換機,端口優先級和路徑費用等設置,肯定網絡拓撲結構,一般狀況下,應當將核心交換機配置爲根交換機,當網絡中有兩臺核心交換機時,能夠分別配置根交換機和次根交換機。

diameternet-diamete用於指定兩個終端間交換機數量,取值範圍爲2—7

Switch(config)#spanning-tree vlan vlan_id root primary diameter net-diamete

配置次根交換機

Switch(config)#spanning-tree vlan vlan_id root secondary diameter net-diamete

配置端口優先級

Switch#config terminal

Switch(config)#interface interface-id

爲接口配置優先級,取值範圍爲0-255 ,默認值爲128 。數值越低,優先級越高。

Switch(config-if)#spanning-tree port-priority priority

爲接口配置VLAN端口優先級。取值範圍爲0-255,默認值爲128.數值越低,優先級越高。

Switch(config-if)#spanning-tree vlan vlan-id port-priority priority

Switch(config)#end

Switch#show spanning-tree interface interface-id | {port-channel port_channel_number}

Switch#show spanning-tree vlan vlan_id

配置路徑費用

Switch#configterminal

選擇欲配置的接口,既能夠是物理接口,也能夠是EtherChannel邏輯端口

Switch(config)#interface interface-id | {port-channel port_channel_number}

配置接口的費用,取值範圍爲1-200 000 000.較低的路徑費用代表有較高的傳輸速率。

Switch(config-if)#spanning-tree cost cost

Switch(config-if)#spanning-tree vlan vlan-id cost cost

Switch(config-if)#end

Switch# show spanning-tree interface {interface-id} |{port-channel port_channel_number}

Switch#show spanning-tree vlan vlan_id

配置Post Fast端口

Spanning-Tree Port Fast將使端口繞過監聽和學習階段,當即進入Spanning-Tree轉發狀態。Post Fast只適用於終端與交換機鏈接的端口。

Switch#config terminal

Switch(config)#interface interface-id

指定trunk關鍵字 ,能夠在Trunk端口啓用Port Fast。默認狀況下,全部端口都被禁用Port Fast

Switch(config-if)#spanning-tree postfast [trunk]

Switch(config-if)#end

Switch#show spanning-tree interface interface-id portfast

Switch#copyrunning-config startup-config

配置MSTP

Switch#config terminal

進入配置MST模式

Switch(config)#spanning-tree mode mst

將VLAN映射到MST實例。instace-id的取值範圍爲0-4094.vlan-range的取值範圍爲1-4094,使用「-」能夠指定一個VLAN範圍,例如,instace2 vlan 1-13 命令將把VLAN1至VLAN13添加到MST實例2.一樣,也可使用「,」來指定若干不連續的VLAN,例如 instace 1 vlan 10,20,30將把VLAN0010,VLAN0020,VLAN0030添加至MST實例1。當將VLAN映射至MST實例時,命令中指定的VLAN將從早前的映射中被添加或移除。

Switch(config-mst)#instance instance-id vlan vlan-range

指定配置名稱。name字符串最長爲32個字符,而且對大小寫敏感。

Switch(config-mst)#name name

指定配置修訂編號,取值範圍爲0-65535。

Switch(config-mst)#revision version

校驗配置

Switch(config-mst)#show pending

Switch(config-mst)#end

Switch#show running-config

配置根、次根交換機

Switch# config terminal

配置爲根交換機,

diameter net-diameter(可選) 取值範圍2-7,用於指定任意兩端之間的交換機最大數

hello-time seconds(可選) 用於指定根交換機發生配置消息的時間間隔,取值範圍爲1-10秒,默認值爲2秒。

Switch(config)# spanning-tree mst instace-id root primary

[diameter net-diameter [hello-time seconds]]

配置爲次根交換機

Switch(config)# spanning-tree mst instace-id root secondary

[diameter net-diameter] [hello-time seconds]

Switch(config)# end

Switch# show spanning-tree mst instance-id

配置IP路由

VLAN之間是沒法直接通訊的,VLAN之間的通訊必須藉助第三層交換機。同時,VLAN之間的通訊必須藉助三層接口才能實現。所以,VLAN建立完成後,必須配置三層VLAN端口,才能使VLAN之間的通訊成爲可能。

第三層交換機根據OSI模型網絡層的IP地址完成端到端的數據交換,主要應用於不一樣VLAN子網的路由。當某一消息源的第一個數據流進行路由後,交換機會產生MAC地址到IP地址的映射表,直接從第二層由原地址傳輸到目的地址,再也不通過第三層路由系統處理,提升了數據包的轉發效率,解決了VLAN 子網間傳輸消息時傳統路由產生的速率問題。

配置邏輯三層接口

前提:1.已經建立VLAN,並將VLAN成員指定到二層接口 。2.已經啓用IP路由,並指定IP路由協議。

Switch#config terminal

Switch(config)# ip routing

進入VLAN接口

Switch(config)# interface vlan vlan-id

爲該VLAN指定IP地址信息,該VLAN中的計算機,將使用該IP地址做爲默認網關。

Switch(config-if)# ip address ip_address subnet_mask

Switch(config-if)# no shutdown

Switch(config-if)# end

保存配置

Switch# copy running-config startup-config

查看配置

Switch# show interface interface-id

Switch# show ip interface interface-id

Switch# show running-config interface interface-id

Switch# show running-config interface vlan vlan_id

配置物理三層接口

Switch(config)#ip routing

Switch(config)# interface interface-id

Switch(config-if)# no switchport

Switch(config-if)# ip address ip_address subnet_mask

Switch(config-if)# no shutdown

ACL

交換機支持的訪問列表

IP訪問列表。過濾IP通訊,包括TCP,UDP,IGMP,ICMP

Ethernet訪問列表,過濾非IP通訊

端口訪問列表,路由訪問列表,VLAN訪問列表

訪問列表類型

1標準IP訪問列表

只過濾源地址

2擴展IP訪問列表

擴展訪問列表容許過濾源地址,目的地址,協議類型,端口號

3命名訪問列表

方便修改

配置訪問列表的注意事項

考慮訪問列表中語句的順序

默認拒絕

過濾方向: 向內的 inbound,向外的outbound

access-list-number及說明

074208805.png

基本訪問列表

Switch#configure terminal

Switch(config)# access-list access-list-number {deny| permit} {ip_addresssubnet_mask|host ip_address|any}


IP訪問列表

074208324.png


查看訪問列表配置

Switch#show access-lists {name| access-list-number}


在接口上應用訪問控制列表

Switch(config-if)#ip access-group access-list-number in

Switch(config-if)#ip access-group access-list-number out

配置CDP

使用CDP(CiscoDiscover Protocol)可發現網絡中相鄰的Cisco設備,包括交換機,網橋,訪問服務器和交換機,從而便於網絡的配置和管理。CiscoWorks和Cisco CAN監控和配置交換機,也必須藉助CDP才能實現。

Switch#config terminal

啓用CDP,使用no cdp run命令能夠禁用CDP

Switch(config)#cdp run

設置保持其餘設備發送消息的時間,取值範圍爲10-255,默認值爲180

Switch(config)#cdp timer seconds

設置CDP更新的發送頻率。取值範圍爲5-254,默認值爲60秒

Switch(config)#cdp holdtime seconds

設置採用版本2發送廣告。該狀態爲默認值

Switch(config)#cdp advertise-v2

Switch(config)#end

Switch#show cdp


DHCP中繼

配置DHCP中繼代理

Switch# config terminal

Switch(config)# service dhcp

2.指定包轉發地址

第1步 進入全局配置模式

Switch#config terminal

第2步 進入接口配置模式,並建立一個交換機虛擬接口

Switch(config)# interface vlan vlan-id

第3步 爲該接口配置IP地址和子網掩碼

Switch(config) # ip address ip-address subnet-mask

第4步 指定DHCP 包轉發地址。helper-address 能夠指定爲DHCP 服務器地址,或者默認網關的地址(若是DHCP 服務器位於另外的網關)。使用網關地址,可使DHCP服務器可以響應DHCP請求。若是網絡內安裝有多臺DHCP服務器,能夠爲每臺服務器分配一個helper address 。DHCP服務器所在的VLAN沒必要指定helper address

在接口模式下配置

Switch(config-if)# ip helper-address  ip-address

第5步 返回全局配置模式

Switch(config)# exit

第6步 指定欲鏈接至DHCP客戶端的交換機端口

Switch#interface range port-range

或者

Switch# interface interface-id

第7步 定義爲VLAN 成員模式

Switch(config-if)#switchport mode access

Switch(config-if)#switchport access vlan vlan-id

配置SPAN

使用SPAN(SwitchedPort Analyzer)或者RSPAN(RemoteSPAN)能夠有效的分析經過端口或VLAN的網絡流量。藉助SPAN或RSPAN ,能夠將一個交換機的端口映像到另外一個交換機端口,即發送流量的備份到該交換機或者其餘交換機的另外一個端口,這樣只須要將分析或偵聽設備鏈接至監控端口,便可實現對被監聽端口的分析和偵聽。因爲SPAN採用複製(或鏡像)源端口或源VLAN上的接受或發送(或二者都有的)流量到目的端口,所以SPAN不影響源端口或VLAN的網絡交換。事實上,除了SPAN或RSPAN會話所需的流量以外,目的端口不會接收或轉發流量。

SPAN術語

入口業務:進入交換機的業務

出口業務:離開交換機的業務

源(SPAN)端口:用SPAN功能受監控的端口

目的地(SPAN)端口:監控源端口的端口,一般連有一個網絡分析器。

監控端口:監控端口也是目的地SPAN端口

管理源:已配置受監控的源端口或者VLAN列表。

操做源:受到有效監控的端口列表。這可能和管理源有所不一樣。例如,在關閉模式下的端口可能在管理源中出現,但它不受到有效監控。

SPAN模式

本地SPAN

也成爲PSPAN,指基於端口的SPAN。源端口和目的端口都處於同一交換機,而且源端口能夠是一個或多個交換機端口。

遠程SPAN 或者RSPAN :

目的地端口和源端口沒有位於同一交換機上。這是一項高級功能,要求有專門的VLAN來傳送該業務,並由交換機之間的SPAN進行監控,要求中間交換機必須支持RSPAN VLAN技術。因而可知,並不是全部交換機均支持 RSPAN技術,因此應檢查各自的版本說明或者配置指南,覈實要配置的交換機是否可使用該功能。

VSPAN:

指基於VLAN的SPAN.SPAN的一種變體,源端口不是物理端口,而是VLAN。在給定交換機中,用戶可使用單個命令來選擇對屬於專門VLAN的全部端口進行監控。

SPAN會話中流量監視限制

VLAN或端口應當分別位於不一樣的會話中。

能夠配置在每一個交換機堆棧上的2個源會話(本地SPAN和RSPAN源會話),在同一臺交換機上,能夠同時運行一個本地SPAN和RSPAN。本地SPAN和RSPAN目的會話的總數不能超過66個。

在一個SPAN會話中,能夠有多個目的端口,可是最多不能超過64個。

建立本地SPAN會話

Switch#config terminal

Switch(config)# no monitor session { session_number| all| local| remote}

第3步

Switch(config)#monitor session session_number source{interface interface-id|

vlan vlan-id} [,|-] [both |rx|tx]

Switch(config)#monitor session session_number destination {interface interface-id [ , | - ] [encapsulation replicate ] }

Switch#show monitor [session session_number]

Switch#show running-config

Switchz#copy running-config startup-config

詳細的介紹能夠查看如下文章:

思科官方介紹:

http://wenku.baidu.com/view/2de0a61a10a6f524ccbf8508.html

相關文章
相關標籤/搜索