simulation and analysis of intersystem handover in mobile ... · simulation and analysis of...

63
Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak Agrawal December 8, 2008

Upload: others

Post on 03-Apr-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Simulation and Analysis of Intersystem Handover

in Mobile WiMax Networks

Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak Agrawal

December 8, 2008

Page 2: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Contents

1 Introduction 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Simulation Environment 32.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Network Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 Network Animator . . . . . . . . . . . . . . . . . . . . . . . . . . 32.4 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Overview of WiMax and WiFi Networks 63.1 WIMAX Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.1 WiMax Architecture . . . . . . . . . . . . . . . . . . . . . 73.1.2 WiMax Speed and Range . . . . . . . . . . . . . . . . . . 93.1.3 WiMAX - Technology . . . . . . . . . . . . . . . . . . . . 93.1.4 WiMAX - Physical Layer . . . . . . . . . . . . . . . . . . 103.1.5 WiMAX - Mobility Support . . . . . . . . . . . . . . . . . 123.1.6 WiMAX - IEEE Standards . . . . . . . . . . . . . . . . . 13

3.2 WiFi Network (802.11x) . . . . . . . . . . . . . . . . . . . . . . . 143.3 Media Independent Handover (IEEE 802.21) . . . . . . . . . . . 15

3.3.1 802.21 Specifications . . . . . . . . . . . . . . . . . . . . . 173.3.2 MIH Reference Model . . . . . . . . . . . . . . . . . . . . 18

3.4 Mobility between WiFi and WiMax . . . . . . . . . . . . . . . . 203.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4 Simulation Architectures and Network Scenarios and Results 224.1 Simulation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.1.1 LINK GOING DOWN EVENT TRIGGER . . . . . . . . 224.1.2 LINK ROLLBACK EVENT TRIGGER . . . . . . . . . . 234.1.3 LINK DOWN EVENT TRIGGER . . . . . . . . . . . . . 23

4.2 Handoff Mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . 234.3 Network Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.3.1 WiMax-WiMax Handover . . . . . . . . . . . . . . . . . . 254.3.2 WiFi-WiMax Handover . . . . . . . . . . . . . . . . . . . 25

4.4 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . 254.5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

1

Page 3: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Abstract

4th generation networks postulate high speed ubiquitous coverage for all typesof mobility which in turn demands seamless handover of connectivity from onenetwork to another. This has necessitated a detailed performance study ofhandover among homogeneous and heterogeneous networks. This documentsummarizes our analysis of various types of handoffs among wireless networks.A detailed study of two poplar wireless access networks namely, WiMax(802.16)and WLAN(802.11) has been performed and the handover mechanisms amongthem have been studied. To this end, we have analyzed performance of two typesof handoffs - horizontal handoff between two homogeneous networks (WLAN-WLAN or WiMax-WiMax) and vertical handoff between two heterogeneousnetworks (WLAN-WiMax). In order to study the performance of vertical hand-off, IEEE 802.21 Media Independent Handover has been employed. Metrics likeAverage handoff distances for varying power threshold in layer 2 and 3 andpacket drop rate for varying speed have been studied and conclusions have beendrawn for different scenarios.

Keywords: IEEE802.11e, IEEE802.16, IEEE802.21 Media Independent Han-dover,Intersystem Handover.

Page 4: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Chapter 1

Introduction

1.1 Introduction

The Cellular Networks have evolved a great deal in last few decades. It haspassed through 3 generations as below:

• First generation (1G) analog cellular radio (voice only)

• Second generation (2G) digital cellular radio (voice and basic data only)

• Third generation (3G) multimedia cellular radio (voice, data, audio en-tertainment, images, video clips, etc)

Beyond 3G/fourth generation/(B3G/4G) still evolving is advanced 3G (3.5G)or 4G cellular, interworking with other broadband wireless solutions, such asWiMAX or WiFi, offering converged services across different network types,and cutting the cost of delivering rich high-data-rate multimedia applications(e.g., real-time gaming or videoconferencing; streaming entertainment qualityaudio and video) to mobile users.

In order to be able to support continuous mobility and maintain connectiv-ity, 4th generation wireless technology calls for the integration of heterogeneousnetworks by performing seamless handover from one type of network to an-other type. For example, a suitably equipped laptop might be able to use botha high speedwireless LANand acellulartechnology forInternetaccess. WirelessLAN connections generally provide higher speeds, while cellular technologiesgenerally provide more ubiquitous coverage. Thus the laptop user might wantto use a wireless LAN connection whenever one is available, and to ’fail over’to a cellular connection when the wireless LAN is unavailable. Vertical hand-offs refer to the automatic fallover from one technology to another in order tomaintain communication. In this project, we have analyzed the performance ofintegrating two such technologies that target peak data rates for highly mobileaccess and for low mobility (pedestrian speeds or fixed) access. An conceptualarchitecture of vertically overlapping heterogeneous networks, illustrating alsothe various domains of operation or subnetworks in the overall architecture isshown in Figure 1.1

1

Page 5: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 1.1: Architecture of Vertically overlapping heterogeneous networks

To this end, the performance of handover mechanisms between two homoge-neous networks like WiMax and WiMax and between two heterogeneous net-works (WiMax and WiFi) was analyzed. While integrating homogeneous net-works has been a thing of past, integrating heterogeneous networks and per-forming seamless handoff between them has been a challenge. In this project,we have demonstrated a special handoff mechanism introduced in 802.21 calledMedia independent handover (MIH). MIH defines link-layer services to enablehandovers among different radio air interfaces. For example, 802.21 handoversinclude handover from IEEE 802.11 (WiFi) to IEEE 802.16 (WiMAX) or IEEE802 to/from cellular. IEEE 802.21s mechanism for handover among heteroge-neous air interfaces applies to inter-radio mobility between 802.16 and 802.11.

In order to demonstrate vertical handoff In our simulations, we used mobilenodes with two wireless interfaces - one for WiFi and one for WiMax. With802.21 in picture, a whole new realm of metrics opened up which helped usanalyze handover in greater detail. This report has been organized as follows.Chapter 2 describes the simulation environment in greater detail while Chap-ter 3 gives an overview of WiFi and WiMax technologies. Chapter 4 presentsSimulation Architectures and Network Scenarios and Results. The simulation ofwireless network including WiFi stations, WiMax stations and mobile nodes wasdone using NS2. Network animator was also used to graphically demonstratebehavior of each scenario.

2

Page 6: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Chapter 2

Simulation Environment

2.1 Introduction

For our simulations, we have used Network Simulator 2 (NS). To simulateWiMax, we have used National Institute of Standards and Technology (NIST)WiMax package. Also, for mobility, we have used a package with 802.21 proto-col.

2.2 Network Simulator

NS is a discrete event simulator targeted at networking research. Ns2 providessubstantial support for simulation of TCP, routing, and multicast protocols overwired and wireless (local and satellite) networks. The simulator is based on twolanguages: an object oriented simulator, written in C++, and an OTcl (objectoriented version of Tool command language (Tcl)) interpreter. Tcl scripts areused to execute user written command scripts. Thus there are two class hier-archies: the compiled C++ hierarchy and the one with interpreted OTcl. Thecompiled C++ hierarchy allows us to achieve efficiency in the simulation throughfaster execution times, which is essential for detailed definition and operation ofprotocols. The OTcl script provides for user defined network topologies, appli-cations and protocol sets and also the form of output that is expected from thesimulator. The OTcl can utilize the objects compiled in C++ done using anOTcl linkage (through tclCL, Tcl C Linkage). NS being a discrete event simula-tor, where time advances based on the events are maintained in a scheduler. Anevent is an object in the C++ hierarchy with a unique ID, a scheduled time anda pointer to an object that handles that event. The scheduler keeps an ordereddata structure with the events to be executed and fires them by invoking thehandler of that event.

2.3 Network Animator

Network Animator (NAM) is a visualization tool which helps visualize thenetwork traffic from the packet data in the trace files. In addition to visualizingpacket bows, NAM also allows packets to be color coded based on preference

3

Page 7: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 2.1: Simulation process in NS2

by the protocol, and can show a node’s native packet queues, which allows foreasy identification of bottlenecks. NAM can also be used to visualize a networksetup or topology. In this thesis, NAM is used to verify that the setup behaves asintended regarding routing and basic operation. Co lour coding of the differentbundle types, thus visually separating ordinary bundles from status reports andcustody acknowledgements makes it possible to make a rough verification of theintended functionality.

2.4 Installation

1. NS2.29 Package Installed

2. NIST WiMax Module Installed

3. High speed mobility and IEEE 802.21 package installed

4. Configuration: Using TCL scripting

5. Analysis and Data Processing using bash and awk Scripts

6. Animations: NAM1.12

2.5 Summary

The ns simulator covers a very large number of applications, of protocols,of network types, of network elements and of traffic models. We call thesesimulated objects. ns is an object oriented simulator, written in C++, withan OTcl interpreter as a front-end. The simulator supports a class hierarchy in

4

Page 8: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

C++, and a similar class hierarchy within the OTcl interpreter. The root of thishierarchy is the class TclObject. Users create new simulator objects throughthe interpreter.

5

Page 9: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Chapter 3

Overview of WiMax andWiFi Networks

This Chapter gives a brief introduction of WiMax/WiFi Networks and MediaIndependent Handover (MIH) .We also provide comparison between the twoand the feasibility and reasons behind conducting handover between the twotechnologies.

3.1 WIMAX Overview

WiMAX is an industry trade organization formed by leading communicationscomponent and equipment companies to promote and certify compatibility andinteroperability of broadband wireless access equipment that conforms to theIEEE 802.16 and ETSI HIPERMAN standards.

WiMax is:

1. Acronym for Worldwide Interoperability for Microwave Access.

2. Based on Wireless MAN technology.

3. A wireless technology optimized for the delivery of IP centric services overa wide area.

4. A scalable wireless platform for constructing alternative and complemen-tary broadband networks.

5. A certification that denotes interoperability of equipment built to theIEEE 802.16 or compatible standard. The IEEE 802.16 Working Groupdevelops standards that address two types of usage models:

(a) A fixed usage model (IEEE 802.16-2004).

(b) A portable usage model (IEEE 802.16e).

6

Page 10: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

3.1.1 WiMax Architecture

A WiMAX system consists of two major parts:

1. A WiMAX base station.

2. A WiMAX receiver.

WiMAX Base Station: A WiMAX base station consists of indoor electron-ics and a WiMAX tower similar in concept to a cell-phone tower. A WiMAXbase station can provide coverage to a very large area up to a radius of 6 miles.Any wireless device within the coverage area would be able to access the Inter-net.

The WiMAX base stations would use the MAC layer defined in the standard .a common interface that makes the networks inter-operable and would allocateuplink and downlink bandwidth to subscribers according to their needs, on anessentially real-time basis.

Each base station provides wireless coverage over an area called a cell. The-oretically, the maximum radius of a cell is 50 km or 30 miles however, practicalconsiderations limit it to about 10 km or 6 miles.

WiMAX Receiver: A WiMAX receiver may have a separate antenna orcould be a stand-alone box or a PCMCIA card sitting in your laptop or computeror any other device. This is also referred as customer premise equipment (CPE).

WiMAX base station is similar to accessing a wireless access point in a WiFinetwork, but the coverage is greater

Backhaul: A WiMAX tower station can connect directly to the Internetusing a high-bandwidth, wired connection (for example, a T3 line). It can alsoconnect to another WiMAX tower using a line-of-sight, microwave link.

Backhaul refers both to the connection from the access point back to the basestation and to the connection from the base station to the core network.

It is possible to connect several base stations to one another using high-speedbackhaul microwave links. This would also allow for roaming by a WiMAXsubscriber from one base station coverage area to another, similar to the roamingenabled by cell phones.

The IEEE 802.16e-2005 standard provides the air interface for WiMAX butdoes not define the full end-to-end WiMAX network. The WiMAX Forum’sNetwork Working Group (NWG), is responsible for developing the end-to-endnetwork requirements, architecture, and protocols for WiMAX, using IEEE802.16e-2005 as the air interface.

7

Page 11: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

The WiMAX NWG has developed a network reference model to serve as anarchitecture framework for WiMAX deployments and to ensure interoperabilityamong various WiMAX equipment and operators.

The network reference model envisions a unified network architecture for sup-porting fixed, nomadic, and mobile deployments and is based on an IP servicemodel. Below is simplified illustration of an IP-based WiMAX network archi-tecture. The overall network may be logically divided into three parts:

1. Mobile Stations (MS) used by the end user to access the network.

2. The access service network (ASN), which comprises one or more basestations and one or more ASN gateways that form the radio access networkat the edge.

3. Connectivity service network (CSN), which provides IP connectivity andall the IP core network functions.

The network reference model developed by the WiMAX Forum NWG definesa number of functional entities and interfaces between those entities. Fig belowshows some of the more important functional entities.

