NEmu

Network Emulator for Mobile Universes

Documentation - Basic Virtual Links (VLink)

A VLink is a virtual Ethernet elements which enables to inter-connect 1 or more virtual entities. Several virtual links are actually available in NEmu:

VLine(name)

A VLine is a virtual point-to-point cable. name is the name of this point-to-point link.

VHub(name, niface)

A VHub is a virtual Ethernet hub device. name is the name of this virtual hub and niface is the number of ports of the hub.

VSwitch(name, niface)

A VSwitch is a virtual Ethernet switch device. name is the name of this virtual switch and niface is the number of ports of the switch.

Currently, VLink elements can run on the top of tcp, udp, vde and tap tunnels.
Events for a virtual link are logged in symlink.{session name}/link/{link name}.

Each interface of a virtual link can be configure more finely before or during runtime:

ConfIface(name, direction, state, vlan, bandwidth, delay, jitter, ber, qsize)

This function configures an interface of a virtual link.
name is the name of the virtual link and its interface. This argument should be {vlink name}:{interface number} or {vlink name} (in this case, all interfaces will be configured).
direction can be all, in or out (Default: all).
state can be up or down (Default: up).
vlan is a port VLAN number (level 1) (Default: 0).
bandwidth is the bandwidth limitation in bps (default: None).
delay is the delay in seconds (default: None).
jitter is the delay jitter in percentage (default: 0).
ber is the bit error rate ratio (default: 0).
qsize is the queue size in number of packets.

UnconfIface(name, direction, state, vlan, bandwidth, delay, jitter, ber, qsize)

This function un-configures an interface of a virtual link. name is the name of the virtual link and its interface. This argument should be {vlink name}:{interface number} or {vlink name} (in this case, all interfaces will be un-configured). Other arguments are boolean and specifies if the flag has to be reset (default : all flags are activated).

Here is a VLink usage example:

VSwitch("sw", niface=4)

ConfIface("sw:0", vlan=1)
ConfIface("sw:1", vlan=1, bandwidth=54000000)
ConfIface("sw:2", ber=0.1)
ConfIface("sw:3", delay=2, jitter=20)