ECE544: Communication Networks-II, Spring 2010 D. Raychaudhuri Lecture 4 Includes teaching materials from L. Peterson.

Slides:



Advertisements
Similar presentations
CSE 461: IP/ICMP and the Network Layer. Next Topic  Focus:  How do we build large networks?  Introduction to the Network layer  Internetworks  Service.
Advertisements

CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 11 – February 16, 2010.
1 Comnet 2010 Communication Networks Recitation 6 Routing.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder
Spring 2003CS 4611 Internetworking COS 461 Spring 2003.
CSE331: Introduction to Networks and Security Lecture 7 Fall 2002.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
15-744: Computer Networking L-5 Intra-Domain Routing.
Chapter 4 IP Routing Professor Rick Han University of Colorado at Boulder
CS Internetworking Slide Set 8. In this set... Addressing Datagram forwarding.
ECE544: Communication Networks-II, Spring 2007 D. Raychaudhuri Lecture 4,5 Includes teaching materials from L. Peterson.
1 ELEN Lecture 13 LAN Bridges Routers, Switches, Gateways Network layer -IP Reading: 6.7,
ECE544: Communication Networks-II Spring 2009 H. Liu Lecture 4 Includes teaching materials from D. Raychaudhuri, L. Peterson.
Spring 2002CS 4611 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
Routing.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
26-Aug-154/598N: Computer Networks Recap SBC UUNET Comcast Sprint End Users Internet First mile problem Last mile problem.
CS 6401 Internet Protocol Outline Introduction to Internet Protocol Header and address formats ICMP Tools.
Interior Gateway Protocols: RIP & OSPF
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
13-Sep-154/598N: Computer Networks Address Translation Map IP addresses into physical addresses –destination host –next hop router Techniques –encode physical.
CS551: Unicast Routing Christos Papadopoulos (
1 Introduction to Computer Networks University of Ilam By: Dr. Mozafar Bag-Mohammadi Internetworking.
Fall 2010CMSC 1501 Internetworking. Fall 2010CMSC 1502 Assumptions Data pipe from every machine to every other machine. –Need not be single link (and.
A Review of Evolving Network Technology Ethernet & IP J.J. Ekstrom March 2008.
CS 6401 Internetworking Outline Internet Architecture Best Effort Service Model.
A Review of Evolving Network Technology Ethernet & IP With associated infrastructure. J.J. Ekstrom IT 529 Thursday, January 15, 2015.
10/13/2015© 2008 Raymond P. Jefferis IIILect 07 1 Internet Protocol.
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
CSS432: Internetworking 1 CSS432 Internetworking Textbook Ch4.1 Professor: Munehiro Fukuda Augmented by Rob Nash.
Fall, 2001CS 6401 Switching, Internet Protocol Outline Quiz 2 Solution Crossbar switch design Knockout switch design Introduction to Internet Protocol.
Spring 2010CS 3321 Chapter 4: Internetworking. Spring 2010CS 3322 Assumptions Data pipe from every machine to every other machine. –Need not be single.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
Routing and Routing Protocols
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
Dynamic Routing Protocols II OSPF
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
3. INTERNETWORKING (PART 3: IP) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 18 February
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
CSS432 Basic Internetworking Textbook Ch3.2
Univ. of TehranIntroduction to Computer Network1 An Introduction Computer Networks An Introduction to Computer Networks University of Tehran Dept. of EE.
1 Internetworking Outline Best Effort Service Model Global Addressing Scheme.
2002 년 2 학기인터넷통신망 년 2 학기. 인터넷통신망 2 Acknowledgement Some figures and texts are from: –Govindan –Kurose –Peterson & Davie –Huitema –Halabi –Retana,
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Scaling the Network Chapters 3-4 Part 2
Dynamic Routing Protocols II OSPF
Scaling the Network: The Internet Protocol
3. Internetworking (part 3: IP)
Intra-Domain Routing Jacob Strauss September 14, 2006.
Dynamic Routing Protocols II OSPF
ECE544: Communication Networks-II, Spring 2006
Advanced Computer Networks
Internetworking Outline Best Effort Service Model
ECE544: Communication Networks-II, Spring 2016
Intradomain Routing Outline Introduction to Routing
2. Fragmentation and Reassembly
Internetworking - We are heterogeneity to our network (variable network technologies, bandwidth, MTU, latency, etc. etc.) Goal is to use this opportunity.
Communication Networks
Scaling the Network: The Internet Protocol
Tree Structured Internet(c. 1990)
Communication Networks
Presentation transcript:

ECE544: Communication Networks-II, Spring 2010 D. Raychaudhuri Lecture 4 Includes teaching materials from L. Peterson

Today’s Lecture IP basics Routing principles –distance vector (RIP) –link state (OSPF)

IP Basics Best Effort Service Model Global Addressing Scheme ARP & DHCP

IP Internet Concatenation of Networks Protocol Stack R2 R1 H4 H5 H3 H2 H1 Network 2 (Ethernet) Network 1 (Ethernet) H6 Network 3 (FDDI) Network 4 (point-to-point) H7R3H8 R1 ETH FDDI IP ETH TCP R2 FDDI PPP IP R3 PPP ETH IP H1 IP ETH TCP H8

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 VersionHLen TOSLength IdentFlagsOffset TTLProtocolChecksum SourceAddr DestinationAddr Options (variable) Pad (variable) Data

Fragmentation and Reassembly Each network has some MTU Strategy –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

Example Ident = xOffset = 0 Start of header 0 Rest of header 1400 data bytes Ident = xOffset = 0 Start of header 1 Rest of header 512 data bytes Ident = xOffset = 512 Start of header 1 Rest of header 512 data bytes Ident = xOffset = 1024 Start of header 0 Rest of header 376 data bytes

Global Addresses Properties –globally unique –hierarchical: network + host Dot Notation – – – NetworkHost A: NetworkHost B: NetworkHost C:

Datagram Forwarding Strategy –every datagram contains destination’s address –if directly connected to destination network, then forward to host –if not directly connected to destination network, 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

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

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

ARP Packet Format TargetHardwareAddr (bytes 2–5) TargetProtocolAddr (bytes 0–3) SourceProtocolAddr (bytes 2–3) Hardware type = 1ProtocolType = 0x0800 SourceHardwareAddr (bytes 4–5) TargetHardwareAddr (bytes 0–1) SourceProtocolAddr (bytes 0–1) HLen = 48PLen = 32Operation SourceHardwareAddr (bytes 0–3)

ATM ARP ATM ARP for mapping IP ATM addr –medium is not a broadcast type unlike Ethernet –requires servers which maintain ARP tables –concept of multiple “logical IP subnets” (LIS)

Dynamic Host Control Protocol (DHCP) DHCP server per network for IP address assignment Static list of IP physical addr or dynamic binding from common pool Host boot-up via well-known address DHCP “relay agent” can be used to avoid one server per network

Dynamic Host Control Protocol (DHCP) DHCP packet format (runs over UDP) OperationHTypeHLenHops Xid Secs Flag ciaddr yiaddr siaddr giaddr chaddr (16B)....

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

Routing Basics

Routing Problem Network as a Graph Problem: Find lowest cost path between two nodes Factors –static: topology –dynamic: load

Two main approaches DV: Distance-vector protocols LS: Link state protocols Variations of above methods applied to: –Intra-domain routing (small/med networks) RIP, OSPF –Inter-domain routing (large/global networks) BGP-4

Distance Vector Protocols Employed in the early Arpanet Distributed next hop computation –adaptive Unit of information exchange –vector of distances to destinations Distributed Bellman-Ford Algorithm

Distance Vector Each node maintains a set of triples –(Destination, Cost, NextHop) Exchange updates directly connected neighbors –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

Distributed Bellman-Ford Start Conditions: Each router starts with a vector of (zero) distances to all directly attached networks Send step: Each router advertises its current vector to all neighboring routers. Receive step: Upon receiving vectors from each of its neighbors, router computes its own distance to each neighbor. Then, for every network X, router finds that neighbor who is closer to X than to any other neighbor. Router updates its cost to X. After doing this for all X, router goes to send step.

Example - initial distances A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

E receives D’s routes A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E

E updates cost to C A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

A receives B’s routes A B E C D Info at node A B C D ABC 07~ 701 ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

A updates cost to C A B E C D Info at node A B C D ABC ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

A receives E’s routes A B E C D Info at node A B C D ABC ~10 ~~ Distance to node D ~ ~ 2 0 E ~ 2 0 E

A updates cost to C and D A B E C D Info at node A B C D ABC ~10 ~~ Distance to node D 3 ~ 2 0 E ~ 2 0 E

Final distances A BC D Info at node A B C D ABC Distance to node D E E E

Final distances after link failure A BC D Info at node A B C D ABC Distance to node D E E E

View from a node A B E C D dest A B C D ABD Next hop E’s routing table

Distance Vector Example R1R2 R4 R3R Info at Node R1R2R3R4R5 R R R R R5--9-0

DV Example (cont.) R1R2 R4 R3R Info at Node R1R2R3R4R5 R R R R R

DV Example (cont.) R1R2 R4 R3R Info at Node R1R2R3R4R5 R R R R R

DV Example – after link R2-R3 breaks R1R2 R4 R3R Info at Node R1R2R3R4R5 R R R R R

DV Example – after link R2-R3 breaks R1R2 R4 R3R Info at Node R1R2R3R4R5 R R R R R

DV Example – after link R2-R3 breaks R1R2 R4 R3R Info at Node R1R2R3R4R5 R R R R R

The bouncing effect A B C B C2 1 destcost A C1 1 destcost A B1 2 destcost

C sends routes to B A 25 1 B C B C2 1 destcost A C1 ~ destcost A B1 2 destcost

B updates distance to A A 25 1 B C B C2 1 destcost A C1 3 destcost A B1 2 destcost

B sends routes to C A 25 1 B C B C2 1 destcost A C1 3 destcost A B1 4 destcost

C sends routes to B A 25 1 B C B C2 1 destcost A C1 5 destcost A B1 4 destcost

How are these loops caused? Observation 1: –B’s metric increases Observation 2: –C picks B as next hop to A –But, the implicit path from C to A includes itself!

Avoiding the Bouncing Effect Select loop-free paths One way of doing this: –each route advertisement carries entire path –if a router sees itself in path, it rejects the route BGP does it this way –Space proportional to diameter Cheng, Riley et al

Computing Implicit Paths To reduce the space requirements –propagate for each destination not only the cost but also its predecessor –can recursively compute the path –space requirements independent of diameter x y z wu v

Distance Vector in Practice RIP and RIP2 –uses split-horizon/poison reverse BGP/IDRP –propagates entire path –path also used for effecting policies

Link State Routing Each node assumed to know state of links to its neighbors Step 1: Each node broadcasts its state to all other nodes Step 2: Each node locally computes shortest paths to all other nodes from global state

Link State Routing: Building blocks Reliable broadcast mechanism –flooding –sequence number issues Shortest path tree (SPT) algorithm –Dijkstra’s SPT algorithm

Link state packets (LSPs) Periodically, each node creates a Link state packet containing: –Node ID –List of neighbors and link cost –Sequence number –Time to live (TTL) Node outputs LSP on all its links

Reliable flooding When node i receives LSP from node j: –If LSP is the most recent LSP from j that i has seen so far, i saves it in database and forwards a copy on all links except link LSP was received on. –Otherwise, discard LSP.

SPT algorithm (Dijkstra) SPT = {a} for all nodes v –if v adjacent to a then D(v) = cost (a, v) –else D(v) = infinity Loop –find w not in SPT, where D(w) is min –add w in SPT –for all v adjacent to w and not in SPT D(v) = min (D(v), D(w) + C(w, v)) until all nodes are in SPT

Link State Algorithm Flooding: 1) Periodically distribute link-state advertisement (LSA) to neighbors - LSA contains delays to each neighbor 2) Install received LSA in LS database 3) Re-distribute LSA to all neighbors Path Computation 1) Use Dijkstra’s shortest path algorithm to compute distances to all destinations 2) Install pair in forwarding table