1. Base station (BS): The BS is responsible for providing the air interfaceto the MS. Additional functions that may be part of the BS are micro-mobility management functions, such as handoff triggering and tunnel es-tablishment, radio resource management, QoS policy enforcement, trafficclassification, DHCP (Dynamic Host Control Protocol) proxy, key man-agement, session management, and multicast group management.

2. Access service network gateway (ASN-GW):The ASN gateway typ-ically acts as a layer 2 traffic aggregation point within an ASN. Additionalfunctions that may be part of the ASN gateway include intra-ASN loca-tion management and paging, radio resource management and admissioncontrol, caching of subscriber profiles and encryption keys, AAA clientfunctionality, establishment and management of mobility tunnel with basestations, QoS and policy enforcement, foreign agent functionality for mo-bile IP, and routing to the selected CSN.

3. Connectivity service network (CSN):The CSN provides connectiv-ity to the Internet, ASP, other public networks, and corporate networks.The CSN is owned by the NSP and includes AAA servers that supportauthentication for the devices, users, and specific services. The CSN alsoprovides per user policy management of QoS and security. The CSN isalso responsible for IP address management, support for roaming betweendifferent NSPs, location management between ASNs, and mobility androaming between ASNs.

The WiMAX architecture framework allows for the flexible decompositionand/or combination of functional entities when building the physical entities.For example, the ASN may be decomposed into base station transceivers (BST),base station controllers (BSC), and an ASNGW analogous to the GSM modelof BTS, BSC, and Serving GPRS Support Node (SGSN).

8

Page 12: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 3.1: IP Based WiMax Architecture

3.1.2 WiMax Speed and Range

WiMAX is expected to offer initially up to about 40 Mbps capacity per wire-less channel for both fixed and portable applications, depending on the partic-ular technical configuration chosen, enough to support hundreds of businesseswith T-1 speed connectivity and thousands of residences with DSL speed con-nectivity. WiMAX can support voice and video as well as Internet data.

WiMax will be to provide wireless broadband access to buildings, either incompetition to existing wired networks or alone in currently unserved rural orthinly populated areas. It can also be used to connect WLAN hotspots to theInternet. WiMAX is also intended to provide broadband connectivity to mobiledevices. It would not be as fast as in these fixed applications, but expectationsare for about 15 Mbps capacity in a 3 km cell coverage area.

With WiMAX users could really cut free from today.s Internet access arrange-ments and be able to go online at broadband speeds, almost wherever they likefrom within a MetroZone.

WiMAX could potentially be deployed in a variety of spectrum bands: 2.3GHz,2.5GHz, 3.5GHz, and 5.8GHz

3.1.3 WiMAX - Technology

WiMAX is a technology based on the IEEE 802.16 specifications to enablethe delivery of last-mile wireless broadband access as an alternative to cable andDSL. The design of WiMAX network is based on the following major principles:

1. Spectrum . able to be deployed in both licensed and unlicensed spectra.

9

Page 13: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

2. Topology . supports different Radio Access Network (RAN) topologies.

3. Interworking . independent RAN architecture to enable seamless integra-tion and interworking with WiFi, 3GPP and 3GPP2 networks and existingIP operator core network.

4. IP connectivity . supports a mix of IPv4 and IPv6 network interconnectsin clients and application servers

5. Mobility management . possibility to extend the fixed access to mobilityand broadband multimedia services delivery.

WiMAX has defined two MAC system profiles the basic ATM and the basicIP. They have also defined two primary PHY system profiles, the 25 MHz-widechannel for use in (US deployments) the 10.66 GHz range, and the 28 MHz widechannel for use in (European deployments) the 10.66 GHz range.

The WiMAX technical working group is defining MAC and PHY systemprofiles for IEEE 802.16a and HiperMan standards. The MAC profile includesan IP-based version for both wireless MAN (licensed) and wireless HUMAN(licence-exempt).

IEEE Standard 802.16 was designed to evolve as a set of air interfaces stan-dards for WMAN based on a common MAC protocol but with physical layerspecifications dependent on the spectrum of use and the associated regulations.

The WiMAX framework is based on several core principles:

1. Support for different RAN topologies.

2. Well-defined interfaces to enable 802.16 RAN architecture independencewhile enabling seamless integration and interworking with WiFi, 3GPP3and 3GPP2 networks.

3. Leverage and open, IETF-defined IP technologies to build scalable all-IP802.16 access networks using common off the shelf (COTS) equipment.

4. Support for IPv4 and IPv6 clients and application servers, recommendinguse of IPv6 in the infrastructure.

5. Functional extensibility to support future migration to full mobility anddelivery of rich broadband multimedia.

3.1.4 WiMAX - Physical Layer

The WiMAX physical layer is based on orthogonal frequency division multi-plexing. OFDM is the transmission scheme of choice to enable high-speed data,video, and multimedia communications and is used by a variety of commercialbroadband systems, including DSL, Wi-Fi, Digital Video Broadcast-Handheld(DVB-H), and MediaFLO, besides WiMAX.

10

Page 14: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

OFDM is an elegant and efficient scheme for high data rate transmission ina non-line-of-sight or multipath radio environment.

WiMAX supports a variety of modulation and coding schemes and allows forthe scheme to change on a burst-by-burst basis per link, depending on channelconditions. Using the channel quality feedback indicator, the mobile can providethe base station with feedback on the downlink channel quality. For the uplink,the base station can estimate the channel quality, based on the received signalquality.

WiMAX - OFDM Basics

OFDM belongs to a family of transmission schemes called multicarrier mod-ulation, which is based on the idea of dividing a given high-bit-rate data streaminto several parallel lower bit-rate streams and modulating each stream on sep-arate carriers, often called subcarriers, or tones.

Multicarrier modulation schemes eliminate or minimize intersymbol interfer-ence (ISI) by making the symbol time large enough so that the channel-induceddelays, delay spread being a good measure of this in wireless channels . are aninsignificant (typically, < 10 percent) fraction of the symbol duration.

Therefore, in high-data-rate systems in which the symbol duration is small,being inversely proportional to the data rate, splitting the data stream intomany parallel streams increases the symbol duration of each stream such thatthe delay spread is only a small fraction of the symbol duration.

OFDM is a spectrally efficient version of multicarrier modulation, where thesubcarriers are selected such that they are all orthogonal to one another over thesymbol duration, thereby avoiding the need to have non overlapping subcarrierchannels to eliminate intercarrier interference.

In order to completely eliminate ISI, guard intervals are used between OFDMsymbols. By making the guard interval larger than the expected multipath delayspread, ISI can be completely eliminated. Adding a guard interval, however,implies power wastage and a decrease in bandwidth efficiency.

WiMAX - MAC Layer

The IEEE 802.16 MAC was designed for point-to-multipoint broadband wire-less access applications. The primary task of the WiMAX MAC layer is toprovide an interface between the higher transport layers and the physical layer.

The MAC layer takes packets from the upper layer. These packets are calledMAC service data units (MSDUs).and organizes them into MAC protocol dataunits (MPDUs) for transmission over the air. For received transmissions, theMAC layer does the reverse.

11

Page 15: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

The IEEE 802.16-2004 and IEEE 802.16e-2005 MAC design includes a con-vergence sublayer that can interface with a variety of higher-layer protocols,such as ATM TDM Voice, Ethernet, IP, and any unknown future protocol.

The 802.16 MAC is designed for point-to-multipoint (PMP) applications andis based on collision sense multiple access with collision avoidance (CSMA/CA).

The MAC incorporates several features suitable for a broad range of applica-tions at different mobility rates, such as the following:

1. Privacy key management (PKM) for MAC layer security. PKM version 2incorporates support for extensible authentication protocol (EAP).

2. Broadcast and multicast support.

3. Manageability primitives.

4. High-speed handover and mobility management primitives.

5. Three power management levels, normal operation, sleep and idle.

6. Header suppression, packing and fragmentation for efficient use of spec-trum

7. Five service classes, unsolicited grant service (UGS), real-time polling ser-vice (rtPS), non-real-time polling service (nrtPS), best effort (BE) andExtended real-time variable rate (ERT-VR) service.

These features combined with the inherent benefits of scalable OFDMA make802.16 suitable for high-speed data and bursty or isochronous IP multimediaapplications.

Support for QoS is a fundamental part of the WiMAX MAC-layer design.WiMAX borrows some of the basic ideas behind its QoS design from the DOC-SIS cable modem standard.

Strong QoS control is achieved by using a connection-oriented MAC architec-ture, where all downlink and uplink connections are controlled by the servingBS.

WiMAX also defines a concept of a service flow. A service flow is a unidirec-tional flow of packets with a particular set of QoS parameters and is identifiedby a service flow identifier (SFID).

3.1.5 WiMAX - Mobility Support

WiMAX envisions four mobility-related usage scenarios :

1. Nomadic: The user is allowed to take a fixed subscriber station and re-connect from a different point of attachment.

12

Page 16: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

2. Portable: Nomadic access is provided to a portable device, such as a PCcard, with expectation of a best-effort handover.

3. Simple mobility: The subscriber may move at speeds up to 60 kmph withbrief interruptions (less than 1 sec) during handoff.

4. Full mobility: Up to 120 kmph mobility and seamless handoff (less than50 ms latency and < 1 % packet loss) is supported.

It is likely that WiMAX networks will initially be deployed for fixed andnomadic applications and then evolve to support portability to full mobilityover time.

The IEEE 802.16e-2005 standard defines a framework for supporting mobil-ity management. In particular, the standard defines signaling mechanisms fortracking subscriber stations as they move from the coverage range of one basestation to another when active or as they move from one paging group to anotherwhen idle.

The standard also has protocols to enable a seamless handover of ongoingconnections from one base station to another.

The standard also has protocols to enable a seamless handover of ongoing con-nections from one base station to another. The WiMAX Forum has used theframework defined in IEEE 802.16e-2005 to further develop mobility manage-ment within an end-to-end network architecture framework. The architecturealso supports IP-layer mobility using mobile IP.

3.1.6 WiMAX - IEEE Standards

The IEEE 802.16, the Air Interface for Fixed Broadband Wireless AccessSystems, also known as the IEEE WirelessMAN air interface, is an emergingsuite of standards for fixed, portable and mobile BWA in MAN.

These standards are issued by IEEE 802.16 work group that originally coveredthe wireless local loop (WLL) technologies in the 10.66 GHz radio spectrum,which were later extended through amendment projects to include both licensedand unlicensed spectra from 2 to 11 GHz.

The WiMAX umbrella currently includes 802.16-2004 and 802.16e. 802.16-2004 utilizes OFDM to serve multiple users in a time division fashion in asort of a round-robin technique, but done extremely quickly so that users havethe perception that they are always transmitting/receiving. 802.16e utilizesOFDMA and can serve multiple users simultaneously by allocating sets of tonesto each user.

Above is the chart of various IEEE 802.16 Standards related to WiMAX.

13

Page 17: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 3.2: WiMax IEEE Standards

3.2 WiFi Network (802.11x)

Currently the WLAN, usually denoting the IEEE 802.11-family [29], is thesolution to be used when creating a wireless network inside companies, homes,or other public/private buildings. The 802.11g is the market version today,while the aging 802.11b is retiring, mostly because of lacks in the connectiondata rates. The 802.11a is still in use on some locations where the backhaulconnection to the access point (the name for a BS within 802.11x-standards) cannot be created with wired connection and the clients subsequently use 802.11bor 802.11g for communication with the access point. The 802.11n task group iscurrently standardizing the latest version and the first products are appearingon the markets.

The g-amendment gives the maximum data rate of 54 Mbit/s and rather goodsecurity with Wi-Fi Protected Access (WPA). The older WEP can also be used,but since it is rather easy to break, the WPA is preferred. The WPA, or themore recent WPA2, security protocols have been developed in a working groupof their own, the 802.11i. The emerging 802.11n uses MIMO increasing the peakrate by a decade compared to the 802.11g. However, as with the 802.11g, thetypical rate remains much lower; in 802.11n in the region of 200 Mbit/s.

The 802.11-technologies are well suited for communications with short dis-tance to the access point. The coverage indoors is only a couple of tens of metersand in perfect conditions outdoors the signal can travel a few hundred meters.The 802.11 alone is not competing the same markets with Mobile WiMax, butit can be more or less considered as a good companion to a device working withMobile WiMax.

14

Page 18: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

There are also other amendments in the 802.11-family that are focused onproviding a certain service with some of the transmission amendments. The802.11u working group is based on similar thoughts as the earlier mentioned802.21, hence interoperability of 802-technologies with other networks such ascellular. [30]

The 802.11p, or Wireless Access for the Vehicular Environment (WAVE),is also a standard under way. The purpose with it is to give vehicles a wayto communicate with the roadside or other vehicles. The 802.11p is based onfunctioning on a licensed band around 5.9 GHz, offering an average coverageof a few hundred meters and a data rate of 6 Mbit/s. As the name suggests,this protocol is intended to be used in vehicles and the proposed usage scenarioscould be in toll collection, vehicle safety services, and/or commerce transactionvia cars. [31]

