CN106911817B - Method and device for notifying change of MAC address of PPPoE server - Google Patents

Method and device for notifying change of MAC address of PPPoE server Download PDF

Info

Publication number
CN106911817B
CN106911817B CN201710114923.3A CN201710114923A CN106911817B CN 106911817 B CN106911817 B CN 106911817B CN 201710114923 A CN201710114923 A CN 201710114923A CN 106911817 B CN106911817 B CN 106911817B
Authority
CN
China
Prior art keywords
pppoe
message
server
mac address
client
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
CN201710114923.3A
Other languages
Chinese (zh)
Other versions
CN106911817A (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.)
New H3C Technologies Co Ltd
Original Assignee
New 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201710114923.3A priority Critical patent/CN106911817B/en
Publication of CN106911817A publication Critical patent/CN106911817A/en
Application granted granted Critical
Publication of CN106911817B publication Critical patent/CN106911817B/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/50Address allocation

Abstract

The application provides a method for notifying the change of a PPPoE server MAC address, when the method is applied to a PPPoE server, the method is as follows: and when the PPPoE server determines that the MAC address of the PPPoE server changes, the changed MAC address is carried in the PADO message or the PADS message and is sent to the PPPoE client. In the method, after the MAC address of the PPPoE server changes, the PPPoE client does not need to be connected with the PPPoE server again and be not required to renegotiate the protocol with the PPPoE server from the PPPoE discovery phase, so that the influence caused by the change of the MAC address of the PPPoE server is reduced, the processing efficiency of the PPPoE server on the change after the MAC address changes is improved, and the user experience of the PPPoE client is also improved.

Description

