You are on page 1of 20

UnitIV

MobileIP
IPversion4assumesthatanodesIPaddressuniquelyidentifiesitsphysicalattachmenttothe Internet.Therefore,whenacorespondenthost(CH)triestosendapackettoamobilenode(MN), thatpacketisroutedtotheMNshomenetwork,independentlyofthecurrentattachmentofthat MN(thisisbecauseCHsdonothaveanyknowledgeofmobility). WhentheMNisonitshomenetwork,andaCHsendspacketstothemobilenode,theMobileNode obtainsthosepacketsandanswersthemasanormalhost(thisisoneimportantrequirementin MobileIP),butiftheMNisawayfromitshomenetwork,itneedsanagenttoworkonbehalfofit. ThatagentiscalledHomeAgent(HA).ThisagentmustbeabletocommunicatewiththeMNall thetimethatitisonline,independentlyofthecurrentpositionoftheMN.So,HAmustknow wherethephysicallocationoftheMNis. Inordertodothat,whentheMNisawayfromhome,itmustgetatemporaryaddress(whichis calledcareofaddress),whichwillbecommunicatedtotheHAtotellitscurrentpointof attachment.Thiscareofaddresscanbeobtainedbyseveralways,butthemosttypicaloneisthat theMNgetsthataddressfromanagent.Inthiscase,thisagentiscalledForeignAgent(FA). Therefore,whenaMNisawayfromhome,anditsconnectedtoaforeignnetwork,itdetectsisona differentnetworkandsendsaregistrationrequestthroughtheFAtotheHArequestingmobile capabilitiesforaperiodoftime.TheHAsendsaregistrationreplybacktotheMN(throughtheFA) allowingordenyingthatregistration.ThisistruewhentheMobileNodeisusingaForeignAgent fortheregistration.IftheMobileNodeobtainsthecareofaddressbyothermeanings,thatstep (registrationthroughtheFA)isnotnecessary.

IftheHAallowsthatregistration,itwillworkasaproxyoftheMN.WhenMNshomenetwork receivespacketsaddressedtotheMN,HAinterceptsthosepackets(usingProxyARP),encapsulates them,andsendsthemtothecareofaddress,whichisoneoftheaddressesoftheFA.TheFAwill decapsulatethosepackets,anditwillforwardthemtotheMN(becauseitknowsexactly,wherethe MNis). EncapsulationisthemethodusedbytheHAtodeliverinformationtotheMNputtinganextraIP headerontopofthepacketandtunnellingthatpackettotheMN(whenit'sonaforeignnetwork). TunnelingandencapsulationaredefinedinIPinIPtunnelingandIPencapsulationwithinIP.

So,whentheMNisonaforeignnetwork,itusesitshomeagenttotunnelencapsulatedpacketsto itselfviaFA.Thisoccursuntilthelifetimeexpires(ortheMNmovesaway).Whenthishappens (timeout)MNmustregisteragainwithitsHAthroughtheFA(iftheMNobtainsitscareofaddress forothermeanings,itactsasitsownFA). WhentheMNmovestoanothernetworkanditdetectsso,itsendsanewregistrationrequest through(onemoretime)thenewFA.Inthiscase,HAwillchangeMNscareofaddressanditwill forwardencapsulatedpacketstothatnewcareofaddress(which,usually,belongstotheFA).Some extensionsofMobileIPallowstoaMNtohaveseveralcareofaddresses.Then,HAwillsendthe sameinformationtoallthecareofaddresses.ThisisparticularlyusefulwhentheMNisatthe edgesofcellsonawirelessenvironment,anditismovingconstantly. MNbasesitsmovementdetectionbasicallylookingatperiodicadvertsoftheFA(andHA),which sendstoitslocalnet.ThosemessagesareoneextensionoftheICMProuterdiscoverymessagesand theyarecalledAgentAdvertisement(becausetheyadvertisesavalidagentforMobileNodes). Therearetwodifferentmethodstodetectnetworkmovement: a)Thefirstmethodisbasedonnetworkprefixes.ForfurtherinformationlookatMobileIPRFC 2002Thismethodisnotincludedinourcurrentimplementation. b)ThesecondmethodisbasedupontheLifetimefieldwithinthemainbodyoftheICMPRouter AdvertisementportionoftheAgentAdvertisement.MobilenodeskeeptrackofthatLifetimeandif itexpires,itsendsanAgentSolicitation(askingforanewAgentAdvertisement)anditpresumes thatithasbeenmoved. WhentheMNreturnstoitshomenetwork,itdoesnotrequiremobilitycapabilities,soitsendsa deregistrationrequesttotheHA,tellingitthatitsathome(justtodeactivatetunnelingandto removepreviouscareofaddress(es)). Atthispoint,MNdoesnothaveto(de)registeragain,untilitmovesawayfromitsnetwork.The detectionofthemovementisbasedonthesamemethodexplainedbefore.

DynamicHostConfigurationProtocol
TheDynamicHostConfigurationProtocol(DHCP)isanetworkconfigurationprotocolforhostson InternetProtocol(IP)networks.ComputersthatareconnectedtoIPnetworksmustbeconfigured beforetheycancommunicatewithotherhosts.ThemostessentialinformationneededisanIP address,andadefaultrouteandroutingprefix.DHCPeliminatesthemanualtaskbyanetwork administrator.Italsoprovidesacentraldatabaseofdevicesthatareconnectedtothenetworkand eliminatesduplicateresourceassignments. InadditiontoIPaddresses,DHCPalsoprovidesotherconfigurationinformation,particularlytheIP addressesoflocalcachingDNSresolvers,networkbootservers,orotherservicehosts. DHCPisusedforIPv4aswellasIPv6.Whilebothversionsperformmuchthesamepurpose,the detailsoftheprotocolforIPv4andIPv6aresufficientlydifferentthattheymaybeconsidered separateprotocols. HoststhatdonotuseDHCPforaddressconfigurationmaystilluseittoobtainotherconfiguration information.Alternatively,IPv6hostsmayusestatelessaddressautoconfiguration.IPv4hostsmay

uselinklocaladdressingtoachievelimitedlocalconnectivity.

