CN108965363B - Method and equipment for processing message - Google Patents

Method and equipment for processing message Download PDF

Info

Publication number
CN108965363B
CN108965363B CN201710359622.7A CN201710359622A CN108965363B CN 108965363 B CN108965363 B CN 108965363B CN 201710359622 A CN201710359622 A CN 201710359622A CN 108965363 B CN108965363 B CN 108965363B
Authority
CN
China
Prior art keywords
client
access
network
gateway
mac address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710359622.7A
Other languages
Chinese (zh)
Other versions
CN108965363A (en
Inventor
杨丽楣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710359622.7A priority Critical patent/CN108965363B/en
Publication of CN108965363A publication Critical patent/CN108965363A/en
Application granted granted Critical
Publication of CN108965363B publication Critical patent/CN108965363B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the application provides a method for accessing a network, which comprises the following steps: the first gateway receives an Ethernet point-to-point protocol PPPoE activation discovery initial PADI message sent by a client. And the first gateway acquires the MAC address of the client from the PADI message. And the first gateway determines the client as the client with network access failure according to the MAC address of the client and the access information table. And the first gateway stops sending a PPPoE activation discovery service (PADO) message to the client. The method can reduce resource waste caused by that the client can only establish a session with the BRAS which replies the PADO message more quickly and cannot access other gateways with residual addresses in the process that the client accesses the network.

Description

Method and equipment for processing message
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and a device for accessing a network.
Background
The authentication process of the Ethernet Point-to-Point Protocol over Ethernet (PPPoE) includes a discovery phase and a session phase. The client discovers the gateway supporting PPPoE in a broadcast mode in a broadcast domain where the client is located in a discovery phase. Taking an example that a gateway is a broadband remote access server (BRAS for short), a client discovers BRAS supporting PPPoE in a broadcast manner and selects one BRAS to establish a session. The Discovery phase is realized by that the client end broadcasts PPPoE Active Discovery initial (PADI for short) message to the broadcast domain. After receiving the PADI message, any BRAS supporting PPPoE returns a PPPoE Active Discovery Offer (PADO) message to the client. The client receives a plurality of PADO messages, and the client needs to select one PADO message and establish a session with the corresponding BRAS. The client sends authentication information to the BRAS that established the session with the user.
Multiple BRAS exist in the broadcast domain where the client is located, and the multiple BRAS support PPPoE. In the discovery phase, after receiving the PADI message, a plurality of BRAS reply the PADO message to the client device. The client establishes a session with the BRAS corresponding to the received first PADO message and performs authentication. The client will discard other PADO messages. Therefore, the client establishes a session only with the BRAS which replies the PADO message faster, which causes the address pool under the BRAS interface which replies the PADO message faster to be exhausted quickly. The BRAS equipment still replies a PADO message to the client under the condition that no available address exists, so that the client cannot access other BRAS with the remaining addresses, and resource waste is caused.
Disclosure of Invention
The embodiment of the application provides a network access method, equipment and a storage medium, which are beneficial to avoiding resource waste in the process of accessing a client to a network.
In a first aspect, a method for accessing a network is provided, where the method includes: and the first gateway receives the PADI message sent by the client. The PADI message includes a Media Access Control (MAC) address of the client. And the first gateway acquires the MAC address of the client from the PADI message. And the first gateway determines the client as the client with network access failure according to the MAC address of the client and the access information table. The access information table includes the MAC address of the client that failed the access network. And the first gateway stops sending the PADO message to the client.
By the scheme, the first gateway determines whether the client is the client with network access failure according to the MAC address carried in the PADI message and the first gateway access information table, and if the client is determined to be the client with network access failure, the first gateway stops sending the PADO message to the client, so that the situation that the client establishes a session with a BRAS which replies the PADO message quickly but has a consumed address pool is avoided, and the client cannot access other gateways with residual addresses, and resource waste is caused.
With reference to the first aspect, in a first possible implementation manner, the determining, by the first gateway, that the client is a client that fails in accessing the network according to the MAC address of the client and the access information table includes: and the first gateway searches the access information table according to the MAC address of the client. And when the access information table comprises the MAC address of the client, the first gateway determines that the client is the client with the failed access network.
Through the scheme, the first gateway can establish the access information table and record the MAC address of the client with the network access failure. When the first gateway receives the PADI message, the MAC address in the PADI message is searched in the MAC address in the access information table, and whether the client sending the PADI is accessed to the client with the failure of the first gateway or not is determined according to the MAC address.
With reference to the first aspect, in a second possible implementation manner, the method further includes: the first gateway obtains the MAC address of the client terminal which fails to access the network. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. And the first gateway adds the MAC address of the client with the failed access network to the access information table.
By the scheme, the client with network access failure caused by the insufficient address pool of the first gateway can be prevented from accessing the first network again, and the client with network access failure caused by the insufficient address pool of the first gateway can be prevented from accessing the first network again.
With reference to the first aspect, in a third possible implementation manner, the access information table further includes a port identifier of an access network failure. And the port with the failed access network is a port accessed by the client with the failed access network on the first gateway. The method further comprises the following steps: and the first gateway acquires a port identifier for receiving the PADI message. The first gateway determines that the client is the client with network access failure according to the MAC address of the client and the access information table, and the method comprises the following steps: and when the access information table comprises the MAC address of the client and the port identification for receiving the PADI message, the first gateway determines that the client is the client with the failed access network.
By the scheme, the port identification of the access network failure is added in the access information table, so that the first gateway determines whether the client is the client with the access network failure according to the MAC address of the client and the port identification used for receiving the PADI message, the client can be more accurately determined whether the client is the client with the access network failure, the client with the access network failure in the first gateway can not access other ports with the residual address pool in the first gateway, and the waste of resources is reduced.
With reference to the first aspect, in a fourth possible implementation manner, the method further includes: the first gateway obtains the MAC address of the client terminal which fails to access the network and the port accessed by the client terminal which fails to access the network. And the client with the network access failure is the client with the network access failure caused by the shortage of the first gateway address pool. And the first gateway adds the MAC address of the client with the failed access network and the port identification accessed by the client with the failed access network to the access information table.
Through the scheme, the first gateway records the MAC address and the port identification of the client with the network access failure in the access information table and is used for determining whether the client is the client with the network access failure.
With reference to the first aspect, in a fifth possible implementation manner, the access information table further includes a network access failure duration of the client that has failed to access the network, and the method further includes that when the first gateway detects that the client that has accessed the first gateway is offline, the first gateway removes the MAC address of the client in the access information table according to the network access failure duration.
Because the client terminal accessed to the first gateway can be offline and the first gateway can also have an available address pool, the MAC address of the client terminal recorded in the access information table is periodically cleared, so that the client terminal which is failed to access the network can access the network through the first gateway, the access efficiency is improved, and the waste of resources is reduced.
In a second aspect, a gateway device is provided. The device comprises a receiving unit, a first acquiring unit, a determining unit and a sending unit. The receiving unit is used for receiving the PADI message sent by the client. The PADI packet includes the MAC address of the client. The first obtaining unit is used for obtaining the MAC address of the client from the PADI message. The determining unit is used for determining the client as the client failing to access the network according to the MAC address of the client and the access information table acquired from the acquiring unit. The access information table includes the MAC address of the client that failed the access network. And the sending unit is used for stopping sending the PADO message to the client when the determining unit determines that the client is the client with network access failure.
With reference to the second aspect, in a first possible implementation manner, the determining unit is specifically configured to search the access information table according to the MAC address of the client, and when the access information table includes the MAC address of the client, determine that the client is a client that fails to access the network.
With reference to the second aspect, in a second possible implementation manner, the apparatus further includes a second obtaining unit and an adding unit. The second obtaining unit is configured to obtain a MAC address of a client that fails to access the network. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. The adding unit is configured to add the MAC address of the client that has failed in accessing the network, which is acquired by the second acquiring unit, to the access information table.
With reference to the second aspect, in a third possible implementation manner, the first obtaining unit is further configured to obtain a port identifier used for receiving the PADI packet, and the access information table further includes a port identifier of an access network failure. The determining unit is specifically configured to determine that the access information table includes the MAC address of the client and the port identifier for receiving the PADI packet. And the first gateway determines that the client is the client with the network access failure.
With reference to the second aspect, in a fourth possible implementation, the apparatus further includes a second obtaining unit and an adding unit. The second obtaining unit is used for obtaining the MAC address of the client terminal with network access failure and the port accessed by the client terminal with network access failure. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. The adding unit is configured to add the MAC address of the client that fails to access the network and the port identifier accessed by the client that fails to access the network, which are acquired by the second acquiring unit, to the access information table.
With reference to the second aspect, in a fifth possible implementation manner, the adding unit is further configured to add, to the access information table, a network access failure duration of the client that has failed to access the network. The device further comprises a clearing unit, wherein the clearing unit is used for clearing the MAC address of the client in the access information table according to the time length of the access network failure when the fact that the accessed client is offline is detected.
In a third aspect, a system for accessing a network is provided, the system comprising: a client and a first gateway.
The client is used for sending a PADI message to the first gateway. The PADI packet includes a media access control, MAC, address of the client.
The first gateway is used for receiving the PADI message sent by the client. And the first gateway acquires the MAC address of the client from the PADI message. And the first gateway determines the client as the client with network access failure according to the MAC address of the client and the access information table. The access information table includes the MAC address of the client that failed the access network. And the first gateway stops sending a PPPoE activation discovery service (PADO) message to the client.
In a fourth aspect, the present application further provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the first aspect and the various possible implementations described above.
Drawings
Fig. 1 is a schematic view of a scenario provided in an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for accessing a network according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating another method for accessing a network according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a gateway device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of another gateway device provided in the embodiment of the present application.
Fig. 6 is a schematic system structure diagram of an access network according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 provides a schematic view of a scenario according to an embodiment of the present application, where the scenario includes a first client 101, a second client 102, a third client 103, a layer two device forwarding 104, a first gateway 105, and a second gateway 106. The first client 101, the second client 102 and the third client 103 perform PPPoE authentication with the first gateway 105 through the layer two forwarding device 104. If the PPPoE authentication of the client is successful, the client may go online through the first gateway 105, where the two-layer forwarding device 104 may be a switch or an Optical Line Terminal (OLT) or other forwarding devices, and the first gateway 105 and the second gateway 106 may be BRAS or other access devices.
The application scenarios and embodiments of the present application are described next in conjunction with fig. 1. The PPPoE protocol, referred to in the specification of RFC2516 protocol, comprises a total of two phases, namely a PPPoE Discovery phase (PPPoE Discovery Stage) and a PPPoE Session phase (PPPoE Session Stage). In the first step of the discovery phase, the first client 101 sends a PADI message in a broadcast manner, where the destination address field of the ethernet frame corresponding to the PADI message should be filled with all 1 s, and the source address field is filled with the MAC address of the first client 101. The broadcast packet of the first client 101 may be received by the first gateway 105 and the second gateway 106. In the second step of discovery, the first gateway 105 and the second gateway 106 that receive the PADI packet need to respond to the PADI packet sent by the first client 101, and if the first gateway 105 and the second gateway 106 include multiple interfaces, both the first gateway 105 and the second gateway 106 that receive the PADI packet will respond to the PADO packet, so that the first client 101 will receive multiple PADO packets. The source address of the ethernet frame of the PADO packet sent by the first gateway 105 fills the MAC address of the first gateway 105, the source address of the ethernet frame of the PADO packet sent by the second gateway 106 fills the MAC address of the second gateway 106, and the destination address fills the MAC address of the first client 101 obtained from the PADI packet. In the third step of the PPPoE session, the first client 101 selects, according to a specific rule, a gateway corresponding to one of the received PADO messages to respond to a PPPoE active discovery request packet (hereinafter, referred to as PADR) message, where the first client 101 generally selects the first gateway 105 corresponding to the first received PADO message to respond to the PADR message, and discards the PADO message of the second gateway 106. The fourth step of the PPPoE Session is also the last step of the Discovery phase, after the first gateway 105 receives the PADR message, the first gateway 105 sends a PPPoE Active Discovery Session acknowledgement packet (hereinafter abbreviated as PADS) message carrying a Session identifier to the first client 101, and when the first client 101 receives the PADS message and packet acknowledgement, both parties enter the Session phase.
However, due to the existing network deployment or the performance of the two-layer device, for example, a phenomenon that the response of the PADO message to the specific link is fast may occur, so that the available address of the interface of the first gateway 105 connected to the specific link may be used up quickly, which causes the situation that the first gateway 105 continues to respond to the PADO message without an available interface, and thus the first client 101 may select to establish a session with the first gateway 105 without an available interface, so that the first client 101 may not access the gateway due to the authentication failure in the session stage. For example, there are multiple accessible gateways in the broadcast domain where the first client 101 is located, because the first gateway 105 replies the PADO message faster, the available address of the interface of the first gateway 101 is used up quickly, but the second gateway 106 has an available address, but the PADO message that replies to the first client 101 is slower than that of the first gateway 105, at this time, if the first client 101 sends the PADI message in a broadcast manner, both the first gateway 105 and the second gateway 106 that receive the PADI message will reply the PADO message to the first client 101, but because of the reason of current network deployment or the reason of performance of the two-layer device, the link where the first gateway 105 is located replies the PADO message to the client 101 is fastest, so that under the condition that the first gateway 105 does not have an available access address, the first client 101 will still select the first gateway 105 corresponding to the received the first PADO message to establish a session and perform authentication, the authentication failure will not occur due to no available address until the session stage, which may cause the first client 101 to be unable to go online due to the first gateway 105 having no available access address, because the specific rule for selecting a gateway by the client generally cannot be changed, i.e. the specific rule for the first client 101 to select the first gateway 105 that establishes a session with the fastest reply PADO message generally cannot be changed, the first client 101, the second client 102, and the third client 103 may all select the first gateway 105 that establishes a session with the fastest reply PADO message, and if the first gateway 105 has no available address, the above-mentioned client may have the problem of authentication failure and unable to access.
In order to solve the above technical problem, an embodiment of the present application provides a PPPoE authentication method, as shown in fig. 2. The method provided by the embodiment of the application specifically comprises the following steps:
s201: the method comprises the steps that a first gateway receives a PADI message sent by a client, wherein the PADI message comprises an MAC address of the client.
In a specific embodiment, in a first step of the PPPoE discovery phase, a client broadcasts and sends a PADI packet, where the PADI packet includes terminal identification information of the client, such as Media Access Control (MAC) address and other information of the client, and a first gateway in a broadcast domain receives the PADI packet.
S202: and the first gateway acquires the MAC address of the client from the PADI message.
In a specific embodiment, the first gateway obtains a PADI packet sent by the client, and obtains the MAC address of the client from the PADI packet.
Taking the first gateway as the BRAS as an example for explanation, the BRAS receives the PADI packet sent by the client and obtains the MAC address of the client from the PADI packet.
S203: and the first gateway determines the client as the client with the network access failure according to the MAC address of the client and an access information table, wherein the access information table comprises the MAC address of the client with the network access failure.
In a specific embodiment, the first gateway records the MAC address of the client that failed to access the first gateway in the access information table. And the first gateway determines whether the client is the client with network access failure according to the MAC address in the PADI message sent by the client and the access information table.
Optionally, the determining, by the first gateway, that the client is a client that fails in accessing the network according to the MAC address of the client and the access information table includes: and the first gateway searches the access information table according to the MAC address of the client. And when the access information table comprises the MAC address of the client, the first gateway determines that the client is the client with the failed access network.
In a specific embodiment, the first gateway searches the MAC address of the client with the failed access network recorded in the access information table according to the MAC address of the client. When the access information table includes the MAC address of the client, the first gateway may determine that the client is a client that fails to access the network.
Optionally, the method further includes: the first gateway obtains the MAC address of the client with network access failure, wherein the client with network access failure is the client with network access failure caused by the shortage of the first gateway address pool. And the first gateway adds the MAC address of the client with the failed access network to the access information table.
S204: and the first gateway stops sending the PADO message to the client.
The method steps are described in detail below by taking the first gateway as a BRAS as an example. The BRAS creates an access information table as shown in table 1 below. For example, when the BRAS accessed by the client fails to apply for the online address due to no available address, the BRAS records the MAC address of the client, as shown in the following access information table 1, the BRAS records the MAC address 0010-. The address applied by the client is used for accessing the network, namely for getting online. The reason that the client side fails to apply for the online address comprises that the BRAS has no allocable address.
And after the client fails to apply for the online address, the client continuously broadcasts and sends the PADI message in a set period. When the BRAS receives the PADI message, the BRAS judges whether the MAC address of the client exists in the access information table or not according to the obtained MAC address of the client. For example, the MAC address of the client obtained by the BRAS is 0010-. The BRAS stops sending the PADO message to the user terminal may be that the BRAS discards the PADI message client, or that the BRAS delays sending the PADO message to the client. Therefore, the client can not establish a session again with the BRAS which has failed in address acquisition, namely, if the client fails to apply for the address due to the fact that the available address of the BRAS interface is insufficient, the client can not establish the session with the BRAS with the insufficient available address again, and therefore the client can establish the session with other BRASs with the available online addresses, waste of resources is reduced, and efficiency is improved.
Optionally, the access information table further includes a network access failure duration of the client that has failed to access the network, and the method further includes that when the first gateway detects that the client that has accessed the first gateway is offline, the first gateway clears the MAC address of the client in the access information table according to the network access failure duration.
For example, the BRAS may further record a time length when the client applies for the address failure, and when the BRAS detects that the client accessing the BRAS is offline, the BRAS clears the MAC address of the client with the longest time length recorded in the access information table. Optionally, the BRAS may further select the MAC address of the client with the shortest duration recorded in the access information table to perform purging.
The BRAS can have an address release under the condition that a client side accessing the BRAS is offline, so that the BRAS can have an available address for other client sides to access, the time of the client side online failure is recorded in an access information table, and the recorded MAC address is cleared after the recording time reaches a set threshold value, so that the client side with the access failure can have a chance to access the BRAS again, and the success rate of the client side accessing a network is improved.
Client MAC address Time of line failure (minutes)
0010-0000-0008 5
0020-0000-0008 1
TABLE 1
Optionally, the method further includes that when the BRAS determines that the user information in the PADI message does not exist in the user information record table, the BRAS replies the PADO message to the client. As shown in table 1, if the BRAS determines that the obtained MAC address of the client is 0030-.
Fig. 3 is a flowchart illustrating a PPPoE authentication method according to an embodiment of the present application. The method provided by the embodiment of the application specifically comprises the following steps:
s301, a first gateway receives a PADI message sent by a client, wherein the PADI message comprises a Media Access Control (MAC) address of the client.
The client S301 is the same as S201 in fig. 2, and specific contents may refer to the contents of S201, which is not described herein again.
S302, the first gateway acquires the MAC address of the client and the port identification for receiving the PADI message from the PADI message.
The method for the first gateway to obtain the MAC address of the client in S302 is the same as that of S202 in fig. 2, and the specific content may refer to the content of S202, which is not described herein again.
The first gateway may further acquire a port identifier for receiving the PADI packet in a process of receiving the PADI packet.
And S303, the first gateway determines that the client is the client with network access failure according to a client access information table, the MAC address of the client and the port identifier for receiving the PADI message.
The access information table in this embodiment includes the MAC address of the client having failed to access the network and the port identifier having failed to access the network. And the port with the failed access network is a port accessed by the client with the failed access network on the first gateway.
For example, the determining, by the first gateway, that the client is a client with a network access failure according to an access information table, the MAC address of the client, and the port identifier client for receiving the PADI packet includes: and when the access information table comprises the MAC address of the client and the port identification for receiving the PADI message, the first gateway determines that the client is the client with the failed access network.
For example, taking the first gateway as the BRAS device as an example, when receiving the PADI packet sent by the first client, the BRAS obtains a port identifier of the received packet, for example, obtains a port number gigabit ethernet2/0/0.1 of the received packet. And the first BRAS obtains the MAC address of the client from the received PADI message. And the BRAS judges whether the client is the client with network access failure according to the obtained MAC address of the client, the port number GigabitEthernet2/0/0.1 and the access information table. When the BRAS judges that the access information table comprises the MAC address of the client and the port number GigabitEthernet2/0/0.1, the BRAS determines that the client is the client with network access failure.
Optionally, the method further includes: the first gateway obtains the MAC address of the client terminal with the network access failure and the port identification accessed by the client terminal with the network access failure. And the client with the network access failure is the client with the network access failure caused by the shortage of the first gateway address pool. And the first gateway adds the MAC address of the client with the failed access network and the port identification accessed by the client with the failed access network to the access information table.
The above steps will be described in detail below by taking the first gateway as a BRAS as an example. The access information table is shown in table 2, the BRAS of the client side records the MAC address 0010-. If the MAC address of the first client obtained by the BRAS of the client is 0010-. If the MAC address of the first client is 0010-.
Figure BDA0001300016010000071
TABLE 2
S304, the first gateway stops sending the PADO message to the client.
The method adopted by the client S304 is the same as that adopted by the client S204, and is not described herein again.
Optionally, the first gateway periodically clears the MAC address and the port number of the client recorded in the user information record table. Due to the fact that the client end of the BRAS is offline, the BRAS can have the address released, and the BRAS can have the available address for the client end to use online. Therefore, the content in the user MAC address record table of the BRAS record is cleared in a set period, so that the client can be quickly accessed to the BRAS, and the success rate of the client on-line is improved.
Fig. 4 is a schematic structural diagram of a gateway device provided in an embodiment of the present application, where the gateway device includes a receiving unit 401, a first obtaining unit 402, a determining unit 403, and a sending unit 404.
The receiving unit 401 is configured to receive an ethernet point-to-point protocol PPPoE active discovery initiation PADI message sent by a client. The PADI packet includes a media access control, MAC, address of the client.
The first obtaining unit 402 is configured to obtain the MAC address of the client from the PADI packet.
The determining unit 403 is configured to determine, according to the MAC address of the client and the access information table acquired from the first acquiring unit 402, that the client is a client that fails to access the network. The access information table includes the MAC address of the client that failed the access network.
The sending unit 404 is configured to stop sending the PPPoE active discovery service PADO packet to the client when the determining unit 403 determines that the client is the client with the network access failure.
In a specific embodiment, the receiving unit receives a PADI packet sent by a client, which may specifically refer to step 201 in fig. 2. The first obtaining unit 402 obtains the MAC address of the client from the PADI message received by the receiving unit 401, which may specifically refer to step 202 in fig. 2. The determining unit 403 determines, according to the MAC address of the client acquired by the first acquiring unit 402 and the MAC address of the client with network access failure in the access information table, that the client is the client with network access failure, which may specifically refer to step 203 in fig. 2. When the determining unit 403 determines that the client is a client with access failure, the sending unit 404 stops sending the PADO packet to the client.
Optionally, the determining unit 403 is specifically configured to search the access information table according to the MAC address of the client, and determine that the client is the client that fails in accessing the network when the access information table includes the MAC address of the client.
Optionally, the apparatus further includes a second obtaining unit 407 and an adding unit 405. The second obtaining unit 407 is configured to obtain a MAC address of a client that fails to access the network. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. The apparatus further includes an adding unit 405, where the adding unit 405 is configured to add the MAC address of the client with the failed access network, acquired by the second acquiring unit 407, to the access information table.
Optionally, the first obtaining unit 402 is further configured to obtain a port identifier for receiving the PADI packet. The access information table also includes port identification of access network failure. The determining unit 403 is specifically configured to determine that the client is the client with the failed access network when the access information table includes the MAC address of the client and the port identifier for receiving the PADI packet.
In a specific embodiment, the first obtaining unit 402 further needs to obtain a port identifier for receiving the PADI packet. The determining unit 403 determines, according to the MAC address of the client acquired by the first acquiring unit 402, the port identifier for receiving the PADI packet, and the access information table, that the client is a client that fails to access the network. Specifically, refer to step 303 in fig. 3, which is not described herein again.
Optionally, the second obtaining unit 407 is configured to obtain a MAC address of a client that fails to access a network and a port identifier accessed by the client that fails to access the network. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. The apparatus further comprises an adding unit 405. The adding unit 405 is configured to add the MAC address of the client with the failed access network and the port identifier accessed by the client with the failed access network, which are acquired by the second acquiring unit 407, to the access information table.
Optionally, the adding unit 405 is further configured to add a network access failure duration of the client with the network access failure to the access information table. The apparatus further includes a clearing unit 406, where the clearing unit 406 is configured to clear the MAC address of the client in the access information table according to the duration of the access network failure when detecting that the accessed client is offline. Fig. 5 is a schematic structural diagram of another gateway device provided in this embodiment, where the device shown in fig. 5 may be a first gateway in the foregoing method embodiments (such as fig. 2 and fig. 3), and may implement the function of the first gateway. The device comprises a processor 502, a communication interface 503, a program 505, and a communication bus 501, and may also comprise a memory 504.
The communication interface 503 is used for the apparatus to communicate with the outside, the Memory 504 is used for storing program instructions or programs 505, the Memory 504 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), for example, at least one disk Memory, and the processor 502 may call the program instructions stored in the Memory 504 to perform corresponding functions.
In a specific embodiment, the transceiver 503 is configured to receive a PADI packet sent by a client. The PADI packet includes the MAC address of the client. The communication interface 503 is further configured to stop sending a PPPoE active discovery service PADO message to the client when it is determined that the client is a client that fails to access the network.
The processor 502 is configured to obtain the MAC address of the client from the PADI packet, and to obtain the MAC address and the access information table of the client, and determine that the client is a client with a network access failure. The access information table includes the MAC address of the client that failed the access network.
In this specific embodiment, the functions and implementation steps of the first gateway in fig. 2 may be referred to for specific implementation of the communication interface 503, the processor 502, and the memory 504, and are not described again for brevity.
Optionally, the processor 502 is specifically configured to search the access information table according to the MAC address of the client, and determine that the client is the client with the failed access network when the access information table includes the MAC address of the client.
Optionally, the communication interface 503 is further configured to obtain a MAC address of the client that fails to access the network. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. The apparatus also includes a memory 504, the memory 504 configured to store the MAC address of the client that failed the access network into the access information table.
In another specific embodiment, the communication interface 503 is further configured to receive a port identifier of the PADI packet. The access information table also includes port identification of access network failure. The processor 502 is specifically configured to determine that the client is the client with the failed access network when the access information table includes the MAC address of the client and the port identifier for receiving the PADI packet.
Optionally, the communication interface 503 is configured to receive a MAC address of a client with a network access failure and a port identifier accessed by the client with the network access failure. And the client with the network access failure is the client with the network access failure caused by the insufficient address pool of the first gateway. The device also includes a memory 504. The memory 504 is configured to add the MAC address of the client with the failed access network and the port identifier accessed by the client with the failed access network, which are received by the communication interface 503, to the access information table.
In this specific embodiment, the functions and implementation steps of the first gateway in fig. 3 may be referred to for specific implementation of the communication interface 503, the processor 502, and the memory 504, and are not described again for brevity.
Fig. 6 is a schematic system structure diagram of an access network according to an embodiment of the present application. The system includes a client 601 and a first gateway 602.
The client 601 is configured to send an ethernet point-to-point protocol PPPoE active discovery initiation PADI packet to the first gateway. The PADI packet includes a media access control, MAC, address of the client.
The first gateway 602 is configured to receive the PADI packet sent by the client. And the first gateway acquires the MAC address of the client from the PADI message. And the first gateway determines the client as the client with network access failure according to the MAC address of the client and the access information table. The access information table includes the MAC address of the client that failed the access network. And the first gateway stops sending a PPPoE activation discovery service (PADO) message to the client.
The client in the embodiment of the present application is a terminal provided on the user equipment and used for accessing the network, and a specific form of the client is not illustrated here.
In the several embodiments provided in this application, it should be understood that the disclosed systems and methods may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The integrated module can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., red line, wireless microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

