Loopback address and network interface handling, general commands
U
SER
G
UIDE
161
only OSPF packets:
tcpdump
–
i eth1 proto ospf
P
ORT
M
IRRORING
In addition to the
tcpdump
command, it is also available:
set mirror
that allows to send the packets received on a specific interface to a host that is already running the
Wireshark tool (or similar), so that the packets can be interpreted and analyzed later.
The commands for the configuration are:
set mirror target <ipaddress>
set mirror source <interface-to-monitor>
set mirror filter <packet-filter>
set mirror protocol TEE | TZSP [source ip <address>]
set mirror on
where
<ipaddress>
is the host address to which you send the packets and on which run the
analysis tools.
<interface-to-monitor>
is the interface with which you capture the packets.
<packet-filter>
is a filter that you can apply to the packets, where the syntax is the same used
for the
tcpdump
.
The TEE protocol specifies that the packets must be sent to the host exactly as they were captured,
while TZSP indicated that the packets will be encapsulated in a UDP frame.
The TEE protocol can be used in case the host target is on the same LAN of the router that you need
to analyze, while TZSP must be used when the host is on a remote system.
The TZSP protocol is recognized by the most popular analysis tools.
The option
source ip
is used to specify the source address of the UDP frame containing the TZSP
packet. This is useful when the target system is remote and there are constraints on the source IP
address.
Below you find an example of use:
set loopback ipaddr 7.0.1.1
set loopback on
set mirror target 10.1.10.10
set mirror source eth0
set mirror filter tcp and port 80
set mirror protocol TSZP source ip 7.0.1.1
As you can see above, the target host is
10.1.10.10
and in the example you send to it the TCP
packets received by the eth0 port and going to the
80
port.
L
OAD
-
AVG COMMAND
The
load-avg
command measures the load of a network interface. It measures incoming and
outgoing traffic in a particular interval. In order to activate the command:
load-avg interface <ifname> interval <seconds>