Method and device for notifying change of MAC address of PPPoE server
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for notifying a change of a PPPoE server MAC address.
Background
PPP (Point-to-Point Protocol) is a Point-to-Point link layer Protocol. It can provide user authentication, is easily scalable, and supports synchronous/asynchronous communications. PPPoE (Point-to-Point protocol Ethernet, which carries PPP protocol over Ethernet) is a technology for establishing a PPPoE session over Ethernet and encapsulating a PPP packet. PPPOE encapsulates PPP message in Ethernet frame to provide point-to-point connection on Ethernet.
The PPPoE protocol often uses the Client/Server model. The PPPoE Client initiates a connection request to the PPPoE Server, establishes a PPPoE session after the session negotiation between the PPPoE Client and the PPPoE Server passes, and then provides access control, authentication, charging and other functions for the PPPoE Client.
The PPPoE Server and the PPPoE Client communicate with each other using a MAC (media Access Control) address. During the communication between the PPPoE Server and the PPPoE Client, the MAC address of the PPPoE Server may change. In this case, in order to ensure normal communication between the PPPoE Server and the PPPoE Client, the PPPoE Client needs to be powered on and off again to obtain a new MAC address of the PPPoE Server.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for notifying a change of a MAC address of a PPPoE Server, so as to provide a scheme that a PPPoE Client can obtain a new MAC address of the PPPoE Server without requiring the PPPoE Client to log on and log off again when the MAC address of the PPPoE Server changes.
Specifically, the method is realized through the following technical scheme:
in a first aspect of the present application, a method for notifying a change of a MAC address of a PPPoE server is provided, where the method is applied to the PPPoE server, and the method includes:
determining that the MAC address of the user changes;
and carrying the changed MAC address in a PADO message or a PADS message and sending the PADO message or the PADS message to the PPPoE client.
In a second aspect of the present application, a method for notifying a change of a MAC address of a PPPoE server is provided, where the method is applied to a PPPoE client, and the method includes:
receiving a PADO message or a PADS message sent by a PPPoE server;
and acquiring the MAC address of the PPPoE server after the change from the received PADO message or the PADS message.
In a third aspect of the present application, a PPPoE server is provided, which has a function of implementing the method provided in the first aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions.
In a possible implementation manner, the PPPoE server may include:
an address change determining unit, configured to determine that a MAC address of the mobile device itself changes;
and the sending unit is used for carrying the changed MAC address in a PADO message or a PADS message and sending the PADO message or the PADS message to the PPPoE client.
In another possible implementation manner, the PPPoE server may include a communication interface, a processor, a memory, and a bus, where the communication interface, the processor, and the memory are connected to each other through the bus; the processor executes the method provided by the first aspect of the present application by reading the logic instructions stored in the memory.
In a fourth aspect of the present application, a PPPoE client is provided, which has the function of implementing the method provided in the second aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules or units corresponding to the above functions.
In one possible implementation manner, the PPPoE client may include:
a receiving unit, configured to receive a PADO message or a PADS message sent by a PPPoE server;
and the address acquisition unit is used for acquiring the MAC address of the PPPoE server after the change from the received PADO message or PADS message.
In another possible implementation manner, the PPPoE client may include a communication interface, a processor, a memory, and a bus, where the communication interface, the processor, and the memory are connected to each other through the bus; the processor executes the method provided by the first aspect of the present application by reading the logic instructions stored in the memory.
By using the scheme provided by the application, the PPPoE Server notifies the PPPoE Client of the change of the MAC address of the PPPoE Client through the PADO message or the PADS message, the PPPoE Client can acquire the new MAC address of the PPPoE Server from the received PADO message or the PADS message at each negotiation stage and the data message stage after the negotiation is successful, and the PPPoE Server performs subsequent processing based on the new MAC address and the PPPoE Server. In the process, after the MAC address of the PPPoE Server is changed, the PPPoE Client does not need to be on and off again, and protocol renegotiation is not needed to be carried out with the PPPoE Server from a PPPoE discovery phase, so that the influence caused by the change of the MAC address of the PPPoE Server is reduced, the processing efficiency of the PPPoE Server on the change after the MAC address is changed is improved, and the user experience of the PPPoE Client is also improved.
Drawings
Fig. 1 is a schematic diagram of PPPoE networking;
FIG. 2 is a diagram illustrating a communication process between a PPPoE Client and a PPPoE Server in a PPPoE protocol;
fig. 3 is a PPPoE message frame format;
FIG. 4 is a TAG package format for the PAYLOAD field;
fig. 5 is a flowchart of a method for notifying a change of a PPPoE Server MAC address according to an embodiment of the present application;
fig. 6 is a format of a PADO message for notifying a change of a PPPoE Server MAC address according to an embodiment of the present application;
fig. 7A is a format of a PADS message for notifying a change of a PPPoE Server MAC address according to an embodiment of the present application;
fig. 7B is another format of a PADS message for notifying a change of a PPPoE Server MAC address according to an embodiment of the present application;
fig. 8 is a functional block diagram of a PPPoE Server according to an embodiment of the present application;
fig. 9 is a hardware architecture diagram of a PPPoE Server according to an embodiment of the present application;
fig. 10 is a functional block diagram of a PPPoE Client according to an embodiment of the present application;
fig. 11 is a hardware architecture diagram of a PPPoE Client according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein 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 appended 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 refers to and encompasses 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. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Hereinafter, the PPPoE protocol will be briefly described.
The PPPoE protocol often uses the Client/Server model. A typical PPPoE networking is shown in fig. 1, where a PPPoE session is established between a host running a PPPoE Client and a router of an operator running a PPPoE server. When a PPPoE Client wishes to start a PPPoE session, the PPPoE Client first looks for a PPPoE Server on the broadcast network. If there are multiple PPPoE servers on the network, the PPPoE Client will make corresponding selection according to the service provided by each PPPoE Server or the pre-configuration of itself. When PPPoEClient selects the required PPPoE Server, it starts to establish PPPoE session process with the selected PPPoE Server.
Specifically, the communication procedure between the PPPoE Client and the PPPoE Server mainly includes a Discovery phase (PPPoE Discovery phase) and a Session phase (PPPoE Session phase) as shown in fig. 2.
The main flow of the discovery phase comprises:
firstly, a PPPoE Client broadcasts a PADI (PPPoE Active Discovery Initiation) message on the network and searches for a PPPoE Server capable of providing a service. Since the PADI message is sent in a broadcast manner, the destination address of the ethernet frame corresponding to the PADI message should be filled with all 1, and the source address should be filled with the MAC address of the PPPoE Client. The PADI message may be received by multiple PPPoE servers.
And secondly, the PPPoE Server replies a PADO (PPPoE Active Discovery Offer) message to the PPPoE Client after receiving the PADI message. The source address of the Ethernet frame corresponding to the PADI message is filled with the MAC address of the PPPoE Server, and the destination address is filled with the MAC address of the PPPoE Client acquired from the PADI message.
And thirdly, after receiving a plurality of PADO messages from a plurality of PPPoE servers, the PPPoE Client selects one PPPoE Server from the plurality of PADO messages as an object of a subsequent session and sends a PADR (PPPoE Active Discovery Request) message to the selected PPPoE Server. After receiving the PADO message, the PPPoE Client knows the MAC address of the PPPoE Server, so that the source address of the ethernet frame corresponding to the PADR message is filled with the MAC address of the PPPoE Client, and the destination address is filled with the MAC address of the selected PPPoE Server.
And a fourth step, namely the last step of the discovery phase, in which the PPPoE Server allocates a unique Session Identifier (ID) to the PPPoE Client after receiving the PADR message, and carries the Session ID in a PADS (PPPoE active discovery Session-configuration) message to send the PPPoE Client.
And then entering a session stage of the PPPoE Client and the PPPoE Server. As shown in fig. 2, the session phase may include an LCP (Link Control Protocol) phase, an Authentication phase, an NCP (Network Control Protocol) phase, and a PPP service phase (also referred to as an IP phase). In the session stage, a PPPoE protocol is adopted to exchange data messages between the PPPoE Client and the PPPoE Server which have established point-to-point connection, and the data messages of the network layer are transmitted.
As shown in fig. 3, a frame format of the PPPoE messages sent to and from the PPPoE Client and the PPPoE Server may include the following fields:
DMAC (destination address) field, which is either a unicast MAC address or an ethernet broadcast address (0xFFFFFFFFFFFF) during the discovery phase. In the session phase, the contents of the destination address field can only be the unicast MAC address of the determined communication partner.
SMAC (source address) field whose contents are the MAC address of the source device interface.
An ethertype field whose value is set to 0x8863 during the discovery phase and 0x8864 during the session phase.
VER (PPPoE version number) field, fixed to 0x 1.
TYPE (PPPoE TYPE) field, value fixed: 0x 1.
CODE (PPPoE message type) field for identifying different types of messages. For example, the CODE field is 0x00, representing session data; the CODE domain is 0x09 and represents a PADI message; the CODE field is 0x07, which indicates PADO message or PADT (PPPOE active discovery termination message) message; the CODE domain is 0x19 and represents PADR message; the CODE field is 0x65, which represents the PADS message.
SESSION _ ID (SESSION identification) field: the value is set to 0x0000 in the PADI message, the PADO message and the PADR message. And the PADS message, the PADT message and the PPP session are fixed values (which cannot be 0).
LENGTH field, which is used to define the LENGTH of Payload field of PPPoE, not including the LENGTH of Ethernet frame, and not including the header LENGTH of PPPoE.
The PAYLOAD field, which may be of variable length, may contain 0 or more TAGs, and cannot exceed 1492 bytes. TAG is in TLV (type + length + data) format as shown in fig. 4. The defined TAGs are: TAG _ TYPE ═ 0x0000, which indicates the end of the TAG in the message data field; TAG _ TYPE ═ 0x0101, which indicates a service name indicating some services that the network side can provide to the user. The definition of partial TAG is only exemplified here, and details can be found in RFC (request for comments, protocol standard request for comments) 2561.
As can be seen from the above description of the PPPoE protocol, the PPPoE Client and the PPPoE Server mainly use the MAC address for communication. However, during the actual communication between the two parties, the MAC address of the PPPoE Server may change, for example, when the stacking device where the PPPoE Server is located is split, the MAC address of the PPPoE Server may change. Under this situation, in order to ensure normal communication between the PPPoE Server and the PPPoE Client, the PPPoE Client is often required to go online and offline again, and a new MAC address of the PPPoE Server is obtained through a PADO message replied by the PPPoE Server at a discovery stage. However, this approach may impact the normal use and user experience of the PPPoE Client.
Therefore, the method and the device provide a solution, and the MAC address changed by the PPPoE Server is timely notified to the PPPoE Client through protocol message interaction between the PPPoE Server and the PPPoE Client, so that the PPPoE Client does not need to be re-on and off.
The technical scheme of the application is described in the following with the accompanying drawings and various embodiments of the specification.
Fig. 5 is a flowchart illustrating a method for notifying a change of a PPPoE Server MAC address according to the present application, where the method includes the following steps:
step 501: after determining that the MAC address of the PPPoE Server is changed, the PPPoE Server carries the changed MAC address in a PADO message or a PADS message and sends the changed MAC address to the PPPoE Client.
Step 502: after receiving the PADO message or the PADS message sent by the PPPoE Server, the PPPoE Client acquires the MAC address changed by the PPPoE Server from the received PADO message or the PADS message.
The PPPoE Client herein may be any one of PPPoE clients communicating with the PPPoE Server.
In the existing implementation, after broadcasting PADI, one PPPoE Client may receive multiple PADO messages sent by multiple PPPoE servers, and in general, the PPPoE Client selects one PPPoE Server from the multiple PADO messages as an object of a subsequent session, and sends a PADR message to the selected PPPoE Server.
For PPPoE Client in PPPoE discovery phase, when PPPoE Server determines that its MAC address changes after receiving the PADI message sent by the PPPoE Client and before replying the PADO message to the PPPoE Client, because the PPPoE Server and the PPPoE Client are not in formal communication in this scene, both parties can process according to normal protocol flow, i.e. the PPPoE Server updates its MAC address and then sends the PADO message to the PPPoE Client, and the PPPoE Client analyzes the MAC address updated by the PPPoE Server from the source address field of the PADO message.
In another scenario of the PPPoE discovery phase, when the PPPoE Server determines that its MAC address changes after replying a PADO message to the PPPoE Client, because the PPPoE Server and the PPPoE Client have already started communication in this scenario, in order to enable the PPPoE Client to know the new MAC address of the PPPoE Server without going on or off the line again, the PPPoE Server can use the PADO message provided by the present application to carry its changed MAC address in the PADO message to notify the PPPoE Client.
The format of the PADO message provided in the present application is shown in fig. 6. In fig. 6, the ethernet _ TYPE field is 0x8863, the CODE field is 0x07, the SESSION _ ID field is 0x0000, which indicates that the packet is a PADO packet, and the changed MAC address of the PPPoE Server is carried in the SMAC (source address) field of the PADO packet. In addition, the PADO message adds a new TAG type on the basis of the original PPPoE discovery stage message format, and the new TAG type can be used for carrying the MAC address before the change of the PPPoE Server, so that the PPPoE Client updates the corresponding address information of the PPPoE Server based on the MAC address before the change of the PPPoE Server.
The value of TAG _ TYPE of the new TAG may be defined as any value that does not conflict with the TAG defined in the standard, e.g. as specified in fig. 6, i.e. 0x 0501. The TAG _ LENGTH is used to define the LENGTH of TAG _ VALUE (TAG data), and the LENGTH of TAG _ LENGTH is specified to be 6 bits as in fig. 6. The TAG _ VALUE is used to carry the MAC address before the PPPoE Server change.
Corresponding to the PADO message format shown in fig. 6, the following processing procedures may be added to the PPPoE Client side in the present application:
when the PPPoE Client receives the PADO message sent by the same PPPoE Server again in the PPPoE discovery stage, the PPPoE Client acquires the MAC addresses before and after the change of the PPPoE Server from the PADO message received again.
The PPPoE Client may determine, according to a new TAG TYPE carried in the PADO message, that the PADO message is a PADO message that the PPPoE Client receives again from the same PPPoE Server, where the new TAG TYPE is TAG _ TYPE ═ 0x0501 in fig. 6, and the TAG _ VALUE is used to carry a TAG TYPE of an old MAC of the PPPoE Server.
And then, the PPPoE Client locally searches the address information of the PPPoE Server matched with the MAC address before the change of the PPPoE Server. Under normal conditions, since the PPPoE Client receives the PADO message sent by the PPPoE Server according to the normal protocol flow before step 502, the corresponding address information can be found locally, so that the MAC address of the PPPoE Server after change is used to update the found address information. Under special conditions, if the PPPoE Server address information stored locally is lost due to a failure, the PPPoE Server may not find the corresponding address information locally, so that the PPPoE Server directly stores the changed MAC address of the PPPoE Server locally.
Particularly, if the PPPoE Server is selected as the object of the subsequent session and sends the PADR message to the old MAC address of the PPPoE Server before receiving the PADO message carrying the new MAC address sent by a certain PPPoE Server, in order to ensure that the PPPoE Server can receive the PADR message, the PPPoE Server may send the PADR message to the new MAC address of the PPPoE Server again after receiving the PADO message carrying the new MAC address sent by the PPPoE Server.
In addition, for the PPPoE Client in the PPPoE session stage, since the PPPoE Client generally ignores the PADO message in the PPPoE session stage, the PPPoE Server can carry the changed MAC address in the PADS message and send the PADO message to the PPPoE Client.
The PADS message for notifying the change of the PPPoE Server MAC address in this application may have the following two message formats:
the first PADS message format:
in a possible example, considering that a PPPoE Client is generally connected to only one PPPoE Server, this means that the PPPoE Client can determine the address information of the PPPoE Server to be updated according to the session ID carried in the PADS message, so the above-mentioned PADS message for notifying the change of the MAC address of the PPPoE Server can reuse the original message format of the PPPoE discovery phase, and the specific message format is shown in fig. 7A.
Wherein, the ETHER _ TYPE field is 0x8863, and the CODE field is 0x65, which indicates that the message is a PADS message. The changed MAC address of PPPoE Server is loaded in the SMAC (source address) domain of the original PADS message.
The example does not need to modify the message format of the original PPPoE discovery phase, thereby being better compatible with the existing PPPoE protocol.
Corresponding to the PADS message format shown in fig. 7A, the following processing procedures may be added to the PPPoE Client side in the present application:
when the PPPoE Client receives a PADS message sent by the PPPoE Server at the PPPoE session stage, the session ID and the MAC address after the change of the PPPoE Server can be obtained from the received PADS message. And then, the PPPoE Client locally searches the address information of the PPPoE Server matched with the session ID. Under normal conditions, since the PPPoE Client receives the PADO message sent by the PPPoE Server according to the normal protocol flow before step 502, the corresponding address information can be found locally, so that the MAC address of the PPPoE Server after change is used to update the found address information. Under special conditions, if the PPPoE Server address information stored locally is lost due to a failure, the PPPoE Server may not find the corresponding address information locally, so that the PPPoE Client directly locally stores the mapping relationship between the session ID and the changed MAC address of the PPPoE Server.
The second PADS message format:
in another possible example, considering that a PPPoE Client may connect to multiple PPPoE servers in the future, and session IDs assigned to the same PPPoE Client may be the same, so to enable the PPPoE Client to accurately find address information of the PPPoE Server to be updated, the PADS message for notifying the change of the PPPoE Server MAC address may add a new TAG type on the basis of the original PPPoE discovery phase message format, where the new TAG type may be used to carry a MAC address before the change of the PPPoE Server, so that the PPPoE Client updates the address information of the corresponding PPPoE Server based on the MAC address before the change of the PPPoE Server.
A PADS message format carrying a new TAG is shown in fig. 7B, where a value of TAG _ TYPE (TAG TYPE) of the new TAG may be defined as any value that does not conflict with the TAG defined in the standard, e.g., the TAG _ TYPE is defined as 0x0501 in fig. 7B. The TAG _ LENGTH is used to define the LENGTH of TAG _ VALUE (TAG data), and the LENGTH of TAG _ LENGTH is specified to be 6 bits as in fig. 7B. The TAG _ VALUE is used to carry the MAC address before the PPPoE Server change.
In the example, a type of TAG is added on the basis of the original PPPoE discovery phase message format, so that in a scene that one PPPoE Client is connected with a plurality of PPPoE servers, the PPPoE servers can also notify the PPPoE clients of the changed MAC addresses in time.
Corresponding to the PADS message format shown in fig. 7B, the following processing procedures may be added to the PPPoE Client side in the present application:
when the PPPoE Client receives a PADS message sent by the PPPoE Server at the PPPoE session stage, the PPPoE Client can acquire a session ID and MAC addresses before and after the change of the PPPoE Server from the received PADS message.
Then, the PPPoE Client searches the address information of the PPPoE Server matched with the session ID locally, or searches the address information of the PPPoE Server matched with the MAC address before the change, or searches the address information of the PPPoE Server matched with the session ID and the MAC address before the change simultaneously. Under normal conditions, because the PPPoEClient received the PADO message sent by the PPPoE Server according to the normal protocol flow before step 502, the corresponding address information can be found locally, so that the MAC address of the PPPoE Server after change is used to update the found address information. Under special conditions, if the PPPoE Server address information stored locally is lost due to a failure, the PPPoE Server may not find the corresponding address information locally, so that the PPPoE Client directly locally stores the mapping relationship between the session ID and the changed MAC address of the PPPoE Server.
It should be noted that, in the present application, the PPPoE Server and the PPPoE Client process other protocol messages except for the PADO message and the PADS message, and still process according to RFC 2516.
To sum up, in the technical solution provided by the present application, the PPPOE Server notifies the PPPOE Client of the event of the change of its MAC address through the PADO message or the PADS message, and the PPPOE Client can obtain the new MAC address of the PPPOE Server from the received PADO message or PADS message at each negotiation stage and at the data message stage after the negotiation is successful, and perform subsequent processing with the PPPOE Server based on the new MAC address. In the process, after the MAC address of the PPPoE Server is changed, the PPPoE Client does not need to be connected to the Internet again and not need to renegotiate the protocol with the PPPoE Server from the PPPoE discovery stage, so that the influence caused by the change of the MAC address of the PPPoE Server is reduced, the processing efficiency of the PPPoE Server on the change after the MAC address is changed is improved, and the user experience of the PPPoE Client is also improved.
The methods provided herein are described above. The apparatus provided in the present application is described below.
Referring to fig. 8, a functional block diagram of a PPPoE Server provided in an embodiment of the present application is shown, where the PPPoE Server includes:
an address change determination unit 801 for determining that its MAC address has changed.
And a sending unit 802, configured to carry the changed MAC address in a PADO message or a PADS message, and send the PADO message or the PADS message to the PPPoE Client.
Optionally, the sending unit 802 may be specifically configured to:
when the PPPoE Server and the PPPoE Client are in a PPPoE discovery stage and the PPPoE Server sends a PADO message to the PPPoE Client, the changed MAC address is carried in the PADO message and sent to the PPPoE Client;
and when the PPPoE Server and the PPPoE Client are in a PPPoE session stage, carrying the changed MAC address in a PADS message and sending the PADS message to the PPPoE Client.
Optionally, the PADO packet may add a new flag type on the basis of an original PPPoE discovery phase packet format, where the new flag type is used to carry an MAC address of the PPPoE Server before the change, so that the PPPoE Client updates the address information of the corresponding PPPoE Server based on the MAC address of the PPPoE Server before the change;
the PADS message can multiplex the original PPPoE discovery stage message format; or, the PADS message may also add the new flag type on the basis of the original PPPoE discovery phase message format.
For details of the PPPoE Server in this embodiment, reference may be made to the description of the PPPoE Server in the method shown in fig. 5, which is not described herein again.
It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Referring to fig. 9, the present application further provides a hardware architecture diagram of a PPPoE Server, where the PPPoE Server includes a communication interface 901, a processor 902, a memory 903, and a bus 904; the communication interface 901, the processor 902 and the memory 903 communicate with each other via the bus 904.
The communication interface 901 may be used for communicating with a PPPoE Client. The processor 902 may be a Central Processing Unit (CPU), the memory 903 may be a non-volatile memory (non-volatile memory), and the memory 903 stores logic instructions for notifying a change of a MAC address of the PPPoE Server, and the processor 902 may execute the logic instructions stored in the memory 903 to implement the function of the PPPoE Server in the method shown in fig. 5, which may be specifically referred to as the interaction flow shown in fig. 5.
Referring to fig. 10, a functional block diagram of a PPPoE Client provided in an embodiment of the present application is shown, where the PPPoE Client includes:
a receiving unit 1001, configured to receive a PADO message or a PADS message sent by the PPPoE Server.
An address obtaining unit 1002, configured to obtain the changed MAC address of the PPPoE Server from the received PADO message or PADS message.
Optionally, when the MAC address changed by the PPPoE Server is acquired from the received PADO message, the address acquiring unit is specifically configured to: when the PPPoE Client receives the PADO message sent by the PPPoE Server again in the PPPoE discovery stage, the MAC addresses before and after the change of the PPPoE Server are obtained from the PADO message received again;
wherein, the address obtaining unit 1002 determines the PADO message as a PADO message received again from the PPPoE Server according to a new tag type carried in the PADO message; and the new mark type is used for carrying the MAC address before the PPPoEServer is changed.
Correspondingly, the device may further include:
an address saving unit, configured to locally search address information of the PPPoE Server that matches the MAC address before the PPPoE Server changes; if so, updating the address information searched by using the changed MAC address of the PPPoE Server; if not, the changed MAC address of the PPPoE Server is stored locally.
Optionally, when the PADS message multiplexes the original PPPoE discovery phase message format, the address obtaining unit 1002 is specifically configured to obtain the session identifier and the changed MAC address of the PPPoE Server from the received PADS message when the PPPoE Client receives the PADS message sent by the PPPoE Server in the PPPoE session phase.
Correspondingly, the address saving unit is used for locally searching the address information of the PPPoE Server matched with the session identifier; if so, updating the address information searched by using the changed MAC address of the PPPoE Server; if not, the mapping relation between the session identification and the changed MAC address of the PPPoE Server is locally stored.
Optionally, when the PADS message is added with a new tag type based on the original PPPoE discovery phase message format, where the new tag type is used to carry the MAC address before the PPPoE Server changes, the address obtaining unit 1002 is specifically configured to obtain the session identifier and the MAC addresses before and after the PPPoE Server changes from the received PADS message when the PPPoE Client receives the PADS message sent by the PPPoE Server at the PPPoE session phase.
Correspondingly, the address saving unit is used for locally searching the address information of the PPPoE Server matched with the session identifier and/or the MAC address before the change of the PPPoE Server; if so, updating the address information searched by using the changed MAC address of the PPPoE Server; if not, the mapping relation between the session identification and the changed MAC address of the PPPoE Server is locally stored.
For details that are not described in the present embodiment, reference may be made to the above description of the PPPoE Client in the method shown in fig. 5, and details are not described herein again.
It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Referring to fig. 11, the present application further provides a hardware architecture diagram of a PPPoE Client, where the PPPoE Client includes a communication interface 1101, a processor 1102, a memory 1103, and a bus 1104; the communication interface 1101, the processor 1102, and the memory 1103 communicate with each other via a bus 1104.
The communication interface 1101 may be used for communicating with a PPPoE Client. The processor 1102 may be a central processing unit, the memory 1103 may be a non-volatile memory, and the memory 1103 stores therein a logic instruction notifying a change of a MAC address of the PPPoE server, and the processor 1102 may execute the logic instruction stored in the memory 1103 to implement the function of the PPPoE Client in the method shown in fig. 5, which may be specifically referred to as the interaction flow shown in fig. 5.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (14)

