CN107547618B - Session dismantling method and device - Google Patents

Session dismantling method and device Download PDF

Info

Publication number
CN107547618B
CN107547618B CN201710432944.XA CN201710432944A CN107547618B CN 107547618 B CN107547618 B CN 107547618B CN 201710432944 A CN201710432944 A CN 201710432944A CN 107547618 B CN107547618 B CN 107547618B
Authority
CN
China
Prior art keywords
pppoe
session
message
terminal equipment
connection interruption
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
CN201710432944.XA
Other languages
Chinese (zh)
Other versions
CN107547618A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201710432944.XA priority Critical patent/CN107547618B/en
Publication of CN107547618A publication Critical patent/CN107547618A/en
Application granted granted Critical
Publication of CN107547618B publication Critical patent/CN107547618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a session removal method and a session removal device, wherein the method comprises the following steps: receiving a data message sent by opposite terminal equipment, wherein the data message carries characteristic information; inquiring a PPPoE session table through the characteristic information; if the PPPoE session table does not have the session table item corresponding to the characteristic information, constructing a connection interrupt message by using the data message; and sending the connection interruption message to the opposite terminal equipment so that the opposite terminal equipment removes the PPPoE session between the opposite terminal equipment and the local terminal equipment according to the connection interruption message. Through the technical scheme of the application, the opposite terminal equipment can timely remove the PPPoE session, so that the opposite terminal equipment can establish the PPPoE session with the local terminal equipment again, and the network disconnection time is reduced.

Description

