Setting the layer2 attribute

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest

If the detected hardware always runs in a specific discipline, the corresponding discipline module is automatically requested.

Before you begin

  • To change a configured layer2 attribute, the network interface must be shut down and the device must be set offline.
  • If you are using the layer2 option within a QDIO-based guest LAN environment, you cannot define a VLAN with ID 1, because ID 1 is reserved for z/VM® use.
  • IQD channels that in the IOCDS are defined as external-bridged must be configured to use layer 2.

About this task

The qeth device driver attempts to load the layer 3 discipline for HiperSockets™ devices and layer 2 for non-HiperSockets devices.

You can use the layer 2 mode for almost all device types, however, note the following about layer 2 to layer 3 conversion:
real OSA-Express
Hardware is able to convert layer 2 to layer 3 traffic and vice versa and thus there are no restrictions.
HiperSockets
There is no support for layer 2 to layer 3 conversion and, thus, no communication is possible between HiperSockets layer 2 interfaces and HiperSockets layer 3 interfaces. Do not include HiperSockets layer 2 interfaces and HiperSockets layer 3 interfaces in the same LAN.
z/VM guest LAN
The qeth device driver detects the mode of the VSWITCH or LAN to which the NIC is coupled, and sets this mode on the device. The z/VM definition "Ethernet mode" is available for VSWITCHes and for guest LANs of type QDIO.

Procedure

The qeth device driver separates the configuration options in sysfs according to the device discipline. Hence the first configuration action after you group the device must be the configuration of the discipline.
To set the discipline, issue a command of the form:
chzdev -a <device_bus_id> layer2=<integer>
or, using sysfs:
echo <integer> > /sys/devices/qeth/<device_bus_id>/layer2
where <integer> is
  • 0 to turn off the layer2 attribute; this results in the layer 3 discipline (default for HiperSockets).
  • 1 to turn on the layer2 attribute; this results in the layer 2 discipline (default for connections other than HiperSockets).

If the layer2 attribute has a value of -1, the layer was not set. The default layer setting is used when the device is set online.

Results

If you configured the discipline successfully, more configuration attributes are shown (for example route4 for the layer 3 discipline) and can be configured. If an OSA device is not configured for a discipline but is set online, the device driver assumes that it is a layer 2 device. It then tries to load the layer 2 discipline.
For more information about layer2, see:
  • Open Systems Adapter-Express Customer's Guide and Reference, SA22-7935
  • OSA-Express Implementation Guide, SG24-5948
  • Networking Overview for Linux® on zSeries®, REDP-3901
  • z/VM: Connectivity, SC24-6267