1. A method for announcing the change of Media Access Control (MAC) address of a point-to-point protocol over Ethernet (PPPoE) server side is applied to the PPPoE server side, and the method comprises the following steps:
determining that the MAC address of the user changes; the changed MAC address is different from the MAC address of the PPPoE server recorded by the PPPoE client;
and carrying the changed MAC address in a PPPoE discovery session PADO providing message or a PPPoE discovery session PADS confirming message and sending the message to the PPPoE client.
2. The method of claim 1, wherein the step of carrying the changed MAC address in a PADO message or a PADS message to the PPPoE client comprises:
when the PPPoE server and the PPPoE client are in a PPPoE discovery stage and the PPPoE server sends a PADO message to the PPPoE client, the changed MAC address is carried in the PADO message and sent to the PPPoE client;
and when the PPPoE server and the PPPoE client are in a PPPoE session stage, carrying the changed MAC address in a PADS message and sending the PADS message to the PPPoE client.
3. The method of claim 1,
the PADO message is added with a new mark type on the basis of the original PPPoE discovery stage message format, and the new mark type is used for carrying the MAC address before the change of the PPPoE server, so that the PPPoE client updates the address information of the corresponding PPPoE server based on the MAC address before the change of the PPPoE server;
the PADS message multiplexes the original PPPoE discovery stage message format; or, the PADS message adds the new mark type on the basis of the original PPPoE discovery phase message format.
4. A method for notifying media intervention control MAC address change of a point-to-point protocol PPPoE server carried on Ethernet, which is characterized in that the method is applied to a PPPoE client, and the method comprises the following steps:
receiving a PPPOE discovery offer PADO message or a PPPOE discovery session confirmation PADS message sent by a PPPoE server;
and acquiring the changed MAC address of the PPPoE server from the received PADO message or the PADS message, wherein the changed MAC address is different from the MAC address of the PPPoE server recorded by the PPPoE client.
5. The method of claim 4, wherein obtaining the changed MAC address of the PPPoE server from the received PADO message specifically includes:
when the PPPoE client receives the PADO message sent by the PPPoE server again in the PPPoE discovery stage, the MAC addresses before and after the change of the PPPoE server are obtained from the PADO message received again;
the PPPoE client determines the PADO message as the PADO message received again from the PPPoE server according to the new mark type carried in the PADO message; the new mark type is used for carrying the MAC address before the change of the PPPoE server;
the method further comprises the following steps:
locally searching address information of the PPPoE server matched with the MAC address before the change of the PPPoE server; if the address information is found, updating the found address information by using the changed MAC address of the PPPoE server; if not, the changed MAC address of the PPPoE server is stored locally.
6. The method of claim 4, wherein the PADS message multiplexes an original PPPoE discovery phase message format;
acquiring the changed MAC address of the PPPoE server from the received PADS message, which specifically comprises the following steps:
when the PPPoE client receives a PADS message sent by the PPPoE server in a PPPoE session stage, acquiring a session identifier and an MAC address of the PPPoE server after change from the received PADS message;
the method further comprises the following steps:
searching address information of the PPPoE server matched with the session identification locally; if the address information is found, updating the found address information by using the changed MAC address of the PPPoE server; if not, the mapping relation between the session identifier and the changed MAC address of the PPPoE server is locally stored.
7. The method of claim 4, wherein the PADS message adds a new tag type based on an original PPPoE discovery phase message format, and the new tag type is used to carry the MAC address before the PPPoE service end changes;
acquiring the changed MAC address of the PPPoE server from the received PADS message, which specifically comprises the following steps:
when the PPPoE client receives a PADS message sent by the PPPoE server in a PPPoE session stage, acquiring a session identifier and MAC addresses before and after the change of the PPPoE server from the received PADS message;
the method further comprises the following steps:
locally searching address information of the PPPoE server matched with the session identifier and/or the MAC address before the change of the PPPoE server; if the address information is found, updating the found address information by using the changed MAC address of the PPPoE server; if not, the mapping relation between the session identifier and the changed MAC address of the PPPoE server is locally stored.
8. A PPPoE server for bearing point-to-point protocol over Ethernet is characterized in that the PPPoE server comprises:
an address change determining unit, configured to determine that a media access control MAC address of the mobile terminal changes; the changed MAC address is different from the MAC address of the PPPoE server recorded by the PPPoE client;
and the sending unit is used for carrying the changed MAC address in a PPPoE discovery session PADO message or a PPPoE discovery session PADS confirmation PADS message and sending the message to the PPPoE client.
9. The PPPoE server as recited in claim 8, wherein said sending unit is specifically configured to:
when the PPPoE server and the PPPoE client are in a PPPoE discovery stage and the PPPoE server sends a PADO message to the PPPoE client, the changed MAC address is carried in the PADO message and sent to the PPPoE client;
and when the PPPoE server and the PPPoE client are in a PPPoE session stage, carrying the changed MAC address in a PADS message and sending the PADS message to the PPPoE client.
10. The PPPoE server of claim 8,
the PADO message is added with a new mark type on the basis of the original PPPoE discovery stage message format, and the new mark type is used for carrying the MAC address before the change of the PPPoE server, so that the PPPoE client updates the address information of the corresponding PPPoE server based on the MAC address before the change of the PPPoE server;
the PADS message multiplexes the original PPPoE discovery stage message format; or, the PADS message adds the new mark type on the basis of the original PPPoE discovery phase message format.
11. A point-to-point protocol over ethernet PPPoE client, comprising:
a receiving unit, configured to receive a PPPoE discovery offer PADO message or a PPPoE discovery session confirmation PADS message sent by a PPPoE server;
and the address acquisition unit is used for acquiring the changed media access control MAC address of the PPPoE service end from the received PADO message or the PADS message, wherein the changed MAC address is different from the MAC address of the PPPoE service end recorded by the PPPoE client.
12. The PPPoE client as recited in claim 11, wherein said address obtaining unit is specifically configured to:
when the PPPoE client receives the PADO message sent by the PPPoE server again in the PPPoE discovery stage, the MAC addresses before and after the change of the PPPoE server are obtained from the PADO message received again;
the address acquisition unit determines the PADO message as a PADO message received again from the PPPoE server according to a new mark type carried in the PADO message; the new mark type is used for carrying the MAC address before the change of the PPPoE server;
the PPPoE client further comprises:
the address storage unit is used for locally searching address information of the PPPoE server matched with the MAC address before the change of the PPPoE server; if the address information is found, updating the found address information by using the changed MAC address of the PPPoE server; if not, the changed MAC address of the PPPoE server is stored locally.
13. The PPPoE client of claim 11, wherein said PADS message multiplexes an original PPPoE discovery phase message format;
the address obtaining unit is specifically configured to, when the PPPoE client receives a PADS message sent by the PPPoE server at a PPPoE session stage, obtain a session identifier and a changed MAC address of the PPPoE server from the received PADS message;
the PPPoE client further comprises:
the address storage unit is used for locally searching address information of the PPPoE server matched with the session identifier; if the address information is found, updating the found address information by using the changed MAC address of the PPPoE server; if not, the mapping relation between the session identifier and the changed MAC address of the PPPoE server is locally stored.
14. The PPPoE client as recited in claim 11, wherein the PADS packet adds a new tag type based on an original PPPoE discovery phase packet format, and the new tag type is used to carry an MAC address before the PPPoE server changes;
the address obtaining unit is specifically configured to, when the PPPoE client receives a PADS message sent by the PPPoE server at a PPPoE session stage, obtain a session identifier and MAC addresses of the PPPoE server before and after the change from the received PADS message;
the PPPoE client further comprises:
the address storage unit is used for locally searching address information of the PPPoE server matched with the session identifier and/or the MAC address before the change of the PPPoE server; if the address information is found, updating the found address information by using the changed MAC address of the PPPoE server; if not, the mapping relation between the session identifier and the changed MAC address of the PPPoE server is locally stored.
CN201710114923.3A 2017-02-28 2017-02-28 Method and device for notifying change of MAC address of PPPoE server Active CN106911817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710114923.3A CN106911817B (en) 2017-02-28 2017-02-28 Method and device for notifying change of MAC address of PPPoE server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710114923.3A CN106911817B (en) 2017-02-28 2017-02-28 Method and device for notifying change of MAC address of PPPoE server

