Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Contents

General Information

The configuration of an Ethernet interface for the emulated is described in the basic guest configuration examples above and the Configuration File Reference.

The emulated Ethernet interfaces of Charon-PAR can be linked either to a

  • physical host interface, or
  • to a TAP interface on the host.

Notes for TAP interfaces:

  • 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 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.

By default, emulated models have one Ethernet device. Depending on the model, more Ethernet devices can be added.

Basic Configuration Components

The name of the Ethernet interface in the emulator configuration file has the format EWxn with the following definitions:

  • x is an upercase letter starting with A for the first interface and then continues with B, C, etc. for additional interfaces. The possible number of network cards depends on the features of the original physical system. The absolute maximum number is 16.
  • n is the device number of the card starting with 0 for each value of x.

The configuration of each network interface must have two basic components (shown for the first Ethernet card EWA0):

  • Interface definition (EWA0.iface)
  • Interface initialization command: (EWA0.initialize_command)

The default configuration assumes that a physical network interface will be used.

Example of a basic network card configuration using a physical interface:

EWA0.iface="enp0s20f0u3u4"
EWA0.initialize_command="ethtool -K ${IFACE} rx off ; ethtool -K ${IFACE} tx off ; ethtool -K ${IFACE} sg off ; ethtool -K ${IFACE} gso off ; ethtool -K ${IFACE} gro off ; ethtool -K ${IFACE} txvlan off ; ethtool -K ${IFACE} rxvlan off"

The variable IFACE is set automatically by the emulator upon start.

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

Previous Workaround for Lack of TAP Support

The below may be obsolete - not yet clear if PAR3 will support TAP interfaces.

This chapter shows a workaround for PA3 models by which Charon-PAR traffic can use a virtual bridge on Linux. This is not the recommended configuration, but may be useful in several situations, for example:

  • The host system only has one physical Ethernet port.
  • There is a requirement to filter traffic to/from the guest system using a firewall on the host.

Please note: Do not use this workaround in an VMware environment. Instead add additional vNICs to the virtual machine to provide dedicated interfaces to the guest system as needed.

Workaround Description

The workaround is implemented using a virtual bridge and a veth interface pair. The following image shows an overview of the components:


Configuration Steps

The following steps show how to set up a virtual bridge and how to attach a veth interface to it. Such commands would have to be made persistent by creating an appropriate startup script.

The commands to create the above construction are as follows (execute them as the root user):

  1. Create the veth0/veth1 interface pair:
    # ip link add veth0 type veth peer name veth1

  2. Activate the interface pair:
    # ip link set veth0 up
    # ip link set veth1 up

  3. Turn off offloading (normally done in the Charon-PAR configuration file):
    # ethtool -K veth1 rx off tx off sg off gso off gro off txvlan off rxvlan off
    # ethtool -K veth0 rx off tx off sg off gso off gro off txvlan off rxvlan off

  4. Create the virtual bridge and activate it if it does not yet exist:
    # ip link add name <bridge-name> type bridge
    # ip link set <bridge-name> up

  5. Add physical interface and veth interface to bridge:
    # ip link set <physical-int-name> up
    # ip link set <physical-int-name> master <bridge-name>
    # ip link set veth0 master <bridge-name>

  6. Then configure Charon-PAR to use veth1.


After this configuration, both the host and the guest system can use the physical interface for communication. If required, firewall rules for bridge traffic can be added.

Please refer to the documentation of your Linux host system for more information.



  • No labels