Dijkstra/OSPF Method 1 R1R2 R4 R3R Step #Confirmed (R#, cost, next hop) Tentative (R#, cost, next hop) 1(R1,0,-)- 2 (R2,4,R2) 3(R1,0,-) (R2,4,R2) (R3,6,R2) (R4,8,R2)

Dijkstra/OSPF Method 1 R1R2 R4 R3R Step #Confirmed (R#, cost, next hop) Tentative (R#, cost, next hop) 4(R1,0,-) (R2,4,R2) (R3,6,R2) (R4,8,R2) (R4,7,R3) 5(R1,0,-) (R2,4,R2) (R3,6,R2) (R4,7,R3) (R5,15,R3)

Dijkstra/OSPF Method 1 R1R2 R4 R3R Step #Confirmed (R#, cost, next hop) Tentative (R#, cost, next hop) 6(R1,0,-) (R2,4,R2) (R3,6,R2) (R4,7,R3) (R5,15,R3)

Dijkstra SPT Method 2 AF B DE C B CDEF

AF B DE C B CDEF

AF B DE C B CDEF

AF B DE C B CDEF

AF B DE C B CDEF

AF B DE C B CDEF

Link State in Practice OSPF (Open Shortest Path First Protocol) –most commonly used routing protocol in the Internet –support for authentication, addl hierarchy, load balancing

OSPF Packets LS AgeOptionsType=1 0Flags0Number of links Link typeNum_TOSMetric Link state ID Advertising router LS sequence number Link ID Link data Optional TOS information More links LS checksumLength

Link State Characteristics With consistent LSDBs, all nodes compute consistent loop-free paths Limited by Dijkstra computation overhead, space requirements Can still have transient loops A B C D Packet from C->A may loop around BDC

OSPF Sequencing and Aging 32-bit sequence number field, does not wrap LSP’s compared on basis of sequence number LSP’s purged after about an hour Synchronized expiration of LSPs –expired LSP reflooded with age zero On startup, router need not wait –can start with lowest sequence number –will be informed if its own LSP is in network

Problem: Router Failure A failed router and comes up but does not remember the last sequence number it used before it crashed New LSPs may be ignored if they have lower sequence number

One solution: LSP Aging Nodes periodically decrement age (TTL) of stored LSPs LSPs expire when TTL reaches 0 –LSP is re-flooded once TTL = 0 Rebooted router waits until all LSPs have expired Trade-off between frequency of LSPs and router wait after reboot

69 Today’s Homework Peterson & Davie, Chap Download and browse RIP and OSPF RFC’s Due on Fri (2/29)