Session dismantling method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a session teardown method and apparatus.
Background
PPPoE (Point-to-Point Protocol over Ethernet, Point-to-Point Protocol over Ethernet based on Ethernet) is an extension to PPP, through establishing PPPoE session on Ethernet and encapsulating PPP message in Ethernet frame, thus providing Point-to-Point connection on Ethernet, solving the problem that PPP can not be applied to Ethernet. Moreover, PPPoE can be combined with the economy of ethernet, the expandability of PPP, the management control function of PPP, etc., so that PPPoE is widely applied in the environments of cell access networking, etc.
In the PPPoE network, after a PPPoE session is established between a PPPoE client and a PPPoE server, the PPPoE client sends a data message to the PPPoE server through the PPPoE session, and the PPPoE server sends the data message to the PPPoE client through the PPPoE session. However, the following problems may exist at present: the PPPoE server removes the PPPoE session, but the PPPoE client does not remove the PPPoE session, and still sends a data message to the PPPoE server through the PPPoE session, and after the PPPoE server receives the data message, the corresponding PPPoE session is removed, so the data message is discarded, and the flow is interrupted.
Disclosure of Invention
The application provides a session removal method, which is applied to local terminal equipment and comprises the following steps:
receiving a data message sent by the opposite terminal equipment, wherein the data message carries characteristic information;
inquiring a PPPoE session table through the characteristic information; if the PPPoE session table does not have the session table item corresponding to the characteristic information, constructing a connection interrupt message by using the data message;
and sending the connection interruption message to the opposite terminal equipment so that the opposite terminal equipment removes the PPPoE session between the opposite terminal equipment and the local terminal equipment according to the connection interruption message.
The application provides a device is demolishd to conversation, is applied to local-end equipment, the device includes:
the receiving module is used for receiving a data message sent by the opposite terminal equipment, and the data message carries characteristic information;
the query module is used for querying the PPPoE session table through the characteristic information;
a construction module, configured to construct a connection interruption message using the data message when a session entry corresponding to the feature information does not exist in the PPPoE session table;
and the sending module is used for sending the connection interruption message to the opposite terminal equipment so that the opposite terminal equipment can remove the PPPoE session between the opposite terminal equipment and the home terminal equipment according to the connection interruption message.
Based on the above technical solution, in the embodiment of the present application, in the PPPoE system, when the home device removes the PPPoE session, but the peer device does not remove the PPPoE session, if the home device receives a data packet sent by the peer device, a connection interruption packet is sent to the peer device, so that the peer device removes the PPPoE session between the peer device and the home device. Therefore, the opposite-end equipment can timely remove the PPPoE session, the opposite-end equipment can establish the PPPoE session with the local-end equipment again, and the network disconnection time is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a networking schematic of a broadband access environment;
FIG. 2 is a flow diagram of a session teardown method in one embodiment of the present application;
FIG. 3 is a block diagram of a session teardown apparatus in one embodiment of the present application;
fig. 4 is a hardware configuration diagram of a local device in an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" is used may be interpreted as "at … …," or "when … …," or "in response to a determination.
In the process of PPPoE, a Discovery (Discovery) phase, a session phase, a transmission phase, and a Link tear-down phase may be included, and the session phase may include an LCP (Link Control Protocol) phase, an authentication phase, and an NCP (Network Control Protocol) phase.
For the discovery phase, the process flow includes: the PPPoE client sends a PADI (PPPoE active discovery initialization) message in a broadcast mode; after receiving the PADI message, the PPPoE server returns a PADO (PPPoE Active Discovery Offer) message to the PPPoE client. After receiving the PADO message, the PPPoE client sends a PADR (PPPoE Active discovery request) message to the PPPoE server; after receiving the PADR message, the PPPoE server returns a PADS (PPPoE Active Discovery Session-configuration) message to the PPPoE client.
The PADS message returned by the PPPoE server to the PPPoE client may also carry a Session identifier (Session ID), so far, the PPPoE Session is successfully established, and a Session phase may be performed. In addition, in the subsequent session stage, transmission stage and link disconnection stage, each message carries the session identifier.
For the LCP phase, it is used to complete MTU (Maximum Transmission Unit) negotiation, whether to perform authentication, and what authentication method to use. The processing flow of the LCP stage comprises the following steps: the PPPoE client sends a Config-Request message to the PPPoE server, and the PPPoE server sends the Config-Request message to the PPPoE client. After receiving the Config-Request message, the PPPoE server/PPPoE client returns a Config-ACK (configuration acknowledgement) message or a Config-NAK (configuration negative) message. If the PPPoE server and the PPPoE client side receive the Config-ACK message, the LCP link is marked to be successfully established, the LCP stage can be ended, otherwise, the Config-Request message is continuously sent until the PPPoE server and the PPPoE client side receive the Config-ACK message.
For the Authentication phase, Authentication may be performed according to an Authentication method negotiated in the LCP phase, for example, the Authentication method may be PAP (Password Authentication Protocol), CHAP (Challenge handshake Authentication Protocol), 802.11 Authentication Protocol, or the like, and no matter which Authentication method is adopted, the processing flow of the Authentication phase may include the following steps: the PPPoE client sends a message carrying a user name and a password to the PPPoE server, the PPPoE server sends an Authentication message carrying the user name and the password to an AAA (Authentication Authorization Accounting) server, and the AAA server performs Authentication by using the user name and the password. If the authentication is successful, the AAA server returns an authentication success message to the PPPoE server, and if the authentication is failed, the AAA server returns an authentication failure message to the PPPoE server. And when receiving the authentication success message, the PPPoE server allows the PPPoE client to access the network and executes the NCP stage. After receiving the authentication failure message, the PPPoE server refuses the PPPoE client to access the network and ends the PPPoE authentication process.
For the NCP phase, the network layer parameters of the PPP packet, such as an IP address of the PPPoE client, an IP address of a DNS (Domain Name System) server, and the like, may be negotiated. The processing flow of the NCP phase is similar to that of the LCP phase, and is not described in detail herein.
Based on the above discovery phase, LCP phase, authentication phase, NCP phase, and other processes, the PPPoE authentication process can be completed, i.e., the PPPoE client can access the network through the PPPoE server. Further, after the PPPoE authentication process is finished, a transmission phase and a chain disconnecting phase can be included.
Aiming at the transmission phase, the PPPoE client and the PPPoE server can exchange data messages and keep-alive messages. The PPPoE client can periodically send a keep-alive message to the PPPoE server, and the PPPoE server sends a keep-alive response message to the PPPoE client after receiving the keep-alive message; if the PPPoE client does not receive the keep-alive response message within the preset time, the PPPoE session between the PPPoE client and the PPPoE server is considered to be interrupted, and a link disconnection stage is carried out. Moreover, the PPPoE server can periodically send a keep-alive message to the PPPoE client, and the PPPoE client sends a keep-alive response message to the PPPoE server after receiving the keep-alive message; and if the PPPoE server does not receive the keep-alive response message within the preset time, considering that the PPPoE session between the PPPoE server and the PPPoE client is interrupted, and performing a link disconnection stage.
In the link disconnection stage, the PPPoE client can delete the PPPoE session between the PPPoE client and the PPPoE server, cannot transmit a data message to the PPPoE server by using the session identifier, and cannot process the data message sent by the PPPoE server through the session identifier. The PPPoE server can delete the PPPoE session between the PPPoE server and the PPPoE client, and the PPPoE server cannot transmit the data message to the PPPoE client by using the session identifier or process the data message sent by the PPPoE client through the session identifier.
However, the following problems may exist at present: the PPPoE server removes the PPPoE session, but the PPPoE client does not remove the PPPoE session, and still sends a data message to the PPPoE server through the PPPoE session, and after the PPPoE server receives the data message, the corresponding PPPoE session is removed, so the data message is discarded, and the flow is interrupted. Or, the PPPoE client removes the PPPoE session, but the PPPoE server does not remove the PPPoE session, and still sends a data message to the PPPoE client through the PPPoE session, and after receiving the data message, the PPPoE client discards the data message because the corresponding PPPoE session is removed, resulting in an interruption of traffic.
For example, in order to reduce the number of keep-alive messages sent, it may be agreed that the PPPoE server or PPPoE client sends keep-alive messages, while the other end does not send keep-alive messages. As shown in fig. 1, in a Broadband access environment, a PPPoE client is located inside a user's home, which may be a home router, and a PPPoE Server is a BRAS (Broadband remote access Server) device of an operator.
In this application scenario, it may be agreed that the PPPoE server sends the keep-alive message, and the PPPoE client does not send the keep-alive message, so that, when a link between the PPPoE server and the PPPoE client fails, the PPPoE server may detect a link failure based on the keep-alive message, and remove the PPPoE session. However, because the PPPoE client does not send the keep-alive message, it is not possible to detect a link failure based on the keep-alive message, and the PPPoE session is not removed.
Further, even if the PPPoE server notifies the PPPoE client to remove the PPPoE session, the notification packet cannot be transmitted to the PPPoE client due to a link failure between the PPPoE server and the PPPoE client, and the PPPoE client cannot be triggered to delete the PPPoE session.
In view of the foregoing discovery, an embodiment of the present application provides a session teardown method, which may be applied to a PPPoE system including a home device and an opposite device, where the home device may be a PPPoE server and the opposite device may be a PPPoE client, or the home device may be a PPPoE client and the opposite device may be a PPPoE server.
In the embodiment of the application, the local terminal device is a device enabling the keep-alive function, and the opposite terminal device is a device not enabling the keep-alive function. The enabling of the keep-alive function of the local terminal equipment means that: the home terminal equipment can periodically send the keep-alive messages to the opposite terminal equipment, if the response messages aiming at the keep-alive messages are not received within the preset time, the link failure can be detected based on the keep-alive messages, and the PPPoE session is removed. The condition that the opposite terminal device does not enable the keep-alive function means that: the opposite-end device does not actively send the keep-alive message, and only sends a response message aiming at the keep-alive message to the local-end device after receiving the keep-alive message sent by the local-end device, so that the opposite-end device cannot detect a link fault based on the keep-alive message, and the PPPoE session cannot be dismantled.
As shown in fig. 1, which is a schematic view of an application scenario of the embodiment of the present application, a home device may be a PPPoE server, an opposite device may be a PPPoE client, and in a broadband access environment, the PPPoE client is located inside a user home and may be a home router, and the PPPoE server is a BRAS device of an operator.
Referring to fig. 2, a flowchart of the session teardown method is shown, and the method is applied to a home device.
Step 201, receiving a data packet sent by an opposite terminal device, where the data packet carries feature information.
Wherein, the characteristic information may include but is not limited to: session identification (i.e., Session ID), and/or source MAC (Media Access Control) address (i.e., MAC address of peer device).
Of course, the data packet may also carry other contents, such as a destination MAC address, a source IP address, a destination IP address, a source port, a destination port, a protocol type, and the like, and these contents may be used as characteristic information, which is not limited, and the description is given by taking the session identifier and/or the source MAC address as an example.
In step 202, the PPPoE session table is queried according to the feature information. If there is no session entry corresponding to the feature information in the PPPoE session table, step 203 is executed; if the session table entry corresponding to the feature information exists in the PPPoE session table, the data packet can be forwarded.
In one example, the home device may further maintain a PPPoE session table, where each session table entry of the PPPoE session table is used for recording the feature information. In the discovery phase and the session phase, the home device may add a session entry to the PPPoE session table, and record, in the session entry, feature information corresponding to the peer device, such as a session identifier negotiated between the home device and the peer device, an MAC address of the peer device, and the like.
In an example, when the home device adds a session entry in the PPPoE session table, in addition to adding the feature information corresponding to the peer device in the session entry, an interface connected to the peer device on the home device may be recorded in the session entry. For example, in the discovery phase, the peer device may send a PADR packet to the home device, and after receiving the PADR packet, the home device may determine an incoming interface of the PADR packet as an interface connected to the peer device on the home device, and record the incoming interface in the session entry.
Based on this, the process for "querying PPPoE session table by the feature information" may include, but is not limited to: and determining an incoming interface of the local terminal equipment, which receives the data message, and inquiring a PPPoE session table through the characteristic information and the incoming interface.
Further, if there is no session entry corresponding to the feature information and the ingress interface in the PPPoE session table, step 203 is executed; if the PPPoE session table has a session table entry corresponding to the feature information and the ingress interface, the data packet may be forwarded.
In an example, after querying the PPPoE session table through the feature information, if a session entry corresponding to the feature information exists in the PPPoE session table, it indicates that a PPPoE session is established between the home device and the peer device, and the home device may forward the data message, which is not described in detail herein. If the session table entry corresponding to the characteristic information does not exist in the PPPoE session table, it indicates that the PPPoE session is not established between the home terminal device and the peer terminal device, and the home terminal device does not forward the data packet.
In practical applications, there may be the following: after a PPPoE session is established between the local terminal equipment and the opposite terminal equipment, the local terminal equipment periodically sends a keep-alive message to the opposite terminal equipment, if a link between the local terminal equipment and the opposite terminal equipment fails, the local terminal equipment cannot receive a keep-alive response message aiming at the keep-alive message within preset time, the PPPoE session between the local terminal equipment and the opposite terminal equipment is considered to be interrupted, and a session table entry corresponding to the opposite terminal equipment is deleted from a PPPoE session table. However, since the peer device does not detect the PPPoE session interrupt, the data packet is still sent to the home device through the PPPoE session.
When the link between the local terminal device and the opposite terminal device is not recovered, the data packet sent by the opposite terminal device to the local terminal device cannot reach the local terminal device. When the link between the local terminal device and the opposite terminal device is recovered, the data packet sent by the opposite terminal device to the local terminal device can reach the local terminal device. After receiving the data message, the home terminal equipment queries the PPPoE session table through the characteristic information carried by the data message. Because the home terminal device has deleted the session table entry corresponding to the peer device from the PPPoE session table, the PPPoE session table does not have the session table entry corresponding to the feature information, the home terminal device does not forward the data packet, which causes interruption of the traffic of the peer device, and the home terminal device does not forward the traffic of the peer device.
In order to solve the above problem, after the home device queries the PPPoE session table through the feature information, if there is no session entry corresponding to the feature information in the PPPoE session table, the home device may execute step 203 and step 204 to trigger the peer device to detect that the PPPoE session is interrupted, and remove the PPPoE session between the peer device and the home device, so that the data packet is no longer sent through the PPPoE session.
Step 203, constructing a connection interruption message by using the data message.
In one example, the process for "constructing a connection interruption message using a data message" may include, but is not limited to, the following:
in the first mode, when the session table item corresponding to the characteristic information does not exist in the PPPoE session table, the data message is used for constructing a connection interrupt message.
Judging whether the home terminal equipment enables the unknown session active removal function or not when the PPPoE session table does not have the session table item corresponding to the characteristic information; if so, constructing a connection interruption message by using the data message; if not, the data message is not used for constructing a connection interruption message, and the data message is discarded.
For the second mode, a command line (e.g., unknown-session cut-off) may be issued at the local device, so that the local device enables the unknown session active teardown function. Based on this, if the command line (such as unknown-session cut-off) exists on the local-end device, it can be determined that the local-end device has enabled the unknown session active teardown function; otherwise, it may be determined that the home device does not enable the unknown session active teardown function.
In an example, the data packet may further carry a session identifier. Based on this, in step 203, in the process of constructing the connection interruption packet by using the data packet, the destination MAC address of the connection interruption packet may be the source MAC address of the data packet, the source MAC address of the connection interruption packet may be the destination MAC address of the data packet, and the connection interruption packet may further carry the session identifier, where the session identifier is used to enable the peer device to remove the PPPoE session corresponding to the session identifier.
In one example, the connection interruption message may include, but is not limited to: the PADT (PPPoE Active discovery terminate) message does not limit the connection interruption message.
Step 204, sending the connection interruption message to the opposite terminal device, so that the opposite terminal device removes the PPPoE session between the opposite terminal device and the home terminal device according to the connection interruption message.
After receiving the connection interruption message, the peer device may parse the session identifier from the connection interruption message, and remove the PPPoE session corresponding to the session identifier, that is, remove the PPPoE session between the peer device and the home device, for example, delete the session entry corresponding to the home device from the PPPoE session table. Then, the opposite end device and the home end device reestablish the PPPoE session, for example, after the discovery phase and the session phase of PPPoE, the PPPoE session is reestablished between the opposite end device and the home end device, and the process is not described again.
After PPPoE session is established between the opposite terminal equipment and the home terminal equipment, when the opposite terminal equipment sends a data message to the home terminal equipment through the PPPoE session, the home terminal equipment inquires a PPPoE session table through the characteristic information carried by the data message after receiving the data message, and the PPPoE session table has a session table item corresponding to the characteristic information, so that the home terminal equipment forwards the data message, and avoids flow interruption.
Based on the above technical solution, in the embodiment of the present application, in the PPPoE system, when the home device removes the PPPoE session, but the peer device does not remove the PPPoE session, if the home device receives a data packet sent by the peer device, a connection interruption packet is sent to the peer device, so that the peer device removes the PPPoE session between the peer device and the home device. Therefore, the opposite-end equipment can timely remove the PPPoE session, the opposite-end equipment can establish the PPPoE session with the local-end equipment again, and the network disconnection time is reduced.
Based on the same application concept of the foregoing method, an embodiment of the present application further provides a session teardown apparatus, which is applied to a local device, and as shown in fig. 3, is a structural diagram of the session teardown apparatus, where the apparatus includes:
a receiving module 301, configured to receive a data packet sent by the peer device, where the data packet carries feature information;
a query module 302, configured to query a PPPoE session table according to the feature information;
a constructing module 303, configured to construct a connection interruption message by using the data message when a session entry corresponding to the feature information does not exist in the PPPoE session table;
a sending module 304, configured to send the connection interruption packet to an opposite-end device, so that the opposite-end device removes a PPPoE session between the opposite-end device and the home-end device according to the connection interruption packet.
In an example, the constructing module 303 is specifically configured to determine whether the home device enables an unknown session active teardown function in a process of constructing a connection interruption packet by using the data packet; if so, a connection interruption message can be constructed by using the data message.
In one example, the data packet may further carry a session identifier; based on this, for the connection interruption packet constructed by the construction module 303, the destination MAC address of the connection interruption packet is the source MAC address of the data packet, and the source MAC address of the connection interruption packet is the destination MAC address of the data packet; in addition, the connection interruption packet may also carry the session identifier, where the session identifier is used to enable the peer device to remove the PPPoE session corresponding to the session identifier.
In one example, the home device is a PPPoE server, and the peer device is a PPPoE client; or, the local terminal device is a PPPoE client, and the opposite terminal device is a PPPoE server;
in one example, the feature information specifically includes: session identification, and/or source MAC address;
in one example, the connection interruption packet specifically includes: PADT messages.
In an example, the query module 302 is further configured to, in a process of querying a PPPoE session table through the feature information, first determine an ingress interface, on the local device, where the data packet is received; then, the PPPoE session table is inquired through the characteristic information and the incoming interface.
In the home device provided in the embodiment of the present application, in terms of hardware, a schematic diagram of a hardware architecture may specifically refer to fig. 4. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method comprises the steps of communicating with a machine-readable storage medium, reading and executing instruction codes stored in the machine-readable storage medium, and realizing the session dismantling operation disclosed in the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A session teardown method is applied to a home terminal device, and the method includes: receiving a data message sent by opposite terminal equipment, wherein the data message carries characteristic information;
inquiring a PPPoE session table through the characteristic information;
if the PPPoE session table does not have a session table entry corresponding to the characteristic information, determining that a PPPoE session is not established between the local terminal equipment and the opposite terminal equipment, and constructing a connection interrupt message by using the data message;
and sending the connection interruption message to the opposite terminal equipment so that the opposite terminal equipment removes the PPPoE session between the opposite terminal equipment and the local terminal equipment according to the connection interruption message.
2. The method of claim 1,
the process of constructing a connection interruption packet using the data packet specifically includes:
judging whether the home terminal equipment enables an unknown session active removal function;
and if so, constructing a connection interruption message by using the data message.
3. The method according to claim 1 or 2, wherein the data packet carries a session identifier;
in a connection interruption message constructed by using the data message, a destination MAC address of the connection interruption message is a source MAC address of the data message, the source MAC address of the connection interruption message is the destination MAC address of the data message, the connection interruption message carries the session identifier, and the session identifier is used for enabling the peer device to remove the PPPoE session corresponding to the session identifier.
4. The method of claim 1,
the home terminal equipment is a PPPoE server, and the opposite terminal equipment is a PPPoE client; or, the local terminal device is a PPPoE client, and the opposite terminal device is a PPPoE server;
the feature information specifically includes: session identification, and/or source MAC address;
the connection interruption packet specifically includes: PADT messages.
5. The method of claim 1, wherein the process of querying a PPPoE session table via the feature information further comprises:
determining an input interface of the local terminal equipment, which receives the data message;
and inquiring a PPPoE session table through the characteristic information and the input interface.
6. A session removal device applied to a home terminal equipment is characterized by comprising:
the receiving module is used for receiving a data message sent by opposite-end equipment, and the data message carries characteristic information;
the query module is used for querying the PPPoE session table through the characteristic information;
a construction module, configured to determine that a PPPoE session is not established between the home device and the peer device when a session entry corresponding to the feature information does not exist in the PPPoE session table, and construct a connection interruption packet using the data packet;
and the sending module is used for sending the connection interruption message to the opposite terminal equipment so that the opposite terminal equipment can remove the PPPoE session between the opposite terminal equipment and the home terminal equipment according to the connection interruption message.
7. The apparatus according to claim 6, wherein the constructing module is specifically configured to determine whether the home device enables an unknown session active teardown function in a process of constructing a connection interruption packet using the data packet; and if so, constructing a connection interruption message by using the data message.
8. The apparatus according to claim 6 or 7, wherein the data packet carries a session identifier; and aiming at the connection interruption message constructed by the construction module, wherein the destination MAC address of the connection interruption message is the source MAC address of the data message, the source MAC address of the connection interruption message is the destination MAC address of the data message, the connection interruption message carries the session identifier, and the session identifier is used for enabling the opposite terminal equipment to remove the PPPoE session corresponding to the session identifier.
9. The apparatus of claim 6,
the home terminal equipment is a PPPoE server, and the opposite terminal equipment is a PPPoE client; or, the local terminal device is a PPPoE client, and the opposite terminal device is a PPPoE server;
the feature information specifically includes: session identification, and/or source MAC address;
the connection interruption packet specifically includes: PADT messages.
10. The apparatus according to claim 6, wherein the query module is specifically configured to determine an ingress interface, on the local device, where the data packet is received, in a process of querying a PPPoE session table through the feature information; and inquiring a PPPoE session table through the characteristic information and the input interface.
CN201710432944.XA 2017-06-09 2017-06-09 Session dismantling method and device Active CN107547618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710432944.XA CN107547618B (en) 2017-06-09 2017-06-09 Session dismantling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710432944.XA CN107547618B (en) 2017-06-09 2017-06-09 Session dismantling method and device

