Communication system capable of selecting optimum gateway for terminals

A communication apparatus is disclosed, which includes an information collection unit, a storage unit, a selection unit, and a route control unit. The information collection unit is configured to collect route information and condition information. The storage unit is configured to store the route information and the connection information. The selection unit is configured to select a connection apparatuses for a terminal apparatus based on the route information and the connection information. The route control unit is configured to control routes from the communication apparatus to the connection apparatus.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention generally relates to a communication apparatus, a relay apparatus, a communication system, and a method for communication, and particularly, to the communication through an ad hoc network comprising multiple communication apparatuses.

2. Description of the Related Art

A wireless LAN can provide faster wireless communication than a mobile telephone network does. Though the communication distance of each wireless station of the wireless LAN is limited, the wireless LAN covers a wide service area using multiple wireless stations connected to a backbone network. The backbone network is generally a wired wide-band network such as Ethernet (trademark) that can provide stable communication.

It is desired, however, that the backbone network be extended to an area where a wired network can not be provided easily or that the wireless LAN be quickly established in such an area. In such a case, a wireless backbone network may be employed for connection between the wireless stations of the wireless LAN.

A backbone network based on Ethernet (trademark) operates as a network of data link layer that does not involve an IP router.

When a packet is transmitted from a terminal, the packet is transferred via multiple nodes provided in the backbone network. Many techniques for controlling the route of packet transfer are proposed. The techniques include, for example: spanning tree method defined in IEEE 802.1; routing information protocol (RIP) and open shortest path first (OSPF) used for the routing in the Internet; dynamic source routing (DSR) and ad hoc on demand distance vector (AODV) used for an ad hoc network.

A data link layer network is used as a network that serves relatively small area such as an office or a home. If communication with an external network is needed, the data link layer network may be connected with the external network by a gateway such as an IP router.

When a terminal connected to the backbone network communicates with an external network, the terminal needs to obtain information such as the address of the gateway by any means.

The user of the terminal may input gateway address given by a network administrator manually. However, any change in the condition of the network such as the move of the terminal and/or communication troubles in the network may necessitate the user to re-input the gateway address, which is troublesome and may cause an error. Thus, many techniques are proposed that can automatically set the gateway address to the terminal to solve the above problem.

For example, S. Alexander et al., “DHCP Options and BOOTP Vendor Extensions”, RFC 2132, March 1997, proposes the enhancement of DHCP (Dynamic Host Configuration Protocol) in which a terminal is automatically informed of the IP address of a gateway.

T. Narten et al., “Neighbor Discovery for IP Version 6 (IPv6)”, RFC 2461, December 1998, proposes an IP router that automatically broadcasts its IP address to the network.

S. Knight et al., “Virtual Router Redundancy Protocol”, RFC 2338, April 1998, proposes a technique in which multiple routers share the same IP address as a group and are configured to exchange information with each other. A terminal can use any one of the routers as a gateway without changing the IP address set thereto.

However, the following problems remain unsolved. When the gateway address is set, the condition of routes between the terminal and the gateway is not taken into consideration.

If there is only a single gateway provided in the LAN, the terminal has no choice but select the single gateway. If multiple gateways exist in the LAN, the terminal can select one of them, but communication quality may considerably vary gateway by gateway.

Especially, if the components of the LAN are connected via wireless channels, frequency resource and wireless transmission speed are limited. Consequently, each route between the terminal and a gateway may differ in communication quality. The terminal may select a route the communication quality of which is not satisfactory.

SUMMARY OF THE INVENTION

Accordingly, it is an object of the present invention to provide a novel and useful communication apparatus, relay apparatus, communication system, and a method for communication. Another and more specific object of the present invention is to allow the setting of gateway address to take the condition of a route between a terminal and a gateway into consideration.

To achieve at least one of the above problems, a communication apparatus, includes:

an information collection unit configured to collect route information indicating routes connecting the communication apparatus and a plurality of connection apparatuses, and condition information indicating the condition of the plurality of connection apparatuses, each connection apparatus connecting a first network and a second network, the first network formed by the communication apparatus and other communication apparatuses distributed therein;

a storage unit configured to store the route information and the connection information collected by the information collection unit;

