EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.

Slides:



Advertisements
Similar presentations
Discussion Monday ( ). ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live.
Advertisements

IPv4 - The Internet Protocol Version 4
Network Layer – IPv4 Dr. Sanjay P. Ahuja, Ph.D.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
Announcement r Recitation tomorrow on Project 2 r Midterm Survey at the end of this class.
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Network Layer Packet Forwarding IS250 Spring 2010
1 TDC TDC 365 Network Interconnections Technologies Lecture #4 Notes Spring, 2009.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 15.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Chapter 4 Queuing, Datagrams, and Addressing
4: Network Layer4a-1 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a
Network Layer introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
1 CSE3213 Computer Network I Network Layer (7.1, 7.3, ) Course page: Slides modified from Alberto Leon-Garcia.
Internetworking and Network Layer in Internet Lecture Tunneling, Internetwork Routing 2.Fragmentation 3.IP-Protocol 4.IP-Address Classes(A,B,C,D,E),
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Dr. John P. Abraham Professor UTPA
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
CS 4396 Computer Networks Lab
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
Chapter-8 Network Layer in the Internet. IP Protocol: IP V4 At network layer, internet can be viewed as a collection of sub-networks or Autonomous Systems.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
Network Layer by peterl. forwarding table routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling.
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
The Internet Network layer
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
EEC-484 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
IP Fragmentation. Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side,
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
Introduction to Networks
Computer Communication Networks
Chapter 4 Network Layer All material copyright
THE NETWORK LAYER.
CS 457 – Lecture 10 Internetworking and IP
EEC-484/584 Computer Networks
IP - The Internet Protocol
EEC-484/584 Computer Networks
Internetworking Outline Best Effort Service Model
EEC-484/584 Computer Networks
Wide Area Networks and Internet CT1403
EEC-484/584 Computer Networks
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Net 323 D: Networks Protocols
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
IP - The Internet Protocol
32 bit destination IP address
Presentation transcript:

EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer Networking book, and on materials supplied by Dr. Louise Moser at UCSB and Prentice-Hall)

2 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Outline Distance vector routing Hierarchical routing Broadcast routing Internet protocol –Header –Fragmentation

3 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Distance Vector Routing Also called Bellman-Ford or Ford-Fulkerson Each router maintains a table (a vector), giving best known distance to each destination and which line to use to get there –Table is updated by exchanging info with neighbors –Table contains one entry for each router in network with Preferred outgoing line to that destination Estimate of time or distance to that destination –Once every T msec, router sends to each neighbor a list of estimated delays to each destination and receives same from those neighbors

4 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Distance Vector Routing d(A,X) d(A,Y) A X Z d(Y,Z) d(X,Z) At router A, for Z Compute d(A,X) + d(X,Z) and d(A,Y) + d(Y,Z), take minimum Y d(A,Z) = min {d(A,v) + d(v,Z) } where min is taken over all neighbors v of A

5 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z 0 from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table d(x,y) = min{d(x,y) + d(y,y), d(x,z) + d(z,y)} = min{2+0, 7+1} = 2 d(x,z) = min{d(x,y) + d(y,z), d(x,z) + d(z,z)} = min{2+1, 7+0} = 3 32

6 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z from cost to x y z x y z from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z from cost to x y z x y z from cost to x y z x y z from cost to x y z x y z from cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table d(x,y) = min{d(x,y) + d(y,y), d(x,z) + d(z,y)} = min{2+0, 7+1} = 2 d(x,z) = min{d(x,y) + d(y,z), d(x,z) + d(z,z)} = min{2+1, 7+0} = 3

7 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Distance Vector Routing Delay A to B 12ms, to C 25ms, to D 40ms, to G 18ms Delay J to A 8ms, to I 10ms, to H 12ms, to K 6ms Delay J to A to G 8+18 = 26ms to I to G = 41ms to H to G 12+6=18ms to K to G 6+31=37ms

8 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Distance Vector Routing Good news travels fast Bad news travels slow Count to infinity problem: Takes too long to converge upon router failure × Routers’ knowledge about the cost to A

9 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Distance Vector Routing: Exercise Consider the subnet shown below. Distance vector routing is used, and the following vectors have just come in to router C: from B: (5, 0, 8, 12, 6, 2); from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4). The measured delays to B, D, and E, are 6, 3, and 5, respectively. What is C's new routing table? Give both the outgoing line to use and the expected delay.

10 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Hierarchical Routing Bigger network => bigger routing table Use hierarchical structure similar to telephone network –Regions: router knows details of how to route packets within its region, does not know internals of other regions –Clusters of regions, zones of clusters, groups of zones Tradeoff: savings in memory space may result in longer path

11 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Hierarchical Routing

12 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao R1 R2 R3R4 source duplication R1 R2 R3R4 in-network duplication duplicate creation/transmission duplicate Broadcast Routing Deliver packets from source to all other nodes Source duplication is inefficient:

