WO2021042446A1 - 一种二层隧道的切换方法、系统及设备 - Google Patents

一种二层隧道的切换方法、系统及设备 Download PDF

Info

Publication number
WO2021042446A1
WO2021042446A1 PCT/CN2019/110773 CN2019110773W WO2021042446A1 WO 2021042446 A1 WO2021042446 A1 WO 2021042446A1 CN 2019110773 W CN2019110773 W CN 2019110773W WO 2021042446 A1 WO2021042446 A1 WO 2021042446A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
address information
pop server
address
switch
Prior art date
Application number
PCT/CN2019/110773
Other languages
English (en)
French (fr)
Inventor
陈凯林
黄云
Original Assignee
厦门网宿有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 厦门网宿有限公司 filed Critical 厦门网宿有限公司
Priority to US17/640,329 priority Critical patent/US20220345402A1/en
Priority to EP19944054.6A priority patent/EP4012976A1/en
Publication of WO2021042446A1 publication Critical patent/WO2021042446A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/66Layer 2 routing, e.g. in Ethernet based MAN's
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/80Ingress point selection by the source endpoint, e.g. selection of ISP or POP
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags

Definitions

  • the present invention relates to the field of Internet technology, and in particular to a method, system and equipment for switching layer 2 tunnels.
  • the same enterprise may deploy data centers in different geographic locations, and the different services provided by these data centers often need to communicate with each other. Therefore, existing enterprises often need to establish a two-tier dedicated line network between different geographic locations.
  • both parties in communication can deploy switches and POP (Point Of Presence, access point) servers, and POP servers can be connected through a Layer 2 tunnel to achieve two-way transmission of data packets.
  • POP Point Of Presence, access point
  • the fdb (forwarding database) table can be maintained through the MAC address learning function, and the port used to forward the data message can be determined through the fdb table.
  • one or several Layer 2 tunnels established between POP servers may suddenly fail.
  • the Layer 2 tunnel will be switched and the pop server that receives data packets will be changed.
  • the switch still sends the data message to the original POP server according to the fdb table, which will cause the data message to not be transmitted normally, which will affect the second Stability of layered private line network.
  • the purpose of this application is to provide a method, system and device for switching a Layer 2 tunnel, which can improve the stability of a Layer 2 dedicated line network.
  • the present application provides a method for switching a Layer 2 tunnel.
  • the method is applied to a Layer 2 dedicated line system.
  • the method includes: when the Layer 2 tunnel is switched from the first POP server to the second POP server :
  • the first POP server obtains the current address information table, constructs an address information message based on the address information table, and sends the address information message to the switch;
  • the switch forwards the address information message To the second POP server;
  • the second POP server receives the address information packet forwarded by the switch, and constructs a spoofed packet according to the address information table carried in the address information packet; wherein, the Each MAC address in the address information table is sequentially used as the source address of each constructed spoofing message; and sending the constructed spoofing message to the switch;
  • the switch receives the second POP server sent And update the local address information table according to the port that receives the spoofed packet and the source address in the spoofed packet.
  • the system includes a switch and a first POP server and a second POP server connected to the switch.
  • the first POP server is used to obtain the current address information table, construct an address information message based on the address information table, and report the address information
  • the message is sent to the switch;
  • the second POP server is configured to receive the address information message forwarded by the switch, and construct a spoof message according to the address information table carried in the address information message; wherein, Each MAC address in the address information table is sequentially used as the source address of each constructed spoofing message; and sending the constructed spoofing message to the switch; the switch is used to transfer the address
  • the information message is forwarded to the second POP server, and the spoofing message sent by the second POP server is received, and according to the port for receiving the spoofing message and the source address in the spoofing message, Update the local
  • another aspect of the present application also provides a method for switching a Layer 2 tunnel, the method is applied to a POP server, the POP server is connected to a switch, and the switch is also connected to another POP server;
  • the method includes: when the second layer tunnel is switched from the POP server to the another POP server, obtaining the current address information table, and constructing an address information message based on the address information table; and reporting the address information
  • the message is sent to the another POP server, wherein the address information message is forwarded to the another POP server via the switch; the spoofing message forwarded by the switch is received, and the spoofing message is discarded; wherein, The spoofing message is constructed by the another POP server based on the address information message.
  • the POP server includes a processor and a memory.
  • the memory is used to store a computer program.
  • the computer program is executed by the processor, the foregoing The switching method of the second layer tunnel.
  • another aspect of the present application also provides a method for switching a Layer 2 tunnel.
  • the method is applied to a switch, and the switch is respectively connected to a first POP server and a second POP server; the method includes: When the Layer 2 tunnel is switched from the first POP server to the second POP server, it receives the address information message sent by the first POP server, and forwards the address information message to the second POP server.
  • the switch includes a processor and a memory.
  • the memory is used to store a computer program.
  • the computer program is executed by the processor, the foregoing two are implemented. Layer tunnel switching method.
  • the first POP server can construct an address information message according to the currently maintained address information table, and transfer the address The information message is forwarded to the second POP server through the switch.
  • the second POP server may construct a spoofing message according to the content of the address information table, where the source address in the spoofing message may be the MAC address in the address information table.
  • the second POP server can send the constructed deception message to the switch, and the switch can update the local address information table according to the port receiving the deception message and the source address in the deception message through its own MAC address learning function.
  • the switch when receiving a data message with the aforementioned source address as the destination address, the switch can forward the data message to the second POP server instead of the first POP server according to the updated address information table .
  • the switch when the layer 2 tunnel is switched, the switch can actively update the local address information table, so as to correctly forward the data message to the POP server corresponding to the switched layer 2 tunnel, thereby ensuring that the data message can pass through the switch.
  • the second layer tunnel is used for transmission, which improves the stability of the second layer dedicated line network.
  • Fig. 1 is a schematic structural diagram of a two-layer dedicated line network system in an embodiment of the present invention
  • FIG. 2 is a schematic diagram of the steps of a layer 2 tunnel switching method executed by a switch in an embodiment of the present invention
  • Fig. 3 is a schematic structural diagram of a switch in an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of the steps of a method for switching a layer 2 tunnel executed by a POP server in an embodiment of the present invention.
  • the method for switching the Layer 2 tunnel provided in this application can be applied to the Layer 2 dedicated line system as shown in FIG. 1.
  • the system may include a switch and a POP server.
  • a Layer 2 dedicated line network can be used to transmit data messages between different communication devices. These communication devices can be distributed in different geographic locations, for example, in different cities, or in the same city far apart Geographic location.
  • the Layer 2 dedicated line network can have a symmetrical structure. Switches and POP servers can be deployed in different geographical locations, and there can be more than one POP server in the same geographical location.
  • the switch and the first POP server and the second POP server on the left in FIG. 1 are taken as examples for illustration.
  • the port connecting the switch and the first POP server is port 3
  • the port connecting the switch and the second POP server is port 4
  • the first POP server and the switch can be connected through port 1.
  • the POP server and the switch can be connected through port 2.
  • the first POP server can be connected to the Layer 2 tunnel through port 5 and port 6 respectively
  • the second POP server can be connected to the Layer 2 tunnel through port 7 and port 8 respectively.
  • the method for switching the layer 2 tunnel provided in an embodiment of the present application can be applied to the above-mentioned switch. Please refer to Figure 2.
  • the method may include the following multiple steps.
  • the Layer 2 tunnel originally responsible for data transmission may fail.
  • the status of the tunnel ports of multiple POP servers can be automatically set, thereby realizing the switching of the Layer 2 tunnel.
  • a Layer 2 private line network can use rstp (rapid spanning tree protocol), which can ensure that at the same time, only one Layer 2 tunnel between the POP servers shown in Figure 1 is connected. Yes, and data transmission is carried out through this layer 2 tunnel. The other three layer 2 tunnels are all blocked, and data packet transmission cannot be carried out.
  • rstp can select a layer 2 tunnel from the remaining three tunnels (for example, tunnel 2 can be selected), and use the selected layer 2 tunnel as the only conductive tunnel. In this way, the switching of the Layer 2 tunnel can be realized.
  • the POP server used for data message transmission may also be changed accordingly. For example, after switching from tunnel 1 to tunnel 2, the first POP server that was originally responsible for communication will not be able to forward the data message, but will switch to the second POP server to forward the data message. In this case, it is necessary to prevent the switch from continuing to forward data packets to the first POP server according to the original fdb table.
  • the first POP server may read the current address information table from the directory storing the fdb table.
  • the address information table the correspondence relationship between the MAC address and the port number can be stored.
  • the first POP server can query the destination address of the data message in the address information table, thereby determining the port for forwarding the data message.
  • the aforementioned address information table may be an fdb table, and the fdb table may generally include multiple fields.
  • the fdb table may include fields used to characterize vlan (Virtual Local Area Network) identifiers, fields used to fill MAC addresses, fields used to characterize MAC address types, and fields used to characterize MAC address binding.
  • the first POP server may construct an address information message based on the address information table. Specifically, the first POP server may use the address information table as the body of the address information message, and determine the assignment of the ethertype field (ethertype) in the address information message and the destination address of the address information message , So that the receiver can identify the message by the value of the Ethernet type field.
  • ethertype ethertype field
  • the assignment of the Ethernet type field can be a custom assignment, which can be recognized by switches and other POP servers.
  • the assignment of the Ethernet type field should avoid the values that have been used in the network system. , So as to avoid misrecognition of messages.
  • the assignment of the Ethernet type field in the address information message may be 0x9288.
  • the address information message may be sent to the second POP server. Therefore, the destination address of the address information message may be the MAC address of port 2 where the second POP server is connected to the switch.
  • the message can be sent from port 1 by the first POP server, and the switch receives the address information message through port 3. Since the address information message is a unicast message, after receiving the address information message, the switch can forward the address information message to port 2 of the second POP server only through port 4, instead of broadcasting to port 2 of the second POP server.
  • Other POP servers are possible.
  • S13 Receive a spoofing message constructed based on the address information message from the second POP server, and update the local address information according to the port of the spoofing message and the source address in the spoofing message table.
  • the second POP server after receiving the message forwarded by the switch, the second POP server can determine whether it is an address information message according to the Ethernet type of the message, and if so, it can identify the address information table carried therein. By parsing the address information table, the second POP server can identify each MAC address in the address information table.
  • the switch For the switch, if the switch receives data messages with these MAC addresses as the destination address, then according to the fdb table learned by the switch before, the switch will forward these data messages to the first POP server through port 3. After the Layer 2 tunnel is switched to the second POP server, the current mapping relationship of the switch needs to be changed.
  • the second POP server can construct multiple spoofed packets based on these MAC addresses.
  • the MAC address parsed from the address information table can be used as the source address, and the Ethernet type field and destination address of the spoofed message can be set.
  • Ethernet types for other data packets of the spoofed packet can be set.
  • a designated assignment used to characterize a spoofed packet can be preset, so that the second POP server can fill the designated assignment into the Ethernet type field of the spoofed packet.
  • the specified assignment can be 0x9289.
  • the spoofing message can be sent to the first POP server. Therefore, the destination address in the spoofing message can be the MAC address of port 1 where the first POP server is connected to the switch.
  • the second POP server can send the constructed spoofing message to the switch through port 2 in turn.
  • the switch After the switch receives the spoofed packet from port 4, it can identify the source MAC address in the spoofed packet according to its own MAC address learning function, and can establish a mapping relationship between the source MAC address and port 4 that receives the spoofed packet.
  • the switch In order to update the local fdb table, in this way, after receiving the data messages sent by the source Mac addresses, the switch will send them through port 4 according to the records of the fdb table, so as to reach the second POP server.
  • the source MAC address in the spoofed message is actually the MAC address in the address information table of the first POP server. Therefore, the source MAC address is in the switch, which was originally connected to port 3 (that is, the switch is connected to the first POP server). Ports) are mapped to each other.
  • the switch After the switch learns to spoof the message, it will map these source MAC addresses to port 4, so that if the switch is connected to the first POP server through the first port (port 3), and through the second port (port 4) Connected to the second POP server, then after learning the spoofed message, the switch can modify the mapping relationship between the first port and each source address originally recorded in the local address information table to The mapping relationship between the second port and each of the source addresses, thereby realizing an active update process of the local address information table.
  • the spoofed message constructed by the second POP server may also be a unicast message, and the destination address of the unicast message points to the first POP server. Therefore, after receiving the spoofed packet, the switch will learn the MAC address in the spoofed packet on the one hand, and will also forward the spoofed packet to the first POP server on the other hand. After receiving the data message from the switch, the first POP server can determine whether the Ethernet type field in the data message is the above-mentioned specified assignment. If so, the first POP server can determine the data message The text is a spoofed packet constructed by the second POP server. At this time, the first POP server can directly discard the spoofed packet.
  • the switch updates the local address information table, if it subsequently receives a data message with the aforementioned source MAC address as the destination address, it will not forward the data message to the first POP server. Instead, the data message is forwarded to the second POP server through port 4 according to the updated address information table. In this way, the second POP server can forward the data message through the switched Layer 2 tunnel.
  • the first POP server can actively provide its own address information table to the second POP server, and subsequently, the second POP server can be based on the first POP server.
  • Each MAC address in the address information table of the POP server constructs multiple spoofed packets and forwards them through the switch. After forwarding these spoofed packets, the switch obtains a new mapping relationship between each MAC address and port through a self-learning mechanism, so that the local address information table of the switch can be updated to ensure that subsequent data packets can be forwarded by the switch to the second
  • the POP server in turn ensures that data packets can be normally transmitted through the switched layer 2 tunnel.
  • the first POP server can construct the address information message only for the source address mapping information of the target port connected to the Layer 2 tunnel, and the source address mapping information of other ports may not be included in the address information message. in.
  • the first POP server constructs the address information message it can identify the source address mapping information of the target port connected to the Layer 2 tunnel from the address information table, and compare the source address of the target port The mapping information is constructed as an address information message.
  • the first POP server can identify the source address mapping information of port 5 and port 6 from the address information table, and use the source address mapping information of port 5 and port 6 as the message body to construct an address information message Text.
  • the second POP server can construct a corresponding spoofed packet based on the source address mapping information of port 5 and port 6.
  • the first POP server may also use the source address mapping information of each port in the address information table as the message body to construct the address information message, but when the second POP server constructs the spoofed message, It is necessary to identify the source address mapping information of the target port connected to the layer 2 tunnel on the first POP server in the address information message, and construct a spoofed message according to the identified source address mapping information of the target port.
  • the first POP server may identify the source address mapping information of each port from its own address information table, and use the identified source address mapping information as a message body to construct an address information message. However, in the constructed address information message, the port corresponding to each source address mapping information needs to be identified.
  • the first POP server may add a port identifier corresponding to each source address mapping information to the address information message, and the port identifier may be, for example, a port type or a port number.
  • the second POP server can identify the source address mapping information of the target port connected to the first POP server with the Layer 2 tunnel from the address information message, and according to the target port The source address mapping information is used to construct spoofed packets.
  • the present application also provides a switch, the switch includes a processor and a memory, and the memory is used to store a computer program.
  • the computer program is executed by the processor, the above-mentioned execution performed by the switch can be implemented. Switching method of Layer 2 tunnel.
  • This application also provides a method for switching a Layer 2 tunnel, which can be applied to a POP server, where the POP server is connected to a switch, and the switch is also connected to another POP server.
  • the method may include the following steps.
  • S23 Send the address information message to the switch, so that the switch forwards the address information message to the another POP server.
  • S25 Receive a spoofing message forwarded by the switch, and discard the spoofing message; wherein, the spoofing message is constructed by the another POP server based on the address information message.
  • the constructed address information message is a unicast message, and the destination address in the address information message points to the another POP server.
  • the POP server when the POP server constructs the address information message, it can use the address information table as the body of the address information message, and determine the assignment of the ethertype field in the address information message And the destination address of the address information message, so that the receiver can identify the message through the value of the Ethernet type field.
  • the assignment of the Ethernet type field can be a custom assignment, which can be recognized by switches and other POP servers.
  • the assignment of the Ethernet type field should avoid the values that have been used in the network system. , So as to avoid misrecognition of messages.
  • the assignment of the Ethernet type field in the address information message may be 0x9288.
  • the address information message may be sent to the second POP server. Therefore, the destination address of the address information message may be the MAC address of port 2 where the second POP server is connected to the switch.
  • both the spoofing message and the address information message may include an Ethernet type field. By filling different assignments in the Ethernet type field, it is possible to distinguish between spoofed packets and address information packets.
  • the value filled in the Ethernet type field may be 0x9289, and for the address information packet, the value filled in the Ethernet type field may be 0x9288.
  • the specified assignment in the type field of the spoofing message is different from the assignment in the type field of the address information message, so that the spoofing message and the address information message can be correctly identified through different assignments.
  • the spoofing message is a unicast message, and the destination address in the spoofing message points to the POP server, so that when the switch receives the spoofing message, the The spoofed message is forwarded to the POP server.
  • the address information message includes an address information table maintained by the POP server, and each MAC address in the address information table is sequentially used as the source address of the spoofed message.
  • receiving the spoofed message fed back by the switch and discarding the spoofed message includes:
  • the method further includes:
  • each of the identified MAC addresses in the address information table is As the source address of each of the spoofed packets constructed in turn;
  • the constructed spoofing message is sent to the switch, so that the switch updates the local address information table of the switch according to the port that receives the spoofing message and the source address in the spoofing message.
  • constructing a spoofed message based on the identified address information table includes:
  • the identified MAC address in the address information table is used as the source address of the spoofed packet, and the MAC address of the other POP server is used as the destination address of the spoofed packet.
  • the POP server includes a processor and a memory, and the memory is used to store a computer program.
  • the computer program is executed by the processor, the above-mentioned second layer executed by the POP server can be implemented.
  • the switching method of the tunnel is also provided.
  • the present application also provides a switching system for a layer 2 tunnel.
  • the system includes a switch and a first POP server and a second POP server connected to the switch.
  • the layer 2 tunnel is switched from the first POP server to the When the second POP server:
  • the first POP server is configured to obtain the current address information table, construct an address information message based on the address information table, and send the address information message to the switch;
  • the second POP server is configured to receive the address information message forwarded by the switch, and construct a spoofing message according to the address information table carried in the address information message; wherein, in the address information table Each MAC address is sequentially used as the source address of each constructed spoofing message; and sending the constructed spoofing message to the switch;
  • the switch is configured to forward the address information message to the second POP server, and receive the spoofing message sent by the second POP server, and according to the port through which the spoofing message is received and The source address in the spoofed message updates the local address information table.
  • the switch is further used to forward the spoofed message to the first POP server; the first POP server is also used to receive the spoofed message fed back by the switch, and discard all the spoofed messages. The spoofed message.
  • the first POP server can construct an address information message according to the currently maintained address information table, and transfer the address The information message is forwarded to the second POP server through the switch.
  • the second POP server may construct a spoofing message according to the content of the address information table, where the source address in the spoofing message may be the MAC address in the address information table.
  • the second POP server can send the constructed deception message to the switch, and the switch can update the local address information table according to the port receiving the deception message and the source address in the deception message through its own MAC address learning function.
  • the switch when receiving a data message with the aforementioned source address as the destination address, the switch can forward the data message to the second POP server instead of the first POP server according to the updated address information table .
  • the switch when the layer 2 tunnel is switched, the switch can actively update the local address information table, so as to correctly forward the data message to the POP server corresponding to the switched layer 2 tunnel, thereby ensuring that the data message can pass through the switch.
  • the second layer tunnel is used for transmission, which improves the stability of the second layer dedicated line network.
  • each implementation manner can be implemented by software plus a necessary general hardware platform, and of course, it can also be implemented by hardware.
  • the above technical solution essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic A disc, an optical disc, etc., include a number of instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种二层隧道的切换方法、系统及设备,其中,所述方法应用于二层专线系统,所述方法包括:当二层隧道从第一POP服务器切换至第二POP服务器时:所述第一POP服务器获取当前的地址信息表,并构建地址信息报文;所述交换机将所述地址信息报文转发至所述第二POP服务器;所述第二POP服务器根据所述地址信息报文中携带的地址信息表构建欺骗报文;其中,所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;所述交换机接收所述第二POP服务器发来的所述欺骗报文,并根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。本申请提供的技术方案,能够提高二层专线网络的稳定性。

