






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Authors: Fernand Braganza Praveen Pamidi Date: March 22, 2000 Introduction The popularity of networked multi-player computer gaming has led to an increased concern in the amount of network traffic. First-person shooting games posses a high degree of quality in terms of sound and graphics. This increase in quality requires a more efficient and reliable method of data transfer. This leads us to our analysis of Quake2, a multiplayer 3D game. In this paper, we describe Quake2’s basic client-server communication and at the same time determine the efficiency of this model. Related Work Our goal in this project is to continue the analysis and the measurement of Quake2’s network usage, which was first introduced by Steven Brown, a fellow UCSD computer science undergraduate. Steve was able to analyze Quake2’s networking protocol through the use of three tools he developed: testproxy, q2analysis, and driftcheck. The first tool, testproxy , is basically a way to decode Quake2’s protocol by taking a local port number as the fake server’s port and the remote IP and port of the real server. Once a Quake2 client connects to the proxy, it will start relaying packets to the server and also decoding the contents and displaying them. According to Steve, this tool proved quite useful for more than
just decoding packets; it cold also simulate the loss of certain types of packets in order to see how Quake2 clients and servers would respond. The second tool, q2analysis, can be run on live network using CoralReef network analysis system, as well as on prerecorded network traces in pcap format, which can be produced with the tcpdump command. The arguments it takes are the port number to look for the Quake servers on, this is usually ‘27910’, and the trace file to use as well as any CoralReef arguments. The tool will try to identify any active Quake2 connections and record statistics about them. The statistics currently collected are the address, creation time (or noticed time), last activity time, run time, delay (time while no data was being transmitted for a period of over two seconds), packets sent, packet bytes sent, reliable packets sent, reliable packet bytes sent, and number of reliable packets acknowledged. These statistics are saved for both the client-to-server connection as well as each server-to-client connection. It is important to note that to be logged, q2analysis must see a connected packet going from a server to client. This is to protect against marking clients connecting to the wrong address as a client/server relationship as well as avoiding marking connectionless queries such as queries for the number of players on a server as client/server relationships. We used this tool to analyze a trace of packets from a Quake multiplayer session. The third tool which we were not able to use is driftcheck , which measures clock drift – a traditional problem in research computing. For example, when running q2analysis , Steve setup two network hardware monitoring cards each with their own clock. When the trace started, he reset the clocks to zero but there was still a 300 ms difference. These timing differences prevent more complex analysis such as calculating the round-trip time of reliable packets.
Decoding the Protocols with Testproxy Using the tool testproxy , (Brown, p1) we were able to decode and analyze in detail Quake2’s protocol. To get testproxy to run correctly, we installed it on the machine which was running the Quake2 client. The first step was to start testproxy with the following commands: _testproxy _ With testproxy running in the background, we then start the Quake2 client in another window and connect to the Quake2 server. From here, we go into the console of Quake2 and type: “connect localhost:.” This establishes the connection where the client will start relaying the packets to the server and also decoding and displaying the packets. Here is a partial view of the output where it first initializes and establishes connection: Our test environment: ethernet local area network with 10mb hub and 10mb NIC cards. Client: running Linux with testproxy and Quake Server: running Win98 with Quake2 on server mode output from testproxy: --- Client to server packet: FF FF FF FF 67 65 74 63 68 61 6C 6C 65 6E 67 65 0A ....getchallenge. --- Server to client packet: FF FF FF FF 63 68 61 6C 6C 65 6E 67 65 20 32 38 33 31 35 ....challenge 28315 --- Client to server packet: FF FF FF FF 63 6F 6E 6E 65 63 74 20 33 34 20 35 30 33 20 32 38 33 31 35 20 22 5C 73 70 65 63 74 61 74 6F 72 5C 30 5C 72 61 74 65 5C 32 35 30 30 30 5C 6D 73 67 5C 31 5C 66 6F 76 5C 39 30 5C 67 65 6E 64 65 72 5C 6D 61 6C 65 5C 73 6B 69 6E 5C 6D 61 6C 65 2F 67 72 75 6E 74 5C 6E 61 6D 65 5C 50 6C 61 79 65 72 5C 68 61 6E 64 5C 30 22 0A ....connect 34 503 2 8315 "\spectator\0\r ate\25000\msg\1\fov 90\gender\male\skin male/grunt\name\Play er\hand\0". --- Server to client packet: FF FF FF FF 63 6C 69 65 6E 74 5F 63 6F 6E 6E 65 63 74 ....client_connect --- Server to client packet: 01 00 00 00 00 00 00 00 ........
--- Client to server packet: 01 00 00 80 01 00 00 00 F7 01 04 6E 65 77 00 ...........new. --- Server to client packet: 02 00 00 80 01 00 00 80 0C 22 00 00 00 1F 5B 00 00 00 00 01 00 4F 75 74 65 72 20 42 61 73 65 00 0B 63 6D 64 20 63 6F 6E 66 69 67 73 74 72 69 6E 67 73 20 32 33 33 32 37 20 30 0A 00 ... This output consists of the packets being transmitted from client to server and server to client. It decodes the packet in hex and ASCII form. From this output, we can see the methods for establishing a connection. There are two modes of a Quake2 network session: connected to a client and unconnected. The unconnected packets begin with the sequence OxFFFFFFFF and a text message. The initial starting connections consist of several interesting responses. It starts by requesting a “getchallenge” from the client to the server. Notice that the server sends a message back to the client with “challenge 28315.” Then the client responds back to the server with “connect 34 503 2.” According to Steve, these series of numbers are a form of security against spoofed IP addresses. The client has to send back a special number sent by the server to the client’s reported address to prove that the address is correct. Once a network session is established, some packets must be guaranteed reliable such as player chat or other commands. Below is an example of a player chat: output from testproxy --- Client to server packet: BA 03 00 80 EC 00 00 00 F7 01 04 73 61 79 20 22 74 65 73 74 22 00 02 35 D0 2E 00 00 02 62 94 10 20 00 10 20 40 80 11 20 ...........say "test << Player Chat "..5.....b.. .. @.. --- Client to server packet: BB 03 00 00 EC 00 00 00 F7 01 02 2D D0 2E 00 00 02 62 94 10 20 40 80 11 20 00 10 20 ...........-.....b.. @.. .. --- Server to client packet: ED 00 00 80 BB 03 00 80 0A 03 50 6C 61 79 65 72 3A 20 74 65 73 74 0A 00 14 D1 2E 00 00 D0 2E 00 00 00 01 04 11 00 10 24
To get data for q2analysis , we first needed to create a trace file of a Quake2 multiplayer session. The environment consisted of two clients and a server. To record the trace file, tcpdump was running on a separate PC. Tcpdump was executed with the following command: tcpdump –lenx –s 1518 –w output.dat This generates a binary file containing the trace from the multiplayer session. We played for roughly an hour and generated a trace file that is around 14.7MB. We then used this trace file for our q2analysis input: q2analysis The server port number is by default ‘27910.’ Q2analysis identifies any active Quake connection and record statistics about them. Here is the output of q2analysis:
Acknowledging unknown reliable.
Now expecting reliable 15
Now expecting reliable 206
Acknowledged reliable 15 Now expecting reliable 18
Acknowledged reliable 18
Acknowledged reliable 206
The server has an IP address of 192.168.0.2. The clients have an IP address of 192.168.0.1 and 192.168.0.5. As you can see from the data above, the packets arrive in sequences. To measure how much Quake2 data is being lost in the network, we would use the fields: “packet bytes sent,” “reliable packet bytes sent,” “reliable packets sent” and “number of reliable packets acknowledged” (Brown, p2). According to Steve, if q2analysis saw that a client sent 1000 bytes and 100 of these were reliable, then we can say that 10% of traffic is reliable. If then q2analysis reported 10 reliable packets of which only 8 were acknowledged, we can say that we have a loss rate of reliable packets of 20%. The data above, however, only represents a portion of the total output that was to be expected from q2analysis. This is due to the fact that the necessary data needed for the analysis was missing. Repeated attempts to successfully modify the source code were made however we were still not able to get a complete output. Only a few outputs were not able to be displayed
was most importantly, to learn, and without a doubt, we both learned a great deal about our topic and even though we were not fully able to achieve our desired goals that we had mentioned, we still feel we accomplished a great deal. References: http://www.caida.org/~swbrown (Steven Brown)