Packet forwarding apparatus having gateway load distribution function

A packet forwarding apparatus comprises a plurality of line interfaces each for communicating with one of user terminals or one of redundant gateways, and a protocol processing unit for controlling packet forwarding among the line interfaces. The protocol processing unit forwards a connection initiation request packet received from a user terminal to the plurality of redundant gateways and forwards to the user terminal only one response packet which is selected according to connection load status information of each gateway stored in a load distribution management table from among a plurality of response packets received from the gateways within a predetermined period of time.

CLAIM OF PRIORITY

The present application claims priority from Japanese patent application serial No. 2006-295020, filed on Oct. 31, 2006, the content of which is hereby incorporated by reference into this application.

BACKGROUND OF THE INVENTION

(1) Field of the Invention

The present invention relates to a packet forwarding apparatus forming an Internet access network. More particularly, the invention relates to a packet forwarding apparatus having a gateway load distribution function of selecting one gateway from among plural gateways connected to an Internet transit network and connecting a user terminal to the Internet transit network via the selected gateway.

(2) Description of Related Art

At the moment, an authentication-based high-speed Internet connection service is provided. In this connection service, a user terminal is connected to an authentication server via a high-speed access line such as an Asymmetric Digital Subscriber Line (ADSL), Fiber to The Home (FTTH), or wireless LAN, and the user terminal is connected to the Internet when successful in authentication.

In the authentication-based high-speed Internet connection service, each user terminal is connected to a transit network managed by an Internet Services Provider (ISP) via, for example, a gateway node such as a Broadband Access Server (BAS) that terminates a high-speed access network. If the user terminal is a PPPoE terminal for Point to Point Protocol over Ethernet (PPPoE) prescribed in RFC 2516, the BAS terminates PPPoE or PPP, a protocol for connecting with the user terminal, and forwards layer-3 packets to the transit network.

As IP telephone services have launched recently, the above-mentioned high-speed access network is required to provide a high quality of communication comparable to that of an existing telephone network. For this reason, an enhanced access network having a plurality of redundant BASs deployed at the entrance to the transit network is configured so as to keep redundant routes for connecting user terminals to the transit network and to minimize downtime of a BAS service having a large impact on the network operation when a failure occurs. In an access network including such redundant BASs, it is expected to provide a network configuration that can distribute the connection load among the BASs properly.

In addition to the above layer-3 Internet connection service, an authentication-based connection service at a layer-2 level is also provided in recent years. In the layer-2 level authentication-based connection service, user authentication is carried out in accordance with a PPP Extensible Authentication Protocol (EAP) in IEEE 802.1X prescribed in RFC 2284. In this case, the transit network is comprised of Ethernet. In the EAP, user authentication is performed by communicating EAP over LAN (EAPOL) packets between a supplicant which is a user terminal to be an authentication requester and an authenticator which is a gateway node to be an authentication executor. The authenticator forwards each packet transmitted from an authenticated user terminal to the transit network by layer-2 packet forwarding.

In the layer-2 level Internet connection service using the IEEE 802.1X, each user terminal (supplicant) sends an IP address request to a Dynamic Host Configuration Protocol (DHCP) server which is managed by an ISP and receives an IP address assigned, for example, in an EAP forwarding phase which is executed after the completion of an EAP authentication phase. Because IEEE 802.1X fundamentally assumes to connect each supplicant with an authenticator in a one-to-one connection manner, the authenticator has to be provided with a plurality of connection ports at least equal to the number of supplicants it serves. However, in a case where a plurality of supplicants (user terminals) are connected to the authenticator via a layer-2 switch (L2SW), the authenticator can communicate with the plurality of supplicants through one connection port if each user terminal uses a special multicast MAC address (“01-80-C2-00-00-03”) to a EAPOL packet and the L2SW can pass the multicast EAPOL packet to the authenticator.

For the layer-2 level Internet connection service, redundant gateways (authenticators) and load distribution among them are also demanded with the spread of IP telephone service, as in the case of the layer-3 connection service described above.

As a related art, for example, Japanese Patent Application Laid-Open Publication No. 2005-64936 (Patent Document 1) proposes a system and method for PPPoE session distribution. In this system, a PPPoE session management apparatus is placed between a plurality of Broadband Remote Access Servers (BRASs) each connected to a plurality of ISPs, and PPPoE terminals. Upon receiving a PADI packet from one of the PPPoE terminals, the PPPoE session management apparatus selects a most suitable BRAS to be connected with the PPPoE terminal and forwards the PADI packet to the selected BRAS.

In order to provide an IP telephone service to each user terminal via the above transit network, it is required to enhance the communication performance of the access network and the transit network up to a level comparable to that of an existing telephone network. In the layer-3 connection service according to PPPoE, an access network having a redundant BASs configuration can be built as described above.

In the network of the redundant BASs configuration, a plurality of BASs reply with response packets called a PPPoE Active Discovery Offer (PADO) in response to a PPPoE Active Discovery Initiation (PADI) packet broadcasted from a PPPoE terminal, the PPPoE terminal selects one of the BASs that reply with the PADO packets and executes a succeeding communication control procedure starting from transmission of a PPPoE Active Discovery Request (PADR) packet with the selected BAS.

However, the selection of a BAS by the PPPoE terminal depends on the reception timing of each PADO packet or a BAS selection algorithm implemented on the PPPoE terminal. Thus, in a communication network in which each PPPoE terminal selects one of BASs, it is unable to control load distribution among the redundant BASs from ISP or telecommunications carrier side that operates the transit network. Therefore, it is impossible for the ISP to manage the BASs, for example, in a load distribution manner in which a BAS to be connected with a PPPoE is selected so as to equalize the connection loads of the redundant BASs, or to operate the redundant BASs by dividing them into an active group and a standby group.

According to the PPPoE session distribution system proposed in Patent Document 1, the load is distributed among a plurality of BRASs by the PPPoE session management apparatus.

The PPPoE session management apparatus described in Patent Document 1 is provided with a BRAS IP address management table for storing the number of remaining IP addresses for each ISP held by each BRAS, and an ISP PPP session mapping table for indication the correspondence of a terminal MAC address to an ISP to which the terminal is connected.

Upon receiving a PADI packet broadcasted from a user terminal, the PPPoE session management apparatus determines a destination ISP by referring to the ISP PPP session mapping table, selects a BRAS having the largest number of remaining IP addresses for the destination ISP by referring to the BRAS IP address management table, and transmits the PADI packet after converting it into a unicast packet to the selected BRAS.

In Patent Document 1, however, each BRAS having terminated a PPPoE session has to report the number of PPPoE sessions and the number of remaining IP addresses currently held by it to the PPPoE session management apparatus, in order to make proper the contents of the BRAS IP address management table to be referred by the PPPoE session management apparatus. The PPPoE session management apparatus updates the BRAS IP address management table according to the data reported from each BRAS. According to the load distribution method described in Patent Document 1, therefore, each BRAS must be provided with a new function of reporting the number of PPPoE sessions and the number of remaining IP addresses to the PPPoE session management apparatus.

