The Rocks database holds information that has been discovered about a host and in particular records network interface information including MAC addresses and local device modules. The Rocks command line has several tools to inspect and update entries in the database.
For the following discussion, a compute node with a public interface will be used for illustation. To list the ethernet interfaces do the following:
# rocks list host interface compute-0-0 SUBNET IFACE MAC IP NETMASK MODULE NAME VLAN OPTIONS CHANNEL private eth0 00:0e:0c:a7:57:d7 10.1.255.254 255.255.0.0 ------ compute-0-0 ---- ------- ------- public eth1 00:19:b9:21:b8:b6 137.110.119.93 255.255.255.0 ------ kong.rocksclusters.org ---- ------- ------- |
Suppose that it is desired to swap these two interfaces. That is, we would want to associate the private network with eth1 and the public network with eth0. The following will change the information only in the database.
# rocks swap host interface compute-0-0 ifaces=eth0,eth1 # rocks list host interface compute-0-0 SUBNET IFACE MAC IP NETMASK MODULE NAME VLAN OPTIONS CHANNEL public eth0 00:0e:0c:a7:57:d7 137.110.119.93 255.255.255.0 ------ kong.rocksclusters.org ---- ------- ------- private eth1 00:19:b9:21:b8:b6 10.1.255.254 255.255.0.0 ------ compute-0-0 ---- ------- ------- |
We see that eth0 is now associated with the public network, and eth1 is associated with the private network.
To apply the changes to compute-0-0, execute:
# rocks sync config # rocks sync host network compute-0-0 |