This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

port-incoming-traffic-monitoring or zombie host finder

Find the zombie port, of which interface is up but there is no traffic because the host is actually down.

Prerequisites

Catalyst 9300, 9400, 9500, 9600 with 16.9 or above
Guestshell enabled

Use Case Description

In the factory, the most import host is the manufacturing machine.
However, it has the very poor networking function like printer and sometime very old.

Sometimes, the manufacturing machine interface is up but there is no traffic.
If this “zombie host” can be detected, the factory effiency will be higher.
If the catalyst can find out, it’s one of the unique feature of IOS XE.

Steps to Reproduce

  1. Install NET-SNMP-UTILS using yum commands on the guestshell (yum install -y net-snmp-utils)

  2. Run the snmpwalk to know the interface number:
    snampwalk -v 1 -c IP_address ifname

  3. Modify interface.ini filw with the interface number, which you want to monitor from step 2.

  4. Run the python code (620-4.py) periodically by EEM of cat9300 with this config:

event manager applet
event timer watchdog time
action 1.0 cli command "enable"
action 3.0 cli command "guestshell run python 620-4.py”

  1. Monitor the log, which will check the zombie port.

Result Example

c9300-48p-16.12.2#show log

(omiited unrelated things)

*Aug 23 07:0:14.484 *SYS-7-USERLOG_DEBUG: Message from tty4(user id:): Gi1/0/2 has 21089 packets during 14seconds.

Youtube Link

English

Youtube link

Korean

Youtube link

View code on GitHub
  • Owner

  • Contributors

    +1Github contributor
  • Categories

  • Products

    IOS XE
  • Programming Languages

    Python
  • License

    BSD 3-Clause "New" or "Revised" License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.