1 ASR1001路由器要配置镜像,

但ASR不像交换机,命令格式不同,经过确认需要使用erspan的方式进行配置。

需求:
将G0/0/3 接口流量镜像到G0/0/4
G0/0/4连接的是流量回溯系统。
在这里插入图片描述
配置命令

monitor session 1 type erspan-source
 source interface Gi0/0/3
 destination
  erspan-id 1
  mtu 1464
  ip address 100.64.1.1
  origin ip address 100.64.1.1
!
!
monitor session 2 type erspan-destination
 destination interface Gi0/0/4
 source
  erspan-id 1
  ip address 100.64.1.1

配置完成后,确认目标接口已经有流量

ASR1001#show int g 0/0/4 | in rate
  Queueing strategy: fifo
  30 second input rate 0 bits/sec, 0 packets/sec
  30 second output rate 8989000 bits/sec, 2655 packets/sec

2 其他查看命令

2.1 查看monitor session

H01-21U-22U-Hi-BGP-ASR1002-A#show monitor session all
Session 1
---------
Type                   : ERSPAN Source Session
Status                 : Admin Enabled
Source Ports           : 
    Both               : Gi0/0/3
Destination IP Address : 100.64.1.1
MTU                    : 1464
Destination ERSPAN ID  : 1
Origin IP Address      : 100.64.1.1


Session 2
---------
Type                   : ERSPAN Destination Session
Status                 : Admin Enabled
Destination Ports      : Gi0/0/4
Source IP Address      : 100.64.1.1
Source ERSPAN ID       : 1
MTU                    : 1464

2.2 查看monitor详情

ASR1001#show monitor detail 
Session 1
---------
Type                   : ERSPAN Source Session
Status                 : Admin Enabled
Description            : -
Source Ports           : 
    RX Only            : None
    TX Only            : None
    Both               : Gi0/0/3
Source VLANs           :
    RX Only            : None
    TX Only            : None
    Both               : None
Source EFPs            :
    RX Only            : None
    TX Only            : None
    Both               : None
Destination Ports      : None
Filter VLANs           : None
Source IP Address      : None
Source IP VRF          : None
Source ERSPAN ID       : None
Destination IP Address : 100.64.1.1
Destination IP VRF     : None
MTU                    : 1464
Destination ERSPAN ID  : 1
Origin IP Address      : 100.64.1.1
IP QOS PREC            : 0
IP TTL                 : 255


Session 2
---------
Type                   : ERSPAN Destination Session
Status                 : Admin Enabled
Description            : -
Source Ports           : 
    RX Only            : None
    TX Only            : None
    Both               : None
Source VLANs           :
    RX Only            : None
    TX Only            : None
    Both               : None
Source EFPs            :
    RX Only            : None
    TX Only            : None
    Both               : None
Destination Ports      : Gi0/0/4
Filter VLANs           : None
Source IP Address      : 100.64.1.1
Source IP VRF          : None
Source ERSPAN ID       : 1
Destination IP Address : None
Destination IP VRF     : None
MTU                    : 1464
Destination ERSPAN ID  : None
Origin IP Address      : None
IP QOS PREC            : 0
IP TTL                 : 255
ASR1001#
Logo

火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。

更多推荐