Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. The string "[0]" instead of interface name in FDB for non-vlan1 ports

The string "[0]" instead of interface name in FDB for non-vlan1 ports

Scheduled Pinned Locked Moved Support
6 Posts 4 Posters 79.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    R
    rsk
    wrote on last edited by
    #1

    Hello.

    I have just started setting up NetXMS, and I'm very impressed with the software.
    I have been looking for monitoring software that's not "Nagios style" text configs and subprocess-plugins-for everything since quite a while.

    However, I just can't find a way to solve this issue myself - hope you can help me.

    NetXMS:
    Version: 2.0.4
    Platform: Windows, 64-bit
    Database: PostgreSQL

    Network:
    All Cisco Catalyst.
    Access switches are a mix of 3560G (IOS 12.x) and 2960X (IOS 15.x).
    Core switches handling site's internal routing are 3750G (also IOS 12.x).
    Everything is detected as CATALYST-GENERIC driver by NetXMS.

    Problem:
    Switchports that are in access mode in vlan 1, and ports that are in trunk mode and include vlan 1 in trunk vlans list are identified properly.
    However, ports that do not include vlan 1 are shown as interface name "[ 0 ]" in the "Topology -> Switch forwarding database (MAC address table)" screen.

    Because of that, the "Find MAC address" function falls back to showing "indirectly connected on <router trunk port>", for example.

    I have verified with Wireshark that NetXMS is using the Cisco "community@123" vlan-indexing syntax.
    However maybe that's part of issue - names for interfaces are retrieved for base "community" only, and it's somehow not matched to same interface index numbers in the @vlan data?

    I have attached CSV dumps from the FDB screens for one of the switches - same behavior on all of them.
    I'll be happy to attach a sanitized snmpwalk if you'll tell me what subtree you need.

    switch13-infoFDB.csv: "Tools->Info->Switch forwarding database (FDB)"
    * port 49 and 50 (SFP+ uplink trunks, including vlan 1)
    * port 456 (PortGroup1 trunk, including vlan1)
    * port 4 (access port in vlan1)
    * no rows for other access ports

    switch13-topologyFDB.csv: "Topology-> Switch forwarding database (MAC address table)"
    * huge number of results for ports Gi1/0/49-50 (SFP+ uplink trunks, including vlan1)
    * multiple results for port Po1 (PortGroup1 trunk, including vlan1)
    * single result for port Gi1/0/4 (access port in vlan1)
    * Many entries for devices connected to other access ports, showing "[ 0 ]" instead of the expected "Gi1/0/xxx".

    Thank you very much!


    switch13-infoFDB.csv

    switch13-topologyFDB.csv

    1 Reply Last reply
    0
    • Z
      Z
      Tatjana Dubrovica
      wrote on last edited by
      #2

      Hi.

      Can you please provide walks for this OIDs:
      .1.3.6.1.2.1.17.1.4.1.2
      .1.3.6.1.2.1.2.1.0
      .1.3.6.1.2.1.2.2.1.1
      .1.3.6.1.2.1.31.1.1.1.1
      .1.3.6.1.2.1.2.2.1.2

      Thank you.

      1 Reply Last reply
      0
      • W
        W
        wonderboy
        wrote on last edited by
        #3

        Tatjana,
        Will post here 'cause I have the same issue.
        I have a cisco switch 3550 (which is snmp-enabled) and sensor1 (disabled all polls except icmp) with mac 00:a2:19:60:00:00 that is connected to fa0/48 port (access port with vlan 10). FDB table for 3550 is showing me this:

        00:a2:19:60:00:00    48    [0]     10      sensor1     dynamic
        

        so FDB seems correct however I don't know what is 'interface' = 0 and in the interface tab of the object viewer netxms does not show any peer nodes, but it has to be fa0/48 ..... sensor1 192.168.x.x FDB.

        I attached requested OIDs.


        .1.3.6.1.2.1.2.1.0.csv

        .1.3.6.1.2.1.2.2.1.1.csv

        .1.3.6.1.2.1.2.2.1.2.csv

        .1.3.6.1.2.1.17.1.4.1.2.csv

        .1.3.6.1.2.1.31.1.1.1.1.csv

        1 Reply Last reply
        0
        • W
          W
          wonderboy
          wrote on last edited by
          #4

          I maybe wrong, but here is my thoughts about this.
          ifIndex is 0 'cause ifIndexFromPort function return 0.
          Take a look at fdb.cpp:

          void ForwardingDatabase::addEntry(FDB_ENTRY *entry)
          {
          	// Check for duplicate
          	for(int i = 0; i < m_fdbSize; i++)
          		if (!memcmp(m_fdb[i].macAddr, entry->macAddr, MAC_ADDR_LENGTH))
          		{
          			memcpy(&m_fdb[i], entry, sizeof(FDB_ENTRY));
          			m_fdb[i].ifIndex = ifIndexFromPort(entry->port);                        <--- here
          			return;
          		}
          
          	if (m_fdbSize == m_fdbAllocated)
          	{
          		m_fdbAllocated += 32;
          		m_fdb = (FDB_ENTRY *)realloc(m_fdb, sizeof(FDB_ENTRY) * m_fdbAllocated);
          	}
          	memcpy(&m_fdb[m_fdbSize], entry, sizeof(FDB_ENTRY));
          	m_fdb[m_fdbSize].ifIndex = ifIndexFromPort(entry->port);                             <--- and here
          	m_fdbSize++;
          }
          
          UINT32 ForwardingDatabase::ifIndexFromPort(UINT32 port)
          {
          	for(int i = 0; i < m_pmSize; i++)
          		if (m_portMap[i].port == port)                   <---so it seems like portMap structure does not contain required port, why?
          			return m_portMap[i].ifIndex;
          	return 0;
          }
          

          portMap structure populated by "addPortMapping" function which is called from Dot1dPortTableHandler callback, and which is called from

          ForwardingDatabase *GetSwitchForwardingDatabase(Node *node)
          {
          	if (!node->isBridge())
          		return NULL;
          
          	ForwardingDatabase *fdb = new ForwardingDatabase(node->getId());
          	node->callSnmpEnumerate(_T(".1.3.6.1.2.1.17.1.4.1.2"), Dot1dPortTableHandler, fdb);              <---- here
          	node->callSnmpEnumerate(_T(".1.3.6.1.2.1.17.7.1.2.2.1.2"), Dot1qTpFdbHandler, fdb);
          

          But this snmpenumerate request must also be vlan-context-aware as with followed code with mac address table request.

          Here is a sample snmpwalks to the cisco switch:
          admin@netxms:/home/admin# nxsnmpwalk -c community@10 172.x.x.x .1.3.6.1.2.1.17.1.4.1.2
          .1.3.6.1.2.1.17.1.4.1.2.7 [INTEGER]: 7
          .1.3.6.1.2.1.17.1.4.1.2.31 [INTEGER]: 31
          .1.3.6.1.2.1.17.1.4.1.2.47 [INTEGER]: 43
          .1.3.6.1.2.1.17.1.4.1.2.48 [INTEGER]: 44
          .1.3.6.1.2.1.17.1.4.1.2.65 [INTEGER]: 53
          admin@netxms:/home/admin# nxsnmpwalk -c community@11 172.x.x.x .1.3.6.1.2.1.17.1.4.1.2
          .1.3.6.1.2.1.17.1.4.1.2.65 [INTEGER]: 53

          1 Reply Last reply
          0
          • V
            V
            Victor Kirhenshtein
            wrote on last edited by
            #5

            Hi,

            most likely you're right. If you can rebuild server from source, please try attached patch.

            Best regards,
            Victor


            cisco-fdb.patch

            1 Reply Last reply
            0
            • W
              W
              wonderboy
              wrote on last edited by
              #6

              The patch is working fine. Thanks.

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups