08-鏡像命令
本章節下載: 08-鏡像命令 (126.67 KB)
目 錄
1.1.3 mirroring-group mirroring-port (interface view)
1.1.4 mirroring-group mirroring-port (system view)
1.1.5 mirroring-group monitor-egress
1.1.6 mirroring-group monitor-port (interface view)
1.1.7 mirroring-group monitor-port (system view)
1.1.8 mirroring-group reflector-port
1.1.9 mirroring-group remote-probe vlan
display mirroring-group命令用來顯示鏡像組的信息。
【命令】
display mirroring-group { group-id | all | local | remote-destination | remote-source }
【視圖】
任意視圖
【缺省用戶角色】
network-admin
network-operator
【參數】
group-id:顯示指定鏡像組的信息,取值範圍為1~4。
all:顯示所有鏡像組的信息。
local:顯示本地鏡像組的信息。
remote-destination:顯示遠程目的鏡像組的信息。
remote-source:顯示遠程源鏡像組的信息。
【使用指導】
顯示信息的顯示順序按照鏡像組的編號順序排列,顯示內容包括鏡像組的類型、狀態和構成等信息。
【舉例】
# 顯示所有鏡像組的信息。
<Sysname> display mirroring-group all
Mirroring group 3:
Type: Local
Status: Active
Mirroring port:
Ten-GigabitEthernet1/0/1 Inbound
Ten-GigabitEthernet1/0/2 Both
Monitor port: Ten-GigabitEthernet1/0/3
Mirroring group 4:
Type: Remote source
Status: Incomplete
Mirroring port:
Ten-GigabitEthernet1/0/4 Both
Remote probe VLAN: 1900
表1-1 display mirroring-group命令顯示信息描述表
字段 |
描述 |
Mirroring group |
鏡像組的編號 |
Type |
鏡像組的類型: · Local:本地鏡像組 · Remote source:遠程源鏡像組 · Remote destination:遠程目的鏡像組 |
Status |
鏡像組的狀態: · Active:表示鏡像組已經生效 · Incomplete:表示鏡像組沒有配完,暫不生效 |
Mirroring port |
鏡像源端口 |
Monitor port |
鏡像目的端口 |
Reflector port |
鏡像組反射端口 |
Remote probe VLAN |
遠程鏡像VLAN |
mirroring-group命令用來創建一個鏡像組。
undo mirroring-group命令用來刪除已創建的鏡像組。
【命令】
mirroring-group group-id { local | remote-destination | remote-source }
undo mirroring-group { group-id | all | local | remote-destination | remote-source }
【缺省情況】
不存在任何鏡像組。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,取值範圍為1~4。
local:表示本地鏡像組。
remote-destination:表示遠程目的鏡像組。
remote-source:表示遠程源鏡像組。
all:表示所有鏡像組。
【舉例】
# 創建本地鏡像組1。
<Sysname> system-view
[Sysname] mirroring-group 1 local
mirroring-group mirroring-port命令用來配置當前端口為鏡像組的源端口。
undo mirroring-group mirroring-port命令用來取消當前端口為鏡像組的源端口。
【命令】
mirroring-group group-id mirroring-port { both | inbound | outbound }
undo mirroring-group group-id mirroring-port
【缺省情況】
端口不是任何鏡像組的源端口。
【視圖】
接口視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
both:表示對端口收發的報文都進行鏡像。
inbound:表示僅對端口收到的報文進行鏡像。
outbound:表示僅對端口發出的報文進行鏡像。
【使用指導】
隻能為本地鏡像組或遠程源鏡像組配置源端口,不能為遠程目的鏡像組配置源端口。
對於源端口,需要注意的是:
· 請不要將源端口加入到遠程鏡像VLAN中,否則會影響鏡像功能的正常使用。
· 一個端口可被多個鏡像組用作源端口,但源端口不能再被用作本鏡像組或其它鏡像組的反射端口、出端口或目的端口。
【舉例】
# 創建本地鏡像組1,配置其源端口為Ten-GigabitEthernet1/0/1,並對該端口收發的報文都進行鏡像。
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface ten-gigabitethernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] mirroring-group 1 mirroring-port both
# 創建遠程源鏡像組2,配置其源端口為Ten-GigabitEthernet1/0/2,並對該端口收發的報文都進行鏡像。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface ten-gigabitethernet 1/0/2
[Sysname-Ten-GigabitEthernet1/0/2] mirroring-group 2 mirroring-port both
【相關命令】
· mirroring-group
mirroring-group mirroring-port命令用來為鏡像組配置源端口。
undo mirroring-group mirroring-port命令用來刪除鏡像組的指定源端口。
【命令】
mirroring-group group-id mirroring-port interface-list { both | inbound | outbound }
undo mirroring-group group-id mirroring-port interface-list
【缺省情況】
鏡像組沒有源端口。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
interface-list:源端口列表,表示一個或多個源端口。表示方式為interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-8>。其中,interface-type為端口類型,interface-number為端口編號。&<1-8>表示前麵的參數最多可以輸入8次。當使用to參數配置端口範圍時,起始端口和終止端口必須是相同設備上相同類型的端口,且終止端口的端口編號必須大於等於起始端口的端口編號。
both:表示對端口收發的報文都進行鏡像。
inbound:表示僅對端口收到的報文進行鏡像。
outbound:表示僅對端口發出的報文進行鏡像。
【使用指導】
隻能為本地鏡像組或遠程源鏡像組配置源端口,不能為遠程目的鏡像組配置源端口。
對於源端口,需要注意的是:
· 請不要將源端口加入到遠程鏡像VLAN中,否則會影響鏡像功能的正常使用。
· 一個端口可被多個鏡像組用作源端口,但源端口不能再被用作本鏡像組或其它鏡像組的反射端口、出端口或目的端口。
【舉例】
# 創建本地鏡像組1,配置其源端口為Ten-GigabitEthernet1/0/1,並對該端口收發的報文都進行鏡像。
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 mirroring-port ten-gigabitethernet 1/0/1 both
# 創建遠程源鏡像組2,配置其源端口為Ten-GigabitEthernet1/0/2,並對該端口收發的報文都進行鏡像。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] mirroring-group 2 mirroring-port ten-gigabitethernet 1/0/2 both
· mirroring-group
mirroring-group monitor-egress命令用來為遠程源鏡像組配置出端口。
undo mirroring-group monitor-egress命令用來刪除遠程源鏡像組的指定出端口。
【命令】
在係統視圖下:
mirroring-group group-id monitor-egress interface-type interface-number
undo mirroring-group group-id monitor-egress interface-type interface-number
在接口視圖下:
mirroring-group group-id monitor-egress
undo mirroring-group group-id monitor-egress
【缺省情況】
鏡像組沒有出端口。
【視圖】
係統視圖/接口視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
interface-type interface-number:表示出端口。其中,interface-type為端口類型,interface-number為端口編號。
【使用指導】
隻能為遠程源鏡像組配置出端口,不能為本地鏡像組和遠程目的鏡像組配置出端口。
對於出端口,需要注意的是:
· 請不要在出端口上配置下列功能:生成樹協議、802.1X、IGMP Snooping、靜態ARP和MAC地址學習,否則會影響鏡像功能的正常使用。
· 出端口不能是現有鏡像組的成員端口。
【舉例】
# 創建遠程源鏡像組1,並在係統視圖下配置其出端口為Ten-GigabitEthernet1/0/1。
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 monitor-egress ten-gigabitethernet 1/0/1
# 創建遠程源鏡像組2,並在接口視圖下配置其出端口為Ten-GigabitEthernet1/0/2。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface ten-gigabitethernet 1/0/2
[Sysname-Ten-GigabitEthernet1/0/2] mirroring-group 2 monitor-egress
【相關命令】
· mirroring-group
mirroring-group monitor-port命令用來配置當前端口為鏡像組的目的端口。
undo mirroring-group monitor-port命令用來取消當前端口為指定鏡像組的目的端口。
【命令】
mirroring-group group-id monitor-port
undo mirroring-group group-id monitor-port
【缺省情況】
端口不是任何鏡像組的目的端口。
【視圖】
接口視圖
【缺省用戶角色】
network-admin
【參數】
group-id:指定鏡像組。group-id表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
【使用指導】
隻能為本地鏡像組或遠程目的鏡像組配置目的端口,不能為遠程源鏡像組配置目的端口。
對於目的端口,需要注意的是:
· 請不要在目的端口上使能生成樹協議,否則會影響鏡像功能的正常使用。
· 當聚合接口作為目的端口時,請勿將其成員端口配置為源端口,否則會影響鏡像功能的正常使用。
· 從目的端口發出的報文包括鏡像報文和其它端口正常轉發來的報文。為了保證數據監測設備隻對鏡像報文進行分析,請將目的端口隻用於端口鏡像,不作其它用途。
· 目的端口不能是現有鏡像組的成員端口。
【舉例】
# 創建本地鏡像組1,並配置其目的端口為Ten-GigabitEthernet1/0/1。
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface ten-gigabitethernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] mirroring-group 1 monitor-port
# 創建遠程目的鏡像組2,並配置其目的端口為Ten-GigabitEthernet1/0/2。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
[Sysname] interface ten-gigabitethernet 1/0/2
[Sysname-Ten-GigabitEthernet1/0/2] mirroring-group 2 monitor-port
【相關命令】
· mirroring-group
mirroring-group monitor-port命令用來為鏡像組配置目的端口。
undo mirroring-group monitor-port命令用來刪除鏡像組的指定目的端口。
【命令】
mirroring-group group-id monitor-port interface-type interface-number
undo mirroring-group group-id monitor-port interface-type interface-number
【缺省情況】
鏡像組沒有目的端口。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
interface-type interface-number:表示目的端口。其中,interface-type為端口類型,interface-number為端口編號。
【使用指導】
隻能為本地鏡像組或遠程目的鏡像組配置目的端口,不能為遠程源鏡像組配置目的端口。
對於目的端口,需要注意的是:
· 請不要在目的端口上使能生成樹協議,否則會影響鏡像功能的正常使用。
· 當聚合接口作為目的端口時,請勿將其成員端口配置為源端口,否則會影響鏡像功能的正常使用。
· 從目的端口發出的報文包括鏡像報文和其它端口正常轉發來的報文。為了保證數據監測設備隻對鏡像報文進行分析,請將目的端口隻用於端口鏡像,不作其它用途。
· 目的端口不能是現有鏡像組的成員端口。
【舉例】
# 創建本地鏡像組1,並配置其目的端口為Ten-GigabitEthernet1/0/1。
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] mirroring-group 1 monitor-port ten-gigabitethernet 1/0/1
# 創建遠程目的鏡像組2,並配置其目的端口為Ten-GigabitEthernet1/0/2。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
[Sysname] mirroring-group 2 monitor-port ten-gigabitethernet 1/0/2
【相關命令】
· mirroring-group
mirroring-group reflector-port命令用來為遠程源鏡像組配置反射端口。
undo mirroring-group reflector-port命令用來刪除遠程源鏡像組的指定反射端口。
【命令】
在係統視圖下:
mirroring-group group-id reflector-port interface-type interface-number
undo mirroring-group group-id reflector-port interface-type interface-number
在接口視圖下:
mirroring-group group-id reflector-port
undo mirroring-group group-id reflector-port
【缺省情況】
鏡像組沒有反射端口,端口不是任何鏡像組的反射端口。
【視圖】
係統視圖/接口視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
interface-type interface-number:表示反射端口。其中,interface-type為端口類型,interface-number為端口編號。
【使用指導】
隻能為遠程源鏡像組配置反射端口,不能為本地鏡像組和遠程目的鏡像組配置反射端口。
對於反射端口,需要注意的是:
· 建議選擇設備上未被使用的端口作為反射端口,並不要在該端口上連接網線,否則會影響鏡像功能的正常使用。
· 在將端口配置為反射端口時,該端口上已存在的所有配置都將被清除;在配置為反射端口後,該端口上不能再配置其它業務。
【舉例】
# 創建遠程源鏡像組1,並在係統視圖下配置其反射端口為Ten-GigabitEthernet1/0/1。
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 reflector-port ten-gigabitethernet 1/0/1
This operation may delete all settings made on the interface. Continue? [Y/N]:y
# 創建遠程源鏡像組2,並在接口視圖下配置其反射端口為Ten-GigabitEthernet1/0/2。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-source
[Sysname] interface ten-gigabitethernet 1/0/2
[Sysname-Ten-GigabitEthernet1/0/2] mirroring-group 2 reflector-port
This operation may delete all settings made on the interface. Continue? [Y/N]:y
【相關命令】
· mirroring-group
mirroring-group remote-probe vlan命令用來為鏡像組配置遠程鏡像VLAN。
undo mirroring-group remote-probe vlan命令用來刪除鏡像組的指定遠程鏡像VLAN。
【命令】
mirroring-group group-id remote-probe vlan vlan-id
undo mirroring-group group-id remote-probe vlan rvlan-id
【缺省情況】
鏡像組沒有遠程鏡像VLAN。
【視圖】
係統視圖
【缺省用戶角色】
network-admin
【參數】
group-id:表示鏡像組的編號,該鏡像組必須存在,取值範圍為1~4。
vlan-id:表示遠程鏡像VLAN的編號。
【使用指導】
隻有為遠程源鏡像組和遠程目的鏡像組配置遠程鏡像VLAN,不能為本地鏡像組配置遠程鏡像VLAN。
對於遠程鏡像VLAN,需要注意的是:
· 當一個VLAN已被指定為遠程鏡像VLAN後,請不要將該VLAN再作其它用途。
· 源設備和目的設備上的遠程鏡像組必須使用相同的遠程鏡像VLAN。
· 隻能將已存在的靜態VLAN配置為遠程鏡像VLAN,且一個VLAN隻能配置為一個鏡像組的遠程鏡像VLAN。
· 當某VLAN被配置為遠程鏡像VLAN後,必須先刪除遠程鏡像VLAN的配置才能刪除該VLAN。
【舉例】
# 創建遠程源鏡像組1,並為其配置遠程鏡像VLAN為VLAN 10。
<Sysname> system-view
[Sysname] mirroring-group 1 remote-source
[Sysname] mirroring-group 1 remote-probe vlan 10
# 創建遠程目的鏡像組2,並為其配置遠程鏡像VLAN為VLAN 20。
<Sysname> system-view
[Sysname] mirroring-group 2 remote-destination
[Sysname] mirroring-group 2 remote-probe vlan 20
【相關命令】
· mirroring-group
mirror-to命令用來在流行為中配置流量的目的地。
undo mirror-to命令用來取消流行為中流量的目的地的配置。
【命令】
mirror-to { cpu | interface interface-type interface-number }
undo mirror-to { cpu | interface interface-type interface-number }
【缺省情況】
流行為中未配置流量的目的地。
【視圖】
流行為視圖
【缺省用戶角色】
network-admin
【參數】
cpu:表示流鏡像到CPU,這裏的CPU是指配置了流鏡像的設備上的CPU。
interface interface-type interface-number:表示流鏡像到指定接口,interface-type interface-number為接口類型和接口編號。
【使用指導】
在同一流行為中可以通過多次配置將流鏡像到不同接口。
【舉例】
# 配置流行為1,並在該流行為中配置流鏡像到CPU。
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to cpu
# 配置流行為1,並在該流行為中配置流鏡像到接口Ten-GigabitEthernet1/0/1。
<Sysname> system-view
[Sysname] traffic behavior 1
[Sysname-behavior-1] mirror-to interface ten-gigabitethernet 1/0/1
不同款型規格的資料略有差異, 詳細信息請向具體銷售和400谘詢。H3C保留在沒有任何通知或提示的情況下對資料內容進行修改的權利!