Technicaloverview
DynamicHostConfigurationProtocolautomatesnetworkparameterassignmenttonetworkdevices fromoneormoreDHCPservers.Eveninsmallnetworks,DHCPisusefulbecauseitmakesiteasy toaddnewmachinestothenetwork. WhenaDHCPconfiguredclient(acomputeroranyothernetworkawaredevice)connectstoa network,theDHCPclientsendsabroadcastqueryrequestingnecessaryinformationfromaDHCP server.TheDHCPservermanagesapoolofIPaddressesandinformationaboutclientconfiguration parameterssuchasdefaultgateway,domainname,thenameservers,otherserverssuchastime servers,andsoforth.Onreceivingavalidrequest,theserverassignsthecomputeranIPaddress,a lease(lengthoftimetheallocationisvalid),andotherIPconfigurationparameters,suchasthe subnetmaskandthedefaultgateway.Thequeryistypicallyinitiatedimmediatelyafterbooting,and mustcompletebeforetheclientcaninitiateIPbasedcommunicationwithotherhosts. Depending on implementation, the DHCP server may have three methods of allocating IP addresses: dynamicallocation:AnetworkadministratorassignsarangeofIPaddressestoDHCP,and eachclientcomputerontheLANisconfiguredtorequestanIPaddressfromtheDHCP serverduringnetworkinitialization.Therequestandgrantprocessusesaleaseconceptwith acontrollabletimeperiod,allowingtheDHCPservertoreclaim(andthenreallocate)IP addressesthatarenotrenewed. automaticallocation:TheDHCPserverpermanentlyassignsafreeIPaddresstoarequesting clientfromtherangedefinedbytheadministrator.Thisislikedynamicallocation,butthe DHCPserverkeepsatableofpastIPaddressassignments,sothatitcanpreferentiallyassign toaclientthesameIPaddressthattheclientpreviouslyhad. static allocation:TheDHCPserverallocatesanIPaddress basedonatablewithMAC address/IPaddresspairs,whicharemanuallyfilledin(perhapsbyanetworkadministrator). Only requestingclients withaMACaddress listedinthis tablewill beallocatedan IP address.Thisfeature(whichisnotsupportedbyallDHCPservers)isvariouslycalledStatic DHCPAssignment(byDDWRT),fixedaddress(bythedhcpddocumentation),Address Reservation(byNetgear),DHCPreservationorStaticDHCP(byCisco/Linksys),andIP reservationorMAC/IPbinding(byvariousotherroutermanufacturers).

Technicaldetails
DHCPusesthesametwoportsassignedbyIANAforBOOTP:UDPport67forsendingdatatothe server,andUDPport68fordatatotheclient.DHCPcommunicationsareconnectionlessinnature. DHCPoperationsfallintofourbasicphases:IPdiscovery,IPleaseoffer,IPrequest,andIPlease acknowledgement. DHCPclientsandserversonthesamesubnetcommunicateviaUDPbroadcasts,initially.Ifthe clientandserverareondifferentsubnets,aDHCPHelperorDHCPRelayAgentmaybeused. ClientsrequestingrenewalofanexistingleasemaycommunicatedirectlyviaUDPunicast,sincethe clientalreadyhasanestablishedIPaddressatthatpoint.

Adhocnetworks:Characteristics Somecharacteristicsofmobileadhocnetworks

Wireless,orsinglehopnetworks,untilrecentlywerebasedonafixedstructure,basicallynetwork nodescommunicatingtofixedinfrastructure.Mobileadhocnetworkingoffersmultihop communication,ineffectnetworknodescommunicatingviaothernodes. Insituationswherenetworksareconstructedanddestructedinadhocmanner,mobileadhoc networkingisanexcellentchoice.Theideaofmobileadhocorpacketradionetworkshasbeen underdevelopmentsince1970s.Sincethemid90s,whenthedefinitionofstandardssuchas IEEE802.11(whatwethinkofasWiFiorjust802.11)helpedcausecommercialwirelesstechnology toemerge,mobileadhocnetworkinghasbeenidentifiedasachallengingevolutioninwireless technology. Inthisarticle,I'llhighlightsomeofthecharacteristicsofamobileadhocnetwork.Thisarticlewill behelpfulforbothtechnicalandnontechnicalreadersingainingawiderunderstandingofmobile adhocnetworksandtheircharacteristics. Amobileadhocnetworkisacollectionofmobiledevicesequippedwithatransmitterandreceiver, connectedintheabsenceoffixedinfrastructure.Mobileadhocnetworkisdefinedwith characteristicssuchaspurposespecific,autonomousanddynamic.Incomparisonwithfixed wirelessnetworks,thereisnomasterslaverelationshipthatexistsinamobileadhocnetwork. Nodesrelyoneachothertoestablishedcommunication,thuseachnodeactsasarouter.Therefore, inamobileadhocnetwork,apacketcantravelfromasourcetoadestinationeitherdirectly,or throughsomesetofintermediatepacketforwardingnodes. Thecontrolandmanagementofmobileadhocnetworkisdistributedamongtheparticipating nodes.Eachnodeisresponsibletoforwardpackettoothernodesinthenetworks.Thenodesare alsocollaboratethemselvestoimplementnetworkroutinefunctionssuchassecurity.Nodesin mobileadhocnetworkarehighlymobilewhichcausesnetworktopologytochangerapidlyand unpredictably,asyoucanseeinthegraphicprovidedinFigureA. FIGURE

Themobileadhocnetworkontheleftconstructsitselfasneeded.Rolloverpicturefora largerimage. Moreovertheconnectivityamongthehostsvarieswithtime.Inmostcases,mobileadhocnetworks operateonlowpowerdevices.NormallythesedeviceshavelowCPUprocesscapabilityandsmall memorysizes,thusaffectthecapabilityofthemobileadhocnetworktoreachotherdevices. Ithasbeenclearthatroutinginmobileadhocnetwork,meaningtransferringpacketsfromsourceto destination, is different than traditional routing in a fixed network. Routing in mobile adhoc networkingdependsonmanyfactorswhichincludestopology,selectionofrouters,initiationof requestandavailablebandwidth.

Routinginmobilehost Introduction
Wirelessnetworksisanemergingnewtechnologythatwillallowuserstoaccessinformationand serviceselectronically,regardlessoftheirgeographicposition.Wirelessnetworkscanbeclassified in two types: infrastructured network and infrastructureless (ad hoc) networks. Infrastructured networkconsistsofanetworkwithfixedandwiredgateways.Amobilehostcommunicateswitha bridgeinthenetwork(calledbasestation)withinitscommunicationradius.Themobileunitcan movegeographicallywhileitiscommunicating.Whenitgoesoutofrangeofonebasestation,it connectswithnewbasestationandstartscommunicatingthroughit.Thisiscalledhandoff.Inthis approachthebasestationsarefixed. Incontrasttoinfrastructurebasednetworks,inadhocnetworksallnodesaremobileandcanbe connecteddynamicallyinanarbitrarymanner.Allnodesofthesenetworksbehaveasroutersand takepartindiscoveryandmaintenanceofroutestoothernodesinthenetwork.Adhocnetworksare veryusefulinemergencysearchandrescueoperations,meetingsorconventionsinwhichpersons wishtoquicklyshareinformation,anddataacquisitionoperationsininhospitableterrain. Thisarticlediscussesproposedroutingprotocolsfortheseadhocnetworks.Theseroutingprotocols canbedividedintotwocategories:tabledrivenandondemandroutingbasedonwhenandhowthe routes are discovered. In table driven routing protocols consistent and uptodate routing informationtoallnodesismaintainedateachnodewhereasinondemandroutingtheroutesare created only when desired by the source host. Next two sections discuss current tabledriven protocolsaswellasondemandprotocols.

TableDrivenRoutingProtocols
In Tabledriven routing protocols each node maintains one or more tables containing routing informationtoeveryothernodeinthenetwork.Allnodesupdatethesetablessoastomaintaina consistent and uptodate view of the network. When the network topology changes the nodes propagateupdatemessagesthroughoutthenetworkinordertomaintainaconsistentanduptodate routinginformationaboutthewholenetwork.Theseroutingprotocolsdifferinthemethodbywhich thetopologychangeinformationisdistributedacrossthenetworkandthenumberofnecessary routingrelated tables. The following sections discuss some of the existing tabledriven ad hoc routingprotocols.

DynamicDestinationSequencedDistanceVectorRoutingProtocol
TheDestinationSequencedDistanceVector(DSDV)RoutingAlgorithmisbasedontheideaofthe classicalBellmanFordRoutingAlgorithmwithcertainimprovements. Everymobilestationmaintainsaroutingtablethatlistsallavailabledestinations,thenumberof hops to reach the destination and the sequence number assigned by the destination node. The sequencenumberisusedtodistinguishstaleroutesfromnewonesandthusavoidtheformationof loops.Thestationsperiodicallytransmittheirroutingtablestotheirimmediateneighbors.Astation alsotransmitsitsroutingtableifasignificantchangehasoccurredinitstablefromthelastupdate sent.So,theupdateisbothtimedrivenandeventdriven.Theroutingtableupdatescanbesentin twoways:a"fulldump"oranincrementalupdate.Afulldumpsendsthefullroutingtabletothe neighborsandcouldspanmanypacketswhereasinanincrementalupdateonlythoseentriesfrom theroutingtablearesentthathasametricchangesincethelastupdateanditmustfitinapacket.If

thereisspaceintheincrementalupdatepacketthenthoseentriesmaybeincludedwhosesequence numberhaschanged.Whenthenetworkisrelativelystable,incrementalupdatesaresenttoavoid extratrafficandfulldumparerelativelyinfrequent.Inafastchangingnetwork,incrementalpackets cangrowbigsofulldumpswillbemorefrequent.Eachrouteupdatepacket,inadditiontothe routingtableinformation,alsocontainsauniquesequencenumberassignedbythetransmitter.The routelabeledwiththehighest(i.e.mostrecent)sequencenumberisused.Iftworouteshavethe samesequencenumberthentheroutewiththebestmetric(i.e.shortestroute)isused.Basedonthe pasthistory,thestationsestimatethesettlingtimeofroutes.Thestationsdelaythetransmissionofa routingupdatebysettlingtimesoastoeliminatethoseupdatesthatwouldoccurifabetterroute werefoundverysoon.

TheWirelessRoutingProtocol(WRP)
TheWirelessRoutingProtocol(WRP)isatablebaseddistancevectorroutingprotocol.Eachnode in the network maintains a Distance table, a Routing table, a LinkCost table and a Message Retransmissionlist. TheDistancetableofanodexcontainsthedistanceofeachdestinationnodeyviaeachneighborz ofx.Italsocontainsthedownstreamneighborofzthroughwhichthispathisrealized.TheRouting tableofnodexcontainsthedistanceofeachdestinationnodeyfromnodex,thepredecessorand thesuccessorofnodexonthispath.Italsocontainsatagtoidentifyiftheentryisasimplepath,a looporinvalid.Storingpredecessorandsuccessorinthetableisbeneficialindetectingloopsand avoidingcountingtoinfinityproblems.TheLinkCosttablecontainscostoflinktoeachneighbor of the node and the number of timeouts since an errorfree message was received from that neighbor.TheMessageRetransmissionlist(MRL)containsinformationtoletanodeknowwhichof itsneighborhasnotacknowledgeditsupdatemessageandtoretransmitupdatemessagetothat neighbor. Nodeexchangeroutingtableswiththeirneighborsusingupdatemessagesperiodicallyaswellason linkchanges.Thenodespresentontheresponselistofupdatemessage(formedusingMRL)are requiredtoacknowledgethereceiptofupdatemessage.Ifthereisnochangeinroutingtablesince lastupdate,thenodeisrequiredtosendanidleHellomessagetoensureconnectivity.Onreceiving an update message, the node modifies its distance table and looks for better paths using new information.Anynewpathsofoundisrelayedbacktotheoriginalnodessothattheycanupdate theirtables.Thenodealsoupdatesitsroutingtableifthenewpathisbetterthantheexistingpath. OnreceivinganACK,themodeupdatesitsMRL.Auniquefeatureofthisalgorithmisthatit checks the consistencyofallitsneighbors everytimeitdetectsachangeinlinkofanyof its neighbors.Consistencycheckinthismannerhelpseliminateloopingsituationsinabetterwayand alsohasfastconvergence.

