Menu

#8 Interface ID

open
nobody
None
5
2017-02-17
2010-12-06
Thomas York
No

ipcad doesn't correctly pull the interface ID. Manually setting it in the config file doesn't change the interface IDs that are in the flow information.
Currently, all interfaces are given the ID 65535. Attached is a Wireshark dump of data as sent by ipcad.

Discussion

  • Thomas York

    Thomas York - 2010-12-06

    Wireshark dump for ipcad

     
  • Pircs

    Pircs - 2013-10-10

    This functionality was fixed in my configuration with the following setting in ipcad.conf

    netflow ifclass eth mapto 00-99

     
  • Emil Cazamir

    Emil Cazamir - 2017-02-17

    I have checked the source, it seems you need to set "capture-ports" to enable. Even though the inline documentation of ipcad.conf states that NetFlow operation is not affected by this setting, the source files say in process.c in function process_packet_data:

           ** if(conf->capture_ports)** {
                    if(iface_in) {
                            memcpy(flow.ifInName, iface_in, IFNAMSIZ);
                            flow.ifInName[IFNAMSIZ-1] = 0;
                            flow.ifInIndex = iface_to_snmp_id(flow.ifInName);
                    } else {
                            flow.ifInName[0] = '\0';
                            flow.ifInIndex = ps->ifIndex;
                    }
                    if(iface_out) {
                            memcpy(flow.ifOutName, iface_out, IFNAMSIZ);
                            flow.ifOutName[IFNAMSIZ-1] = 0;
                            flow.ifOutIndex = iface_to_snmp_id(flow.ifOutName);
                    } else {
                            flow.ifOutName[0] = '\0';
                            flow.ifOutIndex = -1;
                    }
            } else {
                    flow.ifInName[0] = '\0';
                    flow.ifOutName[0] = '\0';
                   ** flow.ifOutIndex = -1;**
                    flow.ifInIndex = -1;
            }
    

    Changing the capture-ports setting to enabled fixed the problem, netflow capture included interfaces indexed the same as on the ipcad configuration file.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.