WO2018006684A1 - 报文处理方法、装置及路由器 - Google Patents

报文处理方法、装置及路由器 Download PDF

Info

Publication number
WO2018006684A1
WO2018006684A1 PCT/CN2017/087578 CN2017087578W WO2018006684A1 WO 2018006684 A1 WO2018006684 A1 WO 2018006684A1 CN 2017087578 W CN2017087578 W CN 2017087578W WO 2018006684 A1 WO2018006684 A1 WO 2018006684A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
router
message
information
standby
Prior art date
Application number
PCT/CN2017/087578
Other languages
English (en)
French (fr)
Inventor
侯波
刘青松
王昕�
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018006684A1 publication Critical patent/WO2018006684A1/zh

Links

Images

Definitions

  • the present disclosure relates to the field of communications, and in particular, to a message processing method, apparatus, and router.
  • IPv4 Internet Protocol version 4
  • IPv6 Internet Protocol version 6
  • IPv6 Neighbor Discovery Protocol NDP
  • the addresses and gateways acquired by users are uncertain.
  • the device can obtain the address of the primary router by delaying the DHCPv6 protocol packet, but obtains the status of the DHCPv6.
  • the user sends an RS message actively before the address, the same problem occurs when the user obtains the address without state: that is, the user finds the standby router as the gateway.
  • the embodiment of the invention provides a message processing method, device and router, so as to at least solve the problem that the address acquired by the user in the dual-system cold standby networking in the related art is uncertain.
  • a packet processing method including: a primary router receives a request packet from a user, where the request packet needs to be replied; and the primary router reports according to the request Sending a message to the user; and notifying the standby router of the information of the user, where the information of the user is used to notify the standby router not to reply to the request message from the user, where the master The router and the standby router are in a primary-standby relationship.
  • the information that the primary router informs the standby router of the user includes: the primary router notifying the standby router of the information of the user within a predetermined duration, where the predetermined duration is the standby The length of time that the router delays replying to the request message.
  • the predetermined duration is greater than a time used by the primary router to reply the message to the user.
  • the request message includes at least one of the following: a route request RS message, a DHCPv6 message, and/or the reply message includes at least one of the following: a route advertisement RA message, a DHCPv6 message .
  • a packet processing method including: a standby router receives a request message from a user, where the request message needs to be replied; and the standby router determines whether it is from the primary router. Receiving the information of the user, where the primary router and the standby router are in a master-slave relationship; if the standby router determines that the information of the user is received, the standby router does not refer to the user Request a message to reply.
  • the determining, by the standby router, whether the information about the user is received from the primary router includes: determining, by the standby router, whether the user is received from the primary router according to whether the information of the user is received within a predetermined duration Information.
  • the method further includes: the standby router replies to the request message of the user if the information of the user is not received within the predetermined duration.
  • the predetermined duration is greater than a time used by the primary router to reply the message to the user.
  • the request message includes at least one of the following: a route request RS message, a DHCPv6 message, and/or the reply message includes at least one of the following: a route advertisement RA message, a DHCPv6 message .
  • a message processing apparatus including: a first receiving module, configured to receive a request message from a user, where the request message needs to be replied; a module, configured to send a message to the user according to the request message; the notification module is configured to notify the standby router of the information of the user, where the information of the user is used to notify the standby router that the The request packet of the user is replied, and the primary router and the standby router are in a master-slave relationship.
  • the notification module includes: a notification unit, configured to notify the standby router of the information of the user within a predetermined duration, where the predetermined duration is a duration of the standby router delaying replying to the request packet .
  • a router comprising the apparatus of any of the above.
  • a packet processing apparatus including: a second receiving module, configured to receive a request message from a user, where the request message needs to be replied; And determining, by the primary router, the information about the user, where the primary router and the standby router are in a master-slave relationship; and the second replying module is configured to: when the standby router receives the information of the user The reply message of the user is not replied to.
  • the determining module includes: a determining unit, configured to determine whether the information of the user is received from the primary router according to whether the information of the user is received within a predetermined duration.
  • the device further includes: a third replying module, configured to reply to the request message of the user if the information of the user is not received within the predetermined duration.
  • a third replying module configured to reply to the request message of the user if the information of the user is not received within the predetermined duration.
  • a router comprising the apparatus of any of the preceding clauses.
  • a storage medium configured to store program code for performing the following steps: the primary router receives a request message from the user, wherein the request message needs to be replied; the primary router reports the message according to the request message The user replies to the message; the information about the user is notified to the standby router, wherein the information of the user is used to notify the standby router not to reply to the request message from the user, the primary router and the The standby router is the primary and backup relationship.
  • the storage medium is further configured to store program code for performing the following steps: the primary router notifying the standby router of the information of the user includes: the primary router notifying the standby router within a predetermined time period The information of the user, wherein the predetermined duration is a length of time for the standby router to delay replying to the request message.
  • the storage medium is further configured to store program code for performing the step of: the predetermined duration being greater than a time for the primary router to reply the message to the user.
  • the storage medium is further configured to store program code for performing the following steps: the request message includes at least one of: a route request RS message, a DHCPv6 message; and/or the reply message
  • the method includes at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • a storage medium is also provided.
  • the storage medium is configured to store program code for performing the following steps: the standby router receives the request message of the user, wherein the request message needs to be replied; and the standby router determines whether the user is received from the primary router. The information that the primary router and the standby router are in a master-slave relationship; and the standby router does not reply to the request packet of the user if the result of the determination is that the information of the user is received. .
  • the storage medium is further configured to store program code for performing the following steps: the standby router determining whether the information of the user is received from the primary router includes: whether the standby router receives the received data according to the predetermined duration Describe the user's information and determine whether the user's information is received from the primary router.
  • the storage medium is further configured to store program code for performing the following steps: the standby router not reporting the information of the user within the predetermined duration, the request report to the user Reply to the text.
  • the storage medium is further configured to store program code for performing the step of: the predetermined duration being greater than a time for the primary router to reply the message to the user.
  • the storage medium is further configured to store program code for performing the following steps: the request message includes at least one of: a route request RS message, a DHCPv6 message; and/or the reply message
  • the method includes at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • the primary router replies to the user according to the request packet, and notifies the backup router that the request packet from the user is not replied, and the address obtained by the user is the master router.
  • the address therefore, can solve the problem that the address obtained by the user in the dual-system cold standby networking in the related art is uncertain, and avoids the situation that the user finds multiple router addresses, thereby improving the effectiveness of obtaining the router address.
  • FIG. 1 is a block diagram showing the hardware structure of a router of a message processing method according to an embodiment of the present invention
  • FIG. 2 is a flowchart 1 of a message processing method according to an embodiment of the present invention.
  • FIG. 3 is a second flowchart of a message processing method according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of normal packet processing of a primary router according to a preferred embodiment of the present invention.
  • FIG. 5 is a schematic diagram of packet processing of a main router downtime according to a preferred embodiment of the present invention.
  • FIG. 6 is a structural block diagram 1 of a message processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a notification module 66 of a message device according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram 1 of a router according to an embodiment of the present invention.
  • FIG. 9 is a second structural block diagram of a message processing apparatus according to an embodiment of the present invention.
  • FIG. 10 is a structural block diagram of a determining module 94 of a message device according to an embodiment of the present invention.
  • FIG. 11 is a structural block diagram 3 of a message device according to an embodiment of the present invention.
  • FIG. 12 is a structural block diagram 2 of a router according to an embodiment of the present invention.
  • FIG. 1 is a hardware block diagram of a router of a message processing method according to an embodiment of the present invention.
  • router 10 may include one or more (only one shown) processor 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), A memory 104 for storing data, and a transmission device 106 for communication functions.
  • processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA
  • a memory 104 for storing data
  • a transmission device 106 for communication functions.
  • the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • the router may also include more or fewer components than shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the message processing method in the embodiment of the present invention, and the processor 102 executes each of the software programs and modules stored in the memory 104.
  • a functional application and data processing, that is, the above method is implemented.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 can further include relative
  • the remotely located memories of the processor 102 can be connected to the router 10 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is for receiving or transmitting data via a network.
  • the network specific examples described above may include a wireless network provided by a communication provider of the router 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 is a flowchart 1 of a packet processing method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 the primary router receives the request packet from the user, where the request packet needs to be replied;
  • Step S204 the primary router replies to the user according to the request packet
  • step S206 the information about the user is notified to the standby router, where the information of the user is used to notify the standby router not to reply to the request packet from the user, and the primary router and the standby router are in a master-slave relationship.
  • the primary router replies to the user according to the request packet used, and notifies the backup router that the request packet from the user is not replied, and the address obtained by the user is the address of the primary router, and the primary router and the standby device are used.
  • the above interaction between the routers solves the problem that the address acquired by the user in the dual-system cold standby networking in the related art is uncertain, and improves the effectiveness of the user to obtain the router address.
  • the primary router and the backup router involved in the foregoing steps may be only the primary and backup relationship differences, and the two may be the same or different in structure.
  • the primary router and the backup router may perform mutual conversion, and a user's
  • the primary router can be a backup router for other users.
  • step S204 and step S206 are interchangeable, that is, step S206 may be performed first, and then S204 is performed.
  • the primary router may notify the standby router of the information of the user in multiple manners.
  • the primary router may notify the backup router of the user's information when idle, and for example, the primary router may be inward for a predetermined period of time.
  • the standby router informs the user of the information, wherein the predetermined duration is the length of time for the standby router to delay the reply request message.
  • the primary router can notify the standby router of the information of the user in the duration of the standby router delaying the reply request packet, and ensure that the backup router delays the reply request message.
  • the user information received by the main router is received to ensure the efficiency of the user to obtain the router address.
  • the predetermined duration may be greater than a time used by the primary router to reply to the user. That is, the length of time that the standby router delays replying to the user request packet may be longer than the time that the primary router responds to the user.
  • the time delay for the standby router to delay replying to the user request packet is greater than the time for the primary router to reply to the user, which can ensure that the time before the standby router delays replying to the user request packet arrives.
  • the router replies to the user, ensuring that the user can obtain the address of the primary router, which improves the accuracy of the user's access to the router address.
  • the request message may include at least one of the following: a route requesting RS message and a DHCPv6 message
  • the replies may include at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • FIG. 3 is a flowchart 2 of a packet processing method according to an embodiment of the present invention. As shown in FIG. 3, the process includes the following steps:
  • Step S302 The standby router receives the request packet of the user, where the request packet needs to be replied;
  • Step S304 the standby router determines whether the user information is received from the primary router, where the primary router and the standby router are in a master-slave relationship;
  • step S306 if the backup router receives the information of the user, the backup router does not reply to the request message of the user.
  • the standby router prepares to determine whether the user's information is received from the primary router. If the user's information is received, the user does not reply to the request packet, and the above interaction between the primary router and the standby router is resolved.
  • the address obtained by the user in the cold standby network has uncertainty, which improves the effectiveness of the user to obtain the router address.
  • the primary router and the backup router involved in the foregoing steps may be only the primary and backup relationship differences, and the two may be the same or different in structure.
  • the primary router and the backup router may perform mutual conversion, and a user's
  • the primary router can be a backup router for other users.
  • the standby router can determine whether the user information is received from the primary router in multiple manners. For example, the standby router can immediately determine whether the user information is received when receiving the request message of the user. For another example, the standby router can determine whether the user's information is received from the primary router according to whether the user's information is received within a predetermined duration. Compared with the manner of immediately determining whether the user's information is received, whether the user's information is received from the primary router according to whether the user's information is received within a predetermined time, the main processor receives the user's request message and transmits the user's request message. Information is reserved for time, improving user access to router letters The accuracy of the information.
  • the standby router determines whether the user's information is received from the primary router according to whether the user's information is received within a predetermined time, and the primary processor receives the user's request message and sends the user's information. Leave time and improve the accuracy of the user's access to router information.
  • the router may perform processing in multiple manners. For example, the standby router may interact with the main processor to determine the state of the main processor according to the main processor. The status determines whether the user's request message is replied. For another example, the standby router can reply to the user's request message if the user's information is not received within a predetermined period of time.
  • the standby router replies to the user's request message without receiving the user's information within a predetermined period of time, thereby improving the efficiency of the user acquiring the router address.
  • the predetermined duration may be greater than a time used by the primary router to reply to the user. That is, the length of time that the standby router delays replying to the user request packet may be longer than the time that the primary router responds to the user.
  • the time delay for the standby router to delay replying to the user request packet is greater than the time for the primary router to reply to the user, which can ensure that the time before the standby router delays replying to the user request packet arrives.
  • the router replies to the user, ensuring that the user can obtain the address of the primary router, which improves the accuracy of the user's access to the router address.
  • the request message may include at least one of the following: a route requesting RS message and a DHCPv6 message
  • the replies may include at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • the standby router responds to RA packets and DHCPv6 packets. After the active and standby routers receive the multicast RSs, the primary router sends the packets to the user.
  • the router needs to reply the RA destination user MAC (acting with the above-mentioned user information) to the standby router, and the backup router records the user MAC, and then prepares the router for the RS user's RS or DHCPv6. The message is not responded, and the suppression is released after a reasonable time (to ensure that the user successfully accesses from the primary router) (acting the same duration as described above).
  • the standby router After receiving the RS or DHCPv6 message from the user, the standby router does not receive any other router (such as the primary router) to advertise the MAC address of the user within the delay response packet. After the delay time expires, the router considers the primary router. Downtime, the standby router responds to the user message. Provide access, and the user obtains the address and gateway from the standby router.
  • the time of the standby router delay response packet is set to be longer than the time required for the primary router to advertise the user MAC address.
  • R1 is a Broadband Remote Access Server (BRAS) host (primary router), and R2 is BRAS standby (standby router), the standby configuration response delay.
  • BRAS Broadband Remote Access Server
  • the user When the user is powered on, it first sends a multicast RS message (stateless access) or sends a multicast RS first and then sends a DHCPv6 Solicit Discovery message (stateful access) because R2 is a standby router delay response packet. Therefore, when R1 is in stateful access, the user will generate an IPv6 prefix address and a gateway according to the RA message sent by R1. When R1 provides stateful access, the user will use the R1 priority R2 to process the RS message and the Solicit message. The RA message sent by R1 generates a gateway, and obtains the DHCPv6 address allocated by the Advertise packet sent by R1. So regardless of whether R1 is stateless or stateful, users are getting IPv6 addresses and gateways from R1.
  • the RA content information is copied at the same time as the RA message sent by the user to the user.
  • the source MAC address of the message is the MAC address of the user
  • the destination MAC address is the MAC address of the R2 (the MAC address of the R2 can be configured in advance on the R1), so that the R1 sends the RA.
  • R2 and R2 receive the RA packet, the R2 does not respond to the MAC packet and the DHCPv6 packet.
  • the suppression is released after a reasonable time (the user has successfully accessed from R1). After the release suppression is performed, if the RS or DHCPv6 message of the MAC user is received again, the above response suppression process is repeated. It is guaranteed that the user can only obtain the IPv6 address and gateway from R1 when R1 is available, and does not obtain the IPv6 address and gateway from R2. This prevents the user from acquiring multiple gateways in the dual-system cold standby network.
  • FIG. 5 is a schematic diagram of packet processing of a primary router in accordance with a preferred embodiment of the present invention.
  • R1 is a BRAS host
  • R2 is a BRAS standby
  • a standby configuration response delay is obtained.
  • host R1 downtime In the case of host R1 downtime:
  • the user When the user starts up, it first sends a multicast RS message (stateless access) or sends a multicast RS first and then sends a DHCPv6 Solicit message (stateful access).
  • R1 does not respond to user packets, and R2 is delayed.
  • the RA message of the user MAC of the R1 unicast advertisement is not received during the response time, so the R2 delay response time is up.
  • the user After the R2 is in the stateless mode, the user generates an IPv6 prefix address and a gateway according to the RA message sent by the R2.
  • the R2 provides the stateful access, the user generates the RA message according to the R2.
  • the gateway obtains the DHCPv6 address assigned by the Advertise packet sent by R2. So regardless of whether R2 is stateless or stateful, users can only obtain IPv6 addresses and gateways from R2.
  • the above technical solution of the embodiment of the present invention ensures that when the main processor is normal, the user can only obtain the IPv6 prefix address or the DHCPv6 address of the primary router, and the main router is used as the gateway, and the main processor is down.
  • the user can also obtain the IPv6 prefix address or DHCPv6 address of the standby router, and use the backup router as a gateway to improve the reliability and accuracy of the user to obtain the router address and the gateway.
  • different release times may be set for different backup routers, so that in the case of the main processor down, the backup router with the shortest release time is first processed. If the standby router with the shortest release time is normal, the user MAC address is advertised to the other standby routers, so that the other routers do not respond to the RS messages and DHCPv6 messages that process the MAC address within the predetermined time.
  • the setting of the standby time of each standby router is similar to that of the standby router in the foregoing embodiment, and details are not described herein.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a message device and a router are provided, which are used to implement the foregoing embodiments and preferred embodiments, and are not described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 6 is a block diagram showing the structure of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, the apparatus includes: a first receiving module 62, a first replying module 64, and a notification module 66. The device will be described below.
  • the first receiving module 62 is configured to receive a request message from the user, where the request message needs to be replied; the first replying module 64 is connected to the first receiving module 62, and is configured to reply to the user according to the request message.
  • the message is sent to the first receiving module 62, and is used to notify the standby router of the information of the user, wherein the information of the user is used to notify the standby router not to reply to the request message from the user, the primary router and the The standby router is the primary and backup relationship.
  • FIG. 7 is a structural block diagram of a notification module 66 of a message device according to an embodiment of the present invention. As shown in FIG. 7, the notification module 66 includes:
  • the informing unit 72 is configured to notify the user of the information of the user within a predetermined period of time, wherein the predetermined duration is the duration of the standby router delaying the reply request message.
  • the predetermined duration is greater than a time used by the primary router to reply to the user.
  • the request message includes at least one of the following: a route request RS message, and a DHCPv6 message
  • the reply message includes at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • FIG. 8 is a block diagram showing the structure of a router according to an embodiment of the present invention. As shown in FIG. 8, the first packet processing apparatus 82 shown in FIG. 6 or FIG. 7 in the above embodiment of the router.
  • FIG. 9 is a block diagram showing the structure of a message processing apparatus according to an embodiment of the present invention. As shown in FIG. 8, the apparatus includes: a second receiving module 92, a determining module 94, and a second replying module 96. The device will be described below.
  • the second receiving module 92 is configured to receive a request message from the user, where the request message needs to be replied; the determining module 94 is connected to the second receiving module 92, and is configured to determine whether the user is received from the primary router.
  • the information is that the primary router and the standby router are in a master-slave relationship.
  • the second replying module 96 is connected to the determining module 94. The standby router does not reply to the user's request packet when receiving the information of the user.
  • FIG. 10 is a structural block diagram of a determining module 94 of a message device according to an embodiment of the present invention. As shown in FIG. 10, the determining module 94 includes:
  • the determining unit 102 is configured to determine whether the user's information is received from the primary router according to whether the user's information is received within a predetermined duration.
  • FIG. 11 is a structural block diagram 3 of a message device according to an embodiment of the present invention. As shown in FIG. 11, the device includes: in addition to all the modules shown in FIG.
  • the third reply module 112 is configured to reply to the user's request message if the user's information is not received within a predetermined duration.
  • the predetermined duration is greater than a time used by the primary router to reply to the user.
  • the request message includes at least one of the following: a route request RS message, and a DHCPv6 message
  • the reply message includes at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • FIG. 12 is a block diagram showing the structure of a router according to an embodiment of the present invention. As shown in FIG. 12, the second packet processing apparatus 122 shown in any one of FIG. 9 to FIG. 11 in the above embodiment of the router.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the primary router receives the request packet from the user, where the request packet needs to be replied;
  • S2 The primary router replies to the user according to the request packet
  • the user is informed of the information of the user, wherein the information of the user is used to notify the standby router not to reply to the request message from the user, and the primary router and the standby router are in a master-slave relationship.
  • the storage medium is further configured to store program code for performing the following steps: the information that the primary router informs the standby router to the user includes: the primary router notifying the user of the information of the standby router within a predetermined period of time, wherein the predetermined duration is The length of time that the router delays replying to the request message.
  • the storage medium is further configured to store program code for performing the step of: the predetermined duration is greater than the time taken by the primary router to reply to the message to the user.
  • the storage medium is further configured to store program code for performing the following steps: the request message includes at least one of the following: a route request RS message, a DHCPv6 message; and/or the reply message includes at least the following One of them: the route advertisement RA message and the DHCPv6 message.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the standby router receives the request packet of the user, where the request packet needs to be replied;
  • the standby router determines whether the user information is received from the primary router, where the primary router and the standby router are in a master-slave relationship;
  • the standby router does not enter the request message of the user. Line reply.
  • the storage medium is further configured to store program code for performing the following steps: the standby router determines whether the user's information is received from the primary router, and the standby router determines whether the user receives the information according to whether the user receives the information within the predetermined time period. Received user information from the primary router.
  • the storage medium is further configured to store program code for performing the step of: replying to the user's request message if the standby router does not receive the user's information within a predetermined length of time.
  • the storage medium is further configured to store program code for performing the step of: the predetermined duration is greater than the time taken by the primary router to reply to the message to the user.
  • the storage medium is further configured to store program code for performing the following steps: the request message includes at least one of the following: a route request RS message, a DHCPv6 message; and/or the reply message includes at least the following One of them: the route advertisement RA message and the DHCPv6 message.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs, according to the stored program code in the storage medium, that the primary router receives the request packet from the user, where the request packet needs to be replied; the primary router according to the request packet The user replies to the message; the user is informed of the information of the user, wherein the information of the user is used to notify the backup router not to reply to the request message from the user, and the primary router and the standby router are in the active/standby relationship.
  • the processor performs, according to the stored program code in the storage medium, the information that the primary router notifies the standby router to the user includes: the primary router notifying the user of the information of the standby router within a predetermined time period, wherein the predetermined The duration is the length of time that the standby router delays replying the request packet.
  • the processor executes according to the stored program code in the storage medium: the predetermined duration is greater than the time taken by the primary router to reply the message to the user.
  • the processor performs, according to the stored program code in the storage medium, that the request message includes at least one of the following: a route request RS message, a DHCPv6 message, and/or a reply message.
  • the method includes at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • the processor executes, according to the stored program code in the storage medium, the standby router receives the request message of the user, where the request message needs to be replied; and the standby router determines whether to receive from the primary router. Information to the user, where the primary router and the standby router are in the primary-slave relationship; If the user's information is received, the user's request message is not replied.
  • the processor performs, according to the stored program code in the storage medium, that the standby router determines whether the user's information is received from the primary router, including: whether the standby router receives the information of the user according to the predetermined duration. , to determine whether the user's information is received from the primary router.
  • the processor executes, according to the stored program code in the storage medium, that the standby router replies to the user's request message if the user does not receive the information within the predetermined time period.
  • the processor executes according to the stored program code in the storage medium: the predetermined duration is greater than the time taken by the primary router to reply the message to the user.
  • the processor performs, according to the stored program code in the storage medium, that the request message includes at least one of the following: a route request RS message, a DHCPv6 message, and/or a reply message.
  • the method includes at least one of the following: a route advertisement RA message and a DHCPv6 message.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the technical solution of the present disclosure can be applied to the field of communications.
  • the primary router replies to the user according to the request packet used, and notifies the backup router that the request packet from the user is not replied, and the address obtained by the user is the address of the primary router. Therefore, the problem that the address obtained by the user in the dual-system cold standby networking in the related art is uncertain is avoided, and the situation that the user finds multiple router addresses is avoided, and the effect of obtaining the address of the router is improved.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种报文处理方法、装置及路由器,其中,该方法包括:主路由器接收到来自用户的请求报文,其中,所述请求报文需要进行回复;所述主路由器根据所述请求报文向所述用户回复报文;向备路由器告知所述用户的信息,其中,所述用户的信息用于通知所述备路由器不对来自所述用户的所述请求报文进行回复,所述主路由器和所述备路由器为主备关系。通过本技术方案,解决了相关技术中双机冷备组网中用户获取的地址带有不确定性的问题,进而达到了提高获取路由器地址有效性的效果。

Description

报文处理方法、装置及路由器 技术领域
本公开涉及通信领域,具体而言,涉及一种报文处理方法、装置及路由器。
背景技术
随着互联网的飞速发展,当前的互联网协议版本4(Internet Protocol version 4,简称为IPv4)地址协议定义的地址空间正在面临即将耗尽的危险。互联网协议版本6(Internet Protocol version 6,简称为IPv6)的出现,极大地增大了网络地址空间,能够很好地解决IPv4地址空间即将耗尽的问题。
作为IPv4宽带接入中常用的冷备技术,在IPv6的使用中遇到了问题。例如,IPv6的邻居发现协议(Neighbor Discovery Protocol,简称为NDP)协议使得获取地址和网关更为灵活,在双机冷备组网中,用户获取的地址和网关都带有不确定性。
双机冷备组网中IPv6用户无状态获取地址时,当用户发送组播路由通告(Router Solicit,简称为RS)报文后,无论备路由器做出多少时间延迟回复单播路由公告(Router Advertise,简称为RA)报文,实际上都无法阻止用户发现备路由器作为网关,进而获取到备路由器的前缀地址和网关,如果用户获取了多个网关,用户则生成多条同类型同优先级的默认路由。由此看来,当前的IPoEv6冷备组网中,即无法保证用户从主路由器上线,又可能将用户上行流量引向备路由器。
动态主机配置协议版本6(Dynamic Host Configuration Protocol v6,简称为DHCPv6)有状态获取地址时,虽然可以通过控制备路由器延时DHCPv6协议报文,让用户获取主路由器的地址,但是在DHCPv6有状态获取地址之前用户主动发送RS报文时,还是会发生和无状态获取地址时一样的问题:即用户发现了备路由器作为网关。
因此,相关技术中双机冷备组网中用户获取的地址带有不确定性的问题。
发明内容
本发明实施例提供了一种报文处理方法、装置及路由器,以至少解决相关技术中双机冷备组网中用户获取的地址带有不确定性的问题。
根据本发明的一个实施例,提供了一种报文处理方法,包括:主路由器接收到来自用户的请求报文,其中,所述请求报文需要进行回复;所述主路由器根据所述请求报文向所述用户回复报文;向备路由器告知所述用户的信息,其中,所述用户的信息用于通知所述备路由器不对来自所述用户的所述请求报文进行回复,所述主路由器和所述备路由器为主备关系。
可选地,所述主路由器向所述备路由器告知所述用户的信息包括:所述主路由器在预定时长内向所述备路由器告知所述用户的信息,其中,所述预定时长为所述备路由器延迟回复所述请求报文的时长。
可选地,所述预定时长大于所述主路由器向所述用户回复所述报文用的时间。
可选地,所述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的所述报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
根据本发明的另一个实施例,提供了一种报文处理方法,包括:备路由器接收到用户的请求报文,其中,所述请求报文需要进行回复;所述备路由器判断是否从主路由器接收到所述用户的信息,其中,所述主路由器和所述备路由器为主备关系;所述备路由器在判断结果为接收到所述用户的信息的情况下,不对所述用户的所述请求报文进行回复。
可选地,所述备路由器判断是否从主路由器接收到所述用户的信息包括:所述备路由器根据在预定时长内是否收到所述用户的信息,判断是否从主路由器接收到所述用户的信息。
可选地,所述方法还包括:所述备路由器在所述预定时长内未收到所述用户的信息的情况下,对所述用户的所述请求报文进行回复。
可选地,所述预定时长大于所述主路由器向所述用户回复所述报文用的时间。
可选地,所述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的所述报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
根据本发明的又一个实施例,提供了一种报文处理装置,包括:第一接收模块,用于接收到来自用户的请求报文,其中,所述请求报文需要进行回复;第一回复模块,用于根据所述请求报文向所述用户回复报文;告知模块,用于向备路由器告知所述用户的信息,其中,告知所述用户的信息用于通知所述备路由器不对来自所述用户的所述请求报文进行回复,主路由器和所述备路由器为主备关系。
可选地,所述告知模块包括:告知单元,用于在预定时长内向所述备路由器告知所述用户的信息,其中,所述预定时长为所述备路由器延迟回复所述请求报文的时长。
根据本发明的又一个实施例,提供了路由器,该路由器包括上述任一项所述的装置。
根据本发明的又一个实施例,提供了一种报文处理装置,包括:第二接收模块,用于接收到来自用户的请求报文,其中,所述请求报文需要进行回复;判断模块,用于判断是否从主路由器接收到所述用户的信息,其中,所述主路由器和备路由器为主备关系;第二回复模块,用于所述备路由器在接收到所述用户的信息的情况下,不对所述用户的所述请求报文进行回复。
可选地,所述判断模块包括:判断单元,用于根据在预定时长内是否收到所述用户的信息,判断是否从主路由器接收到所述用户的信息。
可选地,所述装置还包括:第三回复模块,用于在所述预定时长内未收到所述用户的信息的情况下,对所述用户的所述请求报文进行回复。
根据本发明的另一个实施例,提供了一种路由器,该路由器包括前述任一项所述的装置。
根据本发明的又一个实施例,提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:主路由器接收到来自用户的请求报文,其中,所述请求报文需要进行回复;所述主路由器根据所述请求报文向所述用户回复报文;向备路由器告知所述用户的信息,其中,所述用户的信息用于通知所述备路由器不对来自所述用户的所述请求报文进行回复,所述主路由器和所述备路由器为主备关系。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述主路由器向所述备路由器告知所述用户的信息包括:所述主路由器在预定时长内向所述备路由器告知所述用户的信息,其中,所述预定时长为所述备路由器延迟回复所述请求报文的时长。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述预定时长大于所述主路由器向所述用户回复所述报文用的时间。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的所述报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:备路由器接收到用户的请求报文,其中,所述请求报文需要进行回复;所述备路由器判断是否从主路由器接收到所述用户的信息,其中,所述主路由器和所述备路由器为主备关系;所述备路由器在判断结果为接收到所述用户的信息的情况下,不对所述用户的所述请求报文进行回复。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述备路由器判断是否从主路由器接收到所述用户的信息包括:所述备路由器根据在预定时长内是否收到所述用户的信息,判断是否从主路由器接收到所述用户的信息。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述备路由器在所述预定时长内未收到所述用户的信息的情况下,对所述用户的所述请求报文进行回复。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述预定时长大于所述主路由器向所述用户回复所述报文用的时间。
可选地,存储介质还设置为存储用于执行以下步骤的程序代码:所述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的所述报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
通过本发明实施例提供的技术方案,由于主路由器根据用于的请求报文向用户回复报文,并通知备路由器不对来自该用户的该请求报文进行回复,用户获取的地址为主路由器的地址,因此,可以解决相关技术中双机冷备组网中用户获取的地址带有不确定性的问题,避免了用户发现多个路由器地址的情况,达到提高获取路由器地址有效性的效果。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是本发明实施例的报文处理方法的路由器的硬件结构框图;
图2是根据本发明实施例的报文处理方法的流程图一;
图3是根据本发明实施例的报文处理方法的流程图二;
图4是根据本发明优选实施例的主路由器正常的报文处理示意图;
图5是根据本发明优选实施例的主路由器宕机的报文处理示意图;
图6是根据本发明实施例的报文处理装置的结构框图一;
图7是根据本发明实施例的报文装置的告知模块66的结构框图;
图8是根据本发明实施例的路由器的结构框图一;
图9是根据本发明实施例的报文处理装置的结构框图二;
图10是根据本发明实施例的报文装置的判断模块94的结构框图;
图11是根据本发明实施例的报文装置的结构框图三;
图12是根据本发明实施例的路由器的结构框图二。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
实施例1
本申请实施例1所提供的方法实施例可以在路由器、计算机终端或者类似的运算装置中执行。以运行在路由器上为例,图1是本发明实施例的报文处理方法的路由器的硬件结构框图。如图1所示,路由器10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,路由器还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可用于存储应用软件的软件程序以及模块,如本发明实施例中的报文处理方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对 于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至路由器10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括路由器10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于路由器的报文处理方法,图2是根据本发明实施例的报文处理方法的流程图一,如图2所示,该流程包括如下步骤:
步骤S202,主路由器接收到来自用户的请求报文,其中,请求报文需要进行回复;
步骤S204,主路由器根据请求报文向用户回复报文;
步骤S206,向备路由器告知用户的信息,其中,该用户的信息用于通知备路由器不对来自该用户的该请求报文进行回复,主路由器和备路由器为主备关系。
通过上述步骤,主路由器根据用于的请求报文向用户回复报文,并通知备路由器不对来自该用户的该请求报文进行回复,用户获取的地址为主路由器的地址,通过主路由器与备用路由器之间的上述交互,解决了相关技术中双机冷备组网中用户获取的地址带有不确定性的问题,提高了用户获取路由器地址的有效性。
可选地,上述步骤中涉及的主路由器和备用路由器可以仅是主备关系区别,两者在结构上可以相同或者不同,在必要时,主路由器与备用路由器可以进行相互转换,某一用户的主路由器可以为其他用户的备路由器。
可选地,步骤S204和步骤S206的执行顺序是可以互换的,即可以先执行步骤S206,然后再执行S204。
可选地,在步骤S206中,主路由器可以采用多种方式向备路由器告知用户的信息,例如,主路由器可以在闲时向备用路由器告知用户的信息,又例如,主路由器可以在预定时长内向备路由器告知该用户的信息,其中,上述预定时长为备路由器延迟回复请求报文的时长。
通过本发明实施例的上述技术方案,主路由器可以在备路由器延迟回复请求报文的时长内向备路由器告知该用户的信息,保证了备路由器在延迟回复请求报文的时长 内收到主路由器告知的用户信息,保证了用户获取路由器地址的效率。
可选地,上述预定时长可以大于主路由器向用户回复报文用的时间。即,备路由器延迟回复用户请求报文的时长可以大于主路由器向用户回复报文用的时间。
通过本发明实施例的上述技术方案,将备路由器延迟回复用户请求报文的时长大于主路由器向用户回复报文用的时间,可以保证在备用路由器延迟回复用户请求报文的时间到达前,主路由器向用户回复报文,保证了用户可以获取到主路由器的地址,提高了用户获取路由器地址的准确性。
可选地,上述请求报文可以包括以下至少之一:路由请求RS报文、DHCPv6报文,上述回复的报文可以包括以下至少之一:路由通告RA报文、DHCPv6报文。
在本实施例中还提供了一种运行于路由器的报文处理方法,图3是根据本发明实施例的报文处理方法的流程图二,如图3所示,该流程包括如下步骤:
步骤S302,备路由器接收到用户的请求报文,其中,请求报文需要进行回复;
步骤S304,备路由器判断是否从主路由器接收到用户的信息,其中,主路由器和备路由器为主备关系;
步骤S306,备路由器在判断结果为接收到用户的信息的情况下,不对用户的该请求报文进行回复。
通过上述步骤,备路由器备判断是否从主路由器接收到用户的信息,在收到用户的信息的情况下不对用户的该请求报文进行回复,通过主路由器与备路由器之间的上述交互,解决了相关技术中双机冷备组网中用户获取的地址带有不确定性的问题,提高了用户获取路由器地址的有效性。
可选地,上述步骤中涉及的主路由器和备用路由器可以仅是主备关系区别,两者在结构上可以相同或者不同,在必要时,主路由器与备用路由器可以进行相互转换,某一用户的主路由器可以为其他用户的备路由器。
可选地,在步骤S304中,备路由器可以采用多种方式判断是否从主路由器接收到用户的信息,例如,备路由器可以在接收到用户的请求报文时立即判断是否接收到用户的信息,又例如,备路由器可以根据在预定时长内是否收到用户的信息,判断是否从主路由器接收到用户的信息。与立即判断是否接收到用户的信息的方式相比,根据在预定时间内是否收到用户的信息判断是否从主路由器接收到用户的信息,为主处理器接收用户的请求报文以及发送用户的信息预留了时间,提高了用户获取路由器信 息的准确性。
通过本发明实施例的上述技术方案,备路由器根据在预定时间内是否收到用户的信息判断是否从主路由器接收到用户的信息,为主处理器接收用户的请求报文以及发送用户的信息预留了时间,提高了用户获取路由器信息的准确性。
可选地,备路由器在预定时长内未收到用户的信息的情况下,可以采用多种方式进行处理,例如,备用路由器可以与主处理器交互,确定主处理器的状态,根据主处理器的状态确定是否对用户的请求报文进行回复。又例如,备路由器可以在预定时长内未收到用户的信息的情况下,对用户的请求报文进行回复。
通过本发明实施例的上述技术方案,备路由器在预定时长内未收到用户的信息的情况下,对用户的请求报文进行回复,提高了用户获取路由器地址的效率。
可选地,上述预定时长可以大于主路由器向用户回复报文用的时间。即,备路由器延迟回复用户请求报文的时长可以大于主路由器向用户回复报文用的时间。
通过本发明实施例的上述技术方案,将备路由器延迟回复用户请求报文的时长大于主路由器向用户回复报文用的时间,可以保证在备用路由器延迟回复用户请求报文的时间到达前,主路由器向用户回复报文,保证了用户可以获取到主路由器的地址,提高了用户获取路由器地址的准确性。
可选地,上述请求报文可以包括以下至少之一:路由请求RS报文、DHCPv6报文,上述回复的报文可以包括以下至少之一:路由通告RA报文、DHCPv6报文。
基于上述实施例及可选实施方式,为说明方案的整个流程交互,在本优选实施例中,分别针对主路由器可用以及主处理器宕机两种情况进行说明。
在双机冷备的组网中,备路由器做RA报文和DHCPv6报文延时响应,当主备路由器同时收到组播RS之后,在备路由器延时响应的时间内,主路由器正常给用户回复单播RA报文或DHCPv6报文的同时,需要将回复RA目的用户MAC(作用同上述用户的信息)告诉备路由器,备路由器记录此用户MAC,进而备路由器对此MAC用户的RS或者DHCPv6报文不做回应,合理时间(确保用户从主路由器成功接入)(作用同上述预定时长)后释放此抑制。释放抑制后,如果再收到此MAC用户的RS或者DHCPv6报文,重复上述流程。备路由器收到用户的RS或者DHCPv6报文后,如果在延时响应报文的时间内未收到其他路由器(如主路由器)通告此用户的MAC,延时时间到后(此时认为主路由器宕机),备路由器对该用户报文做响应, 提供接入,用户从备路由器获取地址和网关。为保证用户只能获取到主路由器的IPv6前缀地址或DHCPv6地址,并以主路由器作为网关,备路由器延时响应报文的时间设置为大于主路由器通告用户MAC所需的时间。
下面针对主路由器可用以及主处理器宕机两种情况进行分别进行说明。
图4是根据本发明优选实施例的主路由器正常的报文处理示意图,如图4所示,初始配置R1为宽带远程服务器(Broadband Remote Access Server,简称为BRAS)主机(主路由器),R2为BRAS备机(备路由器),备机配置响应延迟。在R1可用的情况下:
当用户开机时首先发送组播RS报文(无状态接入)或首先发送组播RS后再发送DHCPv6的Solicit发现报文(有状态接入),因为R2为备路由器延时响应报文,所以R1优先R2处理RS报文和Solicit报文,当R1为无状态接入时,用户会根据R1发送的RA报文生成IPv6前缀地址和网关;当R1提供有状态接入时,用户会根据R1发送的RA报文生成网关,并获取R1发送的Advertise报文分配的DHCPv6地址上线。所以不管R1是无状态接入还是有状态接入,此时用户都是从R1获取IPv6地址和网关。
在R1给用户发送的RA报文的同时复制一份RA内容信息,报文源MAC为用户的MAC,目的MAC为R2的MAC(R2的MAC可以预先在R1上配置),从而R1将RA发送到R2,R2收到该RA报文时做处理,解析出报文的源MAC后,将此MAC做接入抑制,对该MAC的RS报文和DHCPv6报文都不做回应。合理时间(用户已经从R1成功接入)后释放该抑制。释放抑制后,如果再收到此MAC用户的RS或者DHCPv6报文,重复上述响应抑制流程。保证了R1可用情况下用户只能从R1获取IPv6地址和网关,而不会从R2获取IPv6地址和网关。避免了双机冷备组网中用户获取多网关的情况。
图5是根据本发明优选实施例的主路由器宕机的报文处理示意图,如图5所示,配置R1为BRAS主机,R2为BRAS备机,备机配置响应延迟。在主机R1宕机的情况下:
当用户开机时首先发送组播RS报文(无状态接入)或首先发送组播RS后再发送DHCPv6的Solicit报文(有状态接入),R1宕机不响应用户报文,R2在延时响应时间内也没有收到R1单播通告的用户MAC的RA报文,所以R2延时响应时间到 后响应用户报文,当R2为无状态接入时,用户会根据R2发送的RA报文生成IPv6前缀地址和网关;当R2提供有状态接入时,用户会根据R2发送的RA报文生成网关,并获取R2发送的Advertise报文分配的DHCPv6地址上线。所以不管R2是无状态接入还是有状态接入,此时用户只能从R2获取IPv6地址和网关。
通过本发明实施例的上述技术方案,保证了在主处理器正常的情况下,用户只能获取到主路由器的IPv6前缀地址或DHCPv6地址,并以主路由器作为网关,而在主处理器宕机等主处理器异常的情况下,用户也能获取到备路由器的IPv6前缀地址或DHCPv6地址,并以备路由器作为网关,提高了用户获取路由器地址和网关的可靠性和准确性。
可选地,在网络中包含多个备用路由器的情况下,可以对不同的备用路由器设置不同的释放时间,使得在主处理器宕机的情况下,首先由释放时间最短的备路由器进行处理,释放时间最短的备用路由器正常的情况下,向其余的备路由器通告用户MAC地址,使得其他备路由器预定时间内部处理该MAC的RS报文和DHCPv6报文都不做回应。各备路由器释放时间的设置类似与上述实施例中的备路由器的设置方式,这里不做赘述。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
实施例2
在本实施例中还提供了一种报文装置及路由器,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图6是根据本发明实施例的报文处理装置的结构框图一,如图6所示,该装置包括:第一接收模块62、第一回复模块64、告知模块66。下面对该装置进行说明。
第一接收模块62,用于接收到来自用户的请求报文,其中,请求报文需要进行回复;第一回复模块64,与上述第一接收模块62相连,用于根据请求报文向用户回复报文;告知模块66,与上述第一接收模块62相连,用于向备路由器告知用户的信息,其中,告知用户的信息用于通知备路由器不对来自用户的请求报文进行回复,主路由器和备路由器为主备关系。
图7是根据本发明实施例的报文装置的告知模块66的结构框图,如图7所示,该告知模块66包括:
告知单元72,用于在预定时长内向备路由器告知用户的信息,其中,预定时长为备路由器延迟回复请求报文的时长。
可选地,上述预定时长大于主路由器向用户回复报文用的时间。
可选地,上述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文,上述回复的报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
图8是根据本发明实施例的路由器的结构框图一,如图8所示,该路由器上述实施例中图6或图7所示的第一报文处理装置82。
图9是根据本发明实施例的报文处理装置的结构框图二,如图8所示,该装置包括:第二接收模块92、判断模块94、第二回复模块96。下面对该装置进行说明。
第二接收模块92,用于接收到来自用户的请求报文,其中,请求报文需要进行回复;判断模块94,与上述第二接收模块92相连,用于判断是否从主路由器接收到用户的信息,其中,主路由器和备路由器为主备关系;第二回复模块96,与上述判断模块94相连,用于备路由器在接收到用户的信息的情况下,不对用户的请求报文进行回复。
图10是根据本发明实施例的报文装置的判断模块94的结构框图,如图10所示,该判断模块94包括:
判断单元102,用于根据在预定时长内是否收到用户的信息,判断是否从主路由器接收到用户的信息。
图11是根据本发明实施例的报文装置的结构框图三,如图11所示,该装置:除包括图9所示的所有模块外,还包括:
第三回复模块112,用于在预定时长内未收到用户的信息的情况下,对用户的请求报文进行回复。
可选地,上述预定时长大于主路由器向用户回复报文用的时间。
可选地,上述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文,上述回复的报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
图12是根据本发明实施例的路由器的结构框图二,如图12所示,该路由器上述实施例中图9至图11任一项所示的第二报文处理装置122。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
实施例3
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,主路由器接收到来自用户的请求报文,其中,请求报文需要进行回复;
S2,主路由器根据请求报文向用户回复报文;
S3,向备路由器告知用户的信息,其中,用户的信息用于通知备路由器不对来自用户的请求报文进行回复,主路由器和备路由器为主备关系。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:主路由器向备路由器告知用户的信息包括:主路由器在预定时长内向备路由器告知用户的信息,其中,预定时长为备路由器延迟回复请求报文的时长。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:预定时长大于主路由器向用户回复报文用的时间。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,备路由器接收到用户的请求报文,其中,请求报文需要进行回复;
S2,备路由器判断是否从主路由器接收到用户的信息,其中,主路由器和备路由器为主备关系;
S3,备路由器在判断结果为接收到用户的信息的情况下,不对用户的请求报文进 行回复。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:备路由器判断是否从主路由器接收到用户的信息包括:备路由器根据在预定时长内是否收到用户的信息,判断是否从主路由器接收到用户的信息。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:备路由器在预定时长内未收到用户的信息的情况下,对用户的请求报文进行回复。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:预定时长大于主路由器向用户回复报文用的时间。
可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:主路由器接收到来自用户的请求报文,其中,请求报文需要进行回复;主路由器根据请求报文向用户回复报文;向备路由器告知用户的信息,其中,用户的信息用于通知备路由器不对来自用户的请求报文进行回复,主路由器和备路由器为主备关系。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:主路由器向备路由器告知用户的信息包括:主路由器在预定时长内向备路由器告知用户的信息,其中,预定时长为备路由器延迟回复请求报文的时长。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:预定时长大于主路由器向用户回复报文用的时间。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:备路由器接收到用户的请求报文,其中,请求报文需要进行回复;备路由器判断是否从主路由器接收到用户的信息,其中,主路由器和备路由器为主备关系;备路由器在判断结 果为接收到用户的信息的情况下,不对用户的请求报文进行回复。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:备路由器判断是否从主路由器接收到用户的信息包括:备路由器根据在预定时长内是否收到用户的信息,判断是否从主路由器接收到用户的信息。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:备路由器在预定时长内未收到用户的信息的情况下,对用户的请求报文进行回复。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:预定时长大于主路由器向用户回复报文用的时间。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行:请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,回复的报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
本公开的技术方案可以应用于通信领域。采用本公开提供的技术方案,由于主路由器根据用于的请求报文向用户回复报文,并通知备路由器不对来自该用户的该请求报文进行回复,用户获取的地址为主路由器的地址,因此,可以解决相关技术中双机冷备组网中用户获取的地址带有不确定性的问题,避免了用户发现多个路由器地址的情况,达到提高获取路由器地址有效性的效果。

