Method for detecting packet lost in computer network, network device and storage medium

By introducing traffic monitors and IPFIX abnormal packets into the computer network, the metadata of lost packets is automatically collected and reported, which solves the problem that traditional detection methods are difficult to expand and automate, enables rapid identification and repair of network faults, and improves the reliability of network equipment. reliability and maintenance efficiency.

CN118740692APending Publication Date: 2024-10-01HEWLETT PACKARD ENTERPRISE DEV LP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411130779.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2020-06-30
Filing Date
2020-09-21
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When the existing technology detects packet loss in computer networks, the traditional pull-out model is difficult to expand, resulting in long fault detection time and cumbersome debugging process, making it impossible to realize automated fault repair and remedial response.

Method used

By introducing a traffic monitor on the network device, using the push model to collect metadata of packet loss, and generating IPFIX exception packets, including a unique exception code and next hop index, the cause and path of packet loss are automatically identified and reported, thereby determining the need Remedial components enable automated fault detection and repair.

Benefits of technology

It significantly reduces the detection time of network faults, improves the reliability and maintenance efficiency of network equipment, realizes automatic identification and remedial response to the causes of packet loss, and reduces the mean time to repair (MTTR).

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118740692A_ABST
    Figure CN118740692A_ABST
Patent Text Reader

Abstract

Generally, the present disclosure describes a method of detecting lost packets within a computer network, a network device, and a storage medium. An exemplary method includes generating, by a traffic monitor operating on a network device, an exception packet, the exception packet including: a unique exception code identifying a cause for a component in the network device to discard a transfer packet; and a next hop index identifying a forwarding path taken by the transit packet experiencing the anomaly. And forwarding the abnormal packet to a collector to be processed.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the Chinese application with application number 202010996862.X, application date September 21, 2020, and invention name “Method, network device and storage medium for detecting lost packets in a computer network”, and all its contents are incorporated herein by reference.

[0002] This application claims the benefit of Indian Provisional Application No. 202041016453 filed on April 16, 2020, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present disclosure relates to packet-based computer networks, and more particularly, to detecting lost packets within a computer network. Background Art

[0004] A computer network is a general term for interconnected computing devices that can exchange data and share resources. Exemplary network devices include layer 2 devices operating within layer 2 (i.e., data link layer) of the Open Systems Interconnection (OSI) reference model and layer 3 devices operating within layer 3 (i.e., network layer) of the OSI reference model. Network devices within a computer network typically include a control unit that provides control plane functions for the network device and provides forwarding components for routing or switching data units. In some cases, for example, a network device may include multiple packet forwarding engines (PFEs) and switch structures that collectively provide a forwarding plane for forwarding network traffic.

[0005] The control plane functions provided by the control unit include: storing the network topology in the form of a routing information base (RIB); executing routing protocols to communicate with peer routing devices to maintain and update the RIB; and providing management interfaces to allow users to access and configure network devices. The control unit maintains routing information that represents the overall topology of the network and defines routes to destination prefixes within the network.

[0006] The control unit derives a forwarding information base (FIB) including a plurality of forwarding entries generated by the control unit based on the routing information and the control information. The control unit installs the forwarding structure in the data plane to programmatically configure the forwarding component. The data and instructions constituting the forwarding entry define the internal forwarding path of each incoming packet received by the network device. For example, to generate a routing table lookup forwarding entry, the control unit selects a route defined by the network topology structure and maps the packet key information (e.g., the destination information and other selection information from the packet header) to one or more specific next-hop network devices and ultimately to one or more specific output interfaces of the interface card of the network device. In some cases, the control unit may install the forwarding structure in each PFE to update the forwarding table in each PFE and control traffic forwarding in the data plane. The dual-fork control and data plane function allows the forwarding table in each PFE to be updated without degrading the packet forwarding performance of the network device. Summary of the invention

[0007] In general, the present disclosure describes such a technology, that is, exporting packet loss information from a router or other networked device to a collector to reduce fault detection time in the network and provide information for troubleshooting components and automating remedial responses. The network device includes a flow monitor that inspects the dropped packets and forwards the metadata of the dropped packets to the monitor service. The flow monitor uses a push model to report data from entities in the network device that encounters packet loss. Whenever packet loss occurs inside the forwarding plane (e.g., PFE) of the device in the network, the flow monitor collects metadata related to, for example, the cause of the packet loss (e.g., known by the entity that lost the packet), the flow that encountered the loss (e.g., obtained from the content of the dropped packet), the flow direction (inlet / outlet), the input interface and / or output interface on which the packet flows, etc. The flow monitor captures the details of the dropped packet and generates an IPFIX exception packet using an Internet Protocol Flow Information Export (IPFIX) exception template. The IPFIX exception packet includes a unique forwarding exception code for identifying the cause of the drop and an identifier for the next hop of the dropped packet that facilitates determination of the component responsible for the drop. The collector uses this information in the IPFIX exception packet to determine whether remedial action is required for one or more control plane entities in the network device.

[0008] The exemplary method includes: generating an IPFIX exception packet by a flow monitor operating on a network device and forwarding the exception packet to a collector to be processed. The exception packet includes: a unique exception code, identifying the cause of the forwarding component in the network device discarding the transit packet; and a next hop index, identifying the forwarding path taken by the transit packet experiencing the exception; and

[0009] An exemplary network device includes a forwarding plane, a control plane including one or more processors, and a traffic monitor configured to be executed by a control unit. The forwarding plane includes multiple forwarding components to route transit packets from an input interface of the network device to an output interface. When a forwarding component drops a transit packet, the traffic monitor generates an exception packet including the dropped transit packet, and forwards the exception packet to a collector for processing, thereby identifying when the forwarding component that dropped the dropped transit packet experiences a failure. The exception packet includes: a unique exception code that identifies the cause of the forwarding component in the network device dropping the dropped transit packet, which is received on the network device; and a next hop index that identifies the forwarding path taken by the transit packet that experienced the exception.

[0010] An exemplary computer-readable medium includes instructions that, when executed, cause a network device to generate an exception packet including a unique exception code and a next hop index through a traffic monitor operating on the network device, wherein the unique exception code identifies the cause of a component in the network device discarding a transit packet, and the next hop index identifies a forwarding path taken by the transit packet experiencing the exception. The instructions also cause the network device to forward the exception packet to a collector to be processed.

[0011] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 A system within a network device is shown that operates according to the principles described in this disclosure.

[0013] Figure 2 is a block diagram illustrating an exemplary network device including a traffic monitor operating according to the principles described in this disclosure.

[0014] Figure 3 It is further shown in detail Figure 1 and Figure 2 A block diagram of an example of a network device in FIG.

[0015] Figure 4 is a conceptual diagram illustrating a network device that generates an IPFIX exception message in the egress direction in response to a dropped packet according to the principles described in this disclosure.

[0016] Figure 5 is a flowchart of an exemplary method for generating an IPFIX exception packet according to the principles described in the present disclosure.

[0017] Figure 6 is a flow chart of an exemplary method for processing a received IPFIX exception packet according to the principles described in the present disclosure.

[0018] Figure 7 An exemplary exception template for generating an IPFIX exception packet according to the principles described in this disclosure is shown. DETAILED DESCRIPTION

[0019] The technology described herein exports packet loss information from a router or other networked device to a collector (e.g., an internal or external service) to determine the cause of packet loss. These technologies facilitate reducing fault detection time in the network and provide information for troubleshooting components and automating remedial responses. In a network, packets (sometimes referred to as "transit packets") may be dropped (sometimes referred to as "dropped") inside any given router or networked device within the network topology. Typically, the forwarding plane of a high-performance distributed router platform includes a line card carrying multiple packet forwarding engines (PFEs). Packet loss may occur in any of these PFEs. The reasons for packet loss can be different. For example, packets may be dropped or discarded due to software vulnerabilities, misconfiguration of routing tables, policy devices, performance limitations, and / or firewall settings. The traditional way to debug packet loss is to log in to the network device and use CLI display commands to correlate forwarding status with packet paths. Then, use statistics to calculate areas where potential problems in the forwarding chain occur. This is the pull model. Pull information from the router to debug the drop. However, due to the large number of network devices in a network topology, debugging using a pull model to determine the dropped flows inside a given network device is tedious and not scalable.

[0020] As described below, the network device includes a flow monitor that checks (e.g., samples, etc.) the packets that are dropped and forwards the metadata of the dropped packets to the monitor service. The flow monitor uses a push model for data reported by entities in the network device that encounters packet loss. This facilitates the automation of the workflow involved in detecting, reporting, and mitigating these packet losses. Whenever packet loss occurs in the forwarding plane (e.g., PFE), the flow monitor will collect metadata related to, for example, the cause of the packet loss (e.g., known by the entity that lost the packet), the flow that encountered the loss (e.g., obtained from the content of the dropped packet), the direction (inlet / outlet), the input interface, and / or the output interface on which the packet flows, the packet length, etc., and generates an exception packet using one or more of these details. Metadata facilitates determining the root cause of the packet loss. In some examples, the flow monitor generates an Internet Protocol Flow Information Export (IPFIX) exception packet using an IPFIX exception template. The exception packet contains information elements about an exception code (e.g., an identifier that uniquely identifies the cause of the packet loss), the first N bytes of the dropped packet, and any related metadata collected by the flow monitor. A given IPFIX packet may also contain multiple instances of this information element that convey information about more than one flow experiencing packet loss. For each such flow, information elements such as anomaly code, and / or forwarding next hop id, etc. will be included.

[0021] In a sample flow of packets across a network device, packets are received on the input interface (IIF) of the ingress PFE of the network device and undergo a forwarding lookup. The packet is then sent to the egress PFE of the network device through the internal switch structure based on the lookup results. The egress PFE adds any relevant encapsulation to the packet and sends it through the output interface (OIF). Packets may be lost inside the network device for various reasons. This includes packet lookups pointing to a discard function, expired TTL, invalid checksums in the IP header, etc. All discarded packets (via a packet inspection mechanism) can be reported to a traffic monitor. The traffic monitor inspects the discarded packets for the original next hop index and other metadata of the packet (e.g., sampling, etc.), determines the forwarding exception code (based on the entity that dropped the packet), and encodes the metadata into the exception packet.

[0022] Abnormal packets are forwarded to a collector located inside or outside the network device. The collector collects and analyzes abnormal packets for patterns that indicate problems. For example, although occasional packet loss in the filter on the ingress PFE may not indicate a problem, more packet loss than expected (e.g., a threshold number of packets lost within a predefined time period) may indicate a problem. When a problem is detected, the monitor can provide an alert and / or initiate automated remedial measures. These technologies can reduce the mean time to repair (MTTR) of first-order network problems by automating the workflows involved in detecting, reporting, and mitigating these packet losses.

[0023] Figure 1 is a block diagram illustrating an exemplary network environment including a network device configured according to the techniques described in the present disclosure. Figure 1 The simplified network environment 100 in FIG. 1 is used to describe the principle of the present invention. Figure 1 108 , a network device 102 (sometimes referred to as a “core router”) communicates with edge routers 104A and 104B (collectively, “edge routers 104”) to enable customer networks 106A–106C (collectively, “customer networks 106”) to access network 108. For example, network 108 may be a service provider network or a cloud computing network. Network device 102 may exchange routing information with edge routers 104 and / or controller 112 to maintain an accurate representation of the topology of network environment 100. As described below, network device 102 may include multiple cooperating routing components that operate as a single node within service provider network 108. Network device 102 includes a chassis (e.g., a chassis) that couples together various internal routing components (e.g., line cards, switch cards, routing engine cards, etc.). Figure 1 not shown).

[0024] Although not shown, however, the network 108 may be coupled to one or more networks managed by other providers, and may thereby form part of a large-scale public network infrastructure (e.g., the Internet). Therefore, the customer network 106 may be considered an edge network of the Internet. The network 108 may enable computing devices within the customer network 106 to access the Internet, and may allow computing devices within the customer network 106 to communicate with each other. In another example, the service provider network 108 may provide network services within the core of the Internet. As another example, the network 108 may provide services (e.g., cloud computing services, etc.) to computing devices having the customer network 106. In any case, the network 108 may include various network devices (not shown) other than the network device 102 and the edge router 104 (such as additional routers, switches, servers, or other services).

[0025] In the example shown, edge router 104A is coupled to customer network 106A via access link 110A, and edge router 104B is coupled to customer networks 106B and 106C via additional access links 110B and 110C. Customer network 106 may be a network for geographically separated sites of an enterprise. Customer network 106 may include one or more computing devices (not shown) such as personal computers, laptops, handheld computers, workstations, servers, switches, printers, customer data centers, or other devices. Figure 1 The configuration of the network environment 100 shown in FIG. 1 is merely an example. The service provider network 108 may be coupled to any number of customer networks 106. Needless to say, for ease of description, only Figure 1 An exemplary number of customer networks 106A-106C are shown in FIG. Many different types of networks other than network 108 (including customer / enterprise networks, transport networks, aggregation or access networks, etc.) may employ instances of network device 102. For example, network traffic may flow from one customer network 106A to another customer network 106C through network device 102.

[0026] The network device 102 and the edge router 104 include components responsible for making the flow of packets pass through the device. These components may drop packets from time to time when certain criteria are met or due to potential problems (such as misconfiguration, encoding errors, etc.). For example, the network device 102 and the edge router 104 may include a PFE with an interface card having an input interface (IIF) and an output interface (OIF) including a filter. In this example, if one or more contents of the packet (e.g., the header of the packet) meet the filtering criteria, the packet can be discarded. As another example, the source or destination in the header of the packet may be interrupted or may not be associated with an entry on the forwarding table. In this example, the processor may discard the packet because the forwarding path cannot be determined. When the component discards the packet, the component can encapsulate the discarded packet in a sample frame (e.g., including an exception code and the next hop of the discarded packet, etc.). In such an example, the sample frame is forwarded to the traffic monitor 114.

[0027] In the example shown, the service provider network 108 includes a controller 112. In some examples, the controller 112 may include a software-defined networking controller. The controller 112 may monitor the service provider network 108 and provide an interface for an administrator to configure and / or monitor devices (e.g., network devices 102, edge routers 104, etc.) within the service provider network 108. In some examples, the controller 112 may perform diagnostic functions and display the health status of the network 108 in a graphical user interface to facilitate maintenance of the network 108. In other examples, the controller 112 may notify the topology of the network 108 and / or perform path calculation based on the topology of the network 108, and notify devices within the network 108 to perform routing updates.

[0028] In the example shown, each of the network device 102 and the edge router 104 includes one or more instances of a flow monitor 114. When the flow monitor 114 receives a dropped packet, the flow monitor 114 checks the header of the packet and generates an exception packet based on an exception template. Although IPFIX exception packets and IPFIX exception templates are described below, other exception reporting formats may be used instead. IPFIX is a format for reporting network information elements. IPFIX enables enterprise-specific extensions (e.g., via templates) to encode and report data. The flow monitor 114 retrieves the data of the dropped packet and generates an IPFIX exception packet. The flow monitor 114 forwards the IPFIX exception packet to the collector 116.

[0029] IPFIX is described in more detail in Claise et al., “Specification of the IP Flow Information Export (IPFIX) Protocol for the Exchange of Flow Information,” Internet Engineering Task Force (IETF) Request for Comments (RFC) 7011, September 2013, which is incorporated herein by reference in its entirety. More details on IPFIX information elements and templates can be found in Claise et al., “Information Model for IP Flow Information Export (IPFIX),” IETF RFC 7012, September 2013, which is incorporated herein by reference in its entirety.

[0030] In the example shown, the controller 112 includes a collector 116. Although in the example shown, the collector 116 runs on the controller 112, alternatively or in addition, in some examples, the collector can run on the control plane of any network device 102 and / or edge router 104. The collector 116 receives an IPFIX exception packet from the flow monitor 114. The collector 116 classifies the exceptions in the received IPFIX exception packet as normal or faulty. Normal exceptions are suppressed (e.g., not reported, not added to the exception log, etc.). The collector 116 enriches the exceptions classified as faults with additional information that helps to further identify the fault context and report the fault to the execution monitoring system. The collector 116 uses the metadata contained in the dropped packet to determine whether the dropped packet is normal or faulty. For example, if the collector receives an IPFIX packet indicating that the flow is dropped in the routing lookup after the data path, but the control plane status indicates that the destination IP of the packet should have a valid forwarding state, this indicates that an inconsistency has occurred. In response to determining that a component has a problem based on the IPFIX exception packet, the collector generates an alert. In some examples, the collector 116 can trigger an automatic remediation response.

[0031] The location of the collector 116 is selected based on the location of the state information required for anomaly classification and data enrichment (e.g., located on the control unit of the network device 102 / edge router 104, located on the controller 112, etc.). For example, IP packet drop classification can be performed on the network device 102 by examining the control plane view of the FIB state. When the collector 116 is located on the network device 102, the collector 116 can be a daemon that can also post-process the anomaly data (e.g., check the routing protocol daemon (RPD) forwarding state and take corrective actions). If the collector 116 is a service executed on the controller 112, the collector 116 can include a mirrored view of the forwarding state information for the network device / edge router 104 in the service provider network 108 to post-process the anomaly data. In some examples, the collector is adjusted to reduce the false alarm rate. For example, the threshold of the collector 116 can be set so that the collector 116 can identify normal drops as fault drops less than 10% of the time. In some examples, when collector 116 is a daemon operating on network device 102 or edge router 104, collector 116 operating on controller 112 can receive a fault report generated by network device 102 or edge router 104, which indicates when a fault is detected based on an IPFIX exception packet.

[0032] Figure 2is a block diagram illustrating an exemplary network device including a traffic monitor operating according to the principles described in this disclosure. The network device 102 may include a router such as a provider edge or customer edge router, a core router, or another type of network device such as a switch.

[0033] In this example, the network device 200 includes a control unit 201 that provides control plane functions for the device. The network device 200 is an example of the network device 102 and the edge router 104. The network device 200 also includes a plurality of forwarding components and a switch fabric 204 in the form of exemplary packet forwarding engines 202A-202N ("PFE 202"), which together provide a data plane for forwarding network traffic. The PFE 202 receives and transmits packets via interfaces of interface cards 206A-206N ("IFC 206"), each IFC 206 being associated with a respective one of the PFEs 202. Each PFE 202 and its associated one of the IFCs 206 may reside on a separate line card (not shown) of the network device 102. Exemplary line cards include a flexible programmable integrated circuit (PIC) concentrator (PFC), a dense port concentrator (DPC), and a modular port concentrator (MPC). Each IFC 206 may include interfaces for various combinations of Layer 2 (L2) technologies, including Ethernet, Gigabit Ethernet (GigE), and Synchronous Optical Network (SONET) interfaces. In various aspects, each PFE 202 may include more or fewer IFCs. Switch fabric 204 provides a high-speed interconnect for forwarding incoming packets to a selected one of PFEs 202 for output over the network.

[0034] Control unit 201 is connected to each PFE 202 via internal communication link 208. For example, internal communication link 208 may include a 100 Mbps Ethernet connection. Daemons 210A-210N ("daemons 210") executed by control unit 201 are user-level processes that run on network management software, execute routing protocols to communicate with peer routing devices, maintain and update one or more routing tables, and create one or more forwarding tables for installation into PFE 202, among other functions. Figure 1 Collector daemon 116 in FIG. 1 is an example of daemon 210 executed by control unit 201 . Daemon 210 is communicatively coupled to PFE 202 via PFE interface 212 within control unit 201 .

[0035] The control unit 201 may include one or more processors ( Figure 2 ), the instructions are such as for defining software or computer programs, stored in a computer-readable storage medium (again, Figure 2 2 (not shown), the computer-readable storage medium such as a non-transitory computer-readable medium including a storage device (e.g., a disk drive or an optical drive) and / or a memory such as a random access memory (RAM) (including various forms of dynamic RAM (DRAM), such as DDR2 SDRAM or static RAM (SRAM)), flash memory, another form of fixed or removable storage medium that can be used to carry or store the desired program code and program data in the form of instructions or data structures and can be accessed by the processor, or any other type of volatile or non-volatile memory that stores instructions for causing one or more processors to perform the techniques described herein. Alternatively, or in addition, the control unit 12 may include dedicated hardware for performing the techniques described herein (such as one or more integrated circuits, one or more application specific integrated circuits (ASICs), one or more application specific processors (Application Specific Special Processors) (ASSPs), one or more field programmable gate arrays (FPGAs), or any combination of one or more examples of the foregoing dedicated hardware).

[0036] As packets traverse the internal architecture of the network device 200, the PFEs 202 process the packets by performing a series of operations on each packet along a corresponding internal packet forwarding path. For example, the operations may be performed on each packet by any corresponding ingress interface, ingress PFE 202, egress PFE 202, egress interface, or other components of the network device 200 to which the packet is directed prior to egress (such as one or more service cards). The PFEs 202 each include a hardware and / or software forwarding unit (FU) 214 that examines the contents of each packet (or another packet property, such as the incoming interface) to make forwarding decisions, apply filters, and / or perform billing, management, traffic analysis, and / or load balancing. In one example, each PFE 202 configures the forwarding unit 214 as next-hop data that can be chained together as a series of "hops" along the internal packet forwarding path of the network device. The result of the packet processing determines the manner in which the packet is forwarded by PFE 202 from an input interface on an IFC 206 of the PFE 202 to an output interface on an IFC 206 of the PFE 202 or processed in other ways.

[0037] Forwarding unit 214 includes a lookup data structure (sometimes referred to as a "forwarding table") to perform a lookup operation (such as a tree (or trie) search, a table (or index) search, a filter determination and application, or a rate limiter determination and application). The lookup operation locks on a routing entry that matches the packet content or another property of a packet or packet flow (such as the inbound interface of the packet). As described below, forwarding unit 214 also includes a consistency data structure (sometimes referred to as a "consistency table") to store the attributes of the routing entry to facilitate the generation of consistency information for consistency checking. In some examples, the forwarding table and the consistency table are stored in separate data structures. Alternatively, in some examples, the forwarding table and the consistency table can be stored in the same data structure.

[0038] The components of forwarding unit 214 may drop packets from time to time. When a component of forwarding unit 214 drops a packet, forwarding unit 214 encapsulates the dropped packet and the next hop index and the abnormal code of the dropped packet into the IPFIX frame. The dropped packet is forwarded to flow monitor 114. The abnormal code is a predefined code that uniquely identifies the reason why the packet is dropped. In some examples, the abnormal code is four octets. In some examples, the abnormal code is predefined for the most common reason why the packet is dropped. An abnormal example is shown in Table 1 below.

[0039] Table 1

[0040]

[0041] Table 1 above includes exemplary names of forwarding exception codes and brief descriptions of the forwarding exception codes. In some examples, the forwarding exception code is associated with metadata (or a category of metadata) for inclusion in a corresponding exception packet.

[0042] The traffic monitor 114 generates an IPFIX exception packet and forwards it to the collector. The IPFIX exception packet includes exception forwarding data (eg, exception code, original packet content, and metadata and additional information about the exception context). The traffic monitor 114 uses an IPFIX exception template. Figure 7 An exemplary format of an IPFIX exception template 700 is shown. A description of an IPFIX exception template 700 including exemplary exception forwarding data is provided in Table 2 below.

[0043] Table 2

[0044]

[0045] The forwarding exception code ("forwardingExceptionCode") field contains a unique identifier that identifies the reason why the component lost a packet. In some examples, the forwarding component includes a list of one or more forwarding exception codes that correspond to actions that may cause the forwarding component to lose a packet. The forwarding component may include a forwarding exception code that corresponds to the reason for the packet loss in the sample frame of the forwarding sample packet. The forwarding next hop identifier ("forwarding next hop Id") field includes the value of the original next hop index of the dropped packet. The forwarding next hop identifier facilitates identification of the control plane entity that has programmed the original next hop.

[0046] Figure 3 It is further shown in detail Figure 2 2 is a block diagram of an exemplary embodiment of a network device 200 in FIG. 2. In this example, a control unit 201 provides an operating environment for a control plane 300 for executing various user-level daemons 210 that execute in a user space 302. The daemons 210 may include a command line interface daemon 304 (“CLI 304”), a routing protocol daemon 306 (“RPD 306”), a simple network management protocol daemon 308 (“SNMP 308”), and a collector daemon 116 (“collector 116”) in some examples. In this regard, the control plane 300 may provide routing plane, service plane, and management plane functionality for the network device 102. Various examples of the control unit 201 may include Figure 3 Additional daemons 210, not shown, that perform other control, management, or service plane functions for network device 102, and / or driver and other management data plane functions.

[0047] The daemon 210 operates on and interacts with the kernel 310, which provides a runtime operating environment for user-level processes. For example, the kernel 310 may include a UNIX operating system derivative such as Linux or Berkeley Software Distribution (BSD). The kernel 310 provides libraries and drivers through which the daemon 210 can interact with the underlying system. The PFE interface 212 of the kernel 310 includes a kernel-level library through which the daemon 210 (such as the collector daemon 116, and other user-level processes or user-level libraries) can interact with the PFE 202. For example, the PFE interface 212 may include a socket library for communicating with the PFE 202 over a dedicated network link.

[0048] The hardware environment 312 of the control unit 201 includes a microprocessor 314 that executes program instructions from a storage device ( Figure 3is loaded into the main memory ( Figure 3 310 and user space 302) to execute the software stack of the control unit 201 (including both the kernel 310 and the user space 302). The microprocessor 314 may include one or more general or special processors such as a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or any other equivalent logic device. Accordingly, as used herein, the term "processor" or "controller" may refer to any one or more of the aforementioned structures or any other structure operable to perform the techniques described herein.

[0049] The RPD 306 executes one or more internal and / or external routing protocols to exchange routing information with other network devices and stores the received routing information in a routing information base 316 (“RIB 316”). The RIB 316 may include information defining the topology of the network (including one or more routing tables and / or link state databases). The RPD 306 parses the topology defined by the routing information in the RIB 316 to select or determine one or more active routes through the network and then installs these routes into a forwarding information base 318 (“FIB 318”). As used herein, the information used to define each route in the RIB 316 is referred to as a “route entry”. Typically, the RPD 306 generates the FIB 318 in the form of a radix tree or other lookup tree to map packet information (e.g., header information with destination information and / or label stack) to the next hop and ultimately to the interface port of the interface card associated with the corresponding PFE 202.

[0050] The command line interface daemon 304 ("CLI 304") provides a shell through which an administrator or other management entity can modify the configuration of the network device 102 using text-based commands. The simple network management protocol daemon 308 ("SNMP 308") includes an SNMP agent that receives SNMP commands from a management entity to set and retrieve configuration and management information for the network device 102. For example, using the CLI 304 and SNMP 308, a management entity can enable / disable and configure services, install routes, enable / disable and configure rate limiters, and configure interfaces. As described in detail below, the RPD 306, CLI 304, and SNMP 308 configure the data plane 328 to implement the configured services and add / modify / delete routes in other ways.

[0051] PFE 202 implements data plane 328 (also referred to as a "forwarding plane") functionality to handle packet processing from the ingress interface where packets are received to the egress interface where packets are sent. Data plane 328 determines which data packets are forwarded through network device 102, applies services, rate limits the flow of packets, filters packets, and otherwise processes packets using forwarding tables installed by control plane 300 to data plane 328. Although Figure 3 Only PFE 202A is shown in detail, however, each of PFEs 202 includes similar components that perform substantially similar functions.

[0052] The PFE 202 binds actions performed on packets received by the PFE to identifiers of one or more properties of the packet. That is, upon identifying a particular packet property, the PFE 202 performs binding of actions to properties. The properties of a packet may include metadata of the packet, such as the ingress or egress interface of a particular packet (as determined by the PFE), and information carried by the packet and the packet's header, such as the packet's header fields, destination routing prefix, Layer 4 (L4) or transport layer protocol destination port, and the packet's payload. The actions bound to the characteristics of the packet may include calculation, dropping, forwarding to a specified next hop or interface, filtering, sampling, rate limiting, and quality of service (QoS) marking, differentiated services (DiffServ), load balancing, intrusion detection and prevention, L2 class of service (CoS), and L2 or L2 virtual private network (L2VPN) switching.

[0053] The PFE microprocessor 330 may execute a microkernel to provide an operating environment for processing packets through the forwarding unit 214. In the example shown, the PFE microprocessor 330 includes the traffic monitor 114 described above.

[0054] Figure 4 4 is a conceptual diagram illustrating a network device that generates an IPFIX exception message 400 in response to packet loss according to the principles described in the present disclosure. In the illustrated example, a packet 402 is received on an input interface (IIF) 404 of an ingress PFE 406. The ingress PFE 406 is Figure 2 2. Packet 402 undergoes a forwarding lookup performed by forwarding unit 214. Packet 402 is then sent through switch fabric 204 to egress PFE 408 based on the lookup result. Egress PFE 408 is Figure 24. The example of PFE 202 in FIG. 408. The egress PFE 408 adds any relevant encapsulation to the packet 402 and sends the packet 402 through the output interface (OIF) 410. In the example shown, the OIF 410 includes an output filter that makes a discard action when some packet fields are mapped to matching conditions in the filter (for example, the packet has a blocked source address, etc.). The egress PFE 408 forwards the discarded packet to the traffic monitor 114. The traffic monitor 114 examines the metadata of the discarded packet and determines the forwarding exception code. The traffic monitor 114 encodes the forwarding exception code, the original next hop identifier, and the metadata into an IPFIX exception packet 400 (sometimes collectively referred to as "abnormal forwarding data"). The traffic monitor 114 then forwards the IPFIX exception packet 400 to the collector 116.

[0055] Figure 5 is a flow chart of an exemplary method for generating an IPFIX exception packet 400 according to the principles described in the present disclosure. PFE 202 detects the dropped packet (502). PFE 202 forwards the dropped packet to the flow monitor 114 (504). The flow monitor 114 samples the metadata of the dropped packet and determines the forwarding exception code (506). For example, the flow monitor 114 can look up the forwarding exception code from a list of standardized forwarding exception codes based on the drop reason provided by the component that dropped the packet. The flow monitor 114 encodes the abnormal forwarding data into the IPFIX exception packet 400 (508). The flow monitor 114 transmits the IPFIX exception packet 400 to the collector 116 (510).

[0056] Figure 6Flowchart of an exemplary method for processing an IPFIX exception packet 400 according to the principles described in the present disclosure. The collector 116 receives the IPFIX exception packet 400 (602). The collector 116 determines the component to which the dropped packet belongs and the flow path where the packet is dropped (604). The collector 116 makes this determination based on the forwarding exception code, next hop identifier, and metadata included in the IPFIX exception packet. Based on the determination, the collector 116 classifies the anomaly within the IPFIX exception packet 400 as normal or fault (606). The anomaly can be a fault based on the reason why it is dropped (e.g., no defined forwarding path) and / or the anomaly can be a fault that occurs more frequently than expected (e.g., more times than a threshold number of times during a predetermined time period, etc.). If the anomaly is a fault, the collector 116 records and / or generates an alarm for the dropped packet (608). In some examples, the occurrence of one or more faults can trigger automated remedial measures (such as causing the network device to check the consistency of its forwarding table, etc.). For example, an administrator may define one or more rules including trigger conditions (eg, receiving a threshold number of abnormal packets with a specific abnormal code within a certain amount of time, etc.) and remedial actions (eg, triggering an SNMP trap, etc.).

[0057] The techniques described in this disclosure may be implemented at least in part in hardware, software, firmware, or any combination thereof. For example, various aspects of the described techniques may be implemented in one or more processors (including one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or any other equivalent integrated or discrete logic circuits, and any combination of such components). The term "processor" or "processing circuit" may generally refer to any of the aforementioned logic circuits, or other equivalent circuits, alone or in combination with other logic circuits. A control unit including hardware may also perform one or more techniques in this disclosure.

[0058] Such hardware, software, and firmware can be implemented in the same device or in a separate device to support the various operations and functions described in this disclosure. In addition, any described unit, module, or component can be implemented together or separately as a discrete but interoperable logical device. The different features described as modules or units are intended to highlight different functional aspects, and do not necessarily imply that the module or unit must be implemented by separate hardware or software components. Specifically, the functions associated with one or more modules or units can be performed by separate hardware or software components, or can be integrated in common or separate hardware or software components.

[0059] The techniques described in the present disclosure may also be encompassed or encoded into a computer-readable medium (such as a computer-readable storage medium containing instructions). For example, when the instructions are executed, the instructions embedded in or programmed into the computer-readable medium may cause a programmable processor or other processor to perform the method. Computer-readable media may include non-transitory computer-readable storage media and transient communication media. Tangible and non-transitory computer-readable storage media may include random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, hard disk, CD-ROM, floppy disk, cassette, magnetic media, optical media, or other computer-readable storage media. It should be understood that the term "computer-readable storage medium" refers to a physical storage medium, not a signal, carrier wave, or other transient medium.

[0060] Various examples have been described. These and other examples are within the scope of the following claims.

Claims

1. A method for detecting packet loss in a computer network, include: An abnormal packet is generated by a traffic monitor operating on a network device, the abnormal packet including: an exception code for identifying a cause of the forwarding component in the network device discarding the forwarded packet; and A next hop identifier is used to identify the forwarding path that the transit packet that experiences the exception will take, and the next hop identifier identifies information about the egress path that the transit packet will take from the network device to the destination network device; and forwards the exception packet to a collector for processing.

2. The method according to claim 1, further comprising: include: At least a portion of the transit packet is received by the traffic monitor from the forwarding component in the network device along with the next hop identifier, the exception code, and transit packet metadata.

3. The method according to claim 2, in, The transit packet is received via a next hop inserted into the transit packet to direct the transit packet to the traffic monitor. 4 . The method of claim 1 , further comprising triggering an alarm by the collector based on receiving a threshold number of exception packets, the exception packets including the exception code identifying a specific cause.

5. The method according to any one of claims 1 to 4, further comprising encoding the packet according to a predefined exception packet template.

6. The method according to any one of claims 1 to 4, in, The exception packet is an Internet Protocol stream information export exception packet.

7. The method according to any one of claims 1 to 4, further comprising determining, based on a checksum value of an Internet Protocol (IP) header of the transit packet, that the transit packet is discarded due to a bad IP header.

8. The method according to any one of claims 1 to 4, in, The exception code indicates that the transit packet is discarded due to expiration of the lifetime, discarding by a firewall, or mismatching of a virtual local area network.

9. The method according to any one of claims 1 to 4, further comprising inserting at least a portion of the transit packet into the abnormal packet.

10. The method according to any one of claims 1 to 4, in, The collector operates within a control plane of the network device.

11. A network device, include: a forwarding plane, comprising a plurality of forwarding components to route transit packets from an input interface to an output interface of the network device; A control plane, including one or more processors; The traffic monitor is configured to be executed by the control plane when one of the forwarding components drops a transit packet of the transit packets: Generate an exception packet for the discarded transit packet, the exception packet including: an exception code for identifying a cause of the forwarding component in the network device discarding the discarded transit packet, the discarded transit packet being received on the network device; and a next hop identifier for identifying a forwarding path that the transit packet experiencing the anomaly will take, the next hop identifier identifying information of an egress path that the transit packet will take from the network device to a destination network device; and The abnormal packets are forwarded to a collector for processing to identify when the forwarding component that discarded the discarded transit packets experiences a failure.

12. The network device according to claim 11, in, The traffic monitor is configured to receive at least a portion of the discarded transit packet accompanied by the next hop identifier, the exception code, and transit packet metadata from the forwarding component that discards the discarded transit packet.

13. The network device according to claim 12, in, The transit packet is forwarded to the traffic monitor via a next hop inserted into the transit packet.

14. The network device according to claim 11, in, The network device further includes the collector, and wherein the collector is configured to trigger an alarm based on receiving a threshold number of abnormal packets, the abnormal packets including an abnormal code identifying a specific cause.

15. The network device according to any one of claims 11 to 14, in, The traffic monitor is further configured to encode the packet according to a predefined abnormal packet template.

16. The network device according to any one of claims 11 to 14, in, The exception packet is an Internet Protocol stream information export exception packet.

17. The network device according to any one of claims 11 to 14, in, The traffic monitor is further configured to determine, based on a checksum value of an Internet Protocol (IP) header of the transit packet, that the transit packet is discarded due to a bad IP header.

18. The network device according to any one of claims 11 to 14, in, The exception code indicates that the transit packet is discarded due to expiration of the lifetime, discarding by a firewall, or mismatching of a virtual local area network.

19. The network device according to any one of claims 11 to 14, in, The traffic monitor is further configured to insert at least a portion of the transit packet into the abnormal packet.

20. A computer-readable storage medium having encoded thereon instructions for causing one or more programmable processors to perform the method of any one of claims 1 to 10.