As to the layer-3 connection service according to PPPoE or layer-2 connection service according to IEEE 802.1X, the present inventors have proposed, as Japanese Patent Application No. 2006-162074, a network topology in which a packet relay apparatus connected to a plurality of user terminals multicasts a PADI packet (or EAPOL-Start packet) received from each user terminal to a transit network, a plurality of gateways (BASs or authenticators) reply PADO (or EAP-Request/ID Request) packets in response to the PADI packet, and the packet relay apparatus forwards only one response packet received from a particular gateway selectively to the requester user terminal. According to the above network topology, redundant gateways become feasible without changing the functionality of each gateway. However, the above patent application does not describe about the control of load distribution among the redundant gateways by the packet relay apparatus.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a packet forwarding apparatus suitable for a network configuration in which an access network connected with a plurality of user terminals and an Internet transit network are connected by a plurality of redundant gateways (GWs), such as BASs and authenticators.

The packet forwarding apparatus according to the present invention can connect each user terminal to one of redundant gateways while implementing load distribution among these gateways, without requiring addition of a special function to each gateway. The packet forwarding apparatus is located between a plurality of user terminals and a plurality of redundant gateways (GWs) connected to a transit network for the Internet.

To achieve the above object, the packet forwarding apparatus of the present invention comprises a plurality of line interfaces each for communicating with one of the user terminals or one of the redundant gateways through connection lines and a protocol processing unit for controlling forwarding of user packets and communication control packets among the plurality of line interfaces.

The protocol processing unit has a load distribution management table for storing connection load status information of each of the redundant gateways in association with an identifier of the gateway. The protocol processing unit is configured to receive a connection initiation request packet transmitted from one of the user terminals to connect the user terminal to the transit network, forward the connection initiation request packet to the plurality of redundant gateways, receive a plurality of response packets replied from the redundant gateways in response to the connection initiation request packet within a predetermined period of time, forward only one response packet transmitted from particular one of the redundant gateways to the user terminal which is the source of the connection initiation request packet, and forward communication control packets and user packets subsequently received from the user terminal to the particular gateway, wherein the response packet to be forwarded to the user terminal is selected from among the plurality of response packets according to the connection load status information stored in the load distribution management table.

Here, if the user terminal is, for example, a PPPoE terminal, the connection initiation request packet is a PADI packet and the response packets from the gateways (BASs) are PADO packets. The source terminal of the PADI packet performs a subsequent communication control procedure according to PPPoE with the source gateway of the PADO packet forwarded by the packet forwarding apparatus.

If the user terminal is, for example, a supplicant in IEEE 802.1X, the connection initiation request packet is an EAPOL-Start packet and the response packets from the gateways (authenticators) are EAP-Request/ID Request packets. The source supplicant of the EAPOL-Start packet performs a subsequent communication control procedure according to IEEE 802.1X with the source gateway of the EAP-Request/ID Request packet forwarded by the packet forwarding apparatus.

The load distribution management table to be referred by the protocol processing unit includes, as the connection load status information, the maximum number of connections acceptable by each of the redundant gateways and the number of existing connections being connected with the gateway at present. In this case, the protocol processing unit specifies the response packet to be forwarded to the user terminal by selecting the particular gateway based on a connection ratio determined for each gateway by the maximum number of connections and the number of existing connections.

In an embodiment of the present invention, the load distribution management table includes, as the connection load status information, the maximum number of connections acceptable by each of said redundant gateways, the number of existing connections being connected with the gateway at present, the connection ratio determined by the maximum number of connections and the number of existing connections, and a connection priority. In this case, the protocol processing unit updates, each time the particular gateway was selected, the number of connections and the connection ratio of the particular gateway in the load distribution management table, calculates a new selection priority level for each of the gateways based on the updated connection ratio of the particular gateway and the connection ratios of the other gateways, stores the new selection priority level as the selection priority for each of the gateways in the load distribution management table, thereby to select a new particular gateway in response to a new connection initiation request packet based on the selection priority levels of the gateways stored in the load distribution management table.

In an embodiment of the present invention, the connection load status information stored in the load distribution management table includes an operation priority indicating the operation mode of each of the gateways, and the protocol processing unit selects the particular gateway from among a plurality of gateways each having the first level of operation priority. The protocol processing unit selects, when the number of connections has reached the maximum number of connections for all the gateways having the first level of operation priority in the load distribution management table, the particular gateway from among a plurality of gateways each having the second level of operation priority. By defining the operation priority levels in the connection load status information, it becomes possible to operate the redundant gateways, dividing into an active group and a standby group.

More specifically, in an embodiment of the present invention, the protocol processing unit is provided with a multi-connection management table for indicating, in association with an identifier of each of said user terminals, the maximum number of connections allowed in advance to each of the user terminals and the number of existing connections the user terminal has at present. By referring to multi-connection management when the connection initiation request packet was received, it becomes possible for the protocol processing unit to discard the connection initiation request packet if the number of existing connections of a user terminal which is the source of the connection initiation request packet has reached the maximum number of connections in the multi-connection management, and to forward the connection initiation request packet to the redundant gateways only when the number of existing connections of the user terminal is less than the maximum number of connections in the multi-connection management.

In an embodiment of the present invention, the protocol processing unit is provided with a connection management table comprising a plurality of table entries each for storing, in association with an identifier of the user terminal which is the source of a connection initiation request packet, a selection priority of a gateway selected as a candidate gateway having a possibility of connecting with the user terminal. In this case, the protocol processing unit registers, into the connection management table when the connection initiation request packet was received, a new table entry including the user terminal identifier extracted from a header of the received packet, compares, each time a response packet replied from one of the redundant gateways in response to the connection initiation request packet was received, the selection priority of the source gateway, which is the source of the response packet, indicated in the load distribution management table and the selection priority indicated in a table entry corresponding to a destination user terminal of the response packet in the connection management table, registers the selection priority of the source gateway into the table entry if the selection priority is not registered in the table entry or if the level of the selection priority of the source gateway is higher than the selection priority registered in the table entry, and holds the response packet in a transmission waiting state. The response packet is forwarded from the protocol processing unit to the requester user terminal having transmitted the connection initiation request packet when timeout of a predetermined timer value is detected

The packet forwarding apparatus of the present invention can function as an L2SW, a PON system, a wireless access point, or a wireless bridge by applying metal line interfaces, optical line interfaces, wireless line interfaces, or line interfaces having an Optical Line Terminal (OLT) function used in a central office for PON (Passive Optical Network) as the line interfaces, respectively.

As the packet forwarding apparatus of the present invention is configured to forward a connection initiation request packet received from a user terminal to redundant gateways and to forward to the user terminal a response packet, which was received from a particular gateway and selected from among a plurality of response packets replied from the redundant gateways based on the connection load status information of each gateway, load distribution among the redundant gateways can be accomplished without special software implementation on each of user terminals and without adding a special function to each gateway. Further, as the algorithm for selecting a particular gateway to be connected with a user terminal can be changed depending on demands of an ISP or telecommunications carrier, it is able to adopt a load distribution desirable for the ISP or telecommunications carrier.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of a packet forwarding apparatus according to the present invention will be described hereinafter with reference to the drawings.