Publications (2)

Publication Number Publication Date
CN106911817A CN106911817A (en) 2017-06-30
CN106911817B true CN106911817B (en) 2020-01-03

Family

ID=59208411

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710114923.3A Active CN106911817B (en) 2017-02-28 2017-02-28 Method and device for notifying change of MAC address of PPPoE server

Country Status (1)

Country Link
CN (1) CN106911817B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770078A (en) * 2017-10-13 2018-03-06 广州视源电子科技股份有限公司 Interactive intelligent tablet computer, the transmission method of data, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578276A (en) * 2003-07-03 2005-02-09 阿尔卡特公司 Method and apparatus for dynamic change of MAC address
CN101060456A (en) * 2007-06-12 2007-10-24 中兴通讯股份有限公司 Ethernet point-to-point protocol-based broad band access method and system
CN103812857A (en) * 2013-11-08 2014-05-21 汉柏科技有限公司 Method for realizing uniqueness license

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4881829B2 (en) * 2007-10-03 2012-02-22 株式会社日立製作所 Packet forwarding system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578276A (en) * 2003-07-03 2005-02-09 阿尔卡特公司 Method and apparatus for dynamic change of MAC address
CN101060456A (en) * 2007-06-12 2007-10-24 中兴通讯股份有限公司 Ethernet point-to-point protocol-based broad band access method and system
CN103812857A (en) * 2013-11-08 2014-05-21 汉柏科技有限公司 Method for realizing uniqueness license