There have also been attempts to increase the mobile use of 802.11 technolo-gies. The 802.11r, or also know as fast roaming or fast Basic Service Set (BSS)transition, is focused on providing handoffs for a moving MS.

However, as stated earlier, the 802.11 is not a direct competitor to the MobileWiMax and therefore not described in more detail in this work.

Comparison to Mobile WiMax: The WLAN devices can already today sup-port data rates equal and more than the ones announced to be reached withthe Mobile WiMax, but the lacks in allowed distance from the access point andthe handoff capabilities make it rather to be a good companion than a directcompetitor. The examples already exist, where WLAN and UMTS/HSPA iscombined in a cell phone. This is a very likely scenario with WLAN and MobileWiMax as well.

3.3 Media Independent Handover (IEEE 802.21)

The 802.21 is IEEE’s rather new workgroup heading for co-operation of dif-ferent wired and wireless networks. The standard could include 802.3 (basicEthernet), 802.11, 802.16(e), and different cellular xG networks with other 802-based technologies, making the handoffs between them possible. The main focusis concentrated on vertical handoffs but horizontal ones are also possible. Thevertical handoff is a handoff between different networks while the horizontalhandoff occurs within a single network.

Usually there exist multiple different types of networks in the reach of a MS.The devices designed for multiple networks, like the latest mobile phones, thatoperate with GSM (GPRS, WCDMA, etc.) And WLAN, additionally even withBluetooth, could change the currently serving network automatically with the802.21. The situation so far has been that the user has to do a manual change ofconnection type. For ongoing video call, for example, it would be advantageousto choose the network with best performance or on the other hand, the greaterexpenses of the data transmission in a GSM-based network could be avoided ifa vacant 802.11 hotspot is available. Another critical issue with mobile devicesis the power consumption, hence switching to a technology requiring less powerwould result in a longer battery life. IEEE has defined the scope of the 802.21

15

Page 19: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

to be in the initiation and preparation of handoff rather than the executionof it. The initiation includes discovering and selecting the available networks(with compatible technology) in the reach of the MS. The handoff preparationhandles the layer 2 and IP connectivity. The actual transfer of the connection(handoff signaling, context transfer, and packet reception) is left outside thescope of 802.21. [27]

The scope of the IEEE 802.21 (Media Independent Handover) standard is todevelop a specification that provides link layer intelligence and other relatednetwork information to upper layers to optimize handovers between heteroge-neous media. This includes links specified by 3GPP, 3GPP2 and both wiredand wireless media in the IEEE 802 family of specifications.

The proposal can support handovers for both mobile and stationary users.For the mobile users handovers may occur due to a change in wireless link con-ditions. Alternatively, handovers may occur due to a gap in radio coverage asa result of terminal movement. For the stationary user handovers may becomeimminent when the environment around the user changes making one networkmore attractive than another. The user may choose an application which re-quires handover to a higher data rate channel, for example to download a largedata file. Handovers should maximize service continuity, such as making a net-work transition during the pause in a voice call so as to minimize any perceptibleinterruption in service.

The IEEE802.21 standard supports cooperative use of both mobile terminalsand network infrastructure. The mobile terminal is well-placed to detect avail-able networks, and the infrastructure is in a position to store overall networkinformation, such as neighborhood cell lists and the location of mobile devices.In general, both the terminals and the network point of attachments such asbase stations or access points can be multimode, i.e. supporting different radiostandards, and in some cases being capable of transmission on more than oneinterface simultaneously.

The network can have both micro cells (IEEE 802.11 or IEEE 802.15 cover-age) and macro cells (3GPP, 3GPP2 or IEEE 802.16) and these will in generalintersect. The handover process is typically based on measurements and triggerssupplied from link layers on the terminal. These measurements may include sig-nal quality measurements, synchronization time differences, transmission errorrates, etc. and are some of the metrics used in handover algorithms.

The IEEE 802.21 framework facilitates the network discovery and selectionprocess by exchanging network information that helps mobile devices determinewhich networks are in their current neighborhoods. This network informationcould include information about the link type, the link identifier, link avail-ability and link quality etc. of nearby network links. This process of networkdiscovery and selection allows a mobile to connect to the most appropriate net-work based on certain mobile policies. As the mobile moves between differentnetwork Points of Attachment (PoA), it is essential to maintain proper securityassociations between the communicating end-points. These security associationscan be obtained both via lower layer and higher layer mechanisms.

16

Page 20: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 3.3: 802.21 connecting various technologies

3.3.1 802.21 Specifications

Service Continuity: Handovers may occur either between two different ac-cess networks or between two different points of attachment of a single accessnetwork. In such cases Service continuity is defined as the continuation of theservice during and after the handover while minimizing aspects such as dataloss and break time during the handover without requiring any user interven-tion. The change of access network may or may not be noticeable to the enduser, but there should be no need for the user to re-establish the service. Theremay be a change in service quality as a consequence of the transition betweendifferent networks due to the varying capabilities and characteristics of the ac-cess networks. For example if the QoS supported by new access network isunacceptable, higher layer entities may decide not to handover or may termi-nate the current session after the handover based on applicable policies. Thisspecification specifies essential elements which enable service continuity.

Network Selection: Network selection is the continuous process of selectingthe most appropriate network for any user operation at any given time. Theselection can be based on various criteria such as required QoS, cost, user pref-erences, policies, etc. If the selected network is not the currently used network,then a handover to the preferred network may be required. The 802.21 standardmay specify the means for such information to be made available to the upperlayers to enable effective network selection.

Security: Events, commands and information messages carried between aMT (Mobile Terminal) and a network PoA (Point of Attachment) cannot besecured until the MT is securely associated with the network PoA. This associa-tion can be achieved either via lower or higher layers security mechanisms. Oncesuch a secure association has been established between the MT and the network

17

Page 21: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 3.4: 802.21 Service Framework

PoA, any messages exchanged between two MIH Function entities should re-tain integrity and be replay protected over a secure transport. Otherwise theexchanged MIH messages are prone to integrity, replay and man-in-the-middleattacks. The 802.21 standard may specify the means for security informationto be made available to the upper layers to setup secure connections.

Power Management: This specification provides for information that helpsto preserve battery life. For example efficient ’sleep modes’ can be managedbased on real time link status, efficient scanning is achieved using neighbormaps of different networks and readily available reports of optimum link layerparameters.

Handovers due to Mobile Terminal Movement: Handovers due to the mobilestation speeds relative to the base station or access point are facilitated byproviding real time link conditions and timely information about overlay micro-cells and macro-cells.

3.3.2 MIH Reference Model

In general handovers can be initiated either by the mobile terminal or by thenetwork. Events that can initiate handover may originate from MAC, PHY orMIH Function either at the mobile node or at the network point of attachment.This could be due to user or terminal mobility, state change in the environmentor because of some management function on part of the network. Thus thesource of these events can be either local or remote. A transport protocol isneeded for supporting remote events. Security is another important considera-tion in such transport protocols.

18

Page 22: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 3.5: MIH Reference Model using IEEE 802.21

Multiple higher layer entities may be interested in these events at the sametime. Thus these events may need to have multiple destinations. Higher layerentities can register to receive event notifications from a particular event source.The MIH Function can help in dispatching these events to multiple destinations.These events are treated as discrete events. As such there is no general eventstate machine. However in certain cases a particular event may have stateinformation associated with it, such as the Link Going Down event discussedin this chapter. In such cases the event may be assigned an identifier andother related events may be associated with the corresponding event using thisidentifier.

From the recipients perspective these events are mostly advisory in natureand not mandatory. Layer 3 and above entities may also need to deal withreliability and robustness issues associated with these events. Higher layer pro-tocols and other entities may prefer to take a more defensive approach whenevents originate remotely as opposed to when they originate locally.

The Event Service may be broadly divided into two categories, Link Eventsand MIH Events. Both Link and MIH Events typically traverse from a lowerto higher layer. Link Events are defined as events that originate from eventsource entities below the MIH Function and typically terminate at the MIHFunction. Entities generating Link Events include but is not restricted to vari-ous IEEE802-defined, 3GPP-defined and 3GPP2-defined interfaces. Within theMIH Function, Link Events may be further propagated, with or without ad-ditional processing, to upper layer entities that have registered for the specificevent. Events that are propagated by the MIH to the upper layers are definedas MIH Events.

19

Page 23: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 3.6: WiFi and WiMax Synergies

3.4 Mobility between WiFi and WiMax

As shown in the comparison, the integration of WiMax and WiFi can provideseamless coverage with high data rate at low cost. The 802.21 is the beststandard available so far which can clearly provide an efficient mechanism forhandover between WiFi and WiMax networks.

3.5 Summary

In the Chapter we provide a brief introduction about WiMax, WiFi andMedia Independent Handover (MIH) along with the comparison of WiMax andWiFi networks. At first we introduced the fundamental properties of PHY andMAC layers in Mobile WiMax. The S-OFDMA was described as the basis forMobile WiMax PHY with the capability to adjust the channel bandwidth bychanging the FFT size. Then we described 802.21 protocols and its referencearchitecture.

The Mobile WiMax frame structure was also explained with overview to someother PHY layer features. The MAC layer description included the addressingand connection properties of MAC, the PDU structure and construction, intro-duction to service flows with certain QoS class, the MAC scheduling service, andthe security methods used with Mobile WiMax. The MAC layer contained alsothe presented supports for advanced antenna systems and fractional frequencyreuse. As a new feature to WiMax, the MBS was also introduced.

The performance figures are usually used to compare a certain technologywith other similar ones. The section describing performance issues gave somesight to the scales of data rates or MS-BS distances. Finally, some competitors

20

Page 24: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

of Mobile WiMax were shortly introduced, though especially the WLAN can beconsidered more as a companion in a common device.

In addition, the features supporting mobility would have been in right con-text in this chapter. However, in order to emphasize their meaning in MobileWiMax, they have been dedicated a chapter of their own, which is discussednext. 802.21 is an IEEE emerging standard. The standard supports algorithmsenabling seamless handover between networks of the same type as well as han-dover between different network types also called Media independent handover(MIH) or vertical handover. The standard provides information to allow hand-ing over to and from cellular, GSM, GPRS, WiFi, Bluetooth, 802.11 and 802.16networks through different handover mechanisms.

Since the MIH is not a data transport technology it cannot be comparedwith Mobile WiMax. If it is successfully standardized, it becomes a signifi-cant companion for Mobile WiMax products equipped with other transmissiontechnologies as well. WiMax extends the benefits of WiFi networks to deliverthe next-generation mobile Internet. Integrating WiMax and WiFi promisesconvenient and affordable broadband connectivity that brings new deploymentmodels for service providers, as well as new usage models for subscribers. Theability to be connected to the Internet and to have access to real-time infor-mation in more places is of high value to business professionals and consumersalike, whereas the advantages of coupling WiMax and WiFi together enableservice providers to:

• Provide bundled fixed, portable, and mobile broadband Internet servicesbased on WiMax and WiFi

• Provide a common user experience in either access network

• Leverage both licensed and license-exempt frequency bands

• Optimize the network by routing traffic based on the subscribers need formobility, QoS, and bandwidth

• Offer appealing and compelling devices with both WiMax and WiFi capa-bilities and take advantage of device cost savings enabled by the synergiesbetween the two technologies

21

Page 25: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Chapter 4

Simulation Architecturesand Network Scenarios andResults

4.1 Simulation Model

In this section, we describe the simulation model using NS-2 version 2.28 Keymodifications to NS-2. To support our simulations, different modifications andimprovements to NS-2 have been necessary. The modifications include:

• Media Independent Handover agent implementing 802.21 events and com-mands

• LINK GOING DOWN EVENT TRIGGER

• LINK ROLLBACK EVENT TRIGGER

• LINK DOWN EVENT TRIGGER

4.1.1 LINK GOING DOWN EVENT TRIGGER

A link Going Down is generated when the power level between two consecutivepackets at the receiver is decreasing. Let Pn (in Watt) be the power level of thenth packet received, and PTh be the power level threshold required for receivingpackets without errors, a Link Going Down is triggered, if the following twoconditions hold true:

Pn < αPth (4.1)

Pn < Pn−1 (4.2)

where α is a tuning parameter. Note that PTh depends on the noise levelof the operating environment and vendor fact sheets describing the receiverperformance (for example, BER as a function of Eb/No). In the following, αwill be called power level threshold coefficient.

22

Page 26: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

4.1.2 LINK ROLLBACK EVENT TRIGGER

A Link Rollback is tightly coupled with a Link Going Down event. If a packetwith higher power level is received immediately following a Link Going Downevent, then the MAC layer generates a Link Rollback event to cancel the lastlink Going Down event generated. Thus, a Link Rollback event is generated ifthe following three conditions hold true:

Pn−2 > Pn−1 (4.3)

Pn−1 > αPth (4.4)

Pn > Pn−1 (4.5)

4.1.3 LINK DOWN EVENT TRIGGER

A Link Down event is generated when the MAC of the MN is disconnectedfrom the AP. This occurs for any of the following cases:

• N consecutive packets have arrived with errors. By default N is set to 5.

• An Association Response message is received indicating that the MN isrejected from its current AP (i.e., status code field is different from 0 orunsuccessful).

• The BSSID has expired. The BSSID is advertised only in the Beaconmessage. By default, the BSSID expires if the MN does not receive a Bea-con message during an interval greater than 3 times the Beacon interval,which is by default 3 x 100ms.

• The MN MAC is requested to connect to one AP. This decision can beeither local or remote and leads to the generation of a link Down eventfor the current AP.

4.2 Handoff Mechanisms

A special requirement for a mobile device is the ability to change the servingBS if there exists another BS with, for example, better link quality in the reachof the MS. The handoff, in some sources referred as handover, is a procedurewith an intention to switch the network connection access point of the MSwithout data loss or disturbing the existing connection(s).

First, for a handoff to be even possible, one needs to have at least two BSs,the currently serving and the handoff target(s), and an MS within reach ofboth BSs. The handoff usually is understood as a change of serving BS, butit does not necessarily mean that the BS must be changed. In some cases thehandoff can occur also within the same BS, though within different channels.This handoff type is called intra-cell handoff, while the other option is calledinter-cell handoff. Handoffs between different technologies are also possible, asalready mentioned while discussing the MIH standard. The horizontal handoffwas defined to be a handoff within a single technology network, while the verticalhandoff changes the network.

23

Page 27: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

The reasons for handoff can be various and here are listed only some of them:

• Signal strength is not enough for maintaining proper connection at theedge of the cell

• BS capacity is full and more traffic is pending

• Disturbing co-channel interference from neighboring cell

• Behavior of MS changes, for example in a case of fast-moving MS suddenlystopping, a large cell size can be adjusted to a smaller one with bettercapacity

• Faster or cheaper network is available (if vertical handoffs are supported)

The handoff has roughly two major types, a hard and a soft handoff, withdifferent variants of these depending on the used technology. The hard handoffis performed, when the connection o the serving BS is broken before creatingthe new connection with the target BS. With soft handoff the connection istransferred to the new BS and after successfully continuing communicationsthe old BS can be released. The hard handoff can be very efficient regardingthe channel usage, since only one channel is occupied simultaneously. Thismakes the equipment also cheaper because it does not have to support twoor more channels in parallel. However, it can cause unrecoverable damage tothe connection in case the handoff fails. The benefit of soft handoff is thereliability since the connection is broken only after finding a working connection.The drawback of soft handoffs is the required computational capacity in theequipment, which consumes money and power. Additionally, the use of severalchannels per user decreases the overall capacity of the BS.

Usually, the handoff process follows a common pattern. The BS maintainsa list of neighbors that can be used in a case a served MS needing to performhandoff. The connection quality is constantly monitored and at some point thedecision for a handoff is made. The criteria for the decision may be for exam-ple something listed in handoff reasons above. Before performing handoff anappropriate candidate must be chosen and then the handoff procedure is con-tinued based on the current application and technology. The exact proceduresvary depending on used technology and usually within the technology severalalternatives are available as well.

In WiMAX scenarios the technology has to be 802.16e-2005 since the 802.16-2004 does not support handoffs at all. Additionally, there must be way to mea-sure connection quality, since the transmission medium is constantly in change.To be able to perform handoffs, the technology must define a scheme for deci-sion making to initiate them. A procedure for discovering competing BSs is alsoneeded. The handoff should also be as fast as possible, at least fast enough tokeep current IP connections alive. Data traffic is not so sensitive to larger delaysbut real-time voice or video (or both simultaneously) requires a swift change ofthe serving BS.

24

Page 28: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

The goal for simulations was to test the properties of Mobile WiMAX inpractice, or at least, less theoretically. To keep the simulations simple enough,a very basic scheme was planned. At the time of designing the simulations onlythe Network Simulator [38] (version 2.29 with additional WiMAX and Mobilitypackets from a NIST project [37]), later in text NS-2, was the only simulatoravailable with support for Mobile WiMAX. However, the additional packetsdid not have full functionality of the 802.16e-2005 standard and the simulationmeasurements with result interpretation had to be performed accordingly.

4.3 Network Scenarios

The all-in-one package of the NS-2 did not include support for Mobile WiMAXand therefore additional components were required. Two modules, the WiMAXand the Mobility module, from NIST were installed to achieve simulations ofmobile scenarios. Support for high speed mobility was also incorporated for theexisting WiFi module.

4.3.1 WiMax-WiMax Handover

The scenario consisted of three BSs evenly aligned on a line in a way thatthe coverage areas of two neighboring BSs had some overlap. Certain constantvalues (for example the cell size, the transmit power of BSs, the route of MS)were selected for the simulation and the handoff times were tried to make fasterby adjusting the properties of the WiMAX module in the NS-2. Finally, thetests were also run with speeds 5-40 m/s (18-144 km/h) with 5 m/s steps. Theassumed traffic was constant bit rate with data rate of 6 Mbit/s.

4.3.2 WiFi-WiMax Handover

The scenario consisted of two BSs evenly aligned on a line in a way that thecoverage areas of two neighboring BSs had some overlap. The mobile node useda IEEE 802.21 multi-interface component to enable handover between WiFiand WiMax networks. Certain constant values (for example the cell size, thetransmit power of BSs, the route of MS) were selected for the simulation andthe handoff times were tried to make faster by adjusting the properties of theWiMAX module in the NS-2. Finally, the tests were also run with speeds 5-40m/s (18-144 km/h) with 5 m/s steps. The assumed traffic was constant bit ratewith data rate of 6 Mbit/s.

4.4 Simulation Results

Figures 4.1 and 4.2 show the achievable throughtput and incurred delay for aWiMax node. Figure 4.3 presents the achievable data rates for different modu-lation schemes for a given WiMax node.

For proper handover, we must fix the threshold number of packets or thethreshold power at an optimum value. A high threshold for the number ofpackets will increase the packet loss before handover and a low threshold forthe number of packets will cause unnecessary handovers. Similarly if the power

25

Page 29: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.1: Variation of Throughput vs. time - WiMax

Figure 4.2: Variation of Delay vs. time - WiMax

26

Page 30: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.3: Variation of Achievable Data Rate for different modulation schemes

threshold is low this will lead to a temporary drop in connection before handoveroccurs. If the power threshold is high unnecessary handovers may occur. Hencewe plot the receive threshold Vs the number of packets. We can see that theplot varies as the mobility of the node varies.

When the adjustment of parameters was completed, a measure of averagepacket loss and averge handover distances for varying power level thresholdsand node speeds were measured. These are the combined values of all BSs. Theinfluence of velocity of the MS was also investigated. In the previous sectionthe speed of the MS was set to constant 5 m/s (18 km/h). In these simulationsthe simulation parameters were untouched and only the speed of the MS waschanged.

The simulations were done with MS speeds between 5 and 40 m/s with 5 m/sstep. The 40 m/s equals to 144 km/h, which is well above the mentioned 100km/h ”limit” for a seamless handoff. For the slowest speeds the overall lengthof the simulation time had to be increased in order to allow two handoffs. Ad-ditionally, higher speeds 50, 60, 75, and 100 m/s were also simulated. Althoughthese are not within the standard, the intention was to try the sensibility of thesimulation.

The data was sent with constant bit rate so that the packet size was 1500bytes and a packet was sent with 10 ms interval. These result in the data rateof 1.5 Mbit/s, the selected rate is already nearly sufficient to provide a MPEG-1video stream.

The BSs are aligned on a straight line so that they have 750 meters betweeneach other and their coverage areas have a radius of 500m. At the start of thesimulation the distance between the MS and the BS0 is 250 meters. The MS

27

Page 31: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.4: Variation of Average handover distance for different power thresh-olds with varying mobility - link going down iface on

Figure 4.5: Variation of Average handover distance for different power thresh-olds with varying mobility - link going down iface off

28

Page 32: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.6: Variation of Average Packet Loss for different power thresholds withvarying mobility - link going down iface on

Figure 4.7: Variation of Average Packet Loss for different power thresholds withvarying mobility - link going down iface off

29

Page 33: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.8: Variation of Average handover distance for different power thresh-olds with varying mobility - BS-A - link going down iface on

Figure 4.9: Variation of Average handover distance for different power thresh-olds with varying mobility - BS-B - link going down iface on

30

Page 34: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.10: Variation of Average handover distance for different power thresh-olds with varying mobility - L3 handover for BS-A - link going down iface on

Figure 4.11: Variation of Average handover distance for different power thresh-olds with varying mobility - L3 handover for BS-B - link going down iface on

31

Page 35: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

begins moving while keeping the shortest distance to the BS in mentioned 250meters. This value was selected in random and, naturally, it could be anythingelse too. However, the MS has to be in the reach of the BS coverage. Thereasonable maximum distance is the crossing point of the edges of the cells,approximately 270 meters from the center line.

The Neighbor Discovery (ND) module was designed to provide movement de-tection for layer 3. Its task is to create IP addresses when a network is changed.The module is a part of the MIH packet (described in the next subsection)and is intended to support multiple interface types, such as Ethernet, WLAN,UMTS, and, in this case, Mobile WiMAX. The ND agent uses broadcast orunicast messages according the technology in use.

The ND agent is located in all nodes, but the configuration in NS-2 has to bedone according the type of the node in the network. For example, Ethernet orUMTS networks do not have a capability to send broadcast messages in NS-2whereas WLAN has. The ND agent can be configured to send unicast messagesaccording a pre-configured list of targets.

The functionality of the ND agent depends on the role of the node in thenetwork, in other words, whether the node is a router or a host. The routerfunctionality consists of sending unsolicited Router Advertisements (RA) peri-odically to the hosts. The possible sending period is defined with parametersminRtrAdvInterval and maxRtrAdvInterval. In case a router

The hosts can ask for an RA with RS messages. When an RA is receivedthe included prefix information is compared to the existing tables and possiblynew values are added. Additionally, an expiration timer is attached to an RAmessage, which tells when to abandon the prefix information in case a new oneis not received.

As can be observed from the figures 4.4 through 4.7, the use of link going down iface onleads to reduction in the average packet loss for the WiFi - WiMax handoverscenarios.

We also examine the effect of node speed on packet drop rates for two sce-narios, first, handover between multiple WiMax base stations and secondly anintersystem handover scenario between WiFi and WiMax base stations. Figure4.8 and 4.9 show the variation of packet drop rate for different speeds for theabove two networks. It can be noted that the packet drop rate increases withincrease in speed for both the networks, with drop rate of WiMax handovermore compared to the intersystem handover which uses IEEE802.21 MIH.

4.5 Conclusions

The chapter discussed the simulation results for the designed scenarios forhandovers between Multiple WiMax base stations which were placed equally ina row and the MS moving through the coverage areas of all of them. The used

32

Page 36: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Figure 4.12: Variation in packets dropped for varying node speeds - WiMax-WiMax

Figure 4.13: Variation in packets dropped for varying node speeds - WiFi-WiMax

33

Page 37: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

software was NS-2 with two add-on modules from NIST. The average hand-off distance and average packet losses was measured during the handoffs withvarying power thresholds and node speeds in order to provide an understand-ing of the intersystem handover process between IEEE 802.11 and IEEE 802.16networks. The simulations for packet drop rates were additionally run with dif-ferent packet sizes and velocities between 5-40 m/s. This section also presenteda simulation of IEEE 802.21 triggers that are necessary for Medium IndependentHandover and the creation of Multi-interface nodes required for the intersystemhandover process.

34

Page 38: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Bibliography

[1] The WiMax Forum Internet home page , http://www.wimaxforum.org/(November 11, 2007)

[2] IEEE 802.16e-2005, IEEE Standard for Local and metropolitan area networks- Part16: Air Interface for Fixed and Mobile Broadband Wireless Access Sys-tems, Amendment 2: Physical and Medium Access Control Layers for Com-bined Fixed and Mobile Operation in Licensed Bands and Corrigendum 1http://standards.ieee.org/getieee802/download/802.16e-2005.pdf, February28, 2006

[3] IEEE 802.16-2004 IEEE Standard for Local and metropolitan area networks- Part 16: Air Interface for Fixed and Mobile Broadband Wireless AccessSystems - Amendment 2: Physical and Medium Access Control Layers forCombined Fixed and Mobile Operation in Licensed Bands and Corrigendum1 http://standards.ieee.org/getieee802/download/802.16e-2005.pdf (Febru-ary 28, 2006)