FIG. 1shows a communication network topology to which packet forwarding apparatuses of the present invention are applied. The communication network system presented here includes a wired access network1L, a wireless access network1W, a transit network2belonging to a telecommunications carrier or an ISP, and an Internet network3.

The wired access network1L and the wireless access network1W are connected to the transit network2via gateways (GWs)20L (20L-1,20L-m) and20W (20W-1,20W-m), respectively. Each gateway has a function of terminating communication frames conforming to different protocols such as, for example, IEEE 802.1X and PPPoE.

The wired access network1L includes a plurality of packet forwarding apparatuses10L (10L-1,10L-n) and a plurality of LAN terminals40(40-1to40-n) each connected to one of packet forwarding apparatuses10L. Each of the LAN terminals40has a session connection function conforming to IEEE 802.1X, PPPoE, or the like, Each of the packet forwarding apparatuses10L is connected to a plurality of redundant GWs20L (20L-1,20L-m).

Each packet forwarding apparatus10L according to the present invention has a gateway selecting function of selectively connecting each wired LAN terminal40to one of the redundant GWs20L, as will be described later, in addition to a normal L2SW function of forwarding received packets according to layer 2 header information. In the following description, noting at the gateway selecting function especially, the packet forwarding apparatuses10L will be referred to as “GW selectors”.

A first embodiment of the invention is characterized in that the GW selector has a load distribution control function for connecting the wired LAN terminal40to one of redundant GWs20L (20L-1,20L-m), while distributing the load of the redundant GWs.

In the wired access network1L presented inFIG. 1, a GW selector10L-1communicates with a plurality of wired LAN terminals (40-1to40-k) via individual access lines, and a GW selector10L-n communicates with a plurality of wired LAN terminals (40-mto40-n) via a Passive Optical Network (PON). The PON comprises a plurality of subscriber connection apparatus ONUs (Optical Network Units)50(50-1to50-n), an office side apparatus OLT (Optical Line Terminal) incorporated in the GW selector10L-n, and an optical fiber network with a structure in which one optical fiber connected to the OLT is branched into a plurality of branch optical fibers by a star coupler (S.C.)51-1.

On the other hand, the wireless access network1W comprises a plurality of wireless terminals41(41-1to41-n) each having a session connection function in accordance with IEEE 802.1X, PPPoE, or the like, and a plurality of packet forwarding apparatuses10W (10W-1,10W-n) for communicating with these wireless terminals41. In the exemplified network presented here, a packet forwarding apparatus10W-1has a wireless-wired conversion function and is connected to a plurality of redundant GWs20L (20L-1to20L-m). A packet forwarding apparatus10W-n has a wireless hub function such as frequency conversion, frame conversion and others and is connected to a plurality of redundant GWs20W (20W-1,20W-m).

Each of packet forwarding apparatuses10W (10W-1to10W-n) forming the wireless access network1W also has a gateway selecting function to selectively connect each wireless terminal41to one of the redundant GWs20. Thus, in the following description, these packet forwarding apparatuses10W as well will be referred to as “GW selectors”.

The transit network2comprises a plurality of layer-2 switches (L2SWs)21(21-1to21-n), a user authentication server (RADIUS server)22, a DHCP server23for allocating an IP address to each user terminal, and a router24for connecting the transit network to the Internet network3. In the exemplified network presented here, an L2SW21-1is connected to the router24and a group of redundant GWs (20L-1to20L-m), and an L2SW21-nis connected to the router24and another group of redundant GWs (20W-1to20W-m). Although the RADIUS server22and the DHCP server23are connected to the L2SW21-nhere, at least one of them may be connected to the L2SW21-1. One of the L2SWs21-1and21-nmay be connected to the router24via the other L2SW.

FIG. 2is a diagram to explain the gateway selecting function provided in the GW selector10L-1of the present invention. Other GW selectors10L-n,10W-1to10W-n also have the same gateway selecting function as the GW selector10L-1. An operation will be described below in a case where the GW selector10L-1is connected to four redundant GWs (20LP-1to20LP-4) and receives a session connection request from one of the wired LAN terminals40-1to40-mwhich execute a session connection procedure according to PPPoE. In the figure, “MAC xx-xx-xx-xx-xx-xx” attached to each terminal block and GW block denotes a MAC address value of a wired LAN terminal or GW.

Upon receiving a PPPoE connection request from the wired LAN terminal40-1, the GW selector10L-1performs a connection control procedure, regarding the wired LAN terminal40-1as a PPPoE terminal and the GWs connected to the GW selector10L-1as BASs20LP-1to20LP-4(20L-1to20L-m inFIG. 1).

Upon receiving responses to the connection request from these GWs (BASs), the GW selector10L-1selects any one of GWs, for example, a GW20L-1as an active BAS for the wired LAN terminal40-1and continues a subsequent connection control procedure. Once the active BAS for communicating with the PPPoE terminal40-1has been determined, other GWs20L-2(20LP-2) to20L-m (20LP-m) are not involved in forwarding of packets for the PPPoE terminal40-1.

In a similar manner, the GW selector10L-1selects the GW20L-1(20LP-1) in response to a connection request from a PPPoE terminal40-2and selects the GW20L-3(20LP-3) in response to a connection request from the PPPoE terminal40-m. Each PPPoE terminal40communicates with the Internet3via the GW20selected by the GW selector10L-1. An algorithm of GW selection (load distribution) executed by the GW selector10L-1will be detailed later.

FIGS. 3A to 3Dillustrate the formats of communication control frames to be used in PPPoE.

FIG. 3Ashows the format of a connection initiation packet including PADI (PPPoE Active Discovery Initiation), which is transmitted from a wired LAN terminal40to a GW20.

FIG. 3Bshows the format of a connection initiation response packet including PADO (PPPoE Active Discovery Offer), which is transmitted from the GW20to the wired LAN terminal40.FIG. 3Cshows the format of a session ID notification packet including PADS (PPPoE Active Discovery Session-Confirmation), which is transmitted from the GW20to the wired LAN terminal40.FIG. 3Dshows the format of a disconnection notification packet including PADT (PPPoE Active Discovery Terminate), which is issued by the wired LAN terminal40or the GW20. These communication control frames are provided with an Ethernet header900and a PPPoE header920.

As shown inFIG. 3A, PADI includes a broadcast MAC address (B. C) in a MAC-DA901field and the MAC address of the wired LAN terminal40being the source of the PADI in a MAC-SA902field. In a protocol type903field, a particular value representing PPPoE such as “0x8863” is set. In a frame type921field of the PPPoE header, a code denoting that this PPPoE frame includes “PADI” is set.

As shown inFIG. 3B, PADO includes the MAC address of the wired LAN terminal40being the source of the PADI in the MAC-DA901field and the MAC address of the GW20in the MAC-SA902field. In the protocol type903field, a particular value representing PPPoE such as “0x8863” is set. In the frame type921field of the PPPoE header, a code denoting that this frame includes “PADO” is set.

As shown inFIG. 3C, PADS includes the MAC address of the wired LAN terminal40in the MAC-DA901field and the MAC address of the GW20in the MAC-SA902field. In the protocol type903field, a particular value representing PPPoE such as “0x8863” is set. In the frame type921field of the PPPoE header, a code denoting that this frame includes “PADS” is set. In a session ID922field, the value of a session ID assigned to the wired LAN terminal40from the GW20is set.

