20.11. Persistently adding a qeth device
To make a new qeth device persistent, create a configuration file for the new interface. The network interface configuration files are placed in the /etc/NetworkManager/system-connections/ directory.
The network configuration files use the naming convention device.nmconnection, where device is the value found in the interface-name file in the qeth group device that was created earlier, for example enc9a0. The cio_ignore commands are handled seamlessly for persistent device configurations and you do not need to free devices from the ignore list manually.
If a configuration file for another device of the same type already exists, copy it to the new name and edit it:
# cd /etc/NetworkManager/system-connections/
# cp enc9a0.nmconnection enc600.nmconnection
To learn IDs of your network devices, use the lsqeth utility:
# lsqeth -p
devices CHPID interface cardtype port chksum prio-q'ing rtr4 rtr6 lay'2 cnt
-------------------------- ----- ---------------- -------------- ---- ------ ---------- ---- ---- ----- -----
0.0.09a0/0.0.09a1/0.0.09a2 x00 enc9a0 Virt.NIC QDIO 0 sw always_q_2 n/a n/a 1 64
0.0.0600/0.0.0601/0.0.0602 x00 enc600 Virt.NIC QDIO 0 sw always_q_2 n/a n/a 1 64
If you do not have a similar device defined, create a new file. Use this example:
[connection]
type=ethernet
interface-name=enc600
[ipv4]
address1=10.12.20.136/24,10.12.20.1
dns=10.12.20.53;
method=manual
[ethernet]
mac-address=00:53:00:8f:fa:66
Edit the new enc600.nmconnection file as follows:
Ensure the new connection file is owned by
root:root:# chown root:root /etc/NetworkManager/system-connections/enc600.nmconnection- Add more details in this file or modify these parameters based on your connection requirements.
- Save the file.
Reload the connection profile:
# nmcli connection reloadTo view complete details of the connection newly added, enter:
# nmcli connection show enc600
Changes to the enc600.nmconnection file become effective after either rebooting the system, dynamic addition of new network device channels by changing the system’s I/O configuration (for example, attaching under z/VM), or reloading network connections. Alternatively, you can trigger the activation of enc600.nmconnection for network channels, which were previously not active yet, by executing the following commands:
Use the
cio_ignoreutility to remove the network channels from the list of ignored devices and make them visible to Linux:# cio_ignore -r read_device_bus_id,write_device_bus_id,data_device_bus_idReplace read_device_bus_id, write_device_bus_id, data_device_bus_id with the three device bus IDs representing a network device. For example, if the read_device_bus_id is
0.0.0600, the write_device_bus_id is0.0.0601, and the data_device_bus_id is0.0.0602:# cio_ignore -r 0.0.0600,0.0.0601,0.0.0602To trigger the uevent that activates the change, issue:
# echo add > /sys/bus/ccw/devices/read-channel/ueventFor example:
# echo add > /sys/bus/ccw/devices/0.0.0600/ueventCheck the status of the network device:
# lsqethIf the default route information has changed, you must also update the ipaddress1 parameters in both the
[ipv4]and[ipv6]sections of the/etc/NetworkManager/system-connections/<profile_name>.nmconnectionfile accordingly:[ipv4] address1=10.12.20.136/24,10.12.20.1 [ipv6] address1=2001:db8:1::1,2001:db8:1::fffeNow start the new interface:
# nmcli connection up enc600Check the status of the interface:
# ip addr show enc600 3: enc600: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 3c:97:0e:51:38:17 brd ff:ff:ff:ff:ff:ff 10.12.20.136/24 brd 10.12.20.1 scope global dynamic enc600 valid_lft 81487sec preferred_lft 81487sec inet6 1574:12:5:1185:3e97:eff:fe51:3817/64 scope global noprefixroute dynamic valid_lft 2591994sec preferred_lft 604794sec inet6 fe45::a455:eff:d078:3847/64 scope link valid_lft forever preferred_lft foreverCheck the routing for the new interface:
# ip route default via 10.12.20.136 dev enc600 proto dhcp srcVerify your changes by using the
pingutility to ping the gateway or another host on the subnet of the new device:# ping -c 1 10.12.20.136 PING 10.12.20.136 (10.12.20.136) 56(84) bytes of data. 64 bytes from 10.12.20.136: icmp_seq=0 ttl=63 time=8.07 msIf the default route information has changed, you must also update
/etc/sysconfig/networkaccordingly.For more information, see the
nm-settings-keyfileman page on your system.