a selection unit configured to select one of the plurality of connection apparatuses for a terminal apparatus having no capability of route control based on the route information and the connection information stored in the storage unit; and

a route control unit configured to control routes from the communication apparatus to the one of the plurality of connection apparatuses selected by the selection unit.

The route information and the condition information are collected by the information collection unit and stored in the storage unit. The route information indicates the routes from the communication apparatus to the multiple connection apparatuses, and the condition information indicates the condition of the multiple connection apparatuses. A connection apparatus which is suitable for a terminal apparatus by the selection unit.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiments of the present invention are described in detail with reference to the drawings. The same elements and/or steps are referred to by the same reference numeral throughout the drawings, and their description are not given twice.

A communication system according to an embodiment of the present invention is described below with reference toFIG. 1.

A communication system according to the present embodiment includes a network1in which wireless LAN stations3-1through3-4are provided. The network1is connected with another network2via gateways5-1and5-2. A wireless LAN terminal4-1can communicate with the network1by air. The wireless LAN stations3-1through3-4operate as communication apparatuses for controlling routes in the network1. The wireless LAN terminal4-1may not have functionality for controlling routes in the network1.

The wireless LAN stations3-1through3-4can be connected with each other by air. The wireless LAN station3-4is connected with a gateway5-1by air, and the wireless LAN station3-3is connected with a gateway5-2by air. As described above, the wireless LAN stations3-1through3-4form a mesh network.

A description is given on a mesh network below. A mesh network of wireless LAN stations (Access Points) is formed by multiple access points mutually connected by wireless channels forming one subnet. The access points in a mesh network transfers a packet received from the wireless LAN terminal as if bucket brigade (routing). The principle of a mesh network is basically the same as that of IP routing, but different in that the wireless LAN stations are divided into a layer of wireless LAN stations that are involved in the control of routes and a layer of wireless LAN stations that are not involved in the routing. The wireless LAN terminal can not know how the access points are connected to each other. Additionally, since the access points are connected by air, the quality of connection differs route by route. The route control of the mesh network is performed in layer2.

It should be understood by those skilled in the art that, in the following description, all wireless LAN stations are connected by air, but some of the wireless LAN stations may be connected by wired channels. Additionally, the connection between a gateway and a wireless LAN station and/or the connection between gateways are wireless (by air), but may be wired.

The structure of wireless LAN station is described below with reference toFIG. 2. Although the wireless LAN station3-1is described below, the other wireless LAN stations3-2through3-4are structured in the same manner.

As shown inFIG. 2, the wireless LAN station3-1includes a route control unit3-11and a packet transmission unit3-12connected to the route control unit3-11. The wireless LAN station3-1further includes a gateway selection unit3-13connected to the route control unit3-11and the packet transmission unit3-12, a terminal interface3-16connected to the gateway selection unit3-13, and an antenna3-17connected to the terminal interface3-16. The wireless LAN station3-1further includes a storage unit3-14connected to the gateway selection unit3-13and an information collection unit3-15connected to the storage unit3-14. A gateway ID list is provided in the storage unit3-14. The wireless LAN station3-1yet further includes a network interface3-18connected to the packet transmission unit3-12and the information collection unit3-15, and an antenna3-19connected to the network interface unit3-18.

The information collection unit3-15collects information such as identifiers of the gateways5-1and5-2connected to the network1via the network interface3-18and the antenna3-19. The collected information is stored in the gateway ID list3-141of the storage unit3-14.

The wireless LAN terminal4-1does not have functionality for controlling routes in the network1. The wireless LAN terminal4-1transmits a data packet via a wireless LAN station such as the wireless LAN station3-1. The data packet transmitted by the terminal4-1is received by the antenna3-17of the wireless LAN station3-1, and transferred to the gateway selection unit3-13via the terminal interface3-16. In response to receipt of the data packet by the gateway selection unit3-13, the information such as gateway identifiers stored in the storage unit3-14is retrieved into the gateway selection unit3-13. The gateway selection unit3-13selects the optimum gateway under its control for the terminal4-1based on the information retrieved from the storage unit3-14. The route control unit3-11controls routes through which the data packet is transmitted to the optimum gateway selected by the gateway selection unit3-13. The packet transmission unit3-12transmits the data packet to the selected gateway.

