WO2019129236A1 - Tunnel-based data transmission method and device - Google Patents

Tunnel-based data transmission method and device Download PDF

Info

Publication number
WO2019129236A1
WO2019129236A1 PCT/CN2018/125039 CN2018125039W WO2019129236A1 WO 2019129236 A1 WO2019129236 A1 WO 2019129236A1 CN 2018125039 W CN2018125039 W CN 2018125039W WO 2019129236 A1 WO2019129236 A1 WO 2019129236A1
Authority
WO
WIPO (PCT)
Prior art keywords
tunnel
packet
outer ring
loopback
mac address
Prior art date
Application number
PCT/CN2018/125039
Other languages
French (fr)
Chinese (zh)
Inventor
张平平
陈志伟
夏迎春
孙军欢
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2019129236A1 publication Critical patent/WO2019129236A1/en

Links

Images

Classifications

    • 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
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/82Miscellaneous aspects
    • H04L47/825Involving tunnels, e.g. MPLS

Definitions

  • the present disclosure relates to the field of communication technologies, for example, to a method and apparatus for transmitting data based on a tunnel.
  • Tunneling is a tunneling protocol implementation that uses the infrastructure of the Internet to transfer data between networks, following the standards of organizations such as the Institute of Electrical and Electronics Engineers (IEEE).
  • the data (or load) delivered using tunneling techniques can be data frames or packets of different protocols.
  • the tunneling protocol re-encapsulates data frames or packets of other protocols and then sends them through the tunnel.
  • the new data frame header provides routing information to pass the encapsulated payload data over the Internet.
  • Typical tunneling technologies include: Multi-Protocol Label Switching (MPLS), Virtual Extensible Local Area Network (VXLAN), and Transparent Interconnection of Lots of Links (TRILL).
  • MPLS Multi-Protocol Label Switching
  • VXLAN Virtual Extensible Local Area Network
  • TRILL Transparent Interconnection of Lots of Links
  • the underlying network is the network of the basic forwarding structure of the data center network. It is the physical foundation layer. As long as the data between the two points of the data center network is reachable, the basic network contains all relevant traditional network technologies.
  • Overlay network (Overlay network) is a virtualized framework superimposed on the network architecture. It is constructed by logical nodes and logical links. It has independent control plane and forwarding plane.
  • the Overlay network implements the bearer of the application layer on the Underlay network, and realizes the separation of services from other networks, and realizes the attempt to extend the physical network to the cloud and the virtualized network, so that the cloud resource pooling capability can get rid of the physical network. Restrictions to achieve cloud network convergence.
  • Equal-Cost Multi-path Routing is a routing technology.
  • the data packet destined for the destination address can only use one of the links, and the other links are in the backup state or inactive state.
  • ECMP can use multiple links simultaneously in the network environment, which not only increases the transmission bandwidth, but also backs up the data of the failed link without delay and without packet loss. transmission.
  • the biggest feature of ECMP is that it achieves the goal of multipath load balancing and link backup in the case of equal value.
  • ECMP is basically supported in static routing and Open Shortest Path First (OSPF).
  • OSPF Open Shortest Path First
  • the embodiments of the present disclosure provide a method and an apparatus for transmitting data based on a tunnel, which can provide a tunnel transmission scheme in an equal-cost multi-path routing protocol scenario, and reduce multi-port forwarding while reducing tunnel resources in an underlying chip of the overlay network device. Quantity.
  • an embodiment of the present disclosure provides a method for transmitting data based on a tunnel, including:
  • the tunnel is encapsulated in the overlay network, and the exit of the tunnel is set as a loopback interface.
  • the loopback of the packet encapsulated by the tunnel is performed on the loopback interface
  • the ECMP routing table of the equivalent multipath routing protocol is obtained according to the destination Internet Protocol (IP) address of the packet encapsulated by the tunnel, and multiple next hop IP addresses are obtained.
  • IP Internet Protocol
  • the packet encapsulated by the tunnel is forwarded by multiple forwarding ports corresponding to the multiple next hop IP addresses.
  • an embodiment of the present disclosure provides an apparatus for transmitting data based on a tunnel, including:
  • the tunnel encapsulation module is configured to encapsulate the packet in the overlay network and set the exit of the tunnel as a loopback interface.
  • the loopback module is configured to perform loopback on the packet encapsulated by the tunnel in the loopback interface, and send the packet encapsulated by the tunnel to the route forwarding module.
  • the routing and forwarding module is configured to obtain a plurality of next hop IP addresses according to the destination IP address of the packet encapsulated by the tunnel, and obtain a plurality of next hop IP addresses according to the destination IP address of the packet encapsulated by the tunnel.
  • the packets encapsulated by the tunnel are forwarded through multiple forwarding ports corresponding to the multiple next hop IP addresses.
  • Figure 1 is a schematic diagram of creating a VXLAN tunnel in an ECMP scenario
  • FIG. 2 is a flowchart of a method for transmitting data based on a tunnel according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of an apparatus for transmitting data based on a tunnel according to an embodiment of the present disclosure
  • Example 4 is a flowchart of a method for implementing data transmission based on a tunnel in an internal loopback manner according to Example 1 of the present disclosure
  • Example 5 is a flowchart of a method for implementing data transmission based on a tunnel in an external loopback manner according to Example 2 of the present disclosure
  • Example 6 is a schematic diagram of creating a tunnel in an overlay network in Example 3 of the present disclosure.
  • an embodiment of the present disclosure provides a method for transmitting data based on a tunnel, including:
  • Step 210 Tunnel the packet in the overlay network, and set the exit of the tunnel as a loopback.
  • Step 220 Perform loopback on the packet encapsulated by the tunnel in the loopback interface in the basic network.
  • Step 230 In the basic network, searching for the ECMP routing table of the equivalent multipath routing protocol to obtain multiple next hop IP addresses according to the destination IP address of the packet encapsulated by the tunnel, and the The packet encapsulated by the tunnel is forwarded by multiple forwarding ports corresponding to the multiple next hop IP addresses.
  • the method before the setting of the exit of the tunnel as a loopback, the method further includes:
  • MAC media access control
  • the setting the outlet of the tunnel as a loopback includes: setting an outlet of the tunnel as an inner ring.
  • loopback is performed on the tunnel encapsulated packet at the loopback end, including:
  • the method before the setting of the exit of the tunnel as a loopback, the method further includes:
  • VRF Virtual Routing Forwarding-instance
  • VRF2 Virtual Routing Forwarding-instance
  • the ECMP route in the VRF2 is imported into the VRF1, and the MAC address offset is configured for the first outer ring interface.
  • the MAC address offset is used to send the packet to the first outer ring interface.
  • the source MAC address and destination MAC address are different.
  • the setting the outlet of the tunnel as a loopback includes: setting an outlet of the tunnel as a first outer ring.
  • the loopback is performed on the packet encapsulated by the tunnel at the loopback end, including:
  • the tunneling the packet includes:
  • the service feature of the packet includes at least one of the following: a destination IP address of the packet, and a destination MAC address of the packet;
  • the encapsulation rules include: a multi-protocol label switching MPLS encapsulation rule, a virtual extensible local area network VXLAN encapsulation rule, or a multi-link transparent interconnection TRILL encapsulation rule.
  • the inner ring port is a high bandwidth port or a port group formed by multi-port link bundling.
  • the first outer ring port is a high bandwidth port or a port group formed by multi-port link bundling; the second outer ring port is a high bandwidth port or is formed by bundling a multi-port link. Port group.
  • the multiple tunnel resources in the underlying chip of the network device can be reduced to a tunnel resource in the technical solution of the embodiment, and the basis is (Underlay)
  • the network can forward packets to multiple forwarding outlets by searching multiple next hops of the ECMP route, so as to implement forwarding performance of multiple tunnels in the overlay network.
  • an embodiment of the present disclosure provides an apparatus for transmitting data based on a tunnel, including:
  • the tunnel encapsulation module 310 is configured to tunnel the packet in the overlay network and set the exit of the tunnel as a loopback port.
  • the loopback module 320 is configured to perform loopback on the packet encapsulated by the tunnel in the loopback interface, and send the packet encapsulated by the tunnel to the route forwarding module.
  • the routing and forwarding module 330 is configured to obtain, according to the destination IP address of the packet encapsulated by the tunnel, the EPO routing table of the equivalent multipath routing protocol to obtain multiple next hop IP addresses in the basic network, The packet encapsulated by the tunnel is forwarded by multiple forwarding ports corresponding to the multiple next hop IP addresses.
  • the apparatus further includes a first configuration module
  • the first configuration module is configured to establish an inner ring interface, and configure a medium access control MAC address offset for the inner ring port; wherein the MAC address offset is used to send the inner ring port
  • the source MAC address and destination MAC address of the packet are different.
  • the tunnel encapsulation module 310 is configured to set the outlet of the tunnel as an inner ring.
  • the loopback module 320 is configured to send the packet encapsulated by the tunnel to the inner ring port and receive the packet back from the inner ring port.
  • the device further includes a second configuration module
  • the second configuration module is configured to establish a first outer ring mouth and a second outer ring port, and directly connect the first outer ring port and the second outer ring port; Joining the first virtual routing forwarding instance VRF1, adding the second outer ring interface to the second virtual routing forwarding instance VRF2; recording the statically configured or dynamically learned ECMP routing in the routing table in the VRF2, and The ECMP route in the VRF2 is imported into the VRF1, and the MAC address offset is configured for the first outer ring interface. The MAC address offset is used to send the packet to the first outer ring interface.
  • the source MAC address and destination MAC address are different.
  • the tunnel encapsulation module 310 is configured to set the outlet of the tunnel as a first outer ring.
  • the loopback module 320 is configured to send the packet encapsulated by the tunnel to the first outer ring interface, and receive the packet from the second outer ring port.
  • the tunnel encapsulation module 310 is configured to tunnel encapsulate the packet according to a service feature corresponding to the service feature according to a service feature of the packet.
  • the service feature of the packet includes at least one of the following: a destination IP address of the packet, and a destination MAC address of the packet;
  • the encapsulation rules include: a multi-protocol label switching MPLS encapsulation rule, a virtual extensible local area network VXLAN encapsulation rule, or a multi-link transparent interconnection TRILL encapsulation rule.
  • the inner ring port is a high bandwidth port or a port group formed by multi-port link bundling
  • the first outer ring port is a high bandwidth port or a port group formed by multi-port link bundling; the second outer ring port is a high bandwidth port or is formed by bundling a multi-port link. Port group.
  • the multiple tunnel resources in the underlying chip of the network device can be reduced to a tunnel resource in the technical solution of the embodiment, and the basis is By looking up multiple next hops of an ECMP route, the network can forward packets out of multiple forwarding outlets to achieve the forwarding performance of multiple tunnels in an overlay network.
  • tunneling data based on the present application is illustrated by some examples below.
  • This example provides an internal loopback mode to implement data transmission based on tunnels in an ECMP scenario.
  • the tunnel encapsulation module encapsulates the tunnel information in the tunnel encapsulation module
  • the packet is sent to the inner ring interface.
  • the inner ring interface is reached, it is looped back into the routing and forwarding module.
  • the ECMP route is searched in the forwarding module.
  • the last packet is forwarded from the forwarding port corresponding to multiple next hops of the ECMP route.
  • the tunnel-based data transmission method of this example may include the following steps:
  • Step 401 Specify an inner ring interface of the switching device globally.
  • a port is selected as an inner ring port on the switching device; the packet sent from the inner ring port can be received back from the inner ring port; and the MAC address offset of the inner ring port is configured.
  • the next hop of the tunnel is the loopback of the local device. If the MAC address offset is not configured, the source and destination MAC addresses of the packets encapsulated by the tunnel encapsulation module are the same. Considering bandwidth and reliability requirements, you can set up a link aggregation (smartgroup) to implement multi-port link bundling to meet the forwarding requirements of high-bandwidth traffic.
  • Step 402 The route forwarding module learns the ECMP route according to the dynamic routing protocol.
  • Step 403 The tunnel encapsulation module encapsulates the packet and sets the exit of the tunnel as an inner ring interface.
  • Step 404 After the message is sent to the inner ring port, it is received back from the inner ring port through the loopback.
  • Step 405 The routing and forwarding module forwards the received packet from the inner ring interface, queries the ECMP route to obtain multiple next hop IP addresses, and forwards the packet from multiple forwarding ports corresponding to multiple next hop IP addresses. .
  • This example provides an external loopback mode to implement tunnel-based data transmission in an ECMP scenario.
  • VRFs Virtual Forwarding Routes
  • the tunnel-based data transmission method of this example may include the following steps:
  • Step 501 the two outer ring ports (the first outer ring port and the second outer ring port) of the switching device are specified, and the two outer ring ports are directly connected externally, and two VRFs (VRF1 and VRF2) are configured to be the first outer ring. Add VRF1 to the port and add the second outer ring to VRF2.
  • step 502 the ECMP route is learned in the VRF2, and the route of the VRF2 is imported into the VRF1.
  • Step 503 The tunnel encapsulation module encapsulates the packet and sets the exit of the tunnel as the first outer ring interface.
  • Step 504 After the packet is sent to the first outer ring interface, the packet is sent out from the first outer ring port and received from the second outer ring port.
  • Step 505 The route forwarding module receives the packet from the second outer ring interface, queries the ECMP route to obtain multiple next hop IP addresses, and sends the packet from multiple forwarding ports corresponding to multiple next hop IP addresses. Forward it out.
  • This example provides an external loopback method for implementing data transmission based on a VXLAN tunnel, and may include the following steps:
  • Step 1 Configure or learn ECMP routes in VRF2.
  • the first outer ring interface is added to VRF1, and the second outer ring port is added to VRF2.
  • the first outer ring port and the second outer ring port are directly connected.
  • the ECMP route points to multiple next hop outlets.
  • the first outer ring port and the second outer ring port can select high-bandwidth physical ports, or link aggregation (multi-port) through link aggregation (smartgroup) to meet the forwarding requirements of high-bandwidth traffic.
  • Step 2 Routing mutual routing between VRF1 and VRF2.
  • Step 3 Configure the MAC address offset of the Layer 3 interface corresponding to the first outer ring interface in VRF1 to prevent the source MAC (SMAC) of the encapsulated packets from being equal to the destination MAC (DMA).
  • SMAC source MAC
  • DMA destination MAC
  • Step 4 When the tunnel encapsulation module receives the dynamic protocol or statically sends the VXLAN tunnel, the outbound port of the tunnel is specified according to the routing information in VRF1, and the egress port is the first outer ring interface, so that the tunnel encapsulation module is encapsulated. After that, the packet is sent to the first outer ring interface and the source MAC address of the packet is the address after the MAC offset is set.
  • Step 5 The packet is sent out from the first outer ring interface and received from the second outer ring interface.
  • the route forwarding module performs packet feature matching in the VRF2, and queries the ECMP route to obtain multiple next hop IP addresses.
  • the forwarding port corresponding to the next hop IP address forwards the packet.
  • FIG. 6 is a schematic diagram of creating a tunnel in an overlay network.
  • the method for implementing data transmission of other tunneling protocols in the external loopback mode is similar to the present example, except that the encapsulation rules used by the tunnel encapsulation module to encapsulate packets are different, for example, data transmission for the MPLS protocol, tunnel
  • the encapsulation module encapsulates the tunnel header based on the MPLS protocol, and the loopback processing and ECMP routing and forwarding are the same as the present example.
  • This example provides a method for implementing data transmission based on a vxlan tunnel in an inner loop manner, which may include the following steps:
  • Step 1 Specify the inner ring port globally.
  • a high-bandwidth physical port or a high-bandwidth and high-reliability link aggregation group can be selected as the internal loopback port.
  • This example selects the smartgroup group as the internal ringback port. First, configure the smartgroup group, add the ports to the smartgroup group, and then enable the smartgroup group to be in inner ring mode.
  • Step 2 Configure a routing interface on the smartgroup group to enable Layer 3 forwarding of the smartgroup group.
  • the packet is sent to the inner ring interface after being encapsulated by the tunnel encapsulation module.
  • the loopback packet is forwarded to the ECMP route in the routing and forwarding module. Therefore, the smartgroup is enabled with the Layer 3 function.
  • Step 3 The route forwarding module learns the ECMP route according to the dynamic routing protocol.
  • Step 4 When the tunnel encapsulation module receives the dynamic protocol or the static configuration, the egress is set to the inner ring interface. After the tunnel encapsulation module is encapsulated, the packet is sent to the inner ring interface and the packet is sent.
  • the source MAC address is the address after the MAC offset is set.
  • Step 5 The packet is sent out from the inner ring interface, and then received from the inner ring interface.
  • the route forwarding module queries the ECMP route to obtain multiple next hop IP addresses, and multiple forwarding ports corresponding to multiple next hop IP addresses will be used. The message is forwarded.
  • the three-layer forwarding of packets is shared from different ports, which can achieve the forwarding performance of multiple tunnels in the overlay network.
  • the tunnel exit is Inner ring mouth.
  • the method for implementing data transmission of other tunneling protocols by using the inner ring mode is similar to the present example, except that the encapsulation rules used by the tunnel encapsulating module to encapsulate the packet are different, for example, data transmission for the MPLS protocol, tunnel encapsulation.
  • the module encapsulates the tunnel header based on the MPLS protocol, and the loopback processing and ECMP routing and forwarding are the same as this example.
  • the method and the device for transmitting data based on the tunnel are provided in the embodiment of the present disclosure.
  • the technical solution of the embodiment of the present disclosure can implement multi-port forwarding in the scenario of the basic network application ECMP technology while reducing the overlay network device.

