Cisco Catalyst 3560 上的 NetFlow v9 不工作

网络工程 思科 思科-ios 顺式催化剂 净流
2022-02-20 17:59:32

我和我的团队似乎没有让 Catalyst 3560 交换机上的 NetFlow 正常工作。让我告诉你配置:

 flow exporter NETFLOW-EXPORTER
 destination 10.10.10.12
 source Vlan100
 transport udp 2055
!
!
flow record NETFLOW-RECORD
 match ipv4 tos
 match ipv4 protocol
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 match interface input
 collect interface output
 collect counter bytes long
 collect counter packets long
!
!
flow monitor NETFLOW-MONITOR
 record NETFLOW
 exporter NETFLOW
 statistics packet protocol
 statistics packet size
 cache timeout active 60

interface range GigabitEthernet 0/1-52
 ip flow ingress
 ip flow egress
 ip flow monitor NETFLOW-MONITOR input
 ip flow monitor NETFLOW-MONITOR output

如您所见,我们正处于添加几乎所有内容的地步。出口商似乎仍然没有向目的地发送任何东西:

Flow Exporter NETFLOW-EXPORTER:
Description:              User defined
Export protocol:          NetFlow Version 9
Transport Configuration:
    Destination IP address: 10.10.10.12
    Source IP address:      10.10.100.254
    Source Interface:       Vlan100
    Transport Protocol:     UDP
    Destination Port:       2055
    Source Port:            61154
    DSCP:                   0x0
    TTL:                    255
    Output Features:        Not Used

目标:10.10.10.12 正在运行配置此交换机的 PRTG 实例。SNMP 信息似乎工作得很好,只是 NetFlow 不会显示任何内容。PRTG 上的配置应该没问题(IP 和端口匹配)

有任何想法吗?

提前致谢 :)

1个回答

您的 Flow Monitor 与您的 Flow Record 或 Flow Exporter 不匹配。你有record NETFLOWexporter NETFLOW尝试这样的事情:

flow monitor NETFLOW-MONITOR
 record NETFLOW-RECORD
 exporter NETFLOW-EXPORTER
 statistics packet protocol
 statistics packet size
 cache timeout active 60

您也不需要接口上的旧 NetFlow 命令,因此您可以删除:

 ip flow ingress
 ip flow egress

这是我看到它成功工作的方式,尽管它只用于第 3 层接口,并且只在一个方向或另一个方向上使用:

flow record NETFLOW-RECORD
 match ipv4 tos
 match ipv4 protocol
 match ipv4 source address
 match ipv4 destination address
 match transport source-port
 match transport destination-port
 collect interface input
 collect interface output
 collect counter bytes
 collect counter packets
!
flow exporter NETFLOW-EXPORTER
 destination 10.10.10.12
 transport udp 2055
 source Vlan100
!
flow monitor NETFLOW-MONITOR
 record NETFLOW-RECORD
 exporter NETFLOW-EXPORTER
 cache timeout inactive 15
 cache timeout active 60
!

您可以在第 2 层接口上双向尝试,但我认为您的问题是 Flow Monitor 中的 Flow Record 和 Flow Exporter 不正确。

interface range GigabitEthernet 0/1-52
 ip flow monitor NETFLOW-MONITOR input
 ip flow monitor NETFLOW-MONITOR output
!

编辑:

这是来自配置灵活的 NetFlow

仅网络服务模块支持 NetFlow。网络服务模块仅支持每个接口和每个方向一个流监视器。

据我了解,您需要 IOS 15.x,并且至少需要 IP Base 许可证以及用于灵活 NetFlow 的网络服务模块。

您正在尝试将其应用于非模块端口 G0/1-48,无论如何这不起作用。它应该只适用于 G0/49-52,但我不确定你是否可以在 3560 上使用它。我看到 Cisco TAC 生成的注释说这仅适用于 3750X:

netflow 模块仅在 3750x 中可用。你运气不好。

从 Cisco 技术支持 Android 应用发送