Layer 2 tracking

The Layer 2 path tracing system addresses the challenge of tracing Layer 2 paths in complex networks by using tracing packets with appended information, facilitating efficient troubleshooting across tunnels and link aggregations.

DE102022109150B4Active Publication Date: 2026-03-12HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2026-03-12

AI Technical Summary

Technical Problem

Existing technologies lack effective methods for tracing Layer 2 paths in complex, heterogeneous networks, particularly across tunnels and link aggregations, leading to challenges in troubleshooting and managing network issues.

Method used

A Layer 2 path tracing system that sends a tracing packet with a specified packet type, allowing participating devices to append tracking information in both forward and reverse directions, enabling comprehensive Layer 2 path information collection using Layer 2 addresses.

Benefits of technology

Enables efficient Layer 2 path tracing in heterogeneous networks, treating tunnels as single hops and providing detailed path information without relying on Layer 3-based solutions, thus improving network troubleshooting efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

One comprehensive procedure: Sending a Layer 2 tracking packet with a packet type in a Layer 2 header of the Layer 2 tracking packet through an originating device (103), wherein the packet type indicates that the Layer 2 tracking packet is a packet for Layer 2 path tracking; Receiving a Layer 2 response packet from a respective participating device (105; 101, 102; 112) along a path to a target device (114, 116, 118) of the Layer 2 tracking packet, wherein the participating device supports Layer 2 path tracking; Received from payload data of the Layer 2 response packet, from tracking information with a forward path (210, 250, 310, 350) to the participating device traversed by the Layer 2 tracking packet, and a backward path (220, 260, 320, 360) from the participating device traversed by the Layer 2 response packet, is associated, wherein the tracking information in the Layer 2 response packet identifies a plurality of Layer 2 devices along the forward and reverse paths, and wherein the tracking information contains a plurality of Layer 2 network addresses, each of which identifies the plurality of Layer 2 devices; and Determine a Layer 2 path trace that includes at least the majority of Layer 2 network addresses between the source device and the destination device based on the trace information.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND area

[0001] The present disclosure relates to communication networks. More specifically, the present disclosure relates to a method and a system for facilitating layer 2 hop-by-hop path tracking.

[0002] US 2006 / 0013142A1 refers generally to network management and specifically to a technique for obtaining path information in relation to a network based on virtual private local area networks (VPLS).

[0003] US 6 538 997 B1 relates to diagnostics for computer networks, specifically to diagnostics for identifying problems in Layer 2.

[0004] The present invention is defined by independent claims 1, 11 and 20. Embodiments are the subject of the respective dependent claims. BRIEF DESCRIPTION OF THE FIGURES Fig. Figure 1A shows an example of layer 2 path tracing in a heterogeneous network according to one aspect of the present application. Fig. Figure 1B shows an example of a layer 2 path tracking package according to one aspect of the present application. Fig. Figure 2A shows an example of a layer 2 path trace over a tunnel according to one aspect of the present application. Fig. Figure 2B shows an example of a layer 2 path trace over a virtual gateway switch (VGS) of a distributed tunnel fabric according to one aspect of the present application. Fig. Figure 3A shows an example of a layer 2 path tracing for a path with unsupported switches, according to one aspect of the present application. Fig. Figure 3B shows an example of layer 2 path tracing to a target switch without support according to one aspect of the present application. Fig. Figure 4A shows a flowchart illustrating the process of an originating device that outputs a Layer 2 path tracing packet in accordance with an aspect of the present application. Fig. Figure 4B shows a flowchart illustrating the process of processing a layer 2 path tracking packet by a targeting device according to one aspect of the present application. Fig. Figure 5 shows a flowchart illustrating the process of processing a layer 2 path tracking packet by an intermediate device in accordance with an aspect of the present application. Fig. Figure 6 shows an example of a switch with layer 2 path tracing support according to one aspect of the present application. Fig. Figure 7 shows an example of a computer system with layer-2 path tracing support according to one aspect of the present application.

[0005] In the illustrations, identical numbers refer to the same elements of the illustration. DETAILED DESCRIPTION

[0006] The following description is intended to enable the person skilled in the art to manufacture and use the invention and is given in connection with a specific application and its requirements. Various modifications to the disclosed examples will be readily apparent to the person skilled in the art, and the general principles defined herein can be applied to other examples and applications without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the aspects shown but has the broadest scope of application compatible with the claims.

[0007] The internet is the transmission medium for a multitude of applications running on physical and virtual devices. Such applications have led to an increasing demand for data traffic. Consequently, device manufacturers are striving to develop switches with versatile capabilities. To this end, a switch can support various protocols and services. Layer 2 protocols, such as Ethernet, facilitate the operation of many such protocols and services. Therefore, identifying problems in Layer 2 paths (e.g., links and nodes) can be crucial for troubleshooting. Examples of such problems include Layer 2 configuration errors, cabling issues, and the identification of Layer 2 loops.

[0008] Features like a tunnel spanning a Layer 2 domain over a Layer 3 network can improve network efficiency. For example, a switch can support a tunnel to a remote switch (such as a VXLAN (Virtual Extensible Local Area Network) tunnel). A corresponding tunnel endpoint can map a corresponding virtual local area network (VLAN) to a corresponding tunnel network identifier (TNI), which identifies a virtual network for a tunnel. The TNI can appear in a tunnel header, which encapsulates a packet and is used to forward the encapsulated packet over a tunnel. For example, if the tunnel is based on VXLAN, the TNI can be a virtual network identifier (VNI) of a VXLAN header, and a tunnel endpoint can be a VXLAN tunnel endpoint (VTEP).

[0009] Managing and troubleshooting a complex network with tunnels and link aggregations (LAGs) can be challenging. Tracing Layer 2 paths can improve the troubleshooting process in such a network. Traceroute is a tool for diagnosing network problems at Layer 3 (e.g., based on the Internet Protocol (IP)). However, a similar tool does not exist for Layer 2 (e.g., for Ethernet). Due to the lack of Layer 2 tracing capabilities, diagnosing problems at Layer 2 can be challenging. Furthermore, heterogeneous networks with overlay technologies, such as tunnels, can increase the complexity of the tracing process.

[0010] One aspect of the present technology can provide a Layer 2 path tracing system. During operation, the system can send a Layer 2 tracing packet from an originating device, with a packet type specified in the Layer 2 header of the Layer 2 tracing packet. The packet type can indicate that the Layer 2 tracing packet is a tracing packet. The system can then receive a Layer 2 response packet from a corresponding participating device that supports Layer 2 path tracing, along a path to a target device of the Layer 2 tracing packet. Subsequently, the system can derive tracing information from the payload of the Layer 2 response packet about a forward path to the participating device traversed by the Layer 2 tracing packet and a backward path from the participating device traversed by the Layer 2 response packet.The tracking information can identify one or more Layer 2 devices along the forward and reverse paths and can include one or more Layer 2 identifiers corresponding to the identified one or more Layer 2 devices.

[0011] In one variation of this aspect, the Layer 2 trace packet and the Layer 2 response packet can be associated with a virtual local area network (VLAN). The one or more Layer 2 devices can then belong to the VLAN.

[0012] In one variation of this aspect, the tracking information for one or more identified Layer 2 devices may also include one or more of the following: a port identifier and a hostname.

[0013] In one variation of this aspect, the system can encapsulate the Layer 2 tracking packet in a tunnel header associated with a tunnel between the originating device and a remote endpoint. The tunnel can be formed based on a tunneling protocol.

[0014] In another variant, the tracking information can indicate the tunnel as a Layer 2 hop.

[0015] In one variation of this aspect, the system can define a Time-to-Leave (TTL) value in the header based on a predefined initial value. The initial value can specify the number of Layer 2 jumps to be tracked. Accordingly, the TTL value can be decremented for each participating device.

[0016] In another variant, the system can receive the Layer 2 response packet from a participating device whose TTL value has reached an expiration point. Accordingly, the Layer 2 response packet can then contain an indicator showing that the TTL value has reached its expiration point.

[0017] In one variation of this aspect, the system can specify a Layer 2 address of the target device as the target address of the Layer 2 tracking packet. The target address for the Layer 2 tracking packet must not change at each Layer 2 hop.

[0018] In one variation of this aspect, a direction indicator in the Layer 2 tracking packet can indicate a forward direction toward the target device. Similarly, the direction indicator in the Layer 2 response packet can indicate a reverse direction toward the originating device.

[0019] In one variation of this aspect, the forward and reverse paths may contain one or more non-participating devices that do not support Layer 2 path tracking. The non-participating devices may include one or more of the following: an intermediate device and the destination device.

