jepsen.net

Controls network manipulation.

TODO: break this up into jepsen.net.proto (polymorphism) and jepsen.net (wrapper fns, default args, etc)

all-packet-behaviors

All of the available network packet behaviors, and their default option values.

Caveats:

  • Behaviors are applied to a node’s network interface and affect all DB to DB node traffic
  • :delay - Use :normal distribution of delays for more typical network behavior
  • :loss - When used locally (not on a bridge or router), the loss is reported to the upper level protocols. This may cause TCP to resend and behave as if there was no loss.

See tc-netem(8).

drop!

(drop! net test src dest)

Drop traffic from src to dest.

drop-all!

(drop-all! test grudge)

Takes a test and a grudge: a map of nodes to collections of nodes they should drop messages from, and makes those changes to the test’s network.

fast!

(fast! net test)

Removes packet loss and delays.

flaky!

(flaky! net test)

Introduces randomized packet loss

heal!

(heal! net test)

End all traffic drops and restores network to fast operation.

ipfilter

IPFilter rules

iptables

Default iptables (assumes we control everything).

net-dev

(net-dev)

Returns the network interface of the current host.

noop

Does nothing.

qdisc-del

(qdisc-del dev)

Deletes root qdisc for given dev on current node.

shape!

(shape! net test nodes behavior)

Shapes network behavior, i.e. packet delay, loss, corruption, duplication, reordering, and rate for the given nodes.

slow!

(slow! net test)(slow! net test opts)

Delays network packets with options:

  {:mean          ; (in ms)
  :variance       ; (in ms)
  :distribution}  ; (e.g. :normal)

tc