C H A P T E R  4

Configuring Standalone CGTP Without the Reliable Boot Service on the Solaris OS

This chapter describes how to configure standalone CGTP without the Reliable Boot Service. The examples in this chapter use IPv4.

For more information, see these sections:


Introducing CGTP Configuration

This chapter describes the steps that you perform on nodes that are to run standalone CGTP. All examples in this chapter describe the configuration of two nodes, machine A and machine B, as shown in FIGURE 4-1. When configured, these nodes communicate through dual network links that form a CGTP network. You must decide the number of nodes that you want to configure to be part of this CGTP network.

FIGURE 4-1   CGTP Configuration for machine A and machine B

 Figure shows CGTP configuration between two
machines, machine A and machine B.



Preparing to Configure Standalone CGTP on the Solaris OS

To have a CGTP network, each node on the network must be configured to have three interfaces:

Configure CGTP on the node's local file system. Do not configure CGTP on a remote shared file system because a remote file system might become unreachable if the network fails. Before configuring CGTP interfaces and routes, configure the interface names, addresses, netmasks, and the database search on each node.

Perform the following procedures on each node that you are configuring for standalone CGTP.

procedure icon  To Configure Interface Names

Configure the interface names manually to enable creation of interfaces, and redundant routes, at first boot.



Note - You cannot enable the auto configuration of routes on subsequent reboots.



  1. Log in to the node that you want to configure for CGTP.

  2. Register the host names for each local IP interface.

    To ensure that the devices that you configure for CGTP are located in subsequent reboots, create three files:

    • /etc/hostname.NIC0

    • /etc/hostname.NIC1

    • /etc/hostname.cgtp0

    These files must be empty.



    Note - Network interfaces, such as NIC0, might have been created during the installation process.



procedure icon  To Configure an Ethernet Address Per Network Interface

Configure the network interfaces of the node to use the Ethernet address on the card and not the Ethernet address stored in its NVRAM.



Note - This applies only to Sun4U architectures, for example, SPARC® machines.



  1. Log in to the node as superuser.

  2. Enable the ok prompt:

    1. To get the telnet prompt, press Control and ]:


      # Control ]
      

    2. To get the ok prompt, type send brk at the telnet prompt:


      telnet> send brk
      Type 'go' to resume
      ok>
      

  3. Configure the processors to use local Ethernet (MAC) addresses:


    ok> setenv local-mac-address? true
    

procedure icon  To Configure Node Addresses

Manually configure the node addresses so that the interfaces and the redundant routes are created at first boot.

  1. Log in to the node that you want to configure for CGTP.

  2. Open /etc/inet/hosts in a text editor.

  3. Define the set of IP addresses for NIC0, NIC1, and cgtp0 in the /etc/inet/hosts file as described in To Configure Interface Names.

  4. Save the /etc/inet/hosts file and exit the text editor.

  5. Reboot the node.

  6. Check that the node addresses are automatically assigned to the interface:


    % ifconfig -a
    

    For more information on the ifconfig command, see the ifconfig(1M)man page.

procedure icon  To Configure Netmasks

  1. Log in to the node that you want to configure for CGTP.

  2. Open /etc/inet/netmasks in a text editor.

  3. Declare the subnet masks in the /etc/inet/netmasks file by adding an entry in the following format:


    aa.bb.cc.0 255.255.255.0
    

    This step assumes that all the CGTP subnet masks share a common Class C network prefix.

  4. Save the /etc/inet/netmasks file and exit the text editor.

procedure icon  To Configure the NIS Database Search

  1. Log in to the node that you want to configure for CGTP.

  2. Open the /etc/nsswitch.conf file in a text editor.

  3. For entries that concern hosts, replace this line:


    hosts 	...
    

    with the line


    hosts 	...files nis
    

    This forces the system to use the modified network configuration by placing a local search as first choice.

  4. For entries that concern netmasks, replace this line:


    netmasks 	...
    

    with the line


    netmasks 	...files nis
    

  5. Save the file and exit the text editor.


Configuring the cgtp0 Virtual Physical Interface on the Solaris OS

This section describes how to create a cgtp0 interface on two nodes. cgtp0 is a virtual physical interface. You must create a cgtp0 interface on each node on which you want to use standalone CGTP.



Note - Before performing this procedure, you must configure your interfaces, nodes, and netmasks as explained in To Configure Interface Names, To Configure Node Addresses, and To Configure Netmasks.



