C H A P T E R 4 |
This chapter describes how to configure standalone CGTP without the Reliable Boot Service. The examples in this chapter use IPv4.
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.
To have a CGTP network, each node on the network must be configured to have three interfaces:
Two interfaces, NIC0 and NIC1, that can be either physical or logical. Names of the interfaces vary depending on the hardware you use (some examples are: hme, eri, le, bge, e1000g, and ge). For more information and the interface type for specific supported hardware, see the Netra High Availability Suite 3.0 1/08 Release Notes.
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.
To Configure the NIS Database Search
Note - If you use zones in the Solaris 10 OS and exclusive, per-zone, IP stacks, be aware that CGTP filtering currently works only in the global zone, with the shared IP stack. |
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. |
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. |
Manually configure the node addresses so that the interfaces and the redundant routes are created at first boot.
Define the set of IP addresses for NIC0, NIC1, and cgtp0 in the /etc/inet/hosts file as described in To Configure Interface Names.
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.
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. |
As superuser, log in to a node on which you want to configure CGTP.
In FIGURE 4-1, the node could be machine A.
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.
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. |
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.
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. |
Create the standard interface for CGTP by using the plumb option of ifconfig:
# ifconfig cgtp0 plumb |
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.
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 |
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.
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 |
Create logical interfaces for the gateways (destinations) on machine A:
# ifconfig hmex addif \destination-address netmask netmask broadcast broadcast-address up |
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.
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 |
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.
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.
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.
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:
Virtual logical interfaces (cgtp0:x), where you have assigned more than one IP address to the cgtp0 virtual physical interface, or hme0:x for hme0
Remove the routes that you set up in To Create Routes Between Two Machines:
# route delete machine-B-cgtp-address gateway-address |
Use the ifconfig command to disable your logical interfaces.
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 |
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 |
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 |
Remove the interfaces that you configured for CGTP on machine B.
Copyright © 2008, Sun Microsystems, Inc. All rights reserved.