EMWIN: Emulating a Mobile Wireless Network using a Wired Network*

18 downloads 261486 Views 337KB Size Report
mobile wireless network with a number of mobile nodes can be faithfully ... not made or distributed for profit or commercial advantage and that copies bear this ...
EMWIN: Emulating a Mobile Wireless Network using a Wired Network* Pei Zheng and Lionel M. Ni Department of Computer Science and Engineering, Michigan State University 3115 Engineering Building East Lansing, MI, 48824, USA Phone: 1-517-353-4633

{zhengpei,ni}@cse.msu.edu ABSTRACT Test and performance evaluation of protocols and algorithms in mobile wireless networks is known to be challenging. Due to the highly varying characteristics of mobile wireless networks, one cannot merely rely on either network simulation or a testbed. Network emulation provides a controllable and reproducible environment, yet it generally lacks the support for the emulation of network topology and mobility, which are extremely critical in mobile wireless network research. We introduce EMWIN, a new IP-based mobile wireless emulation system that can overcome those drawbacks. In EMWIN, a target mobile wireless network is precisely mapped to an emulation configuration in a laboratory private network consisting of several emulator nodes, each of which is able to emulate multiple mobile hosts. Moreover, the emulator node can be flexibly configured such that predefined network conditions and traffic dynamics can be generated in an automatic manner. With EMWIN, the mobility of the target mobile wireless network with a number of mobile nodes can be faithfully emulated in a wired network environment.

Categories and Subject Descriptors C.2.1 [Computer Systems Organization]: ComputerCommunication Networks - Network Architecture and Design Wireless communication

General Terms Measurement, Performance, Design

Keywords mobile wireless network, performance evaluation, network emulation, mobility

1. INTRODUCTION Recent research in mobile computing has given rise to a plethora of mobile wireless network protocols and algorithms at different network layers. Applications subject to the dynamic environment of mobile wireless networks must be adaptive to a variety of Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. WOWMOM ’02, September 28, 2002, Atlanta, Georgia. Copyright 2000 ACM 1-58113-000-0/00/0000…$5.00.

network conditions and traffic dynamics. In an effort to test and evaluate the correctness and performance of new protocols, algorithms, and applications, one can choose from three approaches: simulation, testbed, or emulation. Wireless simulation packages, such as GloMoSim [1] and ns-2 [2], have been widely used in wireless network research. Especially, simulation is probably the only way to study the behavior of a protocol when real implementation is unavailable for a field test. Wireless network simulators often provide a rich set of protocol modules as well as a fully controllable simulation environment to generate whatever simulated network conditions and traffic dynamics. However, wireless simulation often makes many assumptions that may not always be valid in real wireless networks, thus making the statement based on the simulation result incorrect or flawed. Moreover, simulation time increases considerably as the number of simulated mobile nodes increases in most event-driven simulators. Furthermore, protocol and algorithm modules in wireless network simulators are not real implementations. Even if they work as expected in a simulator, they may fail in the target network due to either implementation bugs or network conditions and traffic dynamics that cannot be simulated or have been ignored in previous simulations. Some simulators can import traffic from real networks. However, each packet has to be converted such that it can be adapted in the simulation environment. A testbed might be theoretically the best test environment for new protocols and algorithms. As long as the real implementation for a certain operating system is available, one can always conduct a field test. However, a testbed will become useless and create misleading results if some specific network conditions and traffic dynamics never occur during a test. A wireless network emulator is a combination of wireless simulation and testbed. Similar to the simulation approach, wireless network emulation can generate predefined emulated network conditions and traffic dynamics for any specific purposes. As a real laboratory network, real protocol implementations, if available, can be tested in a controllable and reproducible environment without any modification. The major research issue of common wireless network emulators is how to determine those predefined network effects such that the corresponding emulation result can give more insight to users. Existing wireless network emulators can only emulate end-to-end network effects, making them unable to be used for the evaluation of topology-related * This research was supported in part by NSF grant EIA9911074.

protocols such as multi-hop mobile ad hoc routing protocols. Moreover, existing wireless network emulators are non-scalable in terms of the number of mobile hosts that they can emulate. In this paper, we present a new IP-based mobile wireless network emulation system called EMWIN (Emulation of Mobile WIreless Networks). EMWIN, unlike any other wireless network emulators to the authors’ knowledge, provides a unique feature of emulating multiple mobile hosts in one single emulator node. Thus with a number of commodity computers as the emulator nodes, one can emulate a large number of mobile hosts in EMWIN. In addition, EMWIN is able to emulate the mobility of a mobile host in a wired network. The rest of the paper is organized as follows. A literature review of existing mobile wireless network emulators is presented in Section 2. The architecture of EMWIN is outlined in Section 3, followed by a discussion of some critical design issues and a brief description of software components in EMWIN. Some preliminary testing results and a sample emulation experiment with EMWIN are then presented in Section 4. We conclude this paper with a summary and some future work in the last section.