Description

一种二层隧道的切换方法、系统及设备 技术领域
本发明涉及互联网技术领域,特别涉及一种二层隧道的切换方法、系统及设备。
背景技术
目前,同一个企业可能会在不同的地理位置都部署数据中心,这些数据中心提供的不同服务,往往需要相互通信。因此,现有的企业往往都需要在不同的地理位置之间建立二层专线网络。
在二层专线网络中,通信的双方均可以部署交换机和POP(Point Of Presence,接入点)服务器,POP服务器之间可以通过二层隧道进行连通,从而实现数据报文的双向传输。在交换机和POP服务器中,可以通过MAC地址学习功能维护fdb(forwarding database,转发数据)表,通过该fdb表可以确定用于转发数据报文的端口。
在实际应用中,POP服务器之间建立的某条或者某几条二层隧道可能会突发故障,在这种情况下,二层隧道会发生切换,接收数据报文的pop服务器会进行更改,然而,由于转发数据报文的交换机上的fdb表未及时地做对应的更新,交换机依然按照fdb表将数据报文发送给原POP服务器,那么会导致该数据报文无法正常传输,从而影响二层专线网络的稳定性。
发明内容
本申请的目的在于提供一种二层隧道的切换方法、系统及设备,能够提高二层专线网络的稳定性。
为实现上述目的,本申请一方面提供一种二层隧道的切换方法,所述方法应用于二层专线系统,所述方法包括:当二层隧道从第一POP服务器切换至第二POP服务器时:所述第一POP服务器获取当前的地址信息表,并基于所述地址信息表构建地址信息报文,以及将所述地址信息报文发送至交换机;所述交 换机将所述地址信息报文转发至所述第二POP服务器;所述第二POP服务器接收所述交换机转发的所述地址信息报文,并根据所述地址信息报文中携带的地址信息表构建欺骗报文;其中,所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;以及将构建的所述欺骗报文发送至所述交换机;所述交换机接收所述第二POP服务器发来的所述欺骗报文,并根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。
为实现上述目的,本申请另一方面还提一种二层隧道的切换系统,所述系统包括交换机以及与所述交换机相连的第一POP服务器和第二POP服务器,当二层隧道从所述第一POP服务器切换至所述第二POP服务器时:所述第一POP服务器,用于获取当前的地址信息表,并基于所述地址信息表构建地址信息报文,以及将所述地址信息报文发送至所述交换机;所述第二POP服务器,用于接收所述交换机转发的所述地址信息报文,并根据所述地址信息报文中携带的地址信息表构建欺骗报文;其中,所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;以及将构建的所述欺骗报文发送至所述交换机;所述交换机,用于将所述地址信息报文转发至所述第二POP服务器,并接收所述第二POP服务器发来的所述欺骗报文,以及根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。
为实现上述目的,本申请另一方面还提供一种二层隧道的切换方法,所述方法应用于POP服务器中,所述POP服务器与交换机相连,并且所述交换机还与另一个POP服务器相连;所述方法包括:当二层隧道从所述POP服务器切换至所述另一个POP服务器时,获取当前的地址信息表,并基于所述地址信息表构建地址信息报文;将所述地址信息报文发送至所述另一个POP服务器,其中所述地址信息报文经由所述交换机转发给所述另一个POP服务器;接收所述交换机转发的欺骗报文,并丢弃所述欺骗报文;其中,所述欺骗报文由所述另一个POP服务器基于所述地址信息报文构建得到。
为实现上述目的,本申请另一方面还提供一种POP服务器,所述POP服务器包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的二层隧道的切换方法。
为实现上述目的,本申请另一方面还提供一种二层隧道的切换方法,所述方法应用于交换机中,所述交换机分别与第一POP服务器和第二POP服务器相 连;所述方法包括:当二层隧道从所述第一POP服务器切换至所述第二POP服务器时,接收所述第一POP服务器发来的地址信息报文,并将所述地址信息报文转发至所述第二POP服务器;接收所述第二POP服务器发来的基于所述地址信息报文构建的欺骗报文,并根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表,使得在接收到以所述源地址为目的地址的数据报文时,基于所述更新后的地址信息表,将所述数据报文转发给所述第二POP服务器。
为实现上述目的,本申请另一方面还提供一种交换机,所述交换机包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的二层隧道的切换方法。
由上可见,本申请提供的技术方案,当二层隧道由第一POP服务器切换至第二POP服务器时,第一POP服务器可以根据当前维护的地址信息表构建地址信息报文,并将该地址信息报文通过交换机转发至第二POP服务器。第二POP服务器接收到该地址信息报文后,可以根据地址信息表的内容构建欺骗报文,其中,欺骗报文中的源地址,可以是上述地址信息表中的MAC地址。第二POP服务器可以将构建得到的欺骗报文发送至交换机,交换机可以通过自身的MAC地址学习功能,根据接收欺骗报文的端口以及欺骗报文中的源地址,更新本地的地址信息表。后续,在接收到以上述的源地址为目的地址的数据报文时,交换机便可以按照更新后的地址信息表,将该数据报文转发给第二POP服务器,而不是转发给第一POP服务器。这样,在二层隧道发生切换时,交换机可以主动更新本地的地址信息表,从而正确地将数据报文转发至切换后的二层隧道对应的POP服务器中,进而保证数据报文能够通过切换后的二层隧道进行传输,提高了二层专线网络的稳定性。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施方式中二层专线网络系统的结构示意图;
图2是本发明实施方式中交换机执行的二层隧道的切换方法步骤示意图;
图3是本发明实施方式中交换机的结构示意图;
图4是本发明实施方式中POP服务器执行的二层隧道的切换方法步骤示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。
本申请提供的二层隧道的切换方法,可以应用于如图1所示的二层专线系统中。所述系统中可以包括交换机和POP服务器。通常而言,二层专线网络可以用于传输不同的通信设备之间的数据报文,这些通信设备可以分布于不同的地理位置,例如,分布于不同的城市,或者分布于同一城市相距较远的地理位置。
如图1所示,二层专线网络可以是一个对称的结构,在不同的地理位置处可以分别部署交换机和POP服务器,并且在同一个地理位置处,POP服务器的数量可以不止一个。为了便于描述本申请的技术方案,仅以图1中左侧的交换机和第一POP服务器、第二POP服务器为例进行阐述。在本申请的实施例中,可以假设交换机与第一POP服务器相连的端口为端口3,交换机与第二POP服务器相连的端口为端口4,并且第一POP服务器与交换机可以通过端口1相连,第二POP服务器与交换机可以通过端口2相连。第一POP服务器可以通过端口5和端口6分别与二层隧道相连,第二POP服务器可以通过端口7和端口8分别与二层隧道相连。
本申请一个实施方式中提供的二层隧道的切换方法,可以应用于上述的交换机中。请参阅图2,该方法可以包括以下多个步骤。
S11:当二层隧道从所述第一POP服务器切换至所述第二POP服务器时,接收所述第一POP服务器发来的地址信息报文,并将所述地址信息报文转发至所述第二POP服务器。
在本实施方式中,受网络质量、POP服务器运行状态等因素的影响,原本负责进行数据传输的二层隧道可能会发生故障。此时,根据二层专线网络所采用的通信协议,可以自动设置多个POP服务器的隧道端口的状态,从而实现二层 隧道的切换。举例来说,二层专线网络可以采用rstp(rapid spanning tree protocol,快速生成树协议),该协议可以保证在同一时刻,图1所示的POP服务器之间只有一条二层隧道的状态是导通的,并通过该二层隧道进行数据传输,其它的三条二层隧道的状态都是堵塞的,无法进行数据报文的传输。例如,在图1中,只有隧道1是导通的,并通过隧道1进行数据传输。当隧道1发生故障时,rstp可以从剩下的三条隧道中选择一条二层隧道(例如可以选择隧道2),并将选择的该二层隧道作为唯一导通的隧道。这样,便可以实现二层隧道的切换。
在本实施方式中,随着二层隧道的切换,用于数据报文传输的POP服务器也可能随之发生更改。例如,在从隧道1切换至隧道2后,原先负责通信的第一POP服务器将无法转发数据报文,而是切换至第二POP服务器进行数据报文的转发。在这种情况下,需要防止交换机继续按照原先的fdb表将数据报文转发给第一POP服务器。
具体地,当用于通信的二层隧道从所述第一POP服务器切换至所述第二POP服务器时,第一POP服务器可以从存储fdb表的目录下,读取当前的地址信息表。在该地址信息表中,可以存储MAC地址与端口号的对应关系。这样,第一POP服务器在接收到二层隧道上传来的数据报文后,可以在该地址信息表中查询该数据报文中的目的地址,从而确定转发该数据报文的端口。
在实际应用中,上述的地址信息表可以是fdb表,在fdb表中通常可以包括多个字段。例如,在fdb表中可以包括用于表征vlan(虚拟局域网,Virtual Local Area Network)标识的字段、用于填充MAC地址的字段、用于表征MAC地址类型的字段、用于表征MAC地址绑定的端口号的字段以及用于表征报文处理方式的字段、用于表征MAC地址配置方式的字段等。这样,通过解析fdb表中的内容,可以识别出该fdb表中包含的各个MAC地址。
在本实施方式中,第一POP服务器获取了当前的地址信息表后,可以基于该地址信息表构建地址信息报文。具体地,第一POP服务器可以将地址信息表作为地址信息报文的报文体(body),并确定该地址信息报文中以太网类型字段(ethertype)的赋值和该地址信息报文的目的地址,从而使得接收方可通过以太网类型字段的值对报文进行识别。
在实际应用中,以太网类型字段的赋值可以是自定义的赋值,该赋值可以 被交换机和其它POP服务器识别,较佳的,以太网类型字段的赋值应避开网络系统中已被使用的值,从而避免报文误识别。例如,该地址信息报文中以太网类型字段的赋值可以是0x9288。该地址信息报文可以被发送至第二POP服务器,因此,该地址信息报文的目的地址可以是第二POP服务器与交换机相连的端口2的MAC地址。
在构建出地址信息报文后,该报文可以被第一POP服务器从端口1发出,交换机通过端口3接收该地址信息报文。由于该地址信息报文为单播报文,因此,交换机在接收到该地址信息报文后,可以仅仅通过端口4将该地址信息报文转发至第二POP服务器的端口2,而不会广播至其它的POP服务器。
S13:接收所述第二POP服务器发来的基于所述地址信息报文构建的欺骗报文,并根据所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。
在本实施方式中,第二POP服务器接收到交换机转发的报文后,可通过报文的以太网类型来确定是否为地址信息报文,若是,则可以识别其中携带的地址信息表。通过解析该地址信息表,第二POP服务器可以识别出地址信息表中的各个MAC地址。
对交换机而言,如果交换机接收到以这些MAC地址为目的地址的数据报文,那么根据交换机之前学习到的fdb表,交换机会将这些数据报文通过端口3转发至第一POP服务器,而当二层隧道切换至第二POP服务器后,需要改变交换机当前的映射关系。
鉴于此,第二POP服务器在识别出地址信息表中的各个MAC地址后,可以基于这些MAC地址构建多个欺骗报文。在构建的欺骗报文中,可以将从地址信息表中解析得到的MAC地址作为源地址,并设置欺骗报文的以太网类型字段和目的地址。
具体地,为了使接收方能识别出欺骗报文,可设置欺骗报文其他数据报文不同的以太网类型。在实际应用中,可以预先设置用于表征欺骗报文的指定赋值,这样,第二POP服务器可以将该指定赋值填充至所述欺骗报文的以太网类型字段中。例如,该指定赋值可以是0x9289。此外,该欺骗报文可以被发送至第一POP服务器,因此,该欺骗报文中的目的地址可以是第一POP服务器与交换机相连的端口1的MAC地址。
在构建出各个欺骗报文后,第二POP服务器可以通过端口2依次将构建的欺骗报文发送至交换机。交换机从端口4接收到欺骗报文后,可以根据自身的MAC地址学习功能,识别该欺骗报文中的源MAC地址,并可以将该源MAC地址与接收欺骗报文的端口4建立映射关系,以更新本地的fdb表,如此一来,当接收到该些源Mac地址发送来的数据报文后,交换机会根据fdb表的记录,通过端口4将其发出,从而到达第二POP服务器。
欺骗报文中的源MAC地址,实际上是第一POP服务器的地址信息表中的MAC地址,因此,该源MAC地址在交换机中,原先是与端口3(也就是交换机与第一POP服务器相连的端口)相互映射的。而交换机通过学习欺骗报文后,会将这些源MAC地址与端口4相互映射,这样,如果交换机是通过第一端口(端口3)与所述第一POP服务器相连,并且通过第二端口(端口4)与所述第二POP服务器相连,那么在学习过欺骗报文后,交换机便可以将本地的地址信息表中原本记录的所述第一端口与各个所述源地址的映射关系,修改为所述第二端口与各个所述源地址的映射关系,从而实现本地的地址信息表的主动更新过程。
在本实施方式中,第二POP服务器构建的欺骗报文也可以是单播报文,并且该单播报文的目的地址指向第一POP服务器。因此,交换机接收到该欺骗报文后,一方面会学习该欺骗报文中的MAC地址,另一方面还会将该欺骗报文转发至第一POP服务器。第一POP服务器在接收到交换机发来的数据报文后,可以判断所述数据报文中的以太网类型字段是否为上述的指定赋值,若是,那么第一POP服务器便可以判定所述数据报文为第二POP服务器构建的欺骗报文,此时,第一POP服务器可以直接丢弃所述欺骗报文。
S15:在接收到以所述源地址为目的地址的数据报文时,基于所述更新后的地址信息表,将所述数据报文转发给所述第二POP服务器。
在本实施方式中,交换机在更新了本地的地址信息表后,如果后续接收到以上述的源MAC地址为目的地址的数据报文时,便不会将该数据报文转发至第一POP服务器,而是将该数据报文按照更新后的地址信息表,通过端口4转发至所述第二POP服务器。这样,第二POP服务器便可以通过切换后的二层隧道进行数据报文的转发。
由此可见,当二层隧道从第一POP服务器切换至第二POP服务器后,第一POP服务器可以主动地向第二POP服务器提供自身的地址信息表,后续,第二 POP服务器可以根据第一POP服务器的地址信息表中的各个MAC地址,构建多个欺骗报文,通过交换机进行转发。交换机在转发这些欺骗报文后,通过自学习机制,得到各个MAC地址与端口的新的映射关系,从而可以更新交换机本地的地址信息表,以保证后续的数据报文能够被交换机转发给第二POP服务器,进而保证数据报文能够正常通过切换后的二层隧道进行传输。
需要说明的是,第一POP服务器可以仅针对与二层隧道相连的目标端口的源地址映射信息来构建地址信息报文,而对于其它端口的源地址映射信息,可以不必包含于地址信息报文中。在实际应用中,第一POP服务器在构建地址信息报文时,可以从所述地址信息表中识别出与二层隧道相连的目标端口的源地址映射信息,并将所述目标端口的源地址映射信息构建为地址信息报文。例如,请参阅图1,第一POP服务器可以从地址信息表中识别出端口5和端口6的源地址映射信息,并将端口5和端口6的源地址映射信息作为报文体来构建地址信息报文。后续,第二POP服务器接收到交换机转发的地址信息报文后,便可以基于端口5和端口6的源地址映射信息来构建对应的欺骗报文。
此外,在另一个实施方式中,第一POP服务器也可以将地址信息表中各个端口的源地址映射信息均作为报文体来构建地址信息报文,但是第二POP服务器在构建欺骗报文时,需要识别出地址信息报文中,第一POP服务器上与二层隧道相连的目标端口的源地址映射信息,并根据识别出的目标端口的源地址映射信息来构建欺骗报文。具体地,所述第一POP服务器可以从自身的地址信息表中识别出各个端口的源地址映射信息,并将识别出的各个所述源地址映射信息作为报文体,构建地址信息报文。只不过,在构建得到的地址信息报文中,需要标识出各个源地址映射信息对应的端口。因此,第一POP服务器可以在所述地址信息报文中添加各个所述源地址映射信息对应的端口标识,该端口标识例如可以是端口类型,或者端口号。通过识别端口类型或者端口号,第二POP服务器便可以从所述地址信息报文中识别出所述第一POP服务器与二层隧道相连的目标端口的源地址映射信息,并根据所述目标端口的源地址映射信息构建欺骗报文。
请参阅图3,本申请还提供一种交换机,所述交换机包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述由交换机执行的二层隧道的切换方法。
本申请还提供一种二层隧道的切换方法,所述方法可以应用于POP服务器中,所述POP服务器与交换机相连,并且所述交换机还与另一个POP服务器相连。请参阅图4,所述方法可以包括以下步骤。
S21:当二层隧道从所述POP服务器切换至所述另一个POP服务器时,获取当前的地址信息表,并基于所述地址信息表构建地址信息报文。
S23:将所述地址信息报文发送至所述交换机,以使得所述交换机将所述地址信息报文转发给所述另一个POP服务器。
S25:接收所述交换机转发的欺骗报文,并丢弃所述欺骗报文;其中,所述欺骗报文由所述另一个POP服务器基于所述地址信息报文构建得到。
其中,构建的所述地址信息报文为单播报文,并且所述地址信息报文中的目的地址指向所述另一个POP服务器。
在本实施方式中,POP服务器在构建地址信息报文时,可以将地址信息表作为地址信息报文的报文体(body),并确定该地址信息报文中以太网类型字段(ethertype)的赋值和该地址信息报文的目的地址,从而使得接收方可通过以太网类型字段的值对报文进行识别。
在实际应用中,以太网类型字段的赋值可以是自定义的赋值,该赋值可以被交换机和其它POP服务器识别,较佳的,以太网类型字段的赋值应避开网络系统中已被使用的值,从而避免报文误识别。例如,该地址信息报文中以太网类型字段的赋值可以是0x9288。该地址信息报文可以被发送至第二POP服务器,因此,该地址信息报文的目的地址可以是第二POP服务器与交换机相连的端口2的MAC地址。
需要说明的是,当二层隧道进行切换时,同一个POP服务器在不同阶段,可能需要识别欺骗报文,或者需要识别地址信息报文。而针对欺骗报文和地址信息报文的处理方式是不同的。对于欺骗报文而言,POP服务器可以直接丢弃,而对于地址信息报文而言,POP服务器却需要提取其中的地址信息表,从而构建欺骗报文。因此,正确地识别欺骗报文和地址信息报文是非常重要的。在本实施方式中,欺骗报文和地址信息报文中均可以包含以太网类型字段。通过在以太网类型字段中填充不同的赋值,从而可以区分欺骗报文和地址信息报文。例如,对于欺骗报文而言,以太网类型字段中填充的赋值可以是0x9289,而对于地址信息报文而言,以太网类型字段中填充的赋值可以是0x9288。这样,欺骗 报文的类型字段中的所述指定赋值,与所述地址信息报文的类型字段中的赋值不同,从而可以通过不同的赋值来正确地识别欺骗报文和地址信息报文。
在一个实施方式中,所述欺骗报文为单播报文,并且所述欺骗报文中的目的地址指向所述POP服务器,以使得所述交换机在接收到所述欺骗报文时,将所述欺骗报文转发至所述POP服务器。
在一个实施方式中,所述地址信息报文中包含所述POP服务器维护的地址信息表,并且所述地址信息表中的各个MAC地址,依次被作为所述欺骗报文的源地址。
在一个实施方式中,接收所述交换机反馈的欺骗报文,并丢弃所述欺骗报文包括:
当接收到所述交换机发来的数据报文时,判断所述数据报文中的类型字段是否为指定赋值,若是,判定所述数据报文为所述另一个POP服务器构建的欺骗报文,并丢弃所述欺骗报文。
在一个实施方式中,所述方法还包括:
当二层隧道从所述另一个POP服务器切换至所述POP服务器时,接收所述交换机转发的所述另一个POP服务器的地址信息报文;
识别所述另一个POP服务器的地址信息报文中携带的地址信息表,并基于识别出的所述地址信息表构建欺骗报文;其中,识别出的所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;
将构建的所述欺骗报文发送至所述交换机,以使得所述交换机根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新所述交换机本地的地址信息表。
在一个实施方式中,基于识别出的所述地址信息表构建欺骗报文包括:
确定用于表征欺骗报文的指定赋值,并将所述指定赋值填充至所述欺骗报文的类型字段中;
将识别出的所述地址信息表中的MAC地址作为所述欺骗报文的源地址,并将所述另一个POP服务器的MAC地址作为所述欺骗报文的目的地址。
本申请还提供一种POP服务器,所述POP服务器包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述由POP服务器执行的二层隧道的切换方法。
本申请还提供一种二层隧道的切换系统,所述系统包括交换机以及与所述交换机相连的第一POP服务器和第二POP服务器,当二层隧道从所述第一POP服务器切换至所述第二POP服务器时:
所述第一POP服务器,用于获取当前的地址信息表,并基于所述地址信息表构建地址信息报文,以及将所述地址信息报文发送至所述交换机;
所述第二POP服务器,用于接收所述交换机转发的所述地址信息报文,并根据所述地址信息报文中携带的地址信息表构建欺骗报文;其中,所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;以及将构建的所述欺骗报文发送至所述交换机;
所述交换机,用于将所述地址信息报文转发至所述第二POP服务器,并接收所述第二POP服务器发来的所述欺骗报文,以及根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。
在一个实施方式中,所述交换机还用于将所述欺骗报文转发至所述第一POP服务器;所述第一POP服务器,还用于接收所述交换机反馈的欺骗报文,并丢弃所述欺骗报文。
由上可见,本申请提供的技术方案,当二层隧道由第一POP服务器切换至第二POP服务器时,第一POP服务器可以根据当前维护的地址信息表构建地址信息报文,并将该地址信息报文通过交换机转发至第二POP服务器。第二POP服务器接收到该地址信息报文后,可以根据地址信息表的内容构建欺骗报文,其中,欺骗报文中的源地址,可以是上述地址信息表中的MAC地址。第二POP服务器可以将构建得到的欺骗报文发送至交换机,交换机可以通过自身的MAC地址学习功能,根据接收欺骗报文的端口以及欺骗报文中的源地址,更新本地的地址信息表。后续,在接收到以上述的源地址为目的地址的数据报文时,交换机便可以按照更新后的地址信息表,将该数据报文转发给第二POP服务器,而不是转发给第一POP服务器。这样,在二层隧道发生切换时,交换机可以主动更新本地的地址信息表,从而正确地将数据报文转发至切换后的二层隧道对应的POP服务器中,进而保证数据报文能够通过切换后的二层隧道进行传输,提高了二层专线网络的稳定性。
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的 不同之处。尤其,针对系统和设备的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (20)

  1. 一种二层隧道的切换方法,其特征在于,应用于二层专线系统,所述方法包括:当二层隧道从第一POP服务器切换至第二POP服务器时:
    所述第一POP服务器获取当前的地址信息表,并基于所述地址信息表构建地址信息报文,以及将所述地址信息报文发送至交换机;
    所述交换机将所述地址信息报文转发至所述第二POP服务器;
    所述第二POP服务器接收所述交换机转发的所述地址信息报文,并根据所述地址信息报文中携带的地址信息表构建欺骗报文;其中,所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;以及将构建的所述欺骗报文发送至所述交换机;
    所述交换机接收所述第二POP服务器发来的所述欺骗报文,并根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。
  2. 根据权利要求1所述的方法,其特征在于,所述地址信息报文为单播报文,并且所述地址信息报文中的目的地址指向所述第二POP服务器;以及所述欺骗报文为单播报文,并且所述欺骗报文中的目的地址指向所述第一POP服务器。
  3. 根据权利要求1或2所述的方法,其特征在于,所述交换机通过第一端口与所述第一POP服务器相连,并且通过第二端口与所述第二POP服务器相连;更新本地的地址信息表包括:
    所述交换机将所述本地的地址信息表中原本记录的所述第一端口与各个所述源地址的映射关系,修改为所述第二端口与各个所述源地址的映射关系。
  4. 根据权利要求1或2所述的方法,其特征在于,基于所述地址信息表构建地址信息报文包括:
    所述第一POP服务器从所述地址信息表中识别出与二层隧道相连的目标端口的源地址映射信息,并将所述目标端口的源地址映射信息构建为地址信息报文;
    或者
    所述第一POP服务器从所述地址信息表中识别出各个端口的源地址映射信息,并将识别出的各个所述源地址映射信息构建为地址信息报文,并在所述地址信息报文中添加各个所述源地址映射信息对应的端口标识,以使得所述第二POP服务器根据添加的端口标识,从所述地址信息报文中识别出所述第一POP服务器与二层隧道相连的目标端口的源地址映射信息,并根据所述目标端口的源地址映射信息构建欺骗报文。
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一POP服务器接收所述交换机反馈的欺骗报文,并丢弃所述欺骗报文。
  6. 根据权利要求1所述的方法,其特征在于,所述第二POP服务器根据所述地址信息报文中携带的地址信息表构建欺骗报文包括:
    所述第二POP服务器确定用于表征欺骗报文的指定赋值,并将所述指定赋值填充至所述欺骗报文的类型字段中;
    将识别出的所述地址信息表中的MAC地址作为所述欺骗报文的源地址,并将所述第二POP服务器的MAC地址作为所述欺骗报文的目的地址;其中,所述欺骗报文的类型字段中的所述指定赋值,与所述地址信息报文的类型字段中的赋值不同。
  7. 一种二层隧道的切换系统,其特征在于,所述系统包括交换机以及与所述交换机相连的第一POP服务器和第二POP服务器,当二层隧道从所述第一POP服务器切换至所述第二POP服务器时:
    所述第一POP服务器,用于获取当前的地址信息表,并基于所述地址信息表构建地址信息报文,以及将所述地址信息报文发送至所述交换机;
    所述第二POP服务器,用于接收所述交换机转发的所述地址信息报文,并根据所述地址信息报文中携带的地址信息表构建欺骗报文;其中,所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;以及将构建的所述欺骗报文发送至所述交换机;
    所述交换机,用于将所述地址信息报文转发至所述第二POP服务器,并接收所述第二POP服务器发来的所述欺骗报文,以及根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表。
  8. 一种二层隧道的切换方法,其特征在于,所述方法应用于POP服务器中,所述POP服务器与交换机相连,并且所述交换机还与另一个POP服务器相连;所述方法包括:
    当二层隧道从所述POP服务器切换至所述另一个POP服务器时,获取当前的地址信息表,并基于所述地址信息表构建地址信息报文;
    将所述地址信息报文发送至所述另一个POP服务器,其中所述地址信息报文经由所述交换机转发给所述另一个POP服务器;
    接收所述交换机转发的欺骗报文,并丢弃所述欺骗报文;其中,所述欺骗报文由所述另一个POP服务器基于所述地址信息报文构建得到。
  9. 根据权利要求8所述的方法,其特征在于,构建的所述地址信息报文为单播报文,并且所述地址信息报文中的目的地址指向所述另一个POP服务器;以及,所述欺骗报文为单播报文,并且所述欺骗报文中的目的地址指向所述POP服务器,以使得所述交换机在接收到所述欺骗报文时,将所述欺骗报文转发至所述POP服务器。
  10. 根据权利要求8所述的方法,其特征在于,所述地址信息报文中包含所述POP服务器维护的地址信息表,并且所述地址信息表中的各个MAC地址,依次被作为所述欺骗报文的源地址。
  11. 根据权利要求8所述的方法,其特征在于,接收所述交换机反馈的欺骗报文,并丢弃所述欺骗报文包括:
    当接收到所述交换机发来的数据报文时,判断所述数据报文中的类型字段是否为指定赋值,若是,判定所述数据报文为所述另一个POP服务器构建的欺骗报文,并丢弃所述欺骗报文。
  12. 根据权利要求8所述的方法,其特征在于,所述方法还包括:
    当二层隧道从所述另一个POP服务器切换至所述POP服务器时,接收所述交换机转发的所述另一个POP服务器的地址信息报文;
    识别所述另一个POP服务器的地址信息报文中携带的地址信息表,并基于识别出的所述地址信息表构建欺骗报文;其中,识别出的所述地址信息表中的各个MAC地址被依次作为构建的各个所述欺骗报文的源地址;
    将构建的所述欺骗报文发送至所述交换机,以使得所述交换机根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新所述交换机本地的地址信息表。
  13. 根据权利要求12所述的方法,其特征在于,基于识别出的所述地址信息表构建欺骗报文包括:
    确定用于表征欺骗报文的指定赋值,并将所述指定赋值填充至所述欺骗报文的类型字段中;
    将识别出的所述地址信息表中的MAC地址作为所述欺骗报文的源地址,并将所述另一个POP服务器的MAC地址作为所述欺骗报文的目的地址,其中,所述欺骗报文的类型字段中的所述指定赋值,与所述地址信息报文的类型字段中的赋值不同。
  14. 根据权利要求8所述的方法,其特征在于,基于所述地址信息表构建地址信息报文包括:
    从所述地址信息表中识别出与二层隧道相连的目标端口的源地址映射信息,并将所述目标端口的源地址映射信息构建为地址信息报文;
    或者
    从所述地址信息表中识别出各个端口的源地址映射信息,并将识别出的各个所述源地址映射信息构建为地址信息报文,并在所述地址信息报文中添加各个所述源地址映射信息对应的端口标识,以使得所述另一个POP服务器根据添加的端口标识,从所述地址信息报文中识别出所述POP服务器与二层隧道相连的目标端口的源地址映射信息,并根据所述目标端口的源地址映射信息构建欺骗报文。
  15. 一种POP服务器,其特征在于,所述POP服务器包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求8至14中任一所述的方法。
  16. 一种二层隧道的切换方法,其特征在于,所述方法应用于交换机中,所述交换机分别与第一POP服务器和第二POP服务器相连;所述方法包括:
    当二层隧道从所述第一POP服务器切换至所述第二POP服务器时,接收所述第一POP服务器发来的地址信息报文,并将所述地址信息报文转发至所述第二POP服务器;
    接收所述第二POP服务器发来的基于所述地址信息报文构建的欺骗报文,并根据接收所述欺骗报文的端口以及所述欺骗报文中的源地址,更新本地的地址信息表,使得在接收到以所述源地址为目的地址的数据报文时,基于所述更新后的地址信息表,将所述数据报文转发给所述第二POP服务器。
  17. 根据权利要求16所述的方法,其特征在于,所述地址信息报文为单播报文,并且所述地址信息报文中的目的地址指向所述第二POP服务器;以及所述欺骗报文为单播报文,并且所述欺骗报文中的目的地址指向所述第一POP服务器,以使得所述交换机在接收到所述欺骗报文时,将所述欺骗报文转发至所述第一POP服务器。
  18. 根据权利要求16所述的方法,其特征在于,所述第一POP服务器发来的地址信息报文中包含所述第一POP服务器维护的地址信息表,并且所述地址信息表中的各个MAC地址,依次被作为所述欺骗报文的源地址。
  19. 根据权利要求16或18所述的方法,其特征在于,所述交换机通过第一端口与所述第一POP服务器相连,并且通过第二端口与所述第二POP服务器相连;更新本地的地址信息表包括:
    将所述本地的地址信息表中原本记录的所述第一端口与各个所述源地址的映射关系,修改为所述第二端口与各个所述源地址的映射关系。
  20. 一种交换机,其特征在于,所述交换机包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求16至19中任一所述的方法。