[0020] The aspects described herein solve the problem of providing Layer 2 path tracking in a heterogeneous network by (i) sending a Layer 2 tracking packet that can accumulate information about a forward path to a destination device; and (ii) receiving a response tracking packet that can accumulate information about a backward path from a respective participating device along the path. A corresponding participating device can support and participate in Layer 2 path tracking. The participating device can append its local information to the tracking packets on both the forward and backward paths. Consequently, the originating device can receive information from a corresponding participating Layer 2 hop along the path to the destination device.

[0021] With existing technologies, Layer 2 tracing in a heterogeneous network is limited. Such tracing may not support Layer 2 hops across a tunnel or LAG. To overcome this limitation, Layer 3 tracing mechanisms like traceroute are often applied to a VXLAN tunnel by sending a packet with increasing time-to-leave (TTL) between two VTEPs of the VXLAN tunnel. However, the packet can only trace hops within the underlying physical network of the VXLAN tunnel. Therefore, the extension of a Layer 2 domain across the VXLAN tunnel (e.g., with VNIs) cannot be represented by the packet. In other words, the individual Layer 2 hop across a tunnel is not traced by the packet. Furthermore, some traceroute variants can provide Layer 2 information about Layer 3 hops based on their respective Internet Protocol (IP) addresses.However, the information gathered by such a variant is limited to the layer 3 route taken by the packet.

[0022] To solve this problem, a Layer 2 tracking mechanism can be used to collect Layer 2 information for each Layer 2 hop along a path to a destination device. This Layer 2 tracking mechanism can be called "Tracepath" because it tracks a path. Tracepath can use a Layer 2 tracking packet, such as an Ethernet frame, to trace the path. The Tracepath packet can be issued, forwarded, and answered based on appropriate Layer 2 addresses (such as MAC (Media Access Control) addresses). Consequently, Tracepath can facilitate the reverse operation of existing solutions by treating a Layer 2 domain spanning a VXLAN as a single Layer 2 hop.

[0023] During operation, a source device can send a Layer 2 tracking packet to a destination device. The tracking packet can contain a Layer 2 header specifying a packet type, indicating that it is a tracking packet, and a TTL value. If the tracking packet is an Ethernet frame, the packet type can be specified by the Ethertype field of the Ethernet header. The sending device can initialize the TTL value based on an initial TTL value. The source and destination addresses of the header can correspond to the Layer 2 addresses (e.g., MAC addresses) of the source and destination devices, respectively. The tracking packet payload can contain a direction indicator (e.g., a Boolean value) indicating onward tracking to the destination device. The payload can also include tracking information of the local device in conjunction with the forward direction.Tracking information associated with the local device may include one or more of the following elements: a hostname of the device, a port identifier of the port used for the packet, and a layer 2 address (e.g., a MAC address) of the device.

[0024] The packet can be processed by a corresponding Layer 2 hop on the path to the destination device based on the packet type and destination address. If the Layer 2 hop device supports Tracepath, it can identify the packet as a trace packet based on its packet type and participate in the trace process. Accordingly, the Layer 2 hop and the device can be referred to as a participating hop and a participating device, respectively. Conversely, if the Layer 2 hop device does not support Tracepath, it can forward the packet to the next Layer 2 hop based on the packet's destination address. Therefore, Tracepath can include a combination of participating and non-participating Layer 2 hops.

[0025] A participating device can be a network device (e.g., a switch) or a host (e.g., a user device). If the participating device is an intermediate device (i.e., not the destination device), it can append local tracking information, along with the forward direction, to the payload and decrement the TTL value in the header. The participating device can then forward the updated packet to the next Layer 2 hop based on the packet's destination address. This tracking information appending process is performed by each participating device along the path to the destination device. Consequently, the tracking packet can accumulate tracking information at a corresponding participating Layer 2 hop along the forwarding path to the destination device.If, however, the participating device is the targeting device, the participating device terminates forward tracking after attaching the local tracking information.

[0026] Each participating device can also generate a copy of the packet as a response packet. The participating device can modify the direction indicator in the payload to indicate a reverse trace to the originating device. The response packet's payload can also include local device tracking information in conjunction with the reverse direction. The participating device can specify the Layer 2 addresses of the participating and sending devices as the source and destination addresses of the response packet, respectively. The participating device can then forward the response packet to the next Layer 2 hop along a path back to the originating device. This process of appending tracking information is performed by each participating device along a path to the originating device.This allows the tracking packet to accumulate tracking information at a corresponding participating Layer 2 hop on the return journey to the originating device.

[0027] Because the response packet is generated from a copy of the trace packet, it can also contain forwarding information up to the participating device. This allows the originating device to receive a response packet from a corresponding participating Layer 2 hop, including the destination device. The response packet can contain both forward and reverse Layer 2 traces to the participating device within its Layer 2 payload. Since Tracepath can be used at Layer 2 using Layer 2 addresses, it does not rely on Layer 3-based solutions (such as Traceroute) and does not require looking up an IP address in an ARP (Address Resolution Protocol) table. Furthermore, the trace packet is encapsulated with a tunnel header to traverse a tunnel.Consequently, Tracepath can treat a tunnel as a single Layer 2 hop between the endpoints and combine tunnels with Layer 2 hops.

[0028] In this disclosure, the term "switch" is used in a general sense and can refer to any standalone or fabric switch operating at any network layer. The term "switch" is not to be understood as limiting the examples of the present invention to Layer 2 networks. Any device capable of forwarding traffic to an external device or another switch can be called a "switch." Any physical or virtual device (e.g., a virtual machine or a switch operating on a computer) capable of forwarding traffic to an end device can be called a "switch." Examples of a "switch" include, but are not limited to, a Layer 2 switch, a Layer 3 router, a routing switch, a component of a Gen Z network, or a fabric switch comprising a plurality of similar or heterogeneous smaller physical and / or virtual switches.

[0029] The term "packet" refers to a group of bits that can be transported together over a network. The term "packet" is not to be understood as limiting examples of the present invention to Layer 3 networks. The term "packet" can be replaced by other terms that refer to a group of bits, such as "message," "frame," "cell," "datagram," or "transaction." Furthermore, the term "port" can refer to the port that can receive or send data. The term "port" can also refer to the hardware, software, and / or firmware logic that can facilitate the operation of that port.

[0030] Fig. Figure 1A shows an example of Layer 2 path tracing in a heterogeneous network according to one aspect of the present application. A heterogeneous network 100 can comprise a number of switches and devices, as well as heterogeneous network components such as Layer 2 and Layer 3 hops and tunnels. In some examples, the network 100 can be an Ethernet, InfiniBand, or other network and use a corresponding communication protocol, such as Internet Protocol (IP), Fibre Channel over Ethernet (FCoE), or another protocol. The network 100 can include a distributed tunnel fabric 110 with switches 101, 102, 103, 104, and 105, each associated with MAC addresses 172, 174, 170, 176, and 178, respectively.

[0031] In Fig. A connection in Fabric 110, indicated by a dashed line, can be a tunnel. The switches of Fabric 110 can form a network of tunnels. Examples of tunnels include VXLAN, Generic Routing Encapsulation (GRE), Network Virtualization using GRE (NVGRE), Generic Networking Virtualization Encapsulation (Geneve), and Internet Protocol Security (IPsec). A corresponding connection in Fabric 110, indicated by a solid line, can be a connection in an underlying network (or underlay network) 150 of Fabric 110. The underlying network 150 can be a physical network, and a corresponding connection in the underlying network 150 can be a physical connection. A VPN 130, such as an Ethernet VPN (EVPN), can be provided over Fabric 110.Fabric 110 can contain a virtual gateway switch (VGS) 106, which can be coupled to an external switch 116 via a LAG 122. The LAG 122 can be a multi-chassis LAG and represent the connections between the VGS 106 and the switch 116 as a single aggregated connection.

[0032] Switches 102 and 105 can connect network 110 to external network 120 via external switch 112. Switch 105 can also be connected to external switch 114. Furthermore, switches 101 and 102 can operate together as a single switch to enable VGS 106. VGS 106 can be associated with one or more virtual addresses (e.g., a virtual IP address and / or a virtual MAC address). A corresponding tunnel established at VGS 106 can use the virtual address to form the tunnel endpoint. To efficiently manage data forwarding, switches 101 and 102 can maintain an Inter-Switch Link (ISL) 108 between them to share control and / or data packets. ISL 108 can be a Layer 2 or Layer 3 connection that enables data forwarding between switches 101 and 102.The ISL 108 can also be based on a tunnel between switches 101 and 102 (e.g. a VXLAN tunnel).

[0033] Because the virtual address of VGS 106 is associated with both switches 101 and 102, other tunnel endpoints, such as switches 103, 104, and 105, from Fabric 110 can consider VGS 106 as the other tunnel endpoint for a tunnel instead of switches 101 and 102. To route traffic toward VGS 106 in Fabric 110, a remote switch, such as switch 103, can act as the tunnel endpoint, while VGS 106 can be the other tunnel endpoint. From each of switches 103, 104, and 105, there can be a number of paths (such as cost-covering multiple paths or ECMP) to VGS 106. Each of these paths in the underlying network 150 can lead to any of the participating switches of VGS 106. Hosts (or end devices) 124 and 126 can be connected to switches 114 and 116, respectively. Additionally, host 128 can be connected to the external network 120 via switch 118.

[0034] With existing technologies, Layer 2 tracking in network 100 may be limited. Such tracking might not support Layer 2 hops across a tunnel, such as tunnel 132, or a LAG, such as LAG 122. To overcome this limitation, a Layer 3 mechanism, such as traceroute, can be applied to tunnel 132 by sending a packet with an increasing TTL between switches 103 and 105. However, the packet can only track the hops in the underlying network 150 between switches 103 and 104 and switches 104 and 105. Consequently, the extent of a Layer 2 domain across tunnel 132 (e.g., using TNIs) cannot be represented by the packet. In other words, the individual Layer 2 hop across tunnel 132 is not tracked by the packet. Furthermore, some traceroute variants can retrieve Layer 2 information about Layer 3 hops based on their respective IP addresses (e.g.,MAC addresses (which correspond to IP addresses). However, the information gathered by such a variant is limited to the Layer 3 route that the packet took in network 100.

[0035] To solve this problem, one or more devices in network 100 can support an instance of Tracepath (e.g., a tracing daemon or a piece of hardware) that can facilitate efficient Layer 2 path tracing in network 100 based on Layer 2 addresses. For example, switch 103 can be equipped with a Tracepath instance 160, which can also be referred to as Tracepath 160. Tracepath 160 can send a Layer 2 trace packet 152, which can accumulate information at each participating Layer 2 hop on a forward path to a destination device, such as switch 114. Tracepath 160 can then receive response trace packets 142 and 148 (or reply packets 142 and 148), which can collect information on a backward path from each participating device, such as switches 105 and 114, respectively.

[0036] Packet 152 can be transmitted over tunnel 132 based on an encapsulation header (e.g., a VXLAN header). To forward packet 152 to switch 114 based on MAC address 162, switch 103 can encapsulate packet 152 with a tunnel header to create the encapsulated packet 146 and forward packet 146 over tunnel 132. Therefore, switch 104 can forward packet 146 without processing packet 152. Consequently, the MAC address 176 of switch 104 is not included in packet 152. After receiving packet 146, switch 105 can decapsulate the encapsulation header to receive packet 152. Therefore, tunnel 132 can be considered a single Layer 2 hop between switches 103 and 105.

[0037] Switch 105 can determine that packet 152 is a trace packet based on the packet type in its header. Although packet 152 is destined for MAC address 162, which is not assigned to Switch 105, Switch 105 can still process it. For example, a Tracepath instance 140 (such as a Tracepath daemon) on Switch 105 can listen to an internal interface (such as a software interface) running on Switch 105's central processor. After identifying the packet type, Switch 105 can forward packet 152 to Tracepath 140. Tracepath 140 can then append local trace information to the payload of packet 152 to create packet 158 ​​and forward packet 158 ​​to Switch 105's forwarding hardware without modifying the source and destination addresses of packet 152. As a result, the packet type and the source and destination addresses of packets 152 and 158 can remain the same.

[0038] Switch 105 can append its local tracking information to packet 152 on the forward path to create an updated packet 158. Switch 105 can create a copy of packet 158 ​​as a reply packet 142 and change the direction indicator to show a reverse track to switch 103. Switch 105 can append its local tracking information, along with the reverse direction, to reply packet 142. Similarly, switch 114 can send a reply packet 144 to switch 103. Switch 105 can also append its local tracking information to the payload of reply packet 144, along with the reverse direction, to create packet 148. Switch 105 can decrement the TTL value in the header of packet 148 and send packet 148 to switch 103.In this way, Tracepath 160 on Switch 103 can receive information from each participating Layer 2 hop on both the forward and reverse paths to and from Switch 114.

[0039] Similarly, Tracepath 160 can issue Layer 2 trace packets 154 and 156 to collect Layer 2 information for a corresponding Layer 2 hop on a path to the destination switches 116 and 118, respectively. The Layer 2 trace packets 152, 154, and 156, and the response packets 142, 144, and 148, can be Ethernet frames. Accordingly, the trace packets 152, 154, and 156, and the response packets 142, 144, and 148, can be issued, forwarded, and answered based on appropriate Layer 2 addresses (e.g., MAC addresses).

[0040] For example, the source and destination addresses in the Layer 2 header of packet 152 can correspond to MAC addresses 170 and 162 of the originating switch 103 and the destination switch 114, respectively. Similarly, the source and destination addresses of packet 154 can correspond to MAC addresses 170 and 166 of switches 103 and 116, respectively. Likewise, the source and destination addresses of packet 156 can correspond to MAC addresses 170 and 164 of switches 103 and 118, respectively. On the other hand, the destination address in the Layer 2 header of reply packets 142, 144, and 148 can correspond to MAC address 170 of the originating switch 103. The source address in the Layer 2 header of reply packet 142 can correspond to MAC address 178 of switch 105. On the other hand, the source address in the layer 2 header of response packets 144 and 148 of MAC address 162 can correspond to switch 114.

[0041] The Layer 2 header of each trace packet, for example, Trace Packet 152, can contain a packet type indicating that packet 152 is a trace packet, as well as a TTL value. If Trace Packet 152 is an Ethernet frame, the packet type can be specified by the EtherType field of the Ethernet header. Tracepath 160 can initialize the TTL value based on an initial TTL value that can be predefined. The payload of packet 152 can contain a direction indicator showing the forward trace from switch 103 to destination switch 114. The payload can also contain trace information for each participating device on the forward path, in conjunction with the forward direction. For example, the payload can accumulate the trace information for switches 103, 105, and 114, in conjunction with the forward direction.

[0042] The tracking information associated with a participating device, such as Switch 103, may include one or more of the following elements: a hostname of Switch 103 (e.g., "Switch 103"), a port identifier of the outbound port used for packet 152, and the MAC address 179 of Switch 103. Because packet 152 is encapsulated while being forwarded through tunnel 132, Switch 104 forwards the encapsulated packet to Switch 105 without processing the inner packet 152. As a result, packet 152 does not gather any information associated with Switch 104, making tunnel 132 appear as a single Layer 2 hop.

[0043] Similarly, reply packet 142 can accumulate tracking information associated with each participating device on the reverse path from switch 105 to switch 103. Furthermore, reply packet 144 can accumulate tracking information associated with each participating device on the reverse path from switch 114 to switch 103. For example, switch 105 can append its local tracking information to packet 144 to create packet 148 and send packet 148 to switch 103. This allows switch 103 to receive a reply packet from switches 105 and 114. Since packets 142 and 144 are created from a copy of a corresponding tracking packet at switches 105 and 114, respectively, packets 142 and 148 can also contain the forwarding information up to switches 105 and 114.

[0044] Since packet 142 originates from switch 105, packet 142 can contain forward and backward Layer 2 trace information back to switch 105 in the Layer 2 payload of response packet 142. Conversely, since packet 144 originates from switch 114 and packet 148 is generated from packet 144, packet 148 can contain forward and backward Layer 2 trace information back to switch 114 in the Layer 2 payload of response packet 148. It is worth noting that Tracepath 160 can be used with MAC addresses. Therefore, Tracepath 160 does not rely on Layer 3-based solutions (such as Traceroute) and does not require looking up an IP address in an ARP table. Tracepath 160 can thus enable efficient Layer 2 path tracing in a heterogeneous network.

[0045] If, due to a problem on network 100, packet 158 ​​is dropped because of an expired TTL, a TTL expiration message is sent back to switch 103, indicating that the TTL value has reached an expiration value (e.g., zero) at an expiration hop. The payload of the TTL expiration message can contain forward trace information up to the expiration hop. The TTL value in the payload of the TTL expiration message can be reset to the initial value or the TTL value of packet 158. The TTL expiration message can accumulate backward trace information at a corresponding Layer 2 hop from the drop point to switch 103. Consequently, a TTL expiration message can contain both forward and backward trace information up to the expiration hop. The expiration hop can specify the Layer 2 point at which the TTL value reached the expiration value.

[0046] Fig. Figure 1B shows an example of a Layer 2 tracking packet according to one aspect of the present application. A tracking or response packet 180 may contain a Layer 2 header 182 and Layer 2 payload 184. Header 182 may contain one or more of the following elements: a packet type 192, a source address 194, a destination address 196, and a TTL 198. If header 182 is an Ethernet header, type 192 may be the Ethertype field of the Ethernet header, and source and destination addresses 194 and 196 may be MAC addresses. Each participating intermediate device can determine that packet 180 is a tracking packet based on the type 192 in the header 182 of packet 180. Although packet 180 may be destined for a destination address 196, which may not be assigned to the local device, the intermediate participating device can process packet 180 without changing the source and destination addresses 192 and 196, respectively.

[0047] Furthermore, the payload 184 can contain tracking information 190 about a respective forward and reverse hop between the source and destination devices. The payload 184 can contain tracking information 190 in conjunction with the direction 191. For example, if a device contains information 190 about the forward path, the direction 191 can indicate the forward direction. Conversely, the same device can also contain information 190 about the reverse path, and the direction 191 can indicate the reverse direction. The direction 191 can be specified based on a value (e.g., "0" or "1") or a series of characters (e.g., "forward" or "backward") in the payload 184. A Tracepath instance, such asTracepath 160 on switch 103 or tracepath 140 on switch 105 can determine the direction 191 based on a direction indicator 188, which can be a field of header 182 or a value in payload 184. The direction indicator 188 can be represented as a Boolean value.

[0048] The payload 184 can be represented based on a dictionary data structure. The packet 180 can then contain metadata in the payload 184, represented as a dictionary with an index as "forward" or "backward," and values ​​as a list representing tracking information 190. The tracking information 190 associated with a device can contain one or more of the following elements: a hostname of the device, the Layer 2 address of the device, and a port identifier of the port used for the packet 180. Consequently, the list can have the form ['Hostname', 'MAC Address', 'Port Identifier']. For example, the dictionary entry generated by switch 103 might be: {'forward': [['Switch 103', 'MAC Address 170', 'Port 134']]}.

[0049] If the tracing or response packet 180 is routed through a tunnel (e.g., tunnel 132), packet 180 can be encapsulated with a tunnel encapsulation header 186 (e.g., a VXLAN header). The Layer 3 source and destination addresses (e.g., IP addresses) of header 186 can correspond to the tunnel endpoints. For example, if packet 180 corresponds to packet 152, the encapsulated packet can correspond to packet 146. The source and destination IP addresses of header 186 can then be the IP addresses of switches 103 and 105, respectively.

[0050] When Tracepath 160 sends trace packet 152, Tracepath 160 can include trace information associated with Switch 103 in the payload of packet 152 and forward packet 152 over port 134 of Switch 103. The trace information associated with Switch 103 can include a hostname of Switch 103 (e.g., "Switch 103"), the MAC address 170, and the identifier of port 134. Because packet 146 is forwarded over tunnel 132, Switch 104 does not process the inner packet 152 and therefore does not append any local trace information to packet 152. Switch 105 can receive packet 146 over port 136 of Switch 105 and extract packet 152 from packet 146.

[0051] Since switch 105 is an intermediate switch on the path to switch 114, tracepath 140 on switch 105 can append the local trace information to the payload of packet 152 in conjunction with the forward direction (e.g., direction 191 in packet 180) and generate packet 158. The generation of packet 158 ​​enables the accumulation of trace information at each participating Layer 2 hop on the forward path from switch 103 to switch 114. The trace information associated with switch 105 can include the hostname of switch 105 (e.g., "Switch 105"), the MAC address 178, and the identifier of port 136. The dictionary in packet 158 ​​can be { 'forward': [[ 'Switch 103', 'MAC address 170', 'Port 134'], [ 'Switch 105', 'MAC address 178', 'Port 136']]}. Tracepath 140 can decrement the TTL value in the header of packet 158 ​​and forward packet 158 ​​to switch 114, which can be the next Layer 2 hop based on the destination address (i.e.,MAC address 162) of packet 158. Here, the destination address for packets 152 and 158 remains the same, even though packet 152 is processed in a Layer 2 hop at switch 105.

[0052] This process of appending trace information is performed by each participating device on the path to Switch 114. When Switch 114 receives packet 158, it can terminate forward tracing after appending the local trace information. Tracepath 140 can also generate the response packet 142 by copying packet 158 ​​and modifying the direction indicator (e.g., indicator 188 in packet 180) to indicate a reverse trace to Switch 103. For example, Tracepath 140 can change the Boolean value of the direction indicator. In conjunction with the reverse direction, Tracepath 140 can include backward trace information in the payload of packet 142.

[0053] Since packet 152 is received via tunnel 132, Tracepath 140 can include the trace information associated with switch 103 (shown as a dashed line) in packet 142. This information might include the hostname of switch 103 (e.g., "Switch 103"), the MAC address 170, and the identifier of port 134. Tracepath 140 can also reset the TTL value in the header of packet 142 to a predetermined initial value or to the TTL value of packet 152 based on a TTL selection policy. Switch 105 can then forward packet 142 to switch 103. The dictionary in package 142 can be: {'forward': [['Switch 103', 'MAC address 170', 'Port 134'], ['Switch 105', 'MAC address 178', 'Port 136']]}; {'backward': [['Switch 103', 'MAC address 170', Port 134']]}.

[0054] Similarly, switch 105 can receive a response packet 144 from switch 114 via port 138 of switch 105. Tracepath 140 can then append reverse trace information associated with switch 105 (indicated by dashed lines) to packet 144 to create packet 148. This information can include the hostname of switch 105 (e.g., "Switch 105"), the MAC address 178, and the identifier of port 138. The creation of packet 148 allows the accumulation of trace information at a corresponding participating Layer 2 hop on the return path from switch 114 to switch 103. Tracepath 140 can decrement the TTL value in the header of packet 148. Switch 105 can then send packet 148 to switch 103.

[0055] Since packet 144 is received by switch 114 and packet 148 is generated from packet 144, packet 148 can contain forward and backward trace information up to switch 114. The destination address for packets 144 and 148 can remain the same, even though packet 144 is processed in a Layer 2 hop at switch 105. This process of appending trace information is performed by a participating device on the path to switch 103. When switch 103 receives packet 148, Tracepath 160 can terminate the backward trace after appending the local trace information.

[0056] Fig. Figure 2A shows an example of Layer 2 path tracing through a tunnel according to one aspect of the present application. During operation, Switch 103 may attempt to locate the device with MAC address 162 (i.e., Switch 114) on Network 100. Switch 103 may receive an instruction to initiate the tracing from a management device or administrator. The management device may configure, monitor, and / or control one or more devices on Network 100. Switch 103 may receive the instruction in the form of a script, a remote command, or a command-line interface (CLI) command. Switch 103 may learn the MAC address 162 from Tunnel 132. Consequently, Switch 103 may store the MAC address 162, in association with Tunnel 132, in a local Layer 2 forwarding table.Similarly, the Switch 105 can learn the MAC address 162 from port 138 and store it in a local forwarding table in conjunction with port 138.

[0057] To initiate Layer 2 tracing to switch 114, Tracepath 160 can generate a Layer 2 trace packet with a Layer 2 header. The packet type in the Layer 2 header can indicate that it is a trace packet. The source and destination addresses of the Layer 2 header can correspond to MAC addresses 170 and 162, respectively. The TTL value of the header can be set to a predetermined initial value. Tracepath 160 can include local trace information 202, associated with the forward direction, in the trace packet payload. The information 202 can contain ['Switch 103', 'MAC address 170', 'Port 134']. Thus, the dictionary in the trace packet can be {'forward': [Information 202]}. Based on the entry in the local forwarding table corresponding to MAC address 162, switch 103 can send the tracking packet over tunnel 132 by encapsulating the packet with an encapsulation header.

[0058] Since Switch 105 is the remote endpoint of Tunnel 132 and can be reached via Port 134, Switch 103 can send the encapsulated packet to Switch 104 via Port 134. Based on the encapsulation header, Switch 104 can forward the encapsulated packet to Switch 103 without processing the inner trace packet. After receiving the encapsulated packet via Port 136, Switch 105 can remove the encapsulation header and receive the inner trace packet. Switch 105 can then forward the trace packet to Tracepath 140 on Switch 105, based on the packet type. Tracepath 140 can decrement the TTL value in the header and append Trace Information 204, along with the forward direction, to the trace packet's payload. Information 204 can contain ['Switch 105', 'MAC address 178', 'Port 136']. The dictionary in the tracking packet can therefore be {'forward': [Information 202, Information 204]}.Based on the local forwarding table, the Switch 105 can send the tracking packet via port 138 without changing the source and destination addresses.

[0059] Tracepath 140 can also generate a response packet from the trace packet. Tracepath 140 can change the direction indicator to show a reverse trace to Switch 103. Therefore, the source and destination addresses of the response packet can correspond to MAC addresses 178 and 170, respectively. Tracepath 140 can insert trace information 202, along with the reverse direction, into the payload of the response packet. The dictionary in the response packet can thus be: {'forward': [Information 202, Information 204]}; {'backward': [Information 202]}. Based on the local forwarding table, Switch 105 can send the response packet over port 136.

[0060] After receiving the trace packet on port 232, switch 114 can forward the trace packet to tracepath 230 on switch 114, based on the packet type. Tracepath 230 can append trace information 206, along with the forward direction, to the trace packet's payload. Information 206 can contain ['Switch 114', 'MAC address 162', 'Port 232']. Since the trace packet's destination MAC address 162 is a local address (i.e., assigned to switch 114), tracepath 230 can terminate the trace packet forwarding. Tracepath 230 can then generate a response packet from the trace packet. Tracepath 230 can reset the TTL value and change the direction indicator to show a reverse trace in the response packet's header. The source and destination addresses of the response packet can then correspond to MAC addresses 162 and 170, respectively.

[0061] Tracepath 230 can append trace information 206 in conjunction with the reverse direction in the payload of the response packet. The dictionary of the response packet can therefore look like this: { 'forward': [Information 202, Information 204, Information 206]}; {'backwards': [Information 206]}. Here, [Information 202, Information 204, Information 206] can represent the forward trace information 210. Based on the local forwarding table, switch 114 can send the response packet via port 232. After receiving the response packet via port 138, switch 105 can forward the response packet to tracepath 140 based on the packet type. Tracepath 140 can decrement the TTL value in the header and append trace information 208 in the reverse direction to the payload of the response packet. The information 208 can contain ['Switch 105', 'MAC address 178', 'Port 138']. Thus, the dictionary in the response package can look like this: {‚forward': [Information 202, Information 204, Information 206]}; {‚backward': [Information 206, Information 208]}.Based on the local forwarding table, switch 105 can encapsulate the response packet and send the encapsulated packet to switch 103 via tunnel 132.

[0062] After receiving the encapsulated packet via port 134, switch 103 can remove the encapsulation header and receive the inner reply packet. Switch 103 can then forward the reply packet to tracepath 160 based on the packet type. Tracepath 160 can append trace information (202) to the reply packet's payload, in conjunction with the reverse direction. The reply packet dictionary might therefore look like this: {'forward': [Information 202, Information 204, Information 206]}; {'backward': [Information 206, Information 208, Information 202]}. Here, [Information 206, Information 208, Information 202] can represent the reverse trace information 220. Since the destination MAC address 170 of the response packet is a local address, Tracepath 160 can terminate the forwarding of the response packet. Tracepath 160 can store forward trace information 210 and reverse trace information 220, along with the MAC address 162, in a trace table 200. Tracepath 160 can also pass the information to a device that can display it.

[0063] Fig. Figure 2B shows an example of Layer 2 path tracing over a VGS of a distributed tunnel fabric according to one aspect of the present application. Since VGS 106 is a virtual gateway, VGS 106 can be associated with a virtual address (e.g., a virtual IP address) shared by switches 101 and 102. Therefore, tunnel 280 between switch 103 and VGS 106 can be established based on the IP address of switch 103 and the virtual IP address of VGS 106. Consequently, packets forwarded through tunnel 280 to the virtual IP address can take any path in the underlying network 150 that can lead to any of the participating switches of VGS 106. In other words, if switch 103 sends a packet over tunnel 280, this packet can be forwarded to switch 101 via port 272 or to switch 102 via port 274, based on a VGS selection policy (e.g.,based on round-robin distribution, load balancing, or bandwidth utilization).

[0064] Furthermore, switch 116 can be connected to switches 101 and 102 via LAG 122. Therefore, the connections within LAG 122 can be considered a single aggregated connection. Consequently, switch 116 can receive packets from switches 101 and 102. To forward packets via LAG 122, switch 116 can select either switch 101 or 102 as the destination. Switch 116 can select a specific connection or switch within LAG 122 to send all traffic belonging to a data flow, specifying a source and destination address pair. Switch 116 can also select a connection or switch within LAG 122 to send individual packets. For example, if switch 116 sends a packet via a LAG, that packet can be forwarded to switch 101 via port 276 or to switch 102 via port 278, based on a selection policy for a LAG (e.g.,based on round-robin distribution, load balancing, or bandwidth utilization).

[0065] During operation, switch 103 can attempt to locate the device with MAC address 166 (i.e., switch 116) on network 100. Switch 103 can learn MAC address 166 from tunnel 280. Consequently, switch 103 can store MAC address 166, associated with tunnel 280, in a local Layer 2 forwarding table. To initiate a Layer 2 trace to switch 116, tracepath 160 can generate a Layer 2 trace packet with a Layer 2 header. The source and destination addresses of the Layer 2 header can correspond to MAC addresses 170 and 166, respectively. The TTL value of the header can be set to a predetermined initial value. To forward the trace packet, switch 103 can select either port 272 or 274 as the output port. Assume the selection policy chooses Switch 102 as the destination switch connected to Tunnel 280. Therefore, Switch 103 can select Port 274 as the output port.

[0066] Tracepath 160 can then include local trace information 252, along with the forward direction, in the trace packet's payload. Information 252 can contain ['Switch 103', 'MAC address 170', 'Port 274']. The dictionary in the trace packet can then be {'forward': [Information 252]}. Based on the local forwarding table, Switch 103 can send the packet over tunnel 280 by encapsulating the packet with an encapsulation header. The source and destination addresses of the encapsulation header can be the IP address of Switch 103 and the virtual IP address of VGS 106. Since VGS 106 is the remote endpoint of tunnel 280 and its outgoing port is port 274, the trace packet is forwarded to Switch 102.

[0067] After receiving the encapsulated packet on port 284, switch 102 can remove the encapsulation header and receive the inner trace packet. Based on the packet type, switch 102 can forward the trace packet to tracepath 244 on switch 102. Tracepath 244 can decrement the TTL value in the header and append trace information 254, along with the forward direction, to the trace packet's payload. Information 254 can contain ['Switch 102', 'MAC address 174', 'Port 284']. Thus, the dictionary in the trace packet can be {'forward': [Information 252, Information 254]}. Based on the local forwarding table, switch 102 can send the trace packet on port 288 without changing the source and destination addresses.

[0068] Tracepath 244 can also generate a response packet from the trace packet. Tracepath 244 can change the direction indicator to show a return trace to Switch 103. Therefore, the source and destination addresses of the response packet can correspond to MAC addresses 174 and 170, respectively. Tracepath 244 can insert trace information 252, along with the reverse direction, into the payload of the response packet. The dictionary of the response packet can thus be: { 'forward': [Information 252, Information 254]}; { 'backward': [Information 252]}. Based on the local forwarding table, Switch 102 can send the response packet over port 284.

[0069] After receiving the trace packet on port 278, switch 116 can forward the trace packet to tracepath 246 on switch 116, based on the packet type. Tracepath 246 can insert trace information 256, along with the forward direction, into the trace packet's payload. The information 256 can contain ['Switch 116', 'MAC address 166', 'Port 278']. Since the destination MAC address 166 of the trace packet is a local address, tracepath 246 can terminate the forwarding of the trace packet. Tracepath 246 can then generate a response packet from the trace packet. Tracepath 246 can reset the TTL value and change the direction indicator to show a reverse trace in the response packet's header. The source and destination addresses of the response packet can then correspond to MAC addresses 166 and 170, respectively.

[0070] Since the next-hop switch is VGS 106, switch 116 can select either port 276 or 278, which lead to switches 101 and 102 respectively, as its outbound port. Suppose switch 116 selects port 276 as the outbound port for forwarding via LAG 122. Accordingly, tracepath 246 can append the corresponding trace information 262, in conjunction with the reverse direction, to the payload of the response packet. Information 262 can contain ['Switch 116', 'MAC address 166', 'Port 276']. Therefore, the dictionary of the response packet can look like this: {'forward': [Information 252, Information 254, Information 256]}; {'backward': [Information 262]}. In this case, [Information 252, Information 254, Information 256] can represent forward trace information 250. Switch 116 can then forward the response packet to Switch 101 via port 276.

[0071] After receiving the reply packet on port 286, switch 101 can forward the reply packet to tracepath 242 based on the packet type. Tracepath 242 can decrement the TTL value in the header and append trace information 264, along with the reverse direction, to the payload of the reply packet. Information 264 can contain ['Switch 101', 'MAC address 172', 'Port 286']. The reply packet dictionary can therefore look like this: {'forward': [Information 252, Information 254, Information 256]}; {'backward': [Information 262, Information 264]}. Based on the local forwarding table, switch 105 can encapsulate the reply packet and send the encapsulated packet to switch 103 via tunnel 280.

[0072] After receiving the encapsulated packet via port 272, switch 103 can remove the encapsulation header and receive the inner reply packet. Switch 103 can forward the reply packet to tracepath 160 based on the packet type. Tracepath 160 can append trace information 266, in conjunction with the reverse direction, to the payload of the reply packet. Information 266 can contain ['Switch 103', 'MAC address 170', 'Port 272']. The dictionary of the reply packet might therefore look like this: {'forward': [Information 252, Information 254, Information 256]}; {'backward': [Information 262, Information 264, Information 266]}. ​​Here, [Information 262, Information 264, Information 266] can represent the reverse trace information 260. Since the destination MAC address 170 of the response packet is a local address, Tracepath 160 can terminate the forwarding of the response packet. Tracepath 160 can store forward trace information 250 and reverse trace information 260 in conjunction with the MAC address 166 in the trace table 220.

[0073] Fig. Figure 3A shows an example of Layer 2 path tracing for a path with unsupported switches, according to one aspect of the present application. During operation, switch 103 may attempt to locate the device with MAC address 164 (i.e., switch 118) on network 100. Switch 103 can learn MAC address 166 from port 332, which connects to switch 112. Consequently, switch 103 can store MAC address 166, associated with port 332, in a local Layer 2 forwarding table. To this end, Tracepath 160 can generate a Layer 2 trace packet with a Layer 2 header. The packet type in the Layer 2 header can indicate that the packet is a trace packet. The source and destination addresses of the Layer 2 header can correspond to MAC addresses 170 and 164, respectively. The TTL value of the header can be set to a predetermined initial value.

[0074] The next Layer 2 hop for the trace packet, Switch 112, can be reached via port 332. Tracepath 160 can contain local trace information 302 in conjunction with the forward direction in the trace packet payload. The information 302 can contain ['Switch 103', 'MAC address 170', 'Port 332']. Therefore, the dictionary in the trace packet can be {'forward': [information 302]}. Based on the entry in the local forwarding table corresponding to MAC address 162, Switch 103 can send the trace packet to Switch 112 via port 332.

[0075] After receiving the trace packet on port 334, switch 112 can forward the trace packet to its tracepath 322 based on the packet type. Tracepath 322 can decrement the TTL value in the header and append trace information 304, along with the forward direction, to the trace packet's payload. Information 304 can contain ['Switch 112', 'MAC address 330', 'Port 334']. The dictionary in the trace packet can thus be {'forward': [Information 302, Information 304]}. Based on the local forwarding table, switch 112 can send the trace packet on port 336 without changing the source and destination addresses.

[0076] Tracepath 322 can also generate a response packet from the trace packet. Tracepath 322 can change the direction indicator to show a reverse trace to Switch 103. Therefore, the source and destination addresses of the response packet can correspond to MAC addresses 330 and 170, respectively. Tracepath 322 can insert trace information 304, along with the reverse direction, into the payload of the response packet. The dictionary of the response packet can thus be: { 'forward': [Information 302, Information 304]}; { 'backward': [Information 304]}. Using the local forwarding table, Switch 112 can determine that MAC address 170 is reachable via port 334. Switch 112 can then forward the response packet to Switch 103 via port 334.

[0077] Switches 342 and 344 on external network 120 may be intermediate switches on the way to switch 118, but they might not support Layer 2 packet tracking. For example, packet tracking might be specific to a virtual local area network (VLAN). The tracking and response packets can then belong to a particular VLAN. Consequently, switches configured with that VLAN can participate in the Layer 2 packet tracking process. If switches 342 and 344 are not configured with the VLAN for which packet tracking is initiated, they might not participate in packet tracking, even if Tracepath is supported locally. In other words, an affected switch could belong to the VLAN.

[0078] Conversely, if Tracepath is not supported on switches 342 and 344, switch 342 might not recognize the trace packet as a Layer 2 trace packet due to its packet type. Because the destination MAC address 164 is not a local address, switch 342 can forward the trace packet to the next-hop switch 344. Similarly, switch 344 can forward the trace packet to the next-hop switch 118, based on the trace packet's destination MAC address of 164. This allows the tracing process to continue even if one switch does not support Tracepath. Because switches 342 and 344 do not process the trace packet (indicated by dashed arrows), the TTL value for the corresponding Layer 2 hops might not be incremented.

[0079] Switch 118 can receive the trace packet on port 338 and forward it to Tracepath 324 on Switch 118 based on the packet type. Tracepath 324 can append trace information 306, along with the forward direction, to the trace packet's payload. Information 306 can contain ['Switch 118', 'MAC address 164', 'Port 338']. Since the trace packet's destination MAC address 162 is a local address, Tracepath 324 can terminate the trace packet's forwarding. Tracepath 324 can then generate a response packet from the trace packet. Tracepath 324 can reset the TTL value and change the direction indicator to show a reverse trace in the response packet's header. The source and destination addresses of the response packet can then correspond to MAC addresses 164 and 170, respectively.

[0080] Tracepath 324 can append trace information 306, along with the reverse direction, to the payload of the response packet. Therefore, the dictionary in the response packet can look like this: {'forward': [Information 302, Information 304, Information 306]}; {'backward': [Information 306]}. Here, [Information 302, Information 304, Information 306] can represent the forward trace information 310. Based on the local forwarding table, switch 118 can send the response packet over port 338. Switches 342 and 344 can forward the trace packet over the external network 120 based on the destination MAC address 170 of the response packet.

[0081] After receiving the reply packet on port 336, switch 112 can forward the reply packet to tracepath 322 based on the packet type. Tracepath 322 can decrement the TTL value in the header and append trace information 308, along with the reverse direction, to the payload of the reply packet. Information 308 can contain ['Switch 112', 'MAC address 330', 'Port 336']. Therefore, the reply packet dictionary might look like this: {forward': [Information 302, Information 304, Information 306]}; {backward': [Information 306, Information 308]}. Based on the local forwarding table, switch 112 can send the reply packet to switch 103 on port 334.

[0082] Switch 103 can receive the response packet via port 332 and forward it to Tracepath 160 based on the packet type. Tracepath 160 can append trace information 302, related to the reverse direction, to the payload of the response packet. The response packet dictionary might look like this: {'forward': [Information 302, Information 304, Information 306]}; {'backward': [Information 306, Information 308, Information 302]}. Here, [Information 306, Information 308, Information 302] can represent the reverse trace information 320. Since the destination MAC address 170 of the response packet is a local address, Tracepath 160 can terminate the forwarding of the response packet. Tracepath 160 can store forward tracing information 310 and backward tracing information 320 in conjunction with the MAC address 164 in the trace table 200.

[0083] Fig. Figure 3B shows an example of Layer 2 path tracing to a destination switch without support, according to one aspect of the present application. In this example, the destination switch 118 may not support path tracing. However, a switch 346, which may be located on the path to switch 118 in the external network 120, may support tracepath. Consequently, switch 112 can forward the tracepath packet addressed to switch 118 to switch 346 via port 372. The dictionary in the tracepath packet from switch 112 may be {'forward': [Information 302, Information 304]}. Furthermore, the dictionary in the response packet may be {'forward': [Information 302, Information 304]}; {'backward': [Information 302]}, as in conjunction with Fig. 3A described.

[0084] After receiving the trace packet on port 374, switch 346 can forward the trace packet to tracepath 326 on switch 346, based on the packet type. Tracepath 326 can decrement the TTL value in the header and append trace information 352, along with the forward direction, to the trace packet's payload. Information 352 can contain ['Switch 346', 'MAC address 340', 'Port 374']. Thus, the dictionary in the trace packet can be {forward': [Information 302, Information 304, Information 352]}. Based on the local forwarding table, switch 112 can send the trace packet to switch 118. However, since switch 118 does not support tracepaths, it may not respond.

[0085] Tracepath 326 can also generate a response packet from the trace packet. Tracepath 326 can change the direction indicator to show a reverse trace to Switch 103. Therefore, the source and destination addresses of the response packet can correspond to MAC addresses 340 and 170, respectively. Tracepath 326 can insert trace information 352, along with the reverse direction, into the payload of the response packet. The dictionary in the response packet can thus look like this: { 'forward': [Information 302, Information 304, Information 352]}; { 'backward': [Information 352]}. Using the local forwarding table, Switch 346 can determine that MAC address 170 is reachable via port 374. Switch 346 can then forward the response packet to Switch 112 via port 374.

[0086] Switch 112 can receive the response packet via port 372 and forward it to tracepath 322 based on the packet type. Tracepath 322 can decrement the TTL value in the header and append trace information 356, along with the reverse direction, to the payload of the response packet. Information 356 can contain ['Switch 112', 'MAC address 330', 'Port 372']. Thus, the dictionary in the response packet can look like this: {'forward': [Information 302, Information 304, Information 352]}; {'backward': [Information 354, Information 356]}. Based on the local forwarding table, switch 112 can send the response packet to switch 103 via port 334.

[0087] Switch 103 can receive the response packet via port 332 and forward it to Tracepath 160 based on the packet type. Tracepath 160 can append trace information 302, related to the reverse direction, to the payload of the response packet. The response packet dictionary might look like this: {'forward': [Information 302, Information 304, Information 352]}; {'backward': [Information 354, Information 356, Information 302]}. Here, [Information 354, Information 356, Information 302] can represent the reverse trace information 360. Since Switch 118 might not participate in reverse tracing, [Information 302, Information 304, Information 352] can represent the forward trace information 350, indicating the traced segment of the path to Switch 118.

[0088] Since the destination MAC address 170 of the response packet is a local address, Tracepath 160 can stop forwarding the response packet. If no response packet is received from Switch 118 by Switch 103, Tracepath 160 can re-receive the trace packet for Switch 118 a predetermined number of times. If no response packet is received from Switch 118 after these re-attempts, Tracepath 160 can determine that Switch 118 (i.e., the device associated with MAC address 164) does not support Tracepath. Tracepath 160 can then consider the forward trace information 350 and the backward trace information 360 as the final trace for MAC address 164. Tracepath 160 can then store the forward trace information 350 and the backward trace information 360, associated with MAC address 164, in trace table 200.

[0089] Fig. Figure 4A shows a flowchart illustrating the process of an originating device issuing a Layer 2 tracepath packet in accordance with an aspect of this application. During operation, the device can receive an instruction to issue a tracepath command for a destination device (Operation 402). The device can determine an output port associated with the destination device (Operation 404) and determine trace information associated with the local device (Operation 406). The trace information can include a hostname, a MAC address, and an identifier of a port associated with a trace packet. The device can then generate a Layer 2 trace packet with a Layer 2 header (Operation 408) and specify a Layer 2 address of the destination device as the destination address in the header (Operation 410).

[0090] The device can then set the packet type to indicate a tracking packet and set an indicator to show forward tracking (Operation 412). The device can also set the TTL value in the header based on an initial TTL value (Operation 414). The initial TTL value can be predefined (e.g., based on a default or configured value). The device can then include the tracking information, along with the forward direction, in the payload (Operation 416). The tracking information can be contained in a dictionary data structure with an index indicating "forwarding." The device can then forward the tracking packet over the output port (Operation 418).

[0091] Fig. Figure 4B shows a flowchart illustrating the process of a target device processing a Layer 2 trace packet in accordance with an aspect of the present application. During operation, the device can receive a Layer 2 trace packet destined for the local device via an input port (Step 452). The device can then determine whether tracepath is supported locally (Step 454). If tracepath is not supported locally, the device can discard the packet (Step 474). If, however, tracepath is supported locally, the device can identify the received packet as a tracepath packet based on the packet type in the header (Step 456) and determine the forward trace information associated with the local device (Step 458). The device can then append the forward trace information, along with the forward direction, to the payload (Step 460).

[0092] The device can then swap the source and destination addresses in the header to generate a response packet (Operation 462). The device can determine an output port associated with the destination address (Operation 464) and reverse trace information associated with the local device (Operation 466). The forward and reverse trace information can be the trace information for the forward and reverse trace paths, respectively. The device can then append the reverse trace information, along with the reverse direction, to the payload (Operation 468). The device can set the TTL value in the header based on an initial TTL value (Operation 470). Finally, the device can forward the response packet via the output port corresponding to the destination address (Operation 472).

[0093] Fig. Figure 5 shows a flowchart illustrating the process of processing a Layer 2 trace packet by an intermediate device in accordance with an aspect of the present application. During operation, the device can receive a Layer 2 trace packet destined for a remote device via an input port (Operation 502). The device can then determine whether tracepath is supported locally by the device (Operation 504). If tracepath is supported locally, the device can identify the received packet as a trace packet based on the packet type in the header (Operation 506) and determine the local trace information associated with the local device (Operation 508).

[0094] The device can then append the local trace information, along with the forward direction, to the payload (Operation 510). The device can then decrement the TTL value in the header (Operation 512). If tracepath is not supported locally (Operation 504) or the TTL value in the header is decremented (Operation 512), the device can forward the trace packet via the output port corresponding to the destination address (Operation 514). The device can check whether reverse tracing is enabled for intermediate devices (Operation 516).

[0095] If reverse tracing is enabled for intermediate devices, the device can generate a copy of the trace packet as a response packet and set the direction indicator to show reverse tracing (Operation 518). The device can place the Layer 2 addresses of the originating device and the local device as the source and destination addresses, respectively, in the header (Operation 520). The device can append the local trace information, along with the reverse direction, to the payload (Operation 522). The device can set the TTL value in the header based on an initial TTL value (Operation 524). The device can then forward the response packet via the output port corresponding to the destination address (Operation 526).

[0096] Fig. Figure 6 shows an example of a switch with Layer 2 path tracking support according to one aspect of the present application. In this example, a switch 600 can include a number of communication ports 602, a packet processor 610, and a storage device 650. The switch 600 can also include switch hardware 660 (e.g., processing hardware of the switch 600, such as its application-specific integrated circuit (ASIC) chips) that contains information on the basis of which the switch 600 processes packets (e.g., determines output ports for packets). The packet processor 610 extracts and processes header information from the received packets. The packet processor 610 can identify a switch identifier (e.g., a MAC address and / or an IP address) that is associated with the switch 600 in the header of a packet.

[0097] The 602 communication ports can provide communication channels between switches for communication with other switches and / or user devices. These communication channels can be implemented via a standard communication port and can be based on any open or proprietary format. The 602 communication ports can include one or more Ethernet ports capable of receiving frames encapsulated in an Ethernet header. The 602 communication ports can also include one or more IP ports capable of receiving IP packets. Each IP port can receive an IP packet and can be configured with an IP address. The 610 packet processor can process Ethernet frames and / or IP packets. Each 602 communication port can function as an input port and / or an output port.

[0098] The Switch 600 can manage a database 652 (e.g., in the storage device 650). The database 652 can be a relational database that can run on one or more instances of a database management system (DBMS). Information related to routing, configuration, and the interface of the Switch 600 can be stored in the database 652. The Switch 600 can contain a tracepath logic block 630, which can support a tracepath instance on the Switch 600. The tracepath logic block 630 can include a forward logic block 632, a backward logic block 634, and an intermediate logic block 636.

[0099] The forward logic block 632 can enable the switch 600 to act as an output device for forward tracing using Tracepath. For this purpose, the forward logic block 632 can output a Layer 2 path tracing packet, as described in conjunction with... Fig. 4A described. The reverse logic block 634 can enable the switch 600 to act as a target device for reverse tracing using Tracepath. For this purpose, the reverse logic block 634 can process a Layer 2 path trace packet and initiate reverse tracing, as described in conjunction with Fig. 4B described. The intermediate logic block 636 can enable the switch 600 to act as an intermediate device for tracing using Tracepath. For this purpose, the intermediate logic block 636 can continue forward tracing and initiate backward tracing, as described in conjunction with Fig. 5 described.

[0100] Fig.Figure 7 shows an example of a computer system with layer-2 path-tracing support according to one aspect of the present application. The computer and communication system 700 comprises a processor 702, a storage device 704, and a storage device 708. The storage device 704 may include a volatile storage device (e.g., a dual in-line memory module (DIMM)). In addition, the computer and communication system 700 may be connected to a display device 710, a keyboard 712, and a pointing device 714. The storage device 708 may store an operating system 716, a layer-2 path-tracing system 718, and data 736. The layer-2 path-tracing system 718 may support a path instance on the computer and communication system 700.

[0101] The Layer 2 tracing system 718 may contain instructions which, when executed by the computer and communication system 700, can cause the computer and communication system 700 to perform the procedures and / or processes described in this disclosure. In particular, the Layer 2 tracing system 718 may contain instructions for issuing a Layer 2 tracing packet (forward logic block 720). The Layer 2 tracing system 718 may also contain instructions for processing a Layer 2 tracing packet and initiating backward tracing (backward logic block 722). Furthermore, the Layer 2 tracing system 718 may contain instructions for continuing forward tracing and initiating backward tracing (intermediate logic block 724).

[0102] The Layer 2 tracking system 718 can also contain instructions for sending and receiving messages, such as tracking and response packets (communication logic block 734). The data 736 can contain any data that may facilitate the operation of the Layer 2 tracking system 718. The data 736 can include, among other things, tracking information connected to the computer and communication system 700.

[0103] The data structures and code described in this detailed description are typically stored on a computer-readable storage medium, which can be any device or medium capable of storing code and / or data for use by a computer system. Computer-readable storage media include, but are not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as floppy disks, magnetic tapes, CDs (Compact Discs), DVDs (Digital Versatile Discs or Digital Video Discs), or other media capable of storing computer-readable media known today or developed in the future.

[0104] The procedures and processes described in the "Detailed Description" section can be embodied as code and / or data, which can be stored on a computer-readable storage medium as described above. When a computer system reads and executes the code and / or data stored on the computer-readable storage medium, the computer system executes the methods and processes that are embodied as data structures and code and stored on the computer-readable storage medium.

[0105] The procedures and processes described here can be executed by and / or contained within hardware modules or devices. These modules or devices may include, but are not limited to, an application-specific integrated circuit (ASIC chip), a field-programmable gate array (FPGA), a dedicated or shared processor that executes a specific software module or piece of code at a specific time, and / or other programmable logic devices known today or developed later. When the hardware modules or devices are activated, they execute the procedures and processes contained within them.

[0106] The foregoing descriptions of examples of the present invention are provided for illustrative and descriptive purposes only. They do not claim to be exhaustive and do not limit this disclosure. Accordingly, many modifications and variations will be obvious to those skilled in the art. The scope of the present invention is defined by the accompanying claims.

Claims

[1] A procedure, comprising: Sending a Layer 2 tracking packet with a packet type in a Layer 2 header of the Layer 2 tracking packet through an originating device (103), wherein the packet type indicates that the Layer 2 tracking packet is a packet for Layer 2 path tracking; Receiving a Layer 2 response packet from a respective participating device (105; 101, 102; 112) along a path to a target device (114, 116, 118) of the Layer 2 tracking packet, wherein the participating device supports Layer 2 path tracking; Received from payload data of the Layer 2 response packet, from tracking information with a forward path (210, 250, 310, 350) to the participating device traversed by the Layer 2 tracking packet, and a backward path (220, 260, 320, 360) from the participating device traversed by the Layer 2 response packet, is associated, wherein the tracking information in the Layer 2 response packet identifies a plurality of Layer 2 devices along the forward and reverse paths, and wherein the tracking information contains a plurality of Layer 2 network addresses, each of which identifies the plurality of Layer 2 devices; and Determine a Layer 2 path trace that includes at least the majority of Layer 2 network addresses between the source device and the destination device based on the trace information. [2] The method according to claim 1, wherein the layer 2 tracking packet and the layer 2 response packet are associated with a virtual local area network (VLAN), and wherein the majority of the identified layer 2 devices belong to the VLAN. [3] The method according to claim 1, wherein the tracking information for each of the plurality of identified layer 2 devices further includes a port identifier and / or a hostname. [4] The method according to claim 1, further comprising encapsulating the layer-2 tracking package in a tunnel header associated with a tunnel between the originating device and a remote endpoint, wherein the tunnel is formed based on a tunnel protocol. [5] The method according to claim 4, wherein the tracking information indicates the tunnel as a layer-2 hop. [6] The method according to claim 1, further comprising setting a Time-to-Live (TTL) value in the header based on a predetermined initial value, wherein the initial value specifies a number of Layer 2 hops to be tracked and wherein the TTL value is decremented at each participating device. [7] The method according to claim 6, further comprising receiving the layer 2 response packet from a participating device in which the TTL value has reached a decay value, wherein the layer 2 response packet contains an indicator that shows that the TTL value has reached the decay value. [8] The method according to claim 1, further comprising specifying a layer 2 network address of the target device as the target address of the layer 2 tracking packet, wherein the target address for the layer 2 tracking packet is not changed at each layer 2 hop. [9] The method according to claim 1, wherein a direction indicator in the layer 2 tracking packet indicates a forward direction to the targeting device, and wherein the direction indicator in the layer 2 response packet indicates a backward direction to the originating device. [10] The method according to claim 1, wherein the forward and reverse paths include one or more non-participating devices (342, 344, 118) that do not support layer 2 path tracking, wherein the non-participating devices include one or more of the following: an intermediate device and the target device. [11] A non-transitory computer-readable storage medium (708) which stores instructions which, when executed by a computer, cause the computer to perform a procedure comprising: Sending a Layer 2 tracking packet with a packet type in a Layer 2 header of the Layer 2 tracking packet from an originating device (102), wherein the packet type indicates that the Layer 2 tracking packet is a packet for Layer 2 path tracking; Receiving a Layer 2 response packet from a respective participating device (105; 101, 102; 112) on a path to a target device (114, 116, 118) of the Layer 2 tracking packet, wherein the participating device supports Layer 2 path tracking; and Obtained from payload data of the Layer 2 response packet, from tracking information associated with a forward path (210, 250, 310, 350) to the participating device traversed by the Layer 2 tracking packet and a backward path (220, 260, 320, 360) from the participating device traversed by the Layer 2 response packet, wherein the tracking information in the Layer 2 response packet identifies a plurality of Layer 2 devices along the forward and backward paths, and wherein the tracking information contains a plurality of Layer 2 network addresses, each identifying the plurality of Layer 2 devices; and Determine a Layer 2 path trace that includes at least the majority of Layer 2 network addresses between the source device and the destination device based on the trace information. [12] The non-transitory computer-readable storage medium according to claim 11, wherein the layer 2 trace packet and the layer 2 response packet are associated with a virtual local area network (VLAN), and wherein the majority of the identified layer 2 devices belong to the VLAN. [13] The non-transitory computer-readable storage medium according to claim 11, wherein the tracking information for each of the identified plurality of layer 2 devices further includes a port identifier and / or a hostname. [14] The non-transitory computer-readable storage medium according to claim 11, wherein the method further comprises encapsulating the layer 2 tracking packet in a tunnel header associated with a tunnel between the originating device and a remote endpoint, wherein the tunnel is formed based on a tunnel protocol and wherein the tracking information specifies the tunnel as a layer 2 hop. [15] The non-transitory computer-readable storage medium according to claim 11, wherein the method further comprises setting a Time-to-Live (TTL) value in the header based on a predetermined initial value, wherein the initial value specifies a number of Layer 2 hops to be tracked, and wherein the TTL value is decremented at each participating device. [16] The non-transitory computer-readable storage medium according to claim 15, wherein the method further comprises receiving the layer 2 response packet from a participating device in which the TTL value has reached an expiration value, wherein the layer 2 response packet contains an indicator that shows that the TTL value has reached the expiration value. [17] The non-transitory computer-readable storage medium according to claim 11, wherein the method further comprises setting a layer 2 network address of the target device as the target address of the layer 2 tracking packet, wherein the target address for the layer 2 tracking packet is not changed at each layer 2 hop. [18] The non-transitory computer-readable storage medium according to claim 11, wherein a direction indicator in the layer 2 tracking packet indicates a forward direction to the targeting device, and wherein the direction indicator in the layer 2 response packet indicates a backward direction to the originating device. [19] The non-transitory computer-readable storage medium according to claim 11, wherein the forward and reverse paths include one or more non-participating devices (342, 344, 118) that do not support layer 2 path tracking, wherein the non-participating devices include one or more of the following: an intermediate device and the targeting device. [20] A computer system (700), comprising: at least one processing resource (702) and a storage device (708) that stores instructions executable by the at least one processing resource to: to send a Layer 2 tracking packet with a packet type in a Layer 2 header of the Layer 2 tracking packet, where the packet type indicates that the Layer 2 tracking packet is a packet for Layer 2 path tracking; to receive a Layer 2 response packet from a respective participating device (105; 101, 102; 112) on a path to a target device (114, 116, 118) of the Layer 2 tracking packet, wherein the participating device supports Layer 2 path tracking; to obtain tracking information from the payload of the Layer 2 response packet, which is associated with a forward path (210, 250, 310, 350) to the participating device traversed by the Layer 2 tracking packet and a backward path (220, 260, 320, 360) from the participating device traversed by the Layer 2 response packet, wherein the tracking information in the Layer 2 response packet identifies a plurality of Layer 2 devices along the forward and backward paths, and wherein the tracking information contains a plurality of Layer 2 network addresses, each identifying the plurality of Layer 2 devices; and to determine a layer 2 path trace that includes at least the majority of layer 2 network addresses between the source device (103) and the destination device based on the trace information.

Citation Information

Patent Citations

  • Obtaining path information related to a virtual private LAN services (VPLS) based network

    US20060013142A1

  • Layer-2 trace method and node

    US6538997B1