Claims (16)

  1. 一种报文处理方法,其中,包括:
    主路由器接收到来自用户的请求报文,其中,所述请求报文需要进行回复;
    所述主路由器根据所述请求报文向所述用户回复报文;
    向备路由器告知所述用户的信息,其中,所述用户的信息用于通知所述备路由器不对来自所述用户的所述请求报文进行回复,所述主路由器和所述备路由器为主备关系。
  2. 根据权利要求1所述的方法,其中,所述主路由器向所述备路由器告知所述用户的信息包括:
    所述主路由器在预定时长内向所述备路由器告知所述用户的信息,其中,所述预定时长为所述备路由器延迟回复所述请求报文的时长。
  3. 根据权利要求2所述的方法,其中,所述预定时长大于所述主路由器向所述用户回复所述报文用的时间。
  4. 根据权利要求1至3中任一项所述的方法,其中,
    所述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,
    回复的所述报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
  5. 一种报文处理方法,其中,包括:
    备路由器接收到用户的请求报文,其中,所述请求报文需要进行回复;
    所述备路由器判断是否从主路由器接收到所述用户的信息,其中,所述主路由器和所述备路由器为主备关系;
    所述备路由器在判断结果为接收到所述用户的信息的情况下,不对所述用户的所述请求报文进行回复。
  6. 根据权利要求5所述的方法,其中,所述备路由器判断是否从主路由器接收到所述用户的信息包括:
    所述备路由器根据在预定时长内是否收到所述用户的信息,判断是否从主路由器接收到所述用户的信息。
  7. 根据权利要求6所述的方法,其中,还包括:
    所述备路由器在所述预定时长内未收到所述用户的信息的情况下,对所述用户 的所述请求报文进行回复。
  8. 根据权利要求7中所述的方法,其中,所述预定时长大于所述主路由器向所述用户回复所述报文用的时间。
  9. 根据权利要求5至8中任一项所述的方法,其中,
    所述请求报文包括以下至少之一:路由请求RS报文、DHCPv6报文;和/或,
    回复的所述报文包括以下至少之一:路由通告RA报文、DHCPv6报文。
  10. 一种报文处理装置,其中,包括:
    第一接收模块,设置为接收到来自用户的请求报文,其中,所述请求报文需要进行回复;
    第一回复模块,设置为根据所述请求报文向所述用户回复报文;
    告知模块,设置为向备路由器告知所述用户的信息,其中,告知所述用户的信息用于通知所述备路由器不对来自所述用户的所述请求报文进行回复,主路由器和所述备路由器为主备关系。
  11. 根据权利要求10所述的装置,其中,所述告知模块包括:
    告知单元,设置为在预定时长内向所述备路由器告知所述用户的信息,其中,所述预定时长为所述备路由器延迟回复所述请求报文的时长。
  12. 一种路由器,其中,包括权利要求10或11所述的装置。
  13. 一种报文处理装置,其中,包括:
    第二接收模块,设置为接收到来自用户的请求报文,其中,所述请求报文需要进行回复;
    判断模块,设置为判断是否从主路由器接收到所述用户的信息,其中,所述主路由器和备路由器为主备关系;
    第二回复模块,设置为所述备路由器在接收到所述用户的信息的情况下,不对所述用户的所述请求报文进行回复。
  14. 根据权利要求13所述的装置,其中,所述判断模块包括:
    判断单元,设置为根据在预定时长内是否收到所述用户的信息,判断是否从主路由器接收到所述用户的信息。
  15. 根据权利要求14所述的装置,其中,还包括:
    第三回复模块,设置为在所述预定时长内未收到所述用户的信息的情况下,对 所述用户的所述请求报文进行回复。
  16. 一种路由器,其中,包括权利要求13至15中任一项所述的装置。
