1. Field
This disclosure relates to generating connections for testing a network or network device.
2. Description of the Related Art
In many types of communications networks, each message to be sent is divided into portions of fixed or variable length. Each portion may be referred to as a packet, a frame, a cell, a datagram, a data unit, or other unit of information, all of which are referred to herein as packets.
Each packet contains a portion of an original message, commonly called the payload of the packet. The payload of a packet may contain data, or may contain voice or video information. The payload of a packet may also contain network management and control information. In addition, each packet contains identification and routing information, commonly called a packet header. The packets are sent individually over the network through multiple switches or nodes. The packets are reassembled into the message at a final destination using the information contained in the packet headers, before the message is delivered to a target device or end user. At the receiving end, the reassembled message is passed to the end user in a format compatible with the user's equipment.
Communications networks that transmit messages as packets are called packet switched networks. Packet switched networks commonly contain a mesh of transmission paths which intersect at hubs or nodes. At least some of the nodes may include a switching device or router that receives packets arriving at the node and retransmits the packets along appropriate outgoing paths. Packet switched networks are governed by a layered structure of industry-standard protocols. Layers 1, 2, 3, and layer 4 of the structure are the physical layer, the data link layer, the network layer, and the transport layer, respectively.
Layer 1 protocols define the physical (electrical, optical, or wireless) interface between nodes of the network. Layer 1 protocols include various Ethernet physical configurations, the Synchronous Optical Network (SONET) and other optical connection protocols, and various wireless protocols such as Wi-Fi.
Layer 2 protocols govern how data is logically transferred between nodes of the network. Layer 2 protocols include the Ethernet, Asynchronous Transfer Mode (ATM), Frame Relay, and Point to Point Protocol (PPP).
Layer 3 protocols govern how packets are routed from a source to a destination along paths connecting multiple nodes of the network. The dominant layer 3 protocols are the well-known Internet Protocol version 4 (IPv4) and version 6 (IPv6). A packet switched network may need to route IP packets using a mixture of the Ethernet, ATM, FR, and/or PPP layer 2 protocols. At least some of the nodes of the network may include a router that extracts a destination address from a network layer header contained within each packet. The router then used the destination address to determine the route or path along which the packet should be retransmitted. A typical packet may pass through a plurality of routers, each of which repeats the actions of extracting the destination address and determining the route or path along which the packet should be retransmitted.
Layer 4 protocols govern end-to-end message delivery in a network. In particular, the Transmission Control Protocol (TCP) provides for reliable delivery of packets streams using a system of sequential acknowledgement and retransmission when necessary. TCP is a connection-oriented protocol in which two devices exchange messages to open a virtual connection via the network. Once a connection is opened, bidirectional communications may occur between the connected devices. The connection may exist until closed unilaterally by one of the devices. Opening and closing a connection both require several steps at which specific messages are exchanged between the two devices. A connection may also be closed when an anticipated response is not received by one device for a predetermined period of time, commonly called a “time-out”. A TCP connection is considered to be “stateful” since each device must maintain information describing the state of the connection (being opened, established, being closed), what data has been sent, and what sent data has been acknowledged.
A TCP connection is defined by a source IP address, a destination IP address (fields in the IP header of each packet of the TCP connection), a source TCP port, and a destination TCP port (fields in the TCP header of each TCP packet). TCP ports define what higher level protocol or process is using the services of the TCP connection. A TCP port should not be confused with a hardware port (a connection between a hardware device and a network). The header of each TCP packet contains a sequence number identifying the first data byte in the TCP packet, and an acknowledgement number identifying the next data byte expected to be received. The sequence and acknowledgement numbers are, in simplified terms, a count of the number of data bytes sent and received, respectively, over the TCP connection. Two devices communicating via a TCP connection maintain data indicating the highest sequence number transmitted and the highest acknowledgement number received. This information can be used to retransmit packets that are not acknowledged in a timely manner.
During normal network operation, TCP connections are typically opened, or initiated, by a client device requesting information or some other service from a server device. The client device may be, for example, a user computer sending and receiving HTTP messages as the user surfs the World Wide Web, or SMTP e-mail messages. The client device may have a single IP address and only one or two processor cores. The client device may have only a few TCP connections open concurrently, and may send TCP packets infrequently in response to user actions. The server may be a Web server or an e-mail server or other server. The server may have multiple processors or processor cores and may be capable of maintaining a large number of concurrent TCP connections.
A problem may arise if two or more of the processors in a client or server are allowed to process packets for the same TCP connection. Specifically, if a first TCP packet is being processed by a first processor and a second TCP packet for the same TCP connection is concurrently processed by a second processor, the second processor may read the TCP connection data before the first processor has updated the TCP connection data. Subsequently, the second processor will update and store the TCP connection data in ignorance of the first packet, such that the stored TCP connection data is inaccurate. Such concurrency issues may be avoided by synchronizing or restricting access to the TCP connection data. However, restricting access to the TCP connection data can, in some circumstances, lead to two or more processors stalled while attempting to access the same connection data. To avoid such problems, each TCP connection may be uniquely associated with a specific one of the server's multiple processor cores. In this patent, the term “uniquely associated” means there is a one-to-one correspondence between two groups of items.
For example, a hash function may be used to uniquely associate each received TCP packet, and thus each TCP connection, to a specific processor core. A hash function is any algorithm or mathematical function that converts a larger amount of data into a smaller amount of data, typically a single integer. The value returned by a hash function is called hash value. For example, a checksum is a hash value returned by successively adding portions of a larger string of data such as a packet.
Assuming the layer 3 protocol is IP.v4, each TCP connection is defined by a 32-bit IP source address, a 32-bit IP destination address, a 16-bit TCP source port number and a 16-bit TCP destination port number. Every packet transmitted or received via the TCP connection will contain the same two 32-bit IP addresses and two 16-bit TCP port numbers within the header of the packet. Thus each TCP connection is defined by a 96-bit number, obtained by concatenating the two 32-bit IP addresses assuming (IP.v4) and two 16-bit TCP port numbers, allowing a total of 296 or 8×1028 unique TCP connections.
To uniquely associate every possible TCP connection with one of the server's processors, a hash function may be used to convert the 96-bit number that defines each TCP connection into a value that identifies the associated processor. For example, if a server includes eight processors, a hash function may provide a 3-bit hash value that identifies a single one of the eight processors. The hash function may be implemented by hardware or software.
In order to test a packet switched network or a device included in a packet switched communications network, test traffic comprising a large number of packets may be generated, transmitted into the network at one or more ports, and received at different ports. In this context, the term “port” refers to a communications connection between the network and the equipment used to test the network. Each packet in the test traffic may be a unicast packet intended for reception at a specific destination port or a multicast packet, which may be intended for reception at two or more destination ports. The term “port unit” refers to a module within the network test equipment that connects to the network at a port. The received test traffic may be analyzed to measure the performance of the network. Each port unit connected to the network may be both a source of test traffic and a destination for test traffic. Each port unit may emulate a plurality of logical source or destination addresses. The number of port units and the communications paths that connect the port units to the network are typically fixed for the duration of a test session. The internal structure of the network may change during a test session, for example due to failure of a communications path or hardware device.
To test the layer 4 performance of a packet switched network or a network device, the test traffic may be or include a large plurality of stateful connections between one or more test port units and the network or device under test. The stateful connections may be intermingled with a large volume of stateless, or non-stateful, packets as described, for example, in U.S. Pat. No. 7,496,664 B2 and U.S. Pat. No. 7,194,535 B2. During network testing, port units of a network test equipment may function as both the client and server sides of a large number of TCP connections. Each port unit may emulate a large plurality of servers and/or a large plurality of clients.
Throughout this description, elements appearing in block diagrams are assigned three-digit reference designators, where the most significant digit is the figure number and the two least significant digits are specific to the element. An element that is not described in conjunction with a block diagram may be presumed to have the same characteristics and function as a previously-described element having a reference designator with the same least significant digits.
In block diagrams, arrow-terminated lines may indicate data paths rather than signals. Each data path may be multiple bits in width. For example, each data path may consist of 4, 8, 16, 64, 256, or more parallel connections.