如何监控 3650 L3 交换机中特定端口的流量?

网络工程 思科 转变 snmp 带宽
2022-02-15 21:07:08

我有cisco WS-C3650-48TS SW 版本03.03.05SE作为 L3,我需要监控中继端口上的流量吗?

它消耗多少带宽?

2个回答

show interface 命令将为您提供 5 分钟的输入和输出带宽

Switch# show interfaces gigabitethernet3/0/2
GigabitEthernet3/0/2 is down, line protocol is down (notconnect)
  Hardware is Gigabit Ethernet, address is 2037.064d.4381 (bia 2037.064d.4381)
  MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Auto-duplex, Auto-speed, media type is 10/100/1000BaseTX
  input flow-control is off, output flow-control is unsupported
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/2000/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts (0 multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog, 0 multicast, 0 pause input
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 unknown protocol drops
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier, 0 pause output
     0 output buffer failures, 0 output buffers swapped out

如果要创建带宽图,请使用 MRTG 之类的东西通过 SNMP 设置接口流量的定期轮询。MRTG 将创建一个漂亮的数据图表,即

MRTG图

要启用 PRTG,请在交换机上设置只读社区字符串:

snmp-server community <your-community-string> ro

然后使用以下设置在 PRTG 中配置设备:

IP Address/DNS Name: IP address of switch
Sensor Management: Automatic device identification (standard, recommended)

Credentials for SNMP Devices:
SNMP Version: 2c
Community String: <your-community-string>

还有其他选项可让您查看端口上单个流量的带宽,例如 IP 记帐和 NetFlow,尽管它们通常不能在 L3 交换机上正常工作,因为它们依赖于进程交换的流量。

为了简单地查看遍历中继端口的 pkt 统计信息,您可以使用 pkt 计数器构建 ACL,并在您感兴趣的 IP 或 VLAN 上放置一个过滤器,以便对它们进行计数