The transmission of a data packet by a wireless LAN station is further described below.

The wireless LAN stations3-1through3-4obtains (collect) the identifiers of the gateways5-1and5-2connected to the network1. The identifier of a gateway includes, for example, the MAC (Media Access Control) address, IP address, or a combination thereof. The wireless LAN stations can collect any one of the above identifiers.

Additionally, the wireless LAN stations3-1through3-4can collect the identifiers in the following way. (1) The administrator of the wireless LAN station inputs the gateway identifiers manually. (2) The wireless LAN station obtains the gateway identifiers from an apparatus that manages the gateway identifiers. (3) The gateways5-1and5-2broadcast their identifiers using a Router Advertisement packet defined in IPv6 (Internet Protocol Version 6), for example, thereby to inform the wireless LAN stations of their identifiers.

In the second (2) case, the apparatus that manages the gateway identifiers may be operated as a DHCP server in parallel so that the wireless LAN stations can obtain their own IP addresses as well as the list of IP addresses of the gateways as the gateway identifiers. In such a case, the access points may inform the DHCP server of the optimal gateway for each terminal and the terminal's identifier. According to the above arrangements, the DHCP server can designate the optimal gateway for each terminal.

In the third (3) case, the wireless LAN station, instead of the gateway, can transmit a router solicitation packet, for example, for collecting the gateway identifiers.

The wireless LAN stations3-1through3-4determines which gateway is optimum for the terminal4-1based on the collected information on the gateways. Specifically, the optimum gateway is determined based on the state of the gateways and the state of routes between the wireless LAN station and the gateway.

The state of a gateway includes the bandwidth between the gateway and an external network such as the network2, the stability of communication (wireless or wired) with the external network, quality of service (QoS), the traffic on the channel to the external network. Such information can be collected in various ways. For example, the administrator of the wireless LAN station can set the information manually to the wireless LAN station. The wireless LAN station may be obtain such information from the gateway directly, or from a particular apparatus managing the state of the gateway. The wireless LAN station may collect such information when it collect the gateway identifiers.

The state of a route between a wireless LAN station and a gateway includes the number of hops, bandwidth, QoS, the traffic on the route. Such information can be obtained from the route control unit3-11that determines a route between the wireless LAN station and the gateway. The wireless LAN station may collect such information when searching for the gateway.

The data structure of a data packet transmitted through the communication system is described below with reference toFIG. 3.

A packet includes a MAC header, an IP header, and a payload containing data that are to be transmitted. The MAC header and the IP header may be collectively referred to as a header. The MAC header contains the MAC addresses (of a data link layer) of a destination and a sender. The IP header contains the IP addresses (of a network layer) of the destination and the sender. That is, the header contains two types of addresses.

In the case of communication within the network1, both the MAC address and the IP address are those of a counterpart of communication. In the case of communication with an external network via a gateway, the MAC address of the gateway and the IP address of the counterpart of the communication are used for the data link layer and the network layer, respectively.

Referring toFIG. 4, procedure performed by the wireless LAN station3-1in response to receipt of a data packet from the terminal4-1is described below.

According to an embodiment, the wireless LAN station3-1creates a control table of the MAC addresses of gateways thereby to control the identifiers of the gateways5-1and5-2connected to the network1. The control table of the MAC addresses of the gateways is stored in the storage unit3-14as the gateway ID list3-141.

The wireless LAN station3-1receives a packet from the wireless LAN terminal4-1(step S41), and determines whether the MAC address of destination contained in the received packet is registered in the control table (step S42). Specifically, the gateway selection unit3-13of the wireless LAN station3-1determines whether the destination address of data link layer matches the address of gateway stored in the storage unit3-14.

If registered (YES in step S42), the wireless LAN station3-1determines whether the MAC address of destination is that of the optimum gateway for the terminal4-1(step S43). If the MAC address of destination is not that of the optimum gateway for the terminal4-1(NO in step S43), the route control unit3-11of the wireless LAN station3-1changes the MAC address of destination contained in the received packet to the MAC address of the optimum gateway. Then, the packet transmission unit3-12transmits the packet, the MAC address of which has been changed (step S45). If either a determination that the MAC address of destination contained in the received packet is not registered in the control table (NO in step S42) or a determination that the MAC address of destination is not that of the optimum gateway for the terminal4-1(YES in step S43) is made, then the packet transmission unit3-12transmits the received packet as is (step S44).

