Computer Networks Network layer Network Layer q Design

  • Slides: 88
Download presentation
Computer Networks Network layer

Computer Networks Network layer

Network Layer q Design issues q Routing q Congestion q Internetworking q Internet Protocols

Network Layer q Design issues q Routing q Congestion q Internetworking q Internet Protocols q Multimedia or Qo. S Network layer -- May 2004

Design issues q Goal of layer: get packets from source host to destination host

Design issues q Goal of layer: get packets from source host to destination host o Routing: should know about topology of subnet o Congestion: should avoid overloading some communication lines and routers o Quality of service: offer the appropriate service o Internetworking: deal with network differences, if source and destination are connected to different networks Network layer -- May 2004

Design issues q Store-and-forward packet switching o Equipment of: carrier <> customer o Algorithm

Design issues q Store-and-forward packet switching o Equipment of: carrier <> customer o Algorithm at router • Receive packet • Check packet (e. g. checksum) • Forward packet Network layer -- May 2004

Design issues: services q Interface o Important: = interface between carrier and customer o

Design issues: services q Interface o Important: = interface between carrier and customer o Designed with following goals in mind: • Services should be independent of the subnet technology • Transport layer should be shielded from the number, type, topology of the subnets • Network addresses should use a uniform numbering plan, even across LANs and WANs q Connections? o Connection-oriented <> Connectionless! Network layer -- May 2004

Design issues: services q Connection-oriented <> Connectionless o PTTs: connection-oriented • • 100 years

Design issues: services q Connection-oriented <> Connectionless o PTTs: connection-oriented • • 100 years of experience with the world-wide telephone system Connection time billing! o Internet • Subnets are inherently unreliable o Real issue: where to put the complexity as some/many applications require reliable transfer (~ connectionoriented service) • • Network layer Transport layer Network layer -- May 2004

Design issues: services q Connection-oriented <> Connectionless o In favour of connectionless service •

Design issues: services q Connection-oriented <> Connectionless o In favour of connectionless service • • • (cont. ) Computing power is cheap: hosts can handle the complexity Subnet is a large, long lasting investment: keep it simple For some applications speedy delivery (low, constant delay) is important o In favour of connection-oriented service • • Users want a reliable trouble-free service Some services are easier to provide on top of connectionoriented service o Examples • • • ATM: connection oriented IP: connection-less IP on top of ATM Network layer -- May 2004

Design issues: services Network Layer Network layer -- May 2004

Design issues: services Network Layer Network layer -- May 2004

Design: internal organisation q Virtual circuits o Routes chosen at connection time o Connection

Design: internal organisation q Virtual circuits o Routes chosen at connection time o Connection identified by a virtual circuit number (VCn) o Primary service of subnet is connection-oriented Transport 4 7 Transport Network Data Link Physical Routing problem: map [Incoming line, VCn] [outgoing line, VCn] Network layer -- May 2004

Design: internal organisation q Virtual circuits Network layer -- May 2004

Design: internal organisation q Virtual circuits Network layer -- May 2004

Design: internal organisation q Datagram subnet o Each packet is routed independently o Subnet

Design: internal organisation q Datagram subnet o Each packet is routed independently o Subnet has more work to do o More robust, easier to adapt to failures and congestion Transport Network Data Link Physical Routing problem: map Destination address Outgoing line Network layer -- May 2004

Design: internal organisation q Datagram subnet Network layer -- May 2004

Design: internal organisation q Datagram subnet Network layer -- May 2004

Design: internal organisation q Datagram subnet Change of routing table Network layer -- May

Design: internal organisation q Datagram subnet Change of routing table Network layer -- May 2004

Design: internal organisation Issue Datagram subnet VC subnet Circuit setup Not needed required Addressing

Design: internal organisation Issue Datagram subnet VC subnet Circuit setup Not needed required Addressing Full addresses (source + destination) in each packet Short VC number in each packet State information No state held in subnet State held for each VC Routing Done for each packet independently Route chosen at connection setup Effect of router failures None, except for packet losses All VCs passing failed router are terminated Congestion control difficult Easy if enough buffers can be allocated in advance Network layer -- May 2004

