Network Emulation¶
Links description¶
Enos allows to enforce network emulation in terms of latency and bandwidth limitations.
Network constraints (latency/bandwidth limitations) are enabled by the use of
groups of nodes. Resources must be described using a topology description
instead of a resources description. The following example will define 4 groups named grp1, grp2, grp3 and grp4 respectively:
topology:
grp1:
paravance:
control: 1
network: 1
grp[2-4]:
paravance:
compute: 1
Constraints are then described under the network_constraints key in
the configuration file:
network_constraints:
enable: true
default_delay: 25ms
default_rate: 100mbit
default_loss: 0.1%
constraints:
- src: grp1
dst: grp[2-4]
delay: 10ms
rate: 1gbit
loss: 0%
symetric: true
To enforce the constraints, you can invoke:
enos tc
Note that The machines must be available, thus the up phase must have been called before.
As a result
the network delay between every machines of
grp1and the machines of the other groups will be 20ms (2x10ms: symetric)the bandwidth between every machines of
grp1and the machines of the other groups will be 1 Gbit/sthe packet loss percentage between every machines of
grp1and the machines of the other groups will be 0%.the network delay between every machines of
grp2andgrp3(resp.grp2andgrp4) (resp.grp3andgrp4) will be 50msthe bandwidth between every machines of
grp2andgrp3(resp.grp2andgrp4) (resp.grp3andgrp4) will be 100Mbit/sthe packet loss percentage between every machines of
grp2andgrp3(resp.grp2andgrp4) (resp.grp3andgrp4) will be 0.1%
Checking the constraints¶
Invoking
enos tc --test
will generate various reports to validate the constraints. They are based on fping and flent latency and bandwidth measurements respectively. The reports will be located in the result directory.
Notes¶
default_delay,default_rate,default_lossare mandatoryTo disable the network constraints you can specify
enable: falseunder thenetwork_constraintskey and launch againenos tcTo exclude a group from any tc rule, you can add an optionnal
exceptkey to thenetwork_constraints:
network_constraints:
enable: true
default_delay: 25ms
default_rate: 100mbit
default_loss: 0%
constraints:
- src: grp[1-3]
dst: grp[4-6]
delay: 10ms
rate: 1gbit
symetric: true
except:
- grp1