As shown inFIG. 3D, PADT includes, if it is transmitted from the wired LAN terminal40to the GW20, the MAC address of the GW20in the MAC-DA901field and the MAC address of the wired LAN terminal40in the MAC-SA902field. In the protocol type903field, a particular value representing PPPoE such as “0x8863” is set. If PADT is transmitted from the GW20to the wired LAN terminal40, the addresses in the MAC-DA901and MAC-SA902fields are reversed. In the frame type921field of the PPPoE header, a code denoting that this frame includes “PADT” is set. In the session ID922field, the ID of the session to be disconnected is set.

FIG. 4illustrates an embodiment of a packet forwarding apparatus (GW selector)10according to the present invention.

The GW selector10comprises a plurality of line interfaces11(11-1to11-n) to which individual port numbers (Port-1to Port-n) are assigned, a routing unit12connected to the line interfaces, a transmitting buffer13T and a receiving buffer13R for buffering communication control packets, a control processor14, and a memory15.

The routing unit12and the control processor14constitute a protocol processing unit for controlling packet forwarding among the line interfaces11. In the memory15, a communication control routine16to be executed by the processor, a monitor target packet table151, a connection management table152, a port management table153, a multi-connection management table154and a load distribution management table155are stored.

The communication control routine16includes receive processing routines for various types of control packets, which will be described later with reference toFIGS. 10 to 15, a load distribution processing routine and a timer monitoring routine.

The monitor target packet table151specifies the types of communication control packets to be processed by the control processor14. Operation mode of the control processor14can be changed by rewriting the contents of the monitor target packet table151from a control terminal50in accordance with input operations by an operator. As to the connection management table152and the port management table153, detailed description will be made later with reference toFIGS. 5 and 6. As to the multi-connection management table154and a load distribution management table155, detailed description will be made later with reference toFIGS. 7 and 8.

If the GW selector10is a GW selector10L-1in a wired access network1L shown inFIG. 1, each of the line interfaces11-1to11-nhas a function of terminating frames conforming to a communication protocol applied to each connection line, such as Ethernet, ATM, and POS (PPP over SONET). If the GW selector10is a GW selector10L-n connected to a PON, each of the line interfaces11-1to11-nis configured to have an OLT function that terminates PON frames such as, for example, GE-PON, G-PON, and WDM-PON.

If the GW selector10is a GW selector10W-1in a wireless access network1W shown inFIG. 1, each of the line interfaces for wireless terminals41has a wireless interface function conforming to a communication protocol applied to a wireless link, such as, for example, IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, IEEE 802.16a, and PHS. Each of the line interfaces for the GWs20has an interface function conforming to a communication protocol applied to a wired LAN section, such as Ethernet, ATM, POS (PPP over SONET), GE-PON, G-PON, and WDM-PON.

If the GW selector10is a GW selector10W-n shown inFIG. 1, each of the line interfaces has a wireless interface function conforming to a communication protocol applied to a wireless link, as is the case of the line interface for the wireless terminal41in the GW selector10W-1.

FIGS. 5A to 5Fillustrate a structure of the connection management table152and changes in the contents of the table.

The connection management table528comprises a plurality of table entries, each having a port number1521of a line interface connected to a terminal. Hereinafter, the port number is referred to as a terminal port number. Each table entry indicates the correspondence of the terminal port number1521to a terminal MAC address1522, a port number1523of a line interface connected to a GW (hereinafter referred to as a GW port number), a GW MAC address1524, a status1525, a timer value1526and priority1527.

The GW MAC1524denotes the MAC address of a GW to be connected with a terminal having the terminal MAC1522. Hereinafter, the GW will be referred to as a candidate GW. The priority1527denotes a level of priority of selecting the candidate GW defined in the load distribution management table155which will be described withFIG. 8. The status1525indicates the current status in a communication control procedure being executed in a session with a user terminal having the terminal MAC address1522. In an illustrative embodiment, the status indicates the type of a communication control packet that the GW selector is waiting to receive or a session ID.

FIG. 6shows an example of the structure of the port management table153.

The port management table153includes a plurality of table entries corresponding to the port numbers1531of the line interfaces11-1to11-n. Each table entry indicates a GW connection flag1532for indicating whether a line interface having the port number1531is connected to connection lines for one of the GWs and a source MAC address1533for indicating the source of each packet received through the line interface.

The port management table153shown here represents the connective relation among the GW selector10L-1, the PPPoE terminals40-1to40-m, and the GWs20LX-1to20LP-2in the network topology schematically shown inFIG. 2, as appreciated from the values of the port number1531and the values in the MAC address1533column. In practical application, the GW connected to the GW selector10L-1may have both functions of authenticator and BAS or may only have either of these functions. In the latter case, the GW operating as an authenticator (or BAS) makes no response to a connection initiation packet of PPPoE (or EAPOL).

FIG. 7shows the structure of the multi-connection management table154.

The GW to be connected to a user terminal is determined depending on the connection load status of the GWs at the time when a connection initiation request is issued. Thus, in a case where a plurality of connection initiation requests are issued from a same user terminal at shifted times, the user terminal may be connected to different GWs for each connection initiation request or connected to a same GW successively.

Assume here that the GW selector10connected to GWs20L-1and20L-2performs load distribution (GW selection) in a state where the maximum number of connections permitted for each GW to communicate with the same terminal is set to “2. In this case, when a user terminal40-1having been connected to the GW20L-1with its first and second connection initiation requests issues a third connection initiation request, if the GW selector10selects the GW20L-2, the user terminal40-1can get access to the Internet via the GW20L-2. However, if the GW selector10selects the GW20L-1again, the third connection initiation request is rejected as an invalid connection request in excess of the maximum number of connections, because the number of connections of the user terminal40-1has already reached the maximum number “2”.

The multi-connection management table154in the present embodiment is used to restrict the number of multi-connection requests from the same terminal and comprised of a plurality of table entries for managing the number of connections for each terminal. Each table entry indicates the correspondence of a terminal MAC address1541to the maximum number of connections1542permitted for the terminal and the number of connections1543being established at the present. By managing the number of multi-connections for each user terminal, independently of the GW to be the target of connections, the present invention can permit user terminals to have equitable multi-connections, no matter which GW is selected by load distribution.

The values of terminal MAC1541and maximum number of connections1542can be set beforehand from the control terminal50. The maximum number of connections1542is basically designated for each terminal identified by the terminal MAC1541. However, for a certain table entity, the maximum number of connections1542may be designated while setting the value of terminal MAC1541to Don't Care (D.C), so that the total number of connections of terminals having MAC addresses not registered in the multi-connection management table154can be controlled within the range of the maximum number of connections specified in the D.C entry. If such a D.C entry is not prepared in the multi-connection management table154, connection requests from user terminals having MAC addresses not registered in the multi-connection management table154are discarded.

FIGS. 8A to 8Dillustrate an example of a structure of the load distribution management table155and changes in the contents of table entries.

