22.6.1. Adding a
First, determine whether the
qeth device driver modules are loaded.
# lsmod | grep qeth
qeth 135240 0
qdio 45360 2 qeth
ipv6 303984 13 qeth
ccwgroup 15104 1 qeth
If the output of the
lsmod command shows that the modules are not loaded, you must run the
modprobe command to load them:
# modprobe qeth
Next, create a
qeth group device.
Due to the length of this command, it has been broken into two lines.
In the following example,
is 0.0.0601, and
is 0.0.0602. The device is a z/VM virtual NIC and the IP address to be assigned to this interface is 192.168.70.69.
# echo 0.0.0600,0.0.0601,0.0.0602 > /sys/bus/ccwgroup/drivers/qeth/group
Next, verify that the
qeth group device was created properly:
# ls /sys/bus/ccwgroup/drivers/qeth
0.0.0600 0.0.09a0 group notifier_register
You may optionally add a portname. First, you must check to see if a portname is required:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.0600/portname
no portname required
The response indicates that you do not need to provide a portname.
To add a port name, check that the devices are offline, and then run the following command:
The device(s) must be offline when you add a portname.
Next, bring the device back online:
# echo 1 > /sys/bus/ccwgroup/drivers/qeth/0.0.0600/online
Then verify the state of the device:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.0600/online
A return value of "1" indicates that the device is online, while a return value '0' indicates that the device is offline.
Check to see what interface name was assigned to the device:
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.0600/if_name
You may optionally set additional parameters and features, depending on the way you are setting up your system and the features you require.
Now you need to create the configuration file for your new interface. The network interface configuration files are placed in
The network configuration files use the naming convention ifcfg-
, where device is the value found in the
if_name file in the qeth group device that was created earlier. In this example it is
If there is an existing configuration file for another device of the same type already defined, the simplest solution is to copy it to the new name.
# cd /etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-eth1
If you do not have a similar device defined you must create one. Use this example of
ifcfg-eth0 as a template.
# IBM QETH
Edit the new
Remove the HWADDR line for now.
Modify the DEVICE statement to reflect the contents of the
if_name file from your ccwgroup.
Modify the IPADDR statement to reflect the IP address of your new interface.
Modify the NETMASK statement as needed.
If you want your new interface to be activated at boot time, then make sure ONBOOT is set to
Make sure the SUBCHANNELS statement matches the hardware addresses for your
# IBM QETH
qeth device requires an alias definition in
/etc/modprobe.conf. Edit this file and add an alias for your interface.
alias eth0 qeth
alias eth1 qeth
options dasd_mod dasd=0.0.0100,0.0.4b19
Now you can start the new interface:
# ifup eth1
Check the status of the interface:
# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 02:00:00:00:00:01
inet addr:192.168.70.87 Bcast:192.168.70.255 Mask:255.255.255.0
inet6 addr: fe80::ff:fe00:1/64 Scope:Link
UP BROADCAST RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:23 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:644 (644.0 b) TX bytes:264 (264.0 b)
Note that the
HWaddr field in the first line of the
ifconfig command output. The value after that must be added to the
ifcfg-eth1 file. Add a line like the following to that file:
ifcfg-eth1 looks similar to the following:
# IBM QETH
Check the routing for the new interface:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.70.0 * 255.255.255.0 U 0 0 0 eth1
22.214.171.124 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
default pdlrouter-if5.p 0.0.0.0 UG 0 0 0 eth0
Verify your changes by using the
ping command to ping the gateway:
# ping -c 1 192.168.70.8
PING 192.168.70.8 (192.168.70.8) 56(84) bytes of data.
64 bytes from 192.168.70.8: icmp_seq=0 ttl=63 time=8.07 ms
If the default route information has changed, you must also update