資 管 Lee Lesson 5 IP Packets: Delivery and Routing IP Layer operation.

Slides:



Advertisements
Similar presentations
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Advertisements

IP Forwarding Relates to Lab 3.
1 Chapter 22 Network layer Delivery, Forwarding and Routing.
CSCI 4550/8556 Computer Networks Comer, Chapter 23: An Error Reporting Mechanism (ICMP)
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Internet Protocol (IP)
ECE 4110 – Internetwork Programming TCP/IP Protocol (cont’d)
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Delivery, Forwarding, and Routing
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
TCP/IP Protocol Suite 1 Chapter 6 Upon completion you will be able to: Delivery, Forwarding, and Routing of IP Packets Understand the different types of.
Fall 2006Computer Networks19-1 Chapter 19. Host-to-Host Delivery: Internetworking, Addressing, and Routing 19.1 Internetworks 19.2 Addressing 19.3 Routing.
1 Kyung Hee University Part 4 : Network Layer. 2 Kyung Hee University Role and Position of Network Layer o Network layer in the Internet model is responsible.
Module 10. Internet Protocol (IP) is the routed protocol of the Internet. IP addressing enables packets to be routed from source to destination using.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
1 Chapter 6 – Internet Protocol: Connectionless Datagram Delivery 6.3 Internet Architecture and Philosophy Chapters are about this layer NETWORK.
1 Computer Communication & Networks Lecture 20 Network Layer: IP and Address Mapping (contd.) Waleed.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Copyright © Lopamudra Roychoudhuri
10/8/2015CST Computer Networks1 IP Routing CST 415.
Delivery, Forwarding, and Routing of IP Packets
Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets Lecture #4 Items you should understand by now – before routing Physical Addressing – with in.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2003 Chapter 6 Delivery and Routing of IP Packets.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
Chapter 6 Delivery and Forwarding of IP Packets
Hyung-Min Lee ©Networking Lab., 2001 Chapter 8 ARP and RARP.
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 6 Delivery and Routing of IP Packets.
1 Internet Control Message Protocol (ICMP) Used to send error and control messages. It is a necessary part of the TCP/IP suite. It is above the IP module.
1 Routing Table  The seven fields Mask: for finding (sub)network address of the destination l Host-specific routing: (/32) l Default routing:
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 7 Internet Protocol (IP) Routing.
CS4550 Computer Networks II IP : internet protocol, part 2 : packet formats, routing, routing tables, ICMP read feit chapter 6.
Delivery, Forwarding, and Routing of IP Packets
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Communications Services Connection Oriented Service  A connection is established  Data is sent or received over this connection  Connection may be terminated.
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”
1 Kyung Hee University Chapter 8 Internet Protocol (IP)
Internet Protocol: Routing IP Datagrams Chapter 8.
TCP/IP Protocol Suite 1 Chapter 8 Upon completion you will be able to: Internet Protocol Understand the format and fields of a datagram Understand the.
TCP/IPTCP/IP Dr. Clincy1 Chapter 6 Delivery & Forwarding of IP Packets.
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.
1 Kyung Hee University Chapter 6 Delivery Forwarding, and Routing of IP Packets.
Chapter 8 Internet Protocol (IP)
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 1 Module 10 Routing Fundamentals and Subnets.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
1 Internetworking: IP Packet Switching Reading: (except Implementation; pp )
Delivery and Forwarding Chapter 18 COMP 3270 Computer Networks Computing Science Thompson Rivers University.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Chapter 6 Delivery & Forwarding of IP Packets
Forwarding and Routing IP Packets
IP Forwarding Covers the principles of end-to-end datagram delivery in IP networks.
Chapter 6 Delivery & Forwarding of IP Packets
Chapter 6 Delivery & Forwarding of IP Packets
IP Forwarding Relates to Lab 3.
IP Forwarding Relates to Lab 3.
Chapter 6 Delivery & Forwarding of IP Packets
Delivery, Forwarding, and Routing
Delivery and Routing of IP Packets
Delivery and Routing of IP Packets
IP : Internet Protocol Surasak Sanguanpong
Delivery, Forwarding, and Routing of IP Packets
IP Forwarding Relates to Lab 3.
Delivery, Forwarding, and Routing of IP Packets
Presentation transcript:

資 管 Lee Lesson 5 IP Packets: Delivery and Routing IP Layer operation

資 管 Lee delivery ◦ Physical forwarding of the packets. ◦ Connectionless and connection-oriented ◦ IP protocol is a connectionless protocol. routing ◦ Finding the route (next hop) for a datagram. ◦ Routing methods, types of routing, the routing table, and the routing module.

資 管 Lee Direct delivery ◦ Final destination of the packet is a host connected to the same physical network as the deliverer. ◦ Sender determine by filtering out the destination field of IP packet.  IP destination first be masked with the mask field in the routing table  compare the destination field in the routing table with the result. ◦ Case for direct delivery,:  Case 1: MAC address is known, the sender sent the MAC frame to the destination  Case 2: Otherwise, it use ARP protocol to find the physical address of the destination. Network Router Host Direct delivery Direct delivery To the Rest of the Internet

資 管 Lee Indirect delivery (by way of router) ◦ Case of indirect delivery: [indirect delivery]  final destination of the packet is not connected to the same physical network as the deliverer.  the sender sent the MAC frame to the router’s destination if destination MAC address is available.  {The packet may go from router to router until it reaches the one connected to the same physical network as its final destination.} Network Router Host (source) Host (destination) Indirect delivery Direct delivery Network

資 管 Lee Routing Methods Next-hop Routing ◦ Routing table hold only the address of the next hop instead of holding the complete route. R1 Host A (source) Host B (destination) Network R2 DestinationRoute Host BR1, R2, Host B DestinationRoute Host BR2, Host B DestinationRoute Host BR1 DestinationRoute Host BR2 DestinationRoute Host B DestinationRoute Host B__

