• 全部
  • 经验案例
  • 典型配置
  • 技术公告
  • FAQ
  • 漏洞说明
  • 全部
  • 全部
  • 大数据引擎
  • 知了引擎
产品线
搜索
取消
案例类型
发布者
是否解决
是否官方
时间
搜索引擎
匹配模式
高级搜索

S10508X三层镜像问题

2023-02-06提问
  • 1关注
  • 0收藏,783浏览
粉丝:0人 关注:1人

问题描述:

二台交换机三层互联,我想通过数据监控设备(ip:40.1.1.2)监控研发部数据(GE_0/2接口),应该如何配置

组网及组网描述:


最佳答案

lmm 八段
粉丝:5人 关注:2人

1.7.6  三层远程端口镜像配置举例(ERSPAN)

1. 组网需求

·     在一个三层网络中,Device A、Device B、Device C及Server如下图所示连接。其中,Device A通过端口GigabitEthernet1/0/1连接市场部。

·     通过配置三层远程端口镜像,并建立OSPF方式的GRE隧道,使得Server可以通过由GRE隧道传输的镜像报文来监控所有进、出市场部的报文。

2. 组网图

图1-10 三层远程端口镜像配置组网图

 

3. 配置步骤

(1)     配置IP地址

请按照1-10配置各接口的IP地址和子网掩码,具体配置过程略。

(2)     配置Device A

创建业务环回组1,并配置服务类型为Tunnel。

<DeviceA> system-view

[DeviceA] service-loopback group 1 type tunnel

将接口GigabitEthernet1/0/3加入业务环回组1。

[DeviceA] interface gigabitethernet 1/0/3

[DeviceA-GigabitEthernet1/0/3] port service-loopback group 1

All configurations on the interface will be lost. Continue?[Y/N]:y

[DeviceA-GigabitEthernet1/0/3] quit

创建GRE模式的Tunnel接口1,并为其配置IP地址和掩码。

[DeviceA] interface tunnel 1 mode gre

[DeviceA-Tunnel1] ip address 50.1.1.1 24

为Tunnel接口1分别指定源地址和目的地址。

[DeviceA-Tunnel1] source 20.1.1.1

[DeviceA-Tunnel1] destination 30.1.1.2

[DeviceA-Tunnel1] quit

配置OSPF协议。

[DeviceA] ospf 1

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

创建本地镜像组1。

[DeviceA] mirroring-group 1 local

配置本地镜像组1的源端口为GigabitEthernet1/0/1,目的端口为Tunnel1。

