CN108259301B - Tunnel online method and device - Google Patents
Tunnel online method and device Download PDFInfo
- Publication number
- CN108259301B CN108259301B CN201710701661.0A CN201710701661A CN108259301B CN 108259301 B CN108259301 B CN 108259301B CN 201710701661 A CN201710701661 A CN 201710701661A CN 108259301 B CN108259301 B CN 108259301B
- Authority
- CN
- China
- Prior art keywords
- tunnel
- network
- network equipment
- network device
- opposite
- 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
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4633—Interconnection of networks using encapsulation techniques, e.g. tunneling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
- H04L47/2483—Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/82—Miscellaneous aspects
- H04L47/825—Involving tunnels, e.g. MPLS
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application provides a tunnel online method and a tunnel online device, which are applied to network equipment and comprise the following steps: receiving a first route announcement sent by opposite-end network equipment; establishing a tunnel corresponding to a network to which the network equipment belongs with opposite-end network equipment; setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel; sending a first query message aiming at the tunnel to opposite terminal network equipment; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel; and if receiving a first response message sent by the opposite terminal network equipment when the local tunnel is inquired to be in a READY state, setting the tunnel to be in an UP state. By applying the embodiment of the application, the traffic packet loss is reduced.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a tunnel online method and apparatus.
Background
An EVPE (Ethernet Virtual Private Network) networking, as shown in fig. 1, includes a plurality of edge devices, such as devices 101, 102 shown in fig. 1, and internal devices, such as devices 103, 104 shown in fig. 1. The different devices send the route announcement to each other to establish the tunnel, and the communication among the different devices is realized through the tunnel. The tunnel on each device has two states, which are UP (UP line) state and DOWN (DOWN line) state. If the tunnel is in an UP state, the tunnel is UP on the edge device, the device can receive the traffic sent by the tunnel, namely, the traffic sent by the tunnel can be identified and processed, and the traffic can be forwarded to other devices through the tunnel; if the tunnel is in a DOWN state, the tunnel is DOWN on the edge device, and the device cannot receive the traffic sent through the tunnel, that is, cannot identify the traffic sent through the tunnel, and cannot forward the traffic to other devices through the tunnel.
Currently, taking a tunnel between an edge device and an internal device as an example, a process of UP a tunnel on a device includes: the internal device sends a route advertisement to the edge device; after receiving the route announcement, the edge device establishes a tunnel with the internal device, and sets the tunnel to be in an UP state, wherein the tunnel is UP on the edge device; in addition, the edge device sends a response notice of the route notice to the internal device; at this time, the tunnel is in a DOWN state on the internal device, after receiving the response notification, the internal device changes the tunnel from the DOWN state to an UP state, and the tunnel is UP on the internal device, and the internal device can send traffic to the edge device through the tunnel.
As can be seen from the above situation, the tunnel on the edge device precedes the tunnel UP on the internal device, which causes the traffic sent to the internal device through the tunnel on the edge device to continue to lose packets during the period from the UP of the tunnel on the edge device to the UP of the tunnel on the internal device.
Disclosure of Invention
An object of the present embodiment is to provide a method and an apparatus for online tunneling, so as to reduce packet loss in traffic. The specific technical scheme is as follows:
in one aspect, an embodiment of the present application provides a tunnel UP method, which is applied to a network device, and the method includes:
receiving a first route announcement sent by opposite-end network equipment; the first route announcement comprises an identifier of a network to which the opposite-end network equipment belongs;
if the identifier of the network to which the opposite-end network equipment belongs is the same as the identifier of the network to which the network equipment belongs, establishing a tunnel corresponding to the network to which the network equipment belongs with the opposite-end network equipment;
setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
sending a first query message aiming at the tunnel to the opposite terminal network equipment; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
and if receiving a first response message sent by the opposite-end network device when the tunnel is queried to be in a READY state, setting the tunnel to be in an UP state.
In a second aspect, an embodiment of the present application provides a tunnel UP device, which is applied to a network device, and the tunnel UP device includes:
a receiving unit, configured to receive a first route advertisement sent by an opposite-end network device; the first route announcement comprises an identifier of a network to which the opposite-end network equipment belongs;
an establishing unit, configured to establish, with the peer network device, a tunnel corresponding to a network to which the network device belongs if an identifier of the network to which the peer network device belongs is the same as an identifier of the network to which the network device belongs;
the first setting unit is used for setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
a sending unit, configured to send a first query packet for the tunnel to the peer network device; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
and the second setting unit is used for setting the tunnel to be in an UP state if receiving a first response message sent by the opposite terminal network device when the tunnel is queried to be in a READY state locally.
In one aspect, an embodiment of the present application provides a network device, including 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: and realizing the steps of the tunnel UP method.
In a fourth aspect, embodiments of the present application provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: and realizing the steps of the tunnel UP method.
In the embodiment of the application, the state of the tunnel includes a READY state, and if the tunnel is in the READY state, the network device can receive the traffic sent through the tunnel, i.e., can identify and process the traffic sent through the tunnel, but cannot forward the traffic to other network devices through the tunnel; after setting a tunnel established with opposite-end network equipment to be in a READY state, the network equipment sends a query message aiming at the tunnel to the opposite-end network equipment; the opposite terminal network equipment inquires the state of the local tunnel according to the inquiry message, and sends a response message to the network equipment if the tunnel is inquired to be in a READY state; the network equipment receives the response message and sets the tunnel to be in an UP state. Therefore, in the embodiment of the application, even if the tunnel on the network device is set to be in the UP state before the tunnel on the opposite-end network device, that is, the tunnel on the network device is set to be in the READY state before the tunnel on the opposite-end network device is set to be in the UP state, the traffic sent by the network device through the tunnel can be received, the traffic sent through the tunnel is identified, and traffic packet loss is effectively reduced. Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an EVPE networking;
fig. 2 is a flowchart illustrating a tunnel UP method according to an embodiment of the present application;
fig. 3 is a signaling diagram of a tunnel UP according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a tunnel UP device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, in an EVPE networking, the UP time of the same tunnel on different devices is not synchronous, which easily causes that the later UP device cannot receive the traffic sent by the first UP device within a period of time before the two devices are both UP, resulting in continuous traffic packet loss.
Fig. 2 is a flowchart of a tunnel UP method provided in the embodiment of the present application, which is applied to a network device. The Network device may be a device for Network communication, such as a VTEP (Virtual Extensible Local Area Network Tunnel End Point), an RR (Route Reflector), and the like.
The tunnel UP method applied to the network equipment comprises the following steps:
s201: receiving a first route announcement sent by opposite-end network equipment; the first route advertisement includes an identifier of a network to which the peer network device belongs.
S202: if the identifier of the network to which the opposite-end network equipment belongs is the same as the identifier of the network to which the network equipment belongs, establishing a tunnel corresponding to the network to which the opposite-end network equipment belongs with the opposite-end network equipment;
s203: setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
s204, sending a first query message aiming at the tunnel to opposite-end network equipment;
s205: and if receiving a first response message sent by the opposite terminal network equipment when the local tunnel is inquired to be in a READY state, setting the tunnel to be in an UP state.
The route advertisement may be a MAC (Media Access Control)/IP (internet protocol) route advertisement, an IMET (International Mobile equipment identity) route advertisement, or an IP prefix route advertisement, which is not limited in this embodiment of the present invention.
In an embodiment of the present application, after a network device joins a network, BGP sends a route advertisement to other network devices, and establishes a tunnel with the other network devices. The route advertisement includes an identifier of a network to which the network device belongs. In practical application, if the tunnel to be established is a VXLAN tunnel, the identifier of the network carried in the route advertisement is the identifier of the VXLAN to which the network device belongs.
When detecting that the identifiers of the network to which the opposite-end network device and the network device belong are the same, for example, the identifier of the VXLAN to which the opposite-end network device belongs is the same as the identifier of the VXLAN to which the network device belongs, the network device and the opposite-end network device establish a tunnel corresponding to the VXLAN. Here, on the network device, the source address of the tunnel is the address of the network device, and the destination address of the tunnel is the address of the opposite network device; on the opposite terminal network device, the source address of the tunnel is the address of the opposite terminal network device, and the destination address of the tunnel is the address of the network device.
After the network device establishes a tunnel with the opposite-end network device, the network device sets the tunnel to be in a READY state, the network device can receive the traffic sent by the opposite-end network device through the tunnel, and identifies the traffic sent by the opposite-end network device through the tunnel, but cannot forward the traffic to the opposite-end network device through the tunnel. At this time, if the tunnel is UP on the peer network device first, the network device may also receive and identify and process the traffic sent by the peer network device through the tunnel, thereby effectively avoiding packet loss of the traffic sent by the peer network device to the network device.
In an embodiment of the present application, in order to avoid an excessive and repeated UP of a tunnel and increase the burden of a network device, after the network device establishes the tunnel with an opposite-end network device, the tunnel may be set to a DOWN state first, at this time, the network device cannot receive traffic sent by the opposite-end network device through the tunnel, cannot identify and process traffic sent by the opposite-end network device through the tunnel, and cannot forward the traffic to the opposite-end network device through the tunnel; the network equipment inquires whether other tunnels with source addresses as the addresses of the network equipment and destination addresses as the addresses of opposite-end network equipment exist locally; if not, setting the tunnel to be in a READY state; if the tunnel exists, the tunnel may be kept in the DOWN state, or the tunnel may be deleted, which is not limited in the embodiment of the present application.
After the tunnel is set to be in a READY state, the network equipment sends a first query message to opposite-end network equipment through BGP (border gateway protocol); if the opposite-end network equipment inquires that the local tunnel is in a READY state according to the first inquiry message, a first response message is fed back to the network equipment by BGP; and after receiving the first response message, the network equipment sets the tunnel to be in an UP state. At this time, if the tunnel on the network device is UP before the tunnel on the peer network device, and the tunnel on the peer network device is not UP yet, that is, the tunnel on the peer network device is READY state, the network device may send traffic to the peer network device through the tunnel, and the peer network device may also receive and identify the processing traffic through the tunnel, thereby reducing the traffic packet loss sent by the network device to the peer network device.
If the opposite-end network device inquires that the local tunnel is in a READY state according to the first inquiry message, the tunnel can be directly set to be in an UP state. In this way, the peer network device can receive the traffic sent by the network device through the tunnel, perform identification processing on the traffic sent by the network device through the tunnel, and forward the traffic to the network device through the tunnel. At this time, the tunnel is UP at the peer network device, the tunnel on the network device is READY, and the network device can receive and identify and process the traffic sent through the tunnel, thereby effectively reducing packet loss of the traffic sent from the peer network device to the network device.
In addition, if the opposite-end network device inquires that the local tunnel is in the DOWN state according to the first inquiry message, the first inquiry message is not processed.
In an embodiment of the present application, in order to accelerate the UP of the tunnel between the network device and the peer network device, the network device may also actively send a second route advertisement to the peer network device; the opposite terminal network equipment establishes a tunnel with the network equipment according to the second route announcement, sets the tunnel in a READY state, and sends a second query message to the network equipment; when the network equipment inquires the READY state of the local tunnel, the tunnel is set to be in an UP state, and a second response message is fed back to the opposite terminal network equipment; and after receiving the second response message, the opposite terminal network equipment sets the tunnel to be in an UP state.
The tunnel UP method provided in the embodiment of the present application is described in detail below with reference to the signaling diagram of tunnel UP shown in fig. 3.
The network equipment comprises VTEP 1 and VTEP 2, and the identifier of VXLAN to which VTEP 1 and VTEP 2 belong is VXLAN 100;
1. VTEP 1 sends route announcement 1 to VTEP 2 by BGP, route announcement 1 carries label VXLAN 100 of VXLAN that VTEP 2 belongs to;
2. after receiving the route announcement 2, the VTEP 1 detects that VXLAN 100 carried by the route announcement 2 is the same as the identifier VXLAN 100 of the VXLAN to which the VTEP 1 belongs, establishes a tunnel 1 with the VTEP 2, and sets the tunnel 1 to be in a DOWN state; on VTEP 1, the source address of tunnel 1 is the address of VTEP 1, the destination address of tunnel 1 is the address of VTEP 2;
after receiving the route advertisement 1, the VTEP 2 detects that VXLAN 100 carried by the route advertisement 1 is the same as the identifier VXLAN 100 of the VXLAN to which the VTEP 2 belongs, establishes a tunnel 1 with the VTEP 1, and sets the tunnel 1 to be in a DOWN state; on VTEP 2, the source address of tunnel 1 is the address of VTEP 2, the destination address of tunnel 1 is the address of VTEP 1;
3. after setting the tunnel 1 to be in a DOWN state, the VTEP 1 inquires whether other tunnels with the address of which the source address is the VTEP 1 and the destination address is the VTEP 2 exist locally; if not, setting the tunnel 1 to be in a READY state;
after setting the tunnel 1 to be in a DOWN state, the VTEP 2 inquires whether other tunnels with the address of which the source address is the VTEP 2 and the destination address is the address of the VTEP 1 exist locally; if not, setting the tunnel 1 to be in a READY state;
4. VTEP 1 sends the inquiry message 1 aiming at tunnel 1 to VTEP 2 by BGP;
5. after receiving the query message 1, the VTEP 2 queries the state of the tunnel 1 according to the query message 1; if the state of the local tunnel 1 is queried to be a READY state, setting the tunnel 1 to be an UP state, and sending a response message 1 to the VTEP 1 by BGP;
after receiving the query message 2, the VTEP 1 queries the state of the tunnel 1 according to the query message 2; if the state of the local tunnel 1 is queried to be a READY state, setting the tunnel 1 to be an UP state, and sending a response message 2 to a VTEP 2 by BGP;
6. after receiving the response message 1, the VTEP 1 does not process the response message if the state of the tunnel 1 is the UP state; if the state of the tunnel 1 is a READY state, setting the tunnel 1 to be an UP state;
after receiving the response message 2, the VTEP 2 does not process the response message if the state of the tunnel 1 is the UP state; and if the state of the tunnel 1 is a READY state, setting the tunnel 1 to be in an UP state.
By applying the embodiment, the state of the tunnel includes READY state, if the tunnel is READY state, the network device can receive the traffic sent through the tunnel, i.e. can identify the traffic sent through the tunnel, but cannot forward the traffic to other network devices through the tunnel; after setting a tunnel established with opposite-end network equipment to be in a READY state, the network equipment sends a query message aiming at the tunnel to the opposite-end network equipment; the opposite terminal network equipment inquires the state of the local tunnel according to the inquiry message, and sends a response message to the network equipment if the tunnel is inquired to be in a READY state; the network equipment receives the response message and sets the tunnel to be in an UP state. Therefore, in the embodiment of the application, even if the tunnel on the network device is set to be in the UP state before the tunnel on the opposite-end network device, that is, the tunnel on the network device is set to be in the READY state before the tunnel on the opposite-end network device is set to be in the UP state, the traffic sent by the network device through the tunnel can be received, the traffic sent through the tunnel is identified, and traffic packet loss is effectively reduced.
Corresponding to the embodiment of the tunnel UP method, the embodiment of the application also provides a tunnel UP device.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a tunnel UP device according to an embodiment of the present application, which is applied to a network device, and the tunnel UP device includes:
a receiving unit 401, configured to receive a first route advertisement sent by an opposite-end network device; the first route announcement comprises an identifier of a network to which the opposite terminal network equipment belongs;
an establishing unit 402, configured to establish, with an opposite-end network device, a tunnel corresponding to a network to which the network device belongs, if an identifier of the network to which the opposite-end network device belongs is the same as an identifier of the network to which the network device belongs;
a first setting unit 403, configured to set the tunnel to a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
a sending unit 404, configured to send a first query packet for a tunnel to an opposite-end network device; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
a second setting unit 405, configured to set the tunnel to the UP state if a first response message sent by the peer network device when querying that the local tunnel is in the READY state is received.
Optionally, the source address of the local tunnel is an address of the network device, and the destination address of the local tunnel is an address of the opposite-end network device;
the first setting unit 403 may specifically be configured to:
setting the tunnel to be in a DOWN state;
inquiring whether other tunnels with source addresses as the addresses of the network equipment and destination addresses as the addresses of opposite-end network equipment exist locally;
and if not, setting the tunnel to be in a READY state.
Optionally, the tunnel UP device may further include: a query unit;
the receiving unit 401 may further be configured to receive a second query packet for a tunnel sent by an opposite-end network device;
the query unit is used for querying the state of the tunnel according to the second query message;
the second setting unit 405 may be further configured to set the tunnel to the UP state if the tunnel is queried to be in the READY state.
Optionally, the sending unit 404 may be further configured to send a second route advertisement to the peer network device, where the second route advertisement includes an identifier of a network to which the network device belongs, so that the peer network device and the network device establish a tunnel corresponding to the network to which the network device belongs.
Optionally, the tunnel is a VXLAN tunnel;
the first route announcement, the first query message and the first response message are BGP messages.
By applying the embodiment, the state of the tunnel includes READY state, if the tunnel is READY state, the network device can receive the traffic sent through the tunnel, i.e. can identify the traffic sent through the tunnel, but cannot forward the traffic to other network devices through the tunnel; after setting a tunnel established with opposite-end network equipment to be in a READY state, the network equipment sends a query message aiming at the tunnel to the opposite-end network equipment; the opposite terminal network equipment inquires the state of the local tunnel according to the inquiry message, and sends a response message to the network equipment if the tunnel is inquired to be in a READY state; the network equipment receives the response message and sets the tunnel to be in an UP state. Therefore, in the embodiment of the application, even if the tunnel on the network device is set to be in the UP state before the tunnel on the opposite-end network device, that is, the tunnel on the network device is set to be in the READY state before the tunnel on the opposite-end network device is set to be in the UP state, the traffic sent by the network device through the tunnel can be received, the traffic sent through the tunnel is identified, and traffic packet loss is effectively reduced.
An embodiment of the present application further provides a network device, as shown in fig. 5, including a processor 501 and a machine-readable storage medium 502, where the machine-readable storage medium 502 stores machine-executable instructions that can be executed by the processor 501.
In addition, as shown in fig. 5, the network device may further include: a communication interface 503 and a communication bus 504; the processor 501, the machine-readable storage medium 502, and the communication interface 503 are configured to complete communication with each other through the communication bus 504, and the communication interface 503 is configured to communicate with other devices through the network device.
The processor 501 is caused by machine executable instructions to implement the steps of:
receiving a first route announcement sent by opposite-end network equipment; the first route announcement comprises an identifier of a network to which the opposite terminal network equipment belongs;
if the identifier of the network to which the opposite-end network equipment belongs is the same as the identifier of the network to which the network equipment belongs, establishing a tunnel corresponding to the network to which the network equipment belongs with the opposite-end network equipment;
setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
sending a first query message aiming at the tunnel to opposite terminal network equipment; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
and if receiving a first response message sent by the opposite terminal network equipment when the local tunnel is inquired to be in a READY state, setting the tunnel to be in an UP state.
By applying the embodiment, the state of the tunnel includes READY state, if the tunnel is READY state, the network device can receive the traffic sent through the tunnel, i.e. can identify the traffic sent through the tunnel, but cannot forward the traffic to other network devices through the tunnel; after setting a tunnel established with opposite-end network equipment to be in a READY state, the network equipment sends a query message aiming at the tunnel to the opposite-end network equipment; the opposite terminal network equipment inquires the state of the local tunnel according to the inquiry message, and sends a response message to the network equipment if the tunnel is inquired to be in a READY state; the network equipment receives the response message and sets the tunnel to be in an UP state. Therefore, in the embodiment of the application, even if the tunnel on the network device is set to be in the UP state before the tunnel on the opposite-end network device, that is, the tunnel on the network device is set to be in the READY state before the tunnel on the opposite-end network device is set to be in the UP state, the traffic sent by the network device through the tunnel can be received, the traffic sent through the tunnel is identified, and traffic packet loss is effectively reduced.
The communication bus 504 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus 504 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The machine-readable storage medium 502 may include a RAM (Random Access Memory) and may also include a NVM (Non-Volatile Memory), such as at least one disk Memory. Additionally, the machine-readable storage medium 502 may also be at least one memory device located remotely from the aforementioned processor.
The Processor 501 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital signal processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
Embodiments of the present application also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the steps of:
receiving a first route announcement sent by opposite-end network equipment; the first route announcement comprises an identifier of a network to which the opposite terminal network equipment belongs;
if the identifier of the network to which the opposite-end network equipment belongs is the same as the identifier of the network to which the network equipment belongs, establishing a tunnel corresponding to the network to which the network equipment belongs with the opposite-end network equipment;
setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
sending a first query message aiming at the tunnel to opposite terminal network equipment; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
and if receiving a first response message sent by the opposite terminal network equipment when the local tunnel is inquired to be in a READY state, setting the tunnel to be in an UP state.
By applying the embodiment, the state of the tunnel includes READY state, if the tunnel is READY state, the network device can receive the traffic sent through the tunnel, i.e. can identify the traffic sent through the tunnel, but cannot forward the traffic to other network devices through the tunnel; after setting a tunnel established with opposite-end network equipment to be in a READY state, the network equipment sends a query message aiming at the tunnel to the opposite-end network equipment; the opposite terminal network equipment inquires the state of the local tunnel according to the inquiry message, and sends a response message to the network equipment if the tunnel is inquired to be in a READY state; the network equipment receives the response message and sets the tunnel to be in an UP state. Therefore, in the embodiment of the application, even if the tunnel on the network device is set to be in the UP state before the tunnel on the opposite-end network device, that is, the tunnel on the network device is set to be in the READY state before the tunnel on the opposite-end network device is set to be in the UP state, the traffic sent by the network device through the tunnel can be received, the traffic sent through the tunnel is identified, and traffic packet loss is effectively reduced.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. Especially, for the embodiments of the tunnel UP device, the network device, and the machine-readable storage medium, since they are substantially similar to the embodiments of the tunnel UP method, the description is relatively simple, and for the relevant points, refer to the partial description of the embodiments of the tunnel UP method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims (9)
1. An UP method on a tunnel, applied to a network device, the method comprising:
receiving a first route announcement sent by opposite-end network equipment; the first route announcement comprises an identifier of a network to which the opposite-end network equipment belongs;
if the identifier of the network to which the opposite-end network equipment belongs is the same as the identifier of the network to which the network equipment belongs, establishing a tunnel corresponding to the network to which the network equipment belongs with the opposite-end network equipment;
setting the tunnel to be in a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
sending a first query message aiming at the tunnel to the opposite terminal network equipment; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
and if receiving a first response message sent by the opposite-end network device when the tunnel is queried to be in a READY state, setting the tunnel to be in an UP state.
2. The method of claim 1, wherein the source address of the local tunnel is an address of the network device, and the destination address of the local tunnel is an address of the peer network device;
the step of setting the tunnel to be READY state includes:
setting the tunnel to be in a DOWN state;
inquiring whether other tunnels with source addresses as the addresses of the network equipment and destination addresses as the addresses of the opposite-end network equipment exist locally;
and if the tunnel does not exist, setting the tunnel to be in a READY state.
3. The method of claim 1, further comprising:
sending a second route advertisement to the opposite-end network equipment, wherein the second route advertisement comprises an identifier of a network to which the network equipment belongs, so that the opposite-end network equipment and the network equipment establish a tunnel corresponding to the network to which the network equipment belongs;
receiving a second query message aiming at the tunnel and sent by the opposite terminal network equipment;
inquiring the state of the tunnel according to the second inquiry message;
and if the tunnel is inquired to be in a READY state, setting the tunnel to be in an UP state.
4. The method of claim 1, wherein the tunnel is an extensible virtual local area network (VXLAN) tunnel;
the first route announcement, the first query message and the first response message are Border Gateway Protocol (BGP) messages.
5. A UP device on a tunnel is applied to network equipment, and the UP device comprises:
a receiving unit, configured to receive a first route advertisement sent by an opposite-end network device; the first route announcement comprises an identifier of a network to which the opposite-end network equipment belongs;
an establishing unit, configured to establish, with the peer network device, a tunnel corresponding to a network to which the network device belongs if an identifier of the network to which the peer network device belongs is the same as an identifier of the network to which the network device belongs;
a first setting unit, configured to set the tunnel to a READY state; the READY state is used for indicating that the network equipment supports receiving the flow through the tunnel and does not support forwarding the flow through the tunnel;
a sending unit, configured to send a first query packet for the tunnel to the peer network device; the first query message is used for indicating the state that the opposite terminal network equipment queries the local tunnel;
and the second setting unit is used for setting the tunnel to be in an UP state if receiving a first response message sent by the opposite terminal network device when the tunnel is queried to be in a READY state locally.
6. The apparatus of claim 5, wherein the source address of the local tunnel is an address of the network device, and the destination address of the local tunnel is an address of the peer network device;
the first setting unit is specifically configured to:
setting the tunnel to be in a DOWN state;
inquiring whether other tunnels with source addresses as the addresses of the network equipment and destination addresses as the addresses of the opposite-end network equipment exist locally;
and if the tunnel does not exist, setting the tunnel to be in a READY state.
7. The apparatus of claim 5, further comprising: a query unit;
the sending unit is further configured to send a second route advertisement to the peer network device, where the second route advertisement includes an identifier of a network to which the network device belongs, so that the peer network device and the network device establish a tunnel corresponding to the network to which the network device belongs;
the receiving unit is further configured to receive a second query packet, which is sent by the peer network device and is addressed to the tunnel;
the query unit is configured to query the state of the tunnel according to the second query packet;
the second setting unit is further configured to set the tunnel to be in an UP state if the tunnel is queried to be in a READY state.
8. The apparatus of claim 5, wherein the tunnel is an extensible virtual local area network (VXLAN) tunnel;
the first route announcement, the first query message and the first response message are Border Gateway Protocol (BGP) messages.
9. A network device 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: carrying out the method steps of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710701661.0A CN108259301B (en) | 2017-08-16 | 2017-08-16 | Tunnel online method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710701661.0A CN108259301B (en) | 2017-08-16 | 2017-08-16 | Tunnel online method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108259301A CN108259301A (en) | 2018-07-06 |
CN108259301B true CN108259301B (en) | 2020-09-25 |
Family
ID=62721223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710701661.0A Active CN108259301B (en) | 2017-08-16 | 2017-08-16 | Tunnel online method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108259301B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110536267B (en) * | 2019-07-01 | 2022-11-01 | 武汉船舶通信研究所(中国船舶重工集团公司第七二二研究所) | Method and equipment for reloading data of train operation monitoring and recording device |
CN112688887B (en) * | 2020-12-23 | 2022-07-12 | 新华三技术有限公司 | Tunnel configuration method and node equipment |
CN113746715B (en) * | 2021-07-16 | 2023-03-31 | 北京华三通信技术有限公司 | Method and device for realizing cross-three-layer transmission of two-layer message |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105577417B (en) * | 2014-11-06 | 2019-02-22 | 新华三技术有限公司 | Message forwarding method and device based on VXLAN network |
US10069646B2 (en) * | 2015-12-02 | 2018-09-04 | Nicira, Inc. | Distribution of tunnel endpoint mapping information |
CN105591841A (en) * | 2015-12-31 | 2016-05-18 | 盛科网络(苏州)有限公司 | Connectivity detection method of VXLAN tunnel |
CN106899430B (en) * | 2016-12-09 | 2020-05-29 | 新华三技术有限公司 | Traffic forwarding processing method and device |
CN106878072B (en) * | 2017-02-10 | 2020-04-03 | 新华三技术有限公司 | Message transmission method and device |
CN106911548A (en) * | 2017-02-24 | 2017-06-30 | 新华三技术有限公司 | A kind of tunnel state changing method and device |
-
2017
- 2017-08-16 CN CN201710701661.0A patent/CN108259301B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108259301A (en) | 2018-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9973469B2 (en) | MAC (L2) level authentication, security and policy control | |
US9860169B1 (en) | Neighbor resolution for remote EVPN hosts in IPV6 EVPN environment | |
US9467376B2 (en) | Method and device for sending internet protocol packets | |
KR100886433B1 (en) | IPv6 Support Method for Bridge Extension Using Wireless Communications System | |
US20170093834A1 (en) | Enhanced evpn mac route advertisement having mac (l2) level authentication, security and policy control | |
CN106878288B (en) | message forwarding method and device | |
CN110798403B (en) | Communication method, communication device and communication system | |
CN107800625B (en) | Message forwarding method and device | |
CN106161253B (en) | Message processing method and device | |
CN109714274B (en) | Method for acquiring corresponding relation and routing equipment | |
CN108259301B (en) | Tunnel online method and device | |
CN104468866A (en) | Fast roaming method for multi-gateway terminal in wireless local area network | |
CN102291320A (en) | MAC (media access control) address learning method and edge device | |
CN109412926B (en) | Tunnel establishment method and device | |
US20180145905A1 (en) | Data link layer-based communication method, device, and system | |
CN109039918B (en) | Message sending method and device | |
CN108989220B (en) | Routing method and routing system | |
CN104247339A (en) | Home network packet delivery | |
CN104081749A (en) | DAD-NS triggered address resolution for dos attack protection | |
CN106911549B (en) | Data message processing method and device | |
CN109831378B (en) | Message timeout response method and device | |
CN109728926B (en) | Communication method and network device | |
WO2018006684A1 (en) | Message processing method and device, and router | |
CN107528929B (en) | ARP (Address resolution protocol) entry processing method and device | |
CN109862137B (en) | Message transmission method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |