[ Dan and I talked in-person about this, but I wanted to summarize our discussion for the list. ]
> Let's say I have a setup like this: > > ip.tun0:0 a --> b > > ip.tun0:1 a --> c > > ip.tun0:2 a --> d > > Internally, each one corresponds to an ipif_t structure, which has no packet > or byte counters! > > Is there a practical, programmatic way to see if traffic has passed over a > "virtual" interface? The problem I'm trying to solve, BTW, is to remove > virtual interfaces that have no traffic on them after a certain period. [ Terminology nit: these are logical interfaces, not virtual interfaces. The distinction is important since we alo have virtual interfaces -- e.g., vni0 and lo0 have IFF_VIRTUAL set. Those do have packet counters. ] The core problem here is that traffcic never passes over a logical interface. Instead, it passes over a physical interface, using the address information on a IFF_UP logical interface -- e.g., an outgoing packet will use a source address from an IFF_UP logical interface. In the case of IPMP, that source address may come from a logical interface that's different from the physical interface the packet is sent on (though that particular bit of weirdness will be going away with the IPMP Rearchitecture). It would be possible to introduce per-address counters -- e.g., to count the number of times a given ipif_t was used for a source address, or the number of packets received for an address hosted on a particular ipif_t. (Some of these might already exist.) But I wonder if that would do what you wanted. > If the current answer is "no", would future projects already in the > pipeline (i.e. Clearview) change this answer? Taming logical interfaces (ideally through removal) is on our roadmap, but not yet funded. It would potentially change the lay of the land here. -- meem _______________________________________________ networking-discuss mailing list [email protected]
