Configure Additional Network Interfaces

The nics table and the confignics postscript can be used to automatically configure additional network interfaces (mutltiple ethernets adapters, InfiniBand, etc) on the nodes as they are being deployed.

The way the confignics postscript decides what IP address to give the secondary adapter is by checking the nics table, in which the nic configuration information is stored.

To use the nics table and confignics postscript to define a secondary adapter on one or more nodes, follow these steps:

Define configuration information for the Secondary Adapters in the nics table

There are 3 ways to complete this operation.

  1. Using the mkdef and chdef commands

    # mkdef cn1 groups=all nicips.eth1="|" nicnetworks.eth1="net11|net12" nictypes.eth1="Ethernet"
    1 object definitions have been created or modified.
    # chdef cn1 nicips.eth2="|" nicnetworks.eth2="net13|net14" nictypes.eth2="Ethernet"
    1 object definitions have been created or modified.
  2. Using an xCAT stanza file

    • Prepare a stanza file <filename>.stanza with content similiar to the following:

      # <xCAT data object stanza file>
    • Using the mkdef -z option, define the stanza file to xCAT:

      # cat <filename>.stanza | mkdef -z
  3. Using tabedit to edit the nics database table directly

    The tabedit command opens the specified xCAT database table in a vi like editor and allows the user to edit any text and write the changes back to the database table.

    WARNING Using the tabedit command is not the recommended method because it is tedious and error prone.

    After changing the content of the nics table, here is the result from tabdump nics

    # tabdump nics

After you have defined the configuration information in any of the ways above, run the makehosts command to add the new configuration to the /etc/hosts file.

# makehosts cn1

# cat /etc/hosts cn1-eth1-1 cn1-eth1-2 cn1-eth2-1 cn1-eth2-2

Add confignics into the node’s postscripts list

Using below command to add confignics into the node’s postscripts list

chdef cn1 -p postscripts=confignics

By default, confignics does not configure the install nic. if need, using flag “-s” to allow the install nic to be configured.

chdef cn1 -p prostscripts="confignics -s"

Option “-s” write the install nic’s information into configuration file for persistance. All install nic’s data defined in nics table will be written also.

Add network object into the networks table

The nicnetworks attribute only defines the nic that uses the IP address. Other information about the network should be defined in the networks table.

Use the tabedit command to add/modify the networks in the``networks`` table

tabdump networks
"net11", "", "", "eth1",,,,,,,,,,,,,,,
"net12", "", "", "eth1",,,,,,,,,,,,,,,
"net13", "", "", "eth2",,,,,,,,,,,,,,,
"net14", "", "", "eth2",,,,,,,,,,,,,,,

Option -r to remove the undefined NICS

If the compute node’s nics were configured by confignics and the nics configuration changed in the nics table, user the confignics -r to remove the undefined nic.

For example, if on a compute node the eth0, eth1, and eth2 nics were configured: ::
# ifconfig eth0 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e6 ... eth1 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e7 ... eth2 Link encap:Ethernet HWaddr 00:14:5e:d9:6c:e8 ...

Delete the eth2 definition in nics table using the chdef command. Then run the following to remove the undefined eth2 nic on the compute node:

# updatenode <noderange> -P "confignics -r"

The result should have eth2 disabled:

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:14:5e:d9:6c:e6
eth1      Link encap:Ethernet  HWaddr 00:14:5e:d9:6c:e7

Deleting the installnic will result in strange problems, so confignics -r will not delete the nic set as the installnic.