[4] IEEE 802.16-2004 IEEE Standard for Local and metropolitan area net-works - Part 16: Air Interface for Broadband Wireless Access Sys-tems http://standards.ieee.org/getieee802/download/802.16-2004.pdf (Oc-tober 1, 2004)

[5] WiMax Forum, Mobile WiMax Part I, ATechnical Overview and Performance Evaluationhttp://www.wimaxforum.org/news/downloads/Mobile WiMAX Part1Overview and Performance.pdf (August, 2006)

[6] J.H. Stott The how and why of COFDMhttp://www.ebu.ch/en/technical/trev/trev 278-stott.pdf (January 22,1999)

[7] Mobile WiMax: Hype and Realities Qualcommhttp://www.wimaxtrends.com/docs/reports/QUALCOMM%20WiMAX%20for%20Y ankee%20Group%20Ver%205.pdf (May 3, 2007)

[8] C. Taylor WiMax to steal 3G and DSL market sharehttp://www.enn.ie/article/9569371.html (December 9, 2004)

[9] J. Shandle All about OFDMA http://www.wirelessnetdesignline.com/howto/broadband/198000601 (March 13, 2007)

[10] http://www.motorola.com/mot/doc/6/6930 MotDoc.pdf

35

Page 39: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

[11] H. Yaghoobi Scalable OFDMA Physical Layer in IEEE 802.16 Wireless-MAN ftp://download.intel.com/technology/itj/2004/volume08issue03/art03scalableofdma/vol8 art03.pdf (August 20, 2004)

[12] K. Li IEEE 802.16e-2005 Air Interface Overviewhttp://santos.ee.ntu.edu.tw/mobile/Speech/IEEE%20802.16e%20OFDMA%20AirInterface%20Overview.pdf (June 05, 2006)

[13] B. Aboba, L. Blunk, J. Vollbrecht, J. Carlson, and H. Lev-kowetz Extensible Authentication Protocol (EAP), RFC3748http://www.ietf.org/rfc/rfc3748.txt (June, 2004)

[14] R. Housley, W. Polk, W. Ford, and D. Solo Internet X.509 Public KeyInfrastructure Certificate and Certificate Revocation List (CRL) Profile,RFC3280 http://www.ietf.org/rfc/rfc3280.txt (April, 2002)

[15] PKCS #1 v2.1: RSA Cryptography Standard RSA Laboratoriesftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf (June 14, 2002)

[16] Airspan, White Paper: Mobile WiMax Securityhttp://www.airspan.com/pdfs/WP Mobile WiMAX Security.pdf (2007)

[17] T. Shon and W. Choi An Analysis of Mo-bile WiMax Security: Vulnerabilities and Solutionshttp://www.springerlink.com/content/d03p14w7720x842l/fulltext.pdf(August 24, 2007)

[18] WiMax Forum, A Comparative Analysis of MobileWiMax Deployment Alternatives in the Access Networkhttp://www.wimaxforum.org/technology/downloads/mobile wimaxdeployment alternatives.pdf (May, 2007)

[19] WiMax Forum, Mobile WiMax Part II: A Comparative Analy-sis http://www.wimaxforum.org/news/downloads/Mobile WiMAX Part2Comparative Analysis.pdf (May, 2006)

[20] T. Smith Samsung ships first HSDPA phone you can buyhttp://www.reghardware.co.uk/2006/05/17/samsung ships first hspda phone/(May 17, 2006)

[21] 3G.co.uk First HSUPA Data Call with Nokia Flexi WCDMA Base Stationhttp://www.3g.co.uk/PR/December06/4071.htm (December 18, 2006)

[22] Nortel, HSDPA and beyond http://faculty.stut.edu.tw/ cwycwy/951/N9490006.pdf (December 2, 2006)

[23] 3GPP, UTRA-UTRAN Long Term Evolution (LTE)and 3GPP System Architecture Evolution (SAE)http://www.3gpp.org/Highlights/LTE/LTE.htm (October 4, 2006)

[24] X. Yu, G. Chen, M. Chen, and X. Gao Toward Beyond 3G: The FuTUREProject in China http://ieeexplore.ieee.org/iel5/35/30130/01381877.pdf(January, 2005)

36

Page 40: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

[25] Flash-OFDM, Internet home page http://www.qualcomm.com/technology/flash-ofdm/

[26] S. Mills (IEEE), Re: Status of 802.20http://grouper.ieee.org/groups/802/mbwa/email/pdf00015.pdf (June15, 2006)

[27] J. Thiel Metropolitan and Regional Wireless Networking: 802.16, 802.20and 802.22 http://www.cs.wustl.edu/ jain/cse574-06/ftp/wimax.pdf (May9, 2006)

[28] V. Gupta IEEE P802.21 Tutorial http://www.ieee802.org/21/Tutorials/802%2021-IEEE-Tutorial.ppt (July 17, 2006)

[29] C. Cordeiro, K. Challapali, D. Birru, and N. Sai Shankar IEEE802.22: The First Worldwide Wireless Standard based on Cognitive Radioshttp://www.ececs.uc.edu/ cordeicm/papers/dyspan05 802-22.pdf (Novem-ber 8, 2005)

[30] IEEE 802.11 Working Group, Internet home pagehttp://www.ieee802.org/11/

[31] IEEE 802.11u Task Group, Internet home pagehttp://grouper.ieee.org/groups/802/11/Reports/tgu update.htm

[32] S. Churchill Intelligent Transportation Gets 802.11phttp://www.dailywireless.org/2004/07/15 /intelligent-transportation-gets-80211p/ (July 15, 2004)

[33] WiMax Forum, WiMax Forum Network Architecture (Stage 2: Ar-chitecture Tenets, Reference Model and Reference Points) [Part1] http://www.wimaxforum.org/technology/documents/WiMAX End-to-End Network Systems Architecture Stage 2-3 Release 1.1.0.zip (July 11,2007)

[34] WiMax Forum, WiMax Forum Network Architecture (StageV Ar-chitecture Tenets, Reference Model and Reference Points) [Part2] http://www.wimaxforum.org/technology/documents/WiMAX End-to-End Network Systems Architecture Stage 2-3 Release 1.1.0.zip (July 11,2007)

[35] Z. Becvar, J. Zelenka, and R. Bestak Com-parison of handovers in UMTS and Wimaxhttp://fireworks.intranet.gr/fireworks docspublic/Fireworks 6CTUPB005a.pdf(September 26, 2006)

[36] Conniq.com, Handoff mechanism in Mobile WiMaxhttp://www.conniq.com/WiMAX/handoff.htm

[37] NIST Seamless and Secure Mobility -project, Internet home page,http://w3.antd.nist.gov/seamlessandsecure.shtml

[38] Kevin fall, Kannan Varadhan The ns Manual (formerly ns notes and doc-umentation) The VINT project, July 2003.

37

Page 41: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

38

Page 42: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

Appendix

Simulation Code

39

Page 43: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…_WiMax/wimax-random-single.tcl Page 1 of 4

# Scenario: Communication between MN and Sink Node with MN attached to BS.# Using higher modulation (16QAM for exemple), the number of packets sent and# received are the same (=100).## Topology scenario:### |-----| # | MN0 | ; 1.0.1 # |-----| ### (^)# |# |--------------|# | Base Station | ; 1.0.0# |--------------|# |# |# |-----------|# | Sink node | ; 0.0.0# |-----------|# #check input parameters - if {$argc != 0} {

puts ""puts "Wrong Number of Arguments! No arguments in this topology"puts ""exit (1)

} # set global variablesset nb_mn 8 ;# max number of mobile nodeset packet_size 1500 ;# packet size in bytes at CBR applications set output_dir /home/caterpillar/Documents/Courses/775pro/project-files/demo/random_mobility_single/#set gap_size 0.25 ;#compute gap size between packets#puts "gap size=$gap_size"set traffic_start 0set traffic_stop 510set simulation_stop 510.0 #define debug valuesMac/802_16 set debug_ 1Mac/802_16 set rtg_ 20 ;# number of PS to switch from receiving to transmittingMac/802_16 set ttg_ 20 ;# number of PS to switch from transmitting to receivingMac/802_16 set frame_duration_ 0.008Phy/WirelessPhy/OFDM set g_ 0.0625 ;# cyclic prefix #define coverage area for base station: 20m coverage Phy/WirelessPhy set Pt_ 0.025#Phy/WirelessPhy set freq_ 2412e+6#Phy/WirelessPhy set RXThresh_ 2.90781e-09Phy/WirelessPhy set RXThresh_ 2.025e-12 ;#500m radiusPhy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]] # Parameter for wireless nodesset opt(chan) Channel/WirelessChannel ;# channel typeset opt(prop) Propagation/TwoRayGround ;# radio-propagation modelset opt(netif) Phy/WirelessPhy/OFDM ;# network interface typeset opt(mac) Mac/802_16 ;# MAC type

Page 44: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…_WiMax/wimax-random-single.tcl Page 2 of 4

set opt(ifq) Queue/DropTail/PriQueue ;# interface queue typeset opt(ll) LL ;# link layer typeset opt(ant) Antenna/OmniAntenna ;# antenna modelset opt(ifqlen) 50 ;# max packet in ifqset opt(adhocRouting) NOAH ;# routing protocol set opt(x) 1100 ;# X dimension of the topographyset opt(y) 1100 ;# Y dimension of the topography Mac/802_11 set basicRate_ 11MbMac/802_11 set dataRate_ 11MbMac/802_11 set bandwidth_ 11Mb #Finish Procedureproc finish {} { global ns tf output_dir nb_mn nf $ns flush-trace close $tf

close $nfexit 0

} #create the simulatorset ns [new Simulator]$ns use-newtrace set nf [open $output_dir/out.nam w]$ns namtrace-all $nf #create the topographyset topo [new Topography]$topo load_flatgrid $opt(x) $opt(y)#puts "Topology created" #open file for traceset tf [open $output_dir/out.res w]$ns trace-all $tf#puts "Output file configured" # set up for hierarchical routing (needed for routing over a basestation)#puts "start hierarchical addressing"$ns node-config -addressType hierarchicalAddrParams set domain_num_ 2 ;# domain numberlappend cluster_num 1 1 ;# cluster number for each domain AddrParams set cluster_num_ $cluster_numlappend eilastlevel 1 [expr ($nb_mn+1)] ;# number of nodes for each cluster (1 for sink a…AddrParams set nodes_num_ $eilastlevelputs "Configuration of hierarchical addressing done" # Create Godcreate-god [expr ($nb_mn + 2)] ;# nb_mn + 2 (base station and sink node)#puts "God node created" #creates the sink node in first addressing space.set sinkNode [$ns node 0.0.0]#provide some co-ord (fixed) to base station node$sinkNode set X_ 50.0$sinkNode set Y_ 50.0$sinkNode set Z_ 0.0#puts "sink node created" #creates the Access Point (Base station)$ns node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \

Page 45: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…_WiMax/wimax-random-single.tcl Page 3 of 4

-ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel [new $opt(chan)] \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace ON puts "Configuration of base station"set bstation [$ns node 1.0.0] $bstation random-motion 0#puts "Base-Station node created"#provide some co-ord (fixed) to base station node$bstation set X_ 550.0$bstation set Y_ 550.0$bstation set Z_ 0.0 set clas [new SDUClassifier/Dest][$bstation set mac_(0)] add-classifier $clas#set the scheduler for the node. Must be changed to -shed [new $opt(sched)]set bs_sched [new WimaxScheduler/BS][$bstation set mac_(0)] set-scheduler $bs_sched[$bstation set mac_(0)] set-channel 0$bs_sched set-default-modulation OFDM_16QAM_1_2 # creation of the mobile nodes$ns node-config -wiredRouting OFF \ -macTrace ON ;# Mobile nodes cannot do routing. # creation of the mobile nodes$ns node-config -wiredRouting OFF \ -macTrace ON ;# Mobile nodes cannot do routing.for {set i 0} {$i < $nb_mn} {incr i} {

set wl_node_($i) [$ns node 1.0.[expr $i + 1]] ;# create the node with given @.$wl_node_($i) random-motion 1 ;# disable random motion$wl_node_($i) base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation$wl_node_($i) start;

#compute position of the node #$wl_node_($i) set X_ [expr 550.0] #$ns at 4.0 "$wl_node_($i) set X_ 80" #$ns at 6.0 "$wl_node_($i) set X_ 50"

#$wl_node_($i) set Y_ 550.0#$wl_node_($i) set Z_ 0.0

#$ns at 0 "$wl_node_($i) setdest 1090.0 1090.0 100.0" puts "wireless node $i created ..." ;# debug info set clas [new SDUClassifier/Dest] [$wl_node_($i) set mac_(0)] add-classifier $clas #set the scheduler for the node. Must be changed to -shed [new $opt(sched)] set ss_sched [new WimaxScheduler/SS] [$wl_node_($i) set mac_(0)] set-scheduler $ss_sched [$wl_node_($i) set mac_(0)] set-channel 0 #create source traffic

