Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: PDF layout

...

  • A TAP interface can either be created by the user or will be created automatically by the emulator if it does not already exist.
  • For automatically created TAP interfaces, the user can specify a name or let the emulator select a name.
  • A automatically created TAP interface is not automatically added to a bridge, this must be configured via the initialize_command.
  • An automatically created TAP interface is deleted automatically upon emulator stop.

...

The currently supported 32-bit system supports only one Ethernet card named system.lan0.card.

...

...

Minimal Configuration Parameters

...

The following image shows a sample of a HP-UX system with two Ethernet interfaces:


Div
classpagebreak



The following shows a sample of the second Ethernet interface being configured on device path 0/8/0/0:

Image Added

On an MPE/iX system, the device path is needed to configure the new network link.

The following shows a sample of two active Ethernet interfaces on MPE/iX:

...

Supplemental Information: Virtual Bridge and TAP Interfaces

The following sections describe the basic steps for the configuration of virtual bridges and TAP interfaces.

Please note:

  • The examples describe a virtual bridge that connects host and guest system to the local LAN via a physical NIC.
  • The described virtual bridge configuration is mostly suited for on-premises installations where the host system runs on a physical system.
  • For VMware (or similar environments) it is recommended to add additional vNICs for the guest as needed - instead of using a bridge configuration on the host.
  • In most cloud environments, a virtual bridge cannot directly link bridge traffic to the LAN via a host NIC. There are usually restrictions regarding the MAC addresses allowed on the NICs of a cloud instance. Also promiscuous mode is usually not possible. Hence, in such environments, traffic between a virtual bridge and the rest of the network must usually be NAT'ed or routed. The virtual bridge is then internal to the Linux host and not connected directly to the LAN.

Basic Bridge Configuration Using ip Commands

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
Gather information about the existing network configuration.

List all existing interfaces, their status and their MAC addresses:
   # ip link show

List all configured IP addresses and netmasks:
   # ip addr show

List the routing table entries:
   # ip route show

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 any routes (including the default gateway) to be routed across the bridge interface - if needed.

# ip route add <network>/<netmask> via <gwy-IP> dev my_bridge

# ip route add default via <gwy-IP> 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.

To delete TAP and bridge interfaces, you can use the command ip link delete <interface-name>.

Div
classpagebreak


Basic Bridge Configuration Using nmcli

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 nmcli commands (NetworkManager command-line interface):

StepDescription
Gather information about the existing network configuration.


List all existing interfaces, their status and their MAC addresses:
   # ip link show

List all configured IP addresses and netmasks:
   # ip addr show

List the routing table entries:
   # ip route show

If needed, create a new connection for the physical interface to be used with the bridge.

# nmcli conn add type ethernet autoconnect yes \
con-name
<physical-int-name> \
ifname <pysical-int-name> ip4 0.0.0.0

If needed, create a bridge and set a static IP address for it.# nmcli con add type bridge autoconnect yes \
con-name
mybr0 ifname mybr0  \
ipv4.method manual ip4
<ipaddr/mask> stp off
If needed, activate bridge.# nmcli con up bridge-mybr0
If needed, add physical interface to bridge.# nmcli conn modify <physical-int-conn> master mybr0 \
slave-type bridge
Activate changes to interface.# nmcli conn up <physical-int-conn>

After the bridge has been created, you can use the initialize command in the emulator configuration to add the required TAP interfaces for the emulator to the bridge.

Please note: By default, nmcli commands are persistent (connection information is stored in /etc/sysconfig/network-scripts/).

Div
classpagebreak


Basic Emulator Configuration Using a TAP Interface

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"

Please refer to the Configuration File Reference and the configuration template of your model for more information.

Linux Firewalls and Virtual Bridges

...

Please note: at the time of writing, this feature is not yet available for nftables.

...

Include Page
KBCOMMON:DOC-GoToToc
KBCOMMON:DOC-GoToToc