The load distribution management table155comprised of a plurality of table entries, each having a MAC address1551of one of GWs20. Each table entry indicates the correspondence among a GW MAC address1551, operation priority1552, selection priority1553, connection ratio1554, the maximum number of connections1555, and the number of connections1556. The values of GW MAC1551, operation priority1552, and maximum number of connections1555are set beforehand from the control terminal50. The selection priority1553has a variable priority level that is updated each time the GW having the GW MAC1551is selected according to gateway selection carried out in response to a connection initiation request from any terminal.

Using the above load distribution management table155, for example, the plurality of GWs to be the objects of load distribution can be divided into a high priority gateway group and a low priority gateway group according to the level of the operation priority1552. In this case, by distributing the connection load within the group of high priority GWs, it is possible to operate the GWs in such a manner that the high priority GWs act as active GWs and the low priority GWs act as standby GWs, independently of the number of connections1556of the low priority GWs.

For example, if GWs having the highest operation priority of “1” are operated in an active mode and GWs having operation priorities of “2” and “3” are placed in standby mode, when a failure occurs in any active GW, one of the standby GWs can be switched to active mode in descending order of operation priority. Alternatively, load may be distributed among GWs having the operation priority of “1” and operating as active ones and, when all active GWs have reached a connection ratio of 100%, a GW having the operation priority of “2” is selected as the one to be connected with a user terminal.

In an illustrative embodiment, load balanced selection among the GWs is realized by changing, each time a GW is selected within the group of active GWs, the levels of selection priority1553for each GW according to, for example, the values of the connection ratio1554or the number of connections1556, and by determining a GW for the next connection request according to these selection priority levels.

Returning toFIG. 4, when a packet is received from one of the line interfaces11-1to11-n, the routing unit12registers the correspondence of the port number of the line interface having received the packet to the source MAC address (MAC-SA902) of the received packet into the port management table153and determines whether the received packet is a communication control packet of PPPoE, as illustrated inFIG. 3, or IEEE 802.1X or the like which is not illustrated herein, from the header information of the received packet.

If the received packet is such a communication control packet, the routing unit12forwards the received packet and the port number of a line interface having received the packet to the control processor14via the receiving buffer13R. The control processor14reads out the communication control packet and the port number from the receiving buffer13R and performs gateway selection and packet processing according to a communication protocol, as will be described later. The communication control packet to be transmitted to an external line is forwarded from the control processor14to the routing unit12via the transmitting buffer13T.

The routing unit12performs routing of user packets received through the line interfaces11-1to11-nand communication control packets received from the control processor14via the transmitting buffer13T, according to the port management table153. Specifically, the routing unit12searches the port management table153for a table entry having a MAC address1533matched with the destination MAC address (MAC-DA901) of a received packet and forwards the received packet to a particular line interface specified by the port number1531in the searched table entry.

If there is no table entry corresponding to the destination MAC address in the port management table153, or if the destination address of the received packet is a broadcast or multicast address, the routing unit12forwards the received packet to all ports (line interfaces) other than the port having received the packet. However, if the communication control packet read out from the transmitting buffer13T is a connection initiation request packet (EAPOL-Start packet or PADI packet), the routing unit12broadcasts the packet to all the ports for which the GW connection flag1532is in a “1” state in the port management table153.

The types of communication control packets to be monitored by the control processor14are designated in the monitor target packet table151. The control processor14determines whether the communication control packet read out from the receiving buffer13R is a monitor target. If the communication control packet is not a monitor packet, the control processor14immediately outputs the packet to the transmitting buffer13T. If the communication control packet read out from the receiving buffer13R is a monitor target, the control processor14updates the connection management table152in accordance with the communication control routine16and outputs the communication control packet to the transmitting buffer13T.

As will be described later, the control processor14according to the first embodiment connects a user terminal to a particular GW by forwarding to the user terminal one of response packets replied from a plurality of GWs20in response to the connection initiation request and by discarding the other response packets.

The packet forwarding apparatus (GW selector)10of the present invention can perform above GW selection in several ways. For example, (1) the GW selector selects, from among a plurality of response packets (EAP-Request/ID Request or PADO) transmitted from a plurality of redundant GWs in response to the same connection initiation request (EAPOL-Start or PADI), a response packet having been received first as an active one and discards the other response packets having been received subsequently; (2) the GW selector selects, from among a plurality of response packets having been received within a predetermined period of time, a response packet transmitted from a GW that is different from a previously selected GW as an active one and discards the other response packets; and (3) the GW selector previously gives a priority level to each of GWs forming a redundant GW group and selects a response packet transmitted from a GW having the highest priority level from among a plurality of response packets having been received within a predetermined period of time.

In order to distribute load among a group of redundant GWs, the methods (2) and (3) are effective. In the illustrative embodiment which will be described below, the GW selector selects a GW according to the method described in (3), based on the selection priority levels assigned to the GWs.

Next, PPPoE connection control by the GW selector of the present invention will be described with reference toFIGS. 5to15. Here, the connection control will be described in a case where the GW selector10L-1shown inFIG. 2adopts a GW selection algorithm in which, among response packets (PADO) received from the GWs20L-1to20L-4(BASs20LP-1to20LP-4), a packet received from a GW having the highest selection priority is selected as an active one and the selection priority of the GW selected this time is changed to a lower level, so that a response packet from another GW having the highest selection priority will be selected as an active one when a next connection initiation request is issued.

As illustrated inFIG. 9, when a terminal (PPPoE terminal)40-2broadcasts a PADI packet (SQ110), a PPPoE connection phase SP1starts. When the PADI packet is received, the routing unit12of the GW selector10L-1outputs the received packet to the receiving buffer13R together with a port number “m” of a line interface having received the packet.

Upon receiving the PADI packet, the control processor14executes a PADI packet receive processing routine130illustrated inFIG. 10. The PADI packet receive processing routine130constitutes a part of the communication control routine16, together with a PADO packet receive processing routine140, a PADS packet receive processing routine150, a GW load distribution processing routine160, a timer monitoring routine170, and a PADT packet receive processing routine300, which will be described later.

In the PADI packet receive processing routine130, the control processor14determines whether PADI is specified as a monitor target packet (131) by referring to the monitor target packet table151. If PADI is not specified as a monitor target, the control processor14forwards the received PADI packet to the routing unit12(138) via the transmitting buffer13T and exits this routine.

In the present embodiment, it is assumed that PADI is specified as a monitor target. In this case, the control processor14searches the multi-connection management table154for a table entry including a terminal MAC address1541matched with a value “00-00-00-00-00-02” of the source MAC address (MAC-SA902) of the received packet (132).

As a result of the table search (133), if a table entry corresponding to the MAC-SA of the received packet is not found, the control processor14discards the received packet (139) and exits this routine. If a table entry corresponding to the MAC-SA of the received packet is found, the control processor14regards the PADI as a connection request that was transmitted for establishing another connection in the form of multi-connection from the same user and compares the number of connections1543and the maximum number of connections1542(134). If the number of connections1543is equal to or greater than the maximum number of connections1542, the control processor14discards the received packet (139) and exits this routine.