Referring toFIG. 5, the case in which the MAC address of destination contained in the received packet is that of a predetermined MAC address is described below.

The gateway selection unit3-13of the wireless LAN station3-1receives a packet from the wireless LAN terminal4-1(step S51), and determines whether the MAC address of destination contained in the received packet matches the predetermined MAC address (step S52). In the affirmative case (YES in step S52), the route control unit3-11changes the MAC address of destination contained in the received packet to the MAC address of the optimum gateway. Then, the packet transmission unit3-12transmits the packet, the MAC address of which has been changed (step S53). If negative case (NO in step S52), the packet transmission unit3-12transmits the packet as is (step S54).

As described above, in the case in which the address of destination contained in the received packet is that of a predetermined MAC address, the address of destination contained in the received packet is changed to the MAC address of the optimum gateway. The condition of gateways and the condition of routes between the wireless LAN station and the gateways can be reflected to the route through which the packet is transmitted.

According to an embodiment, a router may be used as the gateway, and the router may be further doubled. In the case in which double routers are used, protocols such as virtual router redundancy protocol (VRRP) and hot standby routing protocol (HSRP) may be incorporated to the network of the wireless LAN stations.

When the double routers are used, multiple routers form a group and share one virtual IP address and one virtual MAC address. In normal operation, one of the routers represents the group and operates as a router having the virtual IP address and the virtual MAC address. Once the representing router fails, another one of the routers (backup router) having the second highest priority operates as the router having the virtual IP address and the virtual MAC address.

Each of these routers has the actual MAC address of its actual interface as well as the virtual MAC address. The route control unit3-11only has the information of route with respect to the actual MAC address of the routers. When an access point (wireless LAN station) receives a packet addressed to a virtual MAC address, the access point automatically changes the virtual MAC address to the actual MAC address. The access point learns the actual MAC addresses of the routers having the same virtual MAC address by peeking a packet transmitted in accordance with the protocol that realizes redundancy.

The route control unit3-11may operate based on the virtual MAC address. When the representative router is switched to the backup router, however, the route control unit3-11needs to be reset.

When a packet is transmitted from the terminal4-1via the gateway5-1or5-2, the IP address of the counterpart of communication is designated as the destination address of network layer, and the MAC address of the gateway5-1or5-2is designated as the destination address of data link layer. The terminal4-1transmits a packet such as an address resolution protocol (ARP) packet for inquiring the MAC address of the gateway5-1or5-2.

Referring toFIG. 6, the operation of the wireless LAN station3-1in response to receipt of an ARP packet is described below. In the following description, an assumption is made that the MAC addresses of the gateways5-1and5-2are stored in a control table as the identifiers of the gateways.

The wireless LAN station3-1receives a packet from the wireless LAN terminal4-1(step S61), and the gateway selection unit3-13of the wireless LAN station3-1determines whether the received packet is an ARP packet (step S62). If the received packet is an ARP packet (YES in step S62), the gateway selection unit3-13determines whether the IP address inquired by the ARP packet is an IP address registered in the control table (step S63). If the determination is affirmative (YES in step S63), the gateway selection unit3-13further determines whether the IP address inquired by the ARP packet is the IP address of the optimum gateway for the wireless LAN terminal4-1(step S64).

If the determination is negative (NO in step S64), the route control unit3-11returns the MAC address of the optimum gateway on its behalf (step S65). If the above conditions are not satisfied (NO in step S62, NO in step S63, and YES in step S64), the packet transmission unit3-12transmits the ARP packet as is (step S66).

In the embodiment described above, when the wireless LAN station receives an ARP packet from the wireless LAN terminal, the gateway selection unit3-13determines whether the IP address inquired by the ARP packet is an IP address registered in the control table, and further determines whether the IP address inquired by the ARP packet is the IP address of the optimum gateway for the wireless LAN terminal. According to another embodiment, the gateway selection unit3-13determines whether the IP address inquired by the ARP packet is an IP address registered in the control table (step S63), and if the IP address inquired by the ARP packet is registered in the control table (YES in step S63), the route control unit3-11may returns the MAC address of the optimum gateway on its behalf (step S65). The gateway selection unit3-13may not determine whether the IP address inquired by the ARP packet is the IP address of the optimum gateway for the terminal even. That is, step S64may be skipped in this case.

