4.2. Named Networks/Subnets

Rocks clusters are required to have two subnets defined: "public" and "private", but a cluster owner can define more subnets. The commmand rocks list network lists the defined networks

[root@rocks ~]# rocks list network
NETWORK    SUBNET       NETMASK      
private:   172.16.254.0 255.255.255.0
public:    132.239.8.0  255.255.255.0
optiputer: 67.58.32.0   255.255.224.0

In the screen above, the additional network called "optiputer" is defined with netmask 255.255.224.0(/19). To add a network called "fast" as 192.168.1.0 and netmask 255.255.255.0(/24) do the following

[root@rocks ~]# rocks add network fast subnet=192.168.1.0 netmask=255.255.255.0
[root@rocks ~]# rocks list network
NETWORK    SUBNET       NETMASK      
private:   172.16.254.0 255.255.255.0
public:    132.239.8.0  255.255.255.0
optiputer: 67.58.32.0   255.255.224.0
fast:      192.168.1.0  255.255.255.0

The subnet and netmask of an existing network can be changed using rocks set network subnet and rocks set network netmask commands.