PCT/CN2017/087578 2016-07-08 2017-06-08 报文处理方法、装置及路由器 WO2018006684A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610541210.0 2016-07-08
CN201610541210.0A CN107592261A (zh) 2016-07-08 2016-07-08 报文处理方法、装置及路由器

Publications (1)

Publication Number Publication Date
WO2018006684A1 true WO2018006684A1 (zh) 2018-01-11

Family

ID=60901394

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087578 WO2018006684A1 (zh) 2016-07-08 2017-06-08 报文处理方法、装置及路由器

Country Status (2)

Country Link
CN (1) CN107592261A (zh)
WO (1) WO2018006684A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3641278A1 (de) * 2018-10-17 2020-04-22 Siemens Aktiengesellschaft Verfahren zur bereitstellung redundanter relay-, insbesondere routing funktion, system, computerprogramm und computerlesbares medium
CN111669400A (zh) * 2020-06-19 2020-09-15 广西和你学科技发展有限公司 一种无线路由器网址过滤的方法
CN112104531A (zh) * 2020-08-25 2020-12-18 新华三技术有限公司 一种备份实现方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101316236A (zh) * 2008-07-23 2008-12-03 杭州华三通信技术有限公司 Vrrp备份组负载分担方法及路由器
CN101355519A (zh) * 2008-09-12 2009-01-28 杭州华三通信技术有限公司 一种实现业务流负载分担的方法和装置
CN101860453A (zh) * 2010-06-10 2010-10-13 华为技术有限公司 事件通知的方法、装置和网络***
US9210067B1 (en) * 2008-07-11 2015-12-08 Google Inc. Method and apparatus for exchanging routing information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9210067B1 (en) * 2008-07-11 2015-12-08 Google Inc. Method and apparatus for exchanging routing information
CN101316236A (zh) * 2008-07-23 2008-12-03 杭州华三通信技术有限公司 Vrrp备份组负载分担方法及路由器
CN101355519A (zh) * 2008-09-12 2009-01-28 杭州华三通信技术有限公司 一种实现业务流负载分担的方法和装置
CN101860453A (zh) * 2010-06-10 2010-10-13 华为技术有限公司 事件通知的方法、装置和网络***

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3641278A1 (de) * 2018-10-17 2020-04-22 Siemens Aktiengesellschaft Verfahren zur bereitstellung redundanter relay-, insbesondere routing funktion, system, computerprogramm und computerlesbares medium
WO2020078684A1 (de) 2018-10-17 2020-04-23 Siemens Aktiengesellschaft Verfahren zur bereitstellung redundanter relay-, insbesondere routing funktion, system, computerprogramm und computerlesbares medium
CN112868218A (zh) * 2018-10-17 2021-05-28 西门子股份公司 用于提供冗余的中继器、特别是路由功能的方法、***、计算机程序和计算机可读的介质
US11641322B2 (en) 2018-10-17 2023-05-02 Siemens Aktiengesellschaft System, computer program, computer-readable medium and method for providing a redundant relay, particularly a routing function
CN112868218B (zh) * 2018-10-17 2024-03-15 西门子股份公司 用于提供冗余的中继器的方法、***和计算机可读的介质
CN111669400A (zh) * 2020-06-19 2020-09-15 广西和你学科技发展有限公司 一种无线路由器网址过滤的方法
CN112104531A (zh) * 2020-08-25 2020-12-18 新华三技术有限公司 一种备份实现方法及装置
CN112104531B (zh) * 2020-08-25 2022-08-30 新华三技术有限公司 一种备份实现方法及装置