Design: internal organisation Type of subnet Service to upper layer Datagram Virtual Circuit Connectionless

Design: internal organisation Type of subnet Service to upper layer Datagram Virtual Circuit Connectionless UDP IP ATM Connection-oriented TCP IP ATM AAL 1 ATM Network layer -- May 2004

Network Layer q Design issues q Routing q Congestion q Internetworking q Internet Protocols

Network Layer q Design issues q Routing q Congestion q Internetworking q Internet Protocols q Multimedia or Qos Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing Most important algorithms! q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Routing algorithms q Desirable properties o Correctness o Simplicity o Robustness: able to cope

Routing algorithms q Desirable properties o Correctness o Simplicity o Robustness: able to cope with • changes in topology, load • hardware and software failures o Stability • Converge to equilibrium o Fairness o Optimality } all } algorithms hard to achieve conflicting Network layer -- May 2004

Routing algorithms q Desirable properties (cont. ) o Fairness o Optimality Conflict! Network layer

Routing algorithms q Desirable properties (cont. ) o Fairness o Optimality Conflict! Network layer -- May 2004

Routing algorithms q Taxonomy o Non adaptive • Routing decisions computed in advance, off-line

Routing algorithms q Taxonomy o Non adaptive • Routing decisions computed in advance, off-line and downloaded o Adaptive • To changes in – Topology – Load • Get information – Locally – From adjacent routers – From all routers Network layer -- May 2004

Routing algorithms q Optimality principle Optimal path from I to K over J I

Routing algorithms q Optimality principle Optimal path from I to K over J I d 1 distance K d 2 d 1 + d 2 is minimal J d 3 Other path from J to K d 3 > d 2 Set of all optimal routes • from all sources as d 1 + d 3 > d 1 + d 2 • to a given destination is a tree: sink tree Network layer -- May 2004

Routing algorithms q Optimality principle: sink tree Destination Network layer -- May 2004

Routing algorithms q Optimality principle: sink tree Destination Network layer -- May 2004

Routing: shortest path q Algorithm of Dijkstra: shortest path in graph o Graph •

Routing: shortest path q Algorithm of Dijkstra: shortest path in graph o Graph • Node = router • Arc = communication line o Metric • Number of hops • Geographic distance • Mean queueing and transmission delay Network layer -- May 2004

Routing: shortest path Initial node Elements of algorithm: • Mark all nodes as free:

Routing: shortest path Initial node Elements of algorithm: • Mark all nodes as free: • Mark initial node as selected: • repeat till destination is selected: • Label all free nodes reachable from selected nodes with shortest distance to a selected node • Select free node with shortest distance to a selected node and mark it as selected Network layer -- May 2004

Routing: shortest path Network layer -- May 2004

Routing: shortest path Network layer -- May 2004

Routing: flooding q Every packet is sent out on every outgoing line except the

Routing: flooding q Every packet is sent out on every outgoing line except the one it arrived at Network layer -- May 2004

Routing: flooding q Every packet is sent out on every outgoing line except the

Routing: flooding q Every packet is sent out on every outgoing line except the one it arrived at Network layer -- May 2004

Routing: flooding q Every packet is sent out on every outgoing line except the

Routing: flooding q Every packet is sent out on every outgoing line except the one it arrived at Network layer -- May 2004

Routing: flooding q Every packet is sent out on every outgoing line except the

Routing: flooding q Every packet is sent out on every outgoing line except the one it arrived at Network layer -- May 2004

Routing: flooding q Every packet is sent out on every outgoing line except the

Routing: flooding q Every packet is sent out on every outgoing line except the one it arrived at q Duplicates!! How to limit? o Hop counter • Decrement in each router • Discard packet if counter is 0 • Initialisation? o Sequence number in packet • Avoid sending the same packet a second time • Keep in each router per source a list of packets already seen q Useful? Network layer -- May 2004

Routing: flooding q Every packet is sent out on every outgoing line except the