GlobalStateRouting
Inthisalgorithm,eachnodemaintainsaNeighborlist,aTopologytable,aNextHoptableanda Distancetable.Neighborlistofanodecontainsthelistofitsneighbors(hereallnodesthatcanbe heardbyanodeareassumedtobeitsneighbors.).Foreachdestinationnode,theTopologytable contains the link state information as reported by the destination and the timestamp of the information.Foreachdestination,theNextHoptablecontainsthenexthoptowhichthepacketsfor this destination must be forwarded. The Distance table contains the shortest distance to each destinationnode. Theroutingmessagesaregeneratedonalinkchangeasinlinkstateprotocols.Onreceivinga

routingmessage,thenodeupdatesitsTopologytableifthesequencenumberofthemessageis newerthanthesequencenumberstoredinthetable.Afterthisthenodereconstructsitsroutingtable andbroadcaststheinformationtoitsneighbors.

FisheyeStateRouting
ThelargesizeofupdatemessagesinGSRwastesaconsiderableamountofnetworkbandwidth.In FSR, each update message does not contain information about all nodes. Instead, it exchanges informationaboutclosernodesmorefrequentlythanitdoesaboutfarthernodesthusreducingthe updatemessagesize.Soeachnodegetsaccurateinformationaboutneighborsandthedetailand accuracyofinformationdecreasesasthedistancefromnodeincreases.Figure1definesthescopeof fisheyeforthecenter(red)node.Thescopeisdefinedintermsofthenodesthatcanbereachedina certainnumberofhops.Thecenternodehasmostaccurateinformationaboutallnodesinthewhite circleandsoon.Eventhoughanodedoesnothaveaccurateinformationaboutdistantnodes,the packetsareroutedcorrectlybecausetherouteinformationbecomesmoreandmoreaccurateasthe packet moves closer to the destination. FSR scales well to large networks as the overhead is controlledinthisscheme.

AccuracyofinformationinFSR

HierarchicalStateRouting
ThecharacteristicfeatureofHierarchicalStateRouting(HSR)ismultilevelclusteringandlogical partitioningofmobilenodes.Thenetworkispartitionedintoclustersandaclusterheadelectedas inaclusterbasedalgorithm.InHSR,theclusterheadsagainorganizethemselvesintoclustersand soon.Thenodesofaphysicalclusterbroadcasttheirlinkinformationtoeachother.Thecluster headsummarizesitscluster'sinformationandsendsittoneighboringclusterheadsviagateway. these clusterheads are member of the cluster on a level higher and they exchange their link informationaswellasthesummarizedlowerlevelinformationamongeachotherandsoon.Anode ateachlevelfloodstoitslowerleveltheinformationthatitobtainsafterthealgorithmhasrunat thatlevel.Sothelowerlevelhasahierarchicaltopologyinformation.Eachnodehasahierarchical address.Onewaytoassignhierarchicaladdressistheclusternumbersonthewayfromroot.A gatewaycanbereachedfromtherootviamorethanonepath,sogatewaycanhavemorethanone hierarchicaladdress.Ahierarchicaladdressisenoughtoensuredeliveryfromanywherein the networktothehost.

AnexampleofclusteringinHSR Inaddition,nodesarealsopartitionedintologicalsubnetworksandeachnodeisassignedalogical address<subnet,host>.Eachsubnetworkhasalocationmanagementserver(LMS).Allthenodesof that subnet register their logical address with the LMS. The LMS advertise their hierarchical addresstothetoplevelsandtheinformationissentdowntoallLMStoo.Thetransportlayersends apackettothenetworklayerwiththelogicaladdressofthedestination.Thenetworklayerfindsthe hierarchicaladdressofthehierarchicaladdressofthedestinationsLMSfromitsLMSandthen sendsthepackettoit.ThedestinationsLMSforwardsthepackettothedestination.Oncethe sourceanddestinationknoweachothershierarchicaladdresses,theycanbypasstheLMSand communicatedirectly.Sincelogicaladdress/hierarchicaladdressisusedforrouting,itisadaptable tonetworkchanges.

ZonebasedHierarchicalLinkStateRoutingProtocol
InZonebasedHierarchicalLinkStateRoutingProtocol(ZHLS),thenetworkisdividedintonon overlappingzones.Unlikeotherhierarchicalprotocols,thereisnozonehead.ZHLSdefinestwo levelsoftopologiesnodelevelandzonelevel.Anodeleveltopologytellshownodesofazoneare connectedtoeachotherphysically.Avirtuallinkbetweentwozonesexistsifatleastonenodeofa zoneisphysicallyconnectedtosomenodeoftheotherzone.Zoneleveltopologytellshowzones areconnectedtogether.TherearetwotypesofLinkStatePackets(LSP)aswellnodeLSPand zoneLSP.AnodeLSPofanodecontainsitsneighbornodeinformationandispropagatedwiththe zonewhereasazoneLSPcontainsthezoneinformationandispropagatedglobally.Soeachnode has full node connectivity knowledge about the nodes in its zone and only zone connectivity informationaboutotherzonesinthenetwork.Sogiventhezoneidandthenodeidofadestination, thepacketisroutedbasedonthezoneidtillitreachesthecorrectzone.Theninthatzone,itis routedbasedonnodeid.A<zoneid,nodeid@gt;ofthedestinationissufficientforroutingsoitis adaptabletochangingtopologies.