Abstract

Disclosed by the present document is a tunnel-based data transmission method, comprising: in an overlay network, encapsulating a message in a tunnel, and configuring an outlet of the tunnel as a loopback port; in a basic network, looping back the message encapsulated in the tunnel at the loopback port, searching for an equal-cost multi-path (ECMP) routing protocol ECMP routing table according to a destination Internet Protocol (IP) address of the message encapsulated in the tunnel so as to obtain a plurality of next hop IP addresses, and forwarding the message encapsulated in the tunnel by means of a plurality of forwarding ports corresponding to the plurality of next hop IP addresses. Also disclosed by the present document is a tunnel-based data transmission device.

Description

基于隧道传输数据的方法及装置Method and device for transmitting data based on tunnel
本申请要求在2017年12月29日提交中国专利局、申请号为201711470852.7的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. PCT Application No. No. No. No.
技术领域Technical field
本公开涉及通信技术领域,例如涉及一种基于隧道传输数据的方法及装置。The present disclosure relates to the field of communication technologies, for example, to a method and apparatus for transmitting data based on a tunnel.
背景技术Background technique
隧道技术(Tunneling)是一种通过使用互联网络的基础设施在网络之间传递数据的方式,遵循电气和电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)等组织标准的隧道协议实现。使用隧道技术传递的数据(或负载)可以是不同协议的数据帧或包。隧道协议将其它协议的数据帧或包重新封装,然后通过隧道发送。新的数据帧头提供路由信息,以便通过互联网传递被封装的负载数据。典型的隧道技术包括:多协议标签交换(Multi-Protocol Label Switching,MPLS)、虚拟可扩展局域网(Virtual Extensible Local Area Network,VXLAN)、多链接透明互联(Transparent Interconnection of Lots of Links,TRILL)等。Tunneling (Tunneling) is a tunneling protocol implementation that uses the infrastructure of the Internet to transfer data between networks, following the standards of organizations such as the Institute of Electrical and Electronics Engineers (IEEE). The data (or load) delivered using tunneling techniques can be data frames or packets of different protocols. The tunneling protocol re-encapsulates data frames or packets of other protocols and then sends them through the tunnel. The new data frame header provides routing information to pass the encapsulated payload data over the Internet. Typical tunneling technologies include: Multi-Protocol Label Switching (MPLS), Virtual Extensible Local Area Network (VXLAN), and Transparent Interconnection of Lots of Links (TRILL).
基础网络(Underlay网络),是数据中心网络基础转发架构的网络,是物理基础层,只要数据中心网络任意两点之间路由可达,基础网络包含了一切相关的传统网络技术。叠加网络(Overlay网络)则是一种网络架构上叠加的虚拟化框架,是由逻辑节点和逻辑链路构建的,它具备独立的的控制层面和转发层面。Overlay网络实现了在Underlay网络上对应用层的承载,而且实现了与其它网络的业务分离,实现了物理网络向云和虚拟化网的尝试延伸,使云资源池化能力可以摆脱物理网络的重重限制,实现云网融合。The underlying network (Underlay network) is the network of the basic forwarding structure of the data center network. It is the physical foundation layer. As long as the data between the two points of the data center network is reachable, the basic network contains all relevant traditional network technologies. Overlay network (Overlay network) is a virtualized framework superimposed on the network architecture. It is constructed by logical nodes and logical links. It has independent control plane and forwarding plane. The Overlay network implements the bearer of the application layer on the Underlay network, and realizes the separation of services from other networks, and realizes the attempt to extend the physical network to the cloud and the virtualized network, so that the cloud resource pooling capability can get rid of the physical network. Restrictions to achieve cloud network convergence.
等值多路径路由协议(Equal-Cost Multi-path Routing,ECMP)是一种路由技术。在存在多条不同链路到达同一目的地址的网络环境中,如果使用传统的路由技术,发往该目的地址的数据包只能利用其中的一条链路,其它链路处于备份状态或无效状态,并且在动态路由环境下相互的切换要花费一定时间,而ECMP可以在该网络环境下同时使用多条链路,不仅增加了传输带宽,并且可以无时延无丢包地备份失效链路的数据传输。ECMP最大的特点是实现了等值 情况下,多路径负载均衡和链路备份的目的,在静态路由和开放式最短路径优先(Open Shortest Path First,OSPF)中基本上都支持ECMP功能。Equal-Cost Multi-path Routing (ECMP) is a routing technology. In a network environment where multiple different links reach the same destination address, if the traditional routing technology is used, the data packet destined for the destination address can only use one of the links, and the other links are in the backup state or inactive state. Moreover, it takes a certain time to switch between each other in a dynamic routing environment, and ECMP can use multiple links simultaneously in the network environment, which not only increases the transmission bandwidth, but also backs up the data of the failed link without delay and without packet loss. transmission. The biggest feature of ECMP is that it achieves the goal of multipath load balancing and link backup in the case of equal value. ECMP is basically supported in static routing and Open Shortest Path First (OSPF).
随着业务部署的增多,数据中心要建立的隧道的个数越来越多。如果Underlay网络应用ECMP技术,Overlay网络中建立隧道所需的硬件资源也会更多。如图1所示,在ECMP场景中创建VXLAN隧道时,要根据ECMP组中的每个下一跳对应的出口分别建立隧道,但是,芯片底层隧道的个数是有限的,所以限制了ECMP场景下Overlay网络支持的隧道数量。As the number of services deployed increases, the number of tunnels to be established in the data center is increasing. If the Underlay network applies ECMP technology, the hardware resources required to establish a tunnel in the Overlay network will be more. As shown in Figure 1, when a VXLAN tunnel is created in an ECMP scenario, tunnels are set up according to the egress corresponding to each next hop in the ECMP group. However, the number of underlying tunnels is limited, so the ECMP scenario is limited. The number of tunnels supported by the Overlay network.
发明内容Summary of the invention
本公开实施例提供一种基于隧道传输数据的方法及装置,能够提供一种等值多路径路由协议场景下的隧道传输方案,在实现多端口转发的同时减少叠加网络设备底层芯片中的隧道资源数量。The embodiments of the present disclosure provide a method and an apparatus for transmitting data based on a tunnel, which can provide a tunnel transmission scheme in an equal-cost multi-path routing protocol scenario, and reduce multi-port forwarding while reducing tunnel resources in an underlying chip of the overlay network device. Quantity.
在一实施例中,本公开实施例提供一种基于隧道传输数据的方法,包括:In an embodiment, an embodiment of the present disclosure provides a method for transmitting data based on a tunnel, including:
在叠加网络中对报文进行隧道封装,将隧道的出口设置为环回口;The tunnel is encapsulated in the overlay network, and the exit of the tunnel is set as a loopback interface.
在基础网络中,在所述环回口对经过所述隧道封装的报文进行环回;In the basic network, the loopback of the packet encapsulated by the tunnel is performed on the loopback interface;
在所述基础网络中,根据所述经过所述隧道封装的报文的目的互联网协议(Internet Protocol,IP)地址,查找等值多路径路由协议ECMP路由表获得多个下一跳IP地址,将所述经过所述隧道封装的报文通过所述多个下一跳IP地址对应的多个转发口转发出去。In the basic network, the ECMP routing table of the equivalent multipath routing protocol is obtained according to the destination Internet Protocol (IP) address of the packet encapsulated by the tunnel, and multiple next hop IP addresses are obtained. The packet encapsulated by the tunnel is forwarded by multiple forwarding ports corresponding to the multiple next hop IP addresses.
在一实施例中,本公开实施例提供一种基于隧道传输数据的装置,包括:In an embodiment, an embodiment of the present disclosure provides an apparatus for transmitting data based on a tunnel, including:
隧道封装模块,设置为在叠加网络中对报文进行隧道封装,将隧道的出口设置为环回口;The tunnel encapsulation module is configured to encapsulate the packet in the overlay network and set the exit of the tunnel as a loopback interface.
环回模块,设置为在基础网络中,在所述环回口对经过所述隧道封装的报文进行环回,并将所述经过所述隧道封装的报文发送给路由转发模块;The loopback module is configured to perform loopback on the packet encapsulated by the tunnel in the loopback interface, and send the packet encapsulated by the tunnel to the route forwarding module.
所述路由转发模块,设置为在基础网络中,根据所述经过所述隧道封装的报文的目的IP地址查找等值多路径路由协议ECMP路由表获得多个下一跳IP地址,将所述经过所述隧道封装的报文通过所述多个下一跳IP地址对应的多个转发口转发出去。The routing and forwarding module is configured to obtain a plurality of next hop IP addresses according to the destination IP address of the packet encapsulated by the tunnel, and obtain a plurality of next hop IP addresses according to the destination IP address of the packet encapsulated by the tunnel. The packets encapsulated by the tunnel are forwarded through multiple forwarding ports corresponding to the multiple next hop IP addresses.
附图说明DRAWINGS
图1为ECMP场景下创建VXLAN隧道的示意图;Figure 1 is a schematic diagram of creating a VXLAN tunnel in an ECMP scenario;
图2为本公开实施例提供的一种基于隧道传输数据的方法流程图;FIG. 2 is a flowchart of a method for transmitting data based on a tunnel according to an embodiment of the present disclosure;
图3为本公开实施例提供的一种基于隧道传输数据的装置的结构示意图;FIG. 3 is a schematic structural diagram of an apparatus for transmitting data based on a tunnel according to an embodiment of the present disclosure;
图4为本公开示例1提供的一种内部环回方式实现基于隧道传输数据的方法流程图;4 is a flowchart of a method for implementing data transmission based on a tunnel in an internal loopback manner according to Example 1 of the present disclosure;
图5为本公开示例2提供的一种外部环回方式实现基于隧道传输数据的方法流程图;5 is a flowchart of a method for implementing data transmission based on a tunnel in an external loopback manner according to Example 2 of the present disclosure;
图6为本公开示例3中在叠加网络中创建隧道的示意图。6 is a schematic diagram of creating a tunnel in an overlay network in Example 3 of the present disclosure.
具体实施方式Detailed ways
实施例1Example 1
如图2所示,本公开实施例提供了一种基于隧道传输数据的方法,包括:As shown in FIG. 2, an embodiment of the present disclosure provides a method for transmitting data based on a tunnel, including:
步骤210,在叠加网络中对报文进行隧道封装,将隧道的出口设置为环回口。Step 210: Tunnel the packet in the overlay network, and set the exit of the tunnel as a loopback.
步骤220,在基础网络中,在所述环回口对经过所述隧道封装的报文进行环回。Step 220: Perform loopback on the packet encapsulated by the tunnel in the loopback interface in the basic network.
步骤230,在所述基础网络中,根据所述经过所述隧道封装的报文的目的IP地址,查找等值多路径路由协议ECMP路由表获得多个下一跳IP地址,将所述经过所述隧道封装的报文通过所述多个下一跳IP地址对应的多个转发口转发出去。Step 230: In the basic network, searching for the ECMP routing table of the equivalent multipath routing protocol to obtain multiple next hop IP addresses according to the destination IP address of the packet encapsulated by the tunnel, and the The packet encapsulated by the tunnel is forwarded by multiple forwarding ports corresponding to the multiple next hop IP addresses.
在一种实施方式中,在将隧道的出口设置为环回口之前,所述方法还包括:In an embodiment, before the setting of the exit of the tunnel as a loopback, the method further includes:
建立内环口,并为所述内环口配置媒体访问控制(Media Access Control,MAC)地址偏移量;其中,所述MAC地址偏移量用于使所述内环口发送出去的报文的源MAC地址和目的MAC地址不相同。Establishing an inner ring interface, and configuring a media access control (MAC) address offset for the inner ring port; wherein the MAC address offset is used to send the inner ring port The source MAC address and destination MAC address are different.
在一实施例中,所述将隧道的出口设置为环回口,包括:将所述隧道的出口设置为内环口。In an embodiment, the setting the outlet of the tunnel as a loopback includes: setting an outlet of the tunnel as an inner ring.
在一实施例中,在所述环回口对所述经过隧道封装的报文进行环回,包括:In an embodiment, loopback is performed on the tunnel encapsulated packet at the loopback end, including:
将所述经过所述隧道封装的报文在所述内环口发送出去,并重新从所述内环口接收回来。Transmitting the packet encapsulated by the tunnel to the inner ring port and receiving it back from the inner ring port.
在一种实施方式中,在将隧道的出口设置为环回口之前,所述方法还包括:In an embodiment, before the setting of the exit of the tunnel as a loopback, the method further includes:
建立第一外环口与第二外环口,并将所述第一外环口与所述第二外环口直连;将所述第一外环口加入第一虚拟路由转发实例(Virtual Routing Forwarding-instance,VRF)1,将所述第二外环口加入第二虚拟路由转发实例VRF2;将静态配置或动态学习的ECMP路由记录在所述VRF2内的路由表中,并将所述VRF2内的ECMP路由导入所述VRF1内;为所述第一外环口配置MAC地址偏移量;其中,所述MAC地址偏移量用于使所述第一外环口发送出去的报文的源MAC地址和目的MAC地址不相同。Establishing a first outer ring port and a second outer ring port, and directly connecting the first outer ring port to the second outer ring port; adding the first outer ring port to the first virtual route forwarding instance (Virtual Routing Forwarding-instance (VRF)1, adding the second outer ring interface to the second virtual route forwarding instance VRF2; recording the statically configured or dynamically learned ECMP route in the routing table in the VRF2, and The ECMP route in the VRF2 is imported into the VRF1, and the MAC address offset is configured for the first outer ring interface. The MAC address offset is used to send the packet to the first outer ring interface. The source MAC address and destination MAC address are different.
在一实施例中,所述将隧道的出口设置为环回口,包括:将所述隧道的出口设置为第一外环口。In an embodiment, the setting the outlet of the tunnel as a loopback includes: setting an outlet of the tunnel as a first outer ring.
在一实施例中,所述在所述环回口对所述经过所述隧道封装的报文进行环回,包括:In an embodiment, the loopback is performed on the packet encapsulated by the tunnel at the loopback end, including:
将所述经过所述隧道封装的报文在所述第一外环口发送出去,并从所述第二外环口接收回来。Transmitting the packet encapsulated by the tunnel to the first outer ring interface, and receiving the packet from the second outer ring port.
在一种实施方式中,所述对报文进行隧道封装,包括:In an implementation manner, the tunneling the packet includes:
根据报文的业务特征,使用与所述业务特征对应的封装规则对所述报文进行隧道封装;Decapsulating the packet by using an encapsulation rule corresponding to the service feature according to the service feature of the packet;
其中,所述报文的业务特征包括下述至少之一:所述报文的目的IP地址、所述报文的目的MAC地址;The service feature of the packet includes at least one of the following: a destination IP address of the packet, and a destination MAC address of the packet;
其中,所述封装规则包括:多协议标签交换MPLS封装规则、虚拟可扩展局域网VXLAN封装规则或多链接透明互联TRILL封装规则。The encapsulation rules include: a multi-protocol label switching MPLS encapsulation rule, a virtual extensible local area network VXLAN encapsulation rule, or a multi-link transparent interconnection TRILL encapsulation rule.
在一种实施方式中,所述内环口是高带宽端口或通过多端口链路捆绑形成的端口组。In an embodiment, the inner ring port is a high bandwidth port or a port group formed by multi-port link bundling.
在一种实施方式中,所述第一外环口是高带宽端口或通过多端口链路捆绑形成的端口组;所述第二外环口是高带宽端口或通过多端口链路捆绑形成的端 口组。In an embodiment, the first outer ring port is a high bandwidth port or a port group formed by multi-port link bundling; the second outer ring port is a high bandwidth port or is formed by bundling a multi-port link. Port group.
本实施例的技术方案,通过在叠加(Overlay)网络中设置隧道的出口为环回口,能够将网络设备底层芯片中的多条隧道资源减少为本实施例技术方案的一条隧道资源,而基础(Underlay)网络中通过查找ECMP路由的多个下一跳,能够将报文从多个转发出口转发出去,从而实现叠加(Overlay)网络中多条隧道的转发性能。In the technical solution of the embodiment, by setting the exit of the tunnel in the overlay network as a loopback port, the multiple tunnel resources in the underlying chip of the network device can be reduced to a tunnel resource in the technical solution of the embodiment, and the basis is (Underlay) The network can forward packets to multiple forwarding outlets by searching multiple next hops of the ECMP route, so as to implement forwarding performance of multiple tunnels in the overlay network.
实施例2Example 2
如图3所示,本公开实施例提供了一种基于隧道传输数据的装置,包括:As shown in FIG. 3, an embodiment of the present disclosure provides an apparatus for transmitting data based on a tunnel, including:
隧道封装模块310,设置为在叠加网络中对报文进行隧道封装,将隧道的出口设置为环回口。The tunnel encapsulation module 310 is configured to tunnel the packet in the overlay network and set the exit of the tunnel as a loopback port.
环回模块320,设置为在基础网络中,在所述环回口对经过所述隧道封装的报文进行环回,并将所述经过所述隧道封装的报文发送给路由转发模块。The loopback module 320 is configured to perform loopback on the packet encapsulated by the tunnel in the loopback interface, and send the packet encapsulated by the tunnel to the route forwarding module.
路由转发模块330,设置为在所述基础网络中,根据所述经过所述隧道封装的报文的目的IP地址,查找等值多路径路由协议ECMP路由表获得多个下一跳IP地址,将所述经过所述隧道封装的报文通过所述多个下一跳IP地址对应的多个转发口转发出去。The routing and forwarding module 330 is configured to obtain, according to the destination IP address of the packet encapsulated by the tunnel, the EPO routing table of the equivalent multipath routing protocol to obtain multiple next hop IP addresses in the basic network, The packet encapsulated by the tunnel is forwarded by multiple forwarding ports corresponding to the multiple next hop IP addresses.
在一种实施方式中,所述装置还包括第一配置模块;In an embodiment, the apparatus further includes a first configuration module;
所述第一配置模块,设置为建立内环口,并为所述内环口配置媒体访问控制MAC地址偏移量;其中,所述MAC地址偏移量用于使所述内环口发送出去的报文的源MAC地址和目的MAC地址不相同。The first configuration module is configured to establish an inner ring interface, and configure a medium access control MAC address offset for the inner ring port; wherein the MAC address offset is used to send the inner ring port The source MAC address and destination MAC address of the packet are different.
在一实施例中,隧道封装模块310是设置为将所述隧道的出口设置为内环口。In an embodiment, the tunnel encapsulation module 310 is configured to set the outlet of the tunnel as an inner ring.
环回模块320是设置为将所述经过所述隧道封装的报文在所述内环口发送出去,并重新从所述内环口接收回来。The loopback module 320 is configured to send the packet encapsulated by the tunnel to the inner ring port and receive the packet back from the inner ring port.
在一种实施方式中,所述装置还包括第二配置模块;In an embodiment, the device further includes a second configuration module;
所述第二配置模块,设置为建立第一外环口与第二外环口,并将所述第一外环口与所述第二外环口直连;将所述第一外环口加入第一虚拟路由转发实例 VRF1,将所述第二外环口加入第二虚拟路由转发实例VRF2;将静态配置或动态学习的ECMP路由记录在所述VRF2内的路由表中,并将所述VRF2内的ECMP路由导入所述VRF1内;为所述第一外环口配置MAC地址偏移量;其中,所述MAC地址偏移量用于使所述第一外环口发送出去的报文的源MAC地址和目的MAC地址不相同。The second configuration module is configured to establish a first outer ring mouth and a second outer ring port, and directly connect the first outer ring port and the second outer ring port; Joining the first virtual routing forwarding instance VRF1, adding the second outer ring interface to the second virtual routing forwarding instance VRF2; recording the statically configured or dynamically learned ECMP routing in the routing table in the VRF2, and The ECMP route in the VRF2 is imported into the VRF1, and the MAC address offset is configured for the first outer ring interface. The MAC address offset is used to send the packet to the first outer ring interface. The source MAC address and destination MAC address are different.
隧道封装模块310是设置为将所述隧道的出口设置为第一外环口。The tunnel encapsulation module 310 is configured to set the outlet of the tunnel as a first outer ring.
环回模块320是设置为将所述经过所述隧道封装的报文在所述第一外环口发送出去,并从所述第二外环口接收回来。The loopback module 320 is configured to send the packet encapsulated by the tunnel to the first outer ring interface, and receive the packet from the second outer ring port.
在一种实施方式中,隧道封装模块310是设置为根据报文的业务特征,使用与所述业务特征对应的封装规则对所述报文进行隧道封装;In an embodiment, the tunnel encapsulation module 310 is configured to tunnel encapsulate the packet according to a service feature corresponding to the service feature according to a service feature of the packet.
其中,所述报文的业务特征包括下述至少之一:所述报文的目的IP地址、所述报文的目的MAC地址;The service feature of the packet includes at least one of the following: a destination IP address of the packet, and a destination MAC address of the packet;
其中,所述封装规则包括:多协议标签交换MPLS封装规则、虚拟可扩展局域网VXLAN封装规则或多链接透明互联TRILL封装规则。The encapsulation rules include: a multi-protocol label switching MPLS encapsulation rule, a virtual extensible local area network VXLAN encapsulation rule, or a multi-link transparent interconnection TRILL encapsulation rule.
在一种实施方式中,所述内环口是高带宽端口或通过多端口链路捆绑形成的端口组;In an embodiment, the inner ring port is a high bandwidth port or a port group formed by multi-port link bundling;
在一种实施方式中,所述第一外环口是高带宽端口或通过多端口链路捆绑形成的端口组;所述第二外环口是高带宽端口或通过多端口链路捆绑形成的端口组。In an embodiment, the first outer ring port is a high bandwidth port or a port group formed by multi-port link bundling; the second outer ring port is a high bandwidth port or is formed by bundling a multi-port link. Port group.
本实施例的技术方案,通过在叠加(Overlay)网络中设置隧道的出口为环回口,能够将网络设备底层芯片中的多条隧道资源减少为本实施例技术方案的一条隧道资源,而基础(Underlay)网络中通过查找ECMP路由的多个下一跳,能够将报文从多个转发出口转发出去,从而达到叠加(Overlay)网络中多条隧道的转发性能。In the technical solution of the embodiment, by setting the exit of the tunnel in the overlay network as a loopback port, the multiple tunnel resources in the underlying chip of the network device can be reduced to a tunnel resource in the technical solution of the embodiment, and the basis is By looking up multiple next hops of an ECMP route, the network can forward packets out of multiple forwarding outlets to achieve the forwarding performance of multiple tunnels in an overlay network.
实施例3Example 3
下面通过一些示例说明本申请基于隧道传输数据的技术方案。The technical solution of tunneling data based on the present application is illustrated by some examples below.
示例1Example 1
本示例提供一种内部环回方式实现ECMP场景下基于隧道传输数据的方法。在隧道封装模块内指定隧道的出口为内环口,报文在隧道封装模块内封装隧道信息后就会被发送到内环口,到达内环口后又被环回进入路由转发模块,在路由转发模块内进行ECMP路由查找,最后报文从ECMP路由的多个下一跳对应的转发口转发出去。This example provides an internal loopback mode to implement data transmission based on tunnels in an ECMP scenario. After the tunnel encapsulation module encapsulates the tunnel information in the tunnel encapsulation module, the packet is sent to the inner ring interface. After the inner ring interface is reached, it is looped back into the routing and forwarding module. The ECMP route is searched in the forwarding module. The last packet is forwarded from the forwarding port corresponding to multiple next hops of the ECMP route.
如图4所示,本示例的基于隧道传输数据的方法,可以包括以下步骤:As shown in FIG. 4, the tunnel-based data transmission method of this example may include the following steps:
步骤401,全局指定交换设备的内环口;Step 401: Specify an inner ring interface of the switching device globally.
其中,在交换设备上选取某个端口作为内环口;从所述内环口发送出去的报文能够再从所述内环口接收回来;同时,配置该内环口的MAC地址偏移,因为隧道出口下一跳是本设备环回口,如果不配置MAC地址偏移会导致隧道封装模块封装出去的报文的源MAC和目的MAC一致而导致报文被交换芯片丢弃。考虑到带宽以及可靠性的要求,可设置链路聚合(smartgroup)实现多端口的链路捆绑,从而满足高带宽流量的转发需求。A port is selected as an inner ring port on the switching device; the packet sent from the inner ring port can be received back from the inner ring port; and the MAC address offset of the inner ring port is configured. The next hop of the tunnel is the loopback of the local device. If the MAC address offset is not configured, the source and destination MAC addresses of the packets encapsulated by the tunnel encapsulation module are the same. Considering bandwidth and reliability requirements, you can set up a link aggregation (smartgroup) to implement multi-port link bundling to meet the forwarding requirements of high-bandwidth traffic.
步骤402,路由转发模块根据动态路由协议学习ECMP路由。Step 402: The route forwarding module learns the ECMP route according to the dynamic routing protocol.
步骤403,隧道封装模块对报文进行隧道封装,将隧道的出口设置成内环口。Step 403: The tunnel encapsulation module encapsulates the packet and sets the exit of the tunnel as an inner ring interface.
步骤404,报文被发送到内环口后,经过环回从所述内环口接收回来。Step 404: After the message is sent to the inner ring port, it is received back from the inner ring port through the loopback.
步骤405,路由转发模块将从所述内环口接收回来的报文,查询ECMP路由得到多个下一跳IP地址,从多个下一跳IP地址对应的多个转发口将报文转发出去。Step 405: The routing and forwarding module forwards the received packet from the inner ring interface, queries the ECMP route to obtain multiple next hop IP addresses, and forwards the packet from multiple forwarding ports corresponding to multiple next hop IP addresses. .
示例2Example 2
本示例提供一种外部环回方式实现ECMP场景下基于隧道传输数据的方法。设置两个虚拟转发路由(Virtual Routing Forwarding,VRF),分别为VRF1和VRF2,然后选取两个外部端口分别属于这两个VRF,然后使能VRF1和VRF2的路由互导。This example provides an external loopback mode to implement tunnel-based data transmission in an ECMP scenario. Set two Virtual Forwarding Routes (VRFs), which are VRF1 and VRF2 respectively. Then select two external ports to belong to the two VRFs, and then enable routing mutual routing between VRF1 and VRF2.
如图5所示,本示例的基于隧道传输数据的方法,可以包括以下步骤:As shown in FIG. 5, the tunnel-based data transmission method of this example may include the following steps:
步骤501,指定交换设备的两个外环口(第一外环口和第二外环口),两个外环口外部直连,配置两个VRF(VRF1和VRF2),将第一外环口加入VRF1, 将第二外环口加入VRF2。 Step 501, the two outer ring ports (the first outer ring port and the second outer ring port) of the switching device are specified, and the two outer ring ports are directly connected externally, and two VRFs (VRF1 and VRF2) are configured to be the first outer ring. Add VRF1 to the port and add the second outer ring to VRF2.
步骤502,在VRF2内学习ECMP路由,将VRF2的路由导入VRF1内。In step 502, the ECMP route is learned in the VRF2, and the route of the VRF2 is imported into the VRF1.
步骤503,隧道封装模块对报文进行隧道封装,将隧道的出口设置成第一外环口。Step 503: The tunnel encapsulation module encapsulates the packet and sets the exit of the tunnel as the first outer ring interface.
步骤504,报文被发送到第一外环口后,从第一外环口发送出去,从第二外环口接收回来。Step 504: After the packet is sent to the first outer ring interface, the packet is sent out from the first outer ring port and received from the second outer ring port.
步骤505,路由转发模块将从所述第二外环口接收回来的报文,查询ECMP路由得到多个下一跳IP地址,从多个下一跳IP地址对应的多个转发口将报文转发出去。Step 505: The route forwarding module receives the packet from the second outer ring interface, queries the ECMP route to obtain multiple next hop IP addresses, and sends the packet from multiple forwarding ports corresponding to multiple next hop IP addresses. Forward it out.
示例3Example 3
本示例提供一种外部环回方式实现基于VXLAN隧道传输数据的方法,可以包括以下步骤:This example provides an external loopback method for implementing data transmission based on a VXLAN tunnel, and may include the following steps:
步骤1:VRF2内配置或者学习ECMP路由,第一外环口加入VRF1,第二外环口加入VRF2,第一外环口和第二外环口直连。Step 1: Configure or learn ECMP routes in VRF2. The first outer ring interface is added to VRF1, and the second outer ring port is added to VRF2. The first outer ring port and the second outer ring port are directly connected.
其中,ECMP路由指向多个下一跳出口。The ECMP route points to multiple next hop outlets.
第一外环口和第二外环口可以选择高带宽物理端口,或者通过链路聚合(smartgroup)实现多端口的链路捆绑,从而满足高带宽流量的转发需求。The first outer ring port and the second outer ring port can select high-bandwidth physical ports, or link aggregation (multi-port) through link aggregation (smartgroup) to meet the forwarding requirements of high-bandwidth traffic.
步骤2:VRF1与VRF2之间的路由互导。Step 2: Routing mutual routing between VRF1 and VRF2.
步骤3:VRF1内配置第一外环口对应的三层接口的MAC地址偏移,避免封装出去的报文的源MAC(Source MAC,SMAC)与目的MAC(Destination MAC,DMAC)相等。Step 3: Configure the MAC address offset of the Layer 3 interface corresponding to the first outer ring interface in VRF1 to prevent the source MAC (SMAC) of the encapsulated packets from being equal to the destination MAC (DMA).
步骤4:隧道封装模块接收到动态协议或者静态配置下发VXLAN隧道时,根据VRF1内的路由信息指定隧道的出端口,此出端口即为第一外环口,这样,经隧道封装模块封装处理后,报文被发送到第一外环口且报文的源MAC为设置MAC偏移后的地址。Step 4: When the tunnel encapsulation module receives the dynamic protocol or statically sends the VXLAN tunnel, the outbound port of the tunnel is specified according to the routing information in VRF1, and the egress port is the first outer ring interface, so that the tunnel encapsulation module is encapsulated. After that, the packet is sent to the first outer ring interface and the source MAC address of the packet is the address after the MAC offset is set.
步骤5,报文从第一外环口发送出去,从第二外环口接收回来,路由转发模块在VRF2内进行报文特征匹配,查询ECMP路由得到多个下一跳IP地址,从 多个下一跳IP地址对应的多个转发口将报文转发出去。Step 5: The packet is sent out from the first outer ring interface and received from the second outer ring interface. The route forwarding module performs packet feature matching in the VRF2, and queries the ECMP route to obtain multiple next hop IP addresses. The forwarding port corresponding to the next hop IP address forwards the packet.
本示例中,报文走三层转发从不同的端口分担出去,能够达到叠加(Overlay)网络中多条隧道的转发性能,而实际上只建立叠加(Overlay)网络中的一条隧道(隧道出口是外环口)。本示例中,ECMP场景中创建VXLAN隧道可以参见图6,图6为在叠加网络中创建隧道的示意图。In this example, the three-layer forwarding of packets is shared from different ports, which can achieve the forwarding performance of multiple tunnels in the overlay network. In fact, only one tunnel in the overlay network is established (the tunnel exit is Outer ring mouth). In this example, you can create a VXLAN tunnel in an ECMP scenario. See Figure 6. Figure 6 is a schematic diagram of creating a tunnel in an overlay network.
在其他实施方式中,通过外部环回方式实现其他隧道协议的数据传输的方法与本示例类似,只是隧道封装模块封装报文时采用的封装规则不同而已,比如,针对MPLS协议的数据传输,隧道封装模块基于MPLS协议封装隧道头,环回处理和ECMP路由转发都与本示例是相同的。In other implementations, the method for implementing data transmission of other tunneling protocols in the external loopback mode is similar to the present example, except that the encapsulation rules used by the tunnel encapsulation module to encapsulate packets are different, for example, data transmission for the MPLS protocol, tunnel The encapsulation module encapsulates the tunnel header based on the MPLS protocol, and the loopback processing and ECMP routing and forwarding are the same as the present example.
示例4Example 4
本示例提供一种内环方式实现基于vxlan隧道传输数据的方法,可以包括以下步骤:This example provides a method for implementing data transmission based on a vxlan tunnel in an inner loop manner, which may include the following steps:
步骤1:全局指定内环口。Step 1: Specify the inner ring port globally.
其中,可以选择高带宽物理口或者高带宽高可靠性的链路聚合(smartgroup)组作为内部环回口。本示例选择smartgroup组为内部环回口,首先配置smartgroup组,将端口分别加入到该smartgroup组中,然后使能该smartgroup组为内环模式。A high-bandwidth physical port or a high-bandwidth and high-reliability link aggregation group can be selected as the internal loopback port. This example selects the smartgroup group as the internal ringback port. First, configure the smartgroup group, add the ports to the smartgroup group, and then enable the smartgroup group to be in inner ring mode.
步骤2:在该smartgroup组上配置路由接口,使能所述smartgroup组的三层转发功能。Step 2: Configure a routing interface on the smartgroup group to enable Layer 3 forwarding of the smartgroup group.
其中,报文在经过隧道封装模块封装后被发往内环口,被环回的报文在路由转发模块内查找ECMP路由转发出去,所以此处将该smartgroup使能三层功能。The packet is sent to the inner ring interface after being encapsulated by the tunnel encapsulation module. The loopback packet is forwarded to the ECMP route in the routing and forwarding module. Therefore, the smartgroup is enabled with the Layer 3 function.
步骤3:路由转发模块根据动态路由协议学习ECMP路由。Step 3: The route forwarding module learns the ECMP route according to the dynamic routing protocol.
步骤4:当隧道封装模块接收到动态协议或者静态配置下发隧道时,将隧道的出口设置成内环口,这样,经隧道封装模块封装处理后,报文被发送到内环口且报文的源MAC为设置MAC偏移后的地址。Step 4: When the tunnel encapsulation module receives the dynamic protocol or the static configuration, the egress is set to the inner ring interface. After the tunnel encapsulation module is encapsulated, the packet is sent to the inner ring interface and the packet is sent. The source MAC address is the address after the MAC offset is set.
步骤5,报文从内环口发送出去,再从内环口接收回来,路由转发模块查询 ECMP路由得到多个下一跳IP地址,从多个下一跳IP地址对应的多个转发口将报文转发出去。Step 5: The packet is sent out from the inner ring interface, and then received from the inner ring interface. The route forwarding module queries the ECMP route to obtain multiple next hop IP addresses, and multiple forwarding ports corresponding to multiple next hop IP addresses will be used. The message is forwarded.
本示例中,报文走三层转发从不同的端口分担出去,能够达到叠加(Overlay)网络中多条隧道的转发性能,而实际上只建立叠加(Overlay)网络中的一条隧道(隧道出口是内环口)。In this example, the three-layer forwarding of packets is shared from different ports, which can achieve the forwarding performance of multiple tunnels in the overlay network. In fact, only one tunnel in the overlay network is established (the tunnel exit is Inner ring mouth).
在其他实施方式中,通过内环方式实现其他隧道协议的数据传输的方法与本示例类似,只是隧道封装模块封装报文时采用的封装规则不同而已,比如,针对MPLS协议的数据传输,隧道封装模块基于MPLS协议封装隧道头,环回处理和ECMP路由转发都与本示例是相同的。In other implementations, the method for implementing data transmission of other tunneling protocols by using the inner ring mode is similar to the present example, except that the encapsulation rules used by the tunnel encapsulating module to encapsulate the packet are different, for example, data transmission for the MPLS protocol, tunnel encapsulation. The module encapsulates the tunnel header based on the MPLS protocol, and the loopback processing and ECMP routing and forwarding are the same as this example.
与相关技术相比,本公开实施例提供的一种基于隧道传输数据的方法及装置,本公开实施例的技术方案能够在基础网络应用ECMP技术的场景下实现多端口转发的同时减少叠加网络设备底层芯片中的隧道资源数量。Compared with the related art, the method and the device for transmitting data based on the tunnel are provided in the embodiment of the present disclosure. The technical solution of the embodiment of the present disclosure can implement multi-port forwarding in the scenario of the basic network application ECMP technology while reducing the overlay network device. The number of tunnel resources in the underlying chip.

Claims (12)

  1. 一种基于隧道传输数据的方法,包括:A method for transmitting data based on a tunnel, comprising:
    在叠加网络中对报文进行隧道封装,将隧道的出口设置为环回口;The tunnel is encapsulated in the overlay network, and the exit of the tunnel is set as a loopback interface.
    在基础网络中,在所述环回口对经过所述隧道封装的报文进行环回;In the basic network, the loopback of the packet encapsulated by the tunnel is performed on the loopback interface;
    在所述基础网络中,根据所述经过所述隧道封装的报文的目的互联网协议IP地址,查找等值多路径路由协议ECMP路由表获得多个下一跳IP地址,将所述经过所述隧道封装的报文通过所述多个下一跳IP地址对应的多个转发口转发出去。In the basic network, the ECMP routing table of the equivalent multipath routing protocol is obtained according to the destination Internet Protocol IP address of the packet encapsulated by the tunnel, and multiple next hop IP addresses are obtained, and the The packet encapsulated by the tunnel is forwarded through multiple forwarding ports corresponding to the multiple next hop IP addresses.
  2. 如权利要求1所述的方法,在将隧道的出口设置为环回口之前,还包括:The method of claim 1, before the setting of the exit of the tunnel as a loopback, further comprising:
    建立内环口,并为所述内环口配置媒体访问控制MAC地址偏移量;Establishing an inner ring interface, and configuring a media access control MAC address offset for the inner ring port;
    其中,所述MAC地址偏移量用于使所述内环口发送出去的报文的源MAC地址和目的MAC地址不相同。The MAC address offset is used to make the source MAC address and the destination MAC address of the packet sent by the inner ring interface different.
  3. 如权利要求2所述的方法,其中:The method of claim 2 wherein:
    所述将隧道的出口设置为环回口,包括:将所述隧道的出口设置为内环口;The setting the outlet of the tunnel as a loopback includes: setting an exit of the tunnel as an inner ring mouth;
    在所述环回口对所述经过所述隧道封装的报文进行环回,包括:Looping back the packet encapsulated by the tunnel on the loopback interface, including:
    将所述经过所述隧道封装的报文在所述内环口发送出去,并重新从所述内环口接收回来。Transmitting the packet encapsulated by the tunnel to the inner ring port and receiving it back from the inner ring port.
  4. 如权利要求1所述的方法,在将隧道的出口设置为环回口之前,还包括:The method of claim 1, before the setting of the exit of the tunnel as a loopback, further comprising:
    建立第一外环口与第二外环口,并将所述第一外环口与所述第二外环口直连;Establishing a first outer ring mouth and a second outer ring port, and directly connecting the first outer ring port and the second outer ring port;
    将所述第一外环口加入第一虚拟路由转发实例VRF1,将所述第二外环口加入第二虚拟路由转发实例VRF2;Adding the first outer ring interface to the first virtual route forwarding instance VRF1, and adding the second outer ring port to the second virtual route forwarding instance VRF2;
    将静态配置或动态学习的ECMP路由记录在所述VRF2内的路由表中,并将所述VRF2内的ECMP路由导入所述VRF1内;Recording the statically configured or dynamically learned ECMP route in the routing table in the VRF2, and importing the ECMP route in the VRF2 into the VRF1;
    为所述第一外环口配置MAC地址偏移量;其中,所述MAC地址偏移量用于使所述第一外环口发送出去的报文的源MAC地址和目的MAC地址不相同。And configuring a MAC address offset for the first outer ring interface, where the MAC address offset is used to make the source MAC address and the destination MAC address of the packet sent by the first outer ring interface different.
  5. 如权利要求4所述的方法,其中:The method of claim 4 wherein:
    所述将隧道的出口设置为环回口,包括:将所述隧道的出口设置为第一外环口;Setting the outlet of the tunnel as a loopback port includes: setting an exit of the tunnel as a first outer ring mouth;
    所述在所述环回口对所述经过所述隧道封装的报文进行环回,包括:The loopback of the packet encapsulated by the tunnel on the loopback interface includes:
    将所述经过所述隧道封装的报文在所述第一外环口发送出去,并从所述第二外环口接收回来。Transmitting the packet encapsulated by the tunnel to the first outer ring interface, and receiving the packet from the second outer ring port.
  6. 如权利要求1-5任一项所述的方法,其中,所述对报文进行隧道封装,包括:The method of any of claims 1-5, wherein the tunneling the packet comprises:
    根据报文的业务特征,使用与所述业务特征对应的封装规则对所述报文进行隧道封装;Decapsulating the packet by using an encapsulation rule corresponding to the service feature according to the service feature of the packet;
    其中,所述报文的业务特征包括下述至少之一:所述报文的目的IP地址、所述报文的目的MAC地址。The service feature of the packet includes at least one of the following: a destination IP address of the packet, and a destination MAC address of the packet.
  7. 一种基于隧道传输数据的装置,包括:A device for transmitting data based on a tunnel, comprising:
    隧道封装模块,设置为在叠加网络中对报文进行隧道封装,将隧道的出口设置为环回口;The tunnel encapsulation module is configured to encapsulate the packet in the overlay network and set the exit of the tunnel as a loopback interface.
    环回模块,设置为在基础网络中,在所述环回口对经过所述隧道封装的报文进行环回,并将所述经过所述隧道封装的报文发送给路由转发模块;The loopback module is configured to perform loopback on the packet encapsulated by the tunnel in the loopback interface, and send the packet encapsulated by the tunnel to the route forwarding module.
    所述路由转发模块,设置为在所述基础网络中,根据所述经过所述隧道封装的报文的目的互联网协议IP地址,查找等值多路径路由协议ECMP路由表获得多个下一跳IP地址,将所述经过所述隧道封装的报文通过所述多个下一跳IP地址对应的多个转发口转发出去。The routing and forwarding module is configured to obtain multiple next hop IPs in the ECMP routing table of the equivalent multipath routing protocol according to the destination Internet Protocol IP address of the packet encapsulated by the tunnel in the basic network. The address is forwarded by the plurality of forwarding ports corresponding to the multiple next hop IP addresses.
  8. 如权利要求7所述的装置,还包括:The apparatus of claim 7 further comprising:
    第一配置模块,设置为建立内环口,并为所述内环口配置媒体访问控制MAC地址偏移量;其中,所述MAC地址偏移量用于使所述内环口发送出去的报文的源MAC地址和目的MAC地址不相同。The first configuration module is configured to establish an inner ring interface, and configure a media access control MAC address offset for the inner ring port, where the MAC address offset is used to send the inner ring port The source MAC address and destination MAC address are different.
  9. 如权利要求8所述的装置,其中:The apparatus of claim 8 wherein:
    所述隧道封装模块是设置为将所述隧道的出口设置为内环口;The tunnel encapsulation module is configured to set an exit of the tunnel as an inner ring port;
    所述环回模块是设置为将所述经过所述隧道封装的报文在所述内环口发送出去,并重新从所述内环口接收回来。The loopback module is configured to send the packet encapsulated by the tunnel to the inner ring port, and receive the packet back from the inner ring port.
  10. 如权利要求7所述的装置,还包括:The apparatus of claim 7 further comprising:
    第二配置模块,设置为建立第一外环口与第二外环口,并将所述第一外环口与所述第二外环口直连;将所述第一外环口加入第一虚拟路由转发实例VRF1,将所述第二外环口加入第二虚拟路由转发实例VRF2;将静态配置或动态学习的ECMP路由记录在所述VRF2内的路由表中,并将所述VRF2内的ECMP路由导入所述VRF1内;为所述第一外环口配置MAC地址偏移量;其中,所述MAC地址偏移量用于使所述第一外环口发送出去的报文的源MAC地址和目的MAC地址不相同。The second configuration module is configured to establish a first outer ring mouth and a second outer ring port, and directly connect the first outer ring port and the second outer ring port; add the first outer ring port to the first a virtual routing forwarding instance VRF1, the second outer ring interface is added to the second virtual routing forwarding instance VRF2; the statically configured or dynamically learned ECMP routing is recorded in the routing table in the VRF2, and the VRF2 is The ECMP route is imported into the VRF1; the MAC address offset is configured for the first outer ring interface; wherein the MAC address offset is used to source the packet sent by the first outer ring interface The MAC address and destination MAC address are different.
  11. 如权利要求10所述的装置,其中:The apparatus of claim 10 wherein:
    所述隧道封装模块是设置为将所述隧道的出口设置为第一外环口;The tunnel encapsulation module is configured to set an exit of the tunnel as a first outer ring mouth;
    所述环回模块是设置为将所述经过所述隧道封装的报文在所述第一外环口发送出去,并从所述第二外环口接收回来。The loopback module is configured to send the packet encapsulated by the tunnel to the first outer ring interface, and receive the packet from the second outer ring port.
  12. 如权利要求7-11任一项所述的装置,其中,所述隧道封装模块是设置为根据报文的业务特征,使用与所述业务特征对应的封装规则对所述报文进行隧道封装;The device according to any one of claims 7 to 11, wherein the tunnel encapsulation module is configured to tunnel encapsulate the packet according to a service feature corresponding to the service feature according to a service feature of the packet;
    其中,所述报文的业务特征包括下述至少之一:所述报文的目的IP地址、所述报文的目的MAC地址。The service feature of the packet includes at least one of the following: a destination IP address of the packet, and a destination MAC address of the packet.
PCT/CN2018/125039 2017-12-29 2018-12-28 Tunnel-based data transmission method and device WO2019129236A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711470852.7 2017-12-29
CN201711470852.7A CN109995654B (en) 2017-12-29 2017-12-29 Method and device for transmitting data based on tunnel

Publications (1)

Publication Number Publication Date
WO2019129236A1 true WO2019129236A1 (en) 2019-07-04

Family

ID=67063252

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/125039 WO2019129236A1 (en) 2017-12-29 2018-12-28 Tunnel-based data transmission method and device

Country Status (2)

Country Link
CN (1) CN109995654B (en)
WO (1) WO2019129236A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614536A (en) * 2020-04-20 2020-09-01 视联动力信息技术股份有限公司 Data forwarding method and device
SE1951128A1 (en) * 2019-10-03 2021-04-04 Telia Co Ab A method and an apparatus for routing data packets in a network
CN112636789A (en) * 2020-12-31 2021-04-09 广东电网有限责任公司电力调度控制中心 Virtual MAC method and device for power line communication
CN113472647A (en) * 2021-06-11 2021-10-01 新华三信息安全技术有限公司 Message forwarding method and device
CN113765823A (en) * 2021-09-29 2021-12-07 新华三信息安全技术有限公司 Message forwarding method and device
CN115514702A (en) * 2022-09-16 2022-12-23 苏州盛科科技有限公司 Method and device for quickly switching link, electronic equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542111A (en) * 2020-04-20 2021-10-22 华为技术有限公司 Message forwarding method and network equipment
CN111884904B (en) * 2020-07-23 2021-09-24 中盈优创资讯科技有限公司 Method and device for dynamically managing vxlan tunnel based on equipment configuration
CN114124617A (en) * 2020-08-31 2022-03-01 华为技术有限公司 Communication method, device, equipment and system
CN115914069A (en) * 2021-09-30 2023-04-04 中兴通讯股份有限公司 Data forwarding method, system, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599883A (en) * 2008-07-02 2009-12-09 上海恩际恩网络科技有限公司 A kind of safe transmission network system framework based on overlay network
US20150009995A1 (en) * 2013-07-08 2015-01-08 Nicira, Inc. Encapsulating Data Packets Using an Adaptive Tunnelling Protocol
CN104871495A (en) * 2012-09-26 2015-08-26 华为技术有限公司 Overlay virtual gateway for overlay networks
CN106470157A (en) * 2015-08-21 2017-03-01 中兴通讯股份有限公司 The priority method to set up in tunnel and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008063858A2 (en) * 2006-11-21 2008-05-29 Nortel Networks Limited Supporting bgp based ip-vpn in a routed network
CN101267402A (en) * 2008-05-08 2008-09-17 北京邮电大学 Dual-label transmission and control mechanism based on T-MPLS
US9008082B2 (en) * 2009-12-07 2015-04-14 Telefonaktiebolaget L M Ericsson (Publ) Handling data packets received at a routing node
CN102801628A (en) * 2012-08-20 2012-11-28 神州数码网络(北京)有限公司 Data forwarding method and system in GRE (General Routing Encapsulation) tunnels
US9036476B2 (en) * 2012-09-28 2015-05-19 Juniper Networks, Inc. Maintaining load balancing after service application with a network device
CN104184676B (en) * 2013-05-27 2017-08-11 华为技术有限公司 A kind of data center network and its flow equalization method and controller
US9832102B2 (en) * 2013-08-07 2017-11-28 Telefonaktiebolaget L M Ericsson (Publ) Automatic establishment of redundant paths with cautious restoration in a packet network
US9667538B2 (en) * 2015-01-30 2017-05-30 Telefonaktiebolget L M Ericsson (Publ) Method and apparatus for connecting a gateway router to a set of scalable virtual IP network appliances in overlay networks
CN106330597B (en) * 2015-07-10 2019-07-26 新华三技术有限公司 Path between VXLAN endpoint of a tunnel VTEP is up to detection method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101599883A (en) * 2008-07-02 2009-12-09 上海恩际恩网络科技有限公司 A kind of safe transmission network system framework based on overlay network
CN104871495A (en) * 2012-09-26 2015-08-26 华为技术有限公司 Overlay virtual gateway for overlay networks
US20150009995A1 (en) * 2013-07-08 2015-01-08 Nicira, Inc. Encapsulating Data Packets Using an Adaptive Tunnelling Protocol
CN106470157A (en) * 2015-08-21 2017-03-01 中兴通讯股份有限公司 The priority method to set up in tunnel and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SE1951128A1 (en) * 2019-10-03 2021-04-04 Telia Co Ab A method and an apparatus for routing data packets in a network
EP3800841A1 (en) * 2019-10-03 2021-04-07 Telia Company AB A method and an apparatus for routing data packets in a network
SE544376C2 (en) * 2019-10-03 2022-04-26 Telia Co Ab A method and an apparatus for configuring static routes through internal virtual route forwarders
US11463359B2 (en) 2019-10-03 2022-10-04 Telia Company Ab Method and an apparatus for routing data packets in a network
CN111614536A (en) * 2020-04-20 2020-09-01 视联动力信息技术股份有限公司 Data forwarding method and device
CN112636789A (en) * 2020-12-31 2021-04-09 广东电网有限责任公司电力调度控制中心 Virtual MAC method and device for power line communication
CN113472647A (en) * 2021-06-11 2021-10-01 新华三信息安全技术有限公司 Message forwarding method and device
CN113765823A (en) * 2021-09-29 2021-12-07 新华三信息安全技术有限公司 Message forwarding method and device
CN115514702A (en) * 2022-09-16 2022-12-23 苏州盛科科技有限公司 Method and device for quickly switching link, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN109995654B (en) 2022-05-20
CN109995654A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
WO2019129236A1 (en) Tunnel-based data transmission method and device
EP2412129B1 (en) Redundant host connection in a routed network
US8351352B1 (en) Methods and apparatus for RBridge hop-by-hop compression and frame aggregation
US9444642B2 (en) LAN multiplexing apparatus
US9742693B2 (en) Dynamic service insertion in a fabric switch
US8446914B2 (en) Method and system for link aggregation across multiple switches
US9736085B2 (en) End-to end lossless Ethernet in Ethernet fabric
JP5542927B2 (en) Inter-node link aggregation system and method
CN111901235A (en) Method and device for processing route, and method and device for data transmission
US20120281700A1 (en) Layer-3 support in trill networks
US20100118882A1 (en) Method, Apparatus, and System For Packet Transmission
US11563680B2 (en) Pseudo wire load sharing method and device
EP2920926B1 (en) Virtual link aggregations across multiple fabric switches
WO2022062506A1 (en) Data processing method and apparatus, storage medium, and electronic apparatus
EP3054634B1 (en) Scheme for performing one-pass tunnel forwarding function on two-layer network structure
WO2011113340A1 (en) Access method and apparatus for multi-protocol label switching layer 2 virtual private network
US8861339B2 (en) Packet forwarding function of a mobility switch deployed as routed SMLT (RSMLT) node
WO2011054263A1 (en) Access method and access system for layer 3 virtual private networks(vpn)
WO2011160517A1 (en) Tunnel switching method and system for multi-protocol label switching services
WO2021093463A1 (en) Packet forwarding method, first network device, and first device group
US9699117B2 (en) Integrated fibre channel support in an ethernet fabric switch
WO2011160464A1 (en) Method for forwarding message and switch chip
US20110222541A1 (en) Network System, Edge Node, and Relay Node
JP7298606B2 (en) Communication system and communication method
WO2009097796A1 (en) Multicast method of provider backbone transport loop and multicast loop network and node device

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: 18897601

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC ( EPO FORM 1205A DATED 19/11/2020 )

122 Ep: pct application non-entry in european phase

Ref document number: 18897601

Country of ref document: EP

Kind code of ref document: A1