Routing: flooding q Every packet is sent out on every outgoing line except the one it arrived at q Sometimes useful o Robust algorithm: e. g. military applications o Broadcast o Comparison purposes: always shortest path q Selective flooding o Use only those lines that are going approximately in right direction o Still working? Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing Most important algorithms! q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Routing: distance vector q Adaptive algorithm o Exchange of info only with neighbours q

Routing: distance vector q Adaptive algorithm o Exchange of info only with neighbours q Data to be available in each router o Routing table: per destination • Distance • Outgoing line o Distance to all neighbours Network layer -- May 2004

Routing: distance vector Routing table for A To cost via A 0 - B

Routing: distance vector Routing table for A To cost via A 0 - B 12 B C 25 B D 40 B E 14 E F 23 E G 18 B H 17 J I 21 E J 9 J K 24 J L 29 J Network layer -- May 2004

Routing: distance vector q Algorithm o At each step within a router: • Get

Routing: distance vector q Algorithm o At each step within a router: • Get routing tables from neighbours • Compute distance to neighbours • Compute new routing table o Characteristics: • Iterative • Asynchronous • Distributed Network layer -- May 2004

Routing: distance vector Routing tables from Network layer -- May 2004

Routing: distance vector Routing tables from Network layer -- May 2004

Routing: distance vector Better? • Keep 4 tables (one for each neighbour) • Use

Routing: distance vector Better? • Keep 4 tables (one for each neighbour) • Use shortest path Network layer -- May 2004

Routing: distance vector q Distributed algorithm o Triggers: • Change in delay to neighbour

Routing: distance vector q Distributed algorithm o Triggers: • Change in delay to neighbour • Receive new table from neighbour o Update local tables o If changed: forward routing tables to neighbours q Asynchronous o Execution in lock step not required q Iterative o Stops? How fast are changes propagated? • Good news? • Bad news? Network layer -- May 2004

Routing: distance vector Good news: • A comes up again Only distances to A

Routing: distance vector Good news: • A comes up again Only distances to A Faster not possible!!! Network layer -- May 2004

Routing: distance vector Bad news: • A goes down B receives: • Distance from

Routing: distance vector Bad news: • A goes down B receives: • Distance from A • Distance 2 from C New distance from B to A: 3 via C Network layer -- May 2004

Routing: distance vector Bad news: • A goes down C still • believes its

Routing: distance vector Bad news: • A goes down C still • believes its distance to A is 2 LOOP!!! • routes via B B routes its packets for A via C Network layer -- May 2004

Routing: distance vector Bad news: • A goes down Loops!! Slow!! = 5? Network

Routing: distance vector Bad news: • A goes down Loops!! Slow!! = 5? Network layer -- May 2004

Routing: distance vector q Split horizon hack: o Lie to neighbour about distance if

Routing: distance vector q Split horizon hack: o Lie to neighbour about distance if routing via neighbour A B C 1 Faster not possible!! D 2 3 E 4 initially lie 2 3 4 1 iteration 3 4 2 iterations 4 3 iterations Network layer -- May 2004

Routing: distance vector q Split horizon hack: o Hack does not always work q

Routing: distance vector q Split horizon hack: o Hack does not always work q Example: o D goes down o A and B lie to C o A offers to B route to D o B offers to A route to D o Loops again!!! Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing Most important algorithms! q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Routing: link state q Each router must Overview of algorithm: o Discover its neighbours

Routing: link state q Each router must Overview of algorithm: o Discover its neighbours and learn their network addresses o Measure the delay or cost to each of its neighbours o Construct a packet with these distances o Send this packet to all other routers o Compute the shortest path to every other router Network layer -- May 2004

Routing: link state q Learning about neighbours: Algorithm: o Upon boot of router •

Routing: link state q Learning about neighbours: Algorithm: o Upon boot of router • Send HELLO packet on each point-to-point line • Routers are supposed to send reply with a globally unique name o LAN model Network layer -- May 2004

Routing: link state Algorithm: q Measuring line cost o Measure round-trip delay of HELLO