ClusterheadGatewaySwitchRoutingProtocol
Themobilenodesareaggregatedintoclustersandaclusterheadiselected.Allnodesthatareinthe communicationrangeoftheclusterheadbelongtoitscluster.Agatewaynodeisanodethatisin thecommunicationrangeoftwoormoreclusterheads.Inadynamicnetworkclusterheadscheme cancauseperformancedegradationduetofrequentclusterheadelections,soCGSRusesaLeast ClusterChange(LCC)algorithm.InLCC,clusterheadchangeoccursonlyifachangeinnetwork causestwoclusterheadstocomeintooneclusteroroneofthenodesmovesoutoftherangeofall theclusterheads. Thegeneralalgorithmworksinthefollowingmanner.Thesourceofthepackettransmitsthepacket toitsclusterhead.Fromthisclusterhead,thepacketissenttothegatewaynodethatconnectsthis clusterheadandthenextclusterheadalongtheroutetothedestination.Thegatewaysendsittothat clusterheadandsoontillthedestinationclusterheadisreachedinthisway.Thedestinationcluster headthentransmitsthepackettothedestination.Figure3showsanexampleofCGSRrouting scheme.

ExampleofCGSRroutingfromnode1tonode12 Eachnodemaintainsaclustermembertablethathasmappingfromeachnodetoitsrespective clusterhead.Eachnodebroadcastsitsclustermembertableperiodicallyandupdatesitstableafter receiving other nodes broadcasts using the DSDV algorithm. In addition, each node also maintainsaroutingtablethatdeterminesthenexthoptoreachthedestinationcluster. On receiving a packet,a node finds the nearestclusterhead along the route tothe destination accordingtotheclustermembertableandtheroutingtable.Thenitconsultsitsroutingtabletofind thenexthopinordertoreachtheclusterheadselectedinsteponeandtransmitsthepackettothat node.

OnDemandRoutingProtocols
Theseprotocolstakealazyapproachtorouting.Incontrasttotabledrivenroutingprotocolsallup todateroutesarenotmaintainedateverynode,insteadtheroutesarecreatedasandwhenrequired. Whenasourcewantstosendtoadestination,itinvokestheroutediscoverymechanismstofindthe

pathtothedestination.Therouteremainsvalidtillthedestinationisreachableoruntiltherouteis nolongerneeded.Thissectiondiscussesafewondemandroutingprotocols.

ClusterbasedRoutingProtocols
To form the cluster the following algorithm is used. When a node comes up, it enters the "undecided"state,startsatimerandbroadcastsaHellomessage.Whenaclusterheadgetsthishello messageitrespondswithatriggeredhellomessageimmediately.Whentheundecidednodegetsthis messageitsetsitsstateto"member".Iftheundecidednodetimesout,thenitmakesitselfthe clusterheadifithasbidirectionallinktosomeneighborotherwiseitremainsinundecidedstate andrepeatstheprocedureagain.Clusterheadsarechangedasinfrequentlyaspossible. Eachnodemaintainsaneighbortable.Foreachneighbor,theneighbortableofanodecontainsthe statusofthelink(uniorbidirectional)andthestateoftheneighbor(clusterheadormember).A clusterhead keeps information about the members of its cluster and also maintains a cluster adjacencytablethatcontainsinformationabouttheneighboringclusters.Foreachneighborcluster, thetablehasentrythatcontainsthegatewaythroughwhichtheclustercanbereachedandthe clusterheadofthecluster. Whenasourcehastosenddatatodestination,itfloodsrouterequestpackets(butonlytothe neighboringclusterheads).Onreceivingtherequestaclusterheadcheckstoseeifthedestinationis initscluster.Ifyes,thenitsendstherequestdirectlytothedestinationelseitsendsittoallits adjacentclusterheads.Theclusterheadsaddressisrecordedinthepacketsoaclusterheaddiscards arequestpacketthatithasalreadyseen.Whenthedestinationreceivestherequestpacket,itreplies backwiththeroutethathadbeenrecordedintherequestpacket.Ifthesourcedoesnotreceivea replywithinatimeperiod,itbacksoffexponentiallybeforetryingtosendrouterequestagain. InCBRP,routingisdoneusingsourcerouting.Italsousesrouteshorteningthatisonreceivinga sourceroutepacket,thenodetriestofindthefarthestnodeintheroutethatisitsneighbor(this couldhavehappenedduetoatopologychange)andsendsthepackettothatnodethusreducingthe route.Whileforwardingthepacketifanodedetectsabrokenlinkitsendsbackanerrormessageto thesourceandthenuseslocalrepairmechanism.Inlocalrepairmechanism,whenanodefindsthe nexthopisunreachable,itcheckstoseeifthenexthopcanbereachedthroughanyofitsneighbor orifhopafternexthopcanbereachedthroughanyotherneighbor.Ifanyofthetwoworks,the packetcanbesentoutovertherepairedpath.

AdhocOndemandDistanceVectorRouting
Tofindapathtothedestination,thesourcebroadcastsarouterequestpacket.Theneighborsinturn broadcastthepackettotheirneighborstillitreachesanintermediatenodethathasarecentroute informationaboutthedestinationortillitreachesthedestination(Figure4a).Anodediscardsa routerequestpacketthatithasalreadyseen.Therouterequestpacketusessequencenumbersto ensurethattheroutesareloopfreeandtomakesurethatiftheintermediatenodesreplytoroute requests,theyreplywiththelatestinformationonly. Whenanodeforwardsarouterequestpackettoitsneighbors,italsorecordsinitstablesthenode fromwhichthefirstcopyoftherequestcame.Thisinformationisusedtoconstructthereversepath fortheroutereplypacket.AODVusesonlysymmetriclinksbecausetheroutereplypacketfollows thereversepathofrouterequestpacket.Astheroutereplypackettraversesbacktothesource (Figure4b),thenodesalongthepathentertheforwardrouteintotheirtables. If the source moves then it can reinitiate route discovery to the destination. If one of the

intermediatenodesmovethenthemovednodesneighborrealizesthelinkfailureandsendsalink failurenotificationtoitsupstreamneighborsandsoontillitreachesthesourceuponwhichthe sourcecanreinitiateroutediscoveryifneeded.

RoutediscoveryinAODV