Claims (8)

1. A method for accessing a network, the method comprising:
a first gateway receives an Ethernet point-to-point Protocol Activation Discovery (PADI) message sent by a client, wherein the PADI message comprises a Media Access Control (MAC) address of the client;
the first gateway acquires the MAC address of the client from the PADI message;
the first gateway determines the client as a client with network access failure according to the MAC address of the client and an access information table, wherein the access information table comprises the MAC address of the client with network access failure;
the first gateway stops sending a point-to-point protocol over Ethernet (PPPoE) active discovery service (PADO) message to the client;
the method further comprises the following steps:
the first gateway obtains the MAC address of a client with network access failure, wherein the client with network access failure is the client with network access failure caused by the shortage of an address pool of the first gateway;
and the first gateway adds the MAC address of the client with the failed access network to the access information table.
2. The method of claim 1, wherein the determining, by the first gateway, that the client is a client with a network access failure according to the MAC address of the client and an access information table comprises:
the first gateway searches the access information table according to the MAC address of the client;
and when the access information table comprises the MAC address of the client, the first gateway determines that the client is the client with the failed access network.
3. The method of claim 1, wherein the access information table further includes an identifier of a port with an access network failure, and wherein the port with the access network failure is a port on the first gateway that is accessed by a client with the access network failure, and wherein the method further comprises:
the first gateway acquires a port identifier for receiving the PADI message;
the first gateway determines that the client is the client with network access failure according to the MAC address of the client and the access information table, and the method comprises the following steps:
and when the access information table comprises the MAC address of the client and the port identification for receiving the PADI message, the first gateway determines that the client is the client with the failed access network.
4. The method of claim 3, further comprising:
the first gateway obtains an MAC address of a client with network access failure and a port accessed by the client with network access failure, wherein the client with network access failure is the client with network access failure caused by the shortage of an address pool of the first gateway;
and the first gateway adds the MAC address of the client with the failed access network and the port identification accessed by the client with the failed access network to the access information table.
5. A gateway device, characterized in that the gateway device comprises:
a receiving unit, configured to receive an ethernet peer to peer protocol activation discovery initial PADI packet sent by a client, where the PADI packet includes a MAC address of the client;
a first obtaining unit, configured to obtain an MAC address of the client from the PADI packet;
a determining unit, configured to determine, according to the MAC address of the client and an access information table acquired from the first acquiring unit, that the client fails to access the network, where the access information table includes the MAC address of the client that fails to access the network;
a sending unit, configured to stop sending the packet for activating discovery of point-to-point protocol over ethernet (PADO) service to the client when the determining unit determines that the client is a client that fails to access the network;
the gateway device further includes:
the second acquisition unit is used for acquiring the MAC address of the client with network access failure, wherein the client with network access failure is the client with network access failure caused by the shortage of the address pool of the gateway;
an adding unit, configured to add the MAC address of the client that fails to access the network, acquired by the second acquiring unit, to the access information table.
6. The gateway device of claim 5,
the determining unit is specifically configured to search the access information table according to the MAC address of the client, and determine that the client is a client that fails in the access network when the access information table includes the MAC address of the client.
7. The gateway device of claim 5,
the first obtaining unit is further configured to obtain a port identifier for receiving the PADI packet, and the access information table further includes a port identifier for a network access failure;
the determining unit is specifically configured to, when the access information table includes the MAC address of the client and the port identifier for receiving the PADI packet, determine, by the gateway, that the client is a client that fails in the access network.
8. The gateway device of claim 7, further comprising
A second obtaining unit, configured to obtain an MAC address of a client that fails to access a network and a port accessed by the client that fails to access the network, where the client that fails to access the network is a client that fails to access the network due to a shortage of the gateway address pool;
an adding unit, configured to add the MAC address of the client that fails to access the network and the port identifier accessed by the client that fails to access the network, which are acquired by the second acquiring unit, to the access information table.
CN201710359622.7A 2017-05-19 2017-05-19 Method and equipment for processing message Active CN108965363B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710359622.7A CN108965363B (en) 2017-05-19 2017-05-19 Method and equipment for processing message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710359622.7A CN108965363B (en) 2017-05-19 2017-05-19 Method and equipment for processing message