#Create a UDP agent and attach it to node n0set udp_($i) [new Agent/UDP]$udp_($i) set packetSize_ 1500

Page 46: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…_WiMax/wimax-random-single.tcl Page 4 of 4

$ns attach-agent $wl_node_($i) $udp_($i) # Create a CBR traffic source and attach it to udp0

set cbr_($i) [new Application/Traffic/CBR]$cbr_($i) set packetSize_ $packet_size

# $cbr_($i) set interval_ $gap_size$cbr_($i) attach-agent $udp_($i)

#create an sink into the sink node

# Create the Null agent to sink trafficset null_($i) [new Agent/Null] $ns attach-agent $sinkNode $null_($i)

# Attach the 2 agents

$ns connect $udp_($i) $null_($i)} # create the link between sink node and base station$ns duplex-link $sinkNode $bstation 100Mb 1ms DropTail # Traffic scenario: here the all start talking at the same timefor {set i 0} {$i < $nb_mn} {incr i} {

$ns at $traffic_start "$cbr_($i) start"$ns at $traffic_stop "$cbr_($i) stop"

} #$ns at 4 "$nd_(1) dump-table"#$ns at 5 "$nd_(1) send-rs"#$ns at 6 "$nd_(1) dump-table"#$ns at 8 "$nd_(1) dump-table" $ns at $simulation_stop "finish"#$ns at $simulation_stop "$ns halt"# Run the simulationputs "Running simulation for $nb_mn mobile nodes..."$ns runputs "Simulation done."

Page 47: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…iMax/wimax-random-multiple.tcl Page 1 of 4

# Test file for wimax# Scenario: Communication between MN and Sink Node with MN attached to BS. (Multiple MS nods - Random Mov…## Topology scenario:### |-----| # | MN0 | ; 1.0.1 to 1.0.9# |-----| ### (^)# |# |--------------|# | Base Station | ; 1.0.0# |--------------|# |# |# |-----------|# | Sink node | ; 0.0.0# |-----------|# #check input parameters - if {$argc != 0} {

puts ""puts "Wrong Number of Arguments! No arguments in this topology"puts ""exit (1)

} # set global variablesset nb_mn 8 ;# max number of mobile nodeset packet_size 1500 ;# packet size in bytes at CBR applications set output_dir /home/caterpillar/Documents/Courses/775pro/project-files/demo/random_mobility_single/#set gap_size 0.25 ;#compute gap size between packets#puts "gap size=$gap_size"set traffic_start 0set traffic_stop 510set simulation_stop 510.0 #define debug valuesMac/802_16 set debug_ 1Mac/802_16 set rtg_ 20 ;# number of PS to switch from receiving to transmittingMac/802_16 set ttg_ 20 ;# number of PS to switch from transmitting to receivingMac/802_16 set frame_duration_ 0.008Phy/WirelessPhy/OFDM set g_ 0.0625 ;# cyclic prefix #define coverage area for base station: 20m coverage Phy/WirelessPhy set Pt_ 0.025#Phy/WirelessPhy set freq_ 2412e+6#Phy/WirelessPhy set RXThresh_ 2.90781e-09Phy/WirelessPhy set RXThresh_ 2.025e-12 ;#500m radiusPhy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]] # Parameter for wireless nodesset opt(chan) Channel/WirelessChannel ;# channel typeset opt(prop) Propagation/TwoRayGround ;# radio-propagation modelset opt(netif) Phy/WirelessPhy/OFDM ;# network interface typeset opt(mac) Mac/802_16 ;# MAC typeset opt(ifq) Queue/DropTail/PriQueue ;# interface queue type

Page 48: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…iMax/wimax-random-multiple.tcl Page 2 of 4

set opt(ll) LL ;# link layer typeset opt(ant) Antenna/OmniAntenna ;# antenna modelset opt(ifqlen) 50 ;# max packet in ifqset opt(adhocRouting) NOAH ;# routing protocol set opt(x) 1100 ;# X dimension of the topographyset opt(y) 1100 ;# Y dimension of the topography Mac/802_11 set basicRate_ 11MbMac/802_11 set dataRate_ 11MbMac/802_11 set bandwidth_ 11Mb #Finish Procedureproc finish {} { global ns tf output_dir nb_mn nf $ns flush-trace close $tf

close $nfexit 0

} #create the simulatorset ns [new Simulator]$ns use-newtrace set nf [open $output_dir/out.nam w]$ns namtrace-all $nf #create the topographyset topo [new Topography]$topo load_flatgrid $opt(x) $opt(y)#puts "Topology created" #open file for traceset tf [open $output_dir/out.res w]$ns trace-all $tf#puts "Output file configured" # set up for hierarchical routing (needed for routing over a basestation)#puts "start hierarchical addressing"$ns node-config -addressType hierarchicalAddrParams set domain_num_ 2 ;# domain numberlappend cluster_num 1 1 ;# cluster number for each domain AddrParams set cluster_num_ $cluster_numlappend eilastlevel 1 [expr ($nb_mn+1)] ;# number of nodes for each cluster (1 for sink a…AddrParams set nodes_num_ $eilastlevelputs "Configuration of hierarchical addressing done" # Create Godcreate-god [expr ($nb_mn + 2)] ;# nb_mn + 2 (base station and sink node)#puts "God node created" #creates the sink node in first addressing space.set sinkNode [$ns node 0.0.0]#provide some co-ord (fixed) to base station node$sinkNode set X_ 50.0$sinkNode set Y_ 50.0$sinkNode set Z_ 0.0#puts "sink node created" #creates the Access Point (Base station)$ns node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \

Page 49: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…iMax/wimax-random-multiple.tcl Page 3 of 4

-antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel [new $opt(chan)] \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace ON puts "Configuration of base station"set bstation [$ns node 1.0.0] $bstation random-motion 0#puts "Base-Station node created"#provide some co-ord (fixed) to base station node$bstation set X_ 550.0$bstation set Y_ 550.0$bstation set Z_ 0.0 set clas [new SDUClassifier/Dest][$bstation set mac_(0)] add-classifier $clas#set the scheduler for the node. Must be changed to -shed [new $opt(sched)]set bs_sched [new WimaxScheduler/BS][$bstation set mac_(0)] set-scheduler $bs_sched[$bstation set mac_(0)] set-channel 0$bs_sched set-default-modulation OFDM_16QAM_1_2 # creation of the mobile nodes$ns node-config -wiredRouting OFF \ -macTrace ON ;# Mobile nodes cannot do routing. # creation of the mobile nodes$ns node-config -wiredRouting OFF \ -macTrace ON ;# Mobile nodes cannot do routing.for {set i 0} {$i < $nb_mn} {incr i} {

set wl_node_($i) [$ns node 1.0.[expr $i + 1]] ;# create the node with given @.$wl_node_($i) random-motion 1 ;# disable random motion$wl_node_($i) base-station [AddrParams addr2id [$bstation node-addr]] ;#attach mn to basestation$wl_node_($i) start;

#compute position of the node #$wl_node_($i) set X_ [expr 550.0] #$ns at 4.0 "$wl_node_($i) set X_ 80" #$ns at 6.0 "$wl_node_($i) set X_ 50"

#$wl_node_($i) set Y_ 550.0#$wl_node_($i) set Z_ 0.0

#$ns at 0 "$wl_node_($i) setdest 1090.0 1090.0 100.0" puts "wireless node $i created ..." ;# debug info set clas [new SDUClassifier/Dest] [$wl_node_($i) set mac_(0)] add-classifier $clas #set the scheduler for the node. Must be changed to -shed [new $opt(sched)] set ss_sched [new WimaxScheduler/SS] [$wl_node_($i) set mac_(0)] set-scheduler $ss_sched [$wl_node_($i) set mac_(0)] set-channel 0 #create source traffic

#Create a UDP agent and attach it to node n0set udp_($i) [new Agent/UDP]$udp_($i) set packetSize_ 1500$ns attach-agent $wl_node_($i) $udp_($i)

Page 50: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…iMax/wimax-random-multiple.tcl Page 4 of 4

# Create a CBR traffic source and attach it to udp0

set cbr_($i) [new Application/Traffic/CBR]$cbr_($i) set packetSize_ $packet_size

# $cbr_($i) set interval_ $gap_size$cbr_($i) attach-agent $udp_($i)

#create an sink into the sink node

# Create the Null agent to sink trafficset null_($i) [new Agent/Null] $ns attach-agent $sinkNode $null_($i)

# Attach the 2 agents

$ns connect $udp_($i) $null_($i)} # create the link between sink node and base station$ns duplex-link $sinkNode $bstation 100Mb 1ms DropTail # Traffic scenario: here the all start talking at the same timefor {set i 0} {$i < $nb_mn} {incr i} {

$ns at $traffic_start "$cbr_($i) start"$ns at $traffic_stop "$cbr_($i) stop"

} #$ns at 4 "$nd_(1) dump-table"#$ns at 5 "$nd_(1) send-rs"#$ns at 6 "$nd_(1) dump-table"#$ns at 8 "$nd_(1) dump-table" $ns at $simulation_stop "finish"#$ns at $simulation_stop "$ns halt"# Run the simulationputs "Running simulation for $nb_mn mobile nodes..."$ns runputs "Simulation done."

Page 51: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…demo/wifi-wimax/wifi_wimax.tcl Page 1 of 6

# Test for MutiFaceNodes.## Topology scenario:## bstation802.11(2.0.0)->)# /# /# router0(0.0.0)---router1(1.0.0)--- +------------------------------------+# \ + iface1:802.11(2.0.1)| |# \ +---------------------+ MutiFaceNode |# bstation802.16(3.0.0)->) + iface2:802.16(3.0.1)| (4.0.0) |# +------------------------------------+# # # # #check input parametersif {$argc != 3} {

puts ""puts "Wrong Number of Arguments! No arguments in this topology"puts "ns wifi_wimax.tcl seed gd_threshold shutdown"puts ""exit (1)

} global ns #set debug attributesAgent/ND set debug_ 1Agent/MIH set debug_ 1Agent/MIHUser/IFMNGMT/MIPV6 set debug_ 1Mac/802_16 set debug_ 1 Mac/802_11 set debug_ 1 Mac/802_16 set dcd_interval_ 5 ;#max 10sMac/802_16 set ucd_interval_ 5 ;#max 10sset default_modulation OFDM_16QAM_3_4 ;#OFDM_BPSK_1_2set contention_size 5 ;#for initial ranging and bw Mac/802_16 set t21_timeout_ 0.02 ;#max 10s, to replace the timer for looking at preamble Mac/802_16 set client_timeout_ 50 #random used in movement of MNset seed [lindex $argv 0]set move [new RandomVariable/Uniform]$move set min_ 2$move set max_ 12for {set j 0} {$j < $seed} {incr j} { set departure [$move value]} #defines function for flushing and closing filesproc finish {} { global ns f nf $ns flush-trace close $f close $nf puts " Simulation ended." exit 0} #$defaultRNG seed [lindex $argv 0]Mac/802_11 set pr_limit_ [lindex $argv 1] ;#1.0 for link down onlyAgent/MIHUser/IFMNGMT/MIPV6/Handover/Handover2 set shutdown_on_ack_ [lindex $argv 2] # set global variables

Page 52: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…demo/wifi-wimax/wifi_wimax.tcl Page 2 of 6

set output_dir .set traffic_start 0set traffic_stop 70set simulation_stop 70 #create the simulatorset ns [new Simulator]$ns use-newtrace set nf [open nam-out.nam w]#$ns namtrace-all-wireless $nf 2000 2000$ns namtrace-all $nf #open file for traceset f [open out.res w]$ns trace-all $f # set up for hierarchical routing (needed for routing over a basestation)$ns node-config -addressType hierarchicalAddrParams set domain_num_ 5 ;# domain numberAddrParams set cluster_num_ {1 1 1 1 1} ;# cluster number for each domain AddrParams set nodes_num_ {1 1 2 2 1} ;# number of nodes for each cluster # Node address for router0 and router1 are 4 and 5, respectively.set router0 [$ns node 0.0.0]puts "router0: tcl=$router0; id=[$router0 id]; addr=[$router0 node-addr]"set router1 [$ns node 1.0.0]puts "router1: tcl=$router1; id=[$router1 id]; addr=[$router1 node-addr]" # connect links $ns duplex-link $router1 $router0 100MBit 30ms DropTail 1000 # creation of the MutiFaceNodes. It MUST be done before the 802.11$ns node-config -multiIf ON ;#to create MultiFaceNode set multiFaceNode [$ns node 4.0.0] ;# node id is 6$ns node-config -multiIf OFF ;#reset attributeputs "multiFaceNode: tcl=$multiFaceNode; id=[$multiFaceNode id]; addr=[$multiFaceNode node-addr]" ## Now we add 802.11 nodes# # parameter for wireless nodesset opt(chan) Channel/WirelessChannel ;# channel type for 802.11set opt(prop) Propagation/TwoRayGround ;# radio-propagation model 802.11set opt(netif) Phy/WirelessPhy ;# network interface type 802.11set opt(mac) Mac/802_11 ;# MAC type 802.11set opt(ifq) Queue/DropTail/PriQueue ;# interface queue type 802.11set opt(ll) LL ;# link layer type 802.11set opt(ant) Antenna/OmniAntenna ;# antenna model 802.11set opt(ifqlen) 50 ;# max packet in ifq 802.11set opt(adhocRouting) NOAH ;# routing protocol 802.11set opt(umtsRouting) "" ;# routing for UMTS (to reset node config) set opt(x) 2000 ;# X dimension of the topographyset opt(y) 2000 ;# Y dimension of the topography # configure rate for 802.11Mac/802_11 set basicRate_ 1MbMac/802_11 set dataRate_ 11MbMac/802_11 set bandwidth_ 11Mb #create the topographyset topo [new Topography]$topo load_flatgrid $opt(x) $opt(y)#puts "Topology created"set chan [new $opt(chan)]

