Configure Aliases¶
The following example sets the xCAT properties for compute node cn1 to create:
- Compute node
cn1with one physical NIC:eth2- User wants to configure aliases
aliases1-1andaliases1-2- Assign ip
11.1.0.100toaliases1-1and12.1.0.100toaliases1-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=11.1.0.0 mask=255.255.0.0
chdef -t network -o 12_1_0_0-255_255_0_0 net=12.1.0.0 mask=255.255.0.0
Define attributes in the nics table¶
Compute node
cn1has one physical NICs:eth2chdef cn1 nictypes.eth2=ethernet
Define
nicips,nicaliases,nichostnamesuffixeschdef cn1 nicips.eth2="11.1.0.100|12.1.0.100" nicaliases.eth2="aliases1-1|aliases1-2" nichostnamesuffixes.eth2="-eth2|-eth2-1"
Define
nicnetworkschdef cn1 nicnetworks.eth2="11_1_0_0-255_255_0_0|12_1_0_0-255_255_0_0"
Update /etc/hosts¶
Update the
/etc/hostsfilemakehosts cn1
Check the
/etc/hostsfile11.1.0.100 cn1-eth2 cn1-eth2.cluster.com aliases1-1 12.1.0.100 cn1-eth2-1 cn1-eth2-1.cluster.com aliases1-2
Enable confignetwork to configure aliases¶
Add
confignetworkinto the node’s postscripts list,confignetworkwill be executed during OS deployment on compute nodechdef cn1 -p postscripts=confignetwork
Or if the compute node is already running, use
updatenodecommand to runconfignetworkpostscriptupdatenode cn1 -P confignetwork