2. A REVIEW OF EXISTING MOBILE WIRELESS NETWORK EMULATORS 2.1 Central-Control Wireless Emulators Emulators in this category abstract the entire mobile wireless network to a model with a set of parameters. With these parameters, the emulator is able to reproduce some network effects by applying network conditions and traffic dynamics to each packet passing by. A mobile wireless emulation experiment is conducted by connecting mobile hosts to the central-control emulator. This category may also include some general-purpose network emulators in addition to one specifically designed for mobile wireless network emulation. Some general purpose network emulators falling into this category are ONE [3], MIT’s Click modular router [4], Dummynet [5], and NIST NET [6]. Typical network parameters supported in these emulators include packet delay distribution, packet drop pattern, bandwidth, and queues. Although these emulators perform well for wired network emulations, they are likely to fail to meet one of the specific requirements of mobile wireless network emulation, i.e., the capability to emulate dynamic network conditions. Wirelessspecific network emulators, such as Seawind [7], allow one to define multiple set of parameters that are constantly changing during an emulation experiment. Additionally, specific channel models are provided to closely mimic a unidirectional wireless link. Another example of central-control mobile wireless network emulator is JEmu [8]. In JEmu, mobile hosts connected to the emulator host are not allowed to move. The emulator program, a standalone application, accepts radio layer messages from those mobile hosts and determines whether or not to forward the messages to the destination based on the location information of the mobile hosts. If there is a collision on the mobile host once the message is forwarded, the message is then dropped and returned to the radio layer. Central-control emulators are easy to configure, and their parameter sets are usually enough for the performance evaluation of end-to-end network protocols. However, this approach fails to provide a test environment for some other topology-related protocols such as multi-hop ad hoc

routing protocols, which is now highly active in mobile network research community.

2.2 Simulation-combined Wireless Emulators Mobile wireless network emulators in this category aim to combine network emulation with existing full-fledged network simulators such that the rich resource available in network simulators can be used in an emulation experiment. The most known example in the category is VINT/ns [9, 10]. As an extensible and powerful event-driven network simulator, VINT/ns has been widely used in network research community. A set of wireless and mobile extension has been developed by Monarch project at CMU/Rice [10-12]. The emulation facility in VINT/ns is able to capture and direct traffic into the simulator. Within the simulator, protocol modules, algorithms, and visualization tools can be incorporated into the emulator in an automatic fashion. In addition, arbitrary mobility can be generated with the help of the simulator. In particular, [12] offers an ns-based emulation environment for multi-hop ad hoc networks, in which a dynamic scenario can be created with ns and real traffic from a mobile node can be directed into a central ns server. The advantage of this approach is that it offers a large amount of simulation resources in the central simulator, compared with the centralcontrol approach that only has a limited number of network parameters available. However, similar to central-control approach, the simulation-combined approach also lacks the support for the evaluation of real topology-related protocols. Furthermore, since the emulation is mostly conducted in the simulator, this approach inherits the intrinsic drawbacks of network simulation.

2.3 Trace-based Mobile Network Emulation This approach, more specifically trace modulation, consists of three distinct phases: data collection phase, trace distillation phase, and modulation phase [13]. The first phase collects traces from a target mobile wireless network. The second phase constructs a wireless network model with the collected traces. The last phase reproduces the traced network effect in a wired network. This approach is particularly significant because the wireless network effects that it reproduces originate from real network traces, while the other two approaches can only approximate the network effects to some certain levels. However, similar to the central-control approach and simulation-combined approach, the trace-based approach can only provide a reproducible environment for the performance evaluation of endto-end protocols and applications. Additionally, since each mobile host in the target network should be traced for an emulation experiment, this approach cannot emulate a large-scale network because of the high cost in collecting traces. In addition to the three categories, some general purpose network emulators can also be used to emulate a simple wireless network topology, such as [14]. The problem of these emulators is that the number of nodes they can emulate is limited by the one-to-one mapping scheme, in which each mobile host in the target network is mapped to an emulator node in the emulation experiment. While all these approaches described above address the problem of mobile wireless network emulation with different methodologies, they share the following drawbacks:



Unable to emulate a wireless network topology, or unable to emulate a complex network topology with a low cost. • Unable to emulate the mobility of each individual mobile host. • Unable to provide an interactive interface for users to easily reconfigure the emulator. EMWIN, our mobile wireless network emulation system, is able to solve all the three problems. The capability of emulating multiple mobile hosts in one single emulator node allows one to emulate a complicated wireless topology with a small number of commodity computers, as in contrast to those one-to-one emulation approaches. We propose a data structure called neighbor table in each emulated mobile host to enable the mobility emulation. User-space control programs and kernel modules make EMWIN flexible in terms of emulation reconfiguration and interaction between users and the system. With these functionalities, EMWIN can be applied to a broad area of mobile wireless researches.

3. EMWIN Architecture 3.1 System Overview EMWIN is based on an emulation framework called EMPOWER (EMulation the Performance Of WidE aRea networks) [15]. EMPOWER provides a unique approach of mapping a network topology to an emulation configuration in a laboratory network. A router in the target network is mapped to a Virtual Router in the emulation configuration. A link in the target network is mapped to a Virtual Link in the emulation configuration. As shown in Figure 1, a router with four physical ports is mapped to a virtual router with four virtual ports in an emulator node. A virtual port is a combination of a physical Ethernet port to connect with other virtual routers, and a software module of virtual device to control the outgoing packets from this virtual port. In Figure 1, the emulator node has a total number of seven virtual ports; four of them are used in this example. An emulation configuration physically consists of a number of emulator nodes and fast Ethernet switches to establish a virtual topology. Each emulator node in the emulation configuration, with multiple network interface cards installed and properly configured, can be logically regarded as a set of virtual routers and virtual links. Specific network conditions and traffic dynamics are generated by the virtual routers and virtual links in the emulation configuration.

Router

PP1

PP2

PP3

PP4

such that the mobility of mobile hosts can be emulated in a wired laboratory private network. The physical layout of EMWIN consists of a number of emulator nodes and test nodes connected to a fast Ethernet switch. A test node can be a computer or a mobile device such as a laptop computer or a handheld device. Network traffic generated by the test nodes are directed to those emulator nodes in a way determined by the topology of the target network. Each emulator node may have multiple network interface cards installed. The number of mobile hosts that an emulator node can emulate can be increased simply by plugging in more network interface cards. The number of mobile hosts that EMWIN can emulate can also be increased by adding more emulator nodes into the system. As a result, EMWIN is highly scalable in emulation capacity. EMWIN can also have physical mobile hosts such as laptop computers, PDAs, and PocketPCs with wireless adaptors, and IEEE 802.11 wireless access points connected to the laboratory private network, thus providing a hybrid emulation configuration with both fixed emulator nodes and mobile emulator nodes. A target network of EMWIN is a mobile wireless network with a certain number of mobile hosts, which may include a variety of mobile devices. Each mobile host may operate in either multi-hop ad hoc mode, peer to peer mode, or infrastructure mode. In EMWIN, each mobile host in a target mobile wireless network is mapped to a Virtual Mobile Node (VMN). An emulation scenario can be created by configuring the property sets of all the VMNs. Thus the problem of emulating of mobile wireless network is reduced to the problem of accurately mapping the target network to an emulation configuration with the support for mobility emulation in a wired network. The following section outlines the approach we used to solve the problem.

3.2 Features of EMWIN EMWIN provide a set of features as follows. As an IP-based mobile wireless network emulation system, network conditions and traffic dynamics generated in EMWIN are “real”. A packet in EMWIN physically traverses the network protocol stack of the emulator node’s kernel, instead of logical processes in network simulators. Mobile wireless network protocol implementations can be tested and evaluated directly in EMWIN without any modifications or conversions. The unique feature of emulating multiple mobile hosts in a single emulator node enables one to emulate a large number of mobile hosts in EMWIN. For example, each emulator node can be configured to emulate 8 mobile hosts. With 6 of these emulator nodes, one can emulate a mobile wireless network with a total number of 48 mobile hosts. •

Emulator Node Virtual Router VD1

VP1

VD2

VP2

VD3

VP3

Virtual Ports (Not Used) VD4

VP4

VD5

VP5

VD6

VP6

VD7

PPn

Physical Port

VPn

Virtual Port

VDn

Virtual Device

VP7

Figure 1. An example of virtual-router mapping EMWIN essentially makes use of the virtual-router mapping scheme and adds some mobile wireless extensions to EMPOWER