Also Published As

Publication number Publication date
CN106911817A (en) 2017-06-30

Similar Documents

Publication Publication Date Title
US11902116B2 (en) Packet processing method, forwarding plane device and network device
CN103580980B (en) The method and device thereof that virtual network finds and automatically configures automatically
US8942212B2 (en) Autoconfiguration system for wireless sensor network and its method, and gateway apparatus for wireless sensor network
WO2018231197A1 (en) Conveying non-access stratum messages over ethernet
US20070195804A1 (en) Ppp gateway apparatus for connecting ppp clients to l2sw
CN106878199B (en) Configuration method and device of access information
CN102394857B (en) Method, device and equipment for establishing point-to-point protocol session on Ethernet
CN107070719B (en) Equipment management method and device
US11929851B2 (en) Gateway selection method, device, and system
CN106131177B (en) Message processing method and device
CN106911817B (en) Method and device for notifying change of MAC address of PPPoE server
CN113824789A (en) Configuration method, device, equipment and storage medium of path descriptor
CN109922005B (en) Load sharing method, device and system and computer readable storage medium
KR20170119098A (en) Apparatus and method for bluetooth communication
CN108259292B (en) Method and device for establishing tunnel
WO2022068389A1 (en) User group-based packet forwarding method, device and system
CN113872844B (en) Method for establishing VXLAN tunnel and related equipment
WO2022166932A1 (en) Communication authentication method, device, and storage medium
CN108011932B (en) Access processing method and device
CN108243078B (en) Address allocation method and device
CN115460143A (en) Message processing method and device and electronic equipment
CN115460138A (en) Network intercommunication method and device
CN114363252A (en) Message forwarding method, device and system based on user group
CN115460140A (en) Network intercommunication method and device
CN115460141A (en) Network intercommunication method and device

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