# Traffic directions, port mirrors and taps | ntop

[Blog](https://www.ntop.org/blog/)[nProbe](https://www.ntop.org/category/nprobe/)

# Traffic directions, port mirrors and taps

February 28, 20181 min read

Network taps have the ability to preserve traffic directions as based on the port you’re monitoring it is possible to know id traffic is going A -> B or B->A. With port mirrors you completely loose this information (this unless you creare a port mirror per direction, not always possible on all network switches) as directions are mixed up and thus typical breakdown charts in/down don’t work.

In order to overcome this limitation, in nProbe mimic directions using MAC addresses. In essence if you know the MAC address of your routers you know if your traffic is going towards your router or coming from it. The assumption is that router MAC address are reliable, not always true in these cybersec days.

-   Option 1  
    Use V9/IPFIX to export the MAC address  
    Using -T you can set the export template and if you add %IN\_SRC\_MAC and %OUT\_DST\_MAC you can see MAC in flows and let the collector compute the direction.
-   Option 2  
    Use the MAC addresses to set interfaceId’s and export direction  
    Supposing that your routers have MAC  5c:49:79:75:4e:6a and 0a:30:62:56:00:1c, you can define in nProbe –if-networks “5c:49:79:75:4e:6a@2,0a:30:62:56:00:1c@2” that says: all the traffic with these source MACs are bound to interfaceId 2. Adding also –in-iface-idx 2 –out-iface-idx 0 that says: ingress traffic will have ifIndex 2 all pieces are set. In this case the [DIRECTION](https://www.ietf.org/rfc/rfc3954.txt) information element will be set accordingly based on the MAC address information.
-   Option 3  
    If you set –in-iface-idx -1 –out-iface-idx -1, nProbe will set the interfaceId to the last two bytes of the MAC address so you can use the same technique of option 1 even with netflow V5.

In some cases, when taps or multiple interfaces are used (e.g. each monitoring a network link), and you need to merge traffic ports, you can do it inside nProbe by leveraging on PF\_RING. If you set nprobe -i “eth0,eth1” the traffic coming from both ports is first merged then analysed by nProbe. Even in this case you can use the same MAC address trick explained above to mimic directions.

## Keep reading

AnnounceSep 9, 2026

### [nProbe 11.2: BGP/BMP Support, OT Protocols, Faster Flow Collection](https://www.ntop.org/nprobe-11-2-bgp-bmp-support-ot-protocols-faster-flow-collection/)

We are pleased to announce the release of nProbe 11.2, bringing major new capabilities for network visibility, routing intelligence, flow analysis, and OT monitoring. This release significantly expands nProbe beyond traditional flow…

nProbeAug 12, 2026

### [HowTo Collect Flows: the Case of Palo Alto and Fortinet](https://www.ntop.org/howto-collect-flows-the-case-of-palo-alto-and-fortigate/)

Network devices export flow data in many flavors. Some vendors stick closely to the NetFlow/IPFIX standard, so collecting their flows is essentially plug-and-play. Others extend the standard with proprietary Information Elements (IEs)…

nProbeJun 4, 2026

### [Observability: Enabling High-Resolution Timeseries in ntopng](https://www.ntop.org/observability-enabling-high-resolution-timeseries-in-ntopng/)

Modern observability platforms are expected to answer questions that traditional monitoring systems were never designed to handle: What exactly happened during that 20-second congestion spike? Which application caused the transient burst? Why…

## Try it on your own network

Download the free Community edition and see your first flows in five minutes.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/traffic-directions-port-mirrors-and-taps/