summaryrefslogtreecommitdiff
path: root/docs/_include/interface-mirror.txt
blob: 06a42ca543db3bfba4e9fa2bb2794481f45fc669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
:abbr:`SPAN (Switched Port Analyser)` port mirroring copies inbound and 
outbound traffic from one interface to another specified interface.  

The destination interface is usually connected to specialized equipment, 
such as a behavior control system, an intrusion detection system, or 
a traffic collector, and copies all related traffic from this port. The 
benefit of mirroring traffic is that the application is isolated from the 
source traffic, so application processing does not affect the traffic or 
system performance.

To configure :abbr:`SPAN (Switched Port Analyser)` port mirroring, VyOS uses 
the ``mirror`` parameter. You can mirror ingress traffic (traffic entering the 
router) and egress traffic (traffic leaving the router) separately. Both 
directions can be mirrored to the same destination interface or split to 
different ones.

.. cfgcmd:: set interfaces {{ var0 }} <interface> mirror
   ingress <monitor-interface>

   **Mirror ingress traffic from a bonding interface to the specified monitoring 
   interface.**
  
   Example: Mirror the ingress traffic from `{{ var1 }}` to `{{ var2 }}`.
   
   .. code-block:: none
   
     set interfaces {{ var0 }} {{ var1 }} mirror ingress {{ var2 }} 

.. cfgcmd:: set interfaces {{ var0 }} <interface> mirror egress
   <monitor-interface>

   **Mirror egress traffic from a bonding interface to the specified monitoring 
   interface.**

   
   Example: Mirror the egress traffic from `{{ var1 }}` to `{{ var2 }}`.
   
   .. code-block:: none
   
     set interfaces {{ var0 }} {{ var1 }} mirror egress {{ var2 }}