Abstract:
A connection procedure for finding by rearrangement a path for multirate, multicast traffic through an SDH cross-connect with subnetwork connection protection. If no free path for a new payload through the SDH switching hardware is available, the switching procedure looks for a path that is adequate and blocked by the least existing payload capacity. If the hunt is successful, the procedure rearranges the existing connections to make possible a path for the new payload. The procedure does not interrupt the existing connections; thus it is a &#34;hitless&#34; procedure. Connections for existing payloads that must be moved to make way for the new payload are queued and the connection procedure is applied recursively, to each in turn, until the queue is empty.

Description:
TECHNICAL FIELD 
     The present invention pertains to rearranging Clos networks. More particularly, this invention relates to a method and a system that finds a path through a Synchronous Optical Network or Synchronous Digital Hierarchy (SONET/SDH) communications cross-connect for several kinds of connections, including: multirate unicast unidirectional, multirate unicast bidirectional, multirate subnetwork connection protection unidirectional, multirate subnetwork connection protection bidirectional, and multirate multicast connections. 
     BACKGROUND OF THE INVENTION 
     Implementations of SONET/SDH circuit-switchcd cross-connect switching structures may be designed to be non-blocking by providing sufficient hardware resources. (SONET is the North American equivalent of the SDH transmission standard; a reference here to SDH is intended to be a reference to either SDH or SONET.) For example, a three-stage Clos-type switching structure is made non-blocking by providing at least a certain minimum number of middle stage switches. The cost of a switch is proportional to the number of middle stage switches. 
     Reducing the number of middle switches in the architecture increases the blocking probability. However, if a new connection is initially blocked, it may sometimes be completed by rearranging existing connections. A rearrangement is not allowed to interrupt existing connections. A factor that makes rearranging connections difficult in an SDH signal environment is the multirate and multicast nature of SDH signals. 
     The 155,520 kbit/s Synchronous Transport Module-1 (STM-1) is the basic building block in an SDH network. An STM-1 signal consists of overhead and payload bytes organized in a 125 microsecond frame structure. The information is conditioned for serial transmission on the selected media (e.g. optical fiber) at a rate synchronized to the network. At each network node where the signal is demultiplexed, information is processed byte-by-byte. 
     The STM-1 signal uses a so-called Virtual Container (VC)--an information structure defined by the International Telecommunications Union (ITU)--to serve various Plesiochronous Digital Hierarchy (PDH) data rates. There are several different-capacity virtual containers: a VC-4 signal can transport 139,264 kbit/s; a VC-3 signal can transport either 44,736 kbit/s or 34,368 kbit/s; a VC-2 signal can transport 6,312 kbit/s; and a VC-12 signal can transport 2,048 kbit/s. An STM-1 signal may contain various combinations of different virtual containers, such as a single VC-4, or three VC-3s, or two VC-3s and seven VC-2s. It is perhaps fruitful to liken virtual containers to Russian nesting dolls, to imagine that in an STM-1 signal, lower-capacity virtual containers may be &#34;nested&#34; in larger-capacity virtual containers. 
     Existing SDH Digital Cross-Connect Systems (DCSs) are usually non-blocking or nearly non-blocking, made so by using complex hardware. One kind of architecture often used for such a DCS is a three-stage Clos-type network, made up of three interconnected switching stages: an input stage, middle stage, and output stage. 
     In a general SDH network environment, a cross-connect switching system makes connections that differ in three categories. 
     Unicast or multicast. A unicast connection supports traffic between two endpoints, while a multicast connection supports traffic from one endpoint to a group of endpoints. 
     Unidirectional or bidirectional. In a unidirectional connection, data flows in only one direction: from a source to one or more destinations. In a bidirectional connection, both endpoints serve as both sources and destinations. Multicast connections can only be unidirectional. Bidirectional unicast traffic appears at a switch as two connections, one for each direction. 
     Protected or not protected. In SubNetwork Connection Protection (SNCP), unicast data is sent simultaneously on two disjoint paths. If one of the paths degrades or fails, the data may still be correctly received on the other path. For generality, the point at which the connection splits into two streams or joins back into a single stream can occur within the network and is not restricted to the endpoints. Thus, the connection consists of concatenated segments of single streams and disjoint paths. SNCP connections appear at the switch in one of two forms. If the switch is at a split point, then it must support a connection from one input to two outputs. If the switch is at a merge point, then it must support a connection from two inputs to one output. Some further constraints exist regarding the timing relationship between the two streams, such as that the two streams must be synchronized to allow merging to occur properly. 
     Each stage in a three-stage SDH switching network may have either time, space, or both time and space switching capabilities. An SDH signal is basically time division multiplexing at a byte level. Repositioning virtual containers in the same STM-1 payload is time switching. Moving virtual containers from one STM-1 payload to another is space switching. 
     Several algorithms for rearranging Clos networks are known, e.g., a routing algorithm for rearranging three-stage Clos networks for single-rate unicast traffic. The most relevant existing algorithm for rearranging Clos networks is Paull&#39;s change algorithm. See M. C. Paull, Reswitching of Connection Networks, Bell Syst. Tech. J., vol. 41, pp 833-855, May 1962. In Paull&#39;s change algorithm, when the input requested is in input switch I, and the output requested is in output switch O, the algorithm searches for a middle switch m available for the connection request. Sometimes the link from input switch I to middle switch m, and the link from output switch O to middle switch m are free at the same time. Then no rearrangements of existing connections are required. 
     If there is no middle switch m found, then a rearrangement is necessary. The rearrangement procedure uses two middle switches, A and B, where A is one of the middle switches that is free (unused) from input switch I to a middle stage, but is not free from output switch O to the same middle stage. B is one of the middle switches that is free from output switch O to the middle stage but is not free from input switch I to the middle stage. Freeing up bandwidth through middle switch A or B is possible by swapping some existing connections using middle switch A or B. 
     The existing procedures work only for single-rate unicast traffic, and do not work with multirate SDH switching. It is not possible to directly modify or extend Paull&#39;s change algorithm or any other known algorithm to work with SDH switching. SNCP, a new ITU standardized capability, cannot be implemented inside of existing switching procedures. The SDH multirate signal hierarchy in combination with multicast requirements forecasted in SDH networks do not allow existing procedures to be used. Hardware costs motivate a move toward more complexity in the switching procedure. Desired connection capabilities of SDH unicast unidirectional, unicast bidirectional, unicast unidirectional SNCP, unicast bidirectional SNCP, and multicast render existing procedures highly inefficient or non-functional. 
     SUMMARY OF THE INVENTION 
     The present invention is a procedure for making a new connection in a SONET/SDH digital cross-connect system when no free path through the switching hardware is available, by rearranging existing connections. This switching procedure looks for a path that provides the needed payload capacity for the requested connection, while requiring the least rearrangement of existing connections. All existing payload traffic continues through the digital cross-connect during the rearrangement. 
     The present invention is intended for use where there are insufficient middle switches in the cross-connect to make it non-blocking. In making new connections, the present invention rearranges existing connections without interrupting existing connections (hitless operation), and uses less hardware than existing rearrangement procedures require for the same non-blocking capability. Hitless operation is possible when one middle switch is reserved for rearrangement. 
     It is an object of the present invention to incorporate SNCP functionality into a procedure for SDH (and SONET) switching. Another object of the present invention is to switch as one intact signal structure the various hierarchical data structures of the SDH protocols, thus avoiding having to perform 63 independent switching actions on a VC-4 payload, 21 on a VC-3 payload, and 3 on a VC-2 payload. Another object is to prescribe how to rearrange connections in switching hardware with more than three stages. 
     When a new connection is requested, a search is made to see if there is an available path through the switch. This path hunt is a search for a group of consecutive switching slots that can pass the connection from the requested inputs on the switch to the requested outputs. VC-4, VC-3, VC-2, and VC-12 connections require 63, 21, 3, 1 consecutive time slots, respectively. An alternative to using a group of consecutive slots would be to allow fragmenting the slots, but this is not possible for switching in an SNCP enviromnent, because SNCP requires an intact comparison of the entire signal in the middle stage. So the present invention avoids fragmenting slots. 
     To represent the SDH signal hierarchy, it must be possible to represent all possible legal (properly nested) combinations of payloads in a single STM-1 link. An STM-1 signal can accept one VC-4, three VC-3s, twenty-one VC-2s, sixty-three VC-12s or any legal combination of those four virtual containers yielding the capacity of one STM-1. To represent the particular combination of virtual containers, i.e., to indicate which time slots are used, an STM-1 signal uses a data structure that includes 63 separate storage locations. 
     Instead of the usual 63 storage locations, the present invention uses a hierarchical storage method with a hierarchical data structure having 88 storage locations. Location 0 is reserved to indicate whether the STM-1 signal is being used as a VC-4 entity; locations 1, 2, and 3 are for VC-3s; locations 4 through 24 are for VC-2s; and locations 25 through 87 are for VC-12s. Each of the 88 locations contains a value that represents whether the location is used, not used, or hierarchically used, which means that a larger bandwidth signal, such as a VC-4, is using the bandwidth so that no smaller capacity signal may use it. 
     If a lower level channel C l  is a member of a higher level channel C h , then C l  is said to be under C h . For example, VC-12 channel 25 is under VC-2 channel 4, which is under VC-3 channel 1, which is under VC-4 channel 0. 
     The present invention always begins with a search for a new connection path that does not require rearranging existing connections. The particular combination of VCs making up the new STM-1 signal influences where the procedure begins this initial search. When a new connection is a VC-4 or a VC-3 signal, the search starts at middle switch 0, and moves progressively toward higher numbered middle switches. This procedure continues until a solution is found, or all middle switches up to and including m-1 have been considered. When a new connection is a VC-2 or a VC-12 signal, the search starts at middle switch m-1 and moves progressively toward lower numbered middle switches. If no solution is found, the rearrangement procedure is used to look for a solution. 
     The rearrangement procedure, called the Hierarchical Path Hunt with Rearrangement Algorithm (HPHRA), finds and frees a middle switch A and channel C to allow the new connection. The channel C through middle switch A is denoted A.C. The connections using blocked channels under C are queued. The connections using channels in the queue (A.C A1 , A.C A2 , A.C A3 , . . . , A.C Ak ) must be freed. The procedure needs to find a middle switch B and hierarchy channel C B1  denoted B.C B1  to free A.C A1  in the queue. To find B.C B1 , first the connection using A.C A1  is found. Then, if an available channel exists that can take the connection, the existing connection is moved to B.C B1 . In this case, only one rearrangement of A.C A1  to B.C B1  is required to free A.C A1 . 
     If the procedure cannot find a channel B.C B1  (which is more likely in a more heavily loaded cross-connect), then the channel having the largest available bandwidth, even though it is not sufficient, is used for B.C B1 . In this case, it is possible to need more than one rearrangement in order to make A.C A1  available for the new connection. Several connections using the channels under B.C B1  must be rearranged so that B.C B1  is completely empty, allowing the existing connection on A.C A1  to be moved into B.C B1 . 
     For example, suppose the procedure is searching for an available path for the conflicting connection using channel B.C a  under B.C B1 . Assume the available path is through D.C a . Simply moving the connection from B.C a  to D.C a  can makc B.C a  free. If no such available channel exists, then the existing connection on A.C A1  is moved to B.C B1 , and the used channels under B.C B1  are moved to A.C A1 . 
     Next, the conflicting connection using channel A.C a  under A.C A1  is swapped with B.C b  under B.C B1  by using a proper one-to-one mapping between all channels under A.C A1  and all channels under B.C B1 . The pairs (A.C Ai , B.C Bi ), where i=1, 2, 3, . . . , k, are found and rearranged until the queue is empty, i.e., until the channels A.C A1 , A.C A2 , A.C A3 , . . . , A.C Ak  are all freed. Then A.C is free, and the new connection can be made through middle switch A and channel C. 
     Another object of the present invention is to provide switching service by rearrangement for five kinds of SDH connection: unicast unidirectional with and without SNCP, unicast bidirectional with and without SNCP, and multicast. Still another object of the present invention is to provide switching service by rearrangement for various SDH switching architectures, including a three-stage switch that has both time (T) and space (S) switching capabilities in the first and third stages, and only SNCP selection and space switching in the middle stage: a TS-S-TS switching network. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The above objects and also other objects, advantages and features of the invention will become apparent from the following description, taken in conjunction with the accompanying drawings, which illustrate specific embodiments of the invention. In the drawings: 
     FIG. 1 shows a three-stage Clos network, which is prior art; 
     FIG. 2 shows the hierarchical signal levels of an STM-1 signal according to the present invention; 
     FIG. 3 is a high-level flow-chart of the overall path hunt and rearrangement procedure according to the present invention; and 
     FIG. 4 is a more detailed flow-chart of the path hunt procedure according to the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring now to FIG. 1, a three-stage Clos network with N 1  inlets and N 2  outlets is shown. Each switching module 21 of the first stage, which comprises the first column of switching modules, has n 1  inputs and m outputs, while each switching module 23 in the third stage has m inputs and n 2  outputs. The switching modules 21 and 23 are also called simply input and output switches, and the entire digital cross-connect system 25 is sometimes called simply a switch. The number of input switches, r 1 , and the number of output switches, r 2 , are given by the equations: r 1  =N 1  /n 1 , and r 2  =N 2  /n 2 . 
     There is exactly one link 24 connecting each input switch 21 to each middle switch 22, and exactly one link connecting each middle switch 22 to each output switch 23. The network has r 1  input switches, m of the r 1  ×r 2  middle switches, and r 2  output switches. This type of network is denoted by ν(m, n 1 , r 1 , n 2 , r 2 ). If the network is symmetrical, n=n 1  =n 2 , r=r 1  =r 2 , and n r  =N. A symmetrical network is denoted by the reduced notation ν(m, n, r). 
     Each switching module also has various input and output ports. For example, switch r 1  of the first stage has an input port 26 and output port 24 (which is also an input port for the middle switch m). From the view of the present invention, determining which ports to use is not necessary, because each switching module is built to automatically connect input ports to output ports to meet the higher-level supervision provided, for example, by the present invention. Thus, the present invention is not concerned with determining what input ports to connect to what output ports across a switching module 21 or 23, but it is concerned with which input ports (and time slots) to connect across to output ports on switching module 22. 
     The encoding of an STM-1 signal according to the present invention is shown in FIG. 2. In this 88-byte wide representation, each byte has a value that indicates whether the corresponding time slot is used, not used, or hierarchically used. If a byte other than the byte at location 0 is indicated as being used hierarchically, then a larger bandwidth signal is using the location. For example, the byte at location 0 indicates whether the bytes are to be regarded collectively as a VC-4 level entity (highest capacity payload); and the byte at location 2 indicates whether all of the bytes hierarchically under byte 2 are to be regarded as a single VC-3 level entity. 
     The overall cross-connect procedure 11 of the present invention is shown in FIG. 3. If a new connection request cannot find an available path through the cross-connect by using the path hunt procedure 12, which is shown in more detail in FIG. 4, an attempt to rearrange existing connections must be made. The rearrangement process 13, which is represented in pseudo-code below, moves some existing connections so that the new connection can be made. 
     Referring now to FIG. 4, the path hunt method 12 uses one of four procedures 16, 17, 18, or 19, depending on the level of the virtual container for which a new connection is needed. If the path hunt succeeds, then no rearrangement is required to service the new connection request, and the overall procedure 11 (see FIG. 3) directs, in process 14, that the found connection be made. Otherwise, the rearrangement procedure 13, disclosed below as pseudo-code, is used. If either the rearrangement procedure 13 or the path hunt method 12 is successful, a new connection is made through process 14. If a path cannot be found even through rearrangement, the overall procedure 11 reports blocking, through process 15. 
     The present invention organizes procedures for finding an available path into three algorithms--Hierarchy Path Hunt with Rearrangement Algorithms (HPHRA) I, II, and III--differing in the kinds of connection they provide. In the final rearrangement procedure, one of the three HPHRA algorithms is used to provide the needed connection. HPHRA-I handles the signal hierarchy for unicast connections only. HPHRA-II handles unicast and multicast connections. HPHRA-III provides the same path finding as HPHRA-II, but in the context of SNCP connections. 
     HPHRA-I finds a middle switch A and channel C to free for the new connection. The hierarchical channel C must be of the same VC-type capacity as the connection request. The channel C through middle switch A is denoted as A.C. The connections using the channels that are under C and are not free are queued. The channels in the queue (A.C A1 , A.C A2 , A.C A3 , . . . , A.C Ak ) must be freed. 
     For A.C A1  in the queue, the procedure needs to find a middle switch B and hierarchy channel C B1 , denoted as B.C B1 . To find it, first the connection using A.C A1  is found, and if an available channel that can take the connection in the current state exists, the channel becomes B.C B1 . In this case, only one rearrangement of A.C A1  to B.C B1  is required to make A.C A1  free. If the procedure cannot find such a channel, then the channel that has the largest available bandwidth (even though it is not enough) becomes B.C B1 . In this case, it is possible to need more than one rearrangement to free A.C A1 . 
     Some connections using the channels under A.C A1  and some connections using the channels under B.C B1  in the current state must be rearranged so that A.C A1  is freed. The conflicting channel A.C a  under A.C A1  is swapped with B.C b  under B.C B1  by using a proper one-to-one mapping between all channels under A.C A1  and all channels under B.C B1 . The pairs (A.C Ai , B.C Bi ), where i=1, 2, 3, . . . , k, are found and rearranged until the queue is empty. Then A.C A1 , A.C A2 , A.C.sub. A3 , . . . , A.C Ak  are all free, so that A.C is free, and the new connection can be made through middle switch A and channel C. 
     To prevent extremely long searches, a maximum allowable rearrangement length is specified. The rearrangement length is defined as the number of swappings in the rearrangement process. If the current rearrangement length exceeds the maximum, then this trial is abandoned and another is attempted. 
     Usually more than one A.C is found for the rearrangement process. The A.C are sorted by the availability of bandwidth. The rearrangement process uses the A.C one-by-one until the trials using different A.C exceeds the allowed number of trials. 
     HPHRA-I can also handle a bidirectional unicast connection, since that can be considered two individual unicast connections in an SDH cross-connect. To do this, HPHRA-I is applied in turn to each unicast connection that makes up the bidirectional unicast connection. If one of the two unicast connections in the bidirectional unicast connection is blocked, the entire bidirectional unicast connection is considered blocked. 
     The rearrangement procedure that is the present invention can be expressed in high-level pseudo-code using the following variable definitions: 
     I: the input switch which includes the input port requested; 
     O: the output switches which include the output port destinations; 
     F r  (I): the set of all free A.Cs in row I, where C is a channel in the same level of the traffic type (VC-4/3/2/12) of the connection requested; and 
     F c  (J): the set of all free A.Cs in column J, where C is a channel in the same level of the traffic type (VC-4/3/2/12) of the connection requested. 
     In the pseudo-code, the notation I∩O is used in the usual way, to represent the intersection of the two sets I and O. In particular, the pseudo-code uses the expression 
     F r  (I)∩F c  (O) 
     to represent all available paths entering from the input switch I (which in a two-dimensional representation of the switching problem would be a certain row), passing through the middle stage, and emerging from the output switch O (which in a two-dimensional representation of the switching problem would be a certain column). 
     HPHRA-I can be expressed in high-level pseudo-code. 
     Procedure HPHRA-I; 
     Step 1; 
     Read connection/disconnection request; 
     Step 2; 
     If disconnection is requested 
     Go to Step 5; 
     If connection is requested 
     If connection type is unidirectional unicast 
     Go to Step 3; 
     If A.C is found {Comment: rearrangement process is successful} 
     Go to Step 5; 
     Else {Comment: rearrangement process is unsuccessful} 
     Report Blocking; 
     Go to Step 1; 
     If connection type is bidirectional unicast 
     {Comment: the first unicast of the bidirectional unicast connection} 
     Go to Step 3; 
     If A.C is found 
     {Comment: rearrangement process of the first unicast is successful} 
     Establish the first unicast connection; 
     {Comment: now, the second unicast of the bidirectional unicast} 
     Go to Step 3; 
     If A.C is found 
     {Comment: rearrangement process of the second is successful} 
     Go to Step 5; 
     Else 
     {Comment: rearrangement process of the second is unsuccessful} 
     Remove the first unicast connection; 
     Report Blocking; 
     Go to Step 1; 
     Else 
     {Comment: rearrangement process of the first unicast is unsuccessful} 
     Report Blocking; 
     Go to Step 1; 
     Step 3; 
     Evaluate F r  (I)∩F c  (O) 
     If F r  (I)∩F c  (O) is NOT empty; 
     A.C←Pick one in F r  (I)∩F c  (O); 
     {Comment: packing method is used to find A.C} 
     Else 
     Go Rearrangement --  Unicast; 
     Step 4; 
     If Rearrangement --  Unicast is successful 
     {Comment: the intersection is not empty now} 
     Go to Step 3; 
     Else 
     Go to Step 2; 
     Step 5; 
     Establish connection/disconnection; 
     Go to Step 2; 
     End HPHRA-I. 
     Rearrangement --  Unicast; 
     {Comment: this procedure tries to make A.C free} 
     Step 1; 
     Find MAXX.Ys that have the MAX largest values in |F r  (I)∩F c  (O)|; 
     {Comment: MAX is the maximum number of A.Cs that will be tried} 
     Sort X.Ys by the availability of bandwidth; 
     While MAX&gt;0 
     A.C←first element of sorted X.Ys; 
     Go to Step 2; 
     If rearrangement is successful 
     Return REARRANGED; 
     Else 
     Decrement MAX; 
     Return BLOCKED; 
     {Comment: the set of X.Ys is exhausted, and the rearrangement is still unsuccessful} 
     Step 2; 
     Do Rearrangement --  Row for I; 
     If Rearrangement --  Row is successful 
     Do Rearrangement --  Column for O; 
     If Rearrangement --  Column is successful 
     Report rearrangement is successful; 
     Else 
     {Comment: rearrangement for column was not successful} 
     Report rearrangement failure; 
     Else 
     {Comment: rearrangement for row was not successful} 
     Report rearrangement failure; 
     Go to Step 1; 
     End Rearrangement --  Unicast. 
     Rearrangement --  Row/Rearrangement --  Column; 
     {Comment: this part will be finished when two queues, Needed --  Channels --  Q and SWAP --  Q are empty. Needed --  Channels --  Q has channels that are supposed to be free and SWAP --  Q has rows and columns that will have to be visited to free the hierarchical channels in queue Needed --  Channels --  Q.} 
     Step 1; 
     If Rearrangement --  Row 
     Put all channels (A.C Ak ), k=1, 2, 3, . . . that are under A.C and currently used in row I, in queue Needed --  Channels --  Q; 
     If Rearrangement --  Column 
     Put all channels (A.C Ak ), k=1, 2, 3, . . . , that are under A.C and currently used in column O, in queue Needed --  Channels --  Q; 
     Step 2; 
     If Needed --  Channels --  Q is empty 
     Go to Step 6; 
     Else 
     A.C A  ←first element of Needed --  Channels --  Q; 
     Remove the first element of Needed --  Channels --  Q; 
     If number of swapped connections exceeds maximum rearrangement lengths 
     {Comment: blocking decision is made here} 
     Report Blocking; 
     Go to Step 7; 
     Else 
     Find B.C B  ; 
     Step 3; 
     If A.C A  is a fully available channel for swapping 
     Move the connection using A.C A  with B.C B  ; 
     Else 
     Locate the connection using A.C A  ; 
     Put the location in queue SWAP --  Q; 
     Step 4; 
     If queue SWAP --  Q is empty 
     Go to step 2; 
     Else 
     ROW←The row having A.C A  in the first element of SWAP --  Q; 
     COL←The column having A.C A  in the first element of SWAP --  Q; 
     {Comment: connection in the first element of SWAP --  Q} 
     Remove the first element of SWAP --  Q; 
     Step 5; 
     For all rows 
     For all channels 
     If a connection containing A.C a  in COL that is under A.C A  exists 
     Find B.C b  ; 
     If B.C b  is fully available 
      Move the connection using A.C a  to B.C b  ; 
      {Comment: no ripple effect will occur} 
     Else 
      Move the connection A.C a  to B.C b  ; 
      Locate A.C a  ; 
      {Comment: find ROW and COL for A.C a  } 
      Put the location in SWAP --  Q; 
      {Comment: ripple effect is expected. The conflicting channel is queued in SWAP --  Q.} 
     For all columns 
     For all channels 
     If a connection containing A.C a  in ROW that is under A.C A  exists 
     Find B.C b  ; 
     If B.C b  is fully available 
      Move the connection using A.C a  to B.C b  ; 
      {Comment: no ripple effect will occur} 
     Else 
      Move the connection A.C a  to B.C b  ; 
      Locate A.C a  ; 
      {Comment: find ROW and COL for A.C a  } 
      Put the location in SWAP --  Q; 
      {Comment: ripple effect is expected. The conflicting channel is queued in SWAP --  Q.} 
     Go to Step 4; 
     Step 6; 
     Return that the rearrangement process is successful; 
     Step 7; 
     Return that the rearrangement process has failed; 
     End Rearrangement --  Row/Rearrangement --  Column. 
     Since the unicast connection type is a special case of the multicast connection type, a rearrangement algorithm that can handle the multicast connection type will also handle the unicast connection type. The HPHRA-II procedure can handle unidirectional unicast, bidirectional unicast, and multicast connection types. 
     The idea of HPHRA-II is based on applying HPHRA-I recursively to all output switches that are destinations. A multicast connection type is defined as a connection with a single source and at least two destinations. Sometimes more than one port destination is included in the same output switch, and this connection is also considered a multicast connection type, even though only one output switch is involved. 
     In HPHRA-II, the middle switch A and the channel C are selected by finding the combination that has the greatest free bandwidth between the input switch and all the output switches involved. Step 1 in the procedure Rearrangement --  Multicast of the pseudo-code for HRHPA-II finds this A.C. If there is no A.C between the input switch and all output switches involved, the entire multicast connection is considered blocked. 
     In terms of pseudo-code, the HPHRA-II is shown below. 
     Procedure HPHRA-II; 
     Step 1; 
     Read connection/disconnection request; 
     Step 2; 
     If disconnection is requested 
     Go to Step 5; 
     If connection is requested 
     If connection type is multicast 
     {Comment: unicast is considered as a multicast connection with only one output.} 
     Goto Step 3; 
     If A.C is found comment: rearrangement process is successful 
     Go to Step 5; 
     Else {Comment: rearrangement process is unsuccessful} 
     Report Blocking; 
     Go to Step 1; 
     If connection type is unidirectional unicast 
     Go to Step 3; 
     {Comment: l=1 for a unicast connection} 
     If A.C is found {Comment: rearrangement process is successful} 
     Go to Step 5; 
     Else {Comment: rearrangement process is unsuccessful} 
     Report Blocking; 
     Go to Step 1; 
     If connection type is bidirectional unicast 
     {Comment: the first unicast of the bidirectional unicast connection} 
     Go to Step 3; 
     If A.C is found; 
     {Comment: rearrangement process for the first unicast is successful} 
     Establish the first unicast connection; 
     {Comment: the second unicast of the bidirectional unicast} 
     Go to Step 3; 
     If A.C is found; 
     {Comment: rearrangement process for the second is successful} 
      Go to Step 5; 
     Else 
     {Comment: rearrangement process of the second is unsuccessful} 
      Remove the first unicast connection; 
      Report Blocking; 
      Go to Step 1; 
     Else 
     {Comment: rearrangement process of the first unicast is unsuccessful} 
     Report Blocking; 
     Go to Step 1; 
     Step 3; 
     Evaluate F r  (I)∩F c  (O k ) for all k=1, 2, 3, . . . , l where l is the number of output switches in the destinations; 
     If F r  (I)∩F c  (O k ) is NOT empty 
     A.C←Pick one in F r  (I)∩F c  (O k ); 
     {Comment: packing method is used to find A.C} 
     Go to Step 5; 
     Else 
     {Comment: The intersection is empty} 
     Go Rearrangement --  Multicast; 
     Step 4; 
     If rearrangement process is successful 
     {Comment: the intersection is not empty now} 
     Go to Step 3; 
     Else 
     Go to Step 2; 
     Step 5; 
     Establish connection/disconnection; 
     Go to Step 2; 
     End HPHRA-II. 
     Rearrangement --  Multicast; 
     Step 1; 
     Find A.C which has the largest value in |F r  (I)∩F c  (O k )| where k=1, 2, 3, . . . , l.; 
     {Comment: l is the number of output switches involved in the destination.} 
     Step 2; 
     Do Rearrangement --  Row for I; 
     {Comment: Rearrangement --  Row is in HPHRA-I} 
     If Rearrangement --  Row is successful 
     k=1; 
     While (k&lt;l+1) 
     Do Rearrangement --  Column for O k  ; 
     {Comment: Rearrangement --  Column is in HPHRA-I} 
     If Rearrangement --  Column is successful 
     Increment k; 
     Else 
     {Comment: rearrangement process has failed} 
     k=l+1; 
     If Rearrangement --  Column for all output switches involved in the destination is successful 
     Return rearrangement is successful; 
     Else 
     {Comment: rearrangement for the column(s) was not successful} 
     Return rearrangement failure; 
     Else 
     {Comment: Rearrangement --  Row for I has failed} 
     Return rearrangement failure; 
     End Rearrangement --  Multicast. 
     To provide SNCP service, unicast data can be sent simultaneously on two disjoint paths. If one path experiences failure, the data may still be received correctly on the other path. For generality, the point at which the connection splits into two copies or joins back into a single copy can occur anywhere within the network. 
     SNCP connections appear at the switch in one of two forms. If the switch is at a split point, then it must support a connection from one input to two outputs. If the switch is at a merge point, then it must support a connection from two inputs to one output. The merge of the two copies occurs in the middle stage switch. This means the two copies are compared in the middle switch. After the comparison, one copy, which is usually free from errors, is chosen and proceeds to an output stage switch. The inverse procedure, the splitting (copying) also occurs in the middle stage switch. The two copies are connected to output stage destinations. No comparison of the two copies is made in the splitting operation. 
     To make building hardware practical, some further constraints are imposed regarding the timing relationship between the two copies. There are three cases allowed in the timing relationships. Case 1 uses the same channel n (but different input stage switch to middle stage switch connection) for the two copies A and B. Case 2 and case 3 use different channels for the two copies, but the channels used must be adjacent to each other. 
     In a three-stage Clos network, two input ports and one output port are involved in making a 2×1 SNCP connection. The input switches with the input ports involved in the switching are represented by I 1 , and I 2 . If the input ports involved are on the same input switch, then I 1  is equal to I 2 . Then, case 1 is invalid, because the two copies cannot share the same channel. The output switch O contains the output port involved in the 2×1 SNCP connection. 
     Case 1 means that the link between input switch I 1  and a middle switch M, the link between I 2  and the middle switch M, and the link between the middle switch M and output switch O use the same channel n for a connection. If the link between input switch I 1  and middle switch M uses n and the link between input switch I 2  and middle switch M uses n+1 for the connection, the connection corresponds to a case 2 type timing relationship. If the link between input switch I 1  and middle switch M uses n+1 and the link between input switch I 2  and middle switch M uses n, the connection corresponds to a case 3 type timing relationship. These are the case classifications used in HPHRA-III. 
     HPHRA-I and HPHRA-II do not have rearrangement capability for 2×1 SNCP connections. The 1×2 SNCP connection can be handled by HPHRA-II, because the connection can be treated as a 1×2 multicast connection. There is no difference between the 1×2 SNCP connection type and a 1×2 multicast connection type if the legs branch out in the middle stage switch. However, since the 2×1 SNCP connections have a different format, the previous rearrangement algorithm cannot handle the 2×1 SNCP connection types. The two input ports should be connected to the same middle switch so that the two copies can be compared. Furthermore, to build practical hardware, allowable channel usages must be organized into the three cases described above. The choice of timing among the three different cases is applied to both the path hunt and the rearrangement process. 
     In terms of pseudo-code, the overall procedure for the Hierarchical Path Hunt with Rearrangement for SNCP (HPHRA-III) is as shown below. 
     Procedure HPHRA-III; 
     Step 1; 
     Read connection/disconnection request; 
     Step 2; 
     If connection is requested 
     If connection type is multicast, unidirectional unicast, bidirectional unicast, 
     1×2 SNCP 
     Use HPHRA-II; 
     If connection type is SNCP 2×1 
     Use Rearrangement --  2×1 --  SNCP; 
     If connection type is bidirectional SNCP connection 
     Use HPHRA-I for 1×2 SNCP connection; 
     If successful 
     Go to Rearrangement --  2×1 --  SNCP; 
     If NOT successful 
     Remove the 1×2 SNCP connection; 
     End HPHRA-III. 
     Rearrangement --  2×1 --  SNCP, 
     Comment: the rearrangement of SNCP follows the trials in order. If the current trial is completed successfully, then the algorithm stops and reports the rearrangement is successful. Otherwise the next trial will be attempted. If all trials failed, blocking is reported.; 
     Step 1; 
     While trials are not exhausted and the current trial has failed 
     If Trial 1 
     Find A.C which has the most available bandwidth in I 1  ∩I 2  ∩O; 
     If Trial 2 or Trial 3 
     Find A.C which has the most available bandwidth in I 1  ∩O; 
     If Trial 4 or Trial 5 
     Find A.C which has the most available bandwidth in I 2  ∩O; 
     {Comment: A.C is the desired channel for rearrangement process for 2×1 SNCP} 
     Go to Step 2; 
     If rearrangements are successful 
     Report REARRANGED; 
     Else 
     Report BLOCKED; 
     Step 2; 
     If Trial 1 or Trial 2 or Trial 4 
     Rearrangement --  Row for I 1  with A.C; 
     If successful 
     Rearrangement --  Row for I 2  with A.C; 
     If successful 
     Rearrangement --  Column for O with A.C; 
     If Trial 3 
     Rearrangement --  Row for I 1  with A.C; 
     If successful 
     Rearrangement --  Row for I 2  with A.C+1; 
     If successful 
      Rearrangement --  Column for O with A.C; 
     If Trial 5 
     Rearrangement --  Row for I 2  with A.C; 
     If successful 
     Rearrangement --  Row for I 1  with A.C+1; 
     If successful 
      Rearrangement --  Column for O with A.C; 
     Go to Step 1; 
     End Rearrangement --  2×1 --  SNCP. 
     The five different trials shown in the procedure Rearrangement --  2×1 --  SNCP above are explained below: 
     Trial 1: The middle switch A and channel C with the most available bandwidth in I 1  ∩I 2  ∩O are found. After finding A.C, use rearrangement for row I 1  with the desired channel A.C. If successful, then the rearrangement for row I 2  is attempted with the same A.C. Rearrangement for the column is only attempted if the rearrangement for row I 2  is successful. If the rearrangements are completed, then channel C is free from the input switches I 1  and I 2  to output switch O through the middle switch A. The timing relationship of the channels used in the connection correspond to a case 1 type timing relationship. 
     Trial 2: Attempted only if trial 1 fails. In this trial, the middle switch A and channel C, which have the most available bandwidth in I 1  ∩O, is used. I 2  is not considered in selecting A.C. Except for the procedure for finding A.C, this trial is same as trial 1. The timing relationship is a case 1 type timing relationship. 
     Trial 3: Attempted only if trial 1 and trial 2 failed. The rearrangement for row I 1  tries to make A.C, which was found in trial 2, free. If successful, the rearrangement for row I 2  will try to make A.C+1 free. C+1 is the adjacent channel of C. The timing relationship of the channels used in this connection corresponds to a case 2 type timing relationship. 
     Trial 4: Attempted only if trial 1, 2, and 3 failed. A.C is the middle switch and channel which has the most available bandwidth in I 2  ∩O. I 1  is not considered in selecting A.C. Except for the procedure for finding A.C, this trial is same as trial 1 and 2. The timing relationship in this trial is a type timing case 1 relationship. 
     Trial 5: Attempted only if trail 1, 2, 3, and 4 failed. This trial is similar to Trial 3. Rearrangement for I 1  is attempted with A.C+1 and rearrangement for I 2  is attempted with A.C which was found in trial 4. The timing relationship is a case 3 type timing relationship. 
     Although the invention has been shown and described with respect to a best mode embodiment thereof, it should be understood by those skilled in the art that the foregoing and various other changes, omissions and additions in the form and detail thereof may be made therein without departing from the spirit and scope of the invention. The invention includes a cross-connect 25 embodying the above methodology.