Usage¶
In this section, it is assumed that Virtual Accelerator has been properly installed and configured. See Getting Started for more details.
Example¶
ICMP packets are being forwarded by the fast path:
# tcpdump -n -i eth2
# tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes
15:17:29.155002 00:00:00:00:00:00 > 00:02:02:00:00:21, ethertype Unknown (0x2007), length 124:
0x0000: 6049 4000 0000 0000 6008 c1d2 0002 0200 `I@.....`.......
0x0010: 0021 0055 0100 0021 0800 4500 0054 8047 .!.U...!..E..T.G
0x0020: 0000 4001 245c 6e02 0201 6402 0201 0000 ..@.$\n...d.....
0x0030: 9263 6107 0007 6810 3352 0000 0000 46f9 .ca...h.3R....F.
0x0040: 0c00 0000 0000 0809 0a0b 0c0d 0e0f 1011 ................
0x0050: 1213 1415 1617 1819 1a1b 1c1d 1e1f 2021 ...............!
0x0060: 2223 2425 2627 2829 2a2b 2c2d 2e2f "#$%&'()*+,-./
15:17:29.155004 IP 110.2.2.1 > 100.2.2.1: ICMP echo reply, id 24839, seq 7, length 64
The copy of incoming and outgoing packets via eth2
is encapsulated
in a FPTUN header (ethertype 0x2007) and delivered to the Linux stack.
Warning
Because the BPF filter is automatically synchronized, an application
other than tcpdump
(for example, a DHCP client), may trigger the
configuration of the fast path with a copy of all incoming packets and
therefore impact performance.
To disable automatic synchronization, run the cache manager with the -D
option:
# cmgr -D
Then, to manually enable TAP per interface:
# fp-cli
<fp-0> tap-iface-set eth2 on
The tcpdump -i eth2 program will work the same as described in the case of automatic synchronization.
BPF management¶
Displaying BPF filters¶
Synopsis
tap-bpf [all [raw]]
- all
- All BPF with decoded instructions.
- raw
- All BPF in raw format.
Example
<fp-0> tap-bpf
BPF list (ifuid 0 is the virtual interface "any"):
8: eth1-vr0, instance 0 (# cmds: 1)
9: eth2-vr0, instance 0 (# cmds: 1)
Setting manually the interface for tapping¶
Synopsis
tap-iface-set <ifname>|any on|off
- <ifname> or any
- Interface name or any for select all interface.
- on or off
- Enable / disable TAP.
Example
Enable TAP on eth2
<fp-0> tap-iface-set eth2 on
Enabling or disabling TAP¶
Synopsis
tap-set on|off
- on or off
- Enable / disable TAP.
Example
Enable TAP:
<fp-0> tap-set on
TAP is on (was off)