Referring toFIG. 7, the case in which the IP address inquired in the ARP packet is a predetermined IP address is described below.

The wireless LAN station3-1receives a packet from the wireless LAN terminal4-1(step S71), and the gateway selection unit3-13of the wireless LAN station3-1determines whether the received packet is an ARP packet (step S72). If the received packet is an ARP packet (YES in step S72), the gateway selection unit3-13further determines whether the IP address inquired by the received ARP packet is a predetermined address (step S73).

If the IP address inquired by the received ARP packet is a predetermined address (YES in step S73), the route control unit3-11returns the MAC address of the optimum gateway on its behalf (step S74). If the above conditions are not met (NO in step S72, and NO in step S73), the packet transmission unit3-12transmits the received ARP packet as is (step S75).

As described above, in response to receipt of an ARP packet, the inquired IP address of which is a predetermined IP address, the wireless LAN station3-1returns the MAC address of the optimum gateway on behalf of the optimum gateway.

Referring toFIG. 8, a communication system according to a second embodiment of the present invention is described in detail below.

The above embodiments are related to the case in which a wireless LAN terminal connected to a wireless LAN station transmits a packet to an external network such as the network2. In the following description, the case in which the communication system according to the second embodiment provides the selection of the optimum gateway to packets transmitted from an external network such as the network2to a wireless LAN terminal connected to a wireless LAN station is discussed.

As shown inFIG. 8A, when a packet (upstream packet) is transmitted from a wireless LAN terminal4-2to a wireless LAN station3-5, the wireless LAN stations3-5and/or3-7selects the optimum gateway (gateway5-4in this case). The upstream packet is transmitted to a wireless LAN station in an external network through the wireless LAN stations3-5and3-7, the optimum gateway5-4, a router6as indicated by a dotted line inFIG. 8A.

When a packet (downstream packet) is transmitted from the terminal4-3in the external network (network2,FIG. 1) to the terminal4-2connected to the network1(FIG. 1), any communication apparatus in the network2may not have information which gateway is optimum.

In the communication system according to the second embodiment, when receiving a packet addressed to a wireless LAN terminal from the network2, a gateway automatically transfers the packet to another gateway which is optimum for the wireless LAN terminal.

Referring toFIG. 9, the gateway which is suitably designed for the communication system according to the second embodiment is described in detail.

Since both gateways5-3and5-4are structured in the same manner, only the gateway5-3is described below and the description of the gateway5-4is omitted.

The gateway5-3includes a route control unit5-31, a packet transmission unit5-32connected to the route control unit5-31, and a gateway selection unit5-33connected to the route control unit5-31and the packet transmission unit5-32. The gateway5-3further includes a storage unit5-35connected to the gateway selection unit5-33, and an information collection unit5-34connected to the storage unit5-35. The gateway5-3yet further includes an interface5-36connected to the packet transmission unit5-32and the information collection unit5-34, and an antenna5-37connected to the interface5-36.

A wireless LAN station informs the gateway5-3of a combination of the identifier of the wireless LAN terminal4-2and the identifier of the optimum gateway for the wireless LAN terminal4-2. The information of the identifiers is provided to the information collection unit5-34via the antenna5-37and the interface5-36, and stored in the storage unit5-35by the information collection unit5-37.

The gateway selection unit5-33selects a gateway to which a packet addressed to the wireless LAN terminal4-2is transferred based on the information of the identifiers. The route control unit5-31controls routes to the gateway selected by the gateway selection unit5-33. The packet transmission unit5-32transfers the packet to the gateway selected by the gateway selection unit5-33.

The operation of the gateway5-3is described in detail below. In the following description, an assumption is made that the gateway5-4is optimum for the wireless LAN terminal4-2, and the gateway5-3transfers a packet addressed to the wireless LAN terminal4-2to the gateway5-4.

