Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, the technical solution in the embodiment of the present application is carried out clear, completeSite preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based onEmbodiment in the application, those of ordinary skill in the art are obtained every other without making creative workEmbodiment shall fall in the protection scope of this application.
At present, in EVPE networkings, the time of same tunnel UP on different devices is asynchronous, this easilys lead to tunnelIn a period of time before two equal UP of equipment, the equipment of rear UP can not receive the flow of the equipment transmission of first UP, cause in roadFlow continues packet loss.
Fig. 2 is a kind of flow diagram of UP methods in tunnel provided by the embodiments of the present application, applied to the network equipment.ItsIn, the network equipment can be VTEP (Virtual Extensible Local Area Network Tunnel End Point,Expansible virtual LAN endpoint of a tunnel), the equipment that is used for network communication such as RR (Route Reflector, Router Reflector).
Above application includes in the tunnel UP methods of the network equipment:
S201:Receive the first advertising of route that peer network device is sent;First advertising of route includes correspondent network and setsThe mark of standby belonging network.
S202:If the mark of peer network device belonging network is identical with the mark of network equipment belonging network, with opposite endThe network equipment establishes the corresponding tunnel of peer network device belonging network;
S203:Tunnel is set as READY state;READY state is used to indicate the network equipment and supports to receive by tunnelFlow is not supported through tunnel converting flow;
S204 sends the first query message for tunnel to peer network device;
S205:If receive peer network device when inquire local tunnel for READY state when send first responseTunnel is set as UP states by message.
Above-mentioned advertising of route can be MAC (Media Access Control, media access control)/IP (InternetProtocol, procotol) advertising of route, or IMET (International Mobile EquipmentIdentity, international mobile equipment identification number) advertising of route can also be that IP prefix routes are noticed, the embodiment of the present application is to thisWithout limiting.
In one embodiment of the application, after the network equipment adds in network, sent and route to other network equipments with BGPNotice, tunnel is established with other network equipments.The advertising of route includes the mark of network equipment belonging network.Practical applicationIn, the tunnel if desired established is VXLAN tunnels, and the network carried in advertising of route is identified as the affiliated VXLAN of the network equipmentMark.
When detecting that peer network device is identical with the mark of the network belonging to the network equipment, for example, correspondent network is setThe mark of standby affiliated VXLAN is identical with the mark of the affiliated VXLAN of the network equipment, and the network equipment is established with peer network device shouldThe corresponding tunnels of VXLAN.Here, on network devices, address of the source address in the tunnel for the network equipment, the mesh in the tunnelAddress be peer network device address;On peer network device, the source address in the tunnel is the ground of peer network deviceLocation, the destination address in the tunnel are the address of the network equipment.
After the network equipment establishes tunnel with peer network device, which is set as READY state, network by the network equipmentEquipment can receive the flow that peer network device is sent by tunnel, the flow sent to peer network device by tunnelIt is identified processing, but cannot be by tunnel to peer network device converting flow.At this point, if tunnel is on peer network deviceFirst UP, the network equipment can also receive and identify the flow that processing peer network device is sent by the tunnel, effectivelyAvoid the packet loss of flow that peer network device is sent to the network equipment.
In one embodiment of the application, in order to avoid the tunnel that UP is excessively repeated, increase the burden of the network equipment,After the network equipment establishes tunnel with peer network device, can tunnel be first set as DOWN states, at this point, the network equipment cannotReceive the flow that peer network device is sent by tunnel, it is impossible to the flow sent to peer network device by the tunnelIt is identified processing, and cannot be by the tunnel to peer network device converting flow;Network equipment inquiry is local to be whether there isWith address that source address is the network equipment, other tunnels for the address that destination address is peer network device;If being not present, by tunnelRoad is set as READY state;If in the presence of that can keep the tunnel as DOWN states, the tunnel can also be deleted, the application is realExample is applied to this without limiting.
After tunnel is set as READY state, the network equipment sends the first inquiry to peer network device with BGP and reportsText;If peer network device inquires local tunnel as READY state according to the first query message, with BGP to the network equipmentFeed back the first response message;After the network equipment receives the first response message, tunnel is set as UP states.If at this point, networkTunnel is prior to tunnel UP on peer network device in equipment, the also non-UP in the tunnel on peer network device, it is, opposite end netThe tunnel is READY state in network equipment, and the network equipment can be by tunnel to peer network device transmitted traffic, correspondent networkEquipment can also receive and identify processing flow by the tunnel, reduce the flow that the network equipment is sent to peer network devicePacket loss.
If peer network device inquires local tunnel as READY state according to the first query message, can be straight by tunnelIt connects and is set as UP states.In this way, peer network device can receive the flow that the network equipment is sent by tunnel, to the network equipmentProcessing is identified by the flow that tunnel is sent, and can be by tunnel to network equipment converting flow.At this point, tunnel existsPeer network device elder generation UP, tunnel is READY state on the network equipment, and the network equipment can receive and identify processing and pass through the tunnelThe flow that road is sent is effectively reduced the packet loss for the flow that peer network device is sent to the network equipment.
In addition, if peer network device inquires local tunnel as DOWN states according to the first query message, do not handleFirst query message.
In one embodiment of the application, in order to accelerate the UP of the network equipment and tunnel on peer network device, networkEquipment actively can also send secondary route notice to peer network device;Peer network device is noticed according to secondary route and netNetwork equipment establishes tunnel, and tunnel is set as READY state, and send the second query message to the network equipment;The network equipment is worked asWhen inquiring the READY state of the state in local tunnel, tunnel is set as UP states, and feed back second to peer network deviceResponse message;After peer network device receives the second response message, tunnel is set as UP states.
With reference to the signaling diagram of tunnel UP shown in Fig. 3, UP methods in tunnel provided by the embodiments of the present application are carried out detailedIt describes in detail bright.
The network equipment is identified as VXLAN 100 including VXLAN belonging to VTEP 1 and VTEP 2, VTEP 1 and VTEP 2;
1st, VTEP 1 sends advertising of route 1 with BGP to VTEP 2, and the mark of VXLAN belonging to VTEP 2 is carried in advertising of route 1Know VXLAN 100;
VTEP 2 sends advertising of route 2 with BGP to VTEP 1, and the mark of VXLAN belonging to VTEP 1 is carried in advertising of route 2VXLAN 100;
2nd, it after VTEP 1 receives advertising of route 2, detects belonging to the VXLAN 100 and VTEP 1 that advertising of route 2 carriesThe mark VXLAN 100 of VXLAN is identical, and tunnel 1 is established with VTEP 2, and tunnel 1 is set as DOWN states;On VTEP 1, tunnelThe source address in road 1 is the address of VTEP 1, and the destination address in tunnel 1 is the address of VTEP 2;
After VTEP 2 receives advertising of route 1, detect belonging to the VXLAN 100 and VTEP 2 that advertising of route 1 carriesThe mark VXLAN 100 of VXLAN is identical, and tunnel 1 is established with VTEP 1, and tunnel 1 is set as DOWN states;On VTEP 2, tunnelThe source address in road 1 is the address of VTEP 2, and the destination address in tunnel 1 is the address of VTEP 1;
3rd, after tunnel 1 is set as DOWN states by VTEP 1, local whether there is with source address of inquiry is VTEP's 1Address, other tunnels for the address that destination address is VTEP 2;If being not present, tunnel 1 is set as READY state;
After tunnel 1 is set as DOWN states by VTEP 2, the local ground that whether there is with source address for VTEP 2 of inquiryLocation, other tunnels for the address that destination address is VTEP 1;If being not present, tunnel 1 is set as READY state;
4th, VTEP 1 sends the query message 1 for tunnel 1 with BGP to VTEP 2;
VTEP 2 sends the query message 2 for tunnel 1 with BGP to VTEP 1;
5th, after VTEP 2 receives query message 1, the state in tunnel 1 is inquired according to query message 1;If inquire local tunnelThe state in road 1 is READY state, then tunnel 1 is set as UP states, and send response message 1 to VTEP 1 with BGP;
After VTEP 1 receives query message 2, the state in tunnel 1 is inquired according to query message 2;If inquire local tunnel1 state is READY state, then tunnel 1 is set as UP states, and send response message 2 to VTEP 2 with BGP;
6th, it after VTEP 1 receives response message 1, if the state in tunnel 1 is UP states, does not process;If the shape in tunnel 1State is READY state, and tunnel 1 is set as UP states;
After VTEP 2 receives response message 2, if the state in tunnel 1 is UP states, do not process;If the state in tunnel 1For READY state, tunnel 1 is set as UP states.
Using above-described embodiment, the state in tunnel includes READY state, if tunnel is READY state, the network equipment can connectThe flow sent by tunnel is received, it can be to processing being identified, but tunnel cannot be passed through by the flow that tunnel is sentTo other network equipment converting flows;The network equipment after it will be set as READY state with the tunnel that peer network device is established,The query message for the tunnel is sent to peer network device;Peer network device inquires local tunnel according to query messageState, if inquiring tunnel as READY state, response message is sent to the network equipment;The network equipment receives response message, willTunnel is set as UP states.As it can be seen that in the embodiment of the present application, even if tunnel is prior to tunnel on peer network device on the network equipmentSetting is for UP states, i.e., tunnel is prior to tunnel UP on peer network device on the network equipment, and tunnel is on peer network deviceREADY state can also receive the flow that the network equipment is sent by tunnel, to being identified by the flow that tunnel is sentProcessing, is effectively reduced flow packet loss.
Corresponding with tunnel UP embodiments of the method, the embodiment of the present application additionally provides a kind of tunnel UP devices.
With reference to figure 4, Fig. 4 is a kind of structure diagram of UP devices in tunnel provided by the embodiments of the present application, applied to networkEquipment, the device include:
Receiving unit 401, for receiving the first advertising of route of peer network device transmission;First advertising of route includesThe mark of peer network device belonging network;
Unit 402 is established, if for the mark of peer network device belonging network and the mark of network equipment belonging networkIt is identical, establish the corresponding tunnel of network equipment belonging network with peer network device;
First setting unit 403, for tunnel to be set as READY state;READY state is used to indicate network equipment branchIt holds and flow is received by tunnel, do not support through tunnel converting flow;
Transmitting element 404, for sending the first query message for tunnel to peer network device;First query messageIt is used to indicate the state that peer network device inquires local tunnel;
Second setting unit 405, if for receiving peer network device when inquiring local tunnel as READY stateThe first response message sent, UP states are set as by tunnel.
Optionally, the source address in the local tunnel is the address of the network equipment, and the destination address in the local tunnel is opposite endThe address of the network equipment;
First setting unit 403, specifically can be used for:
Tunnel is set as DOWN states;
Inquire the address that local whether there is with source address is the network equipment, the address that destination address is peer network deviceOther tunnels;
If being not present, tunnel is set as READY state.
Optionally, above-mentioned tunnel UP devices can also include:Query unit;
Receiving unit 401 can be also used for receiving the second query message for tunnel that peer network device is sent;
Query unit, for inquiring the state in tunnel according to the second query message;
Tunnel if can be also used for inquiring tunnel as READY state, is set as UP states by the second setting unit 405.
Optionally, transmitting element 404 can be also used for sending secondary route notice, secondary route to peer network deviceNotice includes the mark of network equipment belonging network, so that peer network device establishes network equipment belonging network with the network equipmentCorresponding tunnel.
Optionally, tunnel is VXLAN tunnels;
First advertising of route, the first query message and the first response message are BGP messages.
Using above-described embodiment, the state in tunnel includes READY state, if tunnel is READY state, the network equipment can connectThe flow sent by tunnel is received, it can be to processing being identified, but tunnel cannot be passed through by the flow that tunnel is sentTo other network equipment converting flows;The network equipment after it will be set as READY state with the tunnel that peer network device is established,The query message for the tunnel is sent to peer network device;Peer network device inquires local tunnel according to query messageState, if inquiring tunnel as READY state, response message is sent to the network equipment;The network equipment receives response message, willTunnel is set as UP states.As it can be seen that in the embodiment of the present application, even if tunnel is prior to tunnel on peer network device on the network equipmentSetting is for UP states, i.e., tunnel is prior to tunnel UP on peer network device on the network equipment, and tunnel is on peer network deviceREADY state can also receive the flow that the network equipment is sent by tunnel, to being identified by the flow that tunnel is sentProcessing, is effectively reduced flow packet loss.
The embodiment of the present application additionally provides a kind of network equipment, as shown in figure 5, including processor 501 and machine readable depositingStorage media 502, machine readable storage medium 502 are stored with the machine-executable instruction that can be performed by processor 501.
In addition, as shown in figure 5, the network equipment can also include:Communication interface 503 and communication bus 504;Wherein, it handlesDevice 501, machine readable storage medium 502, communication interface 503 complete mutual communication, communication interface by communication bus 504503 for the communication between the above-mentioned network equipment and other equipment.
Processor 501 is promoted to realize following steps by machine-executable instruction:
Receive the first advertising of route that peer network device is sent;First advertising of route is included belonging to peer network deviceThe mark of network;
If the mark of peer network device belonging network is identical with the mark of network equipment belonging network, set with correspondent networkIt is standby to establish the corresponding tunnel of network equipment belonging network;
Tunnel is set as READY state;READY state is used to indicate the network equipment and supports to receive flow by tunnel,It does not support through tunnel converting flow;
The first query message for tunnel is sent to peer network device;First query message is used to indicate correspondent networkEquipment query is to the state in local tunnel;
If receiving peer network device first response message for sending when inquiring local tunnel as READY state,Tunnel is set as UP states.
Using above-described embodiment, the state in tunnel includes READY state, if tunnel is READY state, the network equipment can connectThe flow sent by tunnel is received, it can be to processing being identified, but tunnel cannot be passed through by the flow that tunnel is sentTo other network equipment converting flows;The network equipment after it will be set as READY state with the tunnel that peer network device is established,The query message for the tunnel is sent to peer network device;Peer network device inquires local tunnel according to query messageState, if inquiring tunnel as READY state, response message is sent to the network equipment;The network equipment receives response message, willTunnel is set as UP states.As it can be seen that in the embodiment of the present application, even if tunnel is prior to tunnel on peer network device on the network equipmentSetting is for UP states, i.e., tunnel is prior to tunnel UP on peer network device on the network equipment, and tunnel is on peer network deviceREADY state can also receive the flow that the network equipment is sent by tunnel, to being identified by the flow that tunnel is sentProcessing, is effectively reduced flow packet loss.
Above-mentioned communication bus 504 can be that (Peripheral Component Interconnect, external components are mutual by PCIEven standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) be totalLine etc..The communication bus 504 can be divided into address bus, data/address bus, controlling bus etc..For ease of representing, only with one in Fig. 5Bar thick line represents, it is not intended that an only bus or a type of bus.
Machine readable storage medium 502 can include RAM (Random Access Memory, random access memory),It can also include NVM (Non-Volatile Memory, nonvolatile memory), for example, at least a magnetic disk storage.SeparatelyOutside, machine readable storage medium 502 can also be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor 501 can be general processor, including CPU (Central Processing Unit, centreManage device), NP (Network Processor, network processing unit) etc.;It can also be DSP (Digital SignalProcessing, digital signal processor), ASIC (Application Specific Integrated Circuit, it is specialIntegrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable patrolCollect device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the present application additionally provides a kind of machine readable storage medium, is stored with machine-executable instruction, is being locatedWhen managing device calling and performing, machine-executable instruction promotes processor to realize following steps:
Receive the first advertising of route that peer network device is sent;First advertising of route is included belonging to peer network deviceThe mark of network;
If the mark of peer network device belonging network is identical with the mark of network equipment belonging network, set with correspondent networkIt is standby to establish the corresponding tunnel of network equipment belonging network;
Tunnel is set as READY state;READY state is used to indicate the network equipment and supports to receive flow by tunnel,It does not support through tunnel converting flow;
The first query message for tunnel is sent to peer network device;First query message is used to indicate correspondent networkEquipment query is to the state in local tunnel;
If receiving peer network device first response message for sending when inquiring local tunnel as READY state,Tunnel is set as UP states.
Using above-described embodiment, the state in tunnel includes READY state, if tunnel is READY state, the network equipment can connectThe flow sent by tunnel is received, it can be to processing being identified, but tunnel cannot be passed through by the flow that tunnel is sentTo other network equipment converting flows;The network equipment after it will be set as READY state with the tunnel that peer network device is established,The query message for the tunnel is sent to peer network device;Peer network device inquires local tunnel according to query messageState, if inquiring tunnel as READY state, response message is sent to the network equipment;The network equipment receives response message, willTunnel is set as UP states.As it can be seen that in the embodiment of the present application, even if tunnel is prior to tunnel on peer network device on the network equipmentSetting is for UP states, i.e., tunnel is prior to tunnel UP on peer network device on the network equipment, and tunnel is on peer network deviceREADY state can also receive the flow that the network equipment is sent by tunnel, to being identified by the flow that tunnel is sentProcessing, is effectively reduced flow packet loss.
It should be noted that herein, relational terms such as first and second and the like are used merely to a realityBody or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operationIn any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended toNon-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including thoseElement, but also including other elements that are not explicitly listed or further include as this process, method, article or equipmentIntrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded thatAlso there are other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is described using relevant mode, identical similar portion between each embodimentPoint just to refer each other, and the highlights of each of the examples are difference from other examples.Especially for tunnel UPFor device, the network equipment, machine readable storage medium embodiment, since it is substantially similar to tunnel UP embodiments of the method, instituteWith the fairly simple of description, related part illustrates referring to the part of tunnel UP embodiments of the method.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection domain of the application.It is allAny modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection domain of the applicationIt is interior.