Wide-area networks are usually bandwidth constrained, creating application bottlenecks. Further, round-trip delay and packet loss can degrade performance and cause instability that cannot be identified from testing on a LAN.Extensive testing of applications and equipment is therefore critical to ensure acceptable performance under all network conditions. Fortunately, products known as WAN emulators make it easy for developers and IT managers to test in a lab environment under a wide range of conditions by emulating WAN links on a local network.Ethernet-based WAN emulators replace an entire WAN infrastructure, including a WAN link and WAN access equipment such as routers and modems, making it possible to test applications and equipment using a single, Ethernet-based appliance on a local network.These emulators are installed as bridges or routers connecting two local network segments. Network equipment and applications that would be used on opposites ends of the WAN link are installed on either side of the emulator. Users then dial in the bandwidth, latency, packet loss rate, bit error rate and other WAN parameters, and the WAN emulator applies these characteristics to the traffic passing through it.As Ethernet frames arrive at the emulator destined for the opposite network, the frames are subjected to a series of processes that mirror the events that frames would experience first in the WAN access equipment and then traversing the actual WAN link.The emulator places arriving frames in a queue to await their turn for transmission. The queue is configured to a maximum size to match the behavior of the WAN equipment, and may include a variety of policies for dropping frames when the queue nears its maximum.When a frame reaches the head of the queue, it is passed to the transmission-emulation process, which determines the precise amount of time required to transmit each frame based on the frame size and link rate. For example, a 1,500-byte frame requires approximately 8 millisec to pass each frame to a T-1 line.To calculate this transmission time accurately, the Ethernet-based emulator must compensate for any difference in link-layer overhead between the Ethernet frame and the actual WAN framing type specified by the user and include any other source of overhead, such as VPN tunnel headers.Emulating WAN link conditionsOnce frames have completed the transmission process, the emulator adds the effects of the WAN link itself, including loss and propagation delay.Frames are discarded based on configured packet loss or bit error parameters, reflecting loss because of congestion and corruption on the link. Loss can be modeled as a random distribution or with a special distribution to match the particular loss characteristics of the WAN technology.The emulator then holds the packet for an amount of time equal to the configured link-propagation delay, which is the time that frames spend traversing the WAN. For this process, the propagation delay includes latency caused by the distance the signal travels as well as delays caused by link-layer retransmissions and other WAN link effects. Propagation delay may be modeled as a constant value, appropriate for dedicated terrestrial links, or as a variable delay for wireless, satellite or mesh networks.Finally, frames are sent from the opposite interface of the emulator to the destination exhibiting the same characteristics as frames traversing an actual WAN network.By making it possible to test and troubleshoot application performance in a lab under real-world conditions, Ethernet-based WAN emulators are valuable both for product developers to simulate a variety of customer networks and for IT managers to benchmark products and troubleshoot application-performance issues.Palter is president of Apposite Technologies. He can be reached at firstname.lastname@example.org.