[Microsoft Word format].doc

2,703 views
2,622 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,703
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
33
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

[Microsoft Word format].doc

  1. 1. Final Year Dissertation – Seamless Roaming Between Wireless Networks University of Portsmouth Computing & Mathematics Area Final Year Dissertation undertaken in fulfilment of the requirements for the BSc (Honours) Degree in Computer Science Seamless Roaming Between Wireless Networks By James Saunders (106228) Supervisor Dr Mo Adda Project Unit PC.PJE40 May 2004 With Support from Intel Corporation (UK) and Orange (PCS) Ltd Page 1
  2. 2. Final Year Dissertation – Seamless Roaming Between Wireless Networks Abstract This project is concerned with the research and development of a solution which would help mobile nodes to roam between different types of wireless network seamlessly. The two wireless network protocols that are of interest in this project are 802.11b (WiFi), a wireless local area network which is increasingly being used in homes and offices, and GPRS, a wireless wide area network which works as a data extension to the GSM mobile phone network. The project commences by researching current wireless network technologies and solutions. Subsequently the problem is discussed in further detail and a new software based solution, which would decrease network swapping errors, is proposed and documented. The new solution, NetSwap, is implemented in network simulation software and tested against results from previous tests with encouraging results. Page 2
  3. 3. Final Year Dissertation – Seamless Roaming Between Wireless Networks Acknowledgements Thank you… Dr. Mo Adda, from Portsmouth University for supervising the project and advice on networking knowledge. Claire Hayward, my wonderful girlfriend, for her amazing love, encouragement and understanding as I stressed through parts of this project. Mark Sage, from Orange (PCS) Ltd, for his support in providing GPRS for the duration of the project. The whole of the ADC team from Intel, for their support during my work placement and for supplying me with Wireless networking hardware. "Because you have so little faith. I tell you the truth, if you have faith as small as a mustard seed, you can say to this mountain, 'Move from here to there' and it will move. Nothing will be impossible for you." --Matthew 17:20 Page 3
  4. 4. Final Year Dissertation – Seamless Roaming Between Wireless Networks Project Specification Aims and Objectives The aim of this project is to produce a solution which would reduce the packet loss and errors incurred while roaming between different types of wireless network; this in turn is hoped to increase the speed at which a mobile node switches when roaming between them. In order to solve the problem, in depth research must be done as to exactly why it occurs and a study made of the current technology and solutions. To measure the success of this project, comparisons will need to be made in order to measure the performance of the proposed solution against a scenario recreating the problem as described previously, as well as comparisons to existing solutions. The end result should be a software based solution which could eventually be developed to run on any type of mobile node communicating with one or more types of wireless network. It should also take into consideration the possibility of newer wireless network technologies which are likely to be developed in the future. Constraints Resources • Hardware issues and limitations may restrict the progress of this project. • Software constraints may include a lack of functionality in prerequisite software such as drivers and simulation tools, problems with word processing and image software used in the creation of the project report, and programming language compiler problems. Time • The project must be completed in time for the hand in deadline of the 4th May 2004. • Because of the author’s commitments to other university units, the time allocated to this project will require careful planning. • A presentation of the project may need to be given to Intel Corporation and Orange (PCS) Ltd, but no deadline has been given for this to date. Knowledge • Networking Knowledge. At the start of this project the author’s knowledge on certain networking subjects may not be sufficient. It may become evident during the research stage that the author’s ideas are not viable. • The author may require further training and education concerning some aspects of programming, particularly those concerning networking and object orientation. Page 4
  5. 5. Final Year Dissertation – Seamless Roaming Between Wireless Networks Project Planning Time Management Major activities to be undertaken in the course of the project: Literature Survey - Perform background research and gain a knowledge network of protocols, packet headers and infrastructure. Produce UML Diagrams - Produce class diagrams, sequence diagrams to help in the design process of the project. Create Pseudo Code - Produce pseudo code to back up UML diagrams for both driver and gateway. Produce Before Results - Test to gain a set of results for how long network swapping takes before the new design is implemented. These results can be used to compare to the new implementation and hopefully advantages of the new design. Produce Driver and Gateway - In simulation or physical hardware. Produce After Results - Create a set of results for the new design, testing ping times, packet loss and speed of roaming transition. Write-up - Results, conclusion, evaluation, future ideas, improvements, problems. Meetings with Supervisor - Regular meetings should be made over the period of this project with the project supervisor Dr. Mo Adda. These meeting will be used to discuss project progress, exchange ideas, perform tests and discuss report layout. Page 5
  6. 6. Final Year Dissertation – Seamless Roaming Between Wireless Networks Project Planning Gantt Chart The following Gantt chart shows a graphical representation of the duration of the tasks to be undergone during this project against the progression of time. Oct Nov Dec Jan Feb Mar April May 1 Literature Survey 30 Days 01/10/03 30/10/03 2 Produce UML Diagrams 7 Days 30/10/03 06/11/03 3 Create Pseudo Code 7 Days 30/10/03 06/11/03 4 Produce Before Results 17 Days 06/11/03 23/11/03 5 Produce Driver 70 Days 23/11/03 30/01/04 6 Produce Gateway 70 Days 23/11/03 30/01/04 7 Produce Results 20 Days 30/01/04 19/02/04 8 Write-up 70 Days 19/02/04 17/04/04 9 Proof Read & Print Report 7 Days 18/04/04 01/05/04 10 Meetings With Supervisor Every 2 weeks 11 Hand In 1 Day 04/05/04 04/05/04 Page 6
  7. 7. Final Year Dissertation – Seamless Roaming Between Wireless Networks Contents Project Specification 4 Aims and Objectives 4 Constraints 4 Resources 4 Time 4 Knowledge 4 Project Planning 5 Time Management 5 Gantt chart 6 1. Introduction 9 1.1 Background 9 1.2 The Problem 10 2. Network Technology Research 11 2.1 Ethernet 11 2.1.1 Ethernet Background 11 2.1.2 Ethernet Frames 12 2.1.3 Ethernet Speeds 12 2.2 WiFi 802.11a/b 13 2.2.1 WiFi Background 13 2.2.2 WiFi Technology/Infrastructure 14 2.2.3 WiFi Frames 15 2.2.4 WiFi Speeds 15 2.3 GPRS (General Packet Radio Service) 16 2.3.1 GPRS Background 16 2.3.2 GPRS Technology/Infrastructure 18 2.3.3 GPRS Frames 19 2.3.4 GPRS Speeds 20 3. Current Solutions 21 3.1 Mobile IP 21 3.1.1 Mobile IP Detail 22 3.1.2 Problems with Mobile IP 23 3.2 Occasionally Connected Computing (OCC) 24 3.2.1 Problems with OOC 25 3.3 DSP Silicon Methods 26 3.3.1 System on Chip (SoC) 26 3.3.2 Software Defined Radio (SDR) 27 3.3.3 Problems with DSP Silicon Methods 27 4. Analysis and Design 28 4.1 Brief 28 4.1.1 The NetSwap Driver 29 4.1.2 The NetSwap Gateway 30 4.2 Class Diagrams 31 4.3 Sequence Diagrams 32 4.3.1 Simple Scenario 32 4.3.2 If things go wrong 33 4.4 Pseudo Code 34 5. Implementation 40 5.1 Physical Hardware Simulation 41 5.2 Physical Hardware Implementation 42 5.2.1 Software Used 42 5.2.2 Equipment Setup - Architecture 43 5.2.3 Simulating the effect of “Roaming” 44 Page 7
  8. 8. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.2.4 Application Configuration 45 5.2.5 Recording Findings 45 5.3 Software Simulation of the NetSwap Idea 46 5.3.1 OPNET 47 5.3.2 QualNet 48 5.3.3 OMNeT++ 49 5.3.4 NS-2 50 5.4 NS-2 Implementation 51 5.4.1 Getting to know NS-2 51 5.4.2 Configuration 51 5.4.3 First NS-2 Tcl Script 52 5.4.4 Recreating problem in NS-2 54 5.4.5 Creating the NetSwap Agents 56 5.5 Problems and Restrictions of NS-2 62 5.5.1 Timer 62 5.5.2 Addressing Scheme 62 5.5.4 GPRS Patch 63 6. Testing and Evaluation 64 6.1 Physical Testing 64 6.1.1 Task Manager Network Monitor 65 6.1.2 CuteFTP 66 6.1.3 Streaming Audio using Microsoft Media Player 67 6.1.4 Ping 70 6.2 NS-2 Testing 71 6.2.1 FTP, before NetSwap implementation 72 6.2.2 FTP, after NetSwap implementation 73 6.3 Comparison of NS-2 & Physical Results 75 6.3.1 FTP Comparisons 75 6.3.2 Media Player Comparisons 75 6.3.3 Ping Comparisons 75 7. Conclusion and Future Work 76 7.1 Future Work 76 7.1.1 Real Hardware Implementation of NetSwap 76 7.1.2 Error Detection 76 7.1.3 Old IP address fallback 77 7.1.4 Changing of the return IP address 77 7.1.5 Multiple Users 77 8. Evaluation against the requirements 78 Bibliography 79 Glossary of Terms 81 Glossary of Symbols 82 Appendix A - Packet Headers 83 IP Header 83 TCP Header 84 ICMP Header 86 Ethernet Header & Trailer 87 802.11 Wireless Header & Trailer 88 RLC Downlink Header 89 Appendix B – NetSwap Classes 91 Appendix C - OSI Layers 92 Appendix D – Results 93 Appendix E – Main NS-2 NetSwap Code 94 Appendix F – NS-2 NetSwap Tcl Script 100 Page 8
  9. 9. Final Year Dissertation – Seamless Roaming Between Wireless Networks 1. Introduction 1.1 Background The modern generation of subscribers do not want to be tied to a desk, study or office. Technologies such as mobile phones, PDA’s and laptop computers have become an everyday tool in people’s lives enabling them to become more mobile. Mobile technology has advanced in recent years allowing people to communicate and access information via a number of methods. Internet, SMS and Chat/Messaging Services such as Microsoft Messenger, E-mail and VoIP, are some recently born methods of communication. Technology trends such as these redefine the way in which people live, and create the need to connect mobile devices without wires; from this comes the birth of Wireless Networking. There are a number of different types of wireless network protocols in existence today: • WiFi (Wireless Fidelity) or 802.11, a WLAN (Wireless Local Area Network) with a short range which works alongside Ethernet networks. To date, there are 3 varieties of WiFi (802.11a, 802.11b and 802.11g). • GPRS (General Packet Radio Service), a WWAN (Wireless Wide Area Network) which works as a data extension to the GSM mobile phone network, sometimes referred to as ‘GSM 2.5’. • UMTS or 3G, the third generation mobile phone network service developed by ETSI within the ITU standard named IMT-2000 (International Mobile Telecommunications-2000). • WiMAX, a Wireless Metropolitan standard for last-mile wireless technologies designed to provide broadband connectivity to homes. It is a joint effort from Intel and Alvarion, IEEE standard 802.16a. • Bluetooth, a PLAN (Personal Local Area Network), offers digital transmissions of both voice and data, used to replace many of the proprietary cables we use in the home and office to connect devices together such as PDA’s, Printers, Telephones, Keyboards etc. • HiperLAN/2, a specification developed by ETSI BRAN, which relies on cellular networking topology combined with an ad-hoc networking capability to provide a LAN service for office architecture or wider area networks. As these protocols are all fairly new technologies developed by a variety of organisations for different purposes, not all of them are compatible and can therefore cause problems when roaming between them. The two wireless network protocols which fall within the scope of this project are WiFi and GPRS. Page 9
  10. 10. Final Year Dissertation – Seamless Roaming Between Wireless Networks 1.2 The Problem Both the GPRS and WiFi wireless network types provide a degree of mobility. However, roaming between them is difficult. Take the following scenario: An office worker, who begins working on his laptop in an office connected to a corporate WiFi network, may also wish to work while travelling home at the end of the day. On leaving the office, he also leaves the coverage range of the corporate WiFi network; he is still covered within range of a GPRS network. The worker may have to wait a considerable time while the computer detects the loss of one network connection (WiFi) and re-route all traffic to the new connection (GPRS). Due to the time delay, any network applications may timeout, throwing connection errors. The same problem may also occur when the worker reaches home and wants to change to his home WiFi network. Fig 1.2a - Mobile Roaming Between WiFi and GPRS Networks note: Throughout this project report the term ‘mobile node’ may be interchangeable with ‘laptop’, ‘mobile phone’ or ‘PDA’, and the term ‘WiFi’ may be interchangeable with ‘802.11a, b or g’. The main problem, when roaming between different wireless network types, is that a mobile node must first detect the loss of a wireless connection and therefore its route to a destination. The mobile node then needs to find another available wireless connection, reset its routing tables and change protocol types, before it can then communicate across the new link. During this process the correspondent node does not know when or where the mobile node has moved and therefore does not know where to send its replies. This process takes time and may result in huge packet loss, during which any real-time network applications, such as streaming video and audio, file transfers and games may be likely to timeout. Page 10
  11. 11. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2. Network Technology Research The next two chapters contain background research into some of the networking technologies and mobility solutions which are of relevance to this project. This information will then be used later to help as a foundation in the Analysis and Design, Chapter 4. 2.1 Ethernet 2.1.1 Ethernet Background Ethernet is a LAN (Local Area Network) technology invented by Robert Metcalfe and the combined efforts of Xerox, DEC and Intel in 1973. It was originally developed along with Xerox’s first ever laser printer as a means to connect many users to the same resource. Xerox needed a network fast enough to drive this high performance new printer, and to connect hundreds of computers within the same building. The experimental Ethernet was used to link the computers (called “Altos”), servers and laser printers used in the Xerox building to each other. The signal clock for the experimental Ethernet interface was derived from the Alto's system clock. In initial experiments Ethernet gave an initial data transmission rate of 2.94 Mbps. [FERRERO99] Metcalfe's first experimental network was called the Alto Aloha Network. He changed the name to "Ethernet," to make it clear that the system could support any computer, not just Altos, and also to point out that his new network mechanisms had evolved well beyond the Aloha system. He chose to base the name on the word "ether" as a way of describing an essential feature of the system; the physical medium (i.e. a cable) carries bits to all stations. “Ether”, or “Luminiferous Ether” was the hypothetical substance through which electromagnetic waves were thought to travel. This idea originated with the Greek philosopher Aristotle and was used in several optical theories as a way to explain propagation of light, which was believed to be impossible in “empty” space. Thus, the name Ethernet was born. [RAD04] One of the reasons for Ethernet’s success was due to its simple design; a header containing a simple address, the payload data and a trailer checksum. The secret behind this simplicity is the background mechanism. Ethernet uses CSMA/CD (Carrier Sense Multiple Access/Collision Detect), a system whereby each device senses whether the line is idle and therefore available to be used. If it is free, the device begins to transmit its first frame. If another device has tried to send at the same time, a “collision” is said to occur and the frames from both systems are discarded. Each device then waits a random amount of time and retries until transmission has been successful. [FERRERO99] Ethernet became an official standard in 1978 as the IEEE (Institute of Electrical and Electronic Engineers) released the standard 802.3. Today Ethernet is used across the world and is the most widely used LAN technology, but not without a degree of evolution. Ethernet has evolved from its original incarnation of 10Base-T (IEEE 802.3) in 1978 to Fast Ethernet (IEEE 802.3u) in 1995, 1-Gigabit Ethernet (802.3z) in 1998 and 10-Gigabit Ethernet (802.3ae) in 2002. Ethernet has also been transmitted across various different mediums, including Coaxial Cable, CAT 5 Cable and Fibre Optic Cable. It has also been used as a base for the wireless standard 802.11b. Page 11
  12. 12. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2.1.2 Ethernet Frames An Ethernet frame has a maximum size of 1518 Bytes and a minimum size of 64 bytes so as to avoid the possibility of a sending device not detecting a collision. For this reason, an Ethernet frame contains a "pad field" in its trailer, which will be filled with junk if the data section does not make the frame at least 64 bytes long (excluding preamble and start delimiter). The structure of an IEEE 802.3 Ethernet frame is shown below: Application Layer User Data Transport Layer TCP Hdr Network Layer IP Header Data Link Layer Eth Header Eth Trailer 64 – 1518 Bytes Fig 2.1.2a - Ethernet Frames For further information into the detail of the Headers see Appendix A source: [CISCO03b] The user data from the network application (e.g. Web Browser, e-mail client or file transfer system) is split into small segments. These are then appended with a TCP and IP header containing details of the source and destination of the data and the port number. This frame is then passed onto the OSI data link layer where an Ethernet Header and Trailer are added. The Ethernet Header contains lower level source and destination addresses in the form of a MAC (Media Address Code) address. A MAC address is a unique 12 digit number assigned to each Ethernet Network Interface Card (NIC). This address is created by the card manufacturer. Each digit is a number from 0-9 or a letter from A- F. Sometimes the digits of a MAC address are separated by colons or dashes. (e.g. 00-02-B3-91-F7-34 or 00:02:B3:91:F7:34) The Ethernet Trailer contains the Pad field and a CRC (Cyclic Redundancy Check) code which checks that the whole Ethernet frame is correct. 2.1.3 Ethernet Speeds • 10Mbps Ethernet (IEEE 802.3) • 100Mbps Fast Ethernet (IEEE 802.3u) • 1000Mbps Gigabit Ethernet (IEEE 802.z/ab) • 10000Mbps 10GbE (IEEE 802.3ae) Ethernet Page 12
  13. 13. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2.2 WiFi 802.11a/b 2.2.1 WiFi Background Around 1992, research began into the first Wireless LAN (WLAN) protocols operating in the unlicensed 2.4GHz frequency band. It was based on technology used by the military for mission-critical communication systems. Initially it was taken up by two business sectors – Healthcare and Education. Healthcare made the use of mobile computers which could be used in hospitals to gain access to patient information, while schools started installing wireless networks to avoid the high costs of wiring buildings. In 1997, the IEEE (Institute of Electrical and Electronic Engineers) released the 802.11 standard for wireless networking. Today several 802.11 standards exist. 802.11b is an expansion of the standard that allows transmission speeds of up to 11Mbps using FHSS (Frequency Hopping Spread Spectrum) and DSSS (Direct Sequence Spread Spectrum) in the 2.4Ghz radio frequency band. This radio band is free to use worldwide and has no licensing restrictions, thus it is widely used for other wireless devices like cordless phones, microwave ovens, garage doors and, more recently, Bluetooth - all of which can interfere with 802.11b. [ADDA03] The next generation 802.11a is a bit more complex than 802.11b, but has greater benefits. Also known as WiFi5 for its use of the 5GHz band, 802.11a is based on OFDM (Orthogonal Frequency Division Multiplexing) technology, rather than DSSS. It operates in the 5.2GHz radio frequency band that has much less interference from other devices, resulting in its super fast data speeds of up to 54 Mbps or even higher. [CISCO03c] 802.11g is the newest addition to the WiFi family and was officially registered as a final IEEE standard in June 2003. 802.11g supports speeds of up to 54Mbps but still works in the 2.4Ghz radio range. Recently, the idea of “Hotspots” has been created to satisfy the need for wider, faster wireless internet access. The service industry sectors such as Hotels, Service Stations, Airports and Train Stations were amongst the first to provide wireless access on a pay per hour, subscription, scratch card or free ‘service-add’ basis. Page 13
  14. 14. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2.2.2 WiFi Technology/Infrastructure A wireless network consists of two main components – an access point and a wireless adapter. WiFi wireless networking works easily with any Ethernet network and can be installed by attaching an access point to existing switches. WiFi wireless adapters can work in two modes: Infrastructure mode works by having one or more base stations called access points. An access point acts as a wireless base to which many mobile devices can connect. They are then ordinarily connected to a standard Ethernet network. Wireless mobile devices can not talk directly to each other and can only communicate through an access point. Fig 2.2.2a – Infrastructure Wireless Mode Ad-Hoc mode allows Wireless Mobile Nodes to talk directly to each other without the need for an access point. Ad-Hoc mode is only ideal for two or three computers. Fig 2.2.2b – Ad-Hoc Wireless Mode source: [KHADRA04a] Page 14
  15. 15. Final Year Dissertation – Seamless Roaming Between Wireless Networks Frequency hopping works very much like its name implies. It takes the data signal and modulates it with a carrier signal that hops from frequency to frequency as a function of time over a wide band of frequencies. With frequency hopping spread spectrum, the carrier frequency changes periodically. This technique reduces interference because an interfering signal from a narrowband system will only affect the spread spectrum signal if both are transmitting at the same frequency simultaneously. Thus, the aggregate interference will be very low, resulting in little or no bit errors. A frequency hopping radio, for example, will hop the carrier frequency over the 2.4 GHz frequency band between 2.4 GHz and 2.483 GHz. 2.2.3 WiFi Frames The 802.11 family uses a MAC layer known as CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance). note: Classic Ethernet uses CSMA/ CD (Collision Detection). CSMA/CA is, like all Ethernet protocols, peer-to- peer and there is no requirement for a master base station such as an access point. Application Layer User Data Transport & Network Layer IP Header TCP Hdr Data Link Layer 802.11b Hdr 802.11b CRC Fig 2.2.3a – WiFi Frame Breakdown - For further information see Appendix A source: [ZYTRAX03] 2.2.4 WiFi Speeds • 54Mbps 5Ghz (IEEE 802.11a) • 11Mbps 2.4Ghz (IEEE 802.11b) • 54Mbps 2.4Ghz (IEEE 802.11g) Page 15
  16. 16. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2.3 GPRS (General Packet Radio Service) 2.3.1 GPRS Background The GPRS specification was written by the GSM association and is held by ETSI (European Telecommunications Standard Institute). GPRS provides a wider variety of services for mobile devices like mobile phones and PDA’s, such as the ability to maintain voice and data communication simultaneously. The data service can be used for a number of applications such as; • E-commerce – banking, ticket purchasing, fast food ordering • Location Based Applications – maps, place finder, train station booking, advertising, games • Office tasks – e-mail, calendar, converters [GSMWORLD03] GPRS is an ‘always on’ service and therefore saves time connecting and dialling into an ISP. However, it does not constantly transfer data and for this reason many mobile service providers choose to charge on a pay per megabyte basis. GPRS is a WWAN (Wireless Wide Area Network) which provides an IP based packet switching service over the GSM (Global System for Mobile communications) mobile phone circuit switched network, allowing for multiple users to share radio resources simultaneously. The underlying architecture of the GSM network is a circuit switched service which requires a dedicated path to be setup before communication can commence. The best analogy of a circuit switched network is the PSTN (Public Switched Telephone Network), which requires a set of switches to physically connect two telephones. Fig 2.3.1a – PSTN Showing Connection of GSM Mobile phone to POTS Phone source: [ADDA03] Although mobile phones operate using radio waves, the same principle exists in the GSM telephone system. Mobile phones require a dedicated circuit switched radio link to the cell base stations. As radio frequency space is limited, it is important to try and maximize the utilisation of the available radio resources. When making older MODEM connections to the internet through the GSM standard, a dedicated circuit switched phone call provides a fixed bandwidth and unique path from user to destination, but at a cost. Data is transmitted in intermittent bursts unlike a voice call. This is because the maximum bit rate is required throughout the duration of the call, which leaves resources under-utilised Page 16
  17. 17. Final Year Dissertation – Seamless Roaming Between Wireless Networks for a significant amount of time. GPRS works on top of the GSM standard using packet switching Technology. Data is split into small packets and routed along with packets from other users. The paths taken by successive packets may not be the same, and therefore additional header information is added to the data to enable the network to route it correctly to the destination where packets are reassembled into the correct sequence. Fig 2.3.1b - Packet Switching source: [ADDA03] Data packets are split into radio bursts using TDMA (Time Division Multiple Access). Radio resources are broken down further into fixed ‘timeslots’ and these slots are cycled across the number of users allowing for upload or download of data in turn. This efficient use of radio resources means that large numbers of GPRS users can potentially share the same bandwidth and be served from a single cell at the same time. GPRS therefore lets network operators maximize the use of their network resources in a dynamic and flexible way. The network operator can also change their network resources given to a GPRS device by setting the number of radio timeslots a device can use to upload or download data. A GSM channel contains eight timeslots; normally each timeslot is dedicated to one circuit switched mobile phone call. For GPRS the timeslots are assigned on an ad-hoc basis, and more than one timeslot can be assigned for a particular transmission depending on the network and/or the device. By using multiple timeslots, a user will experience data rates that would not be possible with a GSM circuit switched connection. The resulting baud rate is dependent on the number of slots utilized, the error-correction and the encryption overhead. [NOVATEL03] Page 17
  18. 18. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2.3.2 GPRS Technology/Infrastructure As the GPRS network works simultaneously along side the GSM voice network, it must be able to separate voice from data. Fig 2.3.2a below shows the end to end parts of the GPRS network. Fig 2.3.2a - GPRS Network Infrastructure source: [MOTOROLA02] GPRS data transmission is analogous to a jigsaw puzzle. Starting with the mobile device, Internet (TCP/IP) and Voice data is broken down into small pieces. When the data is ready to be sent, the network assigns timeslots on a channel for the transmission. These pieces are then sent over the air (on one of three frequency ranges - 900MHz and 1800MHz in Europe and 1900MHz in the US) to the cell BSC (Base Station Controller) and routed to one of two destinations; Data is routed to the SGSN (Servicing GPRS Support Node) which is responsible for two things, firstly going to the HLR AUC for authorization and subscriber information which is to be used for billing. Then routing data to the GGSN (Gateway GPRS Support Node) where the pieces are reassembled into TCP/IP data, and then passed to the Internet for transport to the destination. Audio is routed to the MSC (Mobile Switching Center) authorised with the HLR AUC and routed out through the GMSC (Gateway Mobile Switching Center) to the PSTN (Public Switched Telephone Network). Its final destination is the analog POTS (Plain Old Telephone System). Page 18
  19. 19. Final Year Dissertation – Seamless Roaming Between Wireless Networks 2.3.3 GPRS Frames In GPRS not only does the user data need to be split into TCP/IP packets to be routed across the internet, but each TCP/IP packet needs to be split further into smaller 114 bit chunks to be transmitted through radio timeslots to the cell and BSC. Application Layer User Data Transport & Network Layer IP Header TCP Header Next Pkt ~ 40 Bytes ~ 40 Bytes ~ 40 Bytes ~ 40 Bytes Transport & Network Layer RLC Header RLC Header Data Link Layer MAC Header CRC 114 bits 114 bits 114 bits 114 bits Physical Layer This section shows a GPRS Class of “1 up” Radio Burst 1 Radio Burst 2 Radio Burst 3 Radio Burst 4 i.e each TDMA section is uploading 4 radio blocks (1 in each TDMA sub-section). Radio Block 456 bits For a Class of “2 up” each TDMA sub-section would have 2 radio blocks. This is reversed for download or “1 down” TDMA Burst - Timeslots 52 Timeslot Multiframe Fig 2.3.3a – GPRS Frame Breakdown source: [MOTOROLA02] A ‘radio block’ is the term used to describe four consecutive TDMA bursts. Each TDMA burst contains one RLC (Radio Link Control) / MAC (Medium Access Control) block. This is then carried on a GPRS 52 timeslot multiframe. A 52 timeslot multiframe is a set of 52 TDMA bursts. One TDMA timeslot can carry up to 114 bits; therefore, each Radio block of four bursts can only carry up to 456 bits of data. The information carried in those bits is the user data and RLC coding headers. RLC headers provide error detection and error correction, and are essential for managing and Page 19
  20. 20. Final Year Dissertation – Seamless Roaming Between Wireless Networks reconstructing data transmitted across the radio interface. The coding scheme and the number of timeslots partially determine the theoretical data rate. For example, if eight timeslots and no error checking are used, a theoretical data rate of 171.2 kbps would result (21.4 kbps x 8 timeslots). However, due to issues such as interference and sharing of resources with other GPRS users, this speed would not be achievable under normal operating conditions. 2.3.4 GPRS Speeds As discussed above, GPRS works on radio timeslots. The resulting bandwidth depends on the mobile device and/or the network provider. Below are a few combinations of timeslots and data rates. • 12kbps Send, 24Kbps Receive Class 2 (One Up, Two Down) • 12Kbps Send, 40Kbps Receive Class 8 (One Up, Four Down) • 36Kbps Send, 24Kbps Receive Class 12 (Three Up, Two Down) • 171.2Kbps Receive Theoretical Maximum of GPRS (8 Time Slots with no error Checking) [GSMWORLD03] Page 20
  21. 21. Final Year Dissertation – Seamless Roaming Between Wireless Networks 3. Current Solutions 3.1 Mobile IP IP networks are based on stationary IP addresses in a similar way to which a letter is delivered to a geographically fixed address. Routing of data is the process of delivering packets to a unique IP address assigned by the network. The problem occurs when a mobile node roams away from one network and is no longer reachable using its original IP address. A simplified explanation of how Mobile IP works can be represented in the following scenario: Many students living at university tend to change their postal address as they change accommodation throughout their education. One particular student decides to get all his post sent to his parent’s permanent address. The parents, who are aware of the student’s current address, then forward the post onto him by writing "Please Redirect to...." with the current address at which he lives. No matter where the student moves he will still get his post as long as the parents are kept up to date with the current address. Page 21
  22. 22. Final Year Dissertation – Seamless Roaming Between Wireless Networks 3.1.1 Mobile IP Detail Mobile IP is based at the Network Layer (OSI Layer 3) and has three principal components: Mobile Node - A device such a Mobile Phone, PDA or Laptop Computer. The mobile node may roam between networks and change its point of contact to the internet (e.g. WiFi or GPRS) and still keep a constant IP address known as a Home Address. Home Agent - A router on a base network serving as a base address to which all traffic can be delivered. Its responsibilities include: - Keeping a list called a binding table of the Mobile Node's current location on the Internet, also called its care-of address. - If the mobile node is away, all are intercepted and tunnelled to the Mobile Node's current location. Foreign Agent - A router that can function as a point of attachment for the mobile node when it roams to a foreign network. Its responsibilities include: - Telling the Home Agent where the Mobile Node currently is. - Receiving all traffic forwarded from the Home agent and delivering it to the mobile node. - Functioning as a router for the mobile nodes that have registered with it. Fig 3.1a - Mobile IP Infrastructure source: [GIGAPORT02] The home agent keeps track of its Mobile Node’s locations (whether it is connected to its home or a foreign network) in a table called a ‘Mobility Binding Table’. When the mobile node is ‘at home’, it is connected to the same network as the home agent, and all network traffic is routed as normal. When a mobile node roams and is connected to a foreign network, it continues to converse with any previous correspondents (e.g. web servers). However, it maintains the source address of all packets, setting them to the address of the home network and not that of the foreign network in which the node now resides. Changing the source address of a packet does not affect the way it is routed. This is because it is not read by routers and therefore delivered as usual. Also, while the mobile node is visiting the foreign network the foreign agent of that network lets the home agent of the mobile node know where Page 22
  23. 23. Final Year Dissertation – Seamless Roaming Between Wireless Networks it currently resides and prompts the home agent to update its mobility binding table with a new ‘Care of Address’. This address is the IP address of the foreign agent. Mobile Node Care of Address (Home Address) (Foreign Network) 192.168.0.1 10.10.1.1 192.168.0.2 10.10.0.3 192.168.0.8 10.10.0.3 Fig 3.1b - Example of a Mobility Binding Table source: [CISCO03a] The correspondent will reply using the source address of the packets from the mobile node (which as far as it is concerned, is the mobile node’s home address). This reply is consequently delivered to the home agent network. The Home Agent will then lookup the current ‘Care of Address’ for the Mobile Node in the Mobility Binding Table and forward the traffic from the correspondent onto the Foreign Agent at which the Mobile Node is currently residing. The Foreign agent in turn forwards the packets to the mobile node. Some companies currently working on Mobile IP products are Accenture, ipUnplugged, Adjungo and Icomera. 3.1.2 Problems with Mobile IP Mobile IP is a good solution to wireless roaming, but it has its downfalls. Firstly, there is a need for more specialised hardware (foreign agent and home agent). This is because latency and routing inefficiencies are caused by having traffic sent to home network before being sent to mobile node. Secondly, when a mobile node travels across a number of different wireless networks, it will build up a ‘daisy chain’ number of foreign agents. Traffic may have to be routed across this chain of different networks before it gets to the mobile node. This will add a large degree of latency and limit the bandwidth availability to the slowest link in the daisy chain. Page 23
  24. 24. Final Year Dissertation – Seamless Roaming Between Wireless Networks 3.2 Occasionally Connected Computing (OCC) Applications could be written a little more intelligently when a network connection cannot be found. A few applications offer you the option to "Work Offline/Online". For example, Microsoft Outlook will work offline, allowing a user to write an e-mail and send it. The e-mail will actually be sent the next time the user connects to the Internet and Outlook goes online. However, this is not done automatically. The user will have to tell Outlook to go online as and when needed, otherwise a whole array of networking errors may be encountered. Fig 3.2a – Example of Online/Offline Error Messages If an application was designed to automatically connect and disconnect to the internet ad-hoc through whatever connection was available, be it Ethernet Cable, WiFi or GPRS, it would reduce network/internet traffic. This reduction would occur because there would be no unused bandwidth taken up during idle periods. [INTEL03a] The following explanation of OOC continues the postal scenario from section 3.1: Another student decides to setup a PO Box with a post office. She gets all her post delivered to this PO Box and picks up her post as and when she is able to pass the post office. All outgoing mail is sent through the same post office. The sender has no knowledge of where the student is really living, but yet she is still able to get all her post. Two companies are looking at an Application Layer (OSI Layer 7) idea, Intel in a project called OCC (Occasionally Connected Computing), and IBM on a project called MQ Anyplace. Both companies are creating network software which operates regardless of how or when it is connected to a network or the internet. [IBM03] There are a few phases to the OCC model which can be classified according to their different levels of sophistication: • Good - The first level suggests that applications should work even if it is offline. An application should automatically detect if it has an open interface to the internet and connect. Conversely, if it has not got a connection it should not throw any errors but seamlessly work offline with the data it already has (e.g. cached web pages) Page 24
  25. 25. Final Year Dissertation – Seamless Roaming Between Wireless Networks • Better - At the second level, applications should be designed not only to seamlessly connect and disconnect, but also to retrieve enough data to carry on working. The application may be used as a daemon. This daemon can probe the network to establish when the device is online. This is a similar system to the existing "Hot-Sync" widely used with PDA's and Mobile Phones. Data synchronisations can occur frequently and completely transparent to the user. Application data can be broken down into small update chunks which would be connection or protocol independent. • Best - The third level not only provides the user with a seamless solution but a more accessible and trouble-free experience. Application data is cached on the mobile user’s machine and also on a transport file system; a server which sits on the Internet caching data between the mobile client and the end correspondent server. Any data that cannot be transmitted due to the lack of connection is stored until a connection is open. This is performed in the background without any user intervention. [FINDART04] Fig 3.2b – Infrastructure of OCC Showing Transport System source: [INTEL03a] All applications built on the OCC model require asynchronous messaging that makes use of the times when the mobile device is online to refresh data, as well as queuing updates when the device is offline for later processing. 3.2.1 Problems with OOC This works well for applications that operate on batch style processing, such as e-mail, file transfer or newsgroups, but would be less suitable for activities such as streaming media which require a constant real-time connection. Page 25
  26. 26. Final Year Dissertation – Seamless Roaming Between Wireless Networks 3.3 DSP Silicon Methods 3.3.1 System on Chip (SoC) Intel, Nokia and a number of other organisations are developing SoC (System on Chip), a single piece of silicon which includes multiple DSP’s (Digital Signal Processors) along with high speed reconfigurable logic processors, in order to execute multiple wireless protocols. A DSP is a processor which allows a computer to translate signals to and from digital data. In the case of wireless networks, these signals are electronic radio waves. More than one DSP processor may be integrated onto one SoC chip to translate signals from different frequencies using different modulation techniques (i.e. CDMA, DSSS, FHSS, OFDM). A reconfigurable logic processor is a processor which can be configured to carry out different control tasks, including protocol processing and generation. The real benefit is that the logic is self reconfigurable to meet the needs of different wireless protocols. The combination of these processors is known as System on Chip (or SoC). This is a data link layer (OSI Layer 2) solution. The idea is that one piece of silicon could be manufactured which would include support to connect to two or more wireless network types and allow for always-on connections, as well as the ability to switch automatically and transparently between networks types. SoC is still in development, and research is being done in gradual stages. At the time of writing testing is being carried out on WiFi (802.11) and HiperLAN/2, which share similar protocols and are therefore easier to switch between. The eventual aim is to be able to swap between further protocols including GPRS and UMTS. [SOC04] Fig 3.3 – System on Chip Block Diagram The ability to roam between different wireless network types is not the only advantage of SoC, Mobile devices can be cheaper to build, and develop because they require less silicon. They can also physically be smaller and consume less power. Page 26
  27. 27. Final Year Dissertation – Seamless Roaming Between Wireless Networks 3.3.2 Software Defined Radio (SDR) SDR is similar in many ways to SoC in that it still relies on the power of DSP technology, and is a development which allows further radio flexibility. By simply modifying or replacing software programs or firmware, it can completely change the radio’s functionality, changing communications protocols and frequency bands. Such flexibility allows for easy upgrade to new modes and protocols without the need to totally replace hardware. There is a great difference between a radio which uses software internally for some of its functions (e.g. the software in a GPRS radio which is responsible for dialling number) and a SDR radio which can be completely redefined through modification of its software. [ARRL03] The concept of SDR is rapidly gaining commercial popularity, not only for the GPRS and mobile phone industry, but also for wireless computer networks such as WiFi. Intel’s brand name for SDR is called ‘Radio Free’ and their aim is “to allow products with embedded silicon to connect to multiple networks, regardless of their respective protocols or requirements.” [INTEL04B] 3.3.3 Problems with DSP Silicon Methods Both SDR and SoC are still under development. Both would require new hardware to replace current wireless network devices. Mobile users who do not wish to replace their existing expensive hardware would need a software solution to work on top of their current setups. Page 27
  28. 28. Final Year Dissertation – Seamless Roaming Between Wireless Networks 4. Analysis and Design 4.1 Brief This chapter describes the mobility problem as well as some proposed solutions formulated by the author after previous work experience in the wireless networking area and studies of the problem. It then concludes with a discussion of a specific Network Layer (OSI Layer 3) solution to be further implemented. note: For the rest of this report the name ‘NetSwap’ will be used to describe the proposed solution which would allow seamless swapping between wireless networks. Put in simple terms, the NetSwap solution again has parallels with the conventional postal system, take the following scenario: Another student living in Portsmouth decides to first post all his outgoing mail to his parents living in Eastbourne by putting all post within a second envelope addressed to the parents. On receiving any letters, the parents then take the original envelope containing the true receivers address out of the second envelope, and put it back in the post box. It would then appear to the receiver that the letter originated from Eastbourne due to the postal mark printed on the envelope. As the receiver replies, they send all post back to Eastbourne as this is where they perceive it came from. The parents then forward any replies onto the student in Portsmouth by writing “Please Redirect to…” with the student’s current address. The letters which the student posts onto their parents contained within a second envelope could be said to be encapsulated. The concept of encapsulation is one of the central ideas of the NetSwap solution. Page 28
  29. 29. Final Year Dissertation – Seamless Roaming Between Wireless Networks There needs to be two main components in the NetSwap system:- 4.1.1 The NetSwap Driver The NetSwap Driver is a piece of software which will represent a ‘virtual network interface’ in a Mobile Node. The driver sits on top of all other network device drivers. Its purpose is to fool any internet application into thinking that the mobile node has a constantly connected network device. The NetSwap driver will then act as a kind of ‘proxy’, utilising the other different network devices (e.g. GPRS and WiFi) depending on their availability. There is a standard for communicating with most new network drivers called NDIS (Network Driver Interface Standard). NDIS is fast becoming an integral part of all Windows operating systems and all Windows compliant Network adapters are shipped with NDIS compatible drivers. Fig 4.1.1a - NDIS - NetSwap Driver [SISECH03] The NetSwap Driver is responsible for monitoring all connections. It routes the traffic from the application to one physical card at a time, depending on availability and priority order. Priority may be based on cost, routing metric, bandwidth, or it can be user defined. For example, WiFi may be of higher priority than GPRS due to it being a quicker connection. The main job of the NetSwap Driver is to fool any applications into using the ‘virtual network interface’ before it uses any other network interface. One method of doing this would be to force the metric values for all other interfaces in the system up, thereby giving the virtual interface the lowest metric. For example, the driver could give itself a metric of 10 and move Ethernet to 11, Wireless to 31 and GPRS to 51. Therefore, an internet application sending network traffic will go through the NetSwap Driver with the new lower metric. The NetSwap driver must then force all packets to be sent through a special router (see 4.2.1 – NetSwap Gateway) by encapsulating them in a second IP header. It should then communicate with the special router by letting it know which interfaces are currently available on the mobile node. This communication would be done at regular intervals while switching between interfaces. Page 29
  30. 30. Final Year Dissertation – Seamless Roaming Between Wireless Networks 4.1.2 The NetSwap Gateway The NetSwap Gateway is a router sitting on the internet, which acts as a central point to relay all traffic through. As discussed earlier, the mobility problem occurs when a mobile node swaps between two networks and the correspondent server is unaware of where the mobile node has moved to, rendering it unable to reply. The NetSwap Gateway must have a static IP address as it is used as a ‘known point’ and should not change. Its job is to forward all traffic to and from the mobile node’s current address. There is an ‘always on’ connection as far as any applications running on both the mobile node and the correspondent are concerned, and the fact that the traffic goes through the NetSwap gateway should be transparent to both ends. Fig 4.1.2a - Switching Between Network Interfaces Page 30
  31. 31. Final Year Dissertation – Seamless Roaming Between Wireless Networks 4.2 Class Diagrams The following two sections (4.2 and 4.3) detail the design for the NetSwap idea in the UML (Unified Modelling Language) design methodology. UML is an industry-standard language for specifying, visualizing, constructing, and documenting system designs. It has been chosen to document the NetSwap design as it simplifies the complex process of software design, making a “blueprint” for future implementation. The UML Class diagram below shows the relationships between the different components in the NetSwap design. Fig 4.2a – UML Class Diagram for NetSwap For further details of the methods and Attributes see Appendix B Some components build up on already available equipment; Inheritance and Composition Description: • The Mobile Node, Web Server and Gateway all inherit from a standard computer node • The Web Server contains one interface, the Gateway contains two interfaces, and the Mobile Node contains two interfaces of different types (GPRS and WiFi) • Both the GPRS and WiFi interface inherit from a standard Network Interface (for example the NDIS standard) • The NetSwap Gateway inherits from a standard Gateway/Router Communication between all types of node (Web Server, Gateway and Mobile Node) is done via the ‘Network Cloud’. This network cloud would represent all the physical network equipment between the nodes, including Routers, Cables, Radio Links, GGSN, SGSN, Access Points, Switches etc. The network cloud represents all aspects of the system which relate to the external network. This encompasses all delays between nodes caused by propagation, processing or bandwidth restrictions. Page 31
  32. 32. Final Year Dissertation – Seamless Roaming Between Wireless Networks 4.3 Sequence Diagrams The communications between the devices seen in the Class Diagram (see Section 4.2) can be represented in a UML sequence diagram which shows the order in which certain communications are done. 4.3.1 Simple Scenario The scenario below represents a simple NetSwap session with no errors, communicating using the WiFi interface, sending and receiving only a single packet to the Correspondent Web Server. Fig 4.3.1a – UML Sequence Diagram for NetSwap For further details of the methods and Attributes see Appendix B Page 32
  33. 33. Final Year Dissertation – Seamless Roaming Between Wireless Networks 4.3.2 If things go wrong The following scenario shows what would happen if one of the two interfaces was initially failed to respond, but it later becomes available midway through a session. After polling both interfaces, the NetSwap Driver chooses the lowest metric interface available and updates the NetSwap gateway with the open interface address. In this case, it is initially the GPRS interface. This is due to the WiFi interface not responding to the earlier poll. Communication starts between the Mobile Node and the Correspondent Web Server via the NetSwap gateway. Before the web server sends its response, the WiFi interface becomes available and the NetSwap gateway is updated with the new return address of the WiFi interface. Fig 4.3.2b – UML Sequence Diagram for NetSwap while swapping For further details of the methods and Attributes see Appendix B Page 33
  34. 34. Final Year Dissertation – Seamless Roaming Between Wireless Networks 4.4 Pseudo Code The following pseudo code details what happens at each stage of the sequence diagram. This pseudo code could then be used to help implement parts of the NetSwap design in programming. TestInterfaces() The initial stage is to determine which interfaces are ‘online’ in the mobile node. Taking the scenario of a Mobile Node with two interfaces, namely GPRS and WiFi, the NetSwap driver needs to poll each in turn. See the Poll() code for more details. Create NetSwapPollTable used to store online/offline interfaces; If (Poll(WiFi) = OK) { Put interface in NetSwapPollTable; Put time of poll reply in NetSwapPollTable; } else if (Poll(GPRS) = FAILED) { Inferface poll failed; } If (Poll(GPRS) = OK) { Put interface in NetSwapPollTable; Put time of poll reply in NetSwapPollTable; } else if (Poll(GPRS) = FAILED) { Inferface poll failed; } Poll(interface) The following code is used by the TestIntefaces() command above. There are a couple of different solutions to find out open interfaces. The first solution is to send a specially generated ICMP packet (similar to a ping) to the different interfaces as a poll. A timer should be set (in this example for 3 seconds) and, if a PollReply() comes back before the timer runs out, the interface poll has been successful. Generate special ICMP poll packet; Send to interface; StartTimer running for 3 sec; If (Reply from interface and timer still running) { Return OK; } else If (Timer finished running) { Return FAILED; } PollReply() On receiving a poll from the driver, each interface must reply with an acknowledgement before the timer runs out. Receive ICMP poll request packet; Send(ACK) back to Driver; Page 34
  35. 35. Final Year Dissertation – Seamless Roaming Between Wireless Networks The second solution to find out whether or not an interface is online is to use the already present API interrupts and signalling. Both Microsoft Windows and Linux Operating Systems provide them. There are many different signals and messages triggered by various events which occur during the running of an operating system. The NetSwap Driver could hook onto these event signals to determine which connections are available. For Windows, there is a signal which triggers the "Network Connection Connected" bubbles which appear in the taskbar when network interfaces are connects/disconnected. Fig 4.4a – Microsoft Windows interrupts to determine online interfaces For Linux, the “ifup eth0” command can be used to determine if an interface is online or not: Listen to OS interrupt signals relating to interface; Online = Ifup(interface); If (Online) { Return OK; } else () { Return FAILED; } The advantage of using this second method is that it reduces unnecessary polling. In addition to this the NetSwap Driver is told of any change instantly, as and when the connections change instead of at timed poll intervals. Page 35
  36. 36. Final Year Dissertation – Seamless Roaming Between Wireless Networks ChooseLowestMetric() After determining which interfaces are available, the driver needs to decide through which interface it should forward all traffic. A metric order also needs to be decided, this could be chosen in a few different ways. The first method could be based on the time taken to reply to the poll by reading the poll time recorded in TestInterfaces(). Read NetSwapPollTable time taken to reply for each interface; Choose Lowest time; Primary Interface = lowest; Secondary Interface = second lowest; Reset Routing Tables to reflect change; The second method could be to read the values from the routing tables. In the case where a computer has two or more connections to the internet, there is a mechanism which forces any internet applications to send data through a preferred connection. TCP/IP uses ‘routing metrics’. A Metric is a numerical value which represents the priority order in which an application should send network traffic. This priority could be based on connection cost, speed, reliability (metrics were originally designed to represent the number of hops or router connections to a specific destination). This can be seen by typing “route PRINT” in a windows command line: C:>route PRINT =========================================================================== Interface List 0x1 ........................... MS TCP Loopback interface 0x2 ...00 04 23 46 8b 31 ...... Intel(R) PRO/Wireless LAN 2100 3B Mini PCI 0x3 ...00 40 ca c0 79 89 ...... Intel(R) PRO/100 VE Network Connection - =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.0.100 192.168.0.55 10 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.0.0 255.255.255.0 192.168.0.55 192.168.0.55 30 192.168.0.55 255.255.255.255 127.0.0.1 127.0.0.1 30 192.168.0.255 255.255.255.255 192.168.0.55 192.168.0.55 30 224.0.0.0 240.0.0.0 192.168.0.55 192.168.0.55 30 255.255.255.255 255.255.255.255 192.168.0.55 3 1 255.255.255.255 255.255.255.255 192.168.0.55 192.168.0.55 1 Default Gateway: 192.168.0.100 =========================================================================== Persistent Routes: None The metric can be seen down the right hand column, and could be used to establish a priority. These numbers are different depending on the type of network interface. For example, an Ethernet connection may have a metric value of 10, a WiFi connection a metric value of 30 and GPRS a metric value of 50. If a computer had all these three connections installed and online at once, the default route for all traffic would be through the Ethernet connection with the lowest metric of 10. Get metric values by reading OS routing table; Choose Lowest metric; Primary Interface = lowest; Secondary Interface = second lowest; The third method of choosing the lowest metric could be user defined. The user of the mobile node could physically set some settings to decide the interface priority. Page 36
  37. 37. Final Year Dissertation – Seamless Roaming Between Wireless Networks NetSwapAddressUpdate() The NetSwap driver needs to let the NetSwap Gateway know which interface the mobile node is using each time it changes. Again there are a couple of possible solutions: The first solution is to use ICMP (Internet Control Message Protocol). ICMP are special packets which contain error control messages, routing messages, session information, and operation messages between routers and gateways. There are a number of different ICMP types which perform different tasks, such as announcing network errors (network unreachable or port numbers blocked), announcing network congestion (if a router is overwhelmed with packets and unable to transmit), announcing timeouts (if a packet's TTL field drops to zero). In the latter instance, the router discarding the packet will often generate an ICMP packet announcing this timeout. [STEVENS94] A handful of the ICMP packet type numbers are listed in Appendix A. ICMP type numbers 1 and 2 are "Unassigned" to a particular task and could be used by the NetSwap Driver to let the NetSwap Gateway know of interface changes through specially constructed ICMP packets solely for this purpose. Create Table of return address to MN named NetSwapGatewayTable Receive Packet; Read Data field in ICMP packet; NetSwapGatewayTable = Data field; Send(ACK) back to driver; The second solution is opening a socket session on an unused port. The NetSwap Driver could open a socket session with the NetSwap Gateway on a special port (in this example port 5555 is used) which could have a program running listening for interface changes. NetSwap Driver open socket with the NetSwap Gateway on port 5555; send new interface ip address from NetSwapPollTable; wait for confirmation; NetSwap Gateway Create Table of return address to MN named NetSwapGatewayTable Listen on port 5555 for the NetSwap Driver; receive ip address change; Set NetSwapGatewayTable with the address change; send confirmation of change; update return ip address table; By updating the NetSwap Gateway using this method, scope could be included for multiple users each having to login and update through this program. One downside to this second method is that it is dangerous to have ports open on a gateway as it would leave it susceptible to hacking. The NetSwap Gateway needs to be updated with any interface change on the Mobile Node as soon as possible to avoid packet loss. Therefore the method for updating the NetSwap Gateway has to be quick and still be able to get through even if congestion occurs. Page 37
  38. 38. Final Year Dissertation – Seamless Roaming Between Wireless Networks NetSwapAddressUpdateOK(ACK packet) An acknowledgement of address update is sent back to the NetSwap Driver to let it know that the update was successful; the driver now knows that further transmissions will be replied to through the new interface. Receive Packet; Set return interface to address in packet; Send ACK; Encapsulate(packet) As discussed previously, all packets need to be sent via the NetSwap Gateway before getting to their final correspondent destination. This is done so that the NetSwap Gateway can change the return address contained in the packet to its own address so that the final destination can reply back to one static address, which will never change, even if the mobile node changes network. The second IP header literally goes on the outside of the original headers. For example: Original IP IP Header IP Tail NetSwap encapsulated IP New IP Hdr New IP Tail Fig 4.4b – Encapsulation to force to NetSwap Gateway As this encapsulated packet travels through the network/internet, any routers encountered will just read the outer IP address headers and route as if it were a normal packet. The current interface should be set as the source address in the new IP header. The encapsulation is later to be stripped off by the gateway and sent on to their original correspondent destination. Receive Packet; Generate New Header to force to NetSwap Gateway { Destination = NetSwap Gateway Address; Source = Highest metric interface in NetSwapPollTable; Type = NetSwap packet; } E_packet = Encapsulate Packet with New Header; Send(e_Packet); * e_packet is an encapsulated packet The encapsulation works in a similar way to a VPN tunnel, which forces all packets to go a specified route by encapsulating them. The only difference is that the NetSwap design does not require encryption. Page 38
  39. 39. Final Year Dissertation – Seamless Roaming Between Wireless Networks Decapsulate(e_packet) All packets coming from the Mobile Nodes NetSwap Driver to the Gateway will be encapsulated. These packets need to be decapsulated before they get resent. The reverse of Encapsulate() should be performed. The outer IP header is stripped off and the original packet is sent onto its final correspondent destination. The source address of the packet is also changed before sending. Receive e_packet; packet = Remove outer IP herders(e_packet); ChangeSourceAdd(packet); Send(packet); ChangeSourceAdd(packet) The NetSwap Gateway needs to change the source IP addresses of the Packets from the Mobile Node after decapsulation. It needs to be changed to the IP address of the NetSwap Gateway. This is required to fool the correspondent into returning its reply back to the NetSwap Gateway which has prior knowledge of the Mobile Nodes current address… GatewayAddress = 1.2.3.4; ReadIPHeader(packet){ Change SourceAddress = GatewayAddress; } ChangeDestAdd(packet) …the packet will then be forwarded back to the Mobile Node. This is done by changing the destination address of the correspondent reply back to the current open interface as set in the Table by the NetSwapAddressUpdate() command above. Receive Packet; Change dest address of packet to the current open interface; The aim of this process is to make the NetSwap Gateway appear transparent to both the Mobile Node and the end destination. Page 39
  40. 40. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5. Implementation The original plan had been to implement the design in two stages. The first stage was to try and recreate some of the problems which occur when swapping between wireless networks using real network hardware. This would make it possible to gain some numeric results and gain a better knowledge of why the mobility problems occur. In the second stage, network simulation software was to be used to implement the NetSwap idea, with which it was planned to produce some comparable results to the real hardware testing performed in the first stage. This chapter outlines the methods used to implement the NetSwap idea. Page 40
  41. 41. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.1 Physical Hardware Simulation In addition to using a simulation, it was decided that physically recreating the mobility issue using real hardware would offer a better understanding into the problem. It should also increase the possibility of finding smaller solutions or fixes. Intel Corporation have supplied both a GPRS Adapter (Intel PRO/Wireless GPRS 3110 PC Card) and a 802.11b WiFi Network Adapter (PRO/Wireless LAN 2100 3B MiniPCI Adapter). Orange (PCS), a UK mobile phone operator, have kindly donated a SIM card with a year’s subscription and unlimited connection to their GPRS network to this research project. Fig 5.1a - Intel PRO/Wireless GPRS 3110 PC Card with Orange SIM card. Fig 5.1b - Intel PRO/Wireless LAN 2100 3B MiniPCI Adapter. Using this hardware, some simple tests can be done by running a few different network applications and observing what happens when network adapters lose connection during the swapping process (roaming). Page 41
  42. 42. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.2 Physical Hardware Implementation 5.2.1 Software Used Microsoft Windows XP Professional SP1 – Operating System The Microsoft Windows XP operating system was used due to its easy GUI access to control network interfaces. It also has Windows NDIS drivers (as described in section 4.1.1). CuteFTP 5.0 – File Transfer Program Transfers files between computers over a network using the FTP protocol. FTP is a stateless protocol and therefore requires information to be passed between client and server each time a file transfer session is established. Microsoft Windows Media Player 8.0 – Streaming Media Streams sound from the internet whilst swapping between wireless interfaces. It uses a buffer which caches music ahead of play. This may increase the chances of a more seamless swap as interfaces swap. Icomera 2.3 – Mobility Manager Software which claims to combine different wireless links (i.e. Satellite, GSM, CDMA, etc) for optimal communication and performance. The different communication links can be configured to connect automatically according to defined parameters (e.g. speed, cost, availability and reliability). Intel PROSet 7.0 – Network card drivers and configuration utility A control panel which allows the user to view various statistics and modify settings for all kinds of Intel network adapters, including Ethernet, GPRS and WiFi. Some features include: • The ability to view radio signal strength for WiFi and GPRS cards • On the fly setting of IP addresses, either manually or by DHCP • Network Adapter Switching which apparently enables automatic switching between two or more network adapters • The ability to view other wireless networks which are in coverage range Ping – ICMP Polling Network Tool Uses timed IP/ICMP ECHO_REQUEST and ECHO_REPLY packets to probe the “distance” to a target machine. As a correspondent is pinged, it would be useful to see if a reply can make its way back after an interface change. Page 42
  43. 43. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.2.2 Equipment Setup - Architecture The GPRS and WiFi cards have been installed in a desktop PC of sufficient specification and configured with optimal settings. In order to ensure fair testing, both cards are from the same manufacturer (Intel) and have had external antennas connected to improve signal strength. Fig 5.2.2a – Physical Equipment Antennas An access point (Intel 2110B series) has been installed in an optimum position to provide sufficient wireless signal to the test equipment, and GPRS coverage from Orange is good. Before tests began, both WiFi and GPRS report full signal strength. Fig 5.2.2b – Test Equipment Setup Architecture Access to the internet is obtained through a Cisco 2611 router and a NTL cable modem. Page 43
  44. 44. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.2.3 Simulating the effect of “Roaming” Since the GPRS and WiFi adapters have been installed in a desktop computer, the equipment setup is not very mobile. It is therefore not easy to roam between different wireless network types to get low signal etc. Rather than move the wireless adapters out of radio range of the transmitters (access point and GPRS BSC), a preferable way to reduce signal is to cover the antennas up. A tube covered in layers of aluminium foil, when placed over the antenna, was found to reduce signal to each interface enough to lose connection. This is an effective way of simulating losing range of a wireless network. Fig 5.2.3a – Simulating Roaming with antenna sleeve This approach can be used with both the WiFi and GPRS antennas and makes roaming tests fairer. Due to the fact that the equipment is staying in one place, signal strengths can be controlled more reliably and signal loss can be reproduced on demand. Page 44
  45. 45. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.2.4 Application Configuration CuteFTP was setup to transfer files from a correspondent server on the internet. It was later found that most FTP connections are “stateless”. This means that connections between client and host are created and if connection is lost halfway through a file transfer the FTP server will have no knowledge of any clients trying to re-establish a transfer, therefore in normal circumstances after changing interfaces a new file transfer will need to be restarted again. The NetSwap solution should solve this problem by fooling each end into thinking there is an ‘always on’ connection even if the user swaps between the interfaces are swapped between. Microsoft Windows Media Player which was used to stream audio from the online radio channel http://www.southernfm.com, was configured with the default buffer and performance settings found in Tools -> Options -> Performance -> as follows: • Connection Speed = Detect connection speed • Network Buffering = Use default buffering (5 seconds) Icomera was used briefly by the author. It was configured with an Icomera Gateway and setup to use the Intel GPRS and WiFi interface cards. It was very simple to setup and did not need many extra settings. However, it was found to have a bug in the version used which prevented it from fully working with the Intel GPRS card. Consequently, it could not be used for any tests. Intel PROSet was installed and the control panel was used to bring interfaces up and down to simulate the action of interfaces failing. IP addresses were manually assigned to the WiFi card to eliminate DHCP assignment problems. Ping was used as a test tool to see if correspondent hosts on the internet were working or not. A couple of tests were done by running ping with the “no timeout” option, which would mean ping would keeps pinging until stopped by the user. This was done by using the –t parameter (e.g. “ping www.jlsnet.co.uk –t”) 5.2.5 Recording Findings and Recreating problem in Physical Hardware As it is hard to measure lost packets in a real life scenario without protracted use of packet sniffing software, it was decided to simply measure the performance of the applications in time. This was measured using a stopwatch while running the various applications listed above in real life use-scenarios. Three case scenarios were tested: • Starting with both WiFi and GPRS online and recording what happens when WiFi is taken down midway through a test • Switching WiFi back on while GPRS is online. Does it swap back to the faster, lower metric interface in the tests? • Starting with WiFi and GPRS on and switching GPRS off midway through a test Page 45
  46. 46. Final Year Dissertation – Seamless Roaming Between Wireless Networks note: For the results of these tests, see Testing and Evaluation, Chapter 6 Page 46
  47. 47. Final Year Dissertation – Seamless Roaming Between Wireless Networks 5.3 Software Simulation of the NetSwap Idea The concluding part of this chapter will include brief comparisons of network simulation software and the installation, creation and simulation of the NetSwap idea using the designs in Chapter 4. Networking technologies and ideas are often very hard to explain. Even with the use of many diagrams, pseudo code and long descriptions, it can still be hard to determine if an idea is going to work. It is easier to demonstrate an idea in an environment where it can be visualised. Simulation is defined by foldoc.org as “Attempting to predict the aspects of the behaviour of some system by creating an approximate (mathematical) model of it”. A simulator can therefore be used to produce results in research into the behaviour of a system. In the case of this project, a simulator needs to be chosen to simulate (predict) the actions of a computer network model. Network simulation aims to recreate a live network system, calculating packet transfers across a network between two or more nodes and also simulating loss, queuing, delay, and processing time. It must be decided which is the best simulator to use in recreating the NetSwap idea. There are 4 different software simulators of interest (OPNET, QuarlNet, OmNET++ and NS-2). Page 47

×