Configure Ethernet Network Interface
The following example sets the xCAT properties for compute node cn1 to create:
Compute node
cn1with two physical NICs:eth0andeth1Management network is
11.1.89.0, application network is13.1.89.0The install NIC is
eth0, and application NIC iseth1Assign static ip
11.1.89.7/24toeth0Assign static ip
13.1.89.7/24toeth1
Add/update networks into the xCAT DB
Add/update additional networks net11 and net13 into networks table:
chdef -t network net11 net=11.1.89.0 mask=255.255.255.0
chdef -t network net13 net=13.1.89.0 mask=255.255.255.0
Note: MTU can be customized as mtu in networks table for specified network.
Define Adapters in the nics table
The install NIC
eth0on the management network will get an IP via DHCP, which will be the value of theipattribute in the node definition. There is no need to configure install NIC intonicstable.chdef cn1 ip=11.1.89.7
Application NIC
eth1on the application network is different from install NICeth0, and will get its IP assigned from theeth1definition in thenicstablechdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth1
Update /etc/hosts
Run the
makehostscommand to add the new configuration to the/etc/hostsfile.makehosts cn1
Check
/etc/hostscat /etc/hosts 11.1.89.7 cn1 cn1.cluster.com 13.1.89.7 cn1-eth1 cn1-eth1.cluster.com
Configure adapters with static IPs
Execute
confignetwork -sto configure both provision ip11.1.89.7and application data ip13.1.89.7as staticAdd
confignetwork -sinto postscript list to execute on rebootchdef cn1 -p postscripts="confignetwork -s"
If the compute node is already running, use
updatenodecommand to runconfignetwork -spostscript without rebooting the nodeupdatenode cn1 -P "confignetwork -s"
If install NIC is not configured in
nicstable, executeconfignetworkwithout-sto only configure NICs defined innicstableAdd
confignetworkinto postscript list to execute on rebootchdef cn1 -p postscripts="confignetwork"
If the compute node is already running, use
updatenodecommand to runconfignetworkpostscript without rebooting the nodeupdatenode cn1 -P "confignetwork"
Note
Option -s writes the install NIC’s information into configuration file for persistence. All other NIC’s data defined in nics table will be written also. Without option -s, confignetwork only configures NIC’s data defined in nics table.
Check result
Use
xdsh cn1 "ip addr"to checketh0andeth1Check
ifcfg-eth0andifcfg-eth1under/etc/sysconfig/network-scripts/