1 / 128

Chapter 4 Internetworking

Chapter 4 Internetworking. 4.1 Simple Internetworking (IP) 4.2 Routing 4.3 Global Internet 4.4 Multicast 4.5 Multiprotocol Label Switching (MPLS). 4.1 Simple Internetworking (IP). Best Effort Service Model Global Addressing Scheme ARP (Address Resolution Protocol

csolomon
Download Presentation

Chapter 4 Internetworking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4Internetworking 4.1 Simple Internetworking (IP) 4.2 Routing 4.3 Global Internet 4.4 Multicast 4.5 Multiprotocol Label Switching (MPLS)

  2. 4.1 Simple Internetworking (IP) • Best Effort Service Model • Global Addressing Scheme • ARP (Address Resolution Protocol • ICMP (Internet Message Control Protocol)

  3. IP Internet • Concatenation of Networks • Protocol Stack

  4. Service Model • Connectionless (datagram-based) • Best-effort delivery (unreliable service) • packets are lost • packets are delivered out of order • duplicate copies of a packet are delivered • packets can be delayed for a long time • Datagram format

  5. Fragmentation and Reassembly • Each network has some MTU • Design decisions • fragment when necessary (MTU < Datagram) • try to avoid fragmentation at source host • re-fragmentation is possible • fragments are self-contained datagrams • use CS-PDU (not cells) for ATM • delay reassembly until destination host • do not recover from lost fragments

  6. Start of header Ident = x 0 Offset = 0 Rest of header (a) 1400 data bytes Start of header Ident = x 1 Offset = 0 Rest of header 512 data bytes (b) Start of header Ident = x 1 Offset = 64 Rest of header 512 data bytes Start of header Ident = x 0 Offset = 128 Rest of header 376 data bytes Example

  7. Global Addresses • Properties • globally unique • hierarchical: network + host • Dot Notation • 10.3.2.4 • 128.96.33.81 • 192.12.69.77

  8. Datagram Forwarding • Strategy • every datagram contains destination’s address • if connected to destination network, then forward to host • if not directly connected, then forward to some router • forwarding table maps network number into next hop • each host has a default router • each router maintains a forwarding table • Example (R2) Network Number Next Hop 1 R3 2 R1 3 interface 1 4 interface 0

  9. Address Translation • Map IP addresses into physical addresses • destination host • next hop router • Techniques • encode physical address in host part of IP address • table-based • ARP • table of IP to physical address bindings • broadcast request if IP address not in table • target machine responds with its physical address • table entries are discarded if not refreshed

  10. ARP Details • Request Format • HardwareType: type of physical network (e.g., Ethernet) • ProtocolType: type of higher layer protocol (e.g., IP) • HLEN & PLEN: length of physical and protocol addresses • Operation: request or response • Source/Target-Physical/Protocol addresses • Notes • table entries timeout in about 10 minutes • update table with source when you are the target • update table if already have an entry • do not refresh table entries upon reference

  11. 0 8 16 31 Hardware type = 1 ProtocolType = 0x0800 HLen = 48 PLen = 32 Operation SourceHardwareAddr (bytes 0 ― 3) 5) 1) SourceHardwareAddr (bytes 4- SourceProtocolAddr (bytes 0 - SourceProtocolAddr (bytes 2 TargetHardwareAddr (bytes 0 – 1) - 3) 5) TargetHardwareAddr (bytes 2 - TargetProtocolAddr (bytes 0 - 3) ARP Packet Format

  12. Internet Control Message Protocol (ICMP) • Echo (ping) • Redirect (from router to source host) • Destination unreachable (protocol, port, or host) • TTL exceeded (so datagrams don’t cycle forever) • Checksum failed • Reassembly failed • Cannot fragment

  13. Redirect G1 Network (1) Network (2) H1 G2 H2 Network • G2 finds that H1 is directly connected and • will inform H1 to redirect the IP datagrams to G2.

  14. 4.2 Routing • Forwarding vs Routing • forwarding: to select an output port based on destination address and routing table • routing: process by which routing table is built • Network as a Graph • Problem: Find lowest cost path between two nodes • Factors • static: topology • dynamic: load

  15. Distance Vector • Each node maintains a set of triples • (Destination, Cost, NextHop) • Directly connected neighbors exchange updates • periodically (on the order of several seconds) • whenever table changes (called triggered update) • Each update is a list of pairs: • (Destination, Cost) • Update local table if receive a “better” route • smaller cost • came from next-hop • Refresh existing routes; delete if they time out

  16. Routing Table Example (Node B) Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A

  17. Routing Loops • Example 1 • F detects that link to G has failed • F sets distance to G to infinity and sends update to A • A sets distance to G to infinity since it uses F to reach G • A receives periodic update from C with 2-hop path to G • A sets distance to G to 3 and sends update to F • F decides it can reach G in 4 hops via A

  18. Routing Loops • Example 2 • link from A to E fails • A advertises distance of infinity to E • B and C advertise a distance of 2 to E • B decides it can reach E in 3 hops; advertises this to A • A decides it can read E in 4 hops; advertises this to C • C decides that it can reach E in 5 hops…

  19. 1 4 1 50 x z y Distance Vector: link cost changes Link cost changes: • node detects local link cost change • updates routing info, recalculates distance vector • if DV changes, notify neighbors At time t0, y detects the link-cost change, updates its DV, and informs its neighbors. At time t1, z receives the update from y and updates its table. It computes a new least cost to x and sends its neighbors its DV. At time t2, y receives z’s update and updates its distance table. y’s least costs do not change and hence y does not send any message to z. “good news travels fast”

  20. 1 4 1 50 x z y Distance Vector: link cost changes “good news Travels fast” Dy algorithm terminates Dz

  21. X Z Y Distance Vector: link cost changes Link cost changes: • bad news travels slow - “count to infinity” problem! • 44 iterations before algorithm stabilizes • z (y) does not know that the least distance from y (z) to x that y (z) tells z (y) is the distance of the path y-z-y-x (z-y-x) 60 4 1 50 algorithm continues on!

  22. Distance Vector: poisoned reverse X Z Y 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? • Loops involving three or more nodes cannot be solved using the technique 60 4 1 50 algorithm terminates

  23. u v destinationhops u 1 v 2 w 2 x 3 y 3 z 2 w x z y C A D B RIP ( Routing Information Protocol) • Distance vector algorithm • Included in BSD-UNIX Distribution in 1982 • Distance metric: # of hops (max = 15 hops) Source node: A

  24. RIP advertisements • Distance vectors: exchanged among neighbors every 30 sec via Response Message (also called advertisement) • Each advertisement: a list of up to 25 destination subnets within AS

  25. RIP: Example z w x y A D B C Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B 7 x -- 1 …. …. .... Routing table in D

  26. z w x y A D B C RIP: Example Dest Next hops w - - x - - z C 4 …. … ... Advertisement from A to D Destination Network Next Router Num. of hops to dest. w A 2 y B 2 z B A 7 5 x -- 1 …. …. .... Routing table in D

  27. RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor or 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 = 16 hops)

  28. routed routed RIP Table processing • RIP routing tables managed by application-level process called route-d (daemon) • advertisements sent in UDP packets, periodically repeated Transprt (UDP) Transprt (UDP) network forwarding (IP) table network (IP) forwarding table link link physical physical

  29. Link State • Strategy • send to all nodes (not just neighbors) information about directly connected links (not entire routing table) • Link State Packet (LSP) • id of the node that created the LSP • cost of link to each directly connected neighbor • sequence number (SEQNO) • time-to-live (TTL) for this packet

  30. Link State (cont) • Reliable flooding • store most recent LSP from each node • forward LSP to all nodes but one that sent it • generate new LSP periodically • increment SEQNO • start SEQNO at 0 when reboot • decrement TTL of each stored LSP • discard when TTL=0

  31. Reliable Flooding

  32. Route Calculation • Dijkstra’s shortest path algorithm • Let • N denotes set of nodes in the graph • l (i, j) denotes non-negative cost (weight) for edge (i, j) • s denotes this node • M denotes the set of nodes incorporated so far • C(n) denotes cost of the path from s to node n M = {s} for each n in N - {s} C(n) = l(s, n) while (N != M) M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) C(n) = MIN(C(n), C (w) + l(w, n ))

  33. 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 forwarding table for that node iterative: after k iterations, know least cost path to k destinations Notation: c(x,y): link cost from node x to y; = ∞ if not direct neighbors D(v): current value of cost of path from source to destination v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known A Link-State Routing Algorithm

  34. Dijsktra’s Algorithm 1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = ∞ 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' u: source node

  35. 5 3 5 2 2 1 3 1 2 1 x z w y u v Dijkstra’s algorithm: example D(v),p(v) 2,u 2,u 2,u D(x),p(x) 1,u D(w),p(w) 5,u 4,x 3,y 3,y D(y),p(y) ∞ 2,x Step 0 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(z),p(z) ∞ ∞ 4,y 4,y 4,y

  36. 5 5 3 3 5 5 2 2 2 1 2 1 3 3 1 1 2 2 1 1 x x x x z z z z w w w w y u u u y y u y v v v v 5 5 3 3 5 2 5 2 2 1 3 2 1 3 1 2 1 2 1 1 Dijkstra’s algorithm: example

  37. 5 3 5 2 5 2 1 3 3 5 1 2 2 1 2 1 3 1 x x z z 2 w w u y u y v v 1 Dijkstra’s algorithm: example

  38. Algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n(n+1)/2 comparisons: O(n2) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic A A A A D D D D B B B B C C C C 1 1+e 2+e 0 2+e 0 2+e 0 0 0 1 1+e 0 0 1 1+e e 0 0 0 e 1 1+e 0 1 1 e … recompute … recompute routing … recompute initially Dijkstra’s algorithm, discussion

  39. OSPF (Open Shortest Path First) • “open”: publicly available – defined in RFC 2328 • Uses Link State algorithm • Link-State 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)

  40. OSPF “advanced” features (not in RIP) • Security: all OSPF messages authenticated (to prevent malicious intrusion) • Load Balancing: 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.

  41. Hierarchical OSPF • An OSPF autonomous system (AS) can be configured into areas • Exactly one OSPF area in the AS is configured to be the backbone area • Each area runs its own OSPF link-state routing algorithm • 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.

  42. Hierarchical OSPF

  43. Hierarchical OSPF Four types of routers • Internal routers: perform only intra AS routing • Areaborderrouters: belong to both an area and the backbone • Backbonerouters: run OSPF routing limited to backbone. • Boundaryrouters: connect to other AS’s.

  44. OSPF Advertisement Format Header Format Link-State Advertisement

  45. Message complexity LS: with n nodes, E links, O(nE) messages sent DV: exchange between neighbors only convergence time varies Speed of Convergence LS: O(n2) algorithm requires O(nE) messages 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 Comparison of LS and DV algorithms

  46. Metrics • Original ARPANET metric • measures number of packets queued on each link • took neither latency or bandwidth into consideration • New ARPANET metric • stamp each incoming packet with its arrival time (AT) • record departure time (DT) • when link-level ACK arrives, compute Delay = (DT - AT) + Transmit + Latency • if timeout, reset DT to departure time for retransmission • link cost = average delay over some time period

  47. Metrics • Still has problems • Under light load, it works well since the two static factors of delay dominated the cost. • Under heavy load, a congested link would start to advertise a very high cost. This caused all the traffic to move off that link, leaving it idle, so then it advertise a low cost,… • The range of link values was much too large. • Fine Tuning • compressed dynamic range • replaced Delay with link utilization

  48. Revised ARPANET routing metric versus link utilization

  49. Revised ARPANET routing metric versus link utilization • A highly loaded link never shows a cost of more than three times its cost when idle • The most expensive link is only seven times the cost of least expensive • A high-speed satellite link is more attractive than a low-speed terrestrial link • Cost is a function of link utilization only at moderate to high loads.

  50. 4.3 Global Internet Structure Tree Structure of the Internet in 1990 NSFNET backbone Stanford ISU BARRNET MidNet ■ ■ ■ regional regional Westnet regional Berkeley UNL KU PARC UNM NCAR UA

More Related