Routing: link state Algorithm: q Measuring line cost o Measure round-trip delay of HELLO Packet and its reply o Take load into account? Arguments both ways: Yes! preference for unloaded line No! oscillations are possible Network layer -- May 2004

Routing: link state q Building link state packets o Packet containing: Algorithm: o When

Routing: link state q Building link state packets o Packet containing: Algorithm: o When to build? • periodically • Identity of sender • Sequence number + age • when significant events occur • For each neighbour: name + distance Network layer -- May 2004

Routing: link state Algorithm: q Distributing link state packets o Trickiest part of algorithm

Routing: link state Algorithm: q Distributing link state packets o Trickiest part of algorithm • Arrival time for packets different • How to keep consistent routing tables o Basic algorithm • Flooding + • Sequence number (in each packet) to limit duplicates o Manageable problems • Wrap around of sequence numbers: 32 bits + 1 packet/sec 137 years • Wrong sequence number used: Age in each packet: – lost in case of crash • Decremented during flooding, while used in router – Corruption • Age 0 info discarded Network layer -- May 2004

Routing: link state q Distributing link state packets o Basic algorithm o Manageable problems

Routing: link state q Distributing link state packets o Basic algorithm o Manageable problems o Refinements • Link state packets are not forwarded immediately • During holding time: – duplicates are discarded – Old packets are thrown out Network layer -- May 2004 Algorithm:

Network Layer Packet buffer for router B o ACK flag: ACK to send o

Network Layer Packet buffer for router B o ACK flag: ACK to send o Send flag: packet to forward Network layer -- May 2004

Routing: link state q Computing new routes: Algorithm: o With a full set of

Routing: link state q Computing new routes: Algorithm: o With a full set of link state packets, a router can: • Construct the entire subnet graph • Run Dijkstra’s algorithm to compute the shortest path to each destination o Problems for large subnets • Memory to store data • Compute time Network layer -- May 2004

Routing: link state q Usage: o IS-IS protocol • Designed for DECnet, adopted by

Routing: link state q Usage: o IS-IS protocol • Designed for DECnet, adopted by ISO • In use also in Internet • Supports multiple network layer protocols o OSPF protocol used in Internet o Common features: • Self-stabilizing method of flooding link state updates • Concept of a designated router on a LAN • Method of computing and supporting path splitting and multiple metrics Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Hierarchical routing q When network size increases… o Larger stables o More CPU time

Hierarchical routing q When network size increases… o Larger stables o More CPU time needed to compute … o More bandwidth needed Network layer -- May 2004 56

Hierarchical routing q Solution? Network layer -- May 2004 57

Hierarchical routing q Solution? Network layer -- May 2004 57

Hierarchical routing q Routers grouped in regions q Each routers knows how to +

Hierarchical routing q Routers grouped in regions q Each routers knows how to + Smaller tables reach: o Other routers in its own group o Other regions Network layer -- May 2004 - Longer paths 58

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Broadcast routing q Send message to all other hosts: o Update distributed database o

Broadcast routing q Send message to all other hosts: o Update distributed database o Distribute weather reports o Distribute live radio/TV programs q Poor methods: o Send a distinct packet to each destination • List of addresses needed • High usage of bandwidth o Flooding • Too many packets o Multidestination routing • Each packet contains a list of destination • On each line a single packet Network layer -- May 2004 60

Broadcast routing q Best method: use sink tree Broadcast source = root of sink

Broadcast routing q Best method: use sink tree Broadcast source = root of sink tree o Forwarding on sink tree lines o Excellent use of bandwidth o Source tree must be known at each intermediate node o Which sink tree? How many sink trees? Network layer -- May 2004 61

Broadcast routing q Sink tree approximation: reverse path forwarding if a packet arrives on

Broadcast routing q Sink tree approximation: reverse path forwarding if a packet arrives on line used for traffic to source of broadcast then forward packet on all lines, except the one it arrived on else discard packet Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Multicast routing q Send a message to a well- defined group o Large in

