...
Step | Command |
---|---|
Gather information about the existing network configuration. | List all existing interfaces, their status and their MAC addresses: List all configured IP addresses and netmasks: List the routing table entries: |
Create a TAP interface (not needed if emulator automatic creation is used). |
|
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 (not supported for cloud installations). | # 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. |
|
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 |
...
Step | Description |
---|---|
Gather information about the existing network configuration. | List all existing interfaces, their status and their MAC addresses: List all configured IP addresses and netmasks: List the routing table entries: |
If needed, create a new connection for the physical interface to be used with the bridge. |
|
If needed, create a bridge and set a static IP address for it. | # nmcli con add type bridge autoconnect yes \ 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 (not supported for cloud installations). | # nmcli conn modify <physical-int-conn> master mybr0 \ |
Activate changes to interface. | # nmcli conn up <physical-int-conn> |
...
Please note: By default, nmcli commands are persistent. The connection information is stored in /etc/sysconfig/network-scripts/ if the default plugin in
/etc/NetworkManager/NetworkManager.conf is ifcfg-rh. It is stored in /etc/NetworkManager/system-connections/ if the default plugin is keyfile. Permanent TAP connection information is always stored in the NetworkManager directory unless the network-scripts package is used for configuration.
...