EMWIN supports wireless mobility emulation with a wired network. Each VMN in EMWIN maintains a neighbor table of its accessible VMNs. The movement of a mobile host can be emulated by controlling its VMN’s neighbor table. As a result, a dynamically changing wireless network topology can be emulated in a wired network. With this feature, multi-hop mobile ad hoc network emulation can be done with EMWIN. EMWIN provides a fully controllable and reproducible network environment, in which wireless network protocols and algorithms can be tested and evaluated against specific network conditions and traffic dynamics.

• •

The use of commodity computers as emulator nodes makes EMWIN a low-cost emulation system. VMNs can be controlled with a user-space program, thus it is convenient for the reconfiguration of an emulation experiment.

3.3 Stages in an Emulation There are three necessary stages in conducting mobile wireless network emulation with EMWIN, as shown in Figure 2. First, the target mobile wireless network must be characterized for an emulation experiment with EMWIN. Physical network parameters of a mobile host in the target network are collected such as the data transmission speed, data transmission range of the wireless adaptor, and the bit error rate. If the transmission range is constantly changing, a series of sample data of the transmission range is needed for mobility emulation in the next stage. The network parameters can also be obtained by measuring the performance of a mobile host. In addition, the movement of each mobile host must be explicitly determined. Otherwise, random movement will be used. The output of target network characterization is a set of network parameters that can fully determine an emulation configuration. Target Network Characterization

A Set of Network Parameters

Emulation Results

Emulation Mapping

Output Emulation Experiment

An Emulation Configuration

Input

Figure 2. Stages in a complete emulation with EMWIN The second stage is emulation mapping. Based on the input of a set of network parameters from the first stage, EMWIN will generate an emulation configuration, which consists of certain number of properly configured VMNs and their mobility event lists. Each event represents an effective movement of the mobile host. Note that not all the movements are emulated since some of them may not have any impact on the neighbors of the mobile host. In other words, EMWIN only emulate the movement of a mobile host that will result in changes of its accessible neighbors or the transmission quality to its neighbors. The output of this stage is a complete emulation configuration. Once an emulation configuration is available, an emulation experiment can be conducted. If the purpose of the emulation is to evaluate the performance of a protocol or an algorithm implementation on a mobile host, one can simply execute the implementation on the corresponding VMN. For other purposes that may involve multiple mobile hosts, a scenario must be defined by the user prior to the emulation experiment. Each VMN in this scenario will then be configured in the second stage. In addition, traffic monitoring tools [16] and performance

measurement tools [17] are needed to collect and analyze emulation results. If the emulation experiment results show that an adjustment of the selected network parameters is needed to achieve a more accurate emulation, the three-stage procedure can be repeated with the adjustment. Current EMWIN is able to automatically conduct the last two stages, leaving the first stage to the user.

4. Design of EMWIN 4.1 Design Issues A critical design issue of EMWIN is to make it flexible in emulating different layers of mobile wireless networks. More specifically, EMWIN should not only provide means to emulate network behaviors beyond network layer (including network layer), but also facilitate the emulation of data link layer. In particular, most existing approaches use simulation to evaluate MAC layer protocols such as [18] and [19]. We intend to provide an emulation approach for the same purpose. The emulation of network layer and transport layer of a mobile wireless network can be done by abstracting the target network to a model with a set of network parameters, which is sufficient for end-to-end protocol evaluation, as described in the previous section. However, the emulation of multi-hop ad hoc routing in network layer needs more than those parameters. The movement of each mobile host must be precisely emulated such that the execution of routing protocols in the emulation environment closely mimics its behavior in the target network. In the emulation mapping stage of EMWIN, the movement of each mobile host in the target network is used to compute the neighbor table. Any topology changes in the target network will be reflected in the neighbor tables of some VMNs. We also plan to enhance EMWIN by providing modules to generate random movements for a number of mobile nodes. The emulation of data link layer of a mobile wireless network needs more discussion. Since EMWIN is designed to emulate a mobile wireless network in a wired network, the difference between the data link layer of a wireless network and a wired network makes the data link layer emulation quite complicated. For example, current Ethernet uses CSMA/CD as the MAC layer protocol, while IEEE 802.11 uses CSMA/CA with RTS/CTS and acknowledgement as the MAC layer protocol. Furthermore, EMWIN should be able to evaluate any modifications to the backoff algorithm. To achieve this, a special emulated MAC layer (eMAC) has to be added to each VMN. eMAC resides between the virtual device and network layer. Whenever a packet is about to be sent out from a VMN, eMAC of this VMN will check the channel flag of its current neighbors. If one of its neighbors has a channel flag raised, that neighbor is active in transmitting now. Thus the VMN has to backoff for next try. Once occupying the channel successfully, it will raise the channel flag to indicate the occupation. The channel flag will be reset when the transmission is over. In addition, RTC/CTS can be sent from one VMN to another for a complete channel operation. eMAC is also the place where a backoff algorithm can be incorporated into EMWIN. Since multiple VMNs coexist in an emulator node, resource competition among those VMNs may occur, which in turn affects the accuracy and scalability of the emulator. We have developed an effective virtual-router mapping algorithm to solve this

problem. According to this algorithm, we first find the maximum number of VMNs an emulator node is allowed to generate, then the target network is partitioned into small blocks such that the emulation accuracy of each block is guaranteed. Taking this problem into account, we are able to emulate 6 mobile nodes with a Pentium 4 1.7GHz computer, 4 mobile nodes with an AMD K6 300MHz computer. With a small number of those computers, we can emulate a large mobile wireless networks. In addition, we measured the overhead of the emulator modules and Ethernet links in emulating wireless connections. The results show that they have no significant effect on the emulation accuracy [20].

4.2 EMWIN COMPONENTS As a distributed mobile wireless network emulation system, EMWIN employs a VMN-based approach to facilitate the emulation of multiple mobile hosts, instead of a central-control approach that can only support end-to-end network effect emulation. The emulator nodes have the same hardware configurations. Each of them may be configured to generate a number of VMNs in accordance with the mapping scheme.

Emulator Node

VMN

Figure 3. Logic view of an emulator node showing an example of four VMNs existence

VMN Control Program

Virtual Device Control Program User Space

Kernel Space

Virtual Device

VMN

Figure 4. Modules in an emulator node where VMNs and virtual devices are controlled by user-space programs As shown in Figure 3, an emulator node is configured to generate four VMNs. The circles indicate the transmission range of each VMN, which may constantly move around. Note that these VMNs share the same system resources such as CPU, memory, bus, and interrupt in the emulator node. The key component in EMWIN is the virtual device. A virtual device is loadable kernel module attached to a physical network device. It can be configured to have an IP address. With appropriate routing table modifications, outgoing packets from a

physical network device can be redirected to the attached virtual device, in which a set of network effects such as packet transmission speed, packet latency, packet drop rate, and bit error rate can be applied. Consequently, a virtual device module represents a unidirectional link in the target mobile wireless network. A VMN physically consists of two network interface cards, one for ingress traffic and the other for egress traffic. However, since a virtual device only affects egress traffic, one single virtual device is attached to the network interface card for egress traffic to impose predefined network effects, as shown in Figure 4. Particularly, each VMN has a list of mobility events, which describes the movement of the corresponding mobile host in the target network. Each entry in the mobility event list consists of a time value indicating the time the event fires, and the updated neighbors of the emulator host. When a packet is directed to a VMN from IP layer of the emulator node, the corresponding virtual device will search the neighbor table to check if the next hop of the packet is in the neighbor table. If the next hop is in the neighbor table, the packet will be forwarded to the next hop. Otherwise, the packet will be silently dropped. The global coordination among VMNs on multiple emulator nodes is done by synchronizing system clocks of those emulator nodes periodically. Note that presently EMWIN does not deal with the radio layer collision at the receiver side. An enhanced version will cope with both receiver side collision and sender side accessibility. A similar approach of mobility emulation is in [21], in which a receiver side filter is used to determine if an ingress packet should be accepted. However, this approach only supports one filter per mobile host, which considerably limits its application. VMNs and virtual devices are executed in the kernel space, while two control programs, VMN control program and virtual device control program, are executed in user space such that one can conveniently modify the configurations of VMNs and virtual devices. Specifically, the VMN control program is responsible for generating all the VMNs based on the target network information in a configuration file. It also maintains the correct schedule of the mobility events. The virtual device control program configures the property set of each virtual device and system-wide settings according to the emulation scenario. These may include IP address, network mask, ARP entry, routing tables, routing rules, and queuing disciplines.

