Configure Ethernet Network Interface
The following example sets the xCAT properties for compute node cn1
to create:
Compute node
cn1
with two physical NICs:eth0
andeth1
Management network is
11.1.89.0
, application network is13.1.89.0
The install NIC is
eth0
, and application NIC iseth1
Assign static ip
11.1.89.7/24
toeth0
Assign static ip
13.1.89.7/24
toeth1
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
eth0
on the management network will get an IP via DHCP, which will be the value of theip
attribute in the node definition. There is no need to configure install NIC intonics
table.chdef cn1 ip=11.1.89.7
Application NIC
eth1
on the application network is different from install NICeth0
, and will get its IP assigned from theeth1
definition in thenics
tablechdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth1
Update /etc/hosts
Run the
makehosts
command to add the new configuration to the/etc/hosts
file.makehosts cn1
Check
/etc/hosts
cat /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 -s
to configure both provision ip11.1.89.7
and application data ip13.1.89.7
as staticAdd
confignetwork -s
into postscript list to execute on rebootchdef cn1 -p postscripts="confignetwork -s"
If the compute node is already running, use
updatenode
command to runconfignetwork -s
postscript without rebooting the nodeupdatenode cn1 -P "confignetwork -s"
If install NIC is not configured in
nics
table, executeconfignetwork
without-s
to only configure NICs defined innics
tableAdd
confignetwork
into postscript list to execute on rebootchdef cn1 -p postscripts="confignetwork"
If the compute node is already running, use
updatenode
command to runconfignetwork
postscript 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 checketh0
andeth1
Check
ifcfg-eth0
andifcfg-eth1
under/etc/sysconfig/network-scripts/