Creating a network interface

Create a network interface for a network device.

Before you begin

You need to know the IP address of the network device and its network interface name.

To find the interface name of a qeth device, issue:
# lsqeth -p

About this task

The following steps describe a network interface setup on the host that does not persist across host reboots.

For a persistent setup, see your host administration documentation (see also Persistent configuration).

Procedure

  1. Determine the available network devices as defined in the IOCDS.
    You can use the znetconf -u command to list the unconfigured network devices and to determine their device bus-IDs.
    # znetconf -u
  2. Configure the network devices in layer 2 mode and set them online.

    To provide a good network performance, set the buffer count value to 128.

    For a non-persistent configuration, use the znetconf -a command with the layer2 sysfs attribute set to 1 and the buffer_count attribute set to 128:
    # znetconf -a <device-bus-ID> -o layer2=1 -o buffer_count=128
    You can use the znetconf -c command to list the configured network interfaces and to display their interface names:
    # znetconf -c 
  3. Activate the network interfaces.
    For example, you can use the ip command to activate a network interface. Using this command can also verify your results.
    # ip addr add <IP-address> dev <network-interface-name>
    # ip link set <network-interface-name> up

    Issue the first command only if the interface has not already been activated and subsequently deactivated.

  4. To exploit best performance, increase the transmit queue length of the network device (txqueuelen) to the recommended value of 2500.
    ip link set <network-interface-name> qlen 2500

Example

In the following example, you determine that OSA-Express CCW group devices with, for example, device bus-IDs 0.0.8050, 0.0.8051, and 0.0.8052 are to be used, and you set up the network interface.

  1. Determine the available network devices.
    # znetconf -u
    Scanning for network devices...
    Device IDs                 Type    Card Type      CHPID Drv.
    ------------------------------------------------------------
    ...
    0.0.8050,0.0.8051,0.0.8052 1731/01 OSA (QDIO)        90 qeth
    ...
    
  2. Configure the network devices and set them online.
    # znetconf -a 0.0.8050 -o layer2=1 -o buffer_count=128
    Scanning for network devices...
    Successfully configured device 0.0.8050 (enc8050)
    
    # znetconf -c
    Device IDs                 Type    Card Type     CHPID Drv. Name            State
    -----------------------------------------------------------------------------------
    ...
    0.0.8050,0.0.8051,0.0.8052 1731/01 OSD_1000         A0 qeth enc8050         online
    ...
    
  3. Activate the network interfaces.
    # ip link show enc8050
    32: enc8050: <BROADCAST,MULTICAST> mtu 1492 qdisc pfifo_fast state DOWN qlen 1000
        link/ether 02:00:00:6c:db:72 brd ff:ff:ff:ff:ff:ff
    
    # ip link set enc8050 up
  4. Increase the transmit queue length.
    # ip link set enc8050 qlen 2500
    # ip link show enc8050
    32: enc8050: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN
        qlen 2500
        link/ether 02:00:00:6c:db:72 brd ff:ff:ff:ff:ff:ff