Network Layer PREPARED BY AHMED ABDEL-RAOUF

Similar documents
Lecture 8. Network Layer (cont d) Network Layer 1-1

Tutorial 9. SOLUTION Since the number of supported interfaces is different for each subnet, this is a Variable- Length Subnet Masking (VLSM) problem.

1-1. Switching Networks (Fall 2010) EE 586 Communication and. October 25, Lecture 24

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Network Layer: Control/data plane, addressing, routers

CSCI Computer Networks Fall 2016

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The Network Layer

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

b. Suppose the two packets are to be forwarded to two different output ports. Is it

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

Quiz. Segment structure and fields Flow control (rwnd) Timeout interval. Phases transition ssthresh setting Cwnd setting

Router Architecture Overview

Network layer: Overview. Network layer functions IP Routing and forwarding NAT ARP IPv6 Routing

Chapter 4: Network Layer

Master Course Computer Networks IN2097

Network layer: Overview. Network Layer Functions

CSCE 463/612 Networks and Distributed Processing Spring 2018

COMP211 Chapter 4 Network Layer: The Data Plane

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

Chapter 4: network layer

internet technologies and standards

CS 3516: Advanced Computer Networks

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

CSC 401 Data and Computer Communications Networks

CS 3516: Computer Networks

The Network Layer Forwarding Tables and Switching Fabric

CSC 401 Data and Computer Communications Networks

Network Layer: Internet Protocol

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

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

internet technologies and standards

Network Layer: Router Architecture, IP Addressing

Chapter 4 Network Layer: The Data Plane

Lecture 16: Network Layer Overview, Internet Protocol

Last time. Wireless link-layer. Introduction. Characteristics of wireless links wireless LANs networking. Cellular Internet access

TDTS06: computer Networks

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

Chapter 4 Network Layer

CMPE 80N: Introduction to Networking and the Internet

Network Layer: outline

Network Layer: Data Plane 4-2

Chapter 4 Network Layer: The Data Plane

Introduction to Computer Networking. Guy Leduc. Chapter 4 Network Layer: The Data Plane. Chapter 4: Network Layer Data Plane

CS 43: Computer Networks. 21: The Network Layer & IP November 7, 2018

IPv4 addressing, NAT. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

CSC358 Week 6. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Chapter 4 Network Layer: The Data Plane

The Network Layer Forwarding Tables and Switching Fabric

Review for Chapter 4 R1,R2,R3,R7,R10,R11,R16,R17,R19,R22,R24, R26,R30 P1,P2,P4,P7,P10,P11,P12,P14,P15,P16,P17,P22,P24,P29,P30

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Network Layer/IP Protocols

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

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Internet Protocol (IP)

Chapter 4 Network Layer: The Data Plane. Part A. Computer Networking: A Top Down Approach

Chapter 4 Network Layer

Chapter 4 Network Layer

NETWORK LAYER DATA PLANE

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Network Layer: Chapter 4. The Data Plane. Computer Networking: A Top Down Approach

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Problem Set 8 Due: Start of Class, November 16

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 4 Network Layer

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Department of Computer and IT Engineering University of Kurdistan. Network Layer. By: Dr. Alireza Abdollahpouri

IPv4. Christian Grothoff.

ECE 158A: Lecture 7. Fall 2015

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

Δίκτυα Υπολογιστών ΙΙ. Κώστας Μαγκούτης Επίκουρος Καθηγητής Τμήμα Μηχανικών Η/Υ και Πληροφορικής Πανεπιστήμιο Ιωαννίνων

Last time. Network layer. Introduction. Virtual circuit vs. datagram details. IP: the Internet Protocol. forwarding vs. routing

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

Computer Networking Introduction

CSC 4900 Computer Networks: Network Layer

Course on Computer Communication and Networks. Lecture 6 Network Layer part 1: Data Plane Chapter 4 (7/e) (6/e Ch4-first part)

EP2120 Internetworking/Internetteknik IK2218 Internets Protokoll och Principer

Chapter 4 Network Layer

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Announcements. CS 5565 Network Architecture and Protocols. Count-To-Infinity. Poisoned Reverse. Distance Vector: Link Cost Changes.

CSC 4900 Computer Networks: Network Layer

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

Position of IP and other network-layer protocols in TCP/IP protocol suite

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

Internet Network Protocols IPv4/ IPv6

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

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

cs144 Midterm Review Fall 2010

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

UNIT III THE NETWORK LAYER

Lecture 12: Addressing. CSE 123: Computer Networks Alex C. Snoeren

CSE 3214: Computer Network Protocols and Applications Network Layer

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

Internet Technology 3/23/2016

TSIN02 - Internetworking

Transcription:

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on receiving side, delivers segments to transport layer network layer protocols in every host, router router examines header fields in all IP datagrams passing through it application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical

Two Key Network-Layer Functions routing algorithm Forwarding move packets from router s input to appropriate router output Within single router local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 Routing determine route taken by packets from source to dest. Process of planning trip from source to dest. value in arriving packet s header 0111 3 2 1