[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both

[DeviceA] mirroring-group 1 monitor-port tunnel 1

(3)     配置Device B

配置OSPF协议。

<DeviceB> system-view

[DeviceB] ospf 1

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

(4)     配置Device C

创建业务环回组1,并配置服务类型为Tunnel。

<DeviceC> system-view

[DeviceC] service-loopback group 1 type tunnel

将接口GigabitEthernet1/0/3加入业务环回组1。

[DeviceC] interface gigabitethernet 1/0/3

[DeviceC-GigabitEthernet1/0/3] port service-loopback group 1

All configurations on the interface will be lost. Continue?[Y/N]:y

[DeviceC-GigabitEthernet1/0/3] quit

创建GRE模式的Tunnel接口1,并为其配置IP地址和掩码。

[DeviceC] interface tunnel 1 mode gre

[DeviceC-Tunnel1] ip address 50.1.1.2 24

为Tunnel接口1分别指定源地址和目的地址。

[DeviceC-Tunnel1] source 30.1.1.2

[DeviceC-Tunnel1] destination 20.1.1.1

[DeviceC-Tunnel1] quit

配置OSPF协议。

[DeviceC] ospf 1

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

创建本地镜像组1。

[DeviceC] mirroring-group 1 local

配置本地镜像组1的源端口为GigabitEthernet1/0/1,目的端口为GigabitEthernet1/0/2。

[DeviceC] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 inbound

[DeviceC] mirroring-group 1 monitor-port gigabitethernet 1/0/2

# 为了防止GRE封装的镜像报文在Device C上做除镜像外的其他用途,需要配置ACL规则,对此类报文进行过滤。

[DeviceC] acl number 3900

[DeviceC-acl-ipv4-adv-3900] rule 0 deny gre source 20.1.1.1 0 destination 30.1.1.2 0

[DeviceC] interface gigabitethernet 1/0/1

[DeviceC-GigabitEthernet1/0/1] packet-filter 3900 inbound

4. 验证配置

显示Device A上所有镜像组的配置信息。

[DeviceA] display mirroring-group all

Mirroring group 1:

    Type: Local

    Status: Active

    Mirroring port:

        GigabitEthernet1/0/1  Both

    Monitor port: Tunnel1

显示Device C上所有镜像组的配置信息。

[DeviceC] display mirroring-group all

Mirroring group 1:

    Type: Local

    Status: Active

    Mirroring port:

        GigabitEthernet1/0/1  Inbound

    Monitor port: GigabitEthernet1/0/2

配置完成后,用户可以通过Server监控所有进、出市场部的报文。

3 个回答
已采纳
粉丝:103人 关注:8人

1.7.6  三层远程端口镜像配置举例(ERSPAN)

1. 组网需求

·     在一个三层网络中,Device A、Device B、Device C及Server如下图所示连接。其中,Device A通过端口GigabitEthernet1/0/1连接市场部。

·     通过配置三层远程端口镜像,并建立OSPF方式的GRE隧道,使得Server可以通过由GRE隧道传输的镜像报文来监控所有进、出市场部的报文。

2. 组网图

图1-10 三层远程端口镜像配置组网图

 

3. 配置步骤

(1)     配置IP地址

请按照1-10配置各接口的IP地址和子网掩码,具体配置过程略。

(2)     配置Device A

创建业务环回组1,并配置服务类型为Tunnel。

<DeviceA> system-view

[DeviceA] service-loopback group 1 type tunnel

将接口GigabitEthernet1/0/3加入业务环回组1。

[DeviceA] interface gigabitethernet 1/0/3

[DeviceA-GigabitEthernet1/0/3] port service-loopback group 1

All configurations on the interface will be lost. Continue?[Y/N]:y

[DeviceA-GigabitEthernet1/0/3] quit

创建GRE模式的Tunnel接口1,并为其配置IP地址和掩码。

[DeviceA] interface tunnel 1 mode gre

[DeviceA-Tunnel1] ip address 50.1.1.1 24

为Tunnel接口1分别指定源地址和目的地址。

[DeviceA-Tunnel1] source 20.1.1.1

[DeviceA-Tunnel1] destination 30.1.1.2

[DeviceA-Tunnel1] quit

配置OSPF协议。

[DeviceA] ospf 1

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

创建本地镜像组1。

[DeviceA] mirroring-group 1 local

配置本地镜像组1的源端口为GigabitEthernet1/0/1,目的端口为Tunnel1。

[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both

[DeviceA] mirroring-group 1 monitor-port tunnel 1

(3)     配置Device B

配置OSPF协议。

<DeviceB> system-view

[DeviceB] ospf 1

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

(4)     配置Device C

创建业务环回组1,并配置服务类型为Tunnel。

<DeviceC> system-view

[DeviceC] service-loopback group 1 type tunnel

将接口GigabitEthernet1/0/3加入业务环回组1。

[DeviceC] interface gigabitethernet 1/0/3

[DeviceC-GigabitEthernet1/0/3] port service-loopback group 1

All configurations on the interface will be lost. Continue?[Y/N]:y

[DeviceC-GigabitEthernet1/0/3] quit

创建GRE模式的Tunnel接口1,并为其配置IP地址和掩码。

[DeviceC] interface tunnel 1 mode gre

[DeviceC-Tunnel1] ip address 50.1.1.2 24

为Tunnel接口1分别指定源地址和目的地址。

[DeviceC-Tunnel1] source 30.1.1.2

[DeviceC-Tunnel1] destination 20.1.1.1

[DeviceC-Tunnel1] quit

配置OSPF协议。

[DeviceC] ospf 1

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

创建本地镜像组1。

[DeviceC] mirroring-group 1 local

配置本地镜像组1的源端口为GigabitEthernet1/0/1,目的端口为GigabitEthernet1/0/2。

[DeviceC] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 inbound

[DeviceC] mirroring-group 1 monitor-port gigabitethernet 1/0/2

# 为了防止GRE封装的镜像报文在Device C上做除镜像外的其他用途,需要配置ACL规则,对此类报文进行过滤。

[DeviceC] acl number 3900

[DeviceC-acl-ipv4-adv-3900] rule 0 deny gre source 20.1.1.1 0 destination 30.1.1.2 0

[DeviceC] interface gigabitethernet 1/0/1

[DeviceC-GigabitEthernet1/0/1] packet-filter 3900 inbound

4. 验证配置

显示Device A上所有镜像组的配置信息。

[DeviceA] display mirroring-group all

Mirroring group 1:

    Type: Local

    Status: Active

    Mirroring port:

        GigabitEthernet1/0/1  Both

    Monitor port: Tunnel1

显示Device C上所有镜像组的配置信息。

[DeviceC] display mirroring-group all

Mirroring group 1:

    Type: Local

    Status: Active

    Mirroring port:

        GigabitEthernet1/0/1  Inbound

    Monitor port: GigabitEthernet1/0/2

配置完成后,用户可以通过Server监控所有进、出市场部的报文。

你好,照这样配置我还要二边单独一个接口给个业务环回组1,还要给ACL策略才可以监控

zhiliao_qqv47J 发表时间:2023-02-06

是,三层只能这样做,ACL可以不配置

zhiliao_sEUyB 发表时间:2023-02-06
回复zhiliao_sEUyB:

好的 多谢

zhiliao_qqv47J 发表时间:2023-02-06
bei 九段
粉丝:24人 关注:7人

三层远程端口镜像(ERSPAN

https://www.h3c.com/cn/d_202208/1659831_30005_0.htm#_Toc110480415

粉丝:181人 关注:0人

您好,配置镜像就可以了

编辑答案

你正在编辑答案

如果你要对问题或其他回答进行点评或询问,请使用评论功能。

分享扩散:

提出建议

    +

亲~登录后才可以操作哦!

确定

亲~检测到您登陆的账号未在http://hclhub.h3c.com进行注册

注册后可访问此模块

跳转hclhub

你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作

举报

×

侵犯我的权益 >
对根叔社区有害的内容 >
辱骂、歧视、挑衅等(不友善)

侵犯我的权益

×

泄露了我的隐私 >
侵犯了我企业的权益 >
抄袭了我的内容 >
诽谤我 >
辱骂、歧视、挑衅等(不友善)
骚扰我

泄露了我的隐私

×

您好,当您发现根叔知了上有泄漏您隐私的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您认为哪些内容泄露了您的隐私?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)

侵犯了我企业的权益

×

您好,当您发现根叔知了上有关于您企业的造谣与诽谤、商业侵权等内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到 pub.zhiliao@h3c.com 邮箱,我们会在审核后尽快给您答复。
  • 1. 您举报的内容是什么?(请在邮件中列出您举报的内容和链接地址)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
  • 3. 是哪家企业?(营业执照,单位登记证明等证件)
  • 4. 您与该企业的关系是?(您是企业法人或被授权人,需提供企业委托授权书)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

抄袭了我的内容

×

原文链接或出处

诽谤我

×

您好,当您发现根叔知了上有诽谤您的内容时,您可以向根叔知了进行举报。 请您把以下内容通过邮件发送到pub.zhiliao@h3c.com 邮箱,我们会尽快处理。
  • 1. 您举报的内容以及侵犯了您什么权益?(请在邮件中列出您举报的内容、链接地址,并给出简短的说明)
  • 2. 您是谁?(身份证明材料,可以是身份证或护照等证件)
我们认为知名企业应该坦然接受公众讨论,对于答案中不准确的部分,我们欢迎您以正式或非正式身份在根叔知了上进行澄清。

对根叔社区有害的内容

×

垃圾广告信息
色情、暴力、血腥等违反法律法规的内容
政治敏感
不规范转载 >
辱骂、歧视、挑衅等(不友善)
骚扰我
诱导投票

不规范转载

×

举报说明