If the number of connections1543is less than the maximum number of connections1542, the control processor14adds one to the number of connections1543in the retrieved table entry (135) and registers a new table entry ENm into the connection management table152(136). As illustrated inFIG. 5A, the table entry ENm includes, as the terminal port1521, the port number “m” notified from the routing unit12, the source MAC address “00-00-00-00-00-02” of the received packet as the terminal MAC1522, and PADO waiting state as the status1525. Next, the control processor14initializes the timer value1526in the table entry ENm to a predetermined value and starts the timer monitoring routine170(137), which will be described later withFIG. 13. After that, the control processor14forwards the received PADI packet to the transmitting buffer13T (138) and exits this routine.

Upon receiving the PADI packet from the control processor14, the routing unit12broadcasts the PADI packet to a plurality of line interfaces connected to the GWs, according to the table entries having the GW connection flag1532set to “1” in the port management table153(SQ111-1to SQ111-4).

The BASs20LP-1to20LP-4reply PADO packets in response to the above PADI packet, respectively (SQ112-1to SQ112-4). The destination MAC address (MAC-DA901) of the PADO packets indicate the MAC address “00-00-00-00-00-02” of the PPPoE terminal40-2.

The routing unit12of the GW selector10L-1outputs the first received PADO packet transmitted, for example, from the GW (BAS)20LP-3and a port number “5” indicating the line interface having received the PADO packet to the receiving buffer13R. The second received PADO packet transmitted from the GW (BAS)20LP-2is output to the receiving buffer13R together with a port number “n” indicating the line interface having received the packet. The third received PADO packet transmitted from the GW (BAS)20LP-1is output to the receiving buffer13R together with a port number “4” indicating the line interface having received this packet. The last received PADO packet transmitted from the GW (BAS)20LP-4is output to the receiving buffer13R together with a port number “k” indicating the line interface having received this packet.

Upon reading out the PADO packet transmitted from the GW (BAS)20LP-3from the receiving buffer13R, the control processor14executes a PADO packet receive processing routine140illustrated inFIG. 11. First, the control processor14searches the connection management table152for a table entry including a terminal MAC1522matched with the value “00-00-00-00-00-02” of the destination MAC address (MAC-DA901) of the PADO packet (141).

As a result of the table search (142), if a table entry ENm matched with the destination MAC address is found, the control processor14judges whether the status1525in the table entry ENm is PADO waiting state (144). If the status1525is other than PADO waiting state, the control processor14regards the received PADO packet as an invalid packet, discards the received packet (145), and exits this routine.

In the present example, as shown inFIG. 5A, the status1525is PADO waiting state in the table entry ENm retrieved from the connection management table152. Then, the control processor14executes a GW load distribution processing routine160illustrated inFIG. 12.

By the way, if PADI was not specified as a monitor target packet, registration of a table entry ENm having the terminal MAC address “00-00-00-00-00-02” into the connection management table152is not performed in the PADI packet receive processing130described inFIG. 10. In this case, the control processor14fails in searching a table entry matched with the destination MAC address.

When having failed in searching a table entry looked for in the connection management table152, the control processor14creates a new table entry ENm based on the PADO packet, registers the table entry into the connection management table152(143), and executes the GW load distribution processing routine160.

The table entry ENm created this time includes the value “00-00-00-00-00-02” of the destination MAC address (MAC-DA901) in the received PADO packet as the terminal MAC1522, the value “00-00-00-22-22-03” of the source MAC address (MAC-SA902) of the PADO packet as the GW MAC1524, and the port number “m” corresponding to the above destination MAC address “00-00-00-00-00-02” in the port management table153as the terminal port1521. The value of terminal port1521, however, may be omitted.

As illustrated inFIG. 12, in the GW load distribution processing routine160, the control processor14searches the load distribution management table155for a table entry including a GW MAC1551matched with the value “00-00-00-22-22-03” of the source MAC address (MAC-SA902) in the received PADO packet (161).

As a result of the table search (162), if no entry matched with the source MAC address was found, the control processor14regards the received PADI packet as a packet transmitted from an unregistered invalid GW, discards the received packet (167), and exits the GW load distribution processing routine160. When the processor terminates the GW load distribution processing routine160, the PADO packet receive processing routine140shown inFIG. 11is terminated as well.

If a table entry matched with the source MAC address of the received packet is found from the load distribution management table155, the control processor14judges whether the level of the operation priority1552in the retrieved table entry is the highest priority “1” (163). If the operation priority level is not “1”, the control processor14regards the received packet as the one transmitted from a standby GW, discards the received packet (167), and exits the GW load distribution processing routine160. If the operation priority level is “1”, the control processor14compares the selection priority1553level specified in the table entry and the priority1527level specified in the connection management table152(164).

In the present example, as the operation priority1552level is the highest level “1”, the control processor14compares the selection priority1553level specified in the table entry and the priority1527level specified in the table entry ENm in the management table152(164).

When the received packet is the first received PADO packet addressed to the terminal40-2(terminal MAC: “00-00-00-00-00-02”), the priority1527level is not set in the table entry ENm, as shown inFIG. 5A. In this case, the control processor14determines that the selection priority1553level is higher than the priority1527level (165) and registers, as shown inFIG. 5B, the address value “00-00-00-22-22-03” of the GW20LP-3specified in the source MAC address (MAC-SA902) of the received packet (PADO) to the GW MAC1524of the table entry ENm, sets the selection priority1553level “12” to the priority1527, and sets the port number “5” of the line interface having received the PADO packet to the GW port number1523(166).

At this time, the GW (BAS)20LP-3becomes a candidate GW for connecting with the terminal40-2. The control processor14exits the GW load distribution processing routine, holding the PADO packet received from the GW (BAS)20LP-3in a forwarding wait state.

In the example shown inFIG. 9, the PADO packet transmitted from the GW (BAS)20LP-2is received as the second PADO packet (SQ112-2). When the PADO packet from the GW (BAS)20LP-2and the port number are read out from the receiving buffer13R, the control processor14executes the PADO packet receive processing routine140and executes the GW load distribution processing routine160through a similar process as for the first PADO packet. At this time, a table entry having a value “00-00-00-22-22-02” as the GW MAC1551is retrieved from the load distribution management table155(161). Because the operation priority1552of the GW (BAS)20LP-2is set to “2” in this table entry, the judging result of step163is NO. Then, the control processor discards the received packet (167) and exits the GW load distribution processing routine.

Likewise, when the PADO packet received from the GW (BAS)20LP-1is read out as the third PADO packet from the receiving buffer13R, a table entry having a value “00-00-00-22-22-01” as the GW MAC1551, as illustrated inFIG. 8A, is retrieved from the load distribution management table155. From the retrieved table entry, the processor knows that the GW (BAS)20LP-1has the operation priority level “1” and its selection priority1553is “11”, and judges that the GW (BAS)20LP-1has a higher selection priority than the priority level “12” of the candidate GW registered in the connection management table152.

Thus, in the GW load distribution processing routine160executed when the above PADO packet is received, the control processor14selects the GW (BAS)20LP-1as a new candidate GW replacing the GW (BAS)20LP-3and updates the values of the GW port1523, GW MAC1524, and priority1527in the table entry ENm of the connection management table152, as illustrated inFIG. 5C(166). In this case, the control processor14discards the PADO packet received from the GW (BAS)20LP-3, which has so far been held, and exits the GW load distribution processing routine, holding the PADO packet received from the GW (BAS)20LP-1in a forwarding wait state.