Page 53: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…demo/wifi-wimax/wifi_wimax.tcl Page 3 of 6

# create Godcreate-god 11 ;# give the number of nodes #configure for 20m radius 2.4GhzPhy/WirelessPhy set Pt_ 0.025Phy/WirelessPhy set freq_ 2412e+6Phy/WirelessPhy set RXThresh_ 6.12277e-09Phy/WirelessPhy set CSThresh_ [expr 0.9*[Phy/WirelessPhy set RXThresh_]] # configure Access Points$ns node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -channel $chan \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace OFF \ -macTrace ON \ -movementTrace OFF # configure Base station 802.11set bstation802 [$ns node 2.0.0] ;$bstation802 set X_ 500.0$bstation802 set Y_ 1000.0$bstation802 set Z_ 0.0puts "bstation802: tcl=$bstation802; id=[$bstation802 id]; addr=[$bstation802 node-addr]"# we need to set the BSS for the base stationset bstationMac [$bstation802 getMac 0]set AP_ADDR_0 [$bstationMac id]puts "bss_id for bstation 1=$AP_ADDR_0"$bstationMac bss_id $AP_ADDR_0$bstationMac enable-beacon # creation of the wireless interface 802.11$ns node-config -wiredRouting OFF \ -macTrace ON set iface1 [$ns node 2.0.1] ;# node id is 8.$iface1 random-motion 0 ;# disable random motion$iface1 base-station [AddrParams addr2id [$bstation802 node-addr]] ;#attach mn to basestation$iface1 set X_ 470.0$iface1 set Y_ 1000.0$iface1 set Z_ 0.0# define node movement. We start from outside the coverage, cross it and leave.$ns at $departure "$iface1 setdest 540.0 1000.0 20.0"puts "iface1: tcl=$iface1; id=[$iface1 id]; addr=[$iface1 node-addr]" # add link to backbone$ns duplex-link $bstation802 $router1 100MBit 15ms DropTail 1000 # add Wimax nodesset opt(netif) Phy/WirelessPhy/OFDM ;# network interface type 802.16set opt(mac) Mac/802_16 ;# MAC type 802.16 # radius = Phy/WirelessPhy set Pt_ 0.025#Phy/WirelessPhy set RXThresh_ 7.91016e-15 ;#500m:2.025e-12Phy/WirelessPhy set RXThresh_ 1.26562e-13 ;#1000m radiusPhy/WirelessPhy set CSThresh_ [expr 0.8*[Phy/WirelessPhy set RXThresh_]] # configure Access Points

Page 54: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…demo/wifi-wimax/wifi_wimax.tcl Page 4 of 6

$ns node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -channel $chan \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF # configure Base station 802.16set bstation802_16 [$ns node 3.0.0] ;$bstation802_16 set X_ 1000$bstation802_16 set Y_ 1000$bstation802_16 set Z_ 0.0puts "bstation802_16: tcl=$bstation802_16; id=[$bstation802_16 id]; addr=[$bstation802_16 node-addr]"set clas [new SDUClassifier/Dest][$bstation802_16 set mac_(0)] add-classifier $clas#set the scheduler for the node. Must be changed to -shed [new $opt(sched)]set bs_sched [new WimaxScheduler/BS]$bs_sched set-default-modulation $default_modulation[$bstation802_16 set mac_(0)] set-scheduler $bs_sched[$bstation802_16 set mac_(0)] set-channel 1 # creation of the wireless interface 802.11$ns node-config -wiredRouting OFF \ -macTrace ON set iface2 [$ns node 3.0.1] ;# node id is 8.$iface2 random-motion 0 ;# disable random motion$iface2 base-station [AddrParams addr2id [$bstation802_16 node-addr]] ;#attach mn to basestation$iface2 set X_ 470.0$iface2 set Y_ 1000.0$iface2 set Z_ 0.0set clas [new SDUClassifier/Dest][$iface2 set mac_(0)] add-classifier $clas#set the scheduler for the node. Must be changed to -shed [new $opt(sched)]set ss_sched [new WimaxScheduler/SS][$iface2 set mac_(0)] set-scheduler $ss_sched[$iface2 set mac_(0)] set-channel 0# define node movement. We start from outside the coverage, cross it and leave.$ns at $departure "$iface2 setdest 540.0 1000.0 20.0"puts "iface2: tcl=$iface2; id=[$iface2 id]; addr=[$iface2 node-addr]" # add link to backbone$ns duplex-link $bstation802_16 $router1 100MBit 15ms DropTail 1000 # add interfaces to MultiFaceNode$multiFaceNode add-interface-node $iface1$multiFaceNode add-interface-node $iface2 # install ND modules # now WLANset nd_bs [$bstation802 install-nd]$nd_bs set-router TRUE$nd_bs router-lifetime 1800 set nd_mn [$iface1 install-nd] # now WIMAX

Page 55: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…demo/wifi-wimax/wifi_wimax.tcl Page 5 of 6

set nd_bs2 [$bstation802_16 install-nd]$nd_bs2 set-router TRUE$nd_bs2 router-lifetime 20 ;#just enough to expire while we are connected to wlan. set nd_mn2 [$iface2 install-nd] # install interface manager into multi-interface node and CNAgent/MIHUser/IFMNGMT/MIPV6/Handover/Handover2 set debug_ 1set handover [new Agent/MIHUser/IFMNGMT/MIPV6/Handover/Handover2]$multiFaceNode install-ifmanager $handover$nd_mn set-ifmanager $handover$handover nd_mac $nd_mn [$iface1 set mac_(0)] ;#to know how to send RS$nd_mn2 set-ifmanager $handover$handover nd_mac $nd_mn2 [$iface2 set mac_(0)] ;#to know how to send RS set ifmgmt_cn [$router0 install-default-ifmanager] # install MIH in multi-interface nodeset mih [$multiFaceNode install-mih] $handover connect-mih $mih ;#create connection between MIH and iface management # install MIH on AP/BSset mih_bs [$bstation802 install-mih]set tmp_bs [$bstation802 set mac_(0)]$tmp_bs mih $mih_bs$mih_bs add-mac $tmp_bs set mih_bs [$bstation802_16 install-mih]set tmp_bs [$bstation802_16 set mac_(0)]$tmp_bs mih $mih_bs$mih_bs add-mac $tmp_bs # Now we can register the MIH module with all the MACsset tmp2 [$iface1 set mac_(0)] ;#in 802.11 one interface is created$tmp2 mih $mih$mih add-mac $tmp2 ;#inform the MIH about the local MACset tmp2 [$iface2 set mac_(0)] ;#in 802.16 one interface is created$tmp2 mih $mih$mih add-mac $tmp2 ;#inform the MIH about the local MAC # set the starting time for Router Advertisements$ns at 2 "$nd_bs start-ra"$ns at 2 "$nd_bs2 start-ra" #traffic##configure trafficset i 0set udpvideo_($i) [new Agent/UDP]$udpvideo_($i) set packetSize_ 1240 #create video trafficset cbrvideo_($i) [new Application/Traffic/CBR]$cbrvideo_($i) set packetSize_ 4960$cbrvideo_($i) set interval_ 0.1$cbrvideo_($i) attach-agent $udpvideo_($i)set nullvideo_($i) [new Agent/Null] #sinkNode is transmitter $ns attach-agent $router0 $udpvideo_($i)$ns attach-agent $multiFaceNode $nullvideo_($i) $handover add-flow $nullvideo_($i) $udpvideo_($i) $iface2 1 $ns at $traffic_start "$cbrvideo_($i) start"

Page 56: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…demo/wifi-wimax/wifi_wimax.tcl Page 6 of 6

$ns at $traffic_stop "$cbrvideo_($i) stop"$ns at $simulation_stop "finish" puts " Simulation is running ... please wait ..."$ns run

Page 57: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 1 of 7

# CN 0.0.0# |# R1 1.0.0# /|\# / | \# / | \# R2 R3 R4## 2.0.0 3.0.0 4.0.0## MN1--------------># 2.0.1##read arguments set seed 5555Mac/802_16 set scan_iteration_ 2set use_going_down 1set output_dir /home/caterpillar/Documents/Courses/775pro/project-files/demo/wimax-wimaxif {$use_going_down == 1} { Mac/802_16 set lgd_factor_ 1.1} else { Mac/802_16 set lgd_factor_ 1.0} Mac/802_16 set scan_duration_ 4Mac/802_16 set interleaving_interval_ 6Mac/802_16 set dcd_interval_ 5 ;#max 10sMac/802_16 set ucd_interval_ 1 ;#max 10sMac/802_16 set t21_timeout_ 0.02 ;#max 10s, to replace the timer for looking at preambleMac/802_16 set client_timeout_ 0.007Mac/802_16 set lost_ulmap_interval_ 0.76 set default_modulation OFDM_16QAM_3_4 ;#OFDM_BPSK_1_2set contention_size 5 ;#for initial ranging and bw #define frequency of RA at base stationAgent/ND set minRtrAdvInterval_ 0Agent/ND set maxRtrAdvInterval_ 10Agent/ND set router_lifetime_ 250Agent/ND set minDelayBetweenRA_ 0.03Agent/ND set maxRADelay_ 0.005 #define debug valuesAgent/ND set debug_ 1Agent/ND set send-RS 1Agent/MIH set debug_ 1Mac/802_16 set debug_ 0Agent/MIHUser/IFMNGMT/MIPV6 set debug_ 1Agent/MIHUser/IFMNGMT/MIPV6/Handover/Handover1 set debug_ 1 # HandoverAgent/MIHUser/IFMNGMT/MIPV6/Handover/Handover1 set case_ 3 #define coverage area for base station:#default frequency 3.5e+9 hzPhy/WirelessPhy set Pt_ 0.025#Phy/WirelessPhy set RXThresh_ 1.215e-09 ;#500m coveragePhy/WirelessPhy set RXThresh_ 2.025e-12 ;#500m radiusPhy/WirelessPhy set CSThresh_ [expr 0.9 *[Phy/WirelessPhy set RXThresh_]] # Parameter for wireless nodesset opt(chan) Channel/WirelessChannel ;# channel typeset opt(prop) Propagation/TwoRayGround ;# radio-propagation modelset opt(netif) Phy/WirelessPhy/OFDM ;# network interface typeset opt(mac) Mac/802_16 ;# MAC type

Page 58: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 2 of 7

set opt(ifq) Queue/DropTail/PriQueue ;# interface queue typeset opt(ll) LL ;# link layer typeset opt(ant) Antenna/OmniAntenna ;# antenna modelset opt(ifqlen) 50 ;# max packet in ifqset opt(adhocRouting) NOAH ;# routing protocolset opt(nbMN) 1 ;# number of Mobile Nodesset opt(nbBS) 3 ;# number of base stationsset opt(x) 3000 ;# X dimension of the topographyset opt(y) 3000 ;# Y dimension of the topographyset opt(mnSender) 1 #Rate at which the nodes start movingset moveStart 0.0set moveStop 520.0 #Speed of the mobile nodes (m/sec)set moveSpeed 20 #destination of the MNset X_dst 2600.0set Y_dst 1000 #defines function for flushing and closing filesproc finish {} { global ns tf f0 f1 f2 nf namtrace $ns flush-trace close $f0 close $f1 close $f2# close $tf close $namtrace# exec xgraph out0.tr -geometry 800x400 &# exec xgraph out1.tr -geometry 800x400 &# exec xgraph out2.tr -geometry 800x400 & exit 0} #create the simulatorset ns [new Simulator]$ns use-newtrace #create the topographyset topo [new Topography]$topo load_flatgrid $opt(x) $opt(y) #open file for traceset tf [open $output_dir/out.res w]set namtrace [open $output_dir/out.nam w]$ns trace-all $tf$ns namtrace-all-wireless $namtrace $opt(x) $opt(y) #**********set f0 [open $output_dir/out0.tr w] ;#for the 1st BSset f1 [open $output_dir/out1.tr w] ;#for the 2nd BSset f2 [open $output_dir/out2.tr w] ;#for the 3rd BS#********** # set up for hierarchical routing (needed for routing over a basestation)$ns node-config -addressType hierarchicalAddrParams set domain_num_ 9 ;# domain numberAddrParams set cluster_num_ {1 1 1 1 1 1 1 1 1} ;# cluster number for each domainlappend tmp 1 ;# router CNlappend tmp 1 ;# router 1lappend tmp 3 ;# 802.16 MNs+BS

