[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

US20220303364A1 - Packet recirculation for tunneling encapsulation - Google Patents

Packet recirculation for tunneling encapsulation Download PDF

Info

Publication number
US20220303364A1
US20220303364A1 US17/208,174 US202117208174A US2022303364A1 US 20220303364 A1 US20220303364 A1 US 20220303364A1 US 202117208174 A US202117208174 A US 202117208174A US 2022303364 A1 US2022303364 A1 US 2022303364A1
Authority
US
United States
Prior art keywords
packet
network device
tunnel
address
switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US17/208,174
Other versions
US11632445B2 (en
Inventor
Purushothaman Nandakumaran
Munisha Rani
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Arista Networks Inc
Original Assignee
Arista Networks Inc
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 Arista Networks Inc filed Critical Arista Networks Inc
Priority to US17/208,174 priority Critical patent/US11632445B2/en
Assigned to ARISTA NETWORKS, INC. reassignment ARISTA NETWORKS, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: NANDAKUMARAN, PURUSHOTHAMAN, RANI, MUNISHA
Publication of US20220303364A1 publication Critical patent/US20220303364A1/en
Application granted granted Critical
Publication of US11632445B2 publication Critical patent/US11632445B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Definitions

  • Data packets use networking protocols to get to their destinations. However, not all networks support all protocols.
  • WAN wide area network
  • Location A and Location B each have networks that use a protocol such as IPv6.
  • IPv6 the network between Location A and Location B uses another version of the Internet Protocol, such as IPv4.
  • IPv4 IPv4
  • IPv6 can be used at Locations A and B, while still sending data directly between Locations A and B. Encapsulating packets within other packets is called “tunneling.” Tunnels are a way to transport data across a network using protocols that are not supported by that network.
  • FIG. 1 illustrates a network topology, in accordance with some embodiments of the disclosure.
  • FIGS. 2A and 2B illustrate a network device, in accordance with some embodiments of the disclosure.
  • FIG. 3 illustrates a flow diagram of a method for encapsulating packets, in accordance with some embodiments of the disclosure.
  • FIG. 4A illustrates a communication path, in accordance with some embodiments of the disclosure.
  • FIG. 4B illustrates packet encapsulation, in accordance with some embodiments of the disclosure.
  • FIG. 4C illustrates configurations, in accordance with some embodiments of the disclosure.
  • FIG. 5A illustrates another communication path, in accordance with some embodiments of the disclosure.
  • FIG. 5B illustrates another packet encapsulation, in accordance with some embodiments of the disclosure.
  • FIG. 5C illustrates further configurations, in accordance with some embodiments of the disclosure.
  • FIG. 5D illustrates an example packet dump, in accordance with some embodiments of the disclosure.
  • FIG. 6 illustrates a network device, in accordance with some embodiments of the disclosure.
  • the present disclosure describes systems and techniques for operating a network device (e.g., switch, router, and the like) to perform multiple packet encapsulation for different tunnels.
  • a network device e.g., switch, router, and the like
  • an originating network device may encapsulate the packets twice.
  • the packet may be encapsulated for tunnel 1 .
  • the packet may be encapsulated for tunnel 2 .
  • VXLAN Virtual Extensible LAN
  • GRE Generic Routing Encapsulation
  • Switch 1 receives a packet from host 1 and the packet is addressed to host 2 .
  • the packet processor in switch 1 encapsulates the packet in a VXLAN packet.
  • the VXLAN packet is looped back into the packet processor of switch 1 , where the VXLAN packet is encapsulated in a GRE packet.
  • the GRE packet egresses switch 1 and goes to switch 3 through a GRE tunnel.
  • Switch 3 decapsulates the VXLAN packet from the GRE packet.
  • the VXLAN packet egresses switch 3 and goes to switch 2 through the VXLAN tunnel.
  • Switch 2 decapsulates the original packet from the VXLAN packet and forwards the original packet to host 2 .
  • GRE over VXLAN may also be performed using these techniques. More generally, this double encapsulation is applicable to other tunneling technologies.
  • FIG. 1 illustrates topology 100 A for a data network according to some embodiments.
  • Topology 100 A may include host_ 1 110 A, switch_ 1 120 A, network 130 A, switch_ 2 140 A, and host_ 2 150 A.
  • Network 130 A may include one or more switches, such as switch_A 132 A through switch_N 134 A.
  • Network 130 A may be a segmented routing over Internet Protocol (IP) (layer 3) network.
  • IP Internet Protocol
  • Host_ 1 110 A and host_ 2 150 A may be computing devices, such as servers, desktop computers, laptop computers, tablet computers, smartphones, and the like. Host_ 1 110 A and host_ 2 150 A may communicates with switch_ 1 120 A and switch_ 2 140 A, respectively, directly or through one or more intermediate network devices (not shown). Hosts communicate with each other over one or more networks, such as network 130 A.
  • the networks may include nodes such as switch_ 1 120 A, switch_A 132 A through switch_N 134 A, and switch_ 2 140 A. Although the nodes depicted in FIG. 1 are labeled as switches, they may be other network devices, such as routers and the like.
  • Switch_ 1 120 A, switch_A 132 A through switch_N 134 A, and switch_ 2 140 A may be embodiments of network device 600 in FIG. 6 .
  • Switch_A 132 A represents a network device in network 130 A that communicates with switch_ 1 120 A. There may be one or more network devices (not shown) between switch_A 132 A and switch_N 134 A.
  • Switch_N 134 A may communicate with switch_ 2 140 A directly or through one or more intermediate network devices (not shown).
  • VXLAN Virtual Extensible LAN
  • GRE Generic Routing Encapsulation
  • MPLS Multiprotocol Label Switching
  • IPinIP IPinIP
  • VXLAN is an encapsulation protocol that uses tunneling to stretch layer 2 connections over an underlying layer 3 network.
  • GRE is a protocol for encapsulating data packets that use one routing protocol inside the data packets of another protocol.
  • a data packet may be a formatted unit of data carried by a data network.
  • a data packet may include control information and user data (payload).
  • host_ 1 110 A communicates with switch_ 1 120 A
  • host_ 2 150 A communicates with switch_ 2 140 A
  • Switch_ 1 120 A and switch_ 2 140 A are endpoints for tunnel X 160 A. Accordingly, switch_ 1 120 A and switch_ 2 140 A may have endpoint addresses associated with the tunneling protocol used by tunnel X 160 A.
  • Switch_ 1 120 A may encapsulate data packets from host_ 1 110 A for communication through tunnel X 160 A.
  • Switch_ 2 140 A may decapsulate data packets for host_ 2 150 A received through tunnel X 160 A.
  • Switch_ 1 may communicate with switch_ 2 through network 130 A.
  • switch_A 132 A does not recognize switch_ 2 's 140 A endpoint address for tunnel X 160 A.
  • a forwarding table in switch_A 132 A may not be programmed with switch_ 2 's 140 A endpoint address for tunnel X 160 A. This may be, for example, because switch_ 2 140 A does not advertise its endpoint address for tunnel X 160 A on network 130 A.
  • switch_N 134 A may recognize switch_ 2 's 140 A endpoint address for tunnel X 160 A.
  • switch_ 1 120 A may reach switch_N 134 A through a second tunneling protocol (through tunnel Y 170 A).
  • the second tunneling protocol may be GRE, VXLAN, Multiprotocol Label Switching (MPLS), IPinIP, and the like.
  • tunnel X 160 A and tunnel Y 170 A use different tunneling protocols.
  • switch_ 1 120 A may also be an endpoint for tunnel Y 170 A
  • switch_N may be an endpoint for tunnel Y 170 A.
  • Switch_A 132 A may recognize switch_N's 134 A endpoint address for tunnel Y 170 A.
  • switch_ 1 120 A may encapsulate a data packet from host_ 1 110 A to host_ 2 150 A twice: once for tunnel X 160 A and then for tunnel Y 170 A. Since the data packet encapsulated for tunnel X 160 A is further encapsulated for tunnel Y 170 A, tunnel X 160 A may be said to be “over” tunnel Y 170 A (“tunnel X over tunnel Y”). By way of example and not limitation, “VXLAN over GRE” and “GRE over VXLAN” are described in further detail below. The twice-encapsulated data packet may go from switch_ 1 120 A to switch_N 134 A through tunnel Y 170 A.
  • Switch_N 134 A may decapsulate the data packet, leaving the data packet encapsulated for tunnel X 160 A, and forward the data packet to switch_ 2 140 A.
  • Switch_ 2 140 A may decapsulate the data packet and forward the data packet to host_ 2 150 A.
  • Tunnel Y 170 A is depicted above tunnel X 160 A to convey that packets for tunnel X 160 A are transported over/via tunnel Y 170 A.
  • a header for tunnel Y 170 A protocol may be the outermost header in the data packet and forwarding lookups will be performed on outer tunnel Y 170 A protocol header on intermediate switches switch_A 132 A through switch_N 134 A.
  • FIGS. 2A and 2B illustrate switch_ 1 120 B according to some embodiments.
  • Switch_ 1 120 E may be an embodiment of switch_ 1 120 A.
  • Switch_ 1 120 E may comprise control plane 210 and data plane 230 .
  • Control plane 210 may include CPU 220 which may be an embodiment of management CPU 108 described in FIG. 6 .
  • Data plane 230 may include forwarding application specific integrated circuit (ASIC) 240 , ingress ports 260 1 - 260 x , and egress ports 270 1 - 270 y .
  • ASIC 240 may be an embodiment of packet processor 112 a - 112 p described in FIG. 6 .
  • ASIC 240 may comprise forwarding pipeline 242 and loopback port 244 .
  • Switch_ 1 120 E may receive data packet 110 E from host_ 1 110 A.
  • Data packet 110 E may be addressed to host_ 2 150 A.
  • Data packet 110 E may enter switch_ 1 120 E through ingress port 260 i and go to forwarding pipeline 242 (path 282 ).
  • Forwarding pipeline 242 may look up host_ 2 150 A in a forwarding table (not shown) and determine that host_ 2 150 A may be reached through tunnel X 160 A.
  • Forwarding pipeline 242 may encapsulate data packet 110 B according to the protocol for tunnel X 160 A.
  • the forwarding table defines how a data packet will be forwarded out of a network device.
  • the forwarding table may match data packet header fields, such as the IP destination address, and when a match occurs, forward the frame to a specified egress port (e.g., of egress ports 270 1 - 270 y ).
  • ASIC 240 's forwarding table may be programmed to take into account that switch_ 1 120 A does not have a direct route to switch_ 2 140 A.
  • the route to switch_ 2 140 A may be through tunnel Y 170 A. Since control plane 210 knows that switch_ 2 140 A is reachable via tunnel Y 170 A, control plane 210 programs forwarding pipeline 242 so that the destination port is loopback port 244 and the data packet is recirculated.
  • the packet encapsulated for tunnel X 160 A may re-enter forwarding pipeline 242 through loopback port 244 (paths 284 and 286 ). Loopback port 244 provides a path for packets to be processed by forwarding pipeline 242 more than once.
  • loopback port 244 may be an internal loopback provided by ASIC 240 .
  • ASIC 240 may have one or more dedicated internal loopback ports with unique port numbers.
  • the data packet may enter forwarding pipeline 242 again.
  • the recirculated packet may stay in ASIC 240 and not go to one of egress ports 270 1 - 270 y .
  • Loopback port 244 may also be one of egress ports 270 1 - 270 y . In other words, some of egress ports 270 1 - 270 y are dedicated external loopback ports.
  • a data packet sent to a dedicated external loopback port may be returned to forwarding pipeline 242 .
  • the dedicated external loopback port may be configured to return the data packet within switch_ 1 120 B to forwarding pipeline 242 , may have a special adapter/plug/cable to send the data packet going out from an external loopback port back into switch_ 1 120 E through one of ingress ports 260 1 - 260 x , and the like. Going to forwarding pipeline 242 again may be referred to as packet recirculation.
  • the second time through forwarding pipeline 242 the packet encapsulated for tunnel X 160 A may be further encapsulated according to the protocol for tunnel Y 170 A.
  • the twice-encapsulated data packet (data packet 132 B) egresses switch_ 1 120 E through egress port 270 1 (path 288 )
  • FIG. 3 illustrates workflow 300 for packet recirculation according to some embodiments.
  • Workflow 300 may be performed by switch_ 1 120 B. Description of workflow 300 will be made with reference to FIGS. 1, 2A and 2B .
  • Workflow 300 may commence at step 310 , where a switch_ 1 120 B receives data packet 110 B, referred to as the original packet.
  • data packet 110 E may ingress switch_ 1 120 E through ingress port 260 1 and go to forwarding pipeline 242 (path 282 ).
  • packet 110 E is encapsulated for the first tunnel.
  • forwarding pipeline 242 may encapsulate packet 110 E according to the protocol for tunnel X 160 A.
  • the once-encapsulated packet (for the first tunnel) is recirculated back to forwarding pipeline 242 using loopback 244 (paths 284 and 286 ).
  • the once-encapsulated data packet may be encapsulated again in forwarding pipeline 242 , this time for the second tunnel.
  • forwarding pipeline 242 may encapsulate the data packet according to the protocol for tunnel Y 170 A.
  • the twice-encapsulated data packet egresses switch_ 1 120 E to the next hop for the second tunnel. For example, data packet 132 E egresses through egress port 270 1 to switch_A 132 A.
  • FIG. 4A illustrates communications path 100 C for VXLAN over GRE according to some embodiments.
  • Communications path 100 C and its constituents may be an embodiment of topology 100 A and its constituents.
  • Switch_ 1 120 C may be an embodiment of switch_ 1 120 B.
  • switch_A 132 C through switch_N 134 C and switch_ 2 140 C may each have at least some of the characteristics of switch_ 1 120 B.
  • Communications path 100 C may include host_ 1 110 C, switch_ 1 120 C, network 130 C, switch_ 2 140 C, and host_ 2 150 C.
  • Network 130 C may include switch_A 132 C through switch_N 134 C.
  • Switch_ 1 120 C may be a VXLAN Tunnel End Point (VTEP), VTEP1, with an IP address of 100.1.1.1.
  • Switch_ 1 120 C may also be a GRE endpoint with an IP address of 162.1.1.161.
  • Switch-N 134 C may be a GRE endpoint with an IP address of 180.1.1.10.
  • Switch_ 2 140 C may be a VTEP, VTEP2, with an IP address of 200.1.1.1.
  • Host_ 1 110 C may have an IP address of 10.1.1.1 and host_ 2 150 C may have an IP address of 10.1.1.2.
  • Host_ 1 110 C may send a data packet, addressed to host_ 2 150 C, to switch_ 1 120 C.
  • Switch_ 1 120 C may determine that host_ 2 150 C is behind a VXLAN tunnel with a destination IP address of 200.1.1.1, which is VTEP2.
  • Switch_ 1 120 C may encapsulate the data packet for VXLAN.
  • switch_ 1 120 C adds a VXLAN header to the packet with an outer destination IP address of 200.1.1.1 and an outer destination Media Access Controller (MAC) address of Switch_ 1 's 120 C MAC address.
  • Switch_ 1 120 C may also determine that switch_ 1 120 C does not have a direct route to reach outer destination IP address 200.1.1.1 and that address 200.1.1.1 is reached through a GRE tunnel.
  • MAC Media Access Controller
  • switch_ 1 120 C may resolve that outer destination IP address of 200.1.1.1 for VXLAN tunnel 160 C will go through GRE tunnel 170 C.
  • the forwarding tables in ASIC 240 may be programmed/configured such that first route/forwarding lookup for host_ 2 150 C will produce loopback port 244 as the outgoing port. This resolution may be performed in control plane 210 and forwarding pipeline 242 is programmed/configured accordingly.
  • the VXLAN encapsulated data packet may be looped back and go through forwarding pipeline 242 of switch_ 1 120 C again.
  • the second pass through the forwarding pipeline may encapsulate the data packet for GRE (add a GRE header).
  • the twice-encapsulated packet egresses switch_ 1 120 C to switch_A 132 C.
  • the twice-encapsulated packet may proceed through GRE tunnel 170 C over network 130 C until it reaches the GRE endpoint (switch_N 134 C).
  • Switch_N 134 C may decapsulate the GRE encapsulated data packet, restoring the VXLAN encapsulated data packet.
  • the VXLAN encapsulated data packet may proceed through VXLAN tunnel 160 C to switch_ 2 140 C.
  • Switch_ 2 140 C may decapsulate the VXLAN encapsulated data packet and forward the decapsulated data packet to host_ 2 150 C.
  • a reverse path from host_ 2 150 C to host_ 1 110 C may be as follows.
  • Switch_ 2 140 C may receive a data packet from host_ 2 150 C.
  • Switch_ 2 140 C may encapsulate the data packet with a VXLAN header and send the VXLAN encapsulated data packet to switch_N 134 C.
  • Switch_N may further encapsulate the packet with a GRE header and send it to switch_ 1 120 C.
  • Switch_ 1 120 C may receive the twice-encapsulated data packet.
  • switch_ 1 120 may see the packet is addressed to its own MAC address as the destination MAC address and to its GRE endpoint address as the destination IP address.
  • Switch_ 1 120 C may decapsulate the GRE encapsulated data packet, restoring the VXLAN encapsulated data packet.
  • the VXLAN encapsulated data packet may be recirculated.
  • the VXLAN encapsulated data packet may be decapsulated, based on the inner destination MAC address and destination IP address.
  • Switch_ 1 120 C may forward the data packet to host_ 1 110 C.
  • FIG. 4B illustrates control information of a data packet after each pass through forwarding pipeline 242 of switch_ 1 120 C, in accordance with various embodiments.
  • the data packet payload is not depicted.
  • the IP addresses shown in FIG. 4B correspond to the IP addresses shown in FIG. 4A .
  • Header 410 may be the data packet header received from host_ 1 110 C. Header 410 may include destination address 412 , source address 414 , source IP address 416 , and destination IP address 418 .
  • VXLAN header may be added, resulting in header 420 .
  • the VXLAN header may include destination address 422 , source address 424 , source IP address 426 , and destination IP address 428 .
  • a GRE header may be added, resulting in header 430 .
  • the GRE header may include source IP address 436 and destination IP address 438 . Destination address 432 may also be added.
  • FIG. 4C illustrates configuration information 470 for VTEP switch_ 1 110 C and configuration information 480 for VTEP switch_ 2 140 C, according to some embodiments.
  • Configuration information 470 may set up a VXLAN tunnel; specify that VTEP2 is reachable over a GRE tunnel, and set up the GRE tunnel.
  • Configuration information 480 may set up a VXLAN tunnel.
  • GRE tunnel destination 180.1.1.10 reachability may be either statically configured or dynamically learned through routing protocols.
  • FIG. 5A illustrates communications path 100 D for GRE over VXLAN according to some embodiments.
  • Communications path 100 D and its constituents may be an embodiment of topology 100 A and its constituents.
  • Switch_ 1 120 D may be an embodiment of switch_ 1 120 B.
  • switch_A 132 D through switch_N 134 D and switch_ 2 140 D may each have at least some of the characteristics of switch_ 1 120 B.
  • Communications path 100 D may include host_ 1 110 D, switch_ 1 120 D, network 130 D, switch_ 2 140 D, and host_ 2 150 D.
  • Network 130 D may include switch_A 132 D through switch_N 134 D.
  • switch_ 1 120 D may be in a headquarters and switch_ 2 140 D in a branch office. There may be a point-to-point connection established between the headquarters and branch office using a GRE tunnel. Suppose switch_ 1 120 D cannot reach the GRE endpoint at switch_ 2 140 D, but can reach switch_N 134 D over a VXLAN tunnel. Switch_N 134 D can reach switch_ 2 140 D over a GRE tunnel.
  • Switch_ 1 120 D may be a GRE endpoint with an IP address of 162.1.1.161.
  • Switch_ 1 120 D may also be a VTEP, VTEP1, with an IP address of 100.1.1.1.
  • Switch-N 134 D may be a VTEP, VTEP2, with an IP address of 200.1.1.1.
  • Switch_ 2 140 D may be a GRE endpoint with an IP address of 180.1.1.10.
  • Host_ 1 110 D may have an IP address of 10.1.1.2 and host_ 2 150 D may have an IP address of 4.4.4.4.
  • Host _ 1 110 D and host_ 2 150 D are in different subnet domains.
  • the destination address may be switch_ 1 's 120 D MAC address. Since the data packet's destination address is switch_ 1 's 120 D MAC address, switch_ 1 120 D may lookup destination IP address 4.4.4.4 in its forwarding table.
  • Switch_ 1 120 D may determine that host_ 2 150 D is reachable through a GRE tunnel and encapsulates the data packet for GRE (add a GRE header). Switch_ 1 120 D may also update the layer 2 Ethernet header destination address with the next hop's (switch_A 132 D) MAC address and source address with switch_ 1 's 120 D MAC address.
  • the GRE encapsulated data packet may be looped back and go through forwarding pipeline 424 of switch_ 1 120 D again.
  • the packet's destination address is not switch_ 1 's 120 D MAC address, so forwarding pipeline 242 may not perform layer 3 route lookup. Instead, forwarding pipeline 242 may perform layer 2 forwarding lookup.
  • the layer 2 forwarding lookup may determine that the destination IP address of 180.1.1.10 and destination address of the next-hop switch's MAC address are reachable through VTEP2's IP address 200.1.1.1 (VXLAN tunnel 170 D).
  • Switch_ 1 120 D may encapsulate the data packet for VXLAN (add a VXLAN header). The twice-encapsulated packet egresses switch_ 1 120 D to switch_A 132 D.
  • the twice-encapsulated packet may proceed through VXLAN tunnel 170 D over network 130 D until it reaches VTEP2 (switch_N 134 D).
  • Switch_N 134 D may decapsulate the VXLAN encapsulated data packet, restoring the GRE encapsulated data packet.
  • the GRE encapsulated data packet may proceed through GRE tunnel 160 D to switch_ 2 140 D.
  • Switch_ 2 140 D may decapsulate the GRE encapsulated data packet and forward the decapsulated data packet to host_ 2 150 D.
  • a reverse path from host_ 2 150 D to host_ 1 110 D may be as follows.
  • Switch_ 2 140 D may receive a data packet from host_ 2 150 D.
  • Switch_ 2 140 D may encapsulate the data packet with a GRE header and send the GRE encapsulated data packet to switch_N 134 D.
  • Switch_N may further encapsulate the packet with a VXLAN header and send it to switch_ 1 120 D.
  • Switch_ 1 120 D may receive the twice-encapsulated data packet.
  • switch_ 1 120 D may see the packet is addressed to its own MAC address as the destination MAC address and to its GRE endpoint address as the destination IP address.
  • Switch_ 1 120 D may decapsulate the VXLAN encapsulated data packet, restoring the GRE encapsulated data packet.
  • the GRE encapsulated data packet may be recirculated.
  • the GRE encapsulated data packet may be decapsulated, based on the inner destination MAC address and destination IP address.
  • Switch_ 1 120 D may forward the data packet to host_ 1 110 D.
  • FIG. 5B illustrates control information of a data packet after each pass through forwarding pipeline 242 of switch_ 1 120 D.
  • the data packet payload is not depicted.
  • the IP addresses shown in FIG. 5B correspond to the IP address shown in FIG. 5A .
  • Header 510 may be the data packet header received from host_ 1 110 D. Header 510 may include destination address 512 , source address 514 , source IP address 516 , and destination IP address 518 .
  • the packet may be encapsulated for GRE (a GRE header is added), resulting in header 520 .
  • the GRE header may include source IP address 526 and destination IP address 528 . Destination address 522 and source address 524 may also be added.
  • a VXLAN header may be added, resulting in header 530 .
  • the VXLAN header may include source destination address 532 , source address 534 , source IP address 536 , and destination IP address 538 .
  • FIG. 5C illustrates configuration information 570 for GRE endpoint switch_ 1 110 d and configuration information 580 for GRE endpoint switch_ 2 140 D according to various embodiments.
  • Configuration information 570 may set up a GRE tunnel; specify that the GRE endpoint is reachable over a VXLAN tunnel, and set the VXLAN tunnel.
  • Configuration information 480 may set up a GRE tunnel.
  • FIG. 5D illustrates an example packet dump 590 in accordance with some embodiments.
  • packet dump 590 shows the addition of two tunnel headers by switch_ 1 120 D.
  • VXLAN and GRE tunneling are provided above by way of example and not limitation. Other tunneling protocols may be used.
  • FIG. 6 depicts an example of a network device 600 in accordance with some embodiments of the present disclosure.
  • network device 600 can be a switch.
  • network device 600 includes a management module 102 , an internal fabric module 104 , and a number of I/O modules 106 a - 106 p.
  • Management module 102 includes the control plane (also referred to as control layer or simply the CPU) of network device 600 and can include one or more management CPUs 108 for managing and controlling operation of network device 600 in accordance with the present disclosure.
  • control plane also referred to as control layer or simply the CPU
  • Each management CPU 108 can be a general-purpose processor, such as an Intel®/AMD® x86 or ARM® microprocessor, that operates under the control of software stored in a memory, such as random access memory (RAM) 126 .
  • Control plane refers to all the functions and processes that determine which path to use, such as routing protocols, spanning tree, and the like.
  • Internal fabric module 104 and I/O modules 106 a - 106 p collectively represent the data plane of network device 600 (also referred to as data layer, forwarding plane, etc.). Internal fabric module 104 is configured to interconnect the various other modules of network device 600 .
  • Each I/O module 106 a - 106 p includes one or more input/output ports 110 a - 110 p that are used by network device 600 to send and receive network packets. Input/output ports 110 a - 110 p are also known as ingress/egress ports.
  • Each I/O module 106 a - 106 p can also include a packet processor 112 a - 112 p.
  • Each packet processor 112 a - 112 p can comprise a forwarding hardware component (e.g., application specific integrated circuit (ASIC), field programmable array (FPGA), digital processing unit, graphics coprocessors, content-addressable memory, and the like) configured to make wire speed decisions on how to handle incoming (ingress) and outgoing (egress) network packets.
  • ASIC application specific integrated circuit
  • FPGA field programmable array
  • graphics coprocessors e.g., graphics coprocessors, content-addressable memory, and the like
  • some aspects of the present disclosure can be performed wholly within the data plane.
  • Management module 102 includes one or more management CPUs 108 that communicate with storage subsystem 120 via bus subsystem 130 .
  • Other subsystems such as a network interface subsystem (not shown in FIG. 1 ), may be on bus subsystem 130 .
  • Storage subsystem 120 includes memory subsystem 122 and file/disk storage subsystem 128 represent non-transitory computer-readable storage media that can store program code and/or data, which when executed by one or more management CPUs 108 , can cause one or more management CPUs 108 to perform operations in accordance with embodiments of the present disclosure.
  • Memory subsystem 122 includes a number of memories including main RAM 126 for storage of instructions and data during program execution and read-only memory (ROM) 124 in which fixed instructions are stored.
  • File storage subsystem 128 can provide persistent (i.e., non-volatile) storage for program and data files, and can include a magnetic or solid-state hard disk drive, and/or other types of storage media known in the art.
  • One or more management CPUs 108 can run a network operating system stored in storage subsystem 120 .
  • a network operating system is a specialized operating system for network device 600 (e.g., a router, switch, firewall, and the like).
  • the network operating system may be Arista Extensible Operating System (EOS), which is a fully programmable and highly modular, Linux-based network operating system.
  • EOS Arista Extensible Operating System
  • Other network operating systems may be used.
  • Bus subsystem 130 can provide a mechanism for letting the various components and subsystems of management module 102 communicate with each other as intended. Although bus subsystem 130 is shown schematically as a single bus, alternative embodiments of the bus subsystem can utilize multiple busses.

Landscapes

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

Abstract

Techniques for operating a network device for multiple packet encapsulation for different tunnels are provided. In some embodiments, the network device may receive an original packet on an ingress port, the original packet being received from a first host and addressed to a second host; encapsulate the original packet in a first tunnel packet for a first tunnel; recirculate the first packet through a loopback port; encapsulate the recirculated packet in a second tunnel packet for a second tunnel; and egress the packet encapsulated for the second tunnel. The switch may further add a first tunnel header to the original packet to encapsulate the first packet and add a second tunnel header to the recirculated packet to encapsulate the recirculated packet.

Description

    BACKGROUND
  • Data packets use networking protocols to get to their destinations. However, not all networks support all protocols. Consider a wide area network (WAN) connecting Location A and Location B. Location A and Location B each have networks that use a protocol such as IPv6. However, the network between Location A and Location B uses another version of the Internet Protocol, such as IPv4. In this example, by encapsulating IPv6 packets inside IPv4 packets, IPv6 can be used at Locations A and B, while still sending data directly between Locations A and B. Encapsulating packets within other packets is called “tunneling.” Tunnels are a way to transport data across a network using protocols that are not supported by that network.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • With respect to the discussion to follow and in particular to the drawings, it is stressed that the particulars shown represent examples for purposes of illustrative discussion and are presented in the cause of providing a description of principles and conceptual aspects of the present disclosure. In this regard, no attempt is made to show implementation details beyond what is needed for a fundamental understanding of the present disclosure. The discussion to follow, in conjunction with the drawings, makes apparent to those of skill in the art how embodiments in accordance with the present disclosure may be practiced. Similar or same reference numbers may be used to identify or otherwise refer to similar or same elements in the various drawings and supporting descriptions. In the accompanying drawings:
  • FIG. 1 illustrates a network topology, in accordance with some embodiments of the disclosure.
  • FIGS. 2A and 2B illustrate a network device, in accordance with some embodiments of the disclosure.
  • FIG. 3 illustrates a flow diagram of a method for encapsulating packets, in accordance with some embodiments of the disclosure.
  • FIG. 4A illustrates a communication path, in accordance with some embodiments of the disclosure.
  • FIG. 4B illustrates packet encapsulation, in accordance with some embodiments of the disclosure.
  • FIG. 4C illustrates configurations, in accordance with some embodiments of the disclosure.
  • FIG. 5A illustrates another communication path, in accordance with some embodiments of the disclosure.
  • FIG. 5B illustrates another packet encapsulation, in accordance with some embodiments of the disclosure.
  • FIG. 5C illustrates further configurations, in accordance with some embodiments of the disclosure.
  • FIG. 5D illustrates an example packet dump, in accordance with some embodiments of the disclosure.
  • FIG. 6 illustrates a network device, in accordance with some embodiments of the disclosure.
  • DETAILED DESCRIPTION Overview
  • The present disclosure describes systems and techniques for operating a network device (e.g., switch, router, and the like) to perform multiple packet encapsulation for different tunnels. To send packets in one tunnel (tunnel 1) through another tunnel (tunnel 2), an originating network device may encapsulate the packets twice. In the first pass through the network device's forwarding pipeline, the packet may be encapsulated for tunnel 1. In the second pass through the network device's forwarding pipeline, the packet may be encapsulated for tunnel 2.
  • An example configuration may be referred to as VXLAN over GRE, where tunnel 1 is Virtual Extensible LAN (VXLAN) and tunnel 2 is Generic Routing Encapsulation (GRE). Consider two hosts (host 1 and host 2) that communicate with each other through a VXLAN tunnel. Host 1 is connected to switch 1 and host 2 is connected to switch 2. Switch 1 and switch 2 are VXLAN tunnel endpoints, the VXLAN tunnel originating at one side and terminating at the other side. Typically, they are reached through an Internet Protocol (IP) fabric. In this example, switch 1 does not have a direct way to reach switch 2 over VXLAN. However, switch 2 may be reached by switch 1 via a GRE tunnel. Between switch 1 and switch 2 is switch 3. Switch 1 may reach switch 3 through a GRE tunnel. Switch 3 may then reach switch 2 through the VXLAN tunnel.
  • Switch 1 receives a packet from host 1 and the packet is addressed to host 2. The packet processor in switch 1 encapsulates the packet in a VXLAN packet. The VXLAN packet is looped back into the packet processor of switch 1, where the VXLAN packet is encapsulated in a GRE packet. The GRE packet egresses switch 1 and goes to switch 3 through a GRE tunnel. Switch 3 decapsulates the VXLAN packet from the GRE packet. The VXLAN packet egresses switch 3 and goes to switch 2 through the VXLAN tunnel. Switch 2 decapsulates the original packet from the VXLAN packet and forwards the original packet to host 2.
  • GRE over VXLAN may also be performed using these techniques. More generally, this double encapsulation is applicable to other tunneling technologies.
  • Network Topology
  • FIG. 1 illustrates topology 100A for a data network according to some embodiments. Topology 100A may include host_1 110A, switch_1 120A, network 130A, switch_2 140A, and host_2 150A. Network 130A may include one or more switches, such as switch_A 132A through switch_N 134A. Network 130A may be a segmented routing over Internet Protocol (IP) (layer 3) network.
  • Host_1 110A and host_2 150A may be computing devices, such as servers, desktop computers, laptop computers, tablet computers, smartphones, and the like. Host_1 110A and host_2 150A may communicates with switch_1 120A and switch_2 140A, respectively, directly or through one or more intermediate network devices (not shown). Hosts communicate with each other over one or more networks, such as network 130A. The networks may include nodes such as switch_1 120A, switch_A 132A through switch_N 134A, and switch_2 140A. Although the nodes depicted in FIG. 1 are labeled as switches, they may be other network devices, such as routers and the like. Switch_1 120A, switch_A 132A through switch_N 134A, and switch_2 140A may be embodiments of network device 600 in FIG. 6. Switch_A 132A represents a network device in network 130A that communicates with switch_1 120A. There may be one or more network devices (not shown) between switch_A 132A and switch_N 134A. Switch_N 134A may communicate with switch_2 140A directly or through one or more intermediate network devices (not shown).
  • Suppose host_1 110A communicates with host_2 150A using a first tunneling protocol (through tunnel X 160A), such as Virtual Extensible LAN (VXLAN), Generic Routing Encapsulation (GRE), Multiprotocol Label Switching (MPLS), IPinIP, and the like. VXLAN is an encapsulation protocol that uses tunneling to stretch layer 2 connections over an underlying layer 3 network. GRE is a protocol for encapsulating data packets that use one routing protocol inside the data packets of another protocol. A data packet may be a formatted unit of data carried by a data network. A data packet may include control information and user data (payload).
  • In this example, host_1 110A communicates with switch_1 120A, and host_2 150A communicates with switch_2 140A. Switch_1 120A and switch_2 140A are endpoints for tunnel X 160A. Accordingly, switch_1 120A and switch_2 140A may have endpoint addresses associated with the tunneling protocol used by tunnel X 160A. Switch_1 120A may encapsulate data packets from host_1 110A for communication through tunnel X 160A. Switch_2 140A may decapsulate data packets for host_2 150A received through tunnel X 160A. Switch_1 may communicate with switch_2 through network 130A.
  • Suppose further that switch_A 132A does not recognize switch_2's 140A endpoint address for tunnel X 160A. A forwarding table in switch_A 132A may not be programmed with switch_2's 140A endpoint address for tunnel X 160A. This may be, for example, because switch_2 140A does not advertise its endpoint address for tunnel X 160A on network 130A.
  • However, switch_N 134A may recognize switch_2's 140A endpoint address for tunnel X 160A. In addition, switch_1 120A may reach switch_N 134A through a second tunneling protocol (through tunnel Y 170A). The second tunneling protocol may be GRE, VXLAN, Multiprotocol Label Switching (MPLS), IPinIP, and the like. Typically, tunnel X 160A and tunnel Y 170A use different tunneling protocols. Here, switch_1 120A may also be an endpoint for tunnel Y 170A, and switch_N may be an endpoint for tunnel Y 170A. Switch_A 132A may recognize switch_N's 134A endpoint address for tunnel Y 170A.
  • In this example, switch_1 120A may encapsulate a data packet from host_1 110A to host_2 150A twice: once for tunnel X 160A and then for tunnel Y 170A. Since the data packet encapsulated for tunnel X 160A is further encapsulated for tunnel Y 170A, tunnel X 160A may be said to be “over” tunnel Y 170A (“tunnel X over tunnel Y”). By way of example and not limitation, “VXLAN over GRE” and “GRE over VXLAN” are described in further detail below. The twice-encapsulated data packet may go from switch_1 120A to switch_N 134A through tunnel Y 170A. Switch_N 134A may decapsulate the data packet, leaving the data packet encapsulated for tunnel X 160A, and forward the data packet to switch_2 140A. Switch_2 140A may decapsulate the data packet and forward the data packet to host_2 150A.
  • Tunnel Y 170A is depicted above tunnel X 160A to convey that packets for tunnel X 160A are transported over/via tunnel Y 170A. A header for tunnel Y 170A protocol may be the outermost header in the data packet and forwarding lookups will be performed on outer tunnel Y 170A protocol header on intermediate switches switch_A 132A through switch_N 134A.
  • Network Device
  • FIGS. 2A and 2B illustrate switch_1 120B according to some embodiments. The following description of FIGS. 2A and 2B is made with reference to FIG. 1. Switch_1 120E may be an embodiment of switch_1 120A. Switch_1 120E may comprise control plane 210 and data plane 230. Control plane 210 may include CPU 220 which may be an embodiment of management CPU 108 described in FIG. 6. Data plane 230 may include forwarding application specific integrated circuit (ASIC) 240, ingress ports 260 1-260 x, and egress ports 270 1-270 y. ASIC 240 may be an embodiment of packet processor 112 a-112 p described in FIG. 6. ASIC 240 may comprise forwarding pipeline 242 and loopback port 244.
  • Switch_1 120E may receive data packet 110E from host_1 110A. Data packet 110E may be addressed to host_2 150A. Data packet 110E may enter switch_1 120E through ingress port260i and go to forwarding pipeline 242 (path 282). Forwarding pipeline 242 may look up host_2 150A in a forwarding table (not shown) and determine that host_2 150A may be reached through tunnel X 160A. Forwarding pipeline 242 may encapsulate data packet 110B according to the protocol for tunnel X 160A. The forwarding table defines how a data packet will be forwarded out of a network device. The forwarding table may match data packet header fields, such as the IP destination address, and when a match occurs, forward the frame to a specified egress port (e.g., of egress ports 270 1-270 y).
  • ASIC 240's forwarding table may be programmed to take into account that switch_1 120A does not have a direct route to switch_2 140A. The route to switch_2 140A may be through tunnel Y 170A. Since control plane 210 knows that switch_2 140A is reachable via tunnel Y 170A, control plane 210 programs forwarding pipeline 242 so that the destination port is loopback port 244 and the data packet is recirculated. The packet encapsulated for tunnel X 160A may re-enter forwarding pipeline 242 through loopback port 244 (paths 284 and 286). Loopback port 244 provides a path for packets to be processed by forwarding pipeline 242 more than once. As shown, loopback port 244 may be an internal loopback provided by ASIC 240. For example, ASIC 240 may have one or more dedicated internal loopback ports with unique port numbers. When a data packet is directed to a dedicated internal loopback port, the data packet may enter forwarding pipeline 242 again. Here, the recirculated packet may stay in ASIC 240 and not go to one of egress ports 270 1-270 y. Loopback port 244 may also be one of egress ports 270 1-270 y. In other words, some of egress ports 270 1-270 y are dedicated external loopback ports. A data packet sent to a dedicated external loopback port may be returned to forwarding pipeline 242. For example, the dedicated external loopback port may be configured to return the data packet within switch_1 120B to forwarding pipeline 242, may have a special adapter/plug/cable to send the data packet going out from an external loopback port back into switch_1 120E through one of ingress ports 260 1-260 x, and the like. Going to forwarding pipeline 242 again may be referred to as packet recirculation. The second time through forwarding pipeline 242, the packet encapsulated for tunnel X 160A may be further encapsulated according to the protocol for tunnel Y 170A. The twice-encapsulated data packet (data packet 132B) egresses switch_1 120E through egress port 270 1 (path 288)
  • Packet Recirculation Workflow
  • FIG. 3 illustrates workflow 300 for packet recirculation according to some embodiments. Workflow 300 may be performed by switch_1 120B. Description of workflow 300 will be made with reference to FIGS. 1, 2A and 2B.
  • Workflow 300 may commence at step 310, where a switch_1 120B receives data packet 110B, referred to as the original packet. For example, data packet 110E may ingress switch_1 120E through ingress port 260 1 and go to forwarding pipeline 242 (path 282). At step 320, packet 110E is encapsulated for the first tunnel. For example, forwarding pipeline 242 may encapsulate packet 110E according to the protocol for tunnel X 160A.
  • At step 330, the once-encapsulated packet (for the first tunnel) is recirculated back to forwarding pipeline 242 using loopback 244 (paths 284 and 286). At step 340, the once-encapsulated data packet may be encapsulated again in forwarding pipeline 242, this time for the second tunnel. For example, forwarding pipeline 242 may encapsulate the data packet according to the protocol for tunnel Y 170A.
  • At step 350, the twice-encapsulated data packet egresses switch_1 120E to the next hop for the second tunnel. For example, data packet 132E egresses through egress port 270 1 to switch_A 132A.
  • VXLAN Over GRE
  • FIG. 4A illustrates communications path 100C for VXLAN over GRE according to some embodiments. Communications path 100C and its constituents may be an embodiment of topology 100A and its constituents. Switch_1 120C may be an embodiment of switch_1 120B. Moreover, switch_A 132C through switch_N 134C and switch_2 140C may each have at least some of the characteristics of switch_1 120B. Communications path 100C may include host_1 110C, switch_1 120C, network 130C, switch_2 140C, and host_2 150C. Network 130C may include switch_A 132C through switch_N 134C.
  • Switch_1 120C may be a VXLAN Tunnel End Point (VTEP), VTEP1, with an IP address of 100.1.1.1. Switch_1 120C may also be a GRE endpoint with an IP address of 162.1.1.161. Switch-N 134C may be a GRE endpoint with an IP address of 180.1.1.10. Switch_2 140C may be a VTEP, VTEP2, with an IP address of 200.1.1.1. Host_1 110C may have an IP address of 10.1.1.1 and host_2 150C may have an IP address of 10.1.1.2.
  • Host_1 110C may send a data packet, addressed to host_2 150C, to switch_1 120C. Switch_1 120C may determine that host_2 150C is behind a VXLAN tunnel with a destination IP address of 200.1.1.1, which is VTEP2. Switch_1 120C may encapsulate the data packet for VXLAN. Here, switch_1 120C adds a VXLAN header to the packet with an outer destination IP address of 200.1.1.1 and an outer destination Media Access Controller (MAC) address of Switch_1's 120C MAC address. Switch_1 120C may also determine that switch_1 120C does not have a direct route to reach outer destination IP address 200.1.1.1 and that address 200.1.1.1 is reached through a GRE tunnel. In other words, switch_1 120C may resolve that outer destination IP address of 200.1.1.1 for VXLAN tunnel 160C will go through GRE tunnel 170C. The forwarding tables in ASIC 240 may be programmed/configured such that first route/forwarding lookup for host_2 150C will produce loopback port 244 as the outgoing port. This resolution may be performed in control plane 210 and forwarding pipeline 242 is programmed/configured accordingly.
  • The VXLAN encapsulated data packet may be looped back and go through forwarding pipeline 242 of switch_1 120C again. The second pass through the forwarding pipeline may encapsulate the data packet for GRE (add a GRE header). The twice-encapsulated packet egresses switch_1 120C to switch_A 132C.
  • The twice-encapsulated packet may proceed through GRE tunnel 170C over network 130C until it reaches the GRE endpoint (switch_N 134C). Switch_N 134C may decapsulate the GRE encapsulated data packet, restoring the VXLAN encapsulated data packet. The VXLAN encapsulated data packet may proceed through VXLAN tunnel 160C to switch_2 140C. Switch_2 140C may decapsulate the VXLAN encapsulated data packet and forward the decapsulated data packet to host_2 150C.
  • A reverse path from host_2 150C to host_1 110C may be as follows. Switch_2 140C may receive a data packet from host_2 150C. Switch_2 140C may encapsulate the data packet with a VXLAN header and send the VXLAN encapsulated data packet to switch_N 134C. Switch_N may further encapsulate the packet with a GRE header and send it to switch_1 120C. Switch_1 120C may receive the twice-encapsulated data packet.
  • Analyzing the outer data packet header, switch_1 120 may see the packet is addressed to its own MAC address as the destination MAC address and to its GRE endpoint address as the destination IP address. Switch_1 120C may decapsulate the GRE encapsulated data packet, restoring the VXLAN encapsulated data packet. The VXLAN encapsulated data packet may be recirculated. During the second pass through the forwarding pipeline, the VXLAN encapsulated data packet may be decapsulated, based on the inner destination MAC address and destination IP address. Switch_1 120C may forward the data packet to host_1 110C.
  • FIG. 4B illustrates control information of a data packet after each pass through forwarding pipeline 242 of switch_1 120C, in accordance with various embodiments. The data packet payload is not depicted. The IP addresses shown in FIG. 4B correspond to the IP addresses shown in FIG. 4A. Header 410 may be the data packet header received from host_1 110C. Header 410 may include destination address 412, source address 414, source IP address 416, and destination IP address 418.
  • During the first pass through switch_1's 120C forwarding pipeline, a VXLAN header may be added, resulting in header 420. The VXLAN header may include destination address 422, source address 424, source IP address 426, and destination IP address 428.
  • During the second pass through switch_1's 120C forwarding pipeline, a GRE header may be added, resulting in header 430. The GRE header may include source IP address 436 and destination IP address 438. Destination address 432 may also be added.
  • FIG. 4C illustrates configuration information 470 for VTEP switch_1 110C and configuration information 480 for VTEP switch_2 140C, according to some embodiments. Configuration information 470 may set up a VXLAN tunnel; specify that VTEP2 is reachable over a GRE tunnel, and set up the GRE tunnel. Configuration information 480 may set up a VXLAN tunnel. For example, GRE tunnel destination 180.1.1.10 reachability may be either statically configured or dynamically learned through routing protocols.
  • GRE Over VXLAN
  • FIG. 5A illustrates communications path 100D for GRE over VXLAN according to some embodiments. Communications path 100D and its constituents may be an embodiment of topology 100A and its constituents. Switch_1 120D may be an embodiment of switch_1 120B. Moreover, switch_A 132D through switch_N 134D and switch_2 140D may each have at least some of the characteristics of switch_1 120B. Communications path 100D may include host_1 110D, switch_1 120D, network 130D, switch_2 140D, and host_2 150D. Network 130D may include switch_A 132D through switch_N 134D.
  • By way of non-limiting example, switch_1 120D may be in a headquarters and switch_2 140D in a branch office. There may be a point-to-point connection established between the headquarters and branch office using a GRE tunnel. Suppose switch_1 120D cannot reach the GRE endpoint at switch_2 140D, but can reach switch_N 134D over a VXLAN tunnel. Switch_N 134D can reach switch_2 140D over a GRE tunnel.
  • Switch_1 120D may be a GRE endpoint with an IP address of 162.1.1.161. Switch_1 120D may also be a VTEP, VTEP1, with an IP address of 100.1.1.1. Switch-N 134D may be a VTEP, VTEP2, with an IP address of 200.1.1.1. Switch_2 140D may be a GRE endpoint with an IP address of 180.1.1.10. Host_1 110D may have an IP address of 10.1.1.2 and host_2 150D may have an IP address of 4.4.4.4.
  • Host _1 110D and host_2 150D are in different subnet domains. When host _1 110D sends a data packet with a destination IP address of 4.4.4.4, the destination address may be switch_1's 120D MAC address. Since the data packet's destination address is switch_1's 120D MAC address, switch_1 120D may lookup destination IP address 4.4.4.4 in its forwarding table. Switch_1 120D may determine that host_2 150D is reachable through a GRE tunnel and encapsulates the data packet for GRE (add a GRE header). Switch_1 120D may also update the layer 2 Ethernet header destination address with the next hop's (switch_A 132D) MAC address and source address with switch_1's 120D MAC address.
  • The GRE encapsulated data packet may be looped back and go through forwarding pipeline 424 of switch_1 120D again. During the second pass through forwarding pipeline 242, the packet's destination address is not switch_1's 120D MAC address, so forwarding pipeline 242 may not perform layer 3 route lookup. Instead, forwarding pipeline 242 may perform layer 2 forwarding lookup. The layer 2 forwarding lookup may determine that the destination IP address of 180.1.1.10 and destination address of the next-hop switch's MAC address are reachable through VTEP2's IP address 200.1.1.1 (VXLAN tunnel 170D). Switch_1 120D may encapsulate the data packet for VXLAN (add a VXLAN header). The twice-encapsulated packet egresses switch_1 120D to switch_A 132D.
  • The twice-encapsulated packet may proceed through VXLAN tunnel 170D over network 130D until it reaches VTEP2 (switch_N 134D). Switch_N 134D may decapsulate the VXLAN encapsulated data packet, restoring the GRE encapsulated data packet. The GRE encapsulated data packet may proceed through GRE tunnel 160D to switch_2 140D. Switch_2 140D may decapsulate the GRE encapsulated data packet and forward the decapsulated data packet to host_2 150D.
  • A reverse path from host_2 150D to host_1 110D may be as follows. Switch_2 140D may receive a data packet from host_2 150D. Switch_2 140D may encapsulate the data packet with a GRE header and send the GRE encapsulated data packet to switch_N 134D. Switch_N may further encapsulate the packet with a VXLAN header and send it to switch_1 120D. Switch_1 120D may receive the twice-encapsulated data packet.
  • Analyzing the outer data packet header, switch_1 120D may see the packet is addressed to its own MAC address as the destination MAC address and to its GRE endpoint address as the destination IP address. Switch_1 120D may decapsulate the VXLAN encapsulated data packet, restoring the GRE encapsulated data packet. The GRE encapsulated data packet may be recirculated. During the second pass through the forwarding pipeline, the GRE encapsulated data packet may be decapsulated, based on the inner destination MAC address and destination IP address. Switch_1 120D may forward the data packet to host_1 110D.
  • FIG. 5B illustrates control information of a data packet after each pass through forwarding pipeline 242 of switch_1 120D. The data packet payload is not depicted. The IP addresses shown in FIG. 5B correspond to the IP address shown in FIG. 5A. Header 510 may be the data packet header received from host_1 110D. Header 510 may include destination address 512, source address 514, source IP address 516, and destination IP address 518.
  • During the first pass through switch_1's 120D forwarding pipeline, the packet may be encapsulated for GRE (a GRE header is added), resulting in header 520. The GRE header may include source IP address 526 and destination IP address 528. Destination address 522 and source address 524 may also be added.
  • During the second pass through switch_1's 120D forwarding pipeline 242, a VXLAN header may be added, resulting in header 530. The VXLAN header may include source destination address 532, source address 534, source IP address 536, and destination IP address 538.
  • FIG. 5C illustrates configuration information 570 for GRE endpoint switch_1 110 d and configuration information 580 for GRE endpoint switch_2 140D according to various embodiments. Configuration information 570 may set up a GRE tunnel; specify that the GRE endpoint is reachable over a VXLAN tunnel, and set the VXLAN tunnel. Configuration information 480 may set up a GRE tunnel.
  • FIG. 5D illustrates an example packet dump 590 in accordance with some embodiments. For example, packet dump 590 shows the addition of two tunnel headers by switch_1 120D.
  • VXLAN and GRE tunneling are provided above by way of example and not limitation. Other tunneling protocols may be used.
  • Network Device
  • FIG. 6 depicts an example of a network device 600 in accordance with some embodiments of the present disclosure. In some embodiments, network device 600 can be a switch. As shown, network device 600 includes a management module 102, an internal fabric module 104, and a number of I/O modules 106 a-106 p. Management module 102 includes the control plane (also referred to as control layer or simply the CPU) of network device 600 and can include one or more management CPUs 108 for managing and controlling operation of network device 600 in accordance with the present disclosure. Each management CPU 108 can be a general-purpose processor, such as an Intel®/AMD® x86 or ARM® microprocessor, that operates under the control of software stored in a memory, such as random access memory (RAM) 126. Control plane refers to all the functions and processes that determine which path to use, such as routing protocols, spanning tree, and the like.
  • Internal fabric module 104 and I/O modules 106 a-106 p collectively represent the data plane of network device 600 (also referred to as data layer, forwarding plane, etc.). Internal fabric module 104 is configured to interconnect the various other modules of network device 600. Each I/O module 106 a-106 p includes one or more input/output ports 110 a-110 p that are used by network device 600 to send and receive network packets. Input/output ports 110 a-110 p are also known as ingress/egress ports. Each I/O module 106 a-106 p can also include a packet processor 112 a-112 p. Each packet processor 112 a-112 p can comprise a forwarding hardware component (e.g., application specific integrated circuit (ASIC), field programmable array (FPGA), digital processing unit, graphics coprocessors, content-addressable memory, and the like) configured to make wire speed decisions on how to handle incoming (ingress) and outgoing (egress) network packets. In accordance with some embodiments some aspects of the present disclosure can be performed wholly within the data plane.
  • Management module 102 includes one or more management CPUs 108 that communicate with storage subsystem 120 via bus subsystem 130. Other subsystems, such as a network interface subsystem (not shown in FIG. 1), may be on bus subsystem 130. Storage subsystem 120 includes memory subsystem 122 and file/disk storage subsystem 128 represent non-transitory computer-readable storage media that can store program code and/or data, which when executed by one or more management CPUs 108, can cause one or more management CPUs 108 to perform operations in accordance with embodiments of the present disclosure.
  • Memory subsystem 122 includes a number of memories including main RAM 126 for storage of instructions and data during program execution and read-only memory (ROM) 124 in which fixed instructions are stored. File storage subsystem 128 can provide persistent (i.e., non-volatile) storage for program and data files, and can include a magnetic or solid-state hard disk drive, and/or other types of storage media known in the art.
  • One or more management CPUs 108 can run a network operating system stored in storage subsystem 120. A network operating system is a specialized operating system for network device 600 (e.g., a router, switch, firewall, and the like). For example, the network operating system may be Arista Extensible Operating System (EOS), which is a fully programmable and highly modular, Linux-based network operating system. Other network operating systems may be used.
  • Bus subsystem 130 can provide a mechanism for letting the various components and subsystems of management module 102 communicate with each other as intended. Although bus subsystem 130 is shown schematically as a single bus, alternative embodiments of the bus subsystem can utilize multiple busses.

Claims (20)

What is claimed is:
1. A network device comprising:
a processor; and
a memory communicatively coupled to the processor, the memory storing instructions executable by the processor to configure a data plane circuit to perform a method, the method comprising:
receiving a first packet from a first host on an ingress port, the first packet being addressed to a second host;
encapsulating the first packet for a first tunnel to produce a second packet;
recirculating the second packet through a loopback port;
encapsulating the recirculated packet for a second tunnel to produce a third packet; and
providing the third packet to a second network device for sending to the second host,
wherein:
the first host communicates with the second host through the first tunnel, and
the network device communicates with the second network device through the second tunnel.
2. The network device of claim 1, wherein:
the second network device decapsulates the third packet and provides the second packet to a third network device, and
the third network device decapsulates the second packet and provides the first packet to the second host.
3. The network device of claim 1, wherein the network device reaches the second network device through at least one intermediate network device.
4. The network device of claim 2, wherein:
encapsulating the first packet includes adding a first tunnel header to the first packet,
the first tunnel header comprises a destination IP address and a source IP address,
the destination IP address is a first tunnel endpoint IP address associated with the second network device, and
the source IP address is a second tunnel endpoint IP address associated with the network device.
5. The network device of claim 4, wherein:
the encapsulating the first packet further includes adding a destination address to the first packet, and
the destination address is a MAC address associated with the second network device or a MAC address associated with a next-hop network device.
6. The network device of claim 1, wherein:
encapsulating the recirculated packet includes adding a second tunnel header to the recirculated packet,
the second tunnel header comprises a destination IP address and a source IP address,
the destination IP address is a second tunnel endpoint IP address associated with the second network device, and
the source IP address is a second tunnel endpoint IP address associated with the network device.
7. The network device of claim 1, wherein:
the encapsulating the recirculated packet further includes adding a destination address to the recirculated packet, and
the destination address is a MAC address associated with a next-hop network device.
8. A method in a network device comprising:
receiving an original packet on an ingress port, the original packet being received from a first host and addressed to a second host;
encapsulating the original packet in a first tunnel packet for a first tunnel;
recirculating the first packet through a loopback port of the network device;
encapsulating the recirculated packet in a second tunnel packet for a second tunnel; and
egressing the packet encapsulated for the second tunnel.
9. The method of claim 8 wherein:
the packet encapsulated for the second tunnel is received by a second network device,
the second network device provides the first tunnel packet to a third network device, and
the third network device provides the original packet to the second host.
10. The method of claim 8 wherein:
the first tunnel is based on a first tunneling protocol; and
the second tunnel is based on a second tunneling protocol different from the first tunneling protocol.
11. The method of claim 10wherein encapsulating the original packet for the first tunnel comprises:
adding a tunnel header to the first tunnel packet; and
updating the destination Internet Protocol (IP) address of the tunnel packet
12. The method of claim 3 further comprising:
receiving a fourth tunnel packet for the second tunnel from a fourth network device on another ingress port;
decapsulating a third tunnel packet for the first tunnel from the fourth tunnel packet;
recirculating the third tunnel packet through the loopback port of the network device;
decapsulating another original packet from the third tunnel packet; and
egressing the another original packet.
13. The method of claim 8 wherein encapsulating the packet for the first tunnel comprises:
adding a GRE header to the packet; and
updating the destination address of the packet.
14. The method of claim 13 wherein encapsulating the packet for the second tunnel comprises:
adding a VXLAN header to the packet; and
updating the destination address of the recirculated packet to be the address of the second network device.
15. A network device comprising:
an ingress port, the ingress port receiving a first packet from a first host on an ingress port, the first packet being addressed to a second host;
a loopback port, the loopback port recirculating a second packet from a forwarding pipeline back into the forwarding pipeline;
the forwarding pipeline, the forwarding pipeline:
encapsulating the first packet in accordance with a VXLAN protocol to produce the second packet during a first pass through the forwarding pipeline; and
encapsulating the second packet in accordance with a GRE protocol to produce a third packet during a second pass through the forwarding pipeline; and
an egress port, the egress port providing the third packet to a second network device.
16. The network device of claim 15, wherein:
the second network device decapsulates the third packet and provides the second packet to a third network device, and
the third network device decapsulates the second packet and provides the first packet to the second host.
17. The network device of claim 15, wherein the network device reaches the second network device through at least one intermediate network device.
18. The network device of claim 15, wherein:
encapsulating the first packet includes adding a VXLAN header to the first packet,
the VXLAN header comprises a destination IP address and a source IP address,
the destination IP address is a VXLAN tunnel endpoint IP address associated with the third network device, and
the source IP address is a VXLAN tunnel endpoint IP address associated with the network device.
19. The network device of claim 18, wherein:
the encapsulating the first packet further includes adding a destination address to the first packet, and
the destination address is a MAC address associated with the second network device or a MAC address associated with a next-hop network device.
20. The network device of claim 15, wherein:
encapsulating the recirculated packet includes adding a GRE header to the recirculated packet,
the GRE header comprises a destination IP address and a source IP address,
the destination IP address is a GRE tunnel endpoint IP address associated with the second network device, and
the source IP address is a GRE tunnel endpoint IP address associated with the network device.
US17/208,174 2021-03-22 2021-03-22 Packet recirculation for tunneling encapsulation Active 2041-06-19 US11632445B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/208,174 US11632445B2 (en) 2021-03-22 2021-03-22 Packet recirculation for tunneling encapsulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US17/208,174 US11632445B2 (en) 2021-03-22 2021-03-22 Packet recirculation for tunneling encapsulation

Publications (2)

Publication Number Publication Date
US20220303364A1 true US20220303364A1 (en) 2022-09-22
US11632445B2 US11632445B2 (en) 2023-04-18

Family

ID=83283833

Family Applications (1)

Application Number Title Priority Date Filing Date
US17/208,174 Active 2041-06-19 US11632445B2 (en) 2021-03-22 2021-03-22 Packet recirculation for tunneling encapsulation

Country Status (1)

Country Link
US (1) US11632445B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230139559A1 (en) * 2021-10-28 2023-05-04 Avago Technologies International Sales Pte. Limited Systems for and methods of unified packet recirculation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130044763A1 (en) * 2011-08-17 2013-02-21 Teemu Koponen Packet processing in federated network
US20160261428A1 (en) * 2012-09-05 2016-09-08 Hangzhou H3C Technologies Co., Ltd. Packet Forwarding
US20170041209A1 (en) * 2015-08-03 2017-02-09 Telefonaktiebolaget L M Ericsson (Publ) Method and system for path monitoring in a software-defined networking (sdn) system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7738385B2 (en) 2004-11-30 2010-06-15 Broadcom Corporation Mirroring of data in a network device
US7787463B2 (en) 2006-01-26 2010-08-31 Broadcom Corporation Content aware apparatus and method
US10644985B1 (en) 2016-09-29 2020-05-05 Juniper Networks, Inc. Device-contained data plane validation
US11252230B2 (en) 2020-02-04 2022-02-15 Arista Networks, Inc. Mirroring to multiple destinations using a monitoring function
US11451473B2 (en) 2020-05-26 2022-09-20 Arista Networks, Inc. Egress mirroring packets to CPU using recirculation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130044763A1 (en) * 2011-08-17 2013-02-21 Teemu Koponen Packet processing in federated network
US20160261428A1 (en) * 2012-09-05 2016-09-08 Hangzhou H3C Technologies Co., Ltd. Packet Forwarding
US20170041209A1 (en) * 2015-08-03 2017-02-09 Telefonaktiebolaget L M Ericsson (Publ) Method and system for path monitoring in a software-defined networking (sdn) system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20230139559A1 (en) * 2021-10-28 2023-05-04 Avago Technologies International Sales Pte. Limited Systems for and methods of unified packet recirculation
US11949605B2 (en) * 2021-10-28 2024-04-02 Avago Technologies International Sales Pte. Limited Systems for and methods of unified packet recirculation
US20240214330A1 (en) * 2021-10-28 2024-06-27 Avago Technologies International Sales Pte. Limited Systems for and methods of unified packet recirculation

Also Published As

Publication number Publication date
US11632445B2 (en) 2023-04-18

Similar Documents

Publication Publication Date Title
US11627086B2 (en) Processing packets by an offload platform adjunct to a packet switching device
US10333836B2 (en) Convergence for EVPN multi-homed networks
US10757231B2 (en) Providing network efficiencies in forwarding packets among provider networks and applying segment routing policies
US10116559B2 (en) Operations, administration and management (OAM) in overlay data center environments
US10924399B2 (en) Segment routing packet policies and functions including an engineered reverse reply path providing efficiencies in communicating packets in a network
US9912614B2 (en) Interconnection of switches based on hierarchical overlay tunneling
CN111937358B (en) Multiple VRF generic device internet protocol addresses for fabric edge devices
CN108199958B (en) Universal secure resource pool service chain implementation method and system
US20230388221A1 (en) Optimized programming of forwarding data in network device hardware
US8526435B2 (en) Packet node for applying service path routing at the MAC layer
US11115316B2 (en) Learning orphan ports in a multi-chassis link aggregation group
CN111669422B (en) Message transmission method and device
US11632445B2 (en) Packet recirculation for tunneling encapsulation
US10965596B2 (en) Hybrid services insertion
US12057966B2 (en) Packet forwarding between hybrid tunnel endpoints
CN113347101B (en) Routing information sending control method, VTEP and computer readable storage medium
US11671897B2 (en) Distributed wireless gateway
EP4401364A1 (en) Reducing convergence time and/or avoiding split-brain in multi-homed ethernet segment deployments, such as esi-lag deployments
CN115695087A (en) Method, device, equipment and storage medium for establishing cross-domain local area network
CN114915589A (en) Message transmission method and device
CN117857257A (en) Method and system for intercommunication between cloud virtual machine and traditional network
CN116132364A (en) Message transmission method, device and system
Hou et al. Using tunneling techniques to realize virtual routers

Legal Events

Date Code Title Description
AS Assignment

Owner name: ARISTA NETWORKS, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:NANDAKUMARAN, PURUSHOTHAMAN;RANI, MUNISHA;SIGNING DATES FROM 20210317 TO 20210318;REEL/FRAME:055671/0070

FEPP Fee payment procedure

Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER

STCF Information on status: patent grant

Free format text: PATENTED CASE