When a PADO packet received from the GW (BAS)20LP-4is read out as the fourth PADO packet from the receiving buffer13R, a table entry having a value “00-00-00-22-22-04” as the GW MAC1551, as illustrated inFIG. 8A, is retrieved from the load distribution management table155. From the table entry, the processor knows that the GW (BAS)20LP-4has the operation priority level “1” and the value of selection priority1553is “13”, and that the selection priority of the GW20LP-4is lower than the priority level “11” of the candidate GW specified in the table entry ENm of the connection management table152.

Thus, in the GW load distribution processing routine160executed when the above PADO packet is received, the control processor14discards the received packet (167) and exits the GW load distribution processing routine, holding the PADO packet received from the GW (BAS)20LP-1in a forwarding wait state.

FIG. 13shows a flowchart of the timer monitoring routine170.

The timer monitoring routine170is activated when a PADI packet is received and executed periodically by the control processor14in parallel with the PADO packet receive processing routine140and GW load distribution processing routine160.

In the timer monitoring routine170, the control processor14waits for expiry (timeout) of the timer value1526set in the table entry ENm of the connection management table152(171). Upon detecting the timeout of the timer value1526, the control processor14adds one to the number of connections1556and recalculates the connection ratio1554in a table entry of the load distribution management table155(172). The table entry is corresponding to the MAC address of the GW selected this time, that is, the MAC address1524of the candidate GW specified in the table entry ENm of the connection management table152.

Next, the control processor14reassigns selection priority1553in ascending order of connection ratio1554or the number of connections1556in a plurality of table entries having a value “1” as the operation priority1552registered in the load distribution management table155(173).

In the present example, by executing step172, as shown inFIG. 8B, the value of the number of connections1556is changed from “999” to “1000” and the value of connection ratio1554is changed from “19.98” to “20.00” in the table entry having GW MAC1551“00-00-00-22-22-01” for the GW which remains as the candidate GW. By executing step173, as shown inFIG. 8B, the level of selection priority1553of the GW MAC1551“00-00-00-22-22-01” is changed from “11” to “13”, and levels of selection priority1553of GW MAC1551“00-00-00-22-22-03” and “00-00-00-22-22-04” are changed from “12” to “11” and from “13” to “12”, respectively, for the GWs remaining as candidate GWs.

Upon completing the reassignment of selection priority1553, the control processor14changes, as shown inFIG. 5D, the status1525in the table entry ENm of the connection management table152to PADS waiting (174), forwards the PADO packet, which was received from the candidate GW and held in a transmission waiting state, to the transmitting buffer13T (175), and exits this routine.

If, the number of connections1556of the candidate GW indicated in the load distribution table155has reached the maximum number of connections1555as the result of execution of step172, the candidate GW cannot accept a new connection request. In this case, the selection priority1553of this GW is set at the lowest level value until the number of connections1556decreases, so that, by judging the selection priority in step163of the GW load distribution processing routine160, a PADO from the GW whose selection priority is the lowest level can be discarded. As the lowest level value, a value with the lowest position digit of “0”, for example, “10”, “20”, etc. may be used.

In the GW load distribution processing routine160illustrated inFIG. 12, all PADO packets received from GWs whose operation priority1552is not “1” are discarded. However, if the number of connections1556has reached the maximum number of connections1555for all active GWs whose operation priority1552is set to “1”, that is, when their selection priority levels were set at the lowest level, one or more GWs whose operation priority is set to “2” may be added to the GW group within which load distribution is carried out. This means that, when the result of the decision at step163is NO in the GW load distribution processing routine160, the control processor14checks the selection priority1553level in all the table entries having level “1” of the operation priority1552in the load distribution management table155, and executes step164if all the selection priority1553level has been set to the lowest level value.

Upon receiving the PADO packet from the control processor14via the transmitting buffer13T, the routing unit12refers to the port management table153based on the destination MAC address (MAC-DA901) of the received packet. In the present example, the destination MAC address of the PADO packet is “00-00-00-00-00-02” and the port management table153designates, as shown inFIG. 6, the port number “m” for connection to the PPPoE terminal40-2as the port number1531corresponding to the MAC address “00-00-00-00-00-02”. The routing unit12transmits, therefore, the PADO packet through the line interface having the port number “m” (SQ113).

Upon receiving the PADO packet, the PPPoE terminal40-2transmits a PADR packet addressed to the GW (BAS)20LP-1which is the source of the PADO packet (SQ114). In the present embodiment, as illustrated inFIG. 5D, the status1525of the table entry ENm corresponding to the terminal40-2is set into a waiting state of PADS to be replied in response to the PADR, in the connection management table152. Thus, when the PADR packet was received from the routing unit12, because the PADR packet is excluded from the monitor targets of the GW selector10L-1, the control processor14of the GW selector10L-1immediately forwards this packet to the routing unit12. Upon receiving the PADR packet, the routing unit12routes this received packet according to the port management table153.

The destination MAC address (MAC-DA901) of the PADR packet indicates the MAC address “00-00-00-22-22-01” of the GW (BAS)20LP-1and the port management table153stores a port number “4” of a connection line for the GW (BAS)20LP-1in association with the value of the above destination MAC address. The PADR packet is forwarded, therefore, to the GW (BAS)20LP-1through the line interface11-4(SQ115).

The GW (BAS)20LP-1replies a PADS packet in response to the PADR (SQ116). Upon receiving the PADS packet, the routing unit12of the GW selector10L-1outputs it to the receiving buffer13R, together with the port number “4” of the line interface having received the RADS packet.

Upon receiving the PADS packet, the control processor14executes a PADS packet receive processing routine150illustrated inFIG. 14.

In the PADS packet receive processing routine150, the control processor14searches the connection management table152, using a search key comprising the port number “4” notified from the routing unit12and the destination MAC address “00-00-00-00-00-02” (MAC-DA901) and the source MAC address “00-00-00-22-22-01” (MAC-SA902) of the received packet, for a table entry including a GW port1523, terminal MAC1522, and GW MAC1554matched with respective key items of the search key (151).

If a table entry ENm matched with the search key is found as a result of the table search (152), the control processor14sets, as the status1525of the above table entry, the value of a session ID (“1,000” in this example) specified in the received PADS packet (153), as illustrated inFIG. 5E, forwards the PADS to the routing unit12via the transmitting buffer13T (154), and exits this routine.

Because the destination address (MAC-DA901) of the above PADS packet is “00-00-00-00-00-02”, the routing unit12forwards the PADS packet to a line interface having a port number “m” designated by the port management table153shown inFIG. 6, whereby the PADS packet is transmitted to the PPPoE terminal40-2(SQ117).

If there is no table entry matched with the search key in the connection management table152, the control processor forwards the received PADS to the routing unit12(154) and exits this routine. This event occurs in such a case that, for example, a table entry has been deleted automatically when the control processor14detects that a session having a session ID indicated in the table entry ceases communication for more than a predetermined period of time.

Upon receiving the PADS packet, the communication phase of the PPPoE terminal40-2shifts from the PPPoE connection phase SP1to a PPPoE forwarding phase SP2.