Page 59: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 3 of 7

lappend tmp 3 ;# 802.16 MNs+BSlappend tmp 3 ;# 802.16 MNs+BSlappend tmp 1 ;# MultifaceNodelappend tmp 1 ;# MultifaceNodelappend tmp 1 ;# MultifaceNodelappend tmp 1 ;# MultifaceNodeAddrParams set nodes_num_ $tmp # Node address for router0 and router1 are 4 and 5, respectively.set CN [$ns node 0.0.0]$CN install-default-ifmanagerset router1 [$ns node 1.0.0] # connect links$ns duplex-link $router1 $CN 100MBit 30ms DropTail 1000 # Create Godcreate-god [expr ($opt(nbMN) + $opt(nbBS))] ; # Create multi-interface node$ns node-config -multiIf ONfor {set i 0} {$i < $opt(nbBS)} {incr i} { set multiFaceNode($i) [$ns node [expr 5+$i].0.0]}set multiFaceNode_wl [$ns node [expr 5+$opt(nbBS)].0.0]$ns node-config -multiIf OFF #creates the Access Point (Base station)$ns node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel [new $opt(chan)] \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace ON \ -routerTrace OFF \ -macTrace ON \ -movementTrace ON # configure each Base station 802.16for {set i 0} {$i < $opt(nbBS) } {incr i} { Mac/802_16 set debug_ 1 set bstation($i) [$ns node [expr 2+$i].0.0] $bstation($i) random-motion 0# if {$i == 1} {# $bstation($i) set X_ 1091.515# $bstation($i) set Y_ 600#}#if {$i == 2} {# $bstation($i) set X_ 1250# $bstation($i) set Y_ 1200#}#if {$i == 0} {# $bstation($i) set X_ 1250# $bstation($i) set Y_ 800#} $bstation($i) set X_ [expr 500 + $i*950] $bstation($i) set Y_ 1000.0 $bstation($i) set Z_ 0.0 set clas($i) [new SDUClassifier/Dest]

Page 60: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 4 of 7

[$bstation($i) set mac_(0)] add-classifier $clas($i) #set the scheduler for the node. Must be changed to -shed [new $opt(sched)] set bs_sched($i) [new WimaxScheduler/BS] $bs_sched($i) set-default-modulation $default_modulation $bs_sched($i) set-contention-size 5 [$bstation($i) set mac_(0)] set-scheduler $bs_sched($i) [$bstation($i) set mac_(0)] set-channel [expr $i*1] #add MOB_SCN handler set wimaxctrl($i) [new Agent/WimaxCtrl] $wimaxctrl($i) set-mac [$bstation($i) set mac_(0)] $ns attach-agent $bstation($i) $wimaxctrl($i) puts "Bstation: tcl=$bstation($i); id=[$bstation($i) id]; addr=[$bstation($i) node-addr]X=[expr 500.0 + $i*950.0] Y=1000.0"}$wimaxctrl(0) add-neighbor [$bstation(1) set mac_(0)] $bstation(1)$wimaxctrl(1) add-neighbor [$bstation(2) set mac_(0)] $bstation(2)$wimaxctrl(1) add-neighbor [$bstation(0) set mac_(0)] $bstation(0)$wimaxctrl(2) add-neighbor [$bstation(1) set mac_(0)] $bstation(1) # creation of the mobile nodes$ns node-config -wiredRouting OFF \ -macTrace ON ;# Mobile nodes cannot d…for {set i 0} {$i < $opt(nbBS)} {incr i} { #create 1 node in each cell to init cells Mac/802_16 set debug_ 1 set m_node_($i) [$ns node [expr 2+$i].0.1] $m_node_($i) random-motion 0 ;# disable random motion $m_node_($i) base-station [AddrParams addr2id [$bstation($i) node-addr]] ;#attach mn to basestation# if {$i == 1} {# $m_node_($i) set X_ 1091.515# $m_node_($i) set Y_ 600# }# if {$i == 2} {# $m_node_($i) set X_ 1250# $m_node_($i) set Y_ 1200# }# if {$i == 0} {# $m_node_($i) set X_ 1250# $m_node_($i) set Y_ 800# } $m_node_($i) set X_ [expr 500.0 + $i*950.0] $m_node_($i) set Y_ 1000.0 $m_node_($i) set Z_ 0.0 set clas_mn($i) [new SDUClassifier/Dest] [$m_node_($i) set mac_(0)] add-classifier $clas_mn($i) #set the scheduler for the node. Must be changed to -shed [new $opt(sched)] set ss_sched($i) [new WimaxScheduler/SS] [$m_node_($i) set mac_(0)] set-scheduler $ss_sched($i) [$m_node_($i) set mac_(0)] set-channel [expr $i*2] #add the interfaces to supernode $multiFaceNode($i) add-interface-node $m_node_($i) puts "InitNode: tcl=$m_node_($i); id=[$m_node_($i) id]; addr=[$m_node_($i) node-addr]X=[expr 500.0 + $i*950.0] Y=1000.0"}

Page 61: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 5 of 7

#configure the MOBILE NODEMac/802_16 set debug_ 1set wl_node [$ns node 2.0.2] ;# create the node with g…$wl_node random-motion 0 ;# disable random motion$wl_node base-station [AddrParams addr2id [$bstation(0) node-addr]] ;# attach mn to basestati…$wl_node set X_ 500.0$wl_node set Y_ 1000.0$wl_node set Z_ 0.0set clas_wl [new SDUClassifier/Dest][$wl_node set mac_(0)] add-classifier $clas_wl #set the scheduler for the node. Must be changed to -shed [new $opt(sched)]set ss_sched_wl [new WimaxScheduler/SS][$wl_node set mac_(0)] set-scheduler $ss_sched_wl[$wl_node set mac_(0)] set-channel 1$multiFaceNode_wl add-interface-node $wl_nodeputs "Mobile Node: tcl=$wl_node; id=[$wl_node id]; addr=[$wl_node node-addr] X=500.0 Y=1000.0" # add link to backbonefor {set i 0} {$i < $opt(nbBS) } {incr i} { # add link to backbone $ns duplex-link $bstation($i) $router1 100MBit 15ms DropTail 1000} # configure each Base station 802.16for {set i 0} {$i < $opt(nbBS) } {incr i} { set nd_bs($i) [$bstation($i) install-nd] $nd_bs($i) set-router TRUE $nd_bs($i) router-lifetime 250 $ns at 1 "$nd_bs($i) start-ra" set mih_bs($i) [$bstation($i) install-mih] set tmp2($i) [$bstation($i) set mac_(0)] ;#in 802.16 one interface is created $tmp2($i) mih $mih_bs($i) $mih_bs($i) add-mac $tmp2($i)} # configure each MN 802.16for {set i 0} {$i < $opt(nbBS)} {incr i} { set nd_mn($i) [$m_node_($i) install-nd] set handover($i) [new Agent/MIHUser/IFMNGMT/MIPV6/Handover/Handover1] $nd_mn($i) set-ifmanager $handover($i) $multiFaceNode($i) install-ifmanager $handover($i) # install MIH in multi-interface node set mih($i) [$multiFaceNode($i) install-mih] set nd_mn($i) [$m_node_($i) install-nd] $handover($i) connect-mih $mih($i) set tmp3($i) [$m_node_($i) set mac_(0)] $handover($i) nd_mac $nd_mn($i) $tmp3($i) $tmp3($i) mih $mih($i) $mih($i) add-mac $tmp3($i)}set nd_mn_wl [$wl_node install-nd]set handover_wl [new Agent/MIHUser/IFMNGMT/MIPV6/Handover/Handover1]$multiFaceNode_wl install-ifmanager $handover_wl$nd_mn_wl set-ifmanager $handover_wl #***********************proc record {} { global sink0 sink1 sink2 f0 f1 f2

Page 62: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 6 of 7

set ns [Simulator instance] #Set the time after which the procedure should be called again set time 0.9 #How many bytes have been received by the traffic sinks? set bw0 [$sink0 set npkts_] set bw1 [$sink1 set bytes_] set bw2 [$sink2 set bytes_] #Get the current time set now [$ns now] #Calculate the bandwidth (in Mbit/s) and write it to the files puts $f0 "$now [expr $bw0]" ;# /$time*8/1000000]" puts $f1 "$now [expr $bw1]" ;# /$time*8/1000000]" puts $f2 "$now [expr $bw2]" ;# /$time*8/1000000]" #Reset the bytes_ values on the traffic sinks $sink0 set bytes_ 0 $sink1 set bytes_ 0 $sink2 set bytes_ 0 #Re-schedule the procedure# $ns at [expr $now+$time] "record"}#***************************$ns at 0.0 "record" # install MIH in multi-interface nodeset mih_wl [$multiFaceNode_wl install-mih]$handover_wl connect-mih $mih_wlset tmp_wl [$wl_node set mac_(0)]$handover_wl nd_mac $nd_mn_wl $tmp_wl$tmp_wl mih $mih_wl$mih_wl add-mac $tmp_wl #Create a UDP agent and attach it to node n0set udp_ [new Agent/UDP]$udp_ set packetSize_ 1500set quiet 0if {$quiet == 0} { puts "udp on node : $udp_"} # Create a CBR traffic source and attach it to udp0set cbr_ [new Application/Traffic/CBR]$cbr_ set packetSize_ 1500$cbr_ set interval_ 0.01$cbr_ attach-agent $udp_# Create the Null agent to sink traffic set null_ [new Agent/Null]if { $opt(mnSender) == 1} { #CN is receiver $ns attach-agent $CN $null_ #Multiface node is transmitter $multiFaceNode_wl attach-agent $udp_ $wl_node $handover_wl add-flow $udp_ $null_ $wl_node 1 2000.} else { #Multiface node is receiver $multiFaceNode_wl attach-agent $null_ $wl_node $handover_wl add-flow $null_ $udp_ $wl_node 1 2000. #CN is transmitter $ns attach-agent $CN $udp_} #******************#Create three traffic sinks and attach them to the nodesset sink0 [new Agent/LossMonitor]

Page 63: Simulation and Analysis of Intersystem Handover in Mobile ... · Simulation and Analysis of Intersystem Handover in Mobile WiMax Networks Deepak Nadig Anantha, Manu Vyasa Rao & Rakshak

File: /home/caterpillar/Documents/C…mo/wimax-wimax/wimax-wimax.tcl Page 7 of 7

set sink1 [new Agent/LossMonitor]set sink2 [new Agent/LossMonitor]$ns attach-agent $bstation(0) $sink0$ns attach-agent $bstation(1) $sink1$ns attach-agent $bstation(2) $sink2$ns connect $sink0 $udp_$ns connect $sink1 $udp_$ns connect $sink2 $udp_#****************** #Start the recording of the received bandwidth#$ns at 0.0 "record" #####################################################################log movement#proc log-movement {} { # global logtimer ns ns wl_node# set ns $ns# source /home/caterpillar/Documents/Courses/775pro/ns-allinone-2.29/ns-2.29/tcl/mobility/timer.tcl# Class LogTimer -superclass Timer# LogTimer instproc timeout {} {# global opt node_;# for {set i 0} {$i < $opt(nbMN)} {incr i} { #$m_node_($i) log-movement# $wl_node($i) log-movement# }# $wl_node log-movement# $self sched 0.1# }# set logtimer [new LogTimer]# $logtimer sched 0.1#} #$ns at 0.0 "log-movement"################################################################################### trace ends #Start the application 1sec before the MN is entering the WiMAX cell$ns at [expr $moveStart - 1] "$cbr_ start" #Stop the application according to another poisson distribution (note that we don't leave the 802.16 cell)$ns at [expr $moveStop + 1] "$cbr_ stop" #calculate the speed of the node$ns at $moveStart "$wl_node setdest $X_dst $Y_dst $moveSpeed"$wl_node start for {set i 0} {$i < $opt(nbMN)} {incr i} {$m_node_($i) start}####################################################$ns at $moveStop "finish"puts "Running simulation for $opt(nbMN) mobile nodes..."$ns runputs "Simulation done."