Setting the layer2 attribute

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.

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
Linux® has to configure the same mode as the underlying z/VM virtual LAN definition. 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:
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.
  • 1 to turn on the layer2 attribute; this results in the layer 2 discipline (default).
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 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