What s inside the router(router Arch.) Two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link

Input Port Functions Physical layer: bit-level reception Data link layer: e.g., Ethernet see chapter 5 Decentralized switching: given datagram dest., lookup output port using forwarding table in input port memory goal: complete input port processing at line speed queuing: if datagrams arrive faster than forwarding rate into switch fabric

Three types of switching fabrics

Router Architecture Consider a router with a switch fabric, 2 input ports (A and B) and 2 output ports (C and D). Suppose the switch fabric operates at 1.5 times the line speed. If, for some reason, all packets from A are destined to D, and all packets from B are destined to C, can a switch fabric be designed so that there is no input port queuing? Explain why or why not in one sentence.

Router Architecture Consider a router with a switch fabric, 2 input ports (A and B) and 2 output ports (C and D). Suppose the switch fabric operates at 1.5 times the line speed. If, for some reason, all packets from A are destined to D, and all packets from B are destined to C, can a switch fabric be designed so that there is no input port queuing? Explain why or why not in one sentence. YES, Use crossbar fabric let A >D, B >C operate at line speed simultaneously (at the same time ).

Router Architecture (Problem) Consider a router with a switch fabric, 2 input ports (A and B) and 2 output ports (C and D). Suppose the switch fabric operates at 1.5 times the line speed. Suppose now packets from A and B are randomly destined to both C and D. Can a switch fabric be designed so that there is no input port queuing? Explain why or why not in one sentence.

Router Architecture (Problem) Consider a router with a switch fabric, 2 input ports (A and B) and 2 output ports (C and D). Suppose the switch fabric operates at 1.5 times the line speed. Suppose now packets from A and B are randomly destined to both C and D. Can a switch fabric be designed so that there is no input port queuing? Explain why or why not in one sentence. No. If A and B both send to C, we ll have input port queuing no matter which switch fabric is used.

IPV4 DATAGRAM FRAGMENTATION

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

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 reassembly fragmentation: in: one large datagram out: 3 smaller datagrams

IPV4 DATAGRAM FRAGMENTATION )Problem 1) Consider sending a 2,400-byte datagram into a link that has an MTU (Maximum Transmission Unit) of 700 bytes. Suppose the original datagram is stamped with the identification number 422 a. How many fragments are generated? b. What are the values in the various fields in the IP datagram(s) generated related to fragmentation?

IPV4 DATAGRAM FRAGMENTATION )Problem 1) Consider sending a 2,400-byte datagram into a link that has an MTU (Maximum Transmission Unit) of 700 bytes. Suppose the original datagram is stamped with the identification number 422 a. How many fragments are generated? - For the link, 20-byte for IP header, Each fragment can carry up to 700 20 = 680 bytes of data - The original IP datagram is carrying 2400 20 = 2380 bytes of data. - Number of fragments = ceil (amount of data in original IP datagram / amount of data in fragment) = ceil (2380 / 680) = 4 fragments.

IPV4 DATAGRAM FRAGMENTATION )Problem 1) Consider sending a 2,400-byte datagram into a link that has an MTU (Maximum Transmission Unit) of 700 bytes. Suppose the original datagram is stamped with the identification number 422 b. What are the values in the various fields in the IP datagram(s) generated related to fragmentation? - Each fragment will contain 680 bytes of data + 20 bytes of IP header = 700 bytes - The fourth fragment will contain 2380 (680) (3) = 340 bytes of data and 20 bytes of IP header, giving a total length of 360 bytes. - The offset value is expressed in units of 8-byte chunks. The offsets increment by amount of data in fragment / 8 = 680 / 8 = 85. The offsets of the 4 fragments will be 0, 85, 170, and 255.

IPV4 DATAGRAM FRAGMENTATION )Problem 2) Suppose datagrams are limited to 1,500 bytes (including header) between source Host A and destination Host B. Assuming a 20-byte IP header a. how many datagrams would be required to send an MP3 consisting of 5 million bytes? (Assume that the data is carried in TCP segments, with each TCP segment having 20 bytes of header. ) - Each datagram can carry up to 1500 40 = 1460 bytes of data. - Number of required datagrams = ceil (amount of data in MP3 / amount of data in datagram) = ceil ((5 10 6 ) / 1460) = 3425 datagrams. - The last datagram will contain (5 10 6 ) - (1460) (3424) = 960 bytes of data, 20 bytes of TCP header, and 20 bytes of IP header, giving a total length of 1000 bytes.

IPV4 SUBNETTING

IP Addressing: introduction IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link router s typically have multiple interfaces host typically has one interface IP addresses associated with each interface 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.27 223.1.2.2 223.1.3.1 223.1.3.2 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

Subnets IP address: subnet part (high order bits) host part (low order bits) What s a subnet? device interfaces with same subnet part of IP address can physically reach each other without intervening router 223.1.1.1 223.1.2.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 223.1.2.2 223.1.3.27 subnet 223.1.3.2 network consisting of 3 subnets