PCT/CN2019/110773 2019-09-04 2019-10-12 一种二层隧道的切换方法、系统及设备 WO2021042446A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US17/640,329 US20220345402A1 (en) 2019-09-04 2019-10-12 Method, system, and device for switching layer 2 tunnel
EP19944054.6A EP4012976A1 (en) 2019-09-04 2019-10-12 Layer-two tunnel switching method, system, and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910831978.5A CN110708249B (zh) 2019-09-04 2019-09-04 一种二层隧道的切换方法、系统及设备
CN201910831978.5 2019-09-04

Publications (1)

Publication Number Publication Date
WO2021042446A1 true WO2021042446A1 (zh) 2021-03-11

Family

ID=69194299

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/110773 WO2021042446A1 (zh) 2019-09-04 2019-10-12 一种二层隧道的切换方法、系统及设备

Country Status (4)

Country Link
US (1) US20220345402A1 (zh)
EP (1) EP4012976A1 (zh)
CN (1) CN110708249B (zh)
WO (1) WO2021042446A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220321479A1 (en) * 2021-04-02 2022-10-06 Microsoft Technology Licensing, Llc Anycast routing technique for a content delivery network

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909494A (zh) * 2006-08-24 2007-02-07 华为技术有限公司 一种用户网络边缘设备双归属或多归属的实现方法及系统
CN101848161A (zh) * 2010-05-31 2010-09-29 杭州华三通信技术有限公司 一种mpls l2vpn和mpls l3vpn的通信方法和设备
CN103001868A (zh) * 2012-12-31 2013-03-27 杭州华三通信技术有限公司 用于虚拟路由器冗余协议备份组同步arp表项的方法和装置
US9154413B2 (en) * 2012-06-21 2015-10-06 Breakingpoint Systems, Inc. High-speed CLD-based pipeline architecture

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1763204B1 (en) * 2005-09-13 2013-12-04 Unify GmbH & Co. KG System and method for redundant switches taking into account learning bridge functionality
CN101022390B (zh) * 2007-03-21 2010-07-28 华为技术有限公司 一种对双归接入的rrpp环网的保护方法、系统和设备
CN101330424B (zh) * 2007-06-18 2011-11-02 华为技术有限公司 一种虚拟专用网服务故障处理的方法、系统及装置
US20190260671A1 (en) * 2018-02-20 2019-08-22 Ciena Corporation Ethernet protection systems and methods with fast traffic recovery eliminating flooding, learning, and flushing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909494A (zh) * 2006-08-24 2007-02-07 华为技术有限公司 一种用户网络边缘设备双归属或多归属的实现方法及系统
CN101848161A (zh) * 2010-05-31 2010-09-29 杭州华三通信技术有限公司 一种mpls l2vpn和mpls l3vpn的通信方法和设备
US9154413B2 (en) * 2012-06-21 2015-10-06 Breakingpoint Systems, Inc. High-speed CLD-based pipeline architecture
CN103001868A (zh) * 2012-12-31 2013-03-27 杭州华三通信技术有限公司 用于虚拟路由器冗余协议备份组同步arp表项的方法和装置