procedure icon  To Configure the cgtp0 Interface

  1. As superuser, log in to a node on which you want to configure CGTP.

    In FIGURE 4-1, the node could be machine A.

  2. Create the virtual physical interface for CGTP by using the plumb option of ifconfig:


    # ifconfig cgtp0 plumb
    

    The plumb option opens the device that is associated with the physical interface name. This option then sets up the streams needed for IP to use the device. For further information, see the ifconfig1M man page.

  3. View the new interface on machine A:


    # ifconfig -a
    

    A result similar to the following is displayed:


    lo0: flags=1000849UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000
    hme0: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
    inet 10.4.1.10 netmask ffffff00 broadcast 10.4.1.255
    ether 8:0:20:da:6:58
    hme1: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4>mtu 1500 index 4
    inet 10.4.2.10 netmask ffffff00 broadcast 10.4.2.255 
    ether 8:0:20:da:6:59
    cgtp0: flags=1000842BROADCAST,RUNNING,MULTICAST,IPv4>mtu 1500 index 5
    inet 0.0.0.0 netmask 0 
    ether 0:0:0:0:0:0
    

    You can observe that no IP address has been assigned to the cgtp0 interface, inet 0.0.0.0. Also, no MAC address is assigned to the interface, ether 0:0:0:0:0:0, because this interface is a virtual physical interface. For further information, see the cgtp7D man page.

    To display a shortened form of this result, displaying only the (as yet unassigned) cgtp0 interface values, use this command:


    # ifconfig cgtp0
    

    A shorter result similar to the following is displayed on the console window:


    cgtp0: flags=1000842BROADCAST,RUNNING,MULTICAST,IPv4>mtu 1500 index 5
    inet 0.0.0.0 netmask 0 
    ether 0:0:0:0:0:0
    



    Note - Before an interface is plumbed, the interface is not listed in the output of the ifconfig -a command.



  4. Assign an IP address, a netmask, and a broadcast address on machine A.

    The up option enables the cgtp0 interface.


    # ifconfig cgtp0 10.4.3.10 netmask 0xffffff00 broadcast 10.4.3.255 up
    

    In this example, the IP address is 10.4.3.10, the netmask is 0xffffff00, and the broadcast address is 10.4.3.255.

  5. View the details of the cgtp0 interface on machine A:


    # ifconfig cgtp0
    cgtp0: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 
    index 2 
    inet 10.4.3.10 netmask ffffff00 broadcast 10.4.3.255 
    ether 0:0:0:0:0:0 
    



    Note - You can modify the broadcast address and the netmask, if necessary, by using the ifconfig command.



  6. As superuser, log in to the second machine, machine B.

  7. Create the standard interface for CGTP by using the plumb option of ifconfig:


    # ifconfig cgtp0 plumb
    

  8. Assign an IP address, a netmask, and a broadcast address to machine B.

    The up option enables the cgtp0 interface.


    # ifconfig cgtp0 10.4.3.11 netmask 0xffffff00 broadcast 10.4.3.255 up
    

    In this example, the IP address is 10.4.3.11, the netmask is 0xffffff00, and the broadcast address is 10.4.3.255.

  9. View the newly created cgtp0 interface on machine B:


    # ifconfig -a
    cgtp0: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 
    inet 10.4.3.11 netmask ffffff00 broadcast 10.4.3.255 
    ether 0:0:0:0:0:0 
    hme0: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 
    inet 10.4.1.11 netmask ffffff00 broadcast 10.4.1.255 
    ether 8:0:20:da:6:62
    hme1: flags=1000843UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4 
    inet 10.4.2.11 netmask ffffff00 broadcast 10.4.2.255 
    ether 8:0:20:da:6:63 
    


Configuring Additional CGTP Virtual Logical Interfaces on the Solaris OS

In addition to the cgtp0 interface, you can configure additional CGTP interfaces. These additional interfaces are virtual logical interfaces that are associated with cgtp0, such as cgtp0:1 and cgtp0:2. You might want to create such an additional interface if you want to have services using different interfaces, but want to maintain the redundancy.

The cgtp0 and cgtp0:x interfaces on a node must have the same subnet prefix. This means that the primary CGTP address and the logical, or aliased, addresses must only differ by their hostid. Routes to the aliased interfaces can accordingly be set up on the other cluster nodes.

procedure icon  To Configure Additional CGTP Interfaces

  1. As superuser, log in to machine A.

  2. Create the logical interface for CGTP:


    # ifconfig cgtp0 addif \destination-address netmask netmask broadcast broadcast-address
    

    The addif option creates the next unused logical interface associated with the interface you specify. For example, if you specify cgtp0, the next unused logical interface is cgtp0:1. This option replaces the plumb option. In addition, the addif option avoids conflicts because it assigns the next available interface name. For further information, see the ifconfig1M man page.

    Alternatively, you can still specify the logical interface name by using the plumb and up options:


    # ifconfig cgtp0:1 plumb
    


    # ifconfig cgtp0:1 destination-address \netmask netmask broadcast broadcast-address up
    

  3. Create logical interfaces for the gateways (destinations) on machine A:


    # ifconfig hmex addif \destination-address netmask netmask broadcast broadcast-address up
    

  4. As superuser, log in to machine B.

  5. Repeat Step 2 and Step 3 for machine B.