5. Preliminary Testing Results 5.1 Prototype Implementation We have implemented a number of software modules on Linux kernel version 2.4.2 for the prototype of EMWIN. A laboratory emulation environment has been established to conduct some validation experiments and sample emulation experiments. Presently, there are two types of emulator nodes in EMWIN. One is Pentium 4 1.7GHz PC with 128MB memory and the other is AMD K6/2 300MHz PC with 64MB memory. Both systems run Linux kernel 2.4.2. The test nodes are Intel Celeron 500MHz PCs with 128MB memory running Linux kernel 2.4.2. Each emulator node has three D-Link DFE-570TX Quad Channel network interface cards installed, each of which provides 4 100BaseTX Ethernet ports. Thus a total number of 12 fast Ethernet ports are available on each emulator node. All the Ethernet ports on emulator nodes connect to a private local area network through

two fast Ethernet switches: D-Link DES 3624i and D-Link DES 3624. The validation of network parameter emulation shows that the VMN component in EMWIN is quite accurate in emulating these network parameters [15].

Table 1. Mobility information of the sample scenario Node

Time (second) 0

15

A

5.2 A Sample Emulation To demonstrate the unique features of EMWIN, we now introduce a sample emulation of a multi-hop mobile ad hoc network. The sample network consists of 4 mobile hosts, A, B, C and D, as shown in Figure 5. A and C are two PocketPCs that do not move in this scenario, while B and D are two laptop computers that move in a predefined manner. The distance between A and C is 40 feet, B and D are in the middle perpendicular to A and C. Each mobile host has a transmission range of 25 feet. The moving speed of B and D is 1 foot per second. Note that the transmission range and moving speed can be any values. We choose these values to simplify the illustration of mobility emulation. The mobilty information of this scenario is shown in Table 1. The origin of the 2-d coordinates is at the position of A. At time t=0 second, B has an initial coordinates of (20, 0) and begins to move upwards, C has an initial coordinates of (40, 0), D has an initial coordinates of (20, -18). At time t=15 seconds, B has moved to (20, 25) and then stays there. D begins to move upwards. At time t=18 seconds, D moves to (20, -15) and keeps moving upwards. At time t=33 seconds, D moves to (20, 0). In this scenario, A and C cannot communicate with each other directly. Initially B works as a gateway for A and C to forward packets to and from these two mobile hosts. When B is moving upwards and out of the transmission range of A and C (t=15s), A and C lose the connection between each other. At the same time D is moving upwards. After three seconds (t=18 seconds), D is within the range of A and C, thus it works as a gateway for A and C to forward packets between them. We begin the emulation of this sample network by entering the first stage: target network characterization. The network parameters of this sample network are shown in Table 2. We choose these parameters in order to demonstrate comprehensive emulation of the sample network. We can also obtain these parameters by measuring the performance of a real target network. The output of this stage is a formatted configuration file containing all the necessary information for emulation mapping.

B

(20,0)

(20,25)

C D

18

33

(20,25)

(20,25)

(20,-15)

(20,0)

(0,0) (40,0) (20,-18)

(20,-18)

Table 2. Network parameters used in the sample emulation Link

Latency (ms)

Bandwidth (Mbps)

A->B

3

10

B->A

2

10

B->C

2

10

C->B

D

3

10

D->A

2

5

C->D

C

4

5

In the second stage, the target network with its determined network parameters is mapped to an emulation configuration in EMWIN. The configuration file is read by the VMN control program, then 4 VMNs, VMNA, VMNB, VMNC and VMND, are generated and properly configured according to the information in the configuration file. Since only 4 VMNs with 8 virtual devices have to be generated, one emulator node with 8 Ethernet ports is sufficient. In particular, the VMN control program constructs a mobility event list for each VMN, which will be used to configure the neighbor table of each VMN at a specified time. In addition, the routing table of each VMN has to be modified due to the changes in the neighbor table. For example, at the time when D is about to enter the transmission range of A and C, the routing tables of VMNs for A and C must be modified to reflect this change. We plan to implement some proposed multi-hop ad hoc routing protocols in EMWIN such that the installation and removal of a route for a VMN can be done automatically.

VMNB VMNA

VMNC

B A

C

TN1

TN2 VMND

D

Emulator Node

Figure 5. A sample mobile wireless network

Figure 6. The emulation configuration of the sample network We conduct the sample network emulation with two test nodes and an emulator node in EMWIN, as shown if Figure 6. VMNA is the gateway of one test node TN1, while VMNC is the gateway of the other test node TN2. VMNB or VMND will be the gateway of

Round Trip Time (ms)