Subnets 223.1.1.2 223.1.1.1 223.1.1.4 How many? 223.1.1.3 223.1.9.2 223.1.7.0 223.1.9.1 223.1.8.1 223.1.8.0 223.1.7.1 223.1.2.6 223.1.3.27 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2

IP addressing: CIDR CIDR: Classless InterDomain Routing subnet portion of address of arbitrary length address format: a.b.c.d/x, where x is # bits in subnet portion of address subnet part host part 11001000 00010111 00010000 00000000 200.23.16.0/23

Subnet Mask Subnet Mask is also 32 bit number Tells the router which bits of the IP address for the network or host portion Example of Subnet mask with prefix /24 In binary 11111111. 11111111. 11111111.00000000 Network part host part In decimal 255.2555.255.0

IPV4 SUBNETTING (Problem 1) Consider a router that interconnects three subnets: Subnet 1, Subnet 2, and Subnet 3. Suppose all of the interfaces in each of these three subnets are required to have the prefix 223.1.17/24. Also suppose that Subnet 1 is required to support at least 60 interfaces, Subnet 2 is to support at least 90 interfaces, and Subnet 3 is to support at least 12 interfaces. Provide three network addresses (of the form a.b.c.d/x) that satisfy these constraints. Subnet 1 Subnet 3 Subnet 2

Subnet 2 (90 interfaces) 2 n 2 90 Notice that we subtract 2 from the total number of available IP addresses because 2 IP addresses are reserved for the network and broadcast addresses. 2 n 92 Number of bits allocated to host part = n = 7 Number of bits allocated to network part = Prefix length = 32 -n = 32-7 = 25 Network address of first subnet = 223.1.17.0/25 = 223.1.17/25 To obtain the broadcast address of a subnet, we keep the network part of the subnet's network address as it is, and convert all bits in its host part to 1s 255.255.255.10000000 -> 255.255.255.11111111. Broadcast address of first subnet = 223.1.17.01111111/25 = 223.1.17.127/25

Subnet 1 (60 interfaces) 2 n 2 60 Notice that we subtract 2 from the total number of available IP addresses because 2 IP addresses are reserved for the network and broadcast addresses. 2 n 62 Number of bits allocated to host part = n = 6 Number of bits allocated to network part = Prefix length = 32 -n = 32-6 = 26 Network address of second subnet = 223.1.17.128/26 Broadcast address of second subnet = 223.1.17.10111111/26 =223.1.17.191/26

Subnet 3 (12 interfaces) 2 n 2 12 Notice that we subtract 2 from the total number of available IP addresses because 2 IP addresses are reserved for the network and broadcast addresses. 2 n 14 Number of bits allocated to host part = n = 4 Number of bits allocated to network part = Prefix length = 32 -n = 32-4 = 28 Network address of third subnet = 223.1.17.192/28 Broadcast address of third subnet = 223.1.17.10111111/26 =223.1.17.207/28

NAT: Network Address Translation

NAT: Network Address Translation rest of Internet 138.76.29.7 local network (e.g., home network) 10.0.0/24 10.0.0.4 10.0.0.1 10.0.0.2 10.0.0.3 Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual)

NAT Translation table example 2: NAT router changes datagram source addr from 10.0.0.1, 3345 to 138.76.29.7, 5001, updates table 2 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 10.0.0.1, 3345 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 10.0.0.4 S: 10.0.0.1, 3345 D: 128.119.40.186, 80 1 1: host 10.0.0.1 sends datagram to 128.119.40.186, 80 10.0.0.1 10.0.0.2 138.76.29.7 S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: Reply arrives dest. address: 138.76.29.7, 5001 S: 128.119.40.186, 80 D: 10.0.0.1, 3345 4 10.0.0.3

NAT (Problem 1) Consider the following figure Suppose that the ISP instead assigns : The router the address 24.34.112.235 The network address of the home network is 192.168.1/24. a. Assign addresses to all interfaces in the home network. b. Suppose each host has two ongoing TCP connections, all to port 80 at host 128.119.40.86. Provide the six corresponding entries in the NAT translation table.

NAT (Problem 1) Consider the following figure Suppose that the ISP instead assigns : The router the address 24.34.112.235 The network address of the home network is 192.168.1/24. a. Assign addresses to all interfaces in the home network. Network address of home network = 192.168.1.0/24 There are three hosts, and thus three interfaces, in the home network. One solution is to assign the first three usable host addresses of the home network for the hosts. These addresses are 192.168.1.1/24, 192.168.1.2/24 and 192.168.1.3/24. Assigning any three addresses between and excluding the home network s network and broadcast addresses is also acceptable.

NAT (Problem 1) Consider the following figure Suppose that the ISP instead assigns : The router the address 24.34.112.235 The network address of the home network is 192.168.1/24. b. Suppose each host has two ongoing TCP connections, all to port 80 at host 128.119.40.86. Provide the six corresponding entries in the NAT translation table.