Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

Similar documents
Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

Chapter 4: Network Layer, partb

Chapter 4: Network Layer

Chapter 4 Network Layer

Chapter IV: Network Layer

Chapter 4: outline. Network Layer 4-1

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

Chapter 4: Network Layer

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

DATA COMMUNICATOIN NETWORKING

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 5 Network Layer: The Control Plane

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

Network layer: Overview. Network layer functions Routing IP Forwarding

Topics for This Week

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

CSC 4900 Computer Networks: Routing Protocols

Chapter 4: Network Layer: Part II

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Computer Networking Introduction

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 4: Network Layer

Routing in the Internet

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Chapter 4: Network Layer

Chapter 4 Network Layer. Network Layer 4-1

CSC 401 Data and Computer Communications Networks

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

Inter-AS routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley

CSC 4900 Computer Networks: Routing Algorithms

Network layer functions

CSCI Topics: Internet Programming Fall 2008

Network Layer: Routing

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

Lecture 9. Network Layer (cont d) Network Layer 1-1

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CSc 450/550 Computer Networks Internet Routing

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

EE 122: Intra-domain routing

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

UNIT III THE NETWORK LAYER

Chapter 4 Network Layer

DATA COMMUNICATOIN NETWORKING

COMP211 Chapter 5 Network Layer: The Control Plane

CSC 8560 Computer Networks: Control Plane

Lecture 4. The Network Layer (cont d)

Module 3 Network Layer CS755! 3-1!

HY 335 Φροντιστήριο 8 ο

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

Chapter 4: Network Layer

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

Routing. Jens A Andersson Communication Systems

Lecture 19: Network Layer Routing in the Internet

RSC Part II: Network Layer 3. IP addressing (2nd part)

CSCE 463/612 Networks and Distributed Processing Spring 2017

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Inter-AS routing and BGP. Network Layer 4-1

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

Interplay between routing, forwarding

Network service model. Network service model. Network Layer (part 1) Virtual circuits. By the end of this lecture, you should be able to.

Routing Unicast routing protocols

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

Last time. BGP policy. Broadcast / multicast routing. Link virtualization. Spanning trees. Reverse path forwarding, pruning Tunneling

Routing Algorithm Classification. A Link-State Routing Algorithm

Routing. Outline. Algorithms Scalability

Department of Computer and IT Engineering University of Kurdistan. Computer Networks II Border Gateway protocol (BGP) By: Dr. Alireza Abdollahpouri

internet technologies and standards

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

Chapter 4 Network Layer: The Data Plane

Dynamic Routing. The Protocols

Computer Networks. Instructor: Niklas Carlsson

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Summary Chapter 4. Smith College, CSC 249 March 2, q IP Addressing. q DHCP dynamic addressing

Department of Computer Science Southern Illinois University Carbondale

Lecture 17: Network Layer Addressing, Control Plane, and Routing

Network Layer II. Getting IP addresses. DHCP client-server scenario. DHCP client-server scenario. C compiler. You writing assignment 2

Computer Networking Introduction

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer. Chapter goals:

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Chapter IV: Network Layer

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

CS 457 Networking and the Internet. The Global Internet (Then) The Global Internet (And Now) 10/4/16. Fall 2016

Chapter 4 Network Layer

The Internet network layer

Network Layer: Control Plane 5-2

Data Communications & Networks. Session 7 Main Theme Networks: Part II Circuit Switching, Packet Switching, The Network Layer

Why dynamic route? (1)

CS118 Discussion 1A, Week 7. Zengwen Yuan Dodd Hall 78, Friday 10:00 11:50 a.m.

Router Architecture Overview

Transcription:

Network Layer: Routing A note on the use of these ppt slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 996-00 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach Featuring the Internet, nd edition. Jim Kurose, Keith Ross Addison-Wesley, July 00. Network Layer 4- Routing Routing protocol Goal: determine good path (sequence of routers) thru from source to dest. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links link cost: delay, $ cost, or congestion level A 5 B D 3 3 good path: C E typically means minimum cost path other def s possible 5 F Network Layer 4-

