CN112367257B - Route notification method and device - Google Patents
Route notification method and device Download PDFInfo
- Publication number
- CN112367257B CN112367257B CN202011190280.9A CN202011190280A CN112367257B CN 112367257 B CN112367257 B CN 112367257B CN 202011190280 A CN202011190280 A CN 202011190280A CN 112367257 B CN112367257 B CN 112367257B
- Authority
- CN
- China
- Prior art keywords
- network device
- message
- value
- gateway
- interface
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/14—Routing performance; Theoretical aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a route notification method and a device, the method is applied to a first network device, the first network device is in a DRNI dual active gateway network, the DRNI dual active gateway network also comprises a second network device, the first network device and the second network device respectively comprise a first interface and a second interface, the first interface and the second interface are three-layer interfaces and are configured with the same IP address, the method comprises the following steps: receiving a first RA message sent by a second network device through an IPL link through an IPP port included in the first network device, wherein the first RA message comprises a first life cycle field; and when the value of the first life cycle field is a first value, sending a second RA message to the third network equipment through an aggregation port included in the first network equipment, wherein the second RA message comprises the IP address of the first interface and the second life cycle field, so that the third network equipment forwards the second RA message to the accessed host.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for route advertisement.
Background
With the increasingly widespread use of IPv6 networks, route advertisement messages issued by gateways have become a necessary configuration in IPv6 networks. In the networking with state address distribution, a host acquires a corresponding IPv6 address through the distribution of a DHCPv6 server, and the host acquires a gateway IP address only through a Routing Advertisement (RA) message except local static configuration; in the networking of stateless address allocation, the host also acquires the IPv6 address prefix, the gateway IP address and other required parameters through the RA message.
When a gateway in the networking is started, the gateway rapidly issues an RA message; when the interface of the gateway is down or the gateway is restarted, the gateway sends Final RA information so that a host hung under the gateway can rapidly switch the gateway according to the priority.
Distributed Resilient Network Interconnect (DRNI) is a cross-device link aggregation technology, which virtualizes two physical devices into one device on an aggregation level to implement cross-device link aggregation, thereby providing device-level redundancy protection and traffic load sharing. As shown in fig. 1, a Device a and a Device B share a load and jointly implement traffic forwarding. When one of the devices fails, the flow can be quickly switched to the other device, so that the normal operation of the service is ensured.
The device a and the device B in fig. 1 are dual active gateways, and the three-layer ports of the respective devices in the device a and the device B are configured with the same IPv6 address and MAC address, thereby forming load sharing of DRNI multicast. The service packet sent by the device C selects any one gateway to implement packet forwarding through a HASH (HASH) algorithm.
For both device a and device B, when both devices are IPv6 gateways, RA messages are sent to device C through the aggregation port, and the gateway IP addresses are notified to device C and the host that is hanging down through the RA messages. When one equipment interface is down or restarted, the equipment sends a Final RA message to the host through the equipment C. According to the Final RA message, the host deletes the gateway IP address which is stored locally until another device sends the next RA message at regular time, and the host records the gateway IP address again. Thus, traffic disruption is caused during the time that the host deletes the gateway address until the gateway IP address is re-recorded from the RA message.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for route advertisement, so as to solve the problem in the prior art that, in a DRNI dual active gateway networking, a host deletes a gateway address until the time when a gateway IP address is re-recorded according to an RA message, resulting in traffic interruption.
In a first aspect, the present application provides a route advertisement method, where the method is applied to a first network device, the first network device is in a DRNI dual active gateway group, the DRNI dual active gateway group further includes a second network device, the first network device and the second network device respectively include a first interface and a second interface, and the first interface and the second interface are three-layer interfaces and are configured with the same IP address, and the method includes:
receiving, through an IPP port included in the first network device, a first RA message sent by the second network device through an IPL link, where the first RA message includes a first lifetime field;
when the value of the first life cycle field is a first value, sending a second RA message to a third network device through an aggregation port included in the first network device, where the second RA message includes an IP address of the first interface and a second life cycle field, so that the third network device forwards the second RA message to an accessed host;
wherein the first RA message is sent through an IPP port included in the second network device when the state of the second interface is down or the second network device is restarted.
In a second aspect, the present application provides a route advertisement method, which is applied to a host, and includes:
when a first RA message is received and the value of a first life cycle field included in the first RA message is a first value, judging whether a second RA message sent by first network equipment is received within preset time or not;
and if the second RA message is received within the preset time and the value of a second life cycle field included in the second RA message is a second value, keeping the gateway IP address of the local record.
In a third aspect, the present application provides a route advertisement apparatus, where the apparatus is applied to a first network device, the first network device is in a DRNI dual active gateway networking, the DRNI dual active gateway networking further includes a second network device, the first network device and the second network device respectively include a first interface and a second interface, and the first interface and the second interface are three-layer interfaces and are configured with the same IP address, and the apparatus includes:
a receiving unit, configured to receive, through an IPP port included in the first network device, a first RA message sent by the second network device through an IPL link, where the first RA message includes a first life cycle field;
a sending unit, configured to send, when the value of the first lifetime field is a first value, a second RA message to a third network device through an aggregation interface included in the first network device, where the second RA message includes an IP address of the first interface and a second lifetime field, so that the third network device forwards the second RA message to an accessed host;
wherein the first RA message is sent through an IPP port included in the second network device when the state of the second interface is down or the second network device is restarted.
In a fourth aspect, the present application provides a route advertisement apparatus, which is applied to a host, and includes:
the device comprises a judging unit and a receiving unit, wherein the judging unit is used for judging whether a first RA message is received by the receiving unit within a preset time or not when the first RA message is received by the receiving unit and the value of a first life cycle field included in the first RA message is a first value;
and a holding unit, configured to hold a locally recorded gateway IP address if the receiving unit receives the second RA message within the preset time and a value of a second lifecycle field included in the second RA message is a second value.
In a fifth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions capable of being executed by the processor, the processor being caused by the machine-executable instructions to perform the method provided in the first and second aspects of the present application.
In a sixth aspect, the present application provides a host comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the second aspect of the present application.
Therefore, by applying the route advertisement method and apparatus provided by the present application, the first network device receives, through the IPP port included in the first network device, the first RA message sent by the second network device through the IPL link, where the first RA message includes the first lifetime field. And when the value of the first life cycle field is a first value, the first network equipment sends a second RA message to the third network equipment through an aggregation port of the first network equipment, wherein the second RA message comprises the IP address of the first interface and the second life cycle field, so that the third network equipment forwards the second RA message to the accessed host. And if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally. And when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
Therefore, the problem of flow interruption caused by the fact that the host deletes the gateway address until the time for recording the gateway address again according to the RA message in the DRNI dual-active gateway networking in the prior art is solved. Through the method, after the host receives the RA message including the aging identification, if the RA message issued by the normal gateway in the DRNI dual-active gateway group is also received within the preset time, the host does not delete the gateway IP address any more, and keeps the locally recorded gateway IP address, thereby ensuring that the flow is not interrupted.
Drawings
Fig. 1 is a schematic diagram of DRNI dual active gateway networking;
fig. 2 is a flowchart of a route advertisement method according to an embodiment of the present application;
fig. 3 is a flowchart of another route advertisement method according to an embodiment of the present application;
fig. 4 is a structural diagram of a route advertisement device according to an embodiment of the present application;
fig. 5 is a block diagram of another route advertisement device according to an embodiment of the present application;
fig. 6 is a hardware structure diagram of a network device 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 corresponding listed items.
It should 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 "at … …" or "in response to a determination," depending on the context.
In the prior art, as shown in fig. 1, the main cause of traffic interruption is that both device a and device B provide IPv6 gateway service with the same gateway IP address, within the time that the host deletes the gateway address until the gateway address is re-recorded according to the RA message. However, since the states of the devices are independent from each other, although one device cannot provide the gateway service, the device which cannot provide the gateway service has notified the Final RA message to the outside, so that the host deletes the locally stored gateway IP address, and the other device can provide the gateway service function, but the host deletes the locally stored gateway IP address by mistake.
The following describes a route advertisement method provided in an embodiment of the present application in detail. Referring to fig. 2, fig. 2 is a flowchart of a route advertisement method according to an embodiment of the present application. The method is applied to a first network device, and the route advertisement method provided by the embodiment of the application may include the following steps.
Specifically, the first network device is located in a DRNI dual active gateway networking, the DRNI dual active gateway networking further includes a second network device, the first network device and the second network device respectively include a first interface and a second interface, and the first interface and the second interface are three-layer interfaces and are configured with the same IP address and MAC address.
In this embodiment of the present application, the IP addresses configured for the first interface and the second interface are gateway IP addresses using the first network device and the second network device as gateways.
After the DRNI dual-active gateway networking is enabled, the first network device and the second network device enter a dual-active gateway state. The first network equipment and the second network equipment normally send RA messages. When the state of a second interface included in the second network device is down or the second network device is restarted, the second network device generates a first RA message, which includes a first lifetime field (lifetime). The second network device sets the value of the first life cycle field to a first value. The first value is used to indicate that the gateway functionality of the second network device that sent the first RA message is about to age. In the embodiment of the present application, the first value is 1.
After the second network device generates the first RA message, the first RA message is sent out from the IPP port included in the second network device, and is sent to the first network device through the IPL link between the second network device and the first network device. At the same time. The second network device also sends the first RA message to the third network device through the aggregation port. And after receiving the first RA message, the third network equipment forwards the first RA message to the host accessed to the third network equipment. The host receives a first RA message.
The first network device receives a first RA message sent by the second network device through an IPL link through an IPP port included in the first network device. The first network device identifies a value of a life cycle field included in the first RA message.
Specifically, as described in step 210, the first network device identifies the value of the lifecycle field that the first RA message includes. When the value of the lifecycle field is 1, the first network device determines that the second network device that sent the first RA message has failed. At this time, if the first network device can normally function as a gateway, the first network device generates a second RA message. The second RA message includes an IP address of the first interface and a second lifecycle field, the value of the second lifecycle field being a second value. In this embodiment, the second value is a lifetime of the first network device as a gateway.
And the first network equipment sends a second RA message to the third network equipment through the aggregation port. And after receiving the second RA message, the third network equipment forwards the second RA message to the host accessed to the third network equipment. The host receives a second RA message.
It should be noted that, after receiving the first RA message, the host identifies the value of the lifetime field included in the first RA message. And when the value of the life cycle field is 1, the host judges whether a second RA message sent by the first network equipment is received within a preset time. And if the second RA message is received within the preset time, the host acquires the IP address of the first interface and the value of the second life cycle field from the second RA message. And the host keeps the gateway IP address recorded locally because the value of the second life cycle field is a second value and the IP address of the first interface is the same as the gateway IP address recorded locally by the host.
Therefore, by applying the route advertisement method provided by the present application, the first network device receives, through the IPP port included in the first network device, a first RA message sent by the second network device through the IPL link, where the first RA message includes the first lifetime field. And when the value of the first life cycle field is a first value, the first network equipment sends a second RA message to the third network equipment through an aggregation port of the first network equipment, wherein the second RA message comprises the IP address of the first interface and the second life cycle field, so that the third network equipment forwards the second RA message to the accessed host. And if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally. And when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
Therefore, the problem of flow interruption caused by the fact that the host deletes the gateway address until the time for recording the gateway address again according to the RA message in the DRNI dual-active gateway networking in the prior art is solved. Through the method, after the host receives the RA message including the aging identification, if the RA message issued by the normal gateway in the DRNI dual-active gateway group is also received within the preset time, the host does not delete the gateway IP address any more, and keeps the locally recorded gateway IP address, thereby ensuring that the flow is not interrupted.
Optionally, in this embodiment of the present application, the method further includes a step of generating and sending, by the first network device, a third RA message when a state of the first interface included in the first network device is down or the first network device is restarted.
Specifically, when the state of the first interface included in the first network device is down or the first network device is restarted, the first network device generates a third RA message, which includes a third lifetime field. The first network device sets the value of the third lifetime field to the first value. The first value is used to indicate that the gateway functionality of the first network device sending the third RA message is about to age. In the embodiment of the present application, the first value is 1.
And after generating the third RA message, the first network equipment sends the third RA message from an IPP port included in the first network equipment, and sends the third RA message to the second network equipment through an IPL link between the first RA message and the second network equipment. At the same time. The first network device also sends a third RA message to the third network device through the aggregation port. And after receiving the third RA message, the third network equipment forwards the third RA message to the host accessed to the third network equipment. The host receives the third RA message.
And the second network equipment receives a third RA message sent by the first network equipment through the IPL link through an IPP port included by the second network equipment. The second network device identifies a value of a life cycle field included in the third RA message.
When the value of the lifetime field is 1, the second network device determines that the first network device that sent the third RA message has failed. At this time, if the second network device can normally function as a gateway, the second network device generates a fourth RA message. The fourth RA message includes an IP address of the second interface and a fourth lifecycle field, the value of the fourth lifecycle field being a second value. In this embodiment, the fourth value is a lifetime of the second network device as a gateway.
And the second network equipment sends a fourth RA message to the third network equipment through the aggregation port. And after receiving the fourth RA message, the third network equipment forwards the fourth RA message to the host accessed to the third network equipment. The host receives the fourth RA message.
It should be noted that, after receiving the third RA message, the host identifies the value of the lifetime field included in the third RA message. And when the value of the life cycle field is 1, the host judges whether a fourth RA message sent by the second network equipment is received within the preset time. And if the fourth RA message is received within the preset time, the host acquires the IP address of the second interface and the value of the fourth life cycle field from the fourth RA message. And the value of the fourth life cycle field is a second value, and the IP address of the second interface is the same as the gateway IP address locally recorded by the host, so that the host keeps the locally recorded gateway IP address.
Optionally, in this embodiment of the present application, if the states of the first network device and the second network device that appear in succession are down, or the network device is restarted, the network device sends out the RA message with the first value in succession. If the network device or the host at the other end does not receive the RA message with the second value sent by any network device after a preset time (e.g., 1 second), the network device or the host at the other end ages the locally recorded gateway IP address, and sets the priority of the gateway corresponding to the gateway IP address to be a low priority.
The following describes a route advertisement method provided in an embodiment of the present application in detail. Referring to fig. 3, fig. 3 is a flowchart of another route advertisement method provided in the embodiment of the present application. The method is applied to a host, and the route advertisement method provided by the embodiment of the application can comprise the following steps.
Specifically, according to the description of the foregoing embodiment, when the state of the second interface included in the second network device is down or the second network device is restarted, the second network device generates the first RA message including the first lifetime period field. The second network device sets the value of the first life cycle field to a first value. The first value is used to indicate that the gateway functionality of the second network device that sent the first RA message is about to age. In the embodiment of the present application, the first value is 1.
After the second network device generates the first RA message, the first RA message is sent out from the IPP port included in the second network device, and is sent to the first network device through the IPL link between the second network device and the first network device. At the same time. The second network device also sends the first RA message to the third network device through the aggregation port. And after receiving the first RA message, the third network equipment forwards the first RA message to the host accessed to the third network equipment. The host receives a first RA message.
The first network device receives a first RA message sent by the second network device through an IPL link through an IPP port included in the first network device. The first network device identifies a value of a life cycle field included in the first RA message.
When the value of the lifecycle field is 1, the first network device determines that the second network device that sent the first RA message has failed. At this time, if the first network device can normally function as a gateway, the first network device generates a second RA message. The second RA message includes an IP address of the first interface and a second lifecycle field, the value of the second lifecycle field being a second value. In this embodiment, the second value is a lifetime of the first network device as a gateway.
And the first network equipment sends the second RA message to the third network equipment through the aggregation port. And after receiving the second RA message, the third network equipment forwards the second RA message to the host accessed to the third network equipment.
When a first RA message is received and the value of a first life cycle field included in the first RA message is a first value, the host determines whether a second RA message sent by the first network device is received within a preset time (e.g., 1 second).
Specifically, if the host receives the second RA message within the preset time, the host acquires the IP address of the first interface and the value of the second lifecycle field from the second RA message. And the host keeps the gateway IP address recorded locally because the value of the second life cycle field is a second value and the IP address of the first interface is the same as the gateway IP address recorded locally by the host.
If the host does not receive the second RA message within the preset time, the host ages the gateway IP address recorded locally, and sets the priority of the gateway corresponding to the gateway IP address to be low priority.
Therefore, by applying the route advertisement method provided by the present application, the first network device receives, through the IPP port included in the first network device, a first RA message sent by the second network device through the IPL link, where the first RA message includes the first lifetime period field. And when the value of the first life cycle field is a first value, the first network equipment sends a second RA message to the third network equipment through an aggregation port of the first network equipment, wherein the second RA message comprises the IP address of the first interface and the second life cycle field, so that the third network equipment forwards the second RA message to the accessed host. And if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally. And when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
Therefore, the problem of flow interruption caused by the fact that the host deletes the gateway address until the time for recording the gateway address again according to the RA message in the DRNI dual-active gateway networking in the prior art is solved. Through the method, after the host receives the RA message including the aging identification, if the RA message issued by the normal gateway in the DRNI dual-active gateway group is also received within the preset time, the host does not delete the gateway IP address any more, and keeps the locally recorded gateway IP address, thereby ensuring that the flow is not interrupted.
As shown in fig. 1, the network device a is located in a DRNI dual active gateway network, the DRNI dual active gateway network further includes a network device B, the network device a and the network device B respectively include a first interface and a second interface, and the first interface and the second interface are three-layer interfaces and are configured with the same IP address and MAC address.
In this embodiment of the application, the IP addresses configured for the first interface and the second interface are gateway IP addresses of gateways that are the network device a and the network device B.
After the DRNI dual active gateway networking is enabled, the network device a and the network device B enter a dual active gateway state. The network device a and the network device B normally send RA messages. When the state of the second interface included in the network device B is down or the network device B restarts, the network device B generates a first RA message including the first lifetime field. The second network device sets the value of the first life cycle field to a first value. The first value is used to indicate that the gateway functionality of network device B that sent the first RA message is about to age.
After generating the first RA message, the network device B sends the first RA message from the IPP port included in itself, and sends the first RA message to the network device a through the IPL link between the network device B and the network device a. Meanwhile, the network device B also sends a first RA message to the network device C through the aggregation port. And after receiving the first RA message, the network equipment C forwards the first RA message to the host accessed to the network equipment C. The host receives a first RA message.
The network device a receives a first RA message sent by the network device B through the IPL link through an IPP port included in the network device a. Network device a identifies the value of the life cycle field included in the first RA message.
When the value of the life cycle field is 1, network device a determines that network device B, which sent the first RA message, has failed. At this time, if the network device a can normally function as a gateway, the network device a generates a second RA message. The second RA message includes an IP address of the first interface and a second lifecycle field, the value of the second lifecycle field being a second value. In this embodiment, the second value is a lifetime of the first network device as a gateway.
And the network device A sends a second RA message to the network device C through the aggregation port. And after receiving the second RA message, the network equipment C forwards the second RA message to the host accessed to the network equipment C. The host receives the second RA message.
It should be noted that, after receiving the first RA message, the host identifies the value of the lifetime field included in the first RA message. When the value of the life cycle field is 1, the host judges whether a second RA message sent by the network device a is received within a preset time. And if the second RA message is received within the preset time, the host acquires the IP address of the first interface and the value of the second life cycle field from the second RA message. And the host keeps the gateway IP address recorded locally because the value of the second life cycle field is a second value and the IP address of the first interface is the same as the gateway IP address recorded locally by the host.
Based on the same inventive concept, the embodiment of the application also provides a route notification device corresponding to the route notification method. Referring to fig. 4, fig. 4 is a structural diagram of a route advertisement device according to an embodiment of the present application, where the device is applied to a first network device, the first network device is in a DRNI dual active gateway networking, the DRNI dual active gateway networking further includes a second network device, the first network device and the second network device respectively include a first interface and a second interface, and the first interface and the second interface are three-layer interfaces and are configured with the same IP address, and the device includes:
a receiving unit 410, configured to receive, through an IPP port included in the first network device, a first RA message sent by the second network device through an IPL link, where the first RA message includes a first lifetime field;
a sending unit 420, configured to send, when the value of the first lifetime field is a first value, a second RA message to a third network device through an aggregation interface included in the first network device, where the second RA message includes an IP address of the first interface and a second lifetime field, so that the third network device forwards the second RA message to an accessed host;
wherein the first RA message is sent through an IPP port included in the second network device when the state of the second interface is down or the second network device is restarted.
Optionally, the sending unit 420 is further configured to send, when the state of the first interface is down or the first network device is restarted, a third RA message to the second network device through an IPP port included in the first network device, where the third RA message includes a third lifetime field, so that when a value of the third lifetime field is a first value, the second network device sends the third RA message to the third network device through an aggregation port included in the second network device.
Optionally, the sending unit 420 is further configured to send the third RA message to the third network device through an aggregation port included in the first network device, so that the third network device forwards the third RA message to an accessed host.
Optionally, the first value is 1; and the value of the second life cycle field is a second value, and the second value is the survival time of the first network equipment as a gateway.
Therefore, by applying the route advertisement method and apparatus provided by the present application, the first network device receives, through the IPP port included in the first network device, the first RA message sent by the second network device through the IPL link, where the first RA message includes the first lifetime field. And when the value of the first life cycle field is a first value, the first network equipment sends a second RA message to the third network equipment through an aggregation port of the first network equipment, wherein the second RA message comprises the IP address of the first interface and the second life cycle field, so that the third network equipment forwards the second RA message to the accessed host. And if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally. And when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
Therefore, the problem of flow interruption caused by the fact that the host deletes the gateway address until the time for recording the gateway address again according to the RA message in the DRNI dual-active gateway networking in the prior art is solved. Through the method, after the host receives the RA message including the aging identification, if the RA message issued by the normal gateway in the DRNI dual-active gateway group is also received within the preset time, the host does not delete the gateway IP address any more, and keeps the locally recorded gateway IP address, thereby ensuring that the flow is not interrupted.
Based on the same inventive concept, the embodiment of the application also provides a route notification device corresponding to the route notification method. Referring to fig. 5, fig. 5 is a block diagram of another route advertisement device provided in an embodiment of the present application, where the device is applied to a host, and the device includes:
a determining unit 510, configured to determine whether a value of a first lifetime field included in a first RA message is a first value when a receiving unit receives the first RA message, where the receiving unit receives a second RA message sent by a first network device within a preset time;
a holding unit 520, configured to hold a locally recorded gateway IP address if the receiving unit receives the second RA message within the preset time and a value of a second life cycle field included in the second RA message is a second value.
Optionally, the apparatus further comprises: and an aging unit (not shown in the figure), configured to age the locally recorded gateway IP address if the second RA message is not received within the preset time, and set the priority of the gateway corresponding to the gateway IP address to a low priority.
Optionally, the first value is 1, and the second value is a lifetime of the first network device as a gateway.
Therefore, by applying the route advertisement method and apparatus provided by the present application, the first network device receives, through the IPP port included in the first network device, the first RA message sent by the second network device through the IPL link, where the first RA message includes the first lifetime field. And when the value of the first life cycle field is a first value, the first network device sends a second RA message to the third network device through the aggregation port of the first network device, wherein the second RA message comprises the IP address of the first interface and the second life cycle field, so that the third network device forwards the second RA message to the accessed host. And if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally. And when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
Therefore, the problem of flow interruption caused by the fact that the host deletes the gateway address until the time for recording the gateway address again according to the RA message in the DRNI dual-active gateway networking in the prior art is solved. Through the method, after the host receives the RA message including the aging identification, if the RA message issued by the normal gateway in the DRNI dual-active gateway group is also received within the preset time, the host does not delete the gateway IP address any more, and keeps the locally recorded gateway IP address, thereby ensuring that the flow is not interrupted.
Based on the same inventive concept, the present application further provides a network device and a host, as shown in fig. 6, including a processor 610, a transceiver 620, and a machine-readable storage medium 630, where the machine-readable storage medium 630 stores machine-executable instructions capable of being executed by the processor 610, and the processor 610 is caused by the machine-executable instructions to perform the route advertisement method provided by the present application. The route advertisement apparatus shown in fig. 4 and 5 can be implemented by using a hardware structure of a network device or a host as shown in fig. 6.
The computer-readable storage medium 630 may include a Random Access Memory (RAM) or a Non-volatile Memory (NVM), such as at least one disk Memory. Optionally, the computer-readable storage medium 630 may also be at least one memory device located remotely from the processor 610.
The Processor 610 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In embodiments of the present application, the processor 610, by reading machine executable instructions stored in the machine readable storage medium 630, is caused by the machine executable instructions to enable the processor 610 itself and the invoking transceiver 620 to perform the route advertisement method described in embodiments of the present application.
Additionally, embodiments of the present application provide a machine-readable storage medium 630, the machine-readable storage medium 630 storing machine-executable instructions that, when invoked and executed by the processor 610, cause the processor 610 itself and the invoking transceiver 620 to perform the route advertisement methods described in embodiments of the present application.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As for the embodiments of the route advertisement device and the machine-readable storage medium, the contents of the related methods are substantially similar to those of the foregoing embodiments of the methods, so that the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiments of the methods.
The above description is only a preferred embodiment of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (14)
1. A route advertisement method is applied to a first network device, the first network device is in a Distributed Resilient Network Interconnection (DRNI) dual active gateway group (DRNI dual active gateway group), the DRNI dual active gateway group further comprises a second network device, the first network device and the second network device respectively comprise a first interface and a second interface, the first interface and the second interface are three-layer interfaces, and are configured with the same IP address, the method comprises:
receiving, through an IPP port included in the first network device, a first Route Advertisement (RA) message sent by the second network device through an IPL link, where the first RA message includes a first life cycle field;
when the value of the first life cycle field is a first value, sending a second RA message to a third network device through an aggregation port included in the first network device, where the second RA message includes an IP address of the first interface and a second life cycle field, so that the third network device forwards the second RA message to an accessed host;
wherein the first RA message is sent through an IPP port included in the second network device when the state of the second interface is down or the second network device is restarted; and if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally.
2. The method of claim 1, further comprising:
when the state of the first interface is down or the first network device is restarted, sending a third RA message to the second network device through an IPP port included in the first network device, where the third RA message includes a third lifetime field, so that when a value of the third lifetime field is a first value, the second network device sends the third RA message to the third network device through an aggregation port included in the second network device.
3. The method of claim 2, further comprising:
and sending the third RA message to the third network device through an aggregation port included in the first network device, so that the third network device forwards the third RA message to an accessed host.
4. The method of any of claims 1-3, wherein the first value is 1 and the second lifecycle field value is a second value, and wherein the second value is a lifetime of the first network device as a gateway.
5. A method of route advertisement, the method being applied to a host, the method comprising:
when a first Routing Advertisement (RA) message is received and the value of a first life cycle field included in the first RA message is a first value, judging whether a second RA message sent by first network equipment is received within preset time or not;
if the second RA message is received within the preset time and the value of a second life cycle field included in the second RA message is a second value, the gateway IP address of the local record is kept; and when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
6. The method of claim 5, further comprising:
and if the second RA message is not received within the preset time, the gateway IP address recorded locally is aged, and the priority of the gateway corresponding to the gateway IP address is set to be low.
7. The method of claim 5, wherein the first value is 1 and the second value is a lifetime of the first network device as a gateway.
8. A route advertisement apparatus, the apparatus being applied to a first network device, the first network device being in a distributed resilient network interconnect, DRNI, dual active gateway group, the DRNI, dual active gateway group further including a second network device, the first network device and the second network device respectively including a first interface and a second interface, the first interface and the second interface being three-layer interfaces and configured with the same IP address, the apparatus comprising:
a receiving unit, configured to receive, through an IPP port included in the first network device, a first route advertisement RA message sent by the second network device through an IPL link, where the first RA message includes a first lifetime field;
a sending unit, configured to send, when the value of the first lifetime field is a first value, a second RA message to a third network device through an aggregation interface included in the first network device, where the second RA message includes an IP address of the first interface and a second lifetime field, so that the third network device forwards the second RA message to an accessed host;
wherein the first RA message is sent through an IPP port included in the second network device when the state of the second interface is down or the second network device is restarted; and if the host receives a second RA message with a second value within preset time after receiving the first RA message with the first value, the host keeps the gateway IP address recorded locally.
9. The apparatus of claim 8, wherein the sending unit is further configured to,
when the state of the first interface is down or the first network device is restarted, sending a third RA message to the second network device through an IPP port included in the first network device, where the third RA message includes a third lifetime field, so that when a value of the third lifetime field is a first value, the second network device sends the third RA message to the third network device through an aggregation port included in the second network device.
10. The apparatus of claim 9, wherein the sending unit is further configured to send the third RA message to the third network device through an aggregation interface included in the first network device, so that the third network device forwards the third RA message to an accessing host.
11. The apparatus of any one of claims 8-10, wherein the first value is 1; and the value of the second life cycle field is a second value, and the second value is the survival time of the first network equipment as a gateway.
12. A route advertisement device, the device being applicable to a host, the device comprising:
the device comprises a judging unit and a receiving unit, wherein the judging unit is used for judging whether a first Routing Advertisement (RA) message is received by the receiving unit within a preset time when the receiving unit receives the RA message and the value of a first life cycle field included in the RA message is a first value;
a holding unit, configured to hold a locally recorded gateway IP address if the receiving unit receives the second RA message within the preset time and a value of a second lifecycle field included in the second RA message is a second value; and when the state of a second interface included in the second network equipment is down or the second network equipment is restarted, the first RA message is sent through an IPP (Internet protocol) port included in the second network equipment.
13. The apparatus of claim 12, further comprising:
and the aging unit is used for aging the locally recorded gateway IP address and setting the priority of the gateway corresponding to the gateway IP address as low priority if the second RA message is not received within the preset time.
14. The apparatus of claim 12, wherein the first value is 1 and the second value is a lifetime of the first network device as a gateway.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011190280.9A CN112367257B (en) | 2020-10-30 | 2020-10-30 | Route notification method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011190280.9A CN112367257B (en) | 2020-10-30 | 2020-10-30 | Route notification method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112367257A CN112367257A (en) | 2021-02-12 |
CN112367257B true CN112367257B (en) | 2022-10-21 |
Family
ID=74513123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011190280.9A Active CN112367257B (en) | 2020-10-30 | 2020-10-30 | Route notification method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112367257B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114285825A (en) * | 2021-12-17 | 2022-04-05 | 浪潮思科网络科技有限公司 | Redundancy method, equipment and medium based on IPv6 stateless address allocation |
CN114465955B (en) * | 2022-01-06 | 2023-09-15 | 新华三技术有限公司 | Multicast message processing method and device |
CN114567522B (en) * | 2022-02-22 | 2024-03-12 | 新华三技术有限公司合肥分公司 | Message forwarding method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014206207A1 (en) * | 2013-06-29 | 2014-12-31 | 华为技术有限公司 | Route withdrawal method and network device |
CN104426839A (en) * | 2013-08-20 | 2015-03-18 | 中兴通讯股份有限公司 | Router advertisement attack prevention method, apparatus and device |
CN106134137A (en) * | 2014-03-14 | 2016-11-16 | Nicira股份有限公司 | The advertising of route of managed gateway |
CN106230729A (en) * | 2016-08-29 | 2016-12-14 | 杭州华三通信技术有限公司 | The method and apparatus that a kind of network appliance address is noticed |
CN110401730A (en) * | 2019-07-25 | 2019-11-01 | 华为技术有限公司 | IP address generation method and device |
CN111435912A (en) * | 2019-03-28 | 2020-07-21 | 新华三技术有限公司 | IPv6 stateless address automatic configuration method, network equipment and host |
-
2020
- 2020-10-30 CN CN202011190280.9A patent/CN112367257B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014206207A1 (en) * | 2013-06-29 | 2014-12-31 | 华为技术有限公司 | Route withdrawal method and network device |
CN104426839A (en) * | 2013-08-20 | 2015-03-18 | 中兴通讯股份有限公司 | Router advertisement attack prevention method, apparatus and device |
CN106134137A (en) * | 2014-03-14 | 2016-11-16 | Nicira股份有限公司 | The advertising of route of managed gateway |
CN106230729A (en) * | 2016-08-29 | 2016-12-14 | 杭州华三通信技术有限公司 | The method and apparatus that a kind of network appliance address is noticed |
CN111435912A (en) * | 2019-03-28 | 2020-07-21 | 新华三技术有限公司 | IPv6 stateless address automatic configuration method, network equipment and host |
EP3716583A1 (en) * | 2019-03-28 | 2020-09-30 | New H3C Technologies Co., Ltd. | Ipv6 stateless address auto-configuration |
CN110401730A (en) * | 2019-07-25 | 2019-11-01 | 华为技术有限公司 | IP address generation method and device |
Non-Patent Citations (1)
Title |
---|
IPv6路由通告攻击检测;张建宗等;《网络安全技术与应用》;20090915(第09期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112367257A (en) | 2021-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112367257B (en) | Route notification method and device | |
US20180316607A1 (en) | Providing non-interrupt failover using a link aggregation mechanism | |
CN106412142B (en) | Resource equipment address obtaining method and device | |
CN106911728A (en) | The choosing method and device of host node in distributed system | |
WO2018090677A1 (en) | Processing method, device and system for nf component abnormality | |
US11381501B2 (en) | Coordinating pseudowire connection characteristics and multi-homed provider edge device capabtilities | |
WO2018099394A1 (en) | Packet transmission | |
CN109639589B (en) | Load balancing method and device | |
US11936762B2 (en) | Processing protocol packet | |
CN100563263C (en) | In network storage service, realize the method and system of system high-available | |
CN109815065B (en) | Main-standby switching method and device for dual computers and electronic equipment | |
CN102946350A (en) | Priority-based data transmission method and device | |
CN112104531B (en) | Backup implementation method and device | |
CN112367238B (en) | Message processing method and device | |
CN112235202A (en) | Load sharing method, device, equipment and machine readable storage medium | |
CN110912997B (en) | Method and device for checking Loopback interface of triangular networking | |
CN111818192B (en) | Communication method of gateway cluster, network equipment and gateway cluster system | |
CN116016324B (en) | Message transmission method, system, device and electronic equipment | |
US20240250920A1 (en) | Cross host beacon probing in a virtualized computing system | |
CN109921948B (en) | Fault detection method and device for data plane and gateway equipment | |
EP2594051A1 (en) | Systems and methods recovering from the failure of a server load balancer | |
CN108337147B (en) | Message forwarding method and device | |
CN118827281A (en) | VN group information processing method, network element, computer program product and storage medium | |
CN118055067A (en) | Communication method and device | |
CN111835735A (en) | Anti-attack method, device, equipment and machine readable storage medium |
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 |