The wireless LAN stations3-5,3-6, and3-7sends the gateway5-3information such as the identifier of the wireless LAN terminal4-2and the identifier of a gateway which is optimum for the wireless LAN terminal4-2. The gateway selection unit5-33of the gateway5-3determines a destination (gateway5-4in this case) to which the packet is transferred based on the received information of the identifiers of the wireless LAN terminal4-2and the optimum gateway. In response to the determination by the gateway selection unit5-33, the packet transmission unit5-32transfers the packet to the destination. The route through which the packet is transferred to the optimum gateway5-4is controlled by the route control unit5-31.

As described above, the wireless LAN stations informs the gateways which gateway is optimum for each wireless LAN terminal. An example of the identifier includes an IP address and a MAC address. The wireless LAN stations may send the information of the optimum gateway for each wireless LAN terminal by broadcasting or multicasting the information in the network1, or by unicasting the information to each gateway.

A gateway can learn that it is selected as the optimum gateway for a particular terminal in the network1by peeking the sender address of a packet received from the particular terminal in the network1. Therefore, according to an embodiment, the gateway may include an informing unit (not shown) that sends other gateways information that the gateway itself is the optimum gateway for the particular terminal.

According to another embodiment, a upper rank apparatus such as a router6in the network2may select the optimum gateway for a particular terminal in the network1, as shown inFIG. 8B. In this case, the gateway needs to inform the upper rank apparatus of the identifier of the wireless LAN terminal that has selected the gateway as being optimum for the particular terminal. According to the above arrangements, the gateways do not need to exchange packets.

Referring toFIG. 10, a communication system according to a third embodiment of the present invention is described in detail below.

In the above embodiments, the case in which a wireless LAN station selects a gateway which is optimum for a terminal, and automatically directs packets to the selected gateway is discussed. However, the terminal may be informed of information about available gateways by the wireless LAN station using beacon, for example, and selects the optimum gateway by itself.

In a communication system according to the present embodiment, a wireless LAN station3-8includes all the elements of the wireless LAN station3-1described with reference toFIG. 2, and further includes a gateway informing unit (not shown) that sends information about gateways to a wireless LAN terminal.

An example of the information about gateways sent from the wireless LAN station3-8to the wireless LAN terminal4-2may include the identifier of the optimum gateway, the list of available gateways and their priorities, the channel condition between the wireless LAN station and the gateway, and the combination thereof. For example, the wireless LAN station3-8may send the wireless LAN terminal4-2information indicating that the optimum gateway is the gateway5-3. In response to receipt of the information from the wireless LAN station3-8, the wireless LAN terminal4-2can select the gateway5-3.

As shown inFIG. 11, if the wireless LAN terminal4-3finds a wireless LAN station that can provide better route than current one using the above information about gateways, the wireless LAN terminal4-3may hand off to the wireless LAN station.

For example, consider that the wireless LAN terminal4-3is connected to a wireless LAN station3-13, and the cost of link between the wireless LAN station3-13and the gateway12is 20. If the wireless LAN terminal4-3receives information indicating the existence of another wireless LAN station3-8the cost of which is less than 20, the wireless LAN terminal4-3may hand-off to the wireless LAN station3-8. The cost of a link is described in detail below.

In this case, the wireless LAN terminal4-3receives information indicating that the cost between the wireless LAN station3-13and the gateway5-5being 20, the cost between the wireless LAN station3-11and the gateway5-5being 10, and the cost between the wireless LAN terminal3-8and the gateway5-5being 2. The wireless LAN terminal4-3may hand off to the wireless LAN station3-8. At the same time, if the wireless LAN terminal4-3finds another gateway to be optimal, the wireless LAN terminal4-3can select the optimal gateway.

Referring toFIGS. 12 and 13, a communication system according to a fourth embodiment of the present invention is described below.

The route control unit of a communication apparatuses such as wireless LAN stations assign a value which is referred to as cost to each link between the communication apparatuses, and selects a link the cost of which is minimum. The controlling of routes based on the cost is described with reference toFIG. 12.

A mesh network shown inFIG. 12includes a first wireless LAN station3-15, a second wireless LAN station3-16, a third wireless LAN station3-17, a fourth wireless LAN station3-18. Additionally, a first gateway5-6is connected to the second wireless LAN station3-16.

The case in which a wireless LAN terminal4-4connected to the third wireless LAN station3-17is connected with the first gateway5-6is discussed.