Creating Routes for CGTP on the Solaris OS

This section describes how to create routes for CGTP between two nodes, machine A and machine B. CGTP routes should not cross physical interfaces that are part of a CompactPCI network interface, IPMP group.

You must configure all CGTP interfaces before configuring CGTP routes.

procedure icon  To Create Routes Between Two Machines

In this procedure, machine B is the destination address or gateway.

  1. As superuser, log in to machine A.

  2. Create routes from machine A to machine B using the general notation:


    # route add destination-cgtp-address \gateway-address -multirt -setsrc src-cgtp-address
    

    Routes must be separately configured for each CGTP target on the network. The -setsrc option is used to specify a source address. For further information on the -multirt and -setsrc options, see the route1M man page in the Solaris OS documentation set.

    Note that all commands for adding routes from machine A to machine B are executed on machine A.


    # route add 10.4.3.11 10.4.1.11 -multirt -setsrc 10.4.3.10
    


    # route add 10.4.3.11 10.4.2.11 -multirt -setsrc 10.4.3.10
    

  3. Examine the routing table on machine A:


    # netstat -rn
    

    The following table gives an example of the routing table for machine A. Note that the two routes have the same destination address, but different gateways.


    Destination Gateway Flags Ref Use Interface
    10.4.3.11 10.4.1.11 UGHMS 1 0  
    10.4.3.11 10.4.2.11 UGHMS 1 0  
    10.4.2.0 10.4.2.10 U 1 0 hme1
    10.4.3.0 10.4.3.10 U 1 0 cgtp0
    10.4.1.0 10.4.1.10 U 1 0 hme0
    224.0.0.0 10.4.1.10 U 1 0 hme0
    127.0.0.1 127.0.0.1 UH 2 8 lo0

    The Flags column contains the letter M to indicate that the routes are marked as multirt. The letter S indicates that the route is declared with the setsrc option. The routing table provides this information to enable you to check whether your manual configuration is correct.

  4. Create routes from machine B to machine A.

    Note that all commands in adding routes from machine B to machine A are executed on machine B.


    # route add 10.4.3.10 10.4.1.10 -multirt -setsrc 10.4.3.11
    


    # route add 10.4.3.10 10.4.2.10 -multirt -setsrc 10.4.3.11
    

    Routes must be separately configured for each CGTP target on the network, in both directions.

  5. Examine the routing table on machine B:


    # netstat -rn
    

    The following table gives an example of the routing table for machine B.


    Destination Gateway Flags Ref Use Interface
    10.4.3.10 10.4.1.10 UGHMS 1 0  
    10.4.3.10 10.4.2.10 UGHMS 1 0  
    10.4.2.0 10.4.2.11 U 1 0 hme1
    10.4.3.0 10.4.3.11 U 1 0 cgtp0
    10.4.1.0 10.4.1.11 U 1 0 hme0
    127.0.0.1 127.0.0.1 UH 2 8 lo0

    The filtering module is now configured because routes are declared to the CGTP destination address that is filtering packets from that address.


Disabling CGTP on the Solaris OS

This section describes how to disable the CGTP interfaces, and the asssociated routes, on two machines where each machine is attached to two subnets. The CGTP interfaces that can be disabled are as follows:

procedure icon  To Disable Virtual Logical Interfaces

  1. As superuser, log in to machine A.

  2. Remove the routes that you set up in To Create Routes Between Two Machines:


    # route delete machine-B-cgtp-address gateway-address
    

  3. Use the ifconfig command to disable your logical interfaces.

    • The following command disables the logical interface hme0:1:


      # ifconfig hme0:1 down unplumb
      

    • The following command disables the logical interface cgtp0:1:


      # ifconfig cgtp0:1 down unplumb
      

procedure icon  To Disable the Virtual Physical Interface, cgtp0

  1. As superuser, log in to machine A.

  2. Remove the routes between machine A and machine B:


    # route delete machine-B-cgtp-address gateway-address
    

    On machine A, the following commands remove the routes.


    # route delete 10.4.3.11 10.4.1.11
    


    # route delete 10.4.3.11 10.4.2.11
    

  3. As superuser, log in to machine B.

  4. Remove routes between machine B and machine A.

    On machine B, the following commands remove the routes.


    # route delete 10.4.3.10 10.4.1.10
    


    # route delete 10.4.3.10 10.4.2.10
    

  5. As superuser, log in to machine A.

  6. Remove the interfaces that you configured for CGTP.

    For example, to remove the cgtp0 interface on machine A, type the following:


    # ifconfig cgtp0 down unplumb
    

  7. As superuser, log in to machine B.

  8. Remove the interfaces that you configured for CGTP on machine B.