Also Published As

Publication number Publication date
CN110708249B (zh) 2021-04-02
EP4012976A1 (en) 2022-06-15
CN110708249A (zh) 2020-01-17
US20220345402A1 (en) 2022-10-27

Similar Documents

Publication Publication Date Title
US11240066B2 (en) System and method for distributed flow state P2P setup in virtual networks
CN107948076B (zh) 一种转发报文的方法及装置
EP3379806B1 (en) Packet processing method, related apparatus and nvo3 network system
US9749230B2 (en) Method of sending address correspondence in a second layer protocol of applying link state routing
US9537793B2 (en) Ensuring any-to-any reachability with opportunistic layer 3 forwarding in massive scale data center environments
US9825861B2 (en) Packet forwarding method, apparatus, and system
US20130259050A1 (en) Systems and methods for multi-level switching of data frames
EP3035592B1 (en) Enhanced protocol independent multicast source registration over a reliable transport
US10187293B2 (en) Apparatus and method for multicast data packet forwarding
WO2018214809A1 (zh) 消息发送方法及装置、存储介质
WO2021042445A1 (zh) 一种二层专线网络系统、配置方法及设备
US9781036B2 (en) Emulating end-host mode forwarding behavior
CN109196842B (zh) 一种会话保持方法、设备及存储介质
CN107547346B (zh) 一种报文传输方法和装置
US10904202B2 (en) Packet routing using a network device
CN107566262A (zh) 虚拟可扩展局域网vxlan中报文转发方法及装置
WO2021042446A1 (zh) 一种二层隧道的切换方法、系统及设备
US11997005B2 (en) BIER overlay signaling enhancement
CN110620715B (zh) 虚拟扩展局域网通信方法、隧道端点和控制器
US20220345519A1 (en) PFCP Session Load Balancer
WO2015188706A1 (zh) 数据帧的处理方法、装置与系统
CN108540343B (zh) 路径的检测方法及装置
CN106452992B (zh) 一种远端多归属组网的实现方法及装置
US20240146556A1 (en) Multicast traffic forwarding in overlay networks
CN105099941B (zh) 一种报文处理方法及装置

Legal Events

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

Ref document number: 19944054

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019944054

Country of ref document: EP

Effective date: 20220308