資 管 Lee Routing Methods Network-Specific Routing ◦ Instead of having an entry for every host connected to the same physical networks. Treat all hosts connected to the same network as one single entry. R1 Host (source) N1 DestinationNext Route AR1 B C D DestinationRoute N2R1 A B C D N2

資 管 Lee Routing Methods Host-Specific Routing ◦ Host address is given in the routing table. R1 Host A R2 DestinationNext Hop Host BR3 N2R1 N3R3 …… N2 N1 N3 Host B Routing table for host A

資 管 Lee Routing Methods Default Routing ◦ Default entry (network address ). For example, router R1 for network N2, others, through router R2. R1 Host A DestinationNext Hop N2R1 …… …… DefaultR2 N2 N1 Routing table for host A Rest of the Internet

資 管 Lee Static vs Dynamic Routing Routing table, entries for all the destination, can be either static or dynamic ◦ Static routing contains information entered manually, used in a small internet or in an experimental internet. ◦ Dynamic routing table is updated periodically using one of the dynamic routing protocols such as RIP, OSPF, or BGP

資 管 Lee Routing Module and Routing Table Design Basic module for routing and routing table. …… …… Routing module Routing table IP packet From IP Processing module To fragmentation module IP Layer operation Data Link Layer

資 管 Lee Examples R / / / / /24 Rest of the INternet R5 R R1 m2m1 m0 R Host A: Host B: T0 T1

資 管 Lee Routing table design Seven basic fields: ◦ mask, destination address, next-hop address, flags, reference-count, use, and interface Mask Dest. address Next-hop address Flags Reference count UseInterface … … … … UG … 4……4…… 20 … m2 … … Flags: 5 flags. U(up), G (gateway), H(host-specific), D(added by redirection), M(modified by redirection): G flags mean another network or not. H flags means that the entry is a host-specific address. Reference count: the user number that use this entry. Use: the total packets that use this entry.

資 管 Lee Routing Module operation Receive: an IP packet 1. For each entry in the routing table 1. Apply the mask to packet destination address 2. If (the result matches the value in the destination field) 1. If (the G flags is absent) /* direct delivery */ use packet destination address as next hop address else value in next hop fields as next hop address 2. Send packet to fragmentation module with next hop address and interface ID. 3. Return 2. If no match is found for all entries in the routing table, send an ICMP error message 3. return

資 管 Lee Mask Dest. address Next-hop address Flag s RCUseInterface U00m U00m U00m1 ………………… UGH00m UG00m UG00m UG00m0 Routing table for router R1 Example: Router R1 receives 500 packets for destination ; the algorithm applies: 1. Direct delivery a &  no match b &  no match c &  no match 2. Host-specific a &  no match 3. Network-specific a &  match { the router sends the packet through interface m0 along with the next-hop IP address (111, ) to the fragmentation module for further processing. It increments the use field by 500 and RC by 1. }

資 管 Lee Example 2: Router R1 receives 100 packets for destination ; the algorithm applies: 1. Direct delivery 2. Host-specific 3. Network-specific Example 3: Router R1 receives 20 packets for destination : the algorithm applies: 1. Direct delivery 2. Host-specific 3. Network-specific

資 管 Lee Practice Quiz(3) S1: Show the routing table for router R3 S2: Router R3 receives 100 packets for destination ; the algorithm applies?

資 管 Lee IP layer operation

資 管 Lee An simplified, bare-bones design of IP Eight components: ◦ 5 modules:  header-adding module, a processing module, a routing module, a fragmentation module, and reassembly module. ◦ 3 tables:  routing table, MTU table, and a reassembly table.

資 管 Lee Routing Module and Routing Table Design …… Routing module Routing table IP packet Reassembly module Processing module …… Reassemble table … MTU table IP packet Header-adding module IP packet Fragmentation module IP packet Data address From upper layer protocol From data link layer To data link layer To upper layer protocol IP layer operation

資 管 Lee Header-Adding Module Header-Adding Module operation Receive: data, destination address { 形成 IP 封包 } 1. Encapsulate the data in an IP datagram 2. Calculate the checksum and insert it in the checksum field. 3. Send the data to the corresponding input queue. 4. Return. Processing Module operation 1. Remove one datagram from one of the input queues. 2. If (destination address is 127.X.Y.Z or matches one of the local addresses) 1) Send the datagram to the reassembly module, 2) Return 3. If (machine is a router) Decrement TTL. 4. If (TTL less than or equal to zero) 1) discard the data gram, 2) Send an ICMP error message, 3) Return 5. Send the datagram to the routing module. 6. Return.

資 管 Lee 資 管 Fragmentation Module operation Receive: an IP packet from routing module 1. Extract the size of the datagram. 2. If (size>MTU of the corresponding network) 1) If (D bit is set), discard the datagram, send an ICMP message, return. 2) Else, Calculate the maximum size, Divide the datagram into fragments, add header to each fragments, send the datagram, return. 3. Else, 1) Send the datagram. 4.Return. Interface Number MTU ……………… ……………… MTU table

資 管 Lee 資 管 Reassembly Module operation Receive: an IP datagram from the processing module 1. If (offset value is zero and the M bit is 0) 1) Send the datagram to the appropriate queue, return. 2. Search the reassembly table for the corresponding entry. 3. If (not found) 1) create a new entry. 4.Insert the fragment at the appropriate place in the link list. 1) If (all fragments have arrived), Reassemble the fragements, delivery the datagram to the corresponding upper layer protocol, return. 2) Else, check the time-out, if (time-out expired), discard all fragments, send an ICMP error message 5. Return. StateSource Addr.Data IDTime outFragments Reassemble table