Publications (2)

Publication Number Publication Date
CN107547618A CN107547618A (en) 2018-01-05
CN107547618B true CN107547618B (en) 2020-11-06

Family

ID=60970150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710432944.XA Active CN107547618B (en) 2017-06-09 2017-06-09 Session dismantling method and device

Country Status (1)

Country Link
CN (1) CN107547618B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639802B (en) * 2018-12-18 2021-11-02 杭州迪普科技股份有限公司 Link statistics management method and device
CN113301097A (en) * 2020-12-30 2021-08-24 阿里巴巴集团控股有限公司 Data transmission method and device
CN112929225B (en) * 2021-03-30 2022-09-30 平安科技(深圳)有限公司 Session exception handling method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101170517A (en) * 2007-12-06 2008-04-30 杭州华三通信技术有限公司 Method and device for aging of control session table
CN101426004A (en) * 2007-10-29 2009-05-06 华为技术有限公司 Three layer conversation access method, system and equipment
CN102143088A (en) * 2011-04-29 2011-08-03 杭州华三通信技术有限公司 Method and equipment for forwarding data based on security socket layer (SSL) virtual private network (VPN)
CN104954438A (en) * 2015-05-08 2015-09-30 北京华为数字技术有限公司 Dialog processing method and dialog processing equipment based on PADT (pppoe active discovery terminate) message
CN105099805A (en) * 2014-05-16 2015-11-25 杭州华三通信技术有限公司 Bidirectional forwarding detection method and system
CN106131177A (en) * 2016-06-29 2016-11-16 杭州华三通信技术有限公司 A kind of message processing method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4236398B2 (en) * 2001-08-15 2009-03-11 富士通株式会社 Communication method, communication system, and communication connection program
US20050108403A1 (en) * 2003-11-17 2005-05-19 Intel Corporation Method, system, and program for transmitting packets

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101426004A (en) * 2007-10-29 2009-05-06 华为技术有限公司 Three layer conversation access method, system and equipment
CN101170517A (en) * 2007-12-06 2008-04-30 杭州华三通信技术有限公司 Method and device for aging of control session table
CN102143088A (en) * 2011-04-29 2011-08-03 杭州华三通信技术有限公司 Method and equipment for forwarding data based on security socket layer (SSL) virtual private network (VPN)
CN105099805A (en) * 2014-05-16 2015-11-25 杭州华三通信技术有限公司 Bidirectional forwarding detection method and system
CN104954438A (en) * 2015-05-08 2015-09-30 北京华为数字技术有限公司 Dialog processing method and dialog processing equipment based on PADT (pppoe active discovery terminate) message
CN106131177A (en) * 2016-06-29 2016-11-16 杭州华三通信技术有限公司 A kind of message processing method and device