Routing Algorithm classification Global or decentralized information? Global: all routers have complete topology, link cost info link state algorithms Decentralized: router knows physicallyconnected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors distance vector algorithms Static or dynamic? Static: routes change slowly over time Dynamic: routes change more quickly periodic update in response to link cost changes Network Layer 4-3 A Link-State Routing Algorithm Dijkstra s algorithm net topology, link costs known to all nodes accomplished via link state broadcast all nodes have same info computes least cost paths from one node ( source ) to all other nodes gives routing table for that node iterative: after k iterations, know least cost path to k dest. s Notation: c(i,j): link cost from node i to j. cost infinite if not direct neighbors D(v): current value of cost of path from source to dest. V p(v): predecessor node along path from source to v, that is next v N: set of nodes whose least cost path definitively known Network Layer 4-4

Dijsktra s Algorithm Initialization: N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(a,v) 6 else D(v) = infinity 7 8 Loop 9 find w not in N such that D(w) is a minimum 0 add w to N update D(v) for all v adjacent to w and not in N: D(v) = min( D(v), D(w) + c(w,v) ) 3 /* new cost to v is either old cost to v or known 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N Network Layer 4-5 Dijkstra s algorithm: example Step 0 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B),A,A,A D(C),p(C) 5,A 4,D 3,E 3,E D(D),p(D),A D(E),p(E) infinity,d D(F),p(F) infinity infinity 4,E 4,E 4,E 5 A B D 3 3 C E 5 F Network Layer 4-6 3

Dijkstra s algorithm, discussion Algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n*(n+)/ comparisons: O(n**) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic A +e D 0 0 B 0 e C e Network Layer 4-7 Distance Vector Routing Algorithm iterative: continues until no nodes exchange info. self-terminating: no signal to stop asynchronous: nodes need not exchange info/iterate in lock step! distributed: each node communicates only with directly-attached neighbors Distance Table data structure each node has its own row for each possible destination column for each directly-attached neighbor to node example: in node X, for dest. Y via neighbor Z: X D (Y,Z) = = distance from X to Y, via Z as next hop Z c(x,z) + min {D (Y,w)} w Network Layer 4-8 4

Distance Table: example A 7 E D (C,D) E D (A,D) E D (A,B) B E 8 C D D = c(e,d) + min {D (C,w)} w = + = 4 D = c(e,d) + min {D (A,w)} w = +3 = 5 loop! B = c(e,b) + min {D (A,w)} w = 8+6 = 4 loop! destination E D () A B C D cost to destination via A 7 6 4 B 4 8 9 D 5 5 4 Network Layer 4-9 Distance Vector Algorithm: example X Y 7 Z Network Layer 4-0 5

Distance Vector Algorithm: example X Y 7 Z X D (Y,Z) Z = c(x,z) + min {D (Y,w)} w = 7+ = 8 X D (Z,Y) Y = c(x,y) + min {D (Z,w)} w = + = 3 Network Layer 4- Distance Vector: link cost changes Link cost changes: node detects local link cost change updates distance table (line 5) if cost change in least cost path, notify neighbors (lines 3,4) 4 X Y 50 Z good news travels fast algorithm terminates Network Layer 4-6

Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slow - count to infinity problem! 60 4 X Y 50 Z algorithm continues on! Network Layer 4-3 Distance Vector: poisoned reverse If Z routes through Y to get to X : Z tells Y its (Z s) distance to X is infinite (so Y won t route to X via Z) will this completely solve count to infinity problem? 60 4 X Y 50 Z algorithm terminates Network Layer 4-4 7

Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) msgs sent each DV: exchange between neighbors only convergence time varies Speed of Convergence LS: O(n ) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node s table used by others error propagate thru Network Layer 4-5 Hierarchical Routing Our routing study thus far - idealization all routers identical flat not true in practice scale: with 00 million destinations: can t store all dest s in routing tables! routing table exchange would swamp links! administrative autonomy internet = of s each admin may want to control routing in its own Network Layer 4-6 8

Hierarchical Routing aggregate routers into regions, autonomous systems (AS) routers in same AS run same routing protocol intra-as routing protocol routers in different AS can run different intra-as routing protocol gateway routers special routers in AS run intra-as routing protocol with all other routers in AS also responsible for routing to destinations outside AS run inter-as routing protocol with other gateway routers Network Layer 4-7 Intra-AS and Inter-AS routing a C.b b C d A A.a a b A.c c B.a a B c Gateways: perform inter-as routing amongst themselves b perform intra-as routers with other routers in their AS inter-as, intra-as routing in gateway A.c layer link layer physical layer Network Layer 4-8 9

Intra-AS and Inter-AS routing a Host h C C.b b A.a Inter-AS routing between A and B A.c a d A b c Intra-AS routing within AS A B.a a B c b Host h Intra-AS routing within AS B We ll examine specific inter-as and intra-as Internet routing protocols shortly Network Layer 4-9 Routing in the Internet The Global Internet consists of Autonomous Systems (AS) interconnected with each other: Stub AS: small corporation: one connection to other AS s Multihomed AS: large corporation (no transit): multiple connections to other AS s Transit AS: provider, hooking many AS s together Two-level routing: Intra-AS: administrator responsible for choice of routing algorithm within Inter-AS: unique standard for inter-as routing: BGP Network Layer 4-0 0

Internet AS Hierarchy Inter-AS border (exterior gateway) routers Intra-AS interior (gateway) routers Network Layer 4- Intra-AS Routing Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gateway Routing Protocol (Cisco proprietary) Network Layer 4-

RIP ( Routing Information Protocol) Distance vector algorithm Included in BSD-UNIX Distribution in 98 Distance metric: # of hops (max = 5 hops) Can you guess why? Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement) Each advertisement: list of up to 5 destination nets within AS Network Layer 4-3 RIP: Example w x y A D B z C Destination Network Next Router Num. of hops to dest. w A y B z B 7 x --..... Routing table in D Network Layer 4-4

RIP: Example Dest Next hops w - - x - - z C 4.... Advertisement from A to D w x y A D B z C Destination Network Next Router Num. of hops to dest. w A y B z B A 7 5 x --..... Routing table in D Network Layer 4-5 RIP: Link Failure and Recovery If no advertisement heard after 80 sec --> neighbor/link declared dead routes via neighbor invalidated new advertisements sent to neighbors neighbors in turn send out new advertisements (if tables changed) link failure info quickly propagates to entire net poison reverse used to prevent ping-pong loops (infinite distance = 6 hops) Network Layer 4-6 3

RIP Table processing RIP routing tables managed by application-level process called route-d (daemon) advertisements sent in UDP packets, periodically repeated routed routed Transprt (UDP) (IP) link physical forwarding table forwarding table Transprt (UDP) (IP) link physical Network Layer 4-7 RIP Table example (continued) Router: giroflee.eurocom.fr Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 7.0.0. 7.0.0. UH 0 649 lo0 9.68.. 9.68..5 U 3 fa0 93.55.4. 93.55.4.6 U 3 58503 le0 9.68.3. 9.68.3.5 U 5 qaa0 4.0.0.0 93.55.4.6 U 3 0 le0 default 93.55.4.9 UG 0 43454 Three attached class C s (LANs) Router only knows routes to attached LANs Default router used to go up Route multicast address: 4.0.0.0 Loopback interface (for debugging) Network Layer 4-8 4

OSPF (Open Shortest Path First) open : publicly available Uses Link State algorithm LS packet dissemination Topology map at each node Route computation using Dijkstra s algorithm OSPF advertisement carries one entry per neighbor router Advertisements disseminated to entire AS (via flooding) Carried in OSPF messages directly over IP (rather than TCP or UDP Network Layer 4-9 OSPF advanced features (not in RIP) Security: all OSPF messages authenticated (to prevent malicious intrusion) Multiple same-cost paths allowed (only one path in RIP) For each link, multiple cost metrics for different TOS (e.g., satellite link cost set low for best effort; high for real time) Integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topology data base as OSPF Hierarchical OSPF in large domains. Network Layer 4-30 5

Hierarchical OSPF Network Layer 4-3 Hierarchical OSPF Two-level hierarchy: local area, backbone. Link-state advertisements only in area each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. Area border routers: summarize distances to nets in own area, advertise to other Area Border routers. Backbone routers: run OSPF routing limited to backbone. Boundary routers: connect to other AS s. Network Layer 4-3 6

Inter-AS routing in the Internet: BGP R4 R5 AS (RIP intra-as routing) R BGP R R3 BGP AS (OSPF intra-as routing) AS3 (OSPF intra-as routing) Figure 4.5.-new: BGP use for inter-domain routing Network Layer 4-33 Internet inter-as routing: BGP BGP (Border Gateway Protocol): the de facto standard Path Vector protocol: similar to Distance Vector protocol each Border Gateway broadcast to neighbors (peers) entire path (i.e., sequence of AS s) to destination BGP routes to s (ASs), not individual hosts E.g., Gateway X may send its path to dest. Z: Path (X,Z) = X,Y,Y,Y3,,Z Network Layer 4-34 7

Internet inter-as routing: BGP Suppose: gateway X send its path to peer gateway W W may or may not select path offered by X cost, policy (don t route via competitors AS), loop prevention reasons. If W selects path advertised by X, then: Path (W,Z) = w, Path (X,Z) Note: X can control incoming traffic by controlling it route advertisements to peers: e.g., don t want to route traffic to Z -> don t advertise any routes to Z Network Layer 4-35 BGP: controlling who routes to you W A B C X legend: provider customer : Y Figure 4.5-BGPnew: a simple BGP scenario A,B,C are provider s X,W,Y are customer (of provider s) X is dual-homed: attached to two s X does not want to route from B via X to C.. so X will not advertise to B a route to C Network Layer 4-36 8

BGP: controlling who routes to you W A B C X legend: provider customer : Y Figure 4.5-BGPnew: a simple BGP scenario A advertises to B the path AW B advertises to X the path BAW Should B advertise to C the path BAW? No way! B gets no revenue for routing CBAW since neither W nor C are B s customers B wants to force C to route to w via A B wants to route only to/from its customers! Network Layer 4-37 BGP operation Q: What does a BGP router do? Receiving and filtering route advertisements from directly attached neighbor(s). Route selection. To route to destination X, which path )of several advertised) will be taken? Sending route advertisements to neighbors. Network Layer 4-38 9

NAT: Network Address Translation rest of Internet local (e.g., home ) 0.0.0/4 0.0.0. 38.76.9.7 0.0.0.4 0.0.0. 0.0.0.3 All datagrams leaving local have same single source NAT IP address: 38.76.9.7, different source port numbers Datagrams with source or destination in this have 0.0.0/4 address for source, destination (as usual) Network Layer 4-39 NAT: Network Address Translation Motivation: local uses just one IP address as far as outside word is concerned: no need to be allocated range of addresses from ISP: - just one IP address is used for all devices can change addresses of devices in local without notifying outside world can change ISP without changing addresses of devices in local devices inside local net not explicitly addressable, visible by outside world (a security plus). Network Layer 4-40 0

NAT: Network Address Translation Implementation: NAT router must: outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr. remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table Network Layer 4-4 NAT: Network Address Translation : NAT router changes datagram source addr from 0.0.0., 3345 to 38.76.9.7, 500, updates table NAT translation table WAN side addr LAN side addr 38.76.9.7, 500 0.0.0., 3345 S: 38.76.9.7, 500 D: 8.9.40.86, 80 38.76.9.7 S: 8.9.40.86, 80 D: 38.76.9.7, 500 3 3: Reply arrives dest. address: 38.76.9.7, 500 0.0.0.4 S: 0.0.0., 3345 D: 8.9.40.86, 80 S: 8.9.40.86, 80 D: 0.0.0., 3345 4 : host 0.0.0. sends datagram to 8.9.40, 80 0.0.0. 0.0.0. 0.0.0.3 4: NAT router changes datagram dest addr from 38.76.9.7, 500 to 0.0.0., 3345 Network Layer 4-4

NAT: Network Address Translation 6-bit port-number field: 60,000 simultaneous connections with a single LAN-side address! NAT is controversial: routers should only process up to layer 3 violates end-to-end argument NAT possibility must be taken into account by app designers, e.g., PP applications address shortage should instead be solved by IPv6 Network Layer 4-43 Mobility: approaches Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange. routing tables indicate where each mobile located no changes to end-systems Let end-systems handle it: indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote direct routing: correspondent gets foreign address of mobile, sends directly to mobile Network Layer 4-44

Mobility: approaches Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence not via usual routing table exchange. scalable to millions of routing tables indicate mobiles where each mobile located no changes to end-systems let end-systems handle it: indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote direct routing: correspondent gets foreign address of mobile, sends directly to mobile Network Layer 4-45 Mobility: registration home visited wide area foreign agent contacts home agent home: this mobile is resident in my mobile contacts foreign agent on entering visited End result: Foreign agent knows about mobile Home agent knows location of mobile Network Layer 4-46 3

Mobility via Indirect Routing home correspondent addresses packets using home address of mobile home agent intercepts packets, forwards to foreign agent wide area foreign agent receives packets, forwards to mobile 4 3 visited mobile replies directly to correspondent Network Layer 4-47 Indirect Routing: comments Mobile uses two addresses: permanent address: used by correspondent (hence mobile location is transparent to correspondent) care-of-address: used by home agent to forward datagrams to mobile foreign agent functions may be done by mobile itself triangle routing: correspondent-home--mobile inefficient when correspondent, mobile are in same Network Layer 4-48 4

Forwarding datagrams to remote mobile foreign-agent-to-mobile packet packet sent by home agent to foreign agent: a packet within a packet dest: 8.9.40.86 dest: 79.9.3. dest: 8.9.40.86 Permanent address: 8.9.40.86 dest: 8.9.40.86 packet sent by correspondent Care-of address: 79.9.3. Network Layer 4-49 Indirect Routing: moving between s suppose mobile user moves to another registers with new foreign agent new foreign agent registers with home agent home agent update care-of-address for mobile packets continue to be forwarded to mobile (but with new care-of-address) Mobility, changing foreign s transparent: on going connections can be maintained! Network Layer 4-50 5

Mobility via Direct Routing correspondent forwards to foreign agent foreign agent receives packets, forwards to mobile visited home 4 correspondent requests, receives foreign address of mobile wide area 3 4 mobile replies directly to correspondent Network Layer 4-5 Mobility via Direct Routing: comments overcome triangle routing problem non-transparent to correspondent: correspondent must get care-of-address from home agent What happens if mobile changes s? Network Layer 4-5 6

Mobile IP RFC 30 has many features we ve seen: home agents, foreign agents, foreign-agent registration, care-of-addresses, encapsulation (packet-within-a-packet) three components to standard: agent discovery registration with home agent indirect routing of datagrams Network Layer 4-53 Mobile IP: agent discovery agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages (typefield = 9) 0 8 6 4 H,F bits: home and/or foreign agent type = 9 code = 0 = 9 router address checksum = 9 standard ICMP fields R bit: registration required type = 6 length sequence # registration lifetime RBHFMGV bits 0 or more care-ofaddresses reserved mobility agent advertisement extension Network Layer 4-54 7

Mobile IP: registration example home agent HA: 8.9.40.7 foreign agent COA: 79.9.3. ICMP agent adv. COA: 79.9.3.. visited : 79.9.3/4 Mobile agent MA: 8.9.40.86 registration req. COA: 79.9.3. HA: 8.9.40.7 MA: 8.9.40.86 Lifetime: 9999 identification: 74 encapsulation format. registration req. COA: 79.9.3. HA: 8.9.40.7 MA: 8.9.40.86 Lifetime: 9999 identification:74. registration reply time HA: 8.9.40.7 MA: 8.9.40.86 Lifetime: 4999 Identification: 74 encapsulation format. registration reply HA: 8.9.40.7 MA: 8.9.40.86 Lifetime: 4999 Identification: 74. Network Layer 4-55 DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from server when it joins Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an on Support for mobile users who want to join (more shortly) DHCP overview: host broadcasts DHCP discover msg DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg Network Layer 4-56 8

DHCP client-server scenario A 3... DHCP server 3... B 3... 3...4 3...9 3... 3...3 3..3.7 3..3. 3..3. E arriving DHCP client needs address in this Network Layer 4-57 DHCP client-server scenario DHCP server: 3...5 DHCP discover src : 0.0.0.0, 68 dest.: 55.55.55.55,67 yiaddr: 0.0.0.0 transaction ID: 654 arriving client time DHCP request DHCP offer src: 0.0.0.0, 68 dest:: 55.55.55.55, 67 yiaddrr: 3...4 transaction ID: 655 Lifetime: 3600 secs src: 3...5, 67 dest: 55.55.55.55, 68 yiaddrr: 3...4 transaction ID: 654 Lifetime: 3600 secs DHCP ACK src: 3...5, 67 dest: 55.55.55.55, 68 yiaddrr: 3...4 transaction ID: 655 Lifetime: 3600 secs Network Layer 4-58 9