Multicast routing q Send a message to a well- defined group o Large in size o Small compared to network as a whole How will routers know about groups? q Group management o Create and destroy groups o Process can leave and join a group q algorithm Network layer -- May 2004 64

Multicast routing source q Algorithm o Source computes spanning tree o Remove lines that

Multicast routing source q Algorithm o Source computes spanning tree o Remove lines that do not lead to hosts of group ( = pruning) q Pruning: o Link state routing • Each router knows full topology o Distance vector routing • Reverse path forwarding + • PRUNE messages to remove arcs Network layer -- May 2004 65

Multicast routing source q Pruning: o Link state routing • Each router knows full

Multicast routing source q Pruning: o Link state routing • Each router knows full topology o Distance vector routing • Reverse path forwarding + • PRUNE messages to remove arcs Network layer -- May 2004 66

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Routing for Mobile Hosts q Model of world: WAN + LANs, wireless cells q

Routing for Mobile Hosts q Model of world: WAN + LANs, wireless cells q Migratory users q Roaming users o Move from time to time o Use network when connected o Compute on the run o Maintain connections as they move around Network layer -- May 2004

Routing for Mobile Hosts q Foreign agent: keeps track of users: q Home agent:

Routing for Mobile Hosts q Foreign agent: keeps track of users: q Home agent: keeps track of users o who are currently visiting the area o whose home is in the area o who are currently visiting another area Permanent home location Permanent home address Network layer -- May 2004 69

Routing for Mobile Hosts q How does it work? o Registration procedure with foreign

Routing for Mobile Hosts q How does it work? o Registration procedure with foreign agents o Sending packets o Leaving an area q Registration procedure with foreign agent o Announcing existence of foreign agent • Broadcast by foreign agent • Broadcast query by arriving mobile user o Mobile user gives to foreign agent • Home address • Current data link address • Security information o Foreign agent contacts home agent of user Network layer -- May 2004

Routing for Mobile Hosts q Registration procedure with foreign agent (cont. ) o Announcing

Routing for Mobile Hosts q Registration procedure with foreign agent (cont. ) o Announcing existence of foreign agent o Mobile user gives to foreign agent o Foreign agent contacts home agent of user • Identity of user • Security info • Network address of foreign agent o Home agent • Checks security info • Sends ack to foreign agent o Foreign agent • Stores state • Informs mobile user Network layer -- May 2004

Routing for Mobile Hosts q Sending a packet to a mobile user o Home

Routing for Mobile Hosts q Sending a packet to a mobile user o Home address is used packet routed to home LAN o Packet intercepted by home agent address of user address of home agent! o Packet forwarded to the foreign agent • Encapsulation – tunneling o Foreign agent forwards packet to mobile user • Which protocol, address used? o Sender is given address of foreign agent • Encapsulation – tunneling used, required? Network layer -- May 2004

Routing for Mobile Hosts Home agent Foreign agent Network layer -- May 2004

Routing for Mobile Hosts Home agent Foreign agent Network layer -- May 2004

Routing for Mobile Hosts q Leaving an area o Announced by user deregistration o

Routing for Mobile Hosts q Leaving an area o Announced by user deregistration o Automatic detection by foreign agent q Various different schemes: o Protocol carried out by routers or hosts o Routers along the way intercept and redirect traffic o Visitor gets temporary address to off-load foreign agent o Modify original packet instead of encapsulation o Security aspects: authentication? Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Routing in Ad Hoc Networks q Ad Hoc Network = routers are mobile o

Routing in Ad Hoc Networks q Ad Hoc Network = routers are mobile o No fixed topologies o No fixed or known neighbors o Valid paths can disappear at any time o Node = router + host o Routing quite different from routing in wired networks q Examples o Military vehicles on a battlefield o Fleet of ships at see o People with notebooks (lacking 802. 11) q AODV = Ad hoc On-demand distance vector routing o On-demand: route computed when needed o Distance vector for mobile world o Taking into account limited bandwidth + low battery life Network layer -- May 2004

Routing in Ad Hoc Networks q Graph presentation o Node o Arc = nodes