Publications (2)

Publication Number Publication Date
CN108965363A CN108965363A (en) 2018-12-07
CN108965363B true CN108965363B (en) 2021-05-04

Family

ID=64462784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710359622.7A Active CN108965363B (en) 2017-05-19 2017-05-19 Method and equipment for processing message

Country Status (1)

Country Link
CN (1) CN108965363B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520737B (en) * 2022-01-26 2024-04-02 北京华信傲天网络技术有限公司 Two-layer data access control method and system for wireless user

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321054A (en) * 2007-06-08 2008-12-10 华为技术有限公司 Method and device for automatically preventing imitation of network side media access control address
CN102185871A (en) * 2011-06-09 2011-09-14 杭州华三通信技术有限公司 Method and equipment for processing messages
CN106331203A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 User access control method, device, relay device and server

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7154912B2 (en) * 2001-08-14 2006-12-26 The Directv Group, Inc. System and method for provisioning broadband service in a PPPoE network using a list of stored domain names

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101321054A (en) * 2007-06-08 2008-12-10 华为技术有限公司 Method and device for automatically preventing imitation of network side media access control address
CN102185871A (en) * 2011-06-09 2011-09-14 杭州华三通信技术有限公司 Method and equipment for processing messages
CN106331203A (en) * 2015-07-01 2017-01-11 中兴通讯股份有限公司 User access control method, device, relay device and server