VMNA and VMNC, depending on their positions at that time. The routing tables of VMNB and VMND ensure that packets from TN1 to TN2 will be forwarded to VMNC, and packets from TN2 to TN1 will be forwarded to VMNA. First, to verify the correct mobility event schedule of each VMN, a number of ICMP ECHO REQUEST are sent from TN1 to TN2. The round trip time of each packet is shown in Figure 7. In the first 15 seconds while B works as the gateway between A and C, the round trip times are on an average of 7 milliseconds. After that, there is no connection between A and C for 3 seconds. When D moves within the range of A and C and becomes the gateway, the round trip times are on an average of 9 milliseconds. Note that the time accuracy in EMWIN is almost 1 millisecond. 10 9 8 7 6 5 4 3 2 1 0

Figure 8. Time sequence graph of VMNA

Round Trip Time

0

20

40

ICMP Sequence Number

Figure 7. ICMP round trip time To demonstrate how EMWIN help examine the behavior of protocols in the target mobile ad hoc network, an ftp file transfer is performed between the two test nodes. The time-sequence graphs of the ftp data transfer connection on VMNA and VMND are shown in Figure 8 and Figure 9, respectively. Note that in Figure 8, the relative time begins at an absolute time of t=3 seconds when the ftp transfer begins. In Figure 9, the relative time begins at an absolute time of t=18 seconds when VMND begins forward packets for the connection between VMNA and VMNC. The time-sequence graphs suggest that the ftp data transfer continues for about 12 seconds. Then the connection was interrupted for 3 seconds, and then resume at t=18 seconds. Thus all the network events in this scenario are accurately emulated by EMWIN with only one emulator node. This emulation example demonstrates that EMWIN provides an alternative for the evaluation of various TCP flavors in wireless networks. By far most of the existing research in this domain are either simulationbased or requiring enough number of mobile devices [22, 23]. Moreover, multi-hop ad hoc routing protocols can be evaluated with EMWIN instead of simulation as described in [24-26].

Figure 9. Time sequence graph of VMND

6. Conclusion and Future Work In this paper, we presented a new IP-based mobile wireless network emulation system called EMWIN. Be aware of the drawbacks and limitations of existing wireless network emulators, we aimed to design and implement a new one that is able to emulate network topology and mobility of mobile hosts. Specifically, with a set of network parameters, EMWIN can map the target mobile wireless network to an emulation configuration in a laboratory private network, which consists of several emulator nodes and wireless devices if necessary. In the resulted configuration, each mobile host in the target network is mapped to a VMN, a logical entity with two network interfaces. Each emulator node has multiple fast Ethernet interface cards installed and configured. Therefore it can generate multiple VMNs. As a result, EMWIN is highly scalable in terms of the number of mobile hosts it can emulate in a target network. The mobility of mobile hosts is emulated with a simple and effective approach: neighbor table. A VMN will only transmit a packet if the next hop of the packet is in its neighbor table. The neighbor table can be modified in an automatic manner to emulate a predefined emulation scenario. We have implemented a prototype of EMWIN on Linux kernel 2.4.2. EMWIN can be applied to a broad area of mobile wireless network researches, such as protocol performance evaluation, and exploration of the dynamics and impact of specific network behaviors. In particular, EMWIN provides a flexible and scalable environment for the emulation of

multi-hop mobile ad hoc networks, which is difficult and even impossible with other emulators. Since EMWIN has shown a strong potential in supporting a variety of mobile wireless network research areas, we are in the process of exploring other possible enhancements to it. In our prototype, one has to define the movement of each mobile host in an emulation. We will add the function of random movement generation in case no target network is available while evaluating the performance of a protocol. We plan to add a module to the emulator node such that it can support the emulation of receiver side collision in radio layer. Particularly, we are considering incorporating infrared-aware devices (such as a PocketPC with infrared reader) into EMWIN for the development of some location-based mobile applications.

7. ACKNOWLEDGMENTS We would like to thank Kaushik K. Dam, Manqing Huang and Gang Lan for their previous contributions in the emulator. Thanks also go to Lei Xu for her suggestions and insightful comment.