During the PPPoE forwarding phase SP2, the GW selector10L-1forwards user packets (SQ200) and Keepalive packets (SQ210to213) communicated between the PPPoE terminal40-2and the GW (BAS)20LP-1.

During the PPPoE forwarding phase SP2, the GW (BAS)20LP-1converts PPPoE packets received from the PPPoE terminal40-2(SQ200) via the GW selector10L-1into IP packets and forwards them to the router24(SQ201). The GW (BAS)20LP-1also converts IP packets received from the router24(SQ201) into PPPoE packets and forwards them to the PPPoE terminal40-2(SQ200) via the GW selector10L-1. The GW (BAS)20LP-1issues a Keepalive request periodically (SQ210) and makes sure of the operating state of the PPPoE terminal40-2by receiving a response packet (Keepalive acknowledge) from the terminal.

When the terminal user terminates the access to the Internet, a connection termination packet PADT addressed to the GW (BAS)20LP-1is transmitted from the PPPoE terminal40-2(SQ310) and the communication phase shifts from the PPPoE forwarding phase SP2to a PPPoE disconnection phase SP3.

When the GW selector10L-1receives the PADT packet, the routing unit12executes a PADT packet receive processing routine300illustrated inFIG. 15. In the PADT packet receive processing routine300, the control processor14searches the connection management table152using a search key comprising the port number “m” of a line interface having received the PADT packet and the source MAC address “00-00-00-00-00-02” (MAC-SA902) and the destination MAC address “00-00-00-22-22-01” (MAC-DA901) of the received packet, for a table entry having the terminal port1521, terminal MAC1522, and GW MAC1524matched with respective key items of the above search key (301). The port number, however, may be excluded from the search key items.

As a result of the search (302), if a table entry ENm matched with the search key is found, the control processor14judges whether the value of the session ID designated by the status1525in the table entry coincides with the session ID value “1,000” specified as the session ID922in the received PADT packet (305).

If it was found that the two session IDs coincide with each other as the result of the decision (306), the control processor14deletes the table entry ENm from the connection management table152(307), as illustrated inFIG. 5F, and decrements, in the table entry having the address value “00-00-00-22-22-01” as GW MAC1551in the load distribution management table155, the value of the number of connections1556by one and recalculates the connection ratio1554. After that, the control processor14performs reassignments of selection priority1553for active GWs in ascending order of the number of connections1556or connection ratio1554(308).

When the contents of the load distribution management table155are in a state shown inFIG. 8C, for example, the selection priority is changed, by executing the step308, from “10” to “11” in the table entry having the address value “00-00-00-22-22-01” as the GW MAC1551, as shown inFIG. 8D.

The control processor14then decrements the value of the number of connections1543by one (309) in the entry having the address value “00-00-00-00-00-01” as the terminal MAC1541in the multi-connection management table154, forwards the received packet to the routing unit12via the transmitting buffer13T (312), and exits this routine.

If the session IDs do not coincide with each other in the judging step306, the control processor14searches the load distribution management table155, using the value “00-00-00-22-22-01” of the destination MAC address (MAC-DA901) as a search key, for a table entry having the GW MAC1551matched with the search key (310). As a result of the table search (311), if the table entry looked for is found, the control processor14executes the steps309and312. If the table entry looked for is not found, the control processor14regards the received PADT packet as irrelevant to itself, discards the received packet (313), and exits this routine.

If the received packet is a PADT packet issued from the GW (BAS)20LP-1side, it turns out in the judging step302that the table entry looked for is not in the connection management table152, as the result of searching the connection management table152. In this case, the control processor14changes the combination of search key items and searches the connection management table152, using the destination MAC address (MAC-DA901) “00-00-00-00-00-02” of the received packet, port number “4”, and source MAC address (MAC-SA902) “00-00-00-22-22-01” of the received packet as a new search key, for a table entry having the terminal MAC1522, GW port1523, and GW MAC1524matched with respective key items of the search key (303).

As a result of the table search (304), if the table entry looked for is found, the control processor14executes the steps305to311described above. If the table entry looked for is not found, the control processor14searches the load distribution management table155, using the source MAC address (MAC-SA902) “00-00-00-22-22-01” as a search key, for a table entry having the GW MAC1551matched with the search key (310), executes the steps309to312or step313depending on the result of table search, and exits this routine.

Upon receiving the PADT packet from the control processor14, the routing unit12specifies the port number1531of an output port (line interface) from the port management table153and forwards the PADT packet to the BAS20LP-1via the output port (SQ311).

In the above-described embodiment, the control processor14determines whether each communication control packet received is a monitor target packet by referring to the monitor target packet table151, but this determination may be performed by the routing unit12so that the routing unit12selectively forwards only communication control packets to be monitor targets to the control processor14. Further, in the above-described embodiment, the processing for gateway selection is performed by the control processor14, but the function of the control processor14described in the embodiment may be implemented in the routing unit12, if it poses no problem in the processing performance of the routing unit12.

As can be appreciated from the above-described embodiment, according to the present embodiment, the packet forwarding apparatus (GW selector) broadcasts a connection initiation request packet received from a PPPoE terminal40to a plurality of redundant GWs (BASs), takes only one response packet received from a particular GW as the active one, that is selected from among a plurality of response packets received within a predetermined period of time in accordance with a predetermined gateway selection algorithm (load distribution algorithm), and forwards the selected packet to the requester terminal. The PPPoE terminal40carries out the subsequent communication control procedure with the particular GW having transmitted the selected response packet. According to the packet forwarding apparatus (GW selector) of the present invention, therefore, load distribution among the redundant GWs (BASs) can be accomplished independently of implementation on PPPoE terminals40. Furthermore, it is not necessary to add a special function, e.g., as introduced in Patent Document 1, to each GW (BAS).

While the procedure for controlling a connection between a PPPoE terminal40and one of redundant GWs (BASs) has been described in the embodiment, the features of the GW selector of the present invention can be applied to the procedure for controlling a connection between a supplicant (user terminal) and an authenticator (GW) in IEEE 802.1X. In the latter case, an EAPOL-Start packet is used as a connection initiation request packet, and an EAP-Request/ID Request packet and an EAPOL-logoff packet are used as a response packet from the GW (authenticator) and a disconnection request packet, respectively. Accordingly, the protocol processing unit should be provided with an EAPOL-Start packet receive processing routine corresponding to the PADI packet receive processing routine130, an EAP-Request/ID Request packet receive processing routine corresponding to the PADO packet receive processing routine140, and an EAPOL-logoff packet receive processing routing corresponding to the PADT packet receive processing routine300.

Furthermore, by providing the protocol processing unit with a function of discriminating communication protocols so as to execute a processing routine for PPPoE when a PPPoE packet such as PADI is received, and to execute a processing routine for IEEE 802.1X when a packet for IEEE 802.1X such as an EAPOL-Start packet is received, it is able to coexist diverse user terminals using different communication protocols, such as PPPoE terminals and EAPOL terminals (supplicants) in IEEE 802.1X, in a same layer-2access network. In this case, the connection management table152may include table entries for IEEE 802.1X (EAPOL) in addition to table entries for PPPoE shown inFIG. 5.