z/VM Virtual Networking Hints and Tips - LINUX QDIO Setup
Setting up a QDIO interface in LINUX
This is a brief, informal
description showing an extract of some of the information required in
configuration files to set up a
QDIO interface in Linux with a 2.6 based kernel. This example is from
SLES9, but any 2.6 based distribution will have to move some of the
configuration to the /etc/sysconfig/hardware directory and use these
extremely long file names.
These examples are provided without warranty or guarantee. Use at your
own risk.
First... the adapter must be defined in the hardware directory. This is a
"ccwgroup" because multiple devices are grouped to form a single entity
named by the first device. Look for the hardware configuration in:
/etc/sysconfig/hardware/hwcfg-qeth-bus-ccw-0.0.xxxx
(where xxxx is the 4-digit hex device address).
In the hardware configuration, we generally want to configure:
- Device addresses
- IP Layer or Link Layer transport
- fake_ll option for IP Layer transport
- Sample hardware configuration for devices 4100-4102 using IP Layer
transport mode.
From /etc/sysconfig/hardware/hwcfg-qeth-bus-ccw-0.0.4100
cpvnet1:/etc/sysconfig/hardware # cat hwcfg-qeth-bus-ccw-0.0.4100
CCW_CHAN_IDS='0.0.4100 0.0.4101 0.0.4102'
CCW_CHAN_MODE='OSA03FRE'
CCW_CHAN_NUM='3'
QETH_OPTIONS='fake_ll=1'
MODULE='qeth'
MODULE_OPTIONS=''
SCRIPTDOWN='hwdown-ccw'
SCRIPTUP='hwup-ccw'
SCRIPTUP_ccw='hwup-ccw'
SCRIPTUP_ccwgroup='hwup-qeth'
STARTMODE='auto'
Note: fake_ll is optional. It inserts fake Link Layer fields into the
frame so tools like tcpdump will find the IP Layer information at the
expected offset.
- Sample hardware configuration for devices 4200-4202 using Layer 2
transport mode.
From /etc/sysconfig/hardware/hwcfg-qeth-bus-ccw-0.0.4200
CCW_CHAN_IDS='0.0.4200 0.0.4201 0.0.4202'
CCW_CHAN_MODE='OSA03FRE'
CCW_CHAN_NUM='3'
MODULE='qeth'
MODULE_OPTIONS=''
QETH_LAYER2_SUPPORT='1'
SCRIPTDOWN='hwdown-ccw'
SCRIPTUP='hwup-ccw'
SCRIPTUP_ccw='hwup-ccw'
SCRIPTUP_ccwgroup='hwup-qeth'
STARTMODE='auto'
Note: The option QETH_LAYER2_SUPPORT='1' configures this device to use
Layer 2 support (compatible with the Guest LAN ETHERNET option).
Note that we do NOT use the fake_ll option here because the frames contain
valid ethernet header fields in this mode of operation.
In addition to the hardware configuration, you must provide network
configuration in /etc/sysconfig/network (for SLES9). Other distributions
may use a different subdirectory.
In the network configuration we generally want to configure:
- The IP Address and subnet information
- MTU
- ARP='yes' (Layer 2) or 'no' (IP Layer)
- Sample network configuration for devices 4100-4102 using IP Layer
transport mode.
From /etc/sysconfig/network/ifcfg-qeth-bus-ccw-0.0.4100
BOOTPROTO='static'
IPADDR='10.3.1.101'
NETMASK='255.255.255.0'
NETWORK='10.3.1.0'
BROADCAST='10.3.1.255'
MTU='8992'
ARP='no'
# REMOTE_IPADDR=''
STARTMODE='onboot'
Note: ARP='no' prevents this host from interfering with ARP assist
provided by the OSA device.
- Sample network configuration for devices 4200-4202 using Layer 2
transport
mode.
From /etc/sysconfig/network/ifcfg-qeth-bus-ccw-0.0.4200
BOOTPROTO='static'
IPADDR='10.2.1.101'
NETMASK='255.255.255.0'
NETWORK='10.2.1.0'
BROADCAST='10.2.1.255'
MTU='8992'
ARP='yes'
REMOTE_IPADDR=''
STARTMODE='onboot'
Note: ARP='yes' is necessary in Layer 2 mode because this host is
responsible for maintaining the ARP cache.
This document is maintained by:
Dennis Musselwhite
z/VM Development
musselwh@us.ibm.com
|