8. REFERENCES [1] GloMoSim, http://pcl.cs.ucla.edu/projects/glomosim/ [2] The Network Simulator: ns-2, http://www.isi.edu/nsnam/ns/ [3] M. Allman, A. Caldwell, and S. Ostermann, "ONE: The Ohio Network Emulator," Ohio University, Tech Report TR-19972, August 1997. [4] E. Kohler, R. Morris, B. Chen, J. Jannotti, and M. F. Kaashoek, "The Click Modular Router," ACM Transactions on Computer Systems, vol. 18, pp. 263-297, August, 2000. [5] L. Rizzo, "Dummynet: a simple approach to the evaluation of network protocols," ACM Computer Communication Review, vol. 27, 1997. [6] NIST NET, http://snad.ncsl.nist.gov/itg/nistnet/ [7] M. Kojo, A. Gurtov, J. Manner, P. Sarolahti, T. Alanko, and K. Raatikainen, "Seawind: a Wireless Network Emulator," In Proceedings of 11th GI/ITG Conference on Measuring, Modeling and Evaluation of Computer and Communication Systems(MMB 2001), RWTH Aachen, Germany, 2001. [8] J. Flynn, H. Tewari, and D. O'Mahony, "JEmu: A Real Time Emulation System for Mobile Ad Hoc Networks," In Proceedings of the Firsit Joint IEI/IEE Symposium on Telecommunications Systems Research, Dublin, Ireland, November 2001. [9] K. Fall, "Network Emulation in the VINT/NS Simulator," In Proceedings of 4th IEEE Symposium on Computers and Communications, July 1999. [10] F. Kubinszky, "Emulation of ad-hoc networks on IEEE 802.11," Budapest University of Technology and Economics, Budapest, Hungary, MS Thesis 2000. [11] The CMU Monarch Project's Wireless and Mobility Extensions to NS, http://www.monarch.cs.cmu.edu [12] Q. Ke, D. A. Maltz, and D. B. Johnson, "Emulation of MultiHop Wireless Ad Hoc Networks," In Proceedings of the seventh International Workshop on Mobile Multimedia Communications (MOMUC 2000), Tokyo, Japan, October 2000. [13] M. Satyanarayanan and B. Noble, "The Role of Trace Modulation in Building Mobile Computing Systems," In

Proceedings of the 6th Workshop on Hot Topics in Operating Systems, Cape Cod MA, USA, May 1997. [14] J. S. Ahn, P. B. Danzig, Z. Liu, and L. Yan, "Evaluation of TCP Vegas: Emulation and Experiment," In Proceedings of SIGCOMM, 1995. [15] P. Zheng and L. M. Ni, "EMPOWER: A Scalable Framework for Network Emulation," In Proceedings of the 2002 International Conference on Parallel Processing (ICPP '02), In Press, Vancouver, Canada, 2002. [16] tcpdump/libpcap, http://www.tcpdump.org/ [17] ttcp, http://www.cisco.com/warp/public/471/ttcp.html [18] S. S. Kang and M. W. Mutka, "Provisioning Service Differentiation in Ad Hoc Networks by the Modification of Backoff Algorithm," In Proceedings of Int'l Conference on Computer Communication and Network (ICCCN) 2001, Scottsdale, Arizona, October 2001. [19] B. Bensaou, Y. Wang, and C. C. Ko, "Fair Media Access in 802.11 based Wireless Ad-hoc Networks," In Proceedings of Mobile and Ad Hoc Networking and Computing 2000, 2000. [20] P. Zheng and L. M. Ni, "Experiences in Building a Scalable Distributed Network Emulation System," Department of Computer Science and Engineering, Michigan State University, Tech Report MSU-CSE-02-18, 2002. [21] D. T. McWherter, J. Sevy, and W. C. Regli, "Building an IP Network Quality-of-Service Testbed," in Internet Computing, vol. 4, 2000, pp. 65-73. [22] H. Balakrishnan, V. N. Padmanabhan, S. Seshan, and R. H. Katz, "A Comparison of Mechanisms for Improving TCP Performance over Wireless Links," IEEE\ACM Transactions on Networking, vol. 5, pp. 756--769, 1997. [23] C. Parsa and J. J. Garcia-Luna-Aceves, "Improving TCP Performance over Wireless Networks at the Link Layer," In Proceedings of 7th International Conference on Network Protocols, 1999. [24] J. Broch, D. A. Maltz, D. B. Johnson, Y.-C. Hu, and J. Jetcheva, "A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols," In Proceedings of Proceedings of the Fourth Annual ACM/IEEE International Conference on Mobile Computing and Networking (MobiCom '98), Dallas, Texas USA, 1998. [25] S. R. Das, R. Castaneda, J. Yan, and S. Rimli, "Comparative performance evaluation of routing protocols for mobile, adhoc networks," In Proceedings of IEEE the Seventh International Conference on Computer Communications and Networks (IC3N '98), 1998. [26] D. B. Johnson and D. A. Maltz, "Dynamic Source Routing in Ad Hoc Wireless Networks," in Mobile Computing, T. Imielinski and H. Korth, Eds.: Kluwer Academic Publishers, 1996.