Working with qeth devices

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest

Typical tasks that you need to perform when working with qeth devices include creating group devices, finding out the type of a network adapter, and setting a device online or offline.

About this task

Most of these tasks involve writing to and reading from attributes of qeth group devices in sysfs. This is useful on a running system where you want to make dynamic changes. If you want to make the changes persistent across IPLs, use the interface configuration files. Network configuration parameters are defined in /etc/sysconfig/network-scripts/ifcfg-<if_name>. An example of how to define a qeth device persistently is in the installation documentation on the Red Hat website. For a general discussion of network configuration files, see configuration documentation on the Red Hat documentation website
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9

Table 1 and Table 3 serve as both a task overview and a summary of the attributes and the possible values you can write to them. Underlined values are defaults.
Tip: Use the chzdev command to configure devices instead of using the attributes directly. You can also use the znetconf command for network devices.

Not all attributes are applicable to each device. Some attributes apply only to HiperSockets or only to OSA-Express CHPIDs in QDIO mode, other attributes are applicable to IPv4 interfaces only. See the task descriptions for the applicability of each attribute.

Table 1. qeth tasks and attributes common to layer2 and layer3
Task Corresponding attributes Possible attribute values
Creating a qeth group device group n/a
Removing a qeth group device ungroup 0 or 1
Setting the layer2 attribute layer2 0 or 1, see Layer 2 and layer 3¹
Using priority queueing priority_queueing prio_queueing_vlan
prio_queueing_skb
prio_queueing_prec
prio_queueing_tos
no_prio_queueing
no_prio_queueing:0
no_prio_queueing:1
no_prio_queueing:2
no_prio_queueing:3
Specifying the number of inbound buffers buffer_count integer in the range 8 - 128. The default is 64 for OSA devices and 128 for HiperSockets devices
Specifying the relative port number portno integer, either 0 or 1, the default is 0
Finding out the type of your network adapter card_type n/a, read-only
Setting a device online or offline online 0 or 1
Finding out the interface name of a qeth group device if_name n/a, read-only
Finding out the bus ID of a qeth interface none n/a
Activating an interface none n/a
Deactivating an interface none n/a
Recovering a device recover 1
Enabling and disabling TCP segmentation offload none n/a
Configuring the receive checksum offload feature none n/a
Configuring the transmit checksum offload feature none n/a
Isolating data connections isolation none, drop, forward
Displaying and resetting QETH performance statistics performance_stats 0 or 1
Capturing a hardware trace hw_trap arm
disarm
¹A value of -1 means that the layer has not been set and that the default layer setting is used when the device is set online.
Table 2. qeth functions and attributes in layer 2 mode
Function Corresponding attributes Possible attribute values
Configuring a network device as a member of a Linux bridge bridge_role
bridge_state
bridge_hostnotify
primary, secondary, none
active, standby, inactive
0 or 1
Advanced packet-handling configuration vnicc/bridge_invisible
vnicc/flooding
vnicc/learning
vnicc/mcast_flooding
vnicc/rx_bcast
vnicc/takeover_learning
vnicc/takeover_setvmac
vnicc/learning_timeout
0 or 1
0 or 1
0 or 1
0 or 1
0 or 1
0 or 1
0 or 1
integer in the range
60 - 86400
the default is 600
Table 3. qeth tasks and attributes in layer 3 mode
Task Corresponding attributes Possible attribute values
Setting up a Linux router in layer 3 route4
route6
primary_router secondary_router primary_connector secondary_connector multicast_router
no_router
Faking broadcast capability fake_broadcast ¹ 0 or 1
Taking over IP addresses ipa_takeover/enable 0 or 1 or toggle
ipa_takeover/add4 ipa_takeover/add6 ipa_takeover/del4 ipa_takeover/del6 IPv4 or IPv6 IP address and mask bits
ipa_takeover/invert4 ipa_takeover/invert6 0 or 1 or toggle
Configuring a device for proxy ARP rxip/add4
rxip/del4
IPv4 IP address
Configuring a device for NDP proxy rxip/add6
rxip/del6
IPv6 IP address
Configuring a device for virtual IP address (VIPA) vipa/add4
vipa/add6
vipa/del4
vipa/del6
IPv4 or IPv6 IP address
Configuring a HiperSockets device for AF_IUCV addressing hsuid 1 to 8 characters
Setting up a HiperSockets network traffic analyzer sniffer 0 or 1
¹ not valid for HiperSockets
Tip: Use the qethconf command instead of using the attributes for IPA, proxy ARP, and VIPA directly (see qethconf - Configure qeth devices).
sysfs provides multiple paths through which you can access the qeth group device attributes. For example, if a device with bus ID 0.0.a100 corresponds to interface enca100:
/sys/bus/ccwgroup/drivers/qeth/0.0.a100
/sys/bus/ccwgroup/devices/0.0.a100
/sys/devices/qeth/0.0.a100
/sys/class/net/enca100/device
all lead to the attributes for the same device. For example, the following commands are all equivalent and return the same value:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.a100/if_name
enca100
# cat /sys/bus/ccwgroup/devices/0.0.a100/if_name
enca100
# cat /sys/devices/qeth/0.0.a100/if_name
enca100
# cat /sys/class/net/enca100/device/if_name
enca100

The path through /sys/class/net becomes available when the device is first set online and the interface is created. The path persists until the device is ungrouped. Furthermore, it might lead to a different device if the assignment of interface names changes. A change can occur after rebooting or when devices are ungrouped and new group devices created.

Tip: Work through one of the paths that are based on the device bus-ID.

The following sections describe the tasks in detail.