The cost of a link connecting the first wireless LAN station3-15and the second wireless LAN station3-16is represented “Cost(1,2)”. The cost of a link connecting the first wireless LAN station3-15and the third wireless LAN station3-17is represented “Cost(1,3)”. The cost of a link connecting the second wireless LAN station3-16and the fourth wireless LAN station3-18is represented “Cost(2,4)”. The cost of a link connecting the third wireless LAN station3-17and the fourth wireless LAN station3-18is represented “Cost(3,4)”. As shown inFIG. 12, it is assumed that Cost(1,2)=5, Cost(1,3)=10, Cost(2,4)=10, and Cost(3,4)=1.

The third wireless LAN station3-17to which the wireless LAN terminal4-4is connected needs to determine through which wireless LAN terminal the wireless LAN station3-17transmits packets received from the wireless LAN terminal4-4to the first gateway5-6. The first gateway5-6is connected to the second wireless LAN station3-16. It is sufficient to determine a route from the third wireless LAN station3-17to the second wireless LAN station3-16. The determination may be performed using a route control protocol.

There are multiple routes for connecting the third wireless LAN station3-17and the second wireless LAN station3-16. The route control protocol the route with the least cost to be selected by collecting and summing the cost of all links connecting the wireless LAN stations across the entire routes. An example of the cost of a link includes the bandwidth of the link and the delay caused by the link, for example.

In this case, there are two routes connecting the third wireless LAN station3-17and the second wireless LAN station3-16, that is, one passing through the first wireless LAN station3-15(route1), and another one passing through the fourth LAN station3-18(route2).

The cost of the route1is Cost(1,3)+Cost(1,2)=10+5=15, and the cost of the route2is Cost(3,4)+Cost(2,4)=1+10=11. The cost of the route2is less than that of the route1. Accordingly, the wireless LAN terminal4-4selects the route2to connect to the first gateway5-6.

ReferringFIG. 13, the controlling of routes based on the calculation of the cost in the case in which multiple gateways are connected to the network is discussed below.

A communication system shown inFIG. 13is different from the communication system shown inFIG. 12in that a second gateway5-7is connected to the fourth wireless LAN station3-18.

Even if multiple gateways exist in a communication system, the route control protocol can be used to determine the routes between the wireless LAN stations to which the gateways are connected and the third wireless LAN station3-17to which the wireless LAN terminal4-4is connected. The cost between the third wireless LAN station3-17and the first gateway5-6(route2) is 11, as calculated above. The cost between the third wireless LAN station3-17and the second gateway5-7(that is, the fourth wireless station3-18) is 1.

If the performance of the first and second gateways5-6,5-7is identical, the wireless LAN terminal4-4would be obviously better off to select the second gateway5-7. However, the wireless LAN terminal4-4does not have functionality to perform the route control protocol, and consequently, has no knowledge about the cost. Therefore, the wireless LAN station3-17having the cost information may select the gateway on behalf of the wireless LAN terminal4-4.

In the above description, it is assumed that all gateways provided in the communication system have the same performance. However, the bandwidth of channels connecting the gateways and the external network may be different, and the traffic on the channels may differ. It is desirable that the condition of the gateways such as the above differences is taken into consideration upon the selection of routes.

According to an embodiment, the condition of a gateway may be reflected as cost to the computation of the cost of a route in a mesh network between access points. An example of the cost includes the bandwidth and traffic load. In addition, if the wireless LAN terminal4-4is a mobile terminal, the remaining battery of the mobile terminal may be reflected as cost.

Consider that, in the communication system shown inFIG. 13, the cost of the first gateway5-6is Cost(GW1)=15, and the cost of the second gateway5-7is Cost(GW2)=10.

Under such assumptions, the cost of the case in which the wireless LAN terminal4-4uses the first gateway5-6becomes Cost(1,3)+Cost(1,2)+Cost(GW1)=10+5+15=30, and the cost of the case in which the wireless LAN terminal4-4uses the second gateway507becomes Cost(3,4)+Cost(GW2)=1+10=11. The wireless LAN terminal4-4is better off to use the second gateway5-7. Accordingly, the access point selects the second gateway5-7on behalf of the wireless LAN terminal4-4.

Referring toFIG. 14, a communication system according to a fifth embodiment is described in detail below.

