SugurQ 2022-08-05 14:07 采纳率: 33.3%
浏览 70
已结题

juniper交换机配置端口镜像,端口配置报错。

问题遇到的现象和发生背景

juniper交换机上配置端口镜像,然后出现如下报错提示:

运行结果及报错内容

[edit forwarding-options analyzer ip_guard input ingress interface]
'xe-0/0/47.0'
interface must not be output of any other analyzer session
[edit forwarding-options analyzer ip_guard input egress interface]
'xe-0/0/47.0'
interface must not be output of any other analyzer session
[edit forwarding-options analyzer ip_guard output interface]
'interface xe-0/0/47.0'
An interface configured as family inet cannot be configured as analyzer output interface
[edit forwarding-options analyzer port-moniter output interface]
'interface xe-0/0/47.0'
An interface configured as family inet cannot be configured as analyzer output interface
[edit firewall filter port-mirror term 1 then]
'port-mirror'
Configure 'port-mirroring' under 'forwarding-options'
error: commit failed: (statements constraint check failed)

我的解答思路和尝试过的方法

一开始说要配在47口,结果配置以后才发现47口已被占用,我使用了delete,但是没有命令没有被清除掉。

我想要达到的结果

juniper的命令行配置,可以不保存吗?这个错误要怎么消除呢?

  • 写回答

3条回答 默认 最新

  • 优质网络系统领域创作者 网络领域新星创作者 2022-08-05 14:19
    关注

    可以不保存 ,应该是配置错了,下面是举例配置步骤

    操作步骤:
    (1)建立一个端口镜像名称,并且指定需要作镜像的端口,同一个镜像名称可以指定多个要镜像的端口的。
    (2)创建镜像名称之后,指定需要镜像的输出端口,然后在输出端口接个sniffer就可以抓取镜像的流量了。
     
    #"编辑镜像名称参数,port_monitor是镜像名称,如果不存在就创建一个新的"
    [edit]
    lab@EX4200-1# editethernet-switching-options analyzer port_monitor
    [editethernet-switching-options analyzer port_monitor]
    lab@EX4200-1# set inputegress interface ge-0/0/10.0  #"定义要镜像端口输出流量"   
    lab@EX4200-1# set inputingress interface ge-0/0/10.0  #"定义要镜像端口输入流量"
    lab@EX4200-1# set outputinterface ge-0/0/1.0     #"定义输出端口(接sniffer的端口)"
    lab@EX4200-1#

    也可以定义基于fireware的端口镜像。
    #设置镜像输出端口
    lab@EX4200-1# top  
    [edit]
    lab@EX4200-1#set ethernet-switching-options analyzer port_monitor output interfacege-0/0/10.0
     
    #"设置过滤条件,具体条件设置请参考JUNOS的filter设置说明"
    lab@EX4200-1#edit firewall family ethernet-switching filter mirror_filter     # “ mirror_filter为policy名称"             
     
    [edit firewall familyethernet-switching filter mirror_filter]
    lab@EX4200-1#
    lab@EX4200-1#set   term 1 from destination-address 192.0.2.16/28  #"第一个条目term 1目的IP地址"
    lab@EX4200-1#set  term 1 fromsource-address 192.0.2.16/28  #"指定源IP地址"
    lab@EX4200-1#set  term 1 fromdestination-port 80 #"指定目的端口"
     
    #"定义符合条件进行镜像动作,port_monitor就是上面定义的镜像名称"
    lab@EX4200-1#set  term 1 then analyzer port_monitor
     
    lab@EX4200-1#set  term 2 then accept  #"生成第二条term条目,指定其它流量不镜像"
     
     
    #设置需要镜像端口的filter参数
    lab@EX4200-1# top
    lab@EX4200-1# delete interfacesge-0/0/1 unit 0
    lab@EX4200-1# setinterfaces ge-0/0/1 unit 0 family ethernet-switching
    lab@EX4200-1#set interfaces   ge-0/0/0 unit 0 family ethernet-switchingfilter input mirror_filter 

    评论

报告相同问题?

问题事件

  • 系统已结题 8月13日
  • 创建了问题 8月5日

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记