Configure Aliases

The following example sets the xCAT properties for compute node cn1 to create:

  • Compute node cn1 with one physical NIC: eth2

  • User wants to configure aliases aliases1-1 and aliases1-2

  • Assign ip to aliases1-1 and to aliases1-2

Add network object into the networks table

Add/modify the networks in the networks table

chdef -t network -o 11_1_0_0-255_255_0_0 net= mask=
chdef -t network -o 12_1_0_0-255_255_0_0 net= mask=

Define attributes in the nics table

  1. Compute node cn1 has one physical NICs: eth2

    chdef cn1 nictypes.eth2=ethernet
  2. Define nicips, nicaliases, nichostnamesuffixes

    chdef cn1 nicips.eth2="|" nicaliases.eth2="aliases1-1|aliases1-2" nichostnamesuffixes.eth2="-eth2|-eth2-1"
  3. Define nicnetworks

    chdef cn1 nicnetworks.eth2="11_1_0_0-255_255_0_0|12_1_0_0-255_255_0_0"

Update /etc/hosts

  1. Update the /etc/hosts file

    makehosts cn1
  2. Check the /etc/hosts file cn1-eth2 aliases1-1 cn1-eth2-1 aliases1-2

Enable confignetwork to configure aliases

  1. Add confignetwork into the node’s postscripts list, confignetwork will be executed during OS deployment on compute node

    chdef cn1 -p postscripts=confignetwork
  2. Or if the compute node is already running, use updatenode command to run confignetwork postscript

    updatenode cn1 -P confignetwork

Check the result

Check if eth2 is configured correctly

xdsh cn1 "ip addr show eth2"