The communication system according to the present embodiment can diversify traffics congesting to a gateway. The controlling of routes in the communication system according to the present embodiment is discussed below.

As shown inFIG. 14A, many traffics congest to a gateway5-6, and channels around the gateway5-6may be congested.

InFIG. 14A, wireless LAN terminals4-5through4-8are connected to wireless LAN stations3-19through3-22, respectively. The wireless LAN stations3-19through3-22are connected to a wireless LAN station3-23. The wireless LAN station3-23is connected to a gateway5-6. The wireless LAN stations3-19and3-20are connected, the wireless LAN stations3-20and3-21are connected, and the wireless LAN stations3-21and3-22are connected.

An example of traffics that congest to the wireless LAN station3-23to which the gateway5-6is connected includes a traffic starting from the wireless LAN terminal4-5, passing the wireless LAN station3-19, the wireless LAN station3-23, the wireless LAN station3-22and ending at the wireless LAN terminal4-8. Another example is a traffic starting from the wireless LAN terminal4-6, passing through the wireless LAN station3-20, the wireless LAN station3-23, and ending at the gateway5-6, and a traffic starting from the wireless LAN terminal4-7, passing through the wireless LAN station3-21, the wireless LAN station3-23, and ending at the gateway5-6.

To avoid the congestion on channels around the gateway, a priority control unit (not shown) is provided to each of the wireless LAN station3-19through3-23. The priority control unit controls the priority of links connecting the wireless LAN station in which the priority control unit is provided and other wireless LAN stations. Additionally, the cost of links directly connected to the wireless LAN station3-23to which the gateway5-6is connected is set at a high level. According to the above arrangements, the traffic from the wireless LAN terminal4-5to the wireless LAN terminal4-8does not pass through the wireless LAN stations3-19,3-23, and3-22, but does pass through the wireless LAN stations3-19,3-20,3-21, and3-22to reduce the total cost. As a result, the traffic which does not directed to the gateway can be rerouted.

Referring toFIG. 15, the disposition of a gateway in the communication system according to the above embodiments is explained below.

FIG. 15Ashows the case in which the gateway is connected to the access point via a network.FIG. 15Bshows the case in which the gateway is directly connected to the access point.FIG. 15Cshows the case in which the gateway is embedded in the access point.FIG. 15Dshows the case in which the gateway is under the control of the access point. It should be understood that the present invention is applicable any of the above cases.

In some of the above embodiments, the wireless LAN station determines the optimum gateway by calculating the cost from the wireless LAN station to which the wireless LAN terminal is connected to the gateway. According to another embodiment, the cost may be estimated by transmitting a special packet for measuring the cost to the gateway. According to yet another embodiment, a combination of the traffic condition and the bandwidth of the gateway may be determined for the estimation of cost.

If one or more wireless LAN stations move resulting in any change in network topology, the gateway which has been optimum for the wireless LAN terminal may be no more optimal. In this case, the information available from the route control unit is updated. As a result, a new optimum gateway is automatically selected based on the updated information.

When the wireless LAN terminal moves and is handed over from a wireless LAN station to another, the other wireless LAN station can direct packets from the wireless LAN terminal to the optimum gateway. As a result, the wireless LAN terminal can access the optimum gateway.

Although the embodiments of the present invention has been described with reference to a wireless LAN as an example, it is noted that the present invention is applicable to other suitable communication systems such as a cellular phone system and a Bluetooth system.

According to the above embodiments, the wireless LAN station forming an ad hoc network selects the optimum gateway on behalf of a wireless LAN terminal, since the wireless LAN station can obtain information about the network condition, for example. According to the above arrangement, the wireless LAN terminal can communicate with an external network through the optimum gateway for the wireless LAN terminal.

Additionally, the wireless LAN terminal may be handed over to another wireless LAN station which can provide a better route to the gateway.

Traffics congesting to links close to the gateway can be rerouted by increasing the cost assigned to the links.

According to the above embodiments of the present invention, when selecting a gateway which is suitable for a terminal, the condition of routes connecting the terminal and the gateway can be reflected.

This patent application is based on Japanese priority patent application No. 2004-44632 filed on Feb. 20, 2004, the entire contents of which are hereby incorporated by reference.