DynamicSourceRoutingProtocol
Thetwomajorphasesoftheprotocolare:routediscoveryandroutemaintenance.Whenthesource nodewantstosendapackettoadestination,itlooksupitsroutecachetodetermineifitalready containsaroutetothedestination.Ifitfindsthatanunexpiredroutetothedestinationexists,thenit usesthisroutetosendthepacket.Butifthenodedoesnothavesucharoute,thenitinitiatesthe routediscoveryprocessbybroadcastingarouterequestpacket.Therouterequestpacketcontains theaddressofthesourceandthedestination,andauniqueidentificationnumber.Eachintermediate nodecheckswhetheritknowsofaroutetothedestination.Ifitdoesnot,itappendsitsaddressto therouterecordofthepacketandforwardsthepackettoitsneighbors.Tolimitthenumberofroute requestspropagated,anodeprocessestherouterequestpacketonlyifithasnotalreadyseenthe packetandit'saddressisnotpresentintherouterecordofthepacket. A route reply is generated when either the destination or an intermediate node with current informationaboutthedestinationreceivestherouterequestpacketArouterequestpacketreaching suchanodealreadycontains,initsrouterecord,thesequenceofhopstakenfromthesourcetothis node.

Figure5.CreationofrecordrouteinDSRP Astherouterequestpacketpropagatesthroughthenetwork,therouterecordisformedasshownin figure5a.Iftheroutereplyisgeneratedbythedestinationthenitplacestherouterecordfromroute requestpacketintotheroutereplypacket.Ontheotherhand,ifthenodegeneratingtheroutereply isanintermediatenodethenitappendsitscachedroutetodestinationtotherouterecordofroute requestpacketandputsthatintotheroutereplypacket.Figure5bshowstheroutereplypacketbeing sentbythedestinationitself.Tosendtheroutereplypacket,therespondingnodemusthavearoute tothesource.Ifithasaroutetothesourceinitsroutecache,itcanusethatroute.Thereverseof route record can be used if symmetric links are supported. In case symmetric links are not supported,thenodecaninitiateroutediscoverytosourceandpiggybacktheroutereplyonthisnew routerequest. DSRP uses two types of packets for route maintenance: Route Error packet and Acknowledgements.Whenanodeencountersafataltransmissionproblematitsdatalinklayer,it generatesaRouteErrorpacket.Whenanodereceivesarouteerrorpacket,itremovesthehopin errorfromit'sroutecache.Allroutesthatcontainthehopinerrorarearetruncatedatthatpoint. Acknowledgment packets are used to verify the correct operation of the route links. This also includespassiveacknowledgmentsinwhichanodehearsthenexthopforwardingthepacketalong theroute.

TemporallyOrderedRoutingAlgorithm
TheTemporallyOrderedRoutingAlgorithm(TORA)isahighlyadaptive,efficientandscalable distributedroutingalgorithmbasedontheconceptoflinkreversal.TORAisproposedforhighly dynamicmobile,multihopwirelessnetworks.Itisasourceinitiatedondemandroutingprotocol.It findsmultipleroutesfromasourcenodetoadestinationnode.ThemainfeatureofTORAisthat thecontrolmessagesarelocalizedtoaverysmallsetofnodesneartheoccurrenceofatopological change.Toachievethis,thenodesmaintainroutinginformationaboutadjacentnodes.Theprotocol hasthreebasicfunctions:Routecreation,Routemaintenance,andRouteerasure. Eachnodehasaquintupleassociatedwithit Logicaltimeofalinkfailure TheuniqueIDofthenodethatdefinedthenewreferencelevel Areflectionindicatorbit Apropagationorderingparameter TheuniqueIDofthenode

Thefirstthreeelementscollectivelyrepresentthereferencelevel.Anewreferencelevelisdefined eachtimeanodelosesitslastdownstreamlinkduetoalinkfailure.Thelasttwovaluesdefinea deltawithrespecttothereferencelevel RouteCreationisdoneusingQRYandUPDpackets.Theroutecreationalgorithmstartswiththe height(propagationorderingparameterinthequintuple)ofdestinationsetto0andallothernode's heightset to NULL(i.e.undefined).ThesourcebroadcastsaQRYpacketwiththedestination node'sidinit.AnodewithanonNULLheightrespondswithaUPDpacketthathasitsheightinit. AnodereceivingaUPDpacketsetsitsheighttoonemorethanthatofthenodethatgeneratedthe UPD.Anodewithhigherheightisconsideredupstreamandanodewithlowerheightdownstream. Inthiswayadirectedacyclicgraphisconstructedfromsourcetothedestination.Figure6illustrates aroutecreationprocessinTORA.Asshowninfigure6a,node5doesnotpropagateQRYfrom node3asithasalreadyseenandpropagatedQRYmessagefromnode2.Infigure6b,thesource (i.e.node1)mayhavereceivedaUPDeachfromnode2ornode3butsincenode4givesitlesser height,itretainsthatheight.

RoutecreationinTORA.(Numbersinbracesarereferencelevel,heightofeachnode) WhenanodemovestheDAGrouteisbroken,androutemaintenanceisneededtoreestablishaDAG forthesamedestination.Whenthelastdownstreamlinkofanodefails,itgeneratesanewreference level.Thisresultsinthepropagationofthatreferencelevelbyneighboringnodesasshowninfigure 7.Linksarereversedtoreflectthechangeinadaptingtothenewreferencelevel.Thishasthesame effectasreversingthedirectionofoneormorelinkswhenanodehasnodownstreamlinks.

Reestablishingrouteonfailureoflink57.Thenewreferencelevelisnode5. Intherouteerasurephase,TORAfloodsabroadcastclearpacket(CLR)throughoutthenetworkto eraseinvalidroutes.

InTORAthereisapotentialforoscillationstooccur,especiallywhenmultiplesetsofcoordinating nodesareconcurrentlydetectingpartitions,erasingroutes,andbuildingnewroutesbasedoneach other.BecauseTORAusesinternodalcoordination,itsinstabilityproblemissimilartothe"count toinfinity"problemindistancevectorroutingprotocols,exceptthatsuchoscillationsaretemporary androuteconvergencewillultimatelyoccur.

