Method for accessing data in a table and its application to the routing of data between remote stations

Abstract: The present invention relates to the accessing data in tables and its application to apparatus for providing a communication bridge interconnecting two or more local area networks (LAN). A LAN (1) is connected to another LAN 2 by means of a bridge generally designated by the numeral (3). Input buffers (11, 21) forward packet headers of received data packets through to a routing engine (5). The routing engine (5) contains one or more routing tables each having a plurality of table locations containing table data in the form of station addresses and routing data. The table is accessed by applying a hashing algorithm to a received destination address contained in the data packet to determine the table location and then checking that the station address retrieved from the table location corresponds with the destination address in the received data packet. If the table location is empty or the destination address does not match the station address, the data packet is forwarded to all interconnected LANs. Otherwise, the data packet is forwarded according to the retrieved routing data. Embodiments are described wherein the table locations are over-written by applying the hashing algorithm to the source address of a received data packet and writing in at the resultant table location the source address and routing information of the received data packet. A time stamp can also be written at this time so that obsolete data entries are not employed for routing.

Description: This invention relates to the accessing of data held in table locations. The invention has application to a method and apparatus for controlling the routing of data between remotely located stations. The invention has particular, but not exclusive application to routing data between two or more local area networks. Local area networks (LANS) enable local communication among computing stations and computer related devices. As a LAN installation grows, bridges are employed to interconnect LANS so as to allow stations connected to different LANS to communicate as if both stations were on the same LAN. Thus, a bridge is an N port device, where N is equal to or greater than 2. Considerable work has been expended on so called transparent interconnection of LANS with bridges. For example, the paper "Transparent Interconnection of Local Area Networks with Bridges" (J Telecomm Networks Vol 3 pp 116 - 130, Summer 1984) discloses a bridge wherein each bridge independently constructs and maintains its own routing database. The routing database contains one entry for each station address the bridge knows together with appropriate routing data. Each entry also contains an age field or time stamp. When the time stamp is too old the entry is deleted, thus obsolete entries are reduced. Forwarding a data packet (frame) received by a bridge from a LAN requires looking up the destination in the routing data base of the bridge. If the bridge finds the destination address, it employs the routing data to forward the data packet to the indicated LAN unless that LAN was the source for the data packet. If the destination is not found, the data packet is broadcast on or forwarded to all the LAN connections with the bridge except the one on which it was received. Whenever the forwarding process uses a database entry it resets the particular time stamp. It is known to employ hashing techniques in such arrangements. A hash table comprises applying an algorithm to data in order to define the table location or position of the hash table into which selected data is written. To retrieve the data, the hash algorithm is applied to the search item. As is known, applying a hash algorithm can produce an event termed "a collision" wherein items hash to the same location in the table, these are called synonyms. In the event of a collision, the synonym is placed elsewhere. This is achieved by secondary probing in which a series of table locations are searched until an empty one is found. Similarly, on retrieval, a process of secondary probing is employed to access the table location in the event that the first location contains an entry for a different address. One known arrangement which employs hashing is described in an article entitled "The Design and Implementation of a Transparent MAN/LAN Gateway", by De Grandi, G.; Garrett, M.W.; Albanese, A.; Lee, T.H. CEC JRC, Ispra, Italy; Editors Fasano, D.; Kennelly, C.; Polishuk, P., EFOC/LAN 86 Proceedings. Papers presented at: The Fourth Annual European Fibre Optical Communications and Local Area Networks Exposition 146-51 1986, 27-27 June 1986, Amsterdam, Netherlands, Publ: Inf. Gatekeepers, Boston, MA, USA. In this arrangement a data packet has destination and source addresses and is filtered by hashing a 48 bit address field into 14 bits and pointing into table of 16, 384 entries, each of 1 bit. This table contains a "1" for each host belonging to the local population. The table is updated according to the information in the source address field of the packets coming into the bridge from the local LAN. These packets are processed in that the source address is hashed and the results placed in an interprocessor communication port. This port is then read to set the appropriate bits in the 16 kilobit table. As technology has progressed, it has been possible to increase the speed of the LANS and still employ the aforementioned bridges. As this speed increases, each accessing of the routing data for the processing of each data packet needs to take place within a shorter and shorter predetermined bounded frame time. However, the aforementioned bridges have a time limit within which to process a data packet. For example, it has been found that with bridges employing hash algorithms, when collisions in the hash table occur and secondary probing must be employed, it is difficult to finish the processing of a data packet within the frame time. A possible solution to this problem is to employ content addressable memories. Such memories are discussed in the article "Transparent Interconnections of Broadcast Networks" by W D Sincoskie (1986 International Zurich Seminar on Digital Communications). In this document, there is disclosed a drop filter which can insert a source address and look up a destination address in the minimum packet interarrival time. As stated therein, the fastest content addressable memory (CAM) is one in which each memory cell in the drop filter incorporates an exclusive-OR gate. A scheme is recommended where the entries in the drop set are timed and entries which have not been reinforced by another packet from the host in a certain maximum time T are dropped. Unfortunately, content addressable memories are a specialist item and are complicated. Consequently, they are expensive. Furthermore, estimates need to be made of the number of locations needed in a CAM when a LAN network is being constructed. Thus, there can come a time when it is necessary to delete some addresses in the CAM as it becomes overloaded. Finally, another problem which also applies to the aforementioned bridges, is that although the techniques apply easily to the interconnection of two local area networks, it is difficult to generalise the process parameters to connecting three or more local area networks. An article "Efficient local area network interconnection using a bridge" by F. Akashi et al., in Proceedings Compcon 84 Fall, Sept. 84, Arlington, Virginia U.S. p. 333-340 describes an example of a bridge for interconnecting LAN's which makes use of a hash algorithm. The present invention relates to a method of accessing data in table locations which has application in overcoming the aforementioned problems. In one form of the present invention station addresses are stored in a routing table and data packets for routing are received at the table. Each data packet includes an address indicative of its destination station. A hashing algorithm is applied to the address to access table locations to retrieve routing data for the packet. The technique allows only a restricted number of hash probes. If no corresponding station address is found the packet is forwarded on to all possible routes. If no corresponding address is found the packet is forwarded according to the retrieved routing data. This technique of limited or restricted hashing has been developed in connection with LAN's, but it has wider application in the transmission of data packets and other fields. According to one aspect of the present invention there is provided a method for controlling the routing of data packets between stations where the route for transmission of the packets needs to be determined, the data packets including a destination address indicative of the station to which the packet is to be routed, the method comprising the steps of:- storing table data at table locations of a routing table or tables, the table data comprising station addresses together with the respective routing data; receiving data packets at a routing table; applying a hashing algorithm to the destination address of a data packet when received and on the basis thereof accessing a said table location to retrieve routing data and said station address therefrom; and characterised by, after one or a predefined limited number of hash probes, forwarding the data packet onto all or a given number of routes if the accessed table location is empty or does not contain a station address corresponding to said data packet destination address, or, in the event that the addresses correspond forwarding the data packet according to the retrieved routing data. In one form of the invention the number of hash probes is one. In one embodiment the method provides a communication bridge to route data packets between two or more Local Area Networks (LANs). By allowing only a limited number of hash probes which number can be one, it is possible to ensure that the processing time of a received data package will fall within the predetermined bounded frame time. In particular, the aforementioned method can process data packets very quickly compared with the hitherto known methods. Although collisions will occur, the result is only some unnecessary broadcast traffic. This can be reduced as much as required but only at the cost of hardware replication. Otherwise, it can be seen that the method will degrade gracefully as the number of addresses in the table increases. Even then, the method ensures that data packets are transferred and degradation is seen as an increasing number of packets which are spuriously transferred across the bridge. A further advantage of the present invention is that it does not require large content addressable memories to be built but instead relies on stock memory parts and modest custom integrated circuits for hashing. Finally, the application of the method can be generalised effectively to interconnection of more than two local area networks. In a preferred embodiment of the invention, the step of storing said table data includes the step of overwriting table locations with table data contained in a received data packet, the table location being selected by applying said hashing algorithm to said source address of the data packet when received, and if the table location is empty or the source address of the received packet corresponds to the existing station address in the table location entering a station address together with routing information into said table location, said station address being the source address of the received packet, or if the source address of the received packet does not correspond to the station address of the table location entering a station address together with routing information into a table location after said predefined number of hash probes, said station address being the source address of the received packet. Thus, an updating method can be provided wherein addresses of stations on a local area network are learnt. Thus in an embodiment in accordance with the present invention, each packet sent across a network has two addresses, a source address indicative of the station sending the packet and a destination address indicative of the station to which the packet is to be sent. The bridge which interconnects the network includes a routing table which is built-up by looking at the source address of the packets to form a plurality of station addresses, each of which has associated routing data. The bridge operates to route each packet according to its destination address. When the bridge sees a packet on any of the networks to which it is connected it compares the destination address in the packet with the station address at a table location and routes the packet accordingly. The bridge then uses the source address in the packet as the station address in a new routing table entry. The route in the new table entry indicates on which LAN the packet arrived. According to another aspect of the present invention there is provided apparatus for controlling the routing of data packets between stations where the route for transmission of the packet needs to be determined, the data packets including a destination address indicative of the station to which the packet is to be routed, the apparatus comprising means providing a routing table in which are stored table data at table locations thereof, the table data comprising station addresses together with the respective routing data; and hashing means to apply a hashing algorithm to the destination address of a received data packet and accessing a said table location on the basis thereof to retrieve the routing data and said station address therefrom; characterised in that the apparatus includes routing means operative, after one or a predefined limited number of hash probes, to forward the data packet onto all or a given number of routes if the accessed table location is empty or does not contain a station address corresponding to the destination address of the received data packet, or, in the event that the addresses correspond forwarding the data packet according to the retrieved routing data. The limited number of hash probes may be one. Preferably, the apparatus includes a plurality of routing tables wherein a plurality of routing tables are connected in parallel; and a plurality of hashing means are provided, each connected to a respective routing table for employing an independent hashing algorithm to retrieve table data. By employing a plurality of tables with independent hash algorithms, it is possible to reduce the probability of table collisions. Thus, this embodiment expands the applications of the bridge of the present invention and also improves the perfomance thereof. In one embodiment the apparatus provides a communication bridge to route data packets between two or more Local Area Networks (LAN's). Preferably, each packet includes a source address and the or each routing table has a respective writing means wherein the or each routing table has a respective writing means operative to apply the table hashing algorithm to the source address of a received data packet and, on the basis thereof, if the table location is empty or the source address of the received packet corresponds to the existing station address in the selected location, entering a station address together with routing information into said table location, said station address being the source address of the received packet, or if the source address of the received packet does not correspond to the station address of the selected table location, entering a station address together with routing information into a table location after said predefined number of hash probes, said station address being the source address of the received data packet. Consequently, this form of the apparatus can learn addresses of stations on the respective local area networks. Conveniently, each table location includes a time stamp and said routing means is also operative to forward the data packets onto the local area networks if the date stamp of a retrieved table location is at least a predetermined time ago. Thus, the time stamp with the present invention is an indication of how recently the table data was provided and thus how reliable the information is. This differs from the prior art wherein the time stamp is normally updated whenever table data is accessed. The apparatus has the advantages that it can be generalised easily to function for example in the interconnection of more than two local area networks. At the same time, the apparatus provides high speed processing of received data packets so that the bounded time frame in which packets must be processed can be shortened compared with hitherto known systems. As mentioned above, the apparatus functions to ensure that data packets do cross the bridge notwithstanding the fact that collisions may occur from the routing table as a result of use of the hashing algorithm. Thus, it has been recognised that full secondary probing of the table is not in fact necessary. Examples of the present invention will now be described with reference to the accompanying drawings, in which:- Figure 1 illustrates a first embodiment of the present invention, Figure 2 illustrates control functions of the routing engine shown in Figure 1, Figure 3 illustrates a flow diagram for operation of the routing engine, Figure 4 illustrates an improved embodiment of the present invention. Referring to Figure 1, a local area network (LAN) 1 is connected to another local area network 2 by means of a bridge generally designated by the numeral 3. The bridge functions to route the flow of data packets between the LANs 1 and 2. The bridge 3 has input buffers 11 and 21 connected to local area networks 1 and 2 respectively. Each input buffer sends the whole of a received packet to a routing switch 12 and 22 respectively whilst at the same time, the so called packet header of each received data packet, which contains an identification of the local area network, a source address and destination address, is forwarded to an arbitration logic control 4. The logic control 4 dictates when the packet header is forwarded through to a routing engine 5 which decides whether to actuate a control line 13 or 23 connected respectively to the control switches 12 and 22. In the event that the signal is given on line 13, the whole packet from buffer 11 passes through the switch 12 to an output buffer 14 connected to the local area network 2. In the event that the signal is present on the line 23, then the signal from the input buffer 21 passes through the switch 22 to an output buffer 24 connected to local are network 1. Thus it can be seen that the routing engine decides whether received data packets, either on input buffer 11 or 21, are forwarded to the "other" local area network to which the bridge 3 is connected. Referring to Figures 2 and 3, the routing engine 5 has a routing table 31. The packet header received from the arbitration logic control 4 is observed on a bus 32 in order to determine the source address, the destination address and the local area network as shown in box 33 and step 40 in Figure 3. It will be apparent that a clock 34 applies a time stamp to the source and destination information. The data in box 33 is then forwarded to a hashing means 34 which applies a hash algorithm to the destination address. The resultant signal on line 35 decides upon the table location which will be accessed to retrieve table data therefrom. A control unit 36 having detected receipt of a data packet provides a signal on line 37 to the table to ensure that the table status is for reading. The contents at the particular table location are relayed to a comparator 38 which then carries out the steps 41, 42 and 43 shown in Figure 3. Essentially, the comparator 38 firstly establishes whether the table location contains any data, secondly whether the data time stamp has timed out, and thirdly whether the route data equals the local area network from which the data packet has arrived. It can be seen that the step 41 also effectively establishes that the station address contained at a particular table location matches the destintation of the address which has been relayed from the box 33. According to the result of the steps 41, 42 and 43, the control 36 issues an appropriate signal on lines 13 and/or 23 to transfer the data packet from input buffer 11 or 21 to the respective output buffers 14 and/or 24. In the event that the table location holds an address different from the current address in table 33, then a hash table collision has occured. As it is not apparent whether the destination address should be in the routing table 31 or not, the comparator 38 forwards a signal to control 36 which implements a protocol that the data packet is forwarded to all connected LANs. If the routing table has H times as many locations as addresses that have been used in the aforementioned time out period, then the collision situation should occur on only about 1/H occassions. The situation is only likely to be a problem when two or more live addresses are competing for the same location. As can be seen from Figure 3, a final step 44 is incorporated wherein the source address and routing data contained in box 33 is forwarded to the hashing means 34 which applies the hashing algorithm to the source address to define the table location in the table 31 into which the source address, routing data and time stamp are inserted. It should be noted that although the source address is written into the table, it is considered a destination address when retrieved as table data. The table should have several times (H) as many table locations as the number of addresses the bridge is expected to hold. Furthermore, it is preferable that there is an even spread of data entries in the table. It will be apparent that for step 44 to occur, the control unit 36 places an appropriate signal on line 37 to put the table 31 into the write mode. In summary, the table 31 stores source addresses and routing information and a time stamp at a table location which is defined by a hashing algorithm applied to the source address. Thus, the time stamp in a table location is only up dated when over written on receipt of the same source address. Consequently, the time stamp in the present embodiment is an indication of how recently the address and route information at the table location was provided and thus how reliable the information is. The embodiment described above is arranged to forward a data packet after a single hash probe. It should be appreciated that arrangements in accordance with the invention are contemplated where more than one (up to a predefined limited number) hash probe is possible provided processing time permits. Such arrangements do not constitute full secondary probing. The embodiment described with reference to Figures 1 to 3 incorporates a single routing table 31 within the routing engine 5. However, as shown in figure 4, a plurality of parallel connected routing engines can be employed. Components common to Figures 4 and 1 bear the same reference numerals. Generalising Figure 4, there are N parallel tables with independent hashing algorithms defining table locations within a respective routing table. Thus, table data is written into all the tables in parallel but with table locations defined by the respective hashing algorithm Thus, it is only necessary for an address to be searched for until it is found in just one of the tables. Consequently, whereas the collision problem mentioned above may occur in about 1/H occassions, in the present embodiment then such a situation should only arise in 1/H N occassions as opposed to 1/H.N if a single table of HN entries was formed. To clarify the above, consider some sample numbers:- If the time stamp is incremented every second, then time statement values would be used every 18 hours approximately. Consequently, a back ground process to remove all out dated entries before their time stamp values are reused would be needed, otherwise old entries would be reincarnated and could cause packets to be dropped erronously. Of course, although the time stamp is a preferred feature, it is not essential. The present arrangement has a number of advantages over the use of content addressable memories. The present arrangement would degrade slowly as the number of addresses increases, with degradation being seen as an increasing number of packets which are spuriously communicated across the bridge. The absolute maximum address capacity will be many times the target address capacity for a realistic implementation. Finally, the present arrangement does not require large content addressable memories to be built and can instead rely on stock memory parts and modest custom hashing, integrated circuits. The invention has been described above in connection with a bridge for interconnecting LANs. It is believed that the concept of accessing data in a table using restricted or limited hashing is both novel and inventive. In such a method a datum is accessed from data which has been stored in table at table locations determined by applying one or more hashing algorithms to at least a part of the datum. The datum is then accessed by applying the hashing algorithm to the said part to access a table location. The datum part from the table location is compared with the part from the datum being accessed. If they correspond the datum is retrieved. If they do not the method can permit further table accesses using a hashing algorithm to try to find corresponding datum parts. The total number of accesses allowed is limited to a predefined maximum number which may be one or more. If a corresponding datum part is not found in the maximum allowed number of accesses the method is discontinued. The method can be used where there are a predefined number of table accesses that need to be made to access any datum and where there is a finite probability of failing to access a datum that has been entered into the table. Another example of the use of the invention is in a dual bus communication network in which all communicating stations are connected together by two buses, each unidirectional. Thus if a station A is to communicate with another station B, it must send its message on the bus which carries traffic in the direction from A to B. In a simple implementation, station A could transmit its message on both buses to be sure of reaching station B. However, this causes half of the potential communication capacity to be wasted. A more efficient approach is for each station to maintain a list of stations on the network, and for each station to record the bus to be used in transmitting to that station. This function would be carried out by the MAC (Media Access Control) layer of the protocol stack. This list of stations is indexed with the address of the destination station, which could contain up to 60 bits for an E.164 format address. The table needs to return a found/not found indication, and a single bit indicating which of two buses is to be used. If a station is not found in the table, both buses are used. This arrangement has the following characteristics which make the single or limited probe hashing a suitable technique. 1. The hardware should be cheap, as it needs to appear in every station on the network. This suggests that a Content Addressable Memory might not be an attractive solution. 2. The address space of up to 60 bits is sparsely populated. It is unlikely that a station would have to record data for more than 1000 stations. 3. It is not important that every entry in the table is found, as the penalty for "lost entries" is some spurious transmission which would usually be limited to the local network only. The loss of 1 entry in 64 might be quite acceptable for instance. 4. The table search has to occur in a bounded time, but it is not clear that this time is going to be painfully short. So it might well be attractive to use up to a fixed number of probes into a single table rather than have several parallel tables. Deletion of entries from such a table could cause existing entries to be "lost", but they would be re-incarnated when the station concerned was next used. The table could be filled with data by an algorithm designed for this purpose being run when the network is powered up. Alternatively the table could be maintained by the MAC hardware observing the source addresses of packets on the network in order to determine the location of other stations.

Claims: A method for controlling the routing of data packets between stations where the route for transmission of the packets needs to be determined, the data packets including a destination address indicative of the station to which the packet is to be routed, the method comprising the steps of:- storing table data at table locations of a routing table or tables, the table data comprising station addresses together with the respective routing data; receiving data packets at a routing table; applying a hashing algorithm to the destination address of a data packet when received and on the basis thereof accessing a said table location to retrieve routing data and said station address therefrom; and being characterised by, after one or a predefined limited number of hash probes, forwarding the data packet onto all or a given number of routes if the accessed table location is empty or does not contain a station address corresponding to said data packet destination address, or, in the event that the addresses correspond forwarding the data packet according to the retrieved routing data. A method as claimed in claim 1 wherein said limited number is one. A method as claimed in claim 1 or claim 2 wherein the step of storing said table data includes the step of over-writing table locations with data derived from a received data packet, each of which also includes a source address indicative of the source station, the table location being selected by applying said hashing algorithm to the source address of the data packet when received, and if the table location is empty or the source address of the received packet corresponds to the existing station address in the table location, entering a station address together with routing information into said table location, said station address being the source address of the received packet, or if the source address of the received packet does not correspond to the station address of the table location, entering a station address together with routing information into a table location after said predefined number of hash probes, said station address being the source address of the received packet. A method as claimed in any one of claims 1 to 3 which provides a communication bridge to route data packets containing a source address and destination address, the bridge interconnecting two or more Local Area Networks (LAN's) in which the stations have unique addresses wherein after said predefined limited number of hash probes the data packet is forwarded onto all LAN's other than the one from which the packet was received if the accessed table location is empty or does not contain a said corresponding station address. Apparatus for controlling the routing of data packets between stations where the route for transmission of the packet needs to be determined, the data packets including a destination address indicative of the station to which the packet is to be routed, the apparatus comprising means providing a routing table (31) in which are stored table data at table locations thereof, the table data comprising station addresses together with the respective routing data; and hashing means (34) to apply a hashing algorithm to the destination address of a received data packet and accessing a said table location on the basis thereof to retrieve the routing data and said station address therefrom; characterised in that the apparatus includes routing means (5) operative, after one or a predefined limited number of hash probes, to forward the data packet onto all or a given number of routes if the accessed table location is empty or does not contain a station address corresponding to the destination address of the received data packet, or, in the event that the addresses correspond forwarding the data packet according to the retrieved routing data. Apparatus as claimed in claim 5 wherein said limited number is one. Apparatus as claimed in claim 5 or claim 6 wherein a plurality of routing tables (31) are connected in parallel; and a plurality of hashing means (34) are provided, each connected to a respective routing table for employing an independent hashing algorithm to retrieve table data. Apparatus as claimed in any one of claims 5 to 7 wherein each packet includes a source address and the or each routing table has a respective writing means operative to apply the table hashing algorithm to the source address of a received data packet and, on the basis thereof, if the table location is empty or the source address of the received packet corresponds to the existing station address in the selected location, entering a station address together with routing information into said table location, said station address being the source address of the received packet, or if the source address of the received packet does not correspond to the station address of the selected table location, entering a station address together with routing information into a table location after said predefined number of hash probes, said station address being the source address of the received data packet. Apparatus as claimed in any one of claims 5 to 8 wherein the apparatus provides communication bridges (3) to route data packets containing a source address and a destination address, the bridge interconnecting two or more Local Area Networks (LAN's) (1, 2) in which the stations have unique address, and wherein after said predefined limited number of hash probes the data packet is forwarded onto all LAN's other than the one from which the packet was received if the accessed table location is empty or does not contain a said corresponding station address. Apparatus as claimed in claim 8 or claim 9 wherein each written table location includes a time stamp and said routing means is also operative to forward the data packet onto the LANs if the date stamp of a retreived table location is at least a predetermined time ago.

Inventors: MARSHALL ALAN DAVID, MARSHALL, ALAN DAVID
Applicants: HEWLETT PACKARD CO, HEWLETT-PACKARD COMPANY
Application year: 1989
Main classification: H04L12
IPC codes: H04L12