Skip to content

Point-to-Point

Point to Point links allow for arbitrary connections between lab nodes. This enables to simulation of small to large network topologies resembling real-life implementations.

Links between nodes are defined in the manifest.toml file in the links section.

There are multiple methods to link nodes together. The method used depends on the lab requirements.

P2P eBPF

P2P eBPF links provide high-performance, zero-copy packet forwarding between nodes using an eBPF TC classifier program. An eBPF redirect program is attached to each end of the link, forwarding ingress packets directly to the peer interface's egress in kernel space — bypassing the Linux bridge and network stack entirely.

P2P eBPF links support both virtual machines and containers, including mixed VM-to-container links.

Alt text

Configuration

P2P eBPF is configured on a per-link basis with the p2p = true setting.

nodes = [
    { name = "dev01", model = "arista_veos" },
    { name = "dev02", model = "arista_ceos" },
]
links = [
    { src = "dev01::eth1", dst = "dev02::eth1", p2p = true },
]

P2P eBPF links support optional link impairments via TC netem, which coexists with the eBPF redirect program.

links = [
    { src = "dev01::eth1", dst = "dev02::eth1", p2p = true, impairment = { delay = 10, jitter = 2, loss_percent = 0.5 } },
]

Available impairment parameters:

Parameter Description Unit
delay One-way delay milliseconds
jitter Delay jitter milliseconds
loss_percent Packet loss percentage 0.0 - 100.0
reorder_percent Packet reordering percentage 0.0 - 100.0
corrupt_percent Bit-flip corruption percentage 0.0 - 100.0

P2P Bridge

P2P Bridges are the default P2P link type. They allow for connectivity between VM's and Containers and also allow for packet captures on the interfaces via Wireshark or TCPDump.

Node interfaces in a link are assigned to a dedicated linux bridge. The bridges are connected via a veth pair virtual wire.

Alt text

Configuration

PTP Bridge is the default configuration and does not required any mode setting to be defined.

nodes = [
    { name = "dev01", model = "arista_veos" },
    { name = "dev02", model = "arista_ceos" },
]
links = [
    { src = "dev01::eth1", dst = "dev02::eth1" },
]

Note

p2p-bridge is the only supported link type between containers and virtual machines.

P2P UDP

Note

This is a planned feature.

P2P UDP allow for the transmission of any protocol between Virtual Machine nodes only. A point-to-point virtual wire is created directly between the network interfaces using UDP tunneling.

Alt text

Caveats

PTP UDP link interfaces CANNOT be used as for packet captures.

Configuration

PTP UDP is configured on a per-link basis with the mode = "p2p-udp" setting.

nodes = [
    { name = "dev03", model = "arista_veos" },
    { name = "dev04", model = "arista_veos" },
]
links = [
    { src = "dev03::eth1", dst = "dev04::eth1", mode = "p2p-udp" },
]

Note

p2p-udp is only supported between virtual machines nodes.

P2P vEth

Note

This is a planned feature.

P2P vEth allow for the transmission of any protocol between container nodes. A point-to-point virtual wire is created directly between the network interfaces with a vEth pair.

P2P vEth interfaces CAN be used for packet captures.

Alt text

Caveats

PTP vEth links are created outside the docker process and are not automatically re-attached to a container if the container crashes.

Configuration

PTP vEth is configured on a per-link basis with the mode = "p2p-veth" setting.

nodes = [
    { name = "dev05", model = "arista_ceos" },
    { name = "dev06", model = "arista_ceos" },
]
links = [
    { src = "dev05::eth1", dst = "dev06::eth1", mode = "p2p-veth" },
]

Note

p2p-veth is only supported between container nodes.