AssociativityBasedRouting
ABRdefinesanewmetricforroutingknownasthedegreeofassociationstability.Itisfreefrom loops,deadlock,andpacketduplicates.InABR,arouteisselectedbasedonassociativitystatesof nodes.Theroutesthusselectedarelikedtobelonglived.Allnodegenerateperiodicbeaconsto signifyitsexistence.Whenaneighbornodereceivesabeacon,itupdatesitsassociativitytables.For everybeaconreceived,anodeincrementsitsassociativitytickwithrespecttothenodefromwhich itreceivedthebeacon.Associationstabilitymeansconnectionstabilityofonenodewithrespectto anothernodeovertimeandspace.Ahighvalueofassociativitytickwithrespecttoanodeindicates alowstateofnodemobility,whilealowvalueofassociativitytickmayindicateahighstateofnode mobility.Associativityticksareresetwhentheneighborsofanodeorthenodeitselfmoveoutof proximity. The fundamental objective of ABR is to find longerlived routes for ad hoc mobile networks.ThethreephasesofABRareRoutediscovery,Routereconstruction(RRC)andRoute deletion. Theroutediscoveryphaseisabroadcastqueryandawaitreply(BQREPLY)cycle.Thesource nodebroadcastsaBQmessageinsearchofnodesthathavearoutetothedestination.Anodedoes not forward a BQ request more than once. On receiving a BQ message, an intermediate node appendsitsaddressanditsassociativitytickstothequerypacket.Thenextsucceedingnodeerases itsupstreamnodeneighbors'associativitytickentriesandretainsonlytheentryconcernedwith itselfanditsupstreamnode.Eachpacketarrivingatthedestinationwillcontaintheassociativity ticksofthenodesalongtheroutefromsourcetothedestination.Thedestinationcannowselectthe bestroutebyexaminingtheassociativityticksalongeachofthepaths.Ifmultiplepathshavethe sameoveralldegreeofassociationstability,theroutewiththeminimumnumberofhopsisselected. Onceapathhasbeenchosen,thedestinationsendsaREPLYpacketbacktothesourcealongthis path.ThenodesonthepaththattheREPLYpacketfollowsmarktheirroutesasvalid.Allother routesremaininactive,thusavoidingthechanceofduplicatepacketsarrivingatthedestination. RRCphaseconsistsofpartialroutediscovery,invalidrouteerasure,validrouteupdates,andnew routediscovery,dependingonwhichnode(s)alongtheroutemove.Sourcenodemovementresults inanewBQREPLYprocessbecausetheroutingprotocolissourceinitiated.Theroutenotification (RN) message is used to erase the route entries associated with downstream nodes. When the destinationmoves,thedestination'simmediateupstreamnodeerasesitsroute.Alocalizedquery (LQ[H])process,whereHreferstothehopcountfromtheupstreamnodetothedestination,is initiatedtodetermineifthenodeisstillreachable.IfthedestinationreceivestheLQpacket,it selectsthebestpartialrouteandREPLYs;otherwise,theinitiatingnodetimesoutandbacktracksto thenextupstreamnode.AnRNmessageissenttothenextupstreamnodetoerasetheinvalidroute andinformthisnodethatitshouldinvoketheLQ[H]process.Ifthisprocessresultsinbacktracking morethanhalfwaytothesource,theLQprocessisdiscontinuedandthesourceinitiatesanewBQ process. When a discovered route is no longer needed, the source node initiates a route delete (RD) broadcast. All nodes along the route delete the route entry from their routing tables. The RD messageispropagatedbyafullbroadcast,asopposedtoadirectedbroadcast,becausethesource nodemaynotbeawareofanyroutenodechangesthatoccurredduringRRCs.

SignalStabilityRouting
.Thisrouteselectioncriterionhastheeffectofchoosingroutesthathave"stronger"connectivity. SSRcomprisesoftwocooperativeprotocols:theDynamicRoutingProtocol(DRP)andtheStatic RoutingProtocol(SRP). TheDRPmaintainstheSignalStabilityTable(SST)andRoutingTable(RT).TheSSTstoresthe signal strengthofneighboringnodesobtainedbyperiodicbeacons fromthelinklayerof each neighboringnode.Signalstrengthiseitherrecordedasastrongorweakchannel.Alltransmissions arereceivedbyDRPandprocessed.Afterupdatingtheappropriatetableentries,theDRPpassesthe packettotheSRP. The SRP passes the packet up the stack if it is the intended receiver. If not, it looks up the destinationintheRTandforwardsthepacket.IfthereisnoentryforthedestinationintheRT,it initiatesaroutesearchprocesstofindaroute.Routerequestpacketsareforwardedtothenexthop onlyiftheyarereceivedoverstrongchannelsandhavenotbeenpreviouslyprocessed(toavoid looping).Thedestinationchoosesthefirstarrivingroutesearchpackettosendbackasitishighly likelythatthepacketarrivedovertheshortestand/orleastcongestedpath.TheDRPreversesthe selectedrouteandsendsaroutereplymessagebacktotheinitiatorofrouterequest.TheDRPofthe nodesalongthepathupdatetheirRTsaccordingly. Routesearchpacketsarrivingatthedestinationhavenecessarilyarrivedonthepathofstrongest signalstabilitybecausethepacketsarrivingoveraweakchannelaredroppedatintermediatenodes. IfthesourcetimesoutbeforereceivingareplythenitchangesthePREFfieldintheheaderto indicatethatweakchannelsareacceptable,sincethesemaybetheonlylinksoverwhichthepacket canbepropagated. Whenalinkfailureisdetectedwithinthenetwork,theintermediatenodessendanerrormessageto thesourceindicatingwhichchannelhasfailed.Thesourcethensendsanerasemessagetonotifyall nodes of the broken link and initiates a new routesearch process to find a new path to the destination.

TCPoverwireless
TCPfunctionalities: Providesreliable,inorderdeliveryofpacketstoapplications. Incorporatesvariouscongestioncontrolandavoidancemechanisms. TCPistunedforwirednetworksinthesensethatpacketlossisassumedtobeduetocongestion only (because error rates in fixed or wired networks are negligible). This assumption fails in wirelessnetworksaserrorratesinwirelessnetworksmaybeanorderofmagnitudelargerthanin wirednetworks.Hence,whenpacketsaredroppedorcorruptedonthewirelesslink,thecongestion controlmechanismonthesenderkicksinandasaresult(ofreductionincongestionwindowsize) thethroughputdecreasesdrastically.