Routing in Ad Hoc Networks q Graph presentation o Node o Arc = nodes connected can communicate directly by radio q Routing table: o Line for known routes o Can be valid or invalid q A wants to send a packet o To H: forward to D o To I: start route discovery broadcasting a route request packet Dest Next hop B B 1 … C B 2 … H D 3 … Network layer -- May 2004 Distance Other fields 77

Routing in Ad Hoc Networks q Route request packet: v Source & destination address:

Routing in Ad Hoc Networks q Route request packet: v Source & destination address: e. g. IP address v Request ID: • local counter incremented for each new route request packet broadcasted • allows to discard duplicate requests at other nodes v Source sequence # • counter to distinguish old routes to destination from new ones v Destination sequence # • most recent sequence counter of destination seen by source Network layer -- May 2004

Routing in Ad Hoc Networks q Processing a route request packet o duplicate request?

Routing in Ad Hoc Networks q Processing a route request packet o duplicate request? • Yes: discard o Fresh route to destination known? • Fresh = local destination sequence # >= destination sequence # in request • Yes: send route reply packet o No fresh route to destination is known! • Store info from route request in reverse route table; to enable the forwarding of route reply packets • Increment hop count • Rebroadcast route request Network layer -- May 2004

Routing in Ad Hoc Networks q Processing a route request packet o Duplicate request?

Routing in Ad Hoc Networks q Processing a route request packet o Duplicate request? o Fresh route to destination known? o No fresh route to destination is known! Network layer -- May 2004

Routing in Ad Hoc Networks q Processing a route request packet o Duplicate request?

Routing in Ad Hoc Networks q Processing a route request packet o Duplicate request? o Fresh route to destination known? o No fresh route to destination is known! (a) Range of A's broadcast. o (b) After B and D have received A's broadcast. o (c) After C, F, and G have received A's broadcast. o (d) After E, H, and I have received A's broadcast. Shaded nodes are new recipients. Arrows show possible reverse routes. o Network layer -- May 2004

Routing in Ad Hoc Networks q Route reply packet o Returned by • Intermediate

Routing in Ad Hoc Networks q Route reply packet o Returned by • Intermediate node knowing a fresh route • Destination node v Destination sequence# o Number known by sender of reply packet v Hop count o Set to length of path known by sender of reply packet o For destination = 0 Network layer -- May 2004

Routing in Ad Hoc Networks q Route maintenance o Detect that neighbors are not

Routing in Ad Hoc Networks q Route maintenance o Detect that neighbors are not reachable anymore • Broadcast Hello packet periodically • Failure to send packet o Cleanup routing table o Additional field in routing table: active neighbor • Nodes that have offered path to destination in recent past Network layer -- May 2004

Routing in Ad Hoc Networks q Route maintenance G o Routing table of D

Routing in Ad Hoc Networks q Route maintenance G o Routing table of D Node G goes down! Network layer -- May 2004

Routing in Ad Hoc Networks q Route maintenance o New routing table of D:

Routing in Ad Hoc Networks q Route maintenance o New routing table of D: • Delete routes with G as next hop • Delete G as active neigbor Network layer -- May 2004

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing

Routing Algorithms q Properties q Shortest Path Routing q Flooding q Distance Vector Routing q Link State routing q Hierarchical routing q Broadcast routing q Multicast routing q Routing for mobile hosts q Routing in Ad Hoc Networks q Node Lookup in Peer-to-Peer Networks Network layer -- May 2004

Peer-to-Peer Networks q Peer-to-Peer network Large a number of users How o can user

Peer-to-Peer Networks q Peer-to-Peer network Large a number of users How o can user find a node that o Usuallythe permanent wired contains info heconnections is looking for, o In contact to shareof resources in the absence a centralized database orfeatures even a centralized index? q Interesting o o o Totally distributed Symmetric Distributed storage system! No central control or hierarchy Users will not know each other Routing? Users will not know where to find what they are looking for Network layer -- May 2004

Computer Networks Network layer

Computer Networks Network layer