首页 科技问答 packet-capture特性包(packet capture最新)

packet-capture特性包(packet capture最新)

科技问答 309
1692285290,

问题描述:

packet-capture交换机报文捕获特性包怎么安装?用什么命令?

组网及组网描述:

6小时前提问

 安装Packet Capture特性软件包,以便用户可以配置特性包报文捕获功能

# 查看设备的版本信息,准备和设备当前运行的Boot包、System包兼容的Packet Capture特性软件包。

<Device> display version

H3C Comware Software, Version 7.1.070, Demo 01

Copyright (c)

H3C XXX uptime is 0 weeks, 0 days, 5 hours, 33 minutes

Last reboot reason : Cold reboot

Boot image: flash:/boot-01.bin

Boot image version: 7.1.070, Demo 01

  Compiled Oct

System image: flash:/system-01.bin

System image version: 7.1.070, Demo 01

  Compiled Oct

其它显示信息略……。

# 从IP地址为192.168.1.1的TFTP服务器上下载Packet Capture特性软件包packet-capture-01.bin。

<Device> tftp 192.168.1.1 get packet-capture-01.bin

Press CTRL+C to abort.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 11.3M    0 11.3M    0     0   155k      0 --:--:--  0:01:14 --:--:--  194k

Writing file...Done.

# 给IRF中的所有成员设备(此处以slot 1和slot 2为例)都安装Packet Capture特性软件包,并让该软件包在设备重启后能够继续生效。

<Device> install activate feature flash:/packet-capture-01.bin slot 1

Verifying the file flash:/packet-capture-01.bin on slot 1....Done.

Identifying the upgrade methods....Done.

Upgrade summary according to following table:

 

flash:/packet-capture-01.bin

  Running Version             New Version

  None                        Demo 01

 

  Slot                        Upgrade Way

  1                           Service Upgrade

Upgrading software images to compatible versions. Continue? [Y/N]:y

This operation might take several minutes, please wait....................Done.

<Device> install activate feature flash:/packet-capture-01.bin slot 2

Verifying the file flash:/packet-capture-01.bin on slot 2....Done.

Identifying the upgrade methods....Done.

Upgrade summary according to following table:

 

flash:/packet-capture-01.bin

  Running Version             New Version

  None                        Demo 01

 

  Slot                        Upgrade Way

  2                           Service Upgrade

Upgrading software images to compatible versions. Continue? [Y/N]:y

This operation might take several minutes, please wait....................Done.

<Device> install commit

This operation will take several minutes, please wait.......................Done.

# 重新登录设备,以便用户能够执行packet-capture interface和packet-capture read命令行。

     在接口Ten-GigabitEthernet1/0/1的入方向上应用QoS策略,用来限制只捕获192.168.1.10到192.168.1.1、192.168.1.11到192.168.1.1的硬件转发报文。

# 创建IPv4高级ACL 3000,用来匹配192.168.1.10到192.168.1.1、192.168.1.11到192.168.1.1的报文。

<Device> system-view

[Device] acl advanced 3000

[Device-acl-ipv4-adv-3000] rule permit ip source 192.168.1.10 0 destination 192.168.1.1 0

[Device-acl-ipv4-adv-3000] rule permit ip source 192.168.1.11 0 destination 192.168.1.1 0

[Device-acl-ipv4-adv-3000] quit

# 定义流行为behavior1,配置流量镜向到CPU。

[Device] traffic behavior behavior1

[Device-behavior-behavior1] mirror-to cpu

[Device-behavior-behavior1] quit

# 定义类classifier1,匹配ACL3000。

[Device] traffic classifier classifier1

[Device-classifier-class1] if-match acl 3000

[Device-classifier-class1] quit

# 定义一个名为user1的策略,并在策略user1中为类classifier1指定采用流行为behavior1。

[Device] qos policy user1

[Device-qospolicy-user1] classifier classifier1 behavior behavior1

[Device-qospolicy-user1] quit

# 将策略user1应用到接口Ten-GigabitEthernet1/0/1的入方向上。

[Device] interface ten-gigabitethernet 1/0/1

[Device-Ten-GigabitEthernet1/0/1] qos apply policy user1 inbound

[Device-Ten-GigabitEthernet1/0/1] quit

[Device] quit

     开启报文捕获功能

# 开启Ten-GigabitEthernet1/0/1接口上的报文捕获功能,指定捕获报文个数上限为10,指定捕获的报文存入文件a.pcap。在192.168.1.10上使用Telnet方式登录192.168.1.1,创造报文捕获条件。

<Device> packet-capture interface ten-gigabitethernet 1/0/1 capture-filter "vlan 3 and src 192.168.1.10 or 192.168.1.11 and dst 192.168.1.1" limit-captured-frames 10 write flash:/a.pcap

Capturing on 'Ten-GigabitEthernet1/0/1'

6小时前回答

暂无

您好,使用install active 安装

6小时前回答

暂无

你正在内容来源:知了社区,packet-capture特性包