SolutionDesignIssues
Thefollowingtwoquestionsarerelevant: Whichpartofthenetworktoimplementthesolutionat?Sender,Receiver,wiredpartof thenetwork,wirelesspartofthenetwork,oranagent(asinthecaseofmobileIP) Whichlayertoimplementthesolutionat?MAClayer(makingwirelesslinkmorereliable

usinglinklevelACKs)oratTCPlayer(makingTCPawareofwirelesslosses)oratthe networklayer

AFundamentalQuestion
IsTCPtheappropriateprotocolmodelforwirelessnetworks? ApossiblesolutiontotheaboveproblemwouldbetodoawaywithTCPentirelyandreplaceby anothermodelforthewirelessnetwork.Thismayinvolveagatewaytoconnectwirelessnetworksto theInternet. However,itisarguedthatTCPisindeedtheappropriatemodelforwirelessnetworkstoo,asmost software(nowandalsointheforeseeablefuture)iswrittenforitandalsoTCP/IPenabledwireless networkswouldintegrateseamlesslyintotheInternet.OtherDesignAlternatives 1. SplitConnection:InIndirectTCP,twoTCPconnectionsexist,onebetweentheFixedHost (FH)inthewiredpartofthenetworkandthebasestationthatutilizesnormalTCPand anotherbetweentheMobileHost(MH)andthebasestationthatutilizeswirelessaware TCP.Thisisshowninthefollowingfigure:

Problemsinthisapproach: 1. BreaksendtoendsemanticsofTCP:Thebasestation(BS)maintainshardstateand ifitcrashes,TCPsemanticsarebroken. 2. Relinking:ApplicationsontheMHneedtoberelinkedagainstthewirelessaware TCP. 3. SoftwareOverhead:Eachpacketmovesthrough4TCPlayers(oneatsender,twoat BSandoneatreciever). 2. FastRetransmit:ToavoidwaitingfortimeoutstooccurontheTCPsender,ifitrecieves3 DUPACKsinsuccession,thesenderjustretransmitsthepacketwantedbythereciever.This schememayworkfavourablyduringtimesofhandoffi.e.whentheMHleavesonecelland joinsanother.However,itdoesn'tdirectlydealwithpacketlossonthewirelesslinksand severallostpacketsinthesameflightmaybringdownTCPthroughputconsiderably. 3. LinkLevelRetransmissions:Here,thewirelesslinklayeritselfmayprovidereliabilityby usingACKsofitsown.ButlinklevelACKtimeoutsmayinteractwithTCPtimeoutsandthe performancemaydegrade. TheSnoopProtocol Considerthecasewhendataistransferredfromasenderinthewiredpartofthenetworktoa recieverthatuseswirelessfor"lastmile"connectivity.ThefeaturesoftheSnoopprotocolare:

Weassumetohaveadministrativecontroloveronlythebasestationsandthemobilehosts. Hence,aprotocolthatrequiresneworchangeofsoftwareontheseentitiesonlyisdesirable. SnoopisanetworklayersolutionthatsnoopsonTCPtrafficbetweentheFixedHost(FH) senderandtheMobileHost(MH)recieveratthebasestation.Atnopointintheprotocol would we do anything other than dropping packets or duplicating packets (behaviour consistentwithInternetnetworklayersemantics). The network layer routing code (forwarding code, to be correct) at the base station is modified to add the snoop module that monitors all packets passing through the TCP connectionineitherdirection. The snoop module maintains a cache of all TCP packets sent by the FH and not yet acknowledgedbytheMH(thiswillhelpinlocalretransmissionswhichareinexpensivein comparisonwithretransmissionsfromtheFH). DUPACKsmaybeusedtodetectpacketlossonthewirelesslinkwhichwouldtriggerlocal retransmissions. Snoop will hide packet loss on the wireless link from the FH (by suppressingDUPACKsfrompropagatingtotheFHifitisestablishedthatthepacketloss wasnotduetocongestioninthewiredpartitself). snoop_data() Thesnoop_dataprocedureprocessesandcachespacketsfromtheFH: Case IncomingPacket Actions to case) cache

Newpacket,insequence(withsequence number>sequencenumberoflastpacket(Normal seen, Add need not be the very next sequence1. 2.ForwardtoMH number)

Outofsequencepacketthathasbeen (Rare case, occurs when dropped packets cause cachedearlier timeoutsatFH2subcasesarise) (If sequence number of this incoming packet > sequence number of last packet ACKed by MH) PacketisforwardedtoMH (If sequence number of this incoming packet < sequence number of last packetACKed by MH) MHalreadyrecievedthepacket.So,theFHmust have retransmitted because ACK must have been lost in the wired part of the network. HenceBSgeneratesandsendsanACKtoFH

(Thepacketwaslostearlierinthewirednetwork due to congestion or Out of sequence packet that has not wasdeliveredoutoforderbythewirednetwork) beencachedearlier 1. Mark as congestion (sender retransmission) 2.ForwardtoMH

snoop_ack() Thesnoop_ackprocedureprocessesACKscomingfromtheMHandtriggerslocalretransmissions fromthebasestationtoMHwheneverappropriate: Case IncomingAcknowledgement Actions (Normal case)

NewACK

1. Free appropriate buffers in cache 2.ForwardtoFH (SamesequencenumberasoflastACKseensofar3 subcasesarise) (For a packet not in cache or marked as sender retransmission in cache) Both these reasons require DUPACK to be propagatedtoFH(popquiz:why?) (First (unexpected) DUPACK for any packet in cache) 1.Localretransmissionwithhighpriorityseepaper for implementation details 2.Calculatemaxnumberof(expected)furtherDUP ACKs 3.And,ofcourse,suppresstheDUPACK (Further (expected) DUPACKs)

DUPACK

Aresuppressed 3 Spurious ACK (neither new ACK(Improbable norDUPACK) Justdiscard case)

You might also like