WANCE : A Wide Area Network Communication Emulation system tool 1.Introduction Because of transition of distributed systems from local area networks to wide area networks like Internet, it has become desirable to carry out experiments in such an environment. In order to carry out these experiments, one has to obtain accounts on a number of remote sites, which is often difficult. Moreover, the distributed software needs to be ported for different environments at different hosts. The WANCE tool overcomes these difficulties by emulating a remote site on a host in the local network and routing the communication between these local sites through the remote Internet hosts. Using this tool, we can not only overcome the above mentioned problems in carrying out experiments, but also have more control on the experiments. It also makes it possible to conduct distributed system experiments without requiring control on the remote sites. 2.Emulation Approach used by WANCE The emulation approach used by the WANCE tool will now be described using an example. Assume that we have to collect data on the time required to get a video at Site1 (raid4.cs.purdue.edu) from Site2 (www.hp.com). In a real experiment we need to login at both the systems and run the appropriate software to transfer the video and display it. In the emulation approach, we will run the required software on Site1, but we do not run the software on the remote Site2. Rather we choose another machine in the Raid Lab, say Site3(raid11.cs.purdue.edu), which is in the same LAN as Site1. The video packets will now be sent from Site3 to Site1 through Site2. Although the communication time for a packet from Site3 to Site1 in the emulation configuration is not equal to that in the real experiments, but the overhead of the time taken for communication between local sites(Site1 and Site3) as compared to the round-trip time through the Internet node Site2 is negligible. Using the above configuration alone is not always sufficient. Sometimes, the size of the request and reply messages may be different. Therefore, any emulation experiment must be repeated in a mirrored configuration. In the first configuration, all the messages from Site1 to Site3 should be routed through Site2 and in the second configuration all the packets from Site3 to Site1 should be routed through Site2. Measurements taken from each configuration can then be averaged. 3.Routing Communication Packets The routing of communication messages through a remote Internet site can be achieved using Internet protocol services like IP source routing or Echo services. The IP source routing service allows the seder to specify to dictate the path that should be taken by the packet from the source to the destination. This information can be provided by specifying a sequence of Internet addresses which specify that the packet must follow the designated sequence of sites before reaching the destination. For example, to route a message from A to B through X,. the sender can specify the source route option “A X B”” in every packet. The limitation of this service is that it is not available at every gateway. Although it is a standard option of IP, some gateways choose to ignore it for sake of improved performance. Some gateways even drop packets with source routing options, while some other put these packets at low priority queues. Echo services are provided by each layer of the Internet protocol-IP, UDP and TCP. The echo service of IP level is implemented by ICMP echo request/reply messages. Any host that receives an echo request, will send an echo reply identical to the request message to the sender, only with a delay of round-trip communication over the Internet from the sender to the receiver and back. In order to differentiate multiple applications running in a machine, UDP reserves a port number for the echo service. This port number is 7. TCP layer also implements the same service on port number 7. Anything sent to the reserved port 7 is echoed back to the sender. 4. Implementation The WANCE tool is a general purpose communication tool. The main component of the tool is a communication library. In this library, some BSD socket system calls have been modified to route the message through a remote site according to the message’s source and destination address and user specified routing information. The user can specify the routing information through a configuration file. This library can also be dynamically linked to any software and this requires no recompilation. Since the socket calls have the same interface as the standard socket system calls, there is no need to change the software. The tool has been implemented using the echo service in each layer of Internet protocol, IP, UDP and TCP. The IP source routing service of the Internet protocol has not been used because of its limited availability. In order to reroute the message from A to B through X, the WANCE tool sends the message to X at port number 7 for echoing it back. The echoed message will return to A, which will then be sent to B directly over the LAN. Some hosts echo back only 1024 bytes when packets of length more than 1024 bytes are sent to their UDP port 7. In order to solve this problem, the WANCE tool fragments the message into packets of size less than or equal to 1024 bytes before sending it to the UDP port 7 of the remote site(X) for echoing. After all the fragments are received echoed back at the sender(A), the message is sent to the destination node(B). 5. WANCE Tool Configuration File The configuration file for the WANCE tool allows the user to specify the configuration of the emulation experiment. The file contains lines in the following format: Site1 Site3 Site2 Protocol where Site1 is the sender, Site3 is the destination in the local network, and Site2 is the remote site in the Internet, through which the messages from Site1 to Site3 will be routed. Protocol is either UDP or TCP depending on the protocol used for communication. Based on this protocol parameter, the WANCE tool will send the messages to UDP or TCP port 7 for echoing. 6. Output Files Wance tool writes the round trip time for the packet in the file "wance.time". The library writes the round trip time in the "timelog" file for the packet.