Also Published As

Publication number Publication date
CN107592261A (zh) 2018-01-16

Similar Documents

Publication Publication Date Title
JP4138835B2 (ja) Adhocネットワークにおけるアドレス自動構成
CN106412142B (zh) 一种资源设备地址获取方法及装置
US9729501B2 (en) System and data card for stateless automatic configuration of IPv6 address and method for implementing the same
CN112654049B (zh) 用于配置无线通信覆盖扩展***的方法、***、节点和介质
JP5459809B2 (ja) 動的ホスト構成プロトコルバージョン6サーバのipアドレスを取得するための方法、動的ホスト構成プロトコルバージョン6サーバ、および動的ホスト構成プロトコルバージョン6通信システム
WO2012163007A1 (zh) 解决网际协议地址分配冲突的方法及相关设备和***
WO2012174914A1 (zh) 控制地址配置方式的方法和设备
WO2018121257A1 (zh) 报文发送方法、装置、***以及存储介质
CN109120741B (zh) 一种重复地址检测方法及装置、计算机可读存储介质
WO2018006684A1 (zh) 报文处理方法、装置及路由器
WO2011100907A2 (zh) 参数配置的方法和网元设备
JP2006033855A (ja) アドホックネットワークにおけるプレフィックス割当て方法
CN103795581A (zh) 地址处理方法和设备
CN102025797A (zh) 地址前缀处理方法、装置、***及网络设备
CN109842692B (zh) 用于获得物理网络中主机信息的VxLAN交换机、***和方法
WO2016177185A1 (zh) 媒体访问控制mac地址的处理方法及装置
WO2014079235A1 (zh) 一种释放地址的方法、用户节点及远程接入服务器
CN107453998B (zh) 传输报文的方法和装置
EP2820873B1 (fr) Gestion de la mobilité d'un reseau mobile
WO2017219777A1 (zh) 一种报文处理方法及装置
CN108632198B (zh) 一种设备管理方法及装置
JP2006211347A (ja) 無線通信システム
Zimmermann et al. IP address assignment in wireless mesh networks
JP5805575B2 (ja) 中継装置、中継方法及び中継プログラム
WO2017011947A1 (zh) 一种通信方法、装置和***

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17823496

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17823496

Country of ref document: EP

Kind code of ref document: A1