Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: format correction

...

The following table shows a simple example of how to create a virtual bridge on Linux and how to add TAP interfaces to it using ip commands:

StepCommand
Create a TAP interface (not needed if emulator automatic creation is used).

# ip tuntap add dev my_tap0 mod tap

Activate TAP interface (can also be done via the initialize command in emulator configuration).# ip link set my_tap0 up
Create a new bridge - if needed.# ip link add name my_bridge type bridge
Activate the bridge - if needed# ip link set my_bridge up
If needed, add a physical interface to the bridge. This interface will connect the bridge to the physical LAN.# ip link set <physical-int> master my_bridge
Remove any configured IP address from the physical interface.# ip addr delete <ip-address>/<netmask> dev <physical-int>
Add the IP address previously configured on the physical interface (or another IP address to be used by the host system) to the bridge interface.# ip addr add <ip-address>/<netmask> dev my_bridge
Add the TAP interface to the bridge (can also be done via the initialize command in the emulator configuration).# ip link set my_tap0 master my_bridge

Please note: The commands above are not persistent. They would need to be scripted and added to the host system startup as required.

...

The following example shows how to use a TAP interface in the emulator configuration, where the interface is automatically created and removed by the emulator. The initialization command adds the interface to an existing bridge named my_bridge:

Code Block
languagetext
EWA0.mapping_mode="TAP"
EWA0.initialize_command="ip link set ${IFACE} master my_bridge"

...