Also Published As

Publication number Publication date
CN108965363A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
US10122679B2 (en) Method, relay agent, and system for acquiring internet protocol address in network
EP2654268B1 (en) Address allocation processing method and apparatus
EP2169877B1 (en) Processing method and device for qinq termination configuration
RU2464722C2 (en) Method, device and system for distribution of messages
US11405314B2 (en) Packet processing method and apparatus
EP2493127A1 (en) Method for virtual link discovery control and system for fibre channel over ethernet protocol
US8588056B1 (en) Elimination of unwanted packets entering a restricted bandwidth network
JP5255035B2 (en) Failover system, storage processing apparatus, and failover control method
CA2774281C (en) User access method, system, access server, and access device
WO2021008591A1 (en) Data transmission method, device, and system
WO2012146120A1 (en) Method for forwarding response packet from dhcp server, forwarding device and system
CN108418907B (en) IP address allocation method and device
CN113472646B (en) Data transmission method, node, network manager and system
US11936614B2 (en) Method and apparatus for sending reply packet, computing device, and storage medium
US20080298273A1 (en) Method For Establishing a Communication Relationship in at Least One Communication Network
WO2017045106A1 (en) Communication method and device based on optical network system
CN109561004B (en) Message forwarding method and device and switch
US20140244726A1 (en) Assignment of Point-to-Point Over Ethernet (PPPoE) Session IDs
EP2197169A1 (en) VoIP registration with multiple call servers
CN108965363B (en) Method and equipment for processing message
CN114124314B (en) Method for controlling client to be online, network equipment and client
JP6406712B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
CN114500632A (en) Communication method and communication device
CN109039680B (en) Method and system for switching main Broadband Network Gateway (BNG) and standby BNG and BNG
JP2011130194A (en) Ip address allocation apparatus, auxiliary device, ip address allocation system, ip address allocation method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant