Purposely corrupted packet for connection information

A method for providing connection information between a first communication device and a second communication device is described. At least one purposely corrupted packet that includes a purposely corrupted packet attribute is generated by the first communication device. The at least one purposely corrupted packet is transmitted by the first communication device to the second communication device via a port coupled to a communications network. A count of packets that are transmitted, the count of packets including the at least one purposely corrupted packet and selected additional packets, is generated by the first communication device. An indication of the count of the at least one purposely corrupted packet and the selected additional packets that are transmitted from the first communication to the second communication device via the port is provided to the second communication device.

FIELD OF THE DISCLOSURE

The present disclosure relates generally to communication networks and, more particularly, to connection information for communication links between communication devices.

BACKGROUND

Communication networks, such as computer networks, typically include several interconnected communication devices that communicate with each other using data units e.g., packets, frames and so on). Various tools have been developed for discovering various aspects of a physical topology of a communication network, and displaying network connections.

SUMMARY

In an embodiment, a method for providing connection information between a first communication device and a second communication device includes: generating, by the first communication device, at least one purposely corrupted packet that includes a purposely corrupted packet attribute; transmitting, by the first communication device, the at least one purposely corrupted packet to the second communication device via a port coupled to a communications network; generating a count of packets that are transmitted, the count of packets including the at least one purposely corrupted packet and selected additional packets; and providing to the second communication device an indication of the count of the at least one purposely corrupted packet and the selected additional packets that are transmitted from the first communication to the second communication device via the port.

In another embodiment, a first communication device for providing connection information between the first communication device and a second communication device includes a network interface device having one or more integrated circuits. The one or more integrated circuits are configured to generate at least one purposely corrupted packet that includes a purposely corrupted packet attribute, transmit the at least one purposely corrupted packet to the second communication device via a port coupled to a communications network, generate a count of packets that are transmitted, the count of packets including the at least one purposely corrupted packet and selected additional packets, and provide to the second communication device an indication of the count of the at least one purposely corrupted packet and the selected additional packets that are transmitted from the first communication to the second communication device via the port.

In an embodiment, a method for determining a presence or absence of an intermediate communication device between a first communication device and a second communication device includes: determining, by a processor, a first number of packets received at the second communication device from the first communication device; receiving, by the processor, an indication of a second number of packets transmitted by the first communication device to the second communication device, wherein the indication of the second number of packets indicates a transmission of at least one purposely corrupted packet by the first communication device to the second communication device; and determining, by the processor, the presence or absence of the intermediate communication device between the first communication device and the second communication device in response to a comparison of the first number of packets received by the second communication device and the second number of packets transmitted by the first communication device.

In another embodiment, a network interface device for determining a presence or absence of an intermediate communication device between a first communication device and a second communication device includes one or more integrated circuits. The one or more integrated circuits are configured to determine a first number of packets received at the first communication device from the second communication device, receive an indication of a second number of packets transmitted by the second communication device to the first communication device, wherein the indication of the second number of packets indicates a transmission of at least one purposely corrupted packet by the second communication device to the first communication device, and determine the presence or absence of the intermediate communication device between the first communication device and the second communication device in response to a comparison of the first number of packets received from the second communication device and the second number of packets transmitted by the second communication device.

DETAILED DESCRIPTION

When a communication link between two devices is routed through a hub or one or more unknown intermediate communication devices, connection information used to develop a picture of network connections may be lost or unavailable in some scenarios. Without this connection information, discovery of the physical topology of a communication network is inaccurate or incomplete. In at least some embodiments described herein, a first communication device generates purposely corrupted packets and transmits the purposely corrupted packets to a second communication device. In one scenario, in an embodiment, where a communication link between the first communication device and the second communication device is a direct connection, the second communication device receives substantially all of the purposely corrupted packets. In this scenario, in an embodiment, the second communication device determines that the communication link is a direct connection in response to having ascertained that all of the purposely corrupted packets, or a percentage of purposely corrupted packets in excess of a configurable threshold, have been received.

In another scenario where an intermediate communication device connects the first and second communication devices e.g., an indirect connection), the intermediate communication device filters, drops, or otherwise prevents the receipt of the purposely corrupted packets by the second communication device. In this scenario, in an embodiment, the second communication device determines that the communication link is an indirect connection in response to having ascertained that substantially less than all of the purposely corrupted packets, or a percentage of the purposely corrupted packets that is less than a configurable threshold, have been received.

In various embodiments and/or scenarios, purposely corrupted packets include packets having a packet attribute that has been purposely corrupted. Examples of purposely corrupted packet attributes include a purposely corrupted or improper cyclic redundancy check (CRC) value or frame check sequence (FCS) value, a packet size that is larger than a maximal permitted packet size, a packet size that is smaller than a minimal permitted packet size, an incompatible packet format, or other suitable corrupted packet attribute.

In an embodiment, an indication of the first communication device having transmitted one or more purposely corrupted packets is provided to the second communication device. In an embodiment, the first communication device sends to the second communication device an indication of the number of purposely corrupted packets sent, for example, as a field in a diagnostic packet, an operations and management (OAM) packet, or other suitable packet. In another embodiment, a central network controller or network management device controls a number of purposely corrupted packets that are generated and sent by the first communication device, and ascertains, by communicating with the second device, a number of the purposely corrupted packets that are received by the second communication device. In this embodiment, the determination of the presence of a direct connection, or routing though an intermediate communication device, is made at the central network controller.

In an embodiment, in response to the receipt of the indication of the transmission and based on a comparison of a count of packets received to packets sent, including the purposely corrupted packets, the second communication device determines the presence or absence of the intermediate communication device and communicates its determination to at least one other communication device in the communication network, to a central network controller, or to a network administrator. For example, in response to receipt of the indication of the transmission of the purposely corrupted packets without having received the purposely corrupted packets, the second communication device determines that the intermediate communication device is present (e.g., by inferring that the intermediate communication device has filtered the purposely corrupted packet). In some embodiments, an image that represents the physical topology and indicates network connections for the second communication device is generated based on the determined presence or absence of the intermediate communication device.

FIG. 1is a block diagram of an example communication network100, according to an embodiment. In an embodiment, the communication network100includes a plurality of devices coupled together by communication links to form a plurality of nodes in the communication network100. In an embodiment, for example, the communication network100includes host devices, such as host devices H1, H2, H3, H4, H5, H6, and H7that form host nodes (referred to herein as “hosts”). Further, the communication network100includes switch devices, such as switch devices S1and S2, that form switch nodes (referred to herein as “switches”). While only hosts H1-H7and switches S1and S2are shown, the communication network100has additional or fewer hosts and/or additional or fewer switches, in other embodiments. In the embodiment shown inFIG. 1, hosts H1, H2, H3, and H4are coupled with ports P1, P2, P3, and P4of switch S1, hosts H5, H6, and H7are coupled with ports P1, P2, and P3of switch S2, and switch S1(via port P5) is directly or indirectly coupled with switch S2(via port P4).

The communication network100is any suitable network, in various embodiments. In an embodiment, the communication network100is a local area network (LAN). In an embodiment, the communication network100is a Layer 2 network that uses technologies at a data link layer, such as Ethernet or other suitable technologies, for communication between hosts in the LAN. In some embodiments, the communication network100is coupled to the Internet via a suitable router (not shown).

The hosts H1-H7are any suitable communication devices, such as voice over IP (VoIP) phones, computers, laptops, TVs, servers, or other suitable devices that are configured to be a source of network traffic and/or a destination of network traffic, in various embodiments. Generally, a communication device includes one or more network interface controllers (NICs) connected to the switch devices S1or S2via wired or wireless communication links. It is noted that when the communication device includes multiple NICs connected to the switch devices, the communication device is considered as a set of hosts and each connection has its own media access control (MAC) address, in an embodiment. In various embodiments and/or scenarios, the hosts H1-H7communicate with each other via the switches S1and S2.

The switches S1and S2are any suitable switch devices, in various embodiments. Generally, a switch includes a plurality of ports connected to hosts, other switches, or other suitable communication devices. The switch is configured to receive a network traffic unit (e.g., a data link frame or packet) from a port (e.g., ingress port) and forward the received packet to one or more ports (e.g., egress ports) based on network configuration information and addresses that are contained in the network traffic unit. In an embodiment, a switch device includes a plurality of tables storing network configuration information. The network configuration information includes, for example, port connectivity information of the switch device, port connectivity information of other switch devices in the communication network100, virtual LAN (VLAN) configuration, or other suitable information. In an example, the network configuration information is changed via a software program application (e.g., a management application) by a network administrator.

In various embodiments and/or scenarios, one or more intermediate communication devices110(illustrated as a cloud with dashed lines) is present or absent (e.g., optionally located) between two or more devices of the communication network100(e.g., on a communication link115). In the embodiment shown inFIG. 1, the intermediate communication device110is optionally located between the switch S1and the switch S2on the communication link115. In other words, the switch S1and the switch S2are i) directly connected to each other when the intermediate communication device110is absent, and ii) indirectly connected to each other when the intermediate communication device110is present. In various embodiments, the intermediate communication device110includes one or more switches, hosts, hubs, or other suitable communication devices. In some embodiments, the intermediate communication device110corresponds to a cloud network, the Internet, a communication network separate from the communication network100, or other suitable group of communication devices.

The intermediate communication device110is configured to filter, drop, or otherwise prevent forwarding (referred to herein as “filtering”) of corrupted packets, in various embodiments. In some embodiments, a packet is determined to be corrupt according to a communication protocol utilized on the communication link115or by the intermediate communication device110. In various embodiments and/or scenarios, the communication protocol is the Institute of Electrical and Electronics Engineers (IEEE) 802.3 communication protocol (e.g., Ethernet protocol) or other suitable protocol. In an embodiment, purposely corrupted packets include packets having a purposely corrupted packet attribute, for example, a purposely corrupted or improper cyclic redundancy check (CRC) value or frame check sequence (FCS) value, for example, a packet having a CRC value that does not correspond to a data portion of the packet. In an embodiment, purposely corrupted packets include packets that have a packet size that is larger than a maximum packet size for the communication protocol, for example, larger than 1518 bytes for the Ethernet protocol (or 1522 bytes with an optional 802.1Q tag of 4 bytes), including the media access control (MAC) header (14 bytes) and CRC checksum (4 bytes). In an embodiment, purposely corrupted packets include packets that have a packet size which is smaller than a minimum packet size for the communication protocol, for example, smaller than 64 bytes for the Ethernet protocol (excluding a preamble of 7 bytes and start of frame delimiter of one byte). In other embodiments and/or scenarios, other incompatible packet formats are determined to be corrupt by the intermediate communication device110.

For brevity and clarity of explanation, the description herein is generally based on an embodiment having a single instance of the intermediate communication device110that is located on the communication link115(i.e., between the switch S1and the switch S2). In other embodiments or scenarios, the intermediate communication device110is located on other suitable communication links of the communication network100, for example, between the switch S1and the host H1. In some embodiments, multiple instances of the intermediate communication device110are located on suitable communication links of the communication network100.

The communication network100includes at least one communication device configured to determine whether a communication link is directly connected or indirectly connected, in various embodiments. In other words, the communication device determines whether one or more of its ports coupled to the communications network100have a direct connection or an indirect connection to another communication device. In an embodiment, for example, the switch S2is configured to determine whether a port coupled to the communication link115is i) directly connected to the switch S1, or ii) indirectly connected to the switch S1via the intermediate communication device110.

In some embodiments, a central network controller, network management device, or other suitable communication device determines whether communication links of the communication network100are directly connected or indirectly connected based on indications received from communication devices connected to the communication links. In an embodiment, for example, the host H4is a dedicated network management device for the communications network100that determines whether the communication link115is directly connected or indirectly connected based on indications received from the switch S1, the switch S2, or both the switches S1and S2. In an embodiment, the host h4determines the presence or absence of the intermediate communication device110based on a number of purposely corrupted packets sent by the switch S1and a number of purposely corrupted packets received at the switch S2. In an embodiment, the host H4is a network management device or central network controller that provides a user interface for a network management application that indicates the presence or absence of intermediate communication devices in the communication network100.

In the embodiment shown inFIG. 1, the host H4includes a processor120, a memory130, a network interface device (NID)140, and a user interface160communicatively coupled together by a bus150. In other embodiments, the user interface160is omitted. In some embodiments, one or more of the processor120, the memory130, and the network interface device140are implemented as one or more integrated circuits. The hosts H1-H3and H5-H7are generally similar to the host H4, having a processor, a memory, a NID, and optional user interface communicatively coupled together by a bus (not shown for clarity), in various embodiments. The switches S1and S2include a processor, a memory, a NID, and user interface communicatively coupled together by a bus similarly to the host H4, but not shown for clarity), in various embodiments. In an embodiment, one or both of the switches S1and S2omit the user interface.

The processor120executes system and application instructions to perform system functions and application functions. The memory130stores system and application instructions, such as instructions150for the management application. In addition, the memory130stores data processed or to be processed by the processor120. In an embodiment, the memory130stores network configuration information, such as a network topology for the communication network100. The network topology includes, for example, coupling information of hosts to ports of the switches, coupling pairs of ports of different switches, relationship of workgroups to VLANs, WAN membership, or other suitable information. The memory130includes a hard disk drive, an optical storage medium, a solid-state drive, random access memory, or other suitable memory device, in various embodiments.

The user interface160includes a touch screen, a display, a keyboard, a mouse, a printer, or other suitable user interface devices. In the embodiment shown inFIG. 1, the user interface160includes a graphical user interface (GUI)161for interaction with a user, for example, displaying an image that represents the physical topology and indicates network connections of the communication network100. In an embodiment, the GUI161uses suitable graphical elements, such as picture icons, to represent devices, such as the host devices, the switch devices, or other suitable communication devices. In an embodiment, the GUI includes laptop icons, desktop icons, phone icons, switch icons, or other suitable icons to represent the devices in the communication network100. In some embodiments, the processor120generates the image that represents the physical topology and the GUI161displays the image.

FIG. 2A,FIG. 2B, andFIG. 2Care diagrams of example packet flows200,230, and260, respectively, through a communication network (e.g., communication network100), according to various embodiments. In the embodiment shown inFIG. 2A, the intermediate communication device110is absent between the switch S1and the switch S2(e.g., on the communication link115). In the embodiment shown inFIG. 2B, the intermediate communication device110is present between the switch S1and the switch S2. In the embodiment shown inFIG. 2C, the intermediate communication device110is present between the switch S1and the switch S2and the host H4is communicatively coupled, directly or indirectly, with the switch S1and the switch S2.

As discussed above, in various embodiments and/or scenarios, a first communication device generates and transmits purposely corrupted packets, generates an indication of the transmission of the purposely corrupted packets, and transmits the indication. In an embodiment, the switch S1i) generates the purposely corrupted packets, ii) transmits the purposely corrupted packets to the switch S2(e.g., purposely corrupted packet210,240, or270), iii) generates the indication that indicates a count of the number of purposely corrupted packets that are sent, and iv) transmits the indication to the switch S2(e.g., indication of transmission220or250). The switch S2determines a first number of packets received from the switch S1where the first number includes or indicates at least the purposely corrupted packets received from the switch S1. The switch S2determines a second number of packets (e.g., the count of the number of purposely corrupted packets that are sent), for example, based on information communicated in a diagnostic packet, an operations and management (OAM) packet, or other suitable packet. In an embodiment, for example, the switch S2receives the indication of the transmission220or250that includes an indication of the second number of packets (e.g., that includes the actual number of purposely corrupted packets transmitted to the switch S2). In some embodiments, the indication220or250includes a count of the at least one purposely corrupted packet and selected additional packets (e.g., uncorrupted packets).

In various embodiments and/or scenarios, the switch S2determines the presence or absence of the intermediate communication device110in response to a comparison of the second number of packets sent and the first number of packets that are actually received. In an embodiment, for example, the switch S2determines that the intermediate communication device110is present if the first number of packets is less than the second number of packets (e.g., purposely corrupted packet240has been filtered) or determines that the intermediate communication device110is absent if the first number of packets is equal to the second number of packets (e.g., purposely corrupted packet210has been received). In another embodiment, the switch S2utilizes a configurable threshold, for example, based on a percentage, to compare the first number and the second number. In this embodiment, the configurable threshold allows a suitable determination of the presence of absence of the intermediate communication device110where at least some purposely corrupted packets are dropped even if the dropped packets are not dropped because they are purposefully corrupted (e.g., if the purposely corrupted packets are dropped due to network congestion). In an embodiment, for example, the switch S2determines that the intermediate communication device110is absent if 90% or more of the purposely corrupted packets sent by the first communication device are received by the switch S2(e.g., if the first number of packets received is 90% or more of the second number of packets sent).

In another embodiment shown inFIG. 2C, the switch S1performs steps i), ii), and iii) as in the embodiment described above, but instead performs step iv) by transmitting an indication of the transmission280of the second number of packets to the host H4or another suitable communication device, for example, a network manager device of the communication network100. In this embodiment, the host H4receives, from the switch S2, an indication290of the first number of packets received at the switch S2from the switch S1. The host H4determines the presence or absence of the intermediate communication device110(e.g., between the switch S1and the switch S2) in response to a comparison of the first number of packets and the second number of packets, as described above. In an embodiment, the host H4provides an instruction or request (not shown) to the switch S2to provide the indication290.

In some embodiments, the switch S1performs steps i) and ii) similarly to the embodiment shown inFIG. 2C, except that the switch S1performs the steps i) and ii) in response to an instruction provided by the host H4(e.g., a network management device) that indicates the number of purposely corrupted packets to be generated and transmitted by the switch S1. In an embodiment, the switch S1provides an acknowledgment of the instruction to the host H4. In other words, the indication of the transmission280is replaced by an exchange whereby the host H4provides switch S1with an instruction to generate an integer number N of purposely corrupted packets, and switch S1returns an acknowledgment that the purposely corrupted packets have been transmitted. In an embodiment, the host H4provides to the switch S2an indication of the second number of purposely corrupted packets transmitted by the switch S1(e.g., an indication similar to indications220or250), thus, the indication of the number of purposely corrupted packets is independent of a diagnostic packet transmitted from switch S1to switch S2.

FIG. 3is a flow diagram of an example method300for providing connection information for a communication link between a first communication device and a second communication device, according to an embodiment. In various embodiments, the method300is implemented by a host or communication device in the communication network100. With reference toFIG. 1, the method300is implemented by the switch S1, in the description below. For example, the processor of the switch S1(not shown) is configured to implement the method300. With continued reference toFIG. 1, in other embodiments, the method300is implemented by switch S2, the host H4, or other suitable communication device.

The switch S1initiates the method300in response to a connection of the communication link115, in an embodiment. For example, where the port P5is an Ethernet port, the switch S1initiates the method300when a first end of a suitable cable (e.g., category 5 cable, category 5e cable, etc.) is plugged into the port P5of the switch S1and a second end of the cable is plugged into another communication device (e.g., the intermediate communication device110or the switch S2). In some embodiments, the switch S1initiates the method300in response to a request for connection information (e.g., received from the host H4), an expiration of a timer, or an auto-negotiation procedure for the communication link115.

At block302, at least one purposely corrupted packet that includes a purposely corrupted packet attribute is generated by a first communication device. For example, the switch S1generates the purposely corrupted packets210,240, or270. In an embodiment, switch S1randomly or pseudo-randomly selects the number of purposely corrupted packets (i.e., the second number of packets) from a predetermined range of values (e.g., one, two, five, ten, or more packets). In other embodiments, the number of purposely corrupted packets is predetermined or selected based on suitable parameters or a configuration of the switch S1. In an embodiment, the number of purposely corrupted packets is identified by an instruction received from a network management device.

As described above, purposely corrupted packets include, for example, those packets with a corrupted CRC value or FCS value, a large packet size, a small packet size, or other incompatible packet format. In an embodiment, the purposely corrupted packets are of the same corruption type, for example, having corrupted CRC values but not FCS values, size, or format corruptions. In other embodiments, the purposely corrupted packets have different corruption types. In one such embodiment, the switch S1generates the purposely corrupted packets to have a predetermined sequence of corruption types, for example, five packets including three corrupted CRC values followed by an oversize packet and an undersized packet, or other suitable sequences.

At block304, the at least one purposely corrupted packet is transmitted by the first communication device to the second communication device via a port coupled to a communications network. For example, the switch S1transmits the purposely corrupted packets210,240, or270to the switch S2via the communication link115. In some embodiments, the switch S1generates and transmits uncorrupted packets to the switch S2along with the purposely corrupted packets. In an embodiment, for example, the sequence of packets transmitted to the switch S2includes one or more uncorrupted packets along with the one or more corrupted packets.

At block306, the first communication device generates a count of packets that are transmitted, the count of packets including the at least one purposely corrupted packet and selected additional packets. In some embodiments, the count of packets includes zero selected additional packets. In other words, the count of packets includes only purposely corrupted packets. In other embodiments, the count of packets includes one, two, three, or more uncorrupted packets (e.g., the selected additional packets) along with the purposely corrupted packets.

At block308, an indication of the count of the at least one purposely corrupted packet and the selected additional packets that are transmitted from the first communication to the second communication device via the port is provided to the second communication device. For example, the switch S1generates and transmits the indication220,250, or280to the second communication device. In an embodiment, the indication of the count is included as an advertisement of a link layer discovery protocol (LLDP) frame. In another embodiment, providing the count includes populating a field in a diagnostic packet to indicate the count of packets that are transmitted.

In an embodiment, the indication of the count indicates the number of purposely corrupted packets transmitted by the switch S1to the switch S2. In another embodiment, the indication indicates a total number of packets, including purposely corrupted packets, transmitted by the switch S1to the switch S2. For example, the switch S1transmits a sequence of packets that includes five purposely corrupted packets and four uncorrupted packets and the indication indicates a total number of nine packets. In an embodiment, the indication indicates a corruption type (or sequence of corruption types) of the purposely corrupted packets.

In an embodiment, the switch S1transmits the indication (e.g., the LLDP frame) to the switch S2. In another embodiment, the switch S1transmits the indication to the host H4or other suitable network management device of the communication network100. In yet another embodiment, the host H4transmits the indication to the switch S2. In some embodiments, the count is maintained at a network management device of the communications network, for example, at the host H4. In an embodiment, the host H4provides the indication of the count to the second communication device.

In some embodiments, the switch S2determines whether the port coupled to the communications network has a direct connection or an indirect connection to the first communication device. In an embodiment, for example, the switch S2generates an image that indicates network connections for the switch S2based on the determined presence or absence of the intermediate communication device115, as described above. In other embodiments, the host H4generates the image that indicates the network connections.

The indication of the transmission and the at least one purposely corrupted packet provide connection information that indicates a presence or absence of an intermediate communication device between the first communication device and the second communication device. In other words, the presence or absence of the intermediate communication device110is determinable based on a comparison of the second number of packets (e.g., five corrupted packets or nine total packets) and a first number of packets received at the switch S2.

FIG. 4is a flow diagram of an example method400for determining a presence or absence of an intermediate communication device between a first communication device and a second communication device, according to an embodiment. In various embodiments, the method400is implemented by a host or communication device in the communication network100. With reference toFIG. 1, the method400is implemented by the switch S2, in the description below. For example, the processor of the switch S2(not shown) is configured to implement the method400. With continued reference toFIG. 1, in other embodiments, the method400is implemented by switch S1, the host H4, or other suitable communication device.

The switch S2initiates the method400in response to a connection of the communication link115, in an embodiment. In some embodiments, the switch S2initiates the method400in response to a request for connection information (e.g., received from the host H4), an expiration of a timer, or an auto-negotiation procedure for the communication link115.

At block402, the switch S2resets a received (RX) packet indicator. The RX packet indicator is a “bad packet counter” that indicates a number of corrupted packets that have been received from the switch S1via the communication link115. In an embodiment, the RX packet indicator is a number of corrupted packets. In another embodiment, the RX packet indicator is a total number of packets received that includes corrupted packets. In some embodiments, the switch S2generates and transmits a request for verification to the switch S1and the switch S1generates and transmits the indication220,250, or280in response to the request for verification. In other embodiments, the switch S1generates and transmits the purposely corrupted packets and the indication220,250, or280in response to the request for verification.

At block404, the switch S2receives one or more packets from the switch S1and, in response to receipt of a corrupted packet (e.g., purposely corrupted packet210), increments the RX packet indicator, in an embodiment. In another embodiment, the switch S2increments the RX packet indicator in response to receipt of both corrupted packets and uncorrupted packets.

At block406, the switch S2receives a transmitted TX) packet indicator from the switch S1. The TX packet indicator is an indication of the transmission of the purposely corrupted packets. For example, the switch S2receives the indication220or250from the switch S1. In an embodiment, the switch S2receives an advertisement in an LLDP frame that includes the TX packet indicator.

At block408, the switch S2performs a comparison of the RX packet indicator and the TX packet indicator. In an embodiment, for example, the switch S2determines whether the RX packet indicator is less than or equal to the TX packet indicator. In other embodiments, the switch S2determines whether the RX packet indicator exceeds a predetermined threshold. In an embodiment, for example, the switch S2determines that the switch S2is directly connected where the RX packet indicator is greater than a percentage threshold of the TX packet indicator (e.g., greater than 80%, 90%, or another suitable percentage of the TX packet indicator). The switch S2utilizes the predetermined threshold to account for purposely corrupted packets that may have been dropped for reasons other than their purposeful corruption, e.g., because of network congestion.

At block410, in response to a determination that the RX packet indicator meets or exceeds the predetermined threshold (e.g., purposely corrupted packet210has been received; YES at block408), the switch S2determines that the intermediate communication device110is absent and that the communication link115is directly connected.

At block412, in response to a determination that the RX packet indicator is less than predetermined threshold (e.g., a sufficient number of purposely corrupted packets240have been filtered; NO at block408), the switch S2determines that the intermediate communication device110is present and that the communication link115is not directly connected (e.g., that there is a cloud or other network device between the switch S1and the switch S2). In an embodiment, the predetermined threshold isolates noise from dropped packets that are not purposefully corrupted.

FIG. 5is a flow diagram of another example method500for determining a presence or absence of an intermediate communication device between a first communication device and a second communication device, according to an embodiment. In various embodiments, the method500is implemented by a host or communication device in the communication network100. With reference toFIG. 1, the method500is implemented by the host H4, in the description below. For example, the processor of host H4(not shown) is configured to implement the method500. With continued reference toFIG. 1, in other embodiments, the method500is implemented by switch S1, the switch S2, or other suitable communication device.

At block502, a processor of the host H4determines a first number of packets that have been received at the second communication device from the first communication device, for example, based on the indication290received from the switch S2. In an embodiment, for example, the host H4receives from the switch S2the indication290, and determines the first number of packets to be equal to the count of packets that includes the at least one purposely corrupted packet and selected additional packets. In another embodiment, a processor of the switch S2determines the first number of packets.

At block504, the processor of the host H4receives an indication of a second number of packets transmitted by the first communication device to the second communication device. The indication of the second number of packets indicates a transmission of at least one purposely corrupted packet by the first communication device to the second communication device. In an embodiment, the host H4receives the indication280from the switch S1. In another embodiment, the switch S2receives the indication220or250from the switch S1.

In an embodiment, the indication of the second number of packets indicates a total number of packets, including purposely corrupted packets, transmitted by the switch S1to the switch S2. For example, the switch S1transmits a sequence of packets that includes five purposely corrupted packets and four uncorrupted packets and the indication indicates a total number of nine packets. In an embodiment, the indication indicates a corruption type (or sequence of corruption types) of the purposely corrupted packets.

At block506, the processor of the host H4determines the presence or absence of an intermediate communication device between the first communication device and the second communication device in response to a comparison of the first number of packets received from the second communication device and the second number of packets transmitted by the second communication device. In response to a determination that the first number of packets is equal to the second number of packets purposely corrupted packet210has been received), the host H4(or the switch S2, in another embodiment) determines that the intermediate communication device110is absent and that the communication link115is directly connected. In response to a determination that the first number of packets is less than the second number of packets (e.g., purposely corrupted packet240has been filtered), the host H4or switch S2determines that the intermediate communication device110is present and that the communication link115is not directly connected (e.g., that there is a cloud or other network device between the switch S1and the switch S2). In other embodiments, the host H4or switch S2performs the comparison based on a predetermined threshold, for example, the percentage threshold described above.

In some embodiments, where the indication indicates a total number of packets, including purposely corrupted packets, the host H4or switch S2compares the total numbers of packets received and transmitted (e.g., nine packets in the example described above). In an embodiment, the indication indicates a corruption type (or sequence of corruption types) of the purposely corrupted packets and the host H4or switch S2also determines whether the sequence of corruption types or sequence of corrupted and uncorrupted packets matches a predetermined sequence or an advertised sequence (e.g., a sequence indicated by the LLDP frame).

In some embodiments, the host H4or switch S2generates an image that indicates network connections for the second communication device (e.g., switch S2) based on the determined presence or absence of the intermediate communication device115. For example, the host H4generates an image that represents a physical topology or network map of the communication network100and that indicates network connections for the second communication device (e.g., whether the network connections for the second communication device are direct connections or indirect connections). In the embodiment shown inFIG. 1, the image is displayed by the host H4via the GUI161.

Although the above-described embodiments refer to the communication link115between the switch S1and the switch S2, the physical topology of other communication links of the communication network100is determined by other suitable communication devices of the communication network100, in some embodiments and/or scenarios.

Further aspects of the present invention relate to one or more of the following clauses.

In an embodiment, a method for providing connection information between a first communication device and a second communication device includes: generating, by the first communication device, at least one purposely corrupted packet that includes a purposely corrupted packet attribute; transmitting, by the first communication device, the at least one purposely corrupted packet to the second communication device via a port coupled to a communications network; generating a count of packets that are transmitted, the count of packets including the at least one purposely corrupted packet and selected additional packets; and providing to the second communication device an indication of the count of the at least one purposely corrupted packet and the selected additional packets that are transmitted from the first communication to the second communication device via the port.

In other embodiments, the method includes any suitable combination of one or more of the following features.

Generating the at least one purposely corrupted packet includes generating a purposely corrupted cyclic redundancy check (CRC) for respective ones of the at least one purposely corrupted packet. Providing the count includes populating a field in a diagnostic packet to indicate a number of packets having the corrupted CRC that are transmitted.

Generating the at least one purposely corrupted packet includes generating a purposely corrupted packet having a packet size that is i) larger than a maximum packet size for a communication protocol, or ii) smaller than a minimum packet size for the communication protocol.

Providing to the second communication device the indication of the count of the at least one purposely corrupted packet and the selected additional packets includes providing a diagnostic packet with a field that includes the indication of the count.

Providing to the second communication device the indication of the count of the at least one purposely corrupted packet and the selected additional packets includes: maintaining the count at a network management device of the communications network; and providing, by the network management device and to the second communication device, the count of the at least one purposely corrupted packet and the selected additional packets.

The indication of the count includes an indication of at least one of i) a number of the at least one purposely corrupted packet transmitted to the second communication device, or ii) a corruption type of the at least one purposely corrupted packet.

The count of packets includes zero selected additional packets.

The count of packets includes a finite number of selected additional packets that are uncorrupted.

The method further includes: determining whether the port coupled to the communications network has a direct connection or an indirect connection to the second communication device.

In another embodiment, a first communication device includes a network interface device having one or more integrated circuits configured to: generate at least one purposely corrupted packet that includes a purposely corrupted packet attribute, transmit the at least one purposely corrupted packet to the second communication device via a port coupled to a communications network, generate a count of packets that are transmitted, the count of packets including the at least one purposely corrupted packet and selected additional packets, and provide to the second communication device an indication of the count of the at least one purposely corrupted packet and the selected additional packets that are transmitted from the first communication to the second communication device via the port.

In other embodiments, the first communication device includes any suitable combination of one or more of the following features.

The one or more integrated circuits are configured to generate a purposely corrupted cyclic redundancy check (CRC) for respective ones of the at least one purposely corrupted packet, and populate a field in a diagnostic packet to indicate a number of packets having the corrupted CRC that are transmitted.

The one or more integrated circuits are configured to generate a purposely corrupted packet having a packet size that is i) larger than a maximum packet size for a communication protocol, or ii) smaller than a minimum packet size for the communication protocol.

The indication of the transmission includes an indication of at least one of i) a number of the at least one purposely corrupted packet transmitted to the second communication device, or ii) a corruption type of the at least one purposely corrupted packet.

In an embodiment, a method for determining a presence or absence of an intermediate communication device between a first communication device and a second communication device includes: determining, by a processor, a first number of packets received at the second communication device from the first communication device; receiving, by the processor, an indication of a second number of packets transmitted by the first communication device to the second communication device, wherein the indication of the second number of packets indicates a transmission of at least one purposely corrupted packet by the first communication device to the second communication device; and determining, by the processor, the presence or absence of the intermediate communication device between the first communication device and the second communication device in response to a comparison of the first number of packets received by the second communication device and the second number of packets transmitted by the first communication device.

In other embodiments, the method includes any suitable combination of one or more of the following features.

The second number of packets is equal to a number of the at least one purposely corrupted packet; and determining the first number of packets received from the second communication device includes: determining whether a received packet from the second communication device is corrupt, and incrementing the first number in response to the determination that the received packet is corrupt.

The method further includes: generating an image that indicates network connections for the second communication device based on the determined presence or absence of the intermediate communication device.

Receiving the indication of the second number of packets transmitted by the second communication device includes: receiving an advertisement of a link layer discovery protocol frame that includes the indication of the second number of packets.

The indication of the second number of packets transmitted by the second communication device includes an indication of at least one of i) a number of the at least one purposely corrupted packet transmitted to the second communication device, or ii) a corruption type of the at least one purposely corrupted packet.

The at least one purposely corrupted packet and the indication of the second number of packets are received at the first communication device; and the method further includes: determining, by the first communication device, whether the port coupled to the communications network has a direct connection or an indirect connection to the second communication device; and transmitting, by the first communication device to at least one other communication device in the communications network, an indication of the determined direct connection or the determined indirect connection.

In another embodiment, a network interface device for determining a presence or absence of an intermediate communication device between a first communication device and a second communication device includes one or more integrated circuits configured to: determine a first number of packets received at the first communication device from the second communication device, receive an indication of a second number of packets transmitted by the second communication device to the first communication device, wherein the indication of the second number of packets indicates a transmission of at least one purposely corrupted packet by the second communication device to the first communication device, and determine the presence or absence of the intermediate communication device between the first communication device and the second communication device in response to a comparison of the first number of packets received from the second communication device and the second number of packets transmitted by the second communication device.

In other embodiments, the first communication device includes any suitable combination of one or more of the following features.

The second number of packets is equal to a number of the at least one purposely corrupted packet; and the one or more integrated circuits are configured to: determine whether a received packet from the second communication device is corrupt, and increment the first number in response to the determination that the received packet is corrupt.

The one or more integrated circuits are configured to generate an image that indicates network connections for the second communication device based on the determined presence or absence of the intermediate communication device.

The one or more integrated circuits are configured to receive an advertisement of a link layer discovery protocol frame that includes the indication of the second number of packets.

The indication of the second number of packets transmitted by the second communication device includes an indication of at least one of i) a number of the at least one purposely corrupted packet transmitted to the second communication device, or ii) a corruption type of the at least one purposely corrupted packet.

At least some of the various blocks, operations, and techniques described above may be implemented utilizing hardware, a processor executing firmware instructions, a processor executing software instructions, or any combination thereof. When implemented utilizing a processor executing software or firmware instructions, the software or firmware instructions may be stored in any computer readable memory such as on a magnetic disk, an optical disk, or other storage medium, in a RAM or ROM or flash memory, processor, hard disk drive, optical disk drive, tape drive, etc. The software or firmware instructions may include machine readable instructions that, when executed by one or more processors, cause the one or more processors to perform various acts.