Also Published As

Publication number Publication date
CN107547618A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
US10616379B2 (en) Seamless mobility and session continuity with TCP mobility option
CN107682284B (en) Method and network equipment for sending message
US11115391B2 (en) Securing end-to-end virtual machine traffic
US8402132B2 (en) Method, system and device for device capabilities exchange
EP2843905B1 (en) Single pass load balancing and session persistence in packet networks
US10530644B2 (en) Techniques for establishing a communication connection between two network entities via different network flows
EP3720100A1 (en) Service request processing method and device
US10812421B2 (en) Conveying instant messages via HTTP
US20110202670A1 (en) Method, device and system for identifying ip session
CN107547618B (en) Session dismantling method and device
US9172554B2 (en) Method and network access device for enabling data forwarding between different physical mediums
CN110086798B (en) Method and device for communication based on public virtual interface
CN104917605A (en) Key negotiation method and device during terminal device switching
WO2021169291A1 (en) Route advertising method, network elements, system, and device
CN110417632B (en) Network communication method, system and server
CN107528923B (en) Data transmission method of network adapter and network adapter
US11902380B1 (en) Liveness detection for an authenticated client session
CN110611615B (en) Routing information transmission method and device
CN107046568B (en) Authentication method and device
CN106936718B (en) PPPoE message transmission method and PPPoE server
CN112929417B (en) Message processing method and device
CN110120907B (en) Proposed group-based IPSec VPN tunnel communication method and device
EP3821570B1 (en) Pppoe extension over layer 2 switch embedding pppoe agent
CN106911696B (en) Keep-alive message transmission method and device
CN113300998A (en) Method and device for realizing data encryption transmission and communication system

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