Traffic Mirroring to External Platforms [Документация VAS Experts]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:dpi:dpi_components:platform:mirroring:dpi_divert_spec [2026/07/08 14:05] – removed - external edit (Unknown date) 127.0.0.1en:dpi:dpi_components:platform:mirroring:dpi_divert_spec [2026/07/08 14:11] (current) elena.krasnobryzh
Line 1: Line 1:
 +{{tag>Services "Service 14" "PCAP Recording"}}
 +====== Traffic Mirroring to External Platforms ======
 +{{indexmenu_n>1}}
  
 +A part of the traffic can be mirror from the common channel and transmitted for analysis and processing to external platforms.
 +
 +{{ :dpi:dpi_components:platform:dpi_divert_spec:sent_traffic_to_vas.png?600 |}}
 +
 +===== TAP Interfaces Configuration =====
 +  * TAP0 - is used for  traffic diversion
 +  * TAP1 - server side port that receives traffic
 +  * Tunnel is created between TAP0 and TAP1 to transmit traffic to an external platform
 +  * mac learning is disabled on the TAP0 interface
 +
 +Run the following commands from the console:
 +<code bash>
 +ip tuntap add tap0 mode tap
 +ip tuntap add tap1 mode tap
 +
 +ip link set dev tap0 up
 +ip link set dev tap1 up
 +
 +ip link add br0 type tunnel
 +
 +ip link set tap0 master br0
 +bridge link set dev tap0 learning off
 +ip link set tap1 master br0
 +
 +ifconfig tap0 192.168.4.20 up
 +ifconfig tap1 192.168.4.21 up
 +ifconfig br0 up
 +</code>
 +<note warning>Warning: TAP interfaces must be started after server restart!</note>
 +
 +===== Traffic Diversion Configuration =====
 +Set up traffic diversion (the variant with the named profile):
 +<code bash>
 +  fdpi_ctrl load profile --service 14 --profile.name radius_accounting  --profile.json '{ "typedev" : "tap","dev" : "tap0","udp" : [ 1813 ] }' --outformat=json 
 +  fdpi_ctrl load --service 14 --profile.name radius_accounting --ip 10.16.252.11
 +</code> 
 +here "typedev" : "tap" - type of device foк traffic diversion (TAP)
 +    "dev" : "tap0" - the name of the network interface to which traffic is diverted
 +    "udp" : [ 1813 ] - protocol and port number of the diverted traffic
 +      
 + An example of use can be found in the section [[dpi:dpi_components:radius:radius_requirements|FastRADIUS Description and Configuration]] 
 +
 +===== Autorun Setup =====
 +To configure the traffic diversion interfaces at system startup, you have to:
 +  - Add to the file **/etc/rc.d/rc.local**: \\ <code bash> ip tuntap add tap0 mode tap
 +ip tuntap add tap1 mode tap
 +
 +ip link set dev tap0 up
 +ip link set dev tap1 up
 +
 +ip link add br0 type tunnel
 +
 +ip link set tap0 master br0
 +bridge link set dev tap0 learning off
 +ip link set tap1 master br0
 +
 +ifconfig tap0 192.168.4.20 up
 +ifconfig tap1 192.168.4.21 up
 +ifconfig br0 up </code>
 +  - Add **rc.local** processing permission: <code bash> chmod +x /etc/rc.d/rc.local </code>
 +  - Change the file **/usr/lib/systemd/system/rc-local.service**: \\ <code bash> [Unit]
 +Description=/etc/rc.d/rc.local Compatibility
 +Documentation=man:systemd-rc-local-generator(8)
 +ConditionFileIsExecutable=/etc/rc.d/rc.local
 +After=network.target network-online.target
 +
 +[Service]
 +Type=forking
 +ExecStart=/etc/rc.d/rc.local start
 +TimeoutSec=0
 +RemainAfterExit=yes
 +GuessMainPID=no
 +
 +[Install]
 +WantedBy=multi-user.target </code>
 +  - Enable **rc.local**, so that it starts every time after reboot: \\ <code bash> systemctl enable rc-local </code>