.\" Copyright 2017 IBM Corp. .\" s390-tools is free software; you can redistribute it and/or modify .\" it under the terms of the MIT license. See LICENSE for details. .\" .TH ZNETCONF 8 "Mar 2009" "s390-tools" .SH NAME znetconf \- list and configure network devices for System z network adapters .SH SYNOPSIS .B znetconf .B [-h|--help] [-v|--version] .br .br .B znetconf -u | -c .br .B znetconf -a [,...]{2} [-o =]+ [-d ] .br .B znetconf -A [-o =]+ [-d ] [-e ]+ .br .B znetconf -r [-n] | -R [-n] [-e ]+ .SH DESCRIPTION The znetconf command lists and automatically configures network devices for System z network adapters. It senses and lists potential network devices that are not yet configured or already configured. Based on these lists, it automatically adds or removes network devices. .P For automatic configuration, znetconf builds a channel command word (CCW) group device from sensed CCW devices, configures any specified option through the sensed network device driver and sets the new network device online. .P During automatic removal, znetconf sets the device offline and removes it. Be aware that removing all network devices leads to the complete loss of network connectivity. So a terminal session (e.g. 3270) might be required to restore. .SH OPTIONS .TP 8 .BR -h | --help Print help text. .TP 8 .BR -v | --version Print the version of the s390-tools package and the znetconf command. .TP .BR -u | --unconfigured List potential network devices that are not yet configured. For each device, the following data is provided: .RS .TP 4 * Device IDs (device bus-IDs) of the CCW devices constituting the network device .TP * Type of control unit (e.g. 1731/01) .TP * Network card type (e.g. OSA (QDIO)) .TP * Channel path identifier (CHPID) .TP * Device driver (qeth, lcs, ctc, ctcm) .RE .TP .BR -c | --configured List configured network devices. For each device, the following data is provided: .RS .TP 4 * Device IDs (device bus-IDs) of the CCW devices constituting the network device .TP * Control unit type (e.g. 1731/01) .TP * Card type (e.g. GuestLAN QDIO) .TP * Channel path identifier (CHPID) .TP * Driver (qeth, lcs, ctc, ctcm) .TP * Network interface name (if available) .TP * State (online vs. offline) .RE .TP .BR -a | --add " [,)][,] [-o | --option =]+ [-d | --driver ] .br .br Add the potential network device identified by device_bus_id. device_bus_id can be any of the device IDs listed as part of the potential network device list (argument .BR -u ")." For example, if znetconf .BR -u lists 0.0.f503,0.0.f504,0.0.f505 for a potential network device, device_bus_id may be 0.0.f503 or 0.0.f504 or 0.0.f505. If a device bus-ID begins with 0.0., you can abbreviate it to the final hexadecimal digits. For example, you can abbreviate 0.0.f503 to f503. .br .br If attribute value pairs are given with .BR -o ", " these pairs are configured for the created network device. The device is then set online regardless of whether the given attribute value pairs were applied successfully. .br Finally, the corresponding network interface name (e.g. eth1) is displayed. .br If more then one device_bus_id is given, the given set of devices is configured as a network device. znetconf tries to sense the required device driver automatically. If the device driver cannot be sensed, you must specify it with -d. .BR -d "." With .BR -d znetconf does NOT check the validity of the combination of device bus-IDs. .TP .BR -A | --addall " [-o | --option =]+ [-d | --driver DRIVER]" [-e | --except ]+ .br .br Add all potential network devices. If one or more device_bus_id are specified with .BR -e ", " the corresponding network devices are not added. Attribute value pairs given with .BR -o are configured for the network devices before they are set online. If the configuration of one potential network device fails, znetconf continues with the next remaining potential network device. .TP .BR -r | --remove " [-n | --non-interactive]" Remove the network device identified by device_bus_id. device_bus_id is one of the device IDs of the network device. They are listed as part of znetconf .BR -c "." znetconf sets the device offline and removes it. If .BR -n is given, all confirmation questions are answered with 'yes'. .TP .BR -R|--removall " [-n | --non-interactive] [-e | --except ]+" Remove all network devices. If .BR -n is given, all confirmation questions are answered with 'yes'. To exclude certain devices from the removal, their device bus-IDs have to be given with .BR -e ". " .TP \fB\fR Specify a device option. The option must match a sysfs attribute for the device to be configured. For a detailed description of the semantics of sysfs attributes please refer to the Device Drivers, Features, and Commands book for Linux on System z. The attributes are: .RS .B qeth .br broadcast_mode .br buffer_count .br canonical_macaddr .br checksumming .br fake_broadcast .br ipa_takeover/add4 .br ipa_takeover/add6 .br ipa_takeover/del4 .br ipa_takeover/del6 .br ipa_takeover/enable .br ipa_takeover/invert4 .br ipa_takeover/invert6 .br isolation .br large_send .br layer2 .br performance_stats .br portname .br portno .br priority_queueing .br route4 .br route6 .br rxip/add4 .br rxip/add6 .br rxip/del4 .br rxip/del6 .br vipa/add4 .br vipa/add6 .br vipa/del4 .br vipa/del .br sniffer .RE .RS .B ctc(m) .br buffer .br loglevel .br protocol .br stats .RE .RS .B lcs .br portno .br lancmd_timeout .RE .RS .B NOTE: for .BR qeth ", some attributes are specific to layer 2 or layer 3 mode of operation. The option "layer2=[0|1]" must be specified before such attributes in the command line, thus it is recommended to always specify it first. .RE .TP \fB\fR Specify the device bus-ID of a CCW device. Device bus-IDs have the form ([A-Fa-f0-9].[A-Fa-f0-9].)[A-Fa-f0-9]{4}. If a device bus-ID begins with 0.0., you can abbreviate it to the final hexadecimal digits. For example, you can abbreviate 0.0.f503 to f503. .TP \fB\fR Specify the device driver for the device. Valid values are qeth, lcs, ctc, or ctcm. .SH EXAMPLES \fBznetconf -A\fR .RS Configures all potential network devices. To display a list of all potential network devices enter znetconf .BR -u "." After running znetconf .BR -A enter znetconf .BR -c to see which devices have been configured successfully. You can also enter znetconf .BR -u to display devices that have not been configured successfully. Successfully configured devices are no longer listed with znetconf .BR -u "." .RE .P \fBznetconf -A -e f500\fR .RS Configures all potential network devices except the one with the device bus-ID 0.0.f500. To display a list of all potential network devices enter znetconf .BR -u "." After running \fBznetconf -A -e f500\fR enter znetconf .BR -c to see which devices have been configured successfully. You can also enter znetconf .BR -u to display devices that have not been configured successfully. Successfully configured devices are no longer listed with znetconf .BR -u "." .RE .P \fBznetconf -R\fR .RS Removes all configured network devices. After successfully running this command, all devices listed by znetconf -c become potential devices listed by .BR -u "." .RE .P \fBznetconf -R -e f501\fR .RS Removes all configured network devices except the one having the device bus-ID 0.0.f501. After successfully running this command, all devices listed by znetconf -c except the one having the device bus-ID 0.0.f501 become potential devices listed by .BR -u "." .RE .P \fBznetconf -u\fR .RS Shows the list of potential network devices. Example output: .br .br Device IDs Type Card Type CHPID Drv. .br -------------------------------------------------------- .br 0.0.f500,0.0.f501,0.0.f502 1731/01 OSA (QDIO) 00 qeth .br 0.0.f503,0.0.f504,0.0.f505 1731/01 OSA (QDIO) 01 qeth .RE .P \fBznetconf -a 0.0.f503\fR .RS Adds the potential network device with 0.0.f503 as one of its device bus-IDs. After successfully running this command, znetconf .BR -c lists the new network device. .RE .P \fBznetconf -a f503\fR .RS This command is equivalent to \fBznetconf -a 0.0.f503\fR. .RE .P \fBznetconf -a f503 -o layer2=0 -o portname=myname\fR .RS Adds the potential network device with 0.0.f503 as one of its device bus-IDs and configures the options layer2 with value 0 and portname with myname. .RE .P \fBznetconf -c\fR .RS Shows a list of configured network devices. Example output: .br .br Device IDs Type Card Type CHPID Drv. Name State .br ----------------------------------------------------------------------- .br 0.0.f503,0.0.f504,0.0.f505 1731/01 GuestLAN QDIO 01 qeth eth1 online .br 0.0.f5f0,0.0.f5f1,0.0.f5f2 1731/01 OSD_1000 76 qeth eth0 online .RE .P \fBznetconf -r 0.0.f503\fR .RS Removes the network device with 0.0.f503 as one of its device bus-IDs. You can only remove configured devices as listed by znetconf .BR -c "." After successfully running this command the corresponding device appears in the list of potential network devices as listed by znetconf .BR -u "." .RE .P \fBznetconf -r f503\fR .RS This command is equivalent to \fBznetconf -r 0.0.f503\fR. .RE .P .SH DIAGNOSTICS If znetconf runs successfully, the exit status is 0. In case of errors, the following codes are returned: .TP .BR 0 success .TP .BR 9 could not group devices .TP .BR 10 could not set device online .TP .BR 11 could not set device offline .TP .BR 12 invalid attribute value pair .TP .BR 13 missing component (broken installation) .TP .BR 15 invalid device ID format .TP .BR 17 unknown driver .TP .BR 19 invalid argument .TP .BR 20 too much arguments .TP .BR 21 no configuration found for device ID .TP .BR 22 device is not configured .TP .BR 23 could not ungroup device .TP .BR 24 at least one option could not be configured .TP .BR 25 missing value for attribute .TP .BR 26 device does not exist .TP .BR 27 device already in use .TP .BR 28 net device did not come online .TP .BR 29 some devices could not be added or failed .TP .BR 30 syntax error on command line .TP .BR 31 ccwgroup devices do not exist .TP .BR 99 internal znetconf bug .SH AUTHOR .nf This man-page was written by Einar Lueck . .fi