Abstract:
A desired static route is read from a static routing table and a polling is effected on a network connected to a terminal at regular intervals. If a normal response is issued from the network, then information about the above static route is entered in a routing table. If no normal response is delivered from the network, then the information about the static routes entered in the routing table is deleted.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a static routing system suitable for use in a local-area network (LAN) system. 
     2. Description of the Prior Art 
     A dynamic routing system such as a RIP (Routing Information Protocol) or the like has heretofore for the most part been used in each of terminals connected to a LAN. In this type of dynamic routing system, a routing table is automatically entered, changed and deleted by transferring routing information between the terminals to thereby ensure communications with a network. When a failure occurs in the network, the entry of the network in the routing table, which is unable to communicate with its corresponding terminal, is erased. Therefore, when a user attempts to communicate with the network, the terminal displays a message such as a &#34;network unreachable&#34; message or the like, which is indicative of a failure to communicate with the network. 
     However, a static routing system for statically entering a routing table is often used as an alternative to the dynamic routing system because of the demand for security measures taken against unauthorized access or the like. 
     The conventional static routing system is different from the dynamic routing system in that the routing table is not automatically entered, changed and deleted and communications with the network are not ensured. Thus, even when a failure occurs in a network and a terminal is unable to communicate with the network in which a static route has been entered, the entry of the static route in the network in the routing table remains therein. Therefore, even if the terminal does not display the message indicative of the failure to communicate with the network and the network is actually disconnected from the terminal, the terminal continues to send a packet to the network and a communication request is forcibly cut off depending on a lapse of a time-out period set by the terminal. 
     The aforementioned conventional static routing system is accompanied by problems that when the terminal is unable to communicate with the network entered due to the network failure as against the network to which the static route has been set, the network to communicate with the terminal must wait for the time-out of the terminal, and this reduces the operability of the network. 
     SUMMARY OF THE INVENTION 
     With the foregoing in view, it is an object of the present invention to provide a static routing system capable of avoiding a reduction in operability of a network even if the network to which a static route has been set, fails to communicate due to a network malfunction. 
     According to one aspect of the invention, for achieving the above object, there is provided a static routing system comprising: 
     a routing table operated for effecting routing to other device connected to a local-area network; 
     an application program for polling the local-area network; 
     a static routing table in which are entered static routes including an address for a network to be routed and a time interval required to perform a polling; 
     a timer; and 
     controlling means for reading a desired static route from the static routing table and starting the application program so as to poll a corresponding network each time a lapse of a predetermined time is reported from the timer, entering the static route in the routing table when a normal response is sent back from the network and deleting the static route from the routing table when the normal response is not sent back from the network. 
     According to the present invention, a static route can be entered and deleted as if to enter and delete it under the operation of a dynamic routing system by carrying out a communications test with a network to which the static route has been set. Further, a failure can be detected without waiting for a time-out of a terminal. As a result, a network having high operability can be realized. 
     The above objects and features as well as other advantages of the present invention will become more apparent from the following description of the preferred embodiment in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a view showing the structure of a local-area network system according to one embodiment of the present invention; 
     FIG. 2 is a view showing the structure of a static routing table 9 employed in the local-area network system shown in FIG. 1; 
     FIG. 3 is a view showing the structure of a routing table 6 employed in the local-area network system shown in FIG. 1; 
     FIG. 4 is a view illustrating a change in STATE obtained by pollings; and 
     FIG. 5 is a flowchart for describing the operation of a routing table management unit 7. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, a local-area network system is shown which comprises networks 10, 12 and 14 and router 11 and 13. Further, a terminal 1 is connected to the network 10 whereas a terminal 15 is connected to the network 14. 
     The terminal 1 comprises a physical layer unit 2, a data link layer unit 3, a network layer unit 4, a host application program 5, a routing table 6, a routing table management unit 7, a timer 8 and a static routing table 9. The terminal 15 comprises a physical layer unit, a data link layer unit, a network layer unit, a routing table, and an application program responsive to the polling from the host application program 5 in the terminal 1. 
     The static routing table 9 has a structure shown in FIG. 2. A network address for a receive destination network is entered in a column for a &#34;NETWORK&#34; of the static routing table 9. An address for a relay node of the receive destination network is entered in a column for a &#34;NEXT-HOP&#34;. The metric which has been counted up to the receive destination network, is entered in a column for a &#34;METRIC&#34;. A network address for a network to which a polling is effected to make a confirmation of communications with a corresponding network, is entered in a column for a &#34;PING-ADDRESS&#34;. States (Active, Doubt and Stop) of communication between the polling network and its corresponding network are entered in a column for a &#34;STATE&#34;. The term &#34;Active&#34; shows a state in which communications are satisfactory. The term &#34;Doubt&#34; shows a state of a possibility that communications are at fault because a response to the first polling is not obtained. The term &#34;Stop&#34; shows an estimated state in which since the response to the polling is not continuously obtained, a failure in communications take place. The &#34;STATE&#34; is changed as shown in FIG. 4 based on the result of polling. The term &#34;ENTRY&#34; shows whether or not the corresponding network has been entered in the routing table 6. Specifically, the term &#34;ENTRY&#34; shows that if the &#34;ENTRY&#34; is found to be &#34;1&#34;, then network information is copied from the static routing table 9 to the routing table 6 and if the &#34;ENTRY&#34; is found to be &#34;0&#34;, then no network information is copied from the static routing table 9 to the routing table 6. The term &#34;TIME&#34; shows a time interval required to perform the polling. 
     The routing table 6 has a structure shown in FIG. 3. When a normal response is issued from a polling destination, the contents of &#34;NETWORK&#34;, &#34;NEXT-HOP&#34; and &#34;METRIC&#34; of the static routing table 9 are copied on the routing table 6. 
     The routing table 6 has in addition to functions for routing a packet and for making out the routing table 6, a function for making out the static routing table 9, a function for effecting a polling on each of the networks entered in the static routing table 9, a function for copying &#34;NETWORK&#34;, &#34;NEXT-HOP&#34; and &#34;METRIC&#34; of a network which has successfully answered the polling onto the routing table 6, a function for deleting a network which has not successfully answered the polling from the routing table 6, a function for setting a time interval required to perform the polling, and a function different from a communicating function of a normal host application program, for referring to the static routing table 9 other than the routing table 6 upon routing a polling packet. 
     The host application program 5 serves as one for executing the polling. 
     The operation of the present embodiment will now be described with reference to FIG. 4 by the following example in which the terminal 1 effects a polling on the terminal 15 connected onto the network 14. 
     First of all, the routing table management unit 7 effects entering the static routing table 9 of the terminal 1 as an initial setup. Namely, a network address for the network 14 connected with the terminal 15, an address for the relay node of the network 14, the metric counted up to the network 14, a network address for the network (terminal) to which a polling is effected to make a confirmation of communications with the network 14, and a time interval required to perform the polling are respectively set to the columns for the &#34;NETWORK&#34;, &#34;NEXT-HOP&#34;, &#34;METRIC&#34;, &#34;PING-ADDRESS&#34; and &#34;TIME&#34; of the static routing table 9. Further, &#34;Stop&#34; and &#34;0&#34; are respectively set to the columns for the &#34;STATE&#34; and &#34;ENTRY&#34; of the static routing table 9. The routing table 6 is initialized. 
     After completion of these initial setups, the routing table management unit 7 reads address a destination network address and NEXT-HOP address from the static routing table 9 in Step 21. In Step 22, the routing table management unit 7 then starts the host application program 5 to make a confirmation of communications with the entered network 14 to effect a polling on the terminal 15. Next, the routine procedure proceeds to Step 23 where the routing table management unit 7 makes a decision as to whether a normal response to a transmitted polling packet has been sent from the terminal 15. If the answer is YES in Step 23, then the routing table management unit 7 sets the &#34;STATE&#34; to the &#34;Active&#34; in Step 25. Next, the routing table management unit 7 determines in Step 26 whether or not the &#34;ENTRY&#34; has been brought to &#34;0&#34;. Since the &#34;ENTRY&#34; is taken as &#34;0&#34; in the case of the initial polling, the routing table management unit 7 copies the &#34;ENTRY NETWORK&#34;, &#34;METRIC&#34; and &#34;NEXT-HOP&#34; in the static routing table 9 onto the routing table 6 in Step 27. In Step 28, the routing table management unit 7 sets the &#34;ENTRY&#34; to 1. Finally, the routing table management unit 7 resets the timer 8 in Step 29. 
     When the normal response to the transmitted polling packet is not obtained from the terminal 15 due to a failure in any of the networks 10, 12 and 14 or either one of the Router 11 and 13, the routing table management unit 7 refers to the &#34;STATE&#34; of the static routing table 9 in Step 30 and determines in Step 30 whether the &#34;STATE&#34; has been entered as the &#34;Active&#34;. If the answer is YES in Step 30, then the routing table management unit 7 sets the &#34;Doubt&#34; to the &#34;STATE&#34; of the static routing table 9 in Step 31 while holding the &#34;NETWORK&#34;, &#34;METRIC&#34; and &#34;NEXT-HOP&#34; which have already been entered in the routing table 6. Thereafter, the routing table management unit 7 resets the timer 8 in Step 29. 
     If the answer is NO in Step 30, then the routing table management unit 7 refers to the &#34;STATE&#34; of the static routing table 9 again in Step 32. If it is determined in Step 32 that the &#34;STATE&#34; has been taken as the &#34;Doubt&#34;, then the routing table management unit 7 sets the &#34;STATE&#34; to the &#34;Stop&#34; in Step 33. Further, the routing table management unit 7 deletes the contents of the routing table 6 in Step 34 and sets &#34;ENTRY&#34; to 0 in Step 35. Thereafter, the routing table management unit 7 resets the timer 8 in Step 29. 
     If it is judged in Step 32 that the &#34;STATE&#34; has been brought to the &#34;Stop&#34;, then the routing table management unit 7 resets the timer 8. 
     When a predetermined time has elapsed since the timer 8 was reset by the routing table management unit 7 and a time-out signal is outputted from the timer 8, the routing table management unit 7 retrieves the static routing table 9. Thereafter, the routing table management unit 7 starts the host application program 5 to make a confirmation of communications with the entered network 14 to re-effect thereby the polling on the terminal 15. 
     In entering the static routing table 6, a network address for a specified terminal may be used in place of the network address for the destination network. 
     While a preferred embodiment of the present invention has been described using specific terms, such description is for illustration only, and it is to be understood that changes and variations may be made without departing from the spirit or scope of the following claims.