13 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao In-network Duplication Flooding: when node receives broadcast packet, sends copy to all neighbors –Problems: cycles & broadcast storm Controlled flooding: node only broadcasts packet if it hasn’t broadcast same packet before –Node keeps track of packet ids already broadcasted –Or reverse path forwarding (RPF): only forward packet if it arrived on shortest path between node and source Spanning tree –No redundant packets received by any node

14 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Flooding Idea: every incoming packet is sent out on every outgoing line except the one it arrived on Advantage: flooding always chooses shortest path, no other algorithm has shorter delay Disadvantage: generates lots of duplicates

15 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao How to Reduce Duplicates Include a hop counter in the header of each packet Decrement the counter at each hop Packet discarded when counter reaches 0

16 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao How to Reduce Duplicates The router assigns a sequence number in each packet it receives from its hosts –Each router has a list for each source router telling which sequence numbers originating at that source have already been seen –Each list augmented with counter k, meaning all sequence numbers up through k have been seen –If packet is duplicate, router discards it A 88, 90, 92 k Source router

17 Reverse Path Forwarding Rely on router’s knowledge of unicast shortest path from it to sender Each router has simple forwarding behavior: if (datagram received on incoming link on shortest path back to center) then flood datagram onto all outgoing links else ignore datagram

18 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Reverse Path Forwarding A subnet Assumption: –I is the sender –The cost for each hop is 1 –Optimal route is that gives the min hop count

19 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Reverse Path Forwarding Hop 1: I sends packets to F, H, J, N; each arrives on preferred path to I Hop 2: F sends packets to A,D; H to E,K; J to G,O; N to M,O All are previously unvisited routers; All but E,K,O arrive on preferred path Hop3: A sends packet to E; D to C,G; G to D; O to N; M to K; Only E,C,K arrive on preferred path

20 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Exercise – Broadcast Routing Looking at the subnet shown below, how many packets are generated by a broadcast from B, using (a) flooding with duplicate control through sequence number? (b) reverse path forwarding?

21 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Design Principles for Internet Make sure it works –Build prototypes first Keep it simple –When in doubt, use the simplest solution Make clear choices –If there are several ways of doing the same thing, choose one Exploit modularity –Use protocol stacks, each of whose layers is independent of all the other ones

22 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Design Principles for Internet Expect heterogeneity –Different types of hardware, transmission facilities, and applications will occur on any large network Avoid static options and parameters –Have the sender and receiver negotiate a value Look for a good design; it need not be perfect Be strict when sending and tolerant when receiving Think about scalability Consider performance and cost

23 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Collection of Subnetworks The Internet is an interconnected collection of many networks, or Autonomous Systems (ASes)

24 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao The Network Layer in Internet forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router “signaling” Transport layer: TCP, UDP Link layer physical layer Network layer

25 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao IP Datagram Format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. How much overhead with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

26 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao The IPv4 Header Version – 4 IHL – length of header in 32-bit words –Min 5, max 15 – i.e., 60 bytes Type of service - to distinguish different classes of service –To accommodate differentiated services (which class this packet belongs to) Total length – header and data  65,535 ( ) bytes Identification – allows destination to determine which datagram a fragment belongs to

27 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao The IPv4 Header Time to live – counter to limit packet lifetimes –Max lifetime 255sec –Packet is destroyed when counter becomes 0 Protocol – which transport layer protocols being used Header checksum – verifies header

28 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao The IPv4 Header Options – security, error reporting, etc. –Some of the IP options

29 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao IP Fragmentation Fragmentation Flags –DF – tells routers “ Don ’ t Fragment ” –MF – More Fragments. All fragments except last have this set. Used as check against total length Fragment offset – where in datagram this fragment belongs –All fragments (payload in the IP packet) except last must be multiples of 8 bytes –The number of 8 byte blocks is called Number of Fragment Blocks (NFB) –The unit of the offset is NFB

30 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao IP Fragmentation & Reassembly Network links have MTU (max.transfer size) - largest possible link-level frame. –different link types, different MTUs Large IP datagram divided (“fragmented”) within net –one datagram becomes several datagrams –“reassembled” only at final destination –IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly

31 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao IP Fragmentation and Reassembly ID =x offset =0 MF =0 length =4000 ID =x offset =0 MF =1 length =1500 ID =x offset =185 MF =1 length =1500 ID =x offset =370 MF =0 length =1040 One large datagram becomes several smaller datagrams Example 4000 byte datagram MTU = 1500 bytes 1480 bytes in data field offset = 1480/8

32 Spring Semester 2006EEC-484/584: Computer NetworksWenbing Zhao Exercise: IP Fragmentation Suppose that host A is connected to a router R 1, R 1 is connected to another router, R 2, and R 2 is connected to host B. Suppose that a TCP message that contains 900 bytes of data and 20 bytes of TCP header is passed to the IP code at host A for delivery to B. Show the Total length, Identification, DF, MF, and Fragment offset fields of the IP header in each packet transmitted over the three links. Assume that link A-R1 can support a maximum frame size of 1024 bytes including a 14-byte frame header, link R1-R2 can support a maximum frame size of 512 bytes, including an 8-byte frame header, and link R2-B can support a maximum frame size of 512 bytes including a 12-byte frame header.