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

Similar documents
Chapter 4: Network Layer

Router Architecture Overview

Master Course Computer Networks IN2097

Computer Networking Introduction

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

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

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

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

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

Network layer: Overview. Network Layer Functions

internet technologies and standards

internet technologies and standards

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

TDTS06: computer Networks

Network Layer: Internet Protocol

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

CSC 4900 Computer Networks: Network Layer

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

RSC Part II: Network Layer 3. IP addressing (2nd part)

CSC 401 Data and Computer Communications Networks

Chapter 4: network layer

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

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

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

CMPE 80N: Introduction to Networking and the Internet

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

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

Chapter 4 Network Layer

Chapter 4 Network Layer

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

Network Layer: DHCP, ICMP, NAT, IPv6

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

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

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

CS 3516: Advanced Computer Networks

NETWORK LAYER DATA PLANE

COMP211 Chapter 4 Network Layer: The Data Plane

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

COSC4377. TCP vs UDP Example Statistics

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

Chapter 4 Network Layer: The Data Plane

Network Layer: Data Plane 4-2

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

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

Chapter 4 Network Layer

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

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

Chapter 4 Network Layer

Network Layer: Router Architecture, IP Addressing

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. Network Layer 4-1

IPv4. Christian Grothoff.

The Network Layer Forwarding Tables and Switching Fabric

CSCD58 WINTER 2018 WEEK 6 - NETWORK LAYER PART 1. Brian Harrington. February 13, University of Toronto Scarborough

ECE 4450:427/527 - Computer Networks Spring 2017

Different Layers Lecture 20

CSCI Computer Networks Fall 2016

Lecture 17: Network Layer Addressing, Control Plane, and Routing

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

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Distributed Systems. 7. Network Layer. Werner Nutt

Internetworking With TCP/IP

Chapter 4 Network Layer: The Data Plane

CS 457 Lecture 11 More IP Networking. Fall 2011

Network layer Network Layer 4-1

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

CSCE 463/612 Networks and Distributed Processing Spring 2017

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

Network Layer: Control/data plane, addressing, routers

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

Network Technology 1 5th - Network Layer. Mario Lombardo -

Lecture 11: Middleboxes and NAT (Duct tape for IPv4)

Chapter 4 Network Layer

EPL606. Internetworking. Part 2a. 1Network Layer

3.7 TCP congestion. reliable data transfer. sliding window. Lecture 4: Transport layer III: flow control and congestion control & Network layer I: IP

Chapter IV: Network Layer

Chapter 4: Network Layer

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

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

Network Layer II. Getting IP addresses. DHCP client-server scenario. DHCP client-server scenario. C compiler. You writing assignment 2

Chapter 5. The Network Layer IP

CS 3516: Advanced Computer Networks

Summary Chapter 4. Smith College, CSC 249 March 2, q IP Addressing. q DHCP dynamic addressing

Chapter 4 Network Layer

CS 3516: Computer Networks

Network Layer: ICMP and Network Management

Internet Network Protocols IPv4/ IPv6

Introduction to Internetworking

EECS 3214: Computer Networks Protocols and Applications

Network layer. Key Network-Layer Functions. Network service model. Interplay between routing and forwarding. CSE 4213: Computer Networks II

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

Network Layer (4): ICMP

Internet Technology 3/23/2016

Transcription:

The Network layer Host, network layer functions: Network layer Routing protocols path selection R, OSPF, BGP Transport layer: TCP, forwarding table Link layer physical layer protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting signaling Network Layer 4-1 datagram format protocol version number header (bytes) type of data max number remaining hops (decremented at each ) upper layer protocol to deliver payload to how much overhead with TCP? 20 bytes of TCP 20 bytes of = 40 bytes + app layer overhead 32 bits head. type of ver len service fragment 16-bit identifier flgs time to upper header live layer checksum 32 bit source address 32 bit destination address Options (if any) data (variable, typically a TCP or segment) total datagram (bytes) for fragmentation/ reassembly E.g. timestamp, record route taken, specify list of s to visit. Network Layer 4-2 Fragmentation & Reassembly Fragmentation and Reassembly network links have MTU (max.transfer size) large datagram divided ( fragmented ) within net one datagram becomes several datagrams reassembled at final destination header bits used to identify, order related fragments reassembly fragmentation: in: one large datagram out: 3 smaller datagrams Example 4000 byte datagram MTU = 1500 bytes 1480 bytes in data field = 1480/8 =4000 =1500 =1500 =1040 One large datagram becomes several smaller datagrams =1 =1 =185 =370 Network Layer 4-3 Network Layer 4-4 Addressing: introduction address: 32-bit identifier for host, interface interface: connection between host/ and physical link s have multiple interfaces host typically has one interface address associated with each interface 7 = 11011111 00000001 00000001 00000001 223 1 1 1 Subnets address: subnet part (high order bits) host part (low order bits) What s a subnet? can physically reach each other without intervening 7 subnet network consisting of 3 subnets Network Layer 4-5 Network Layer 4-6 1

Subnets How many? 223.1.1.4 223.1.9.2 223.1.7.0 addressing: CR CR: Classless InterDomain Routing subnet portion of address of arbitrary address format: a.b.c.d/x, where x is # bits in subnet portion of address 223.1.9.1 223.1.8.1 223.1.2.6 223.1.7.1 223.1.8.0 7 subnet host part part 11001000 00010111 00010000 00000000 Network Layer 4-7 Network Layer 4-8 addresses: how to get one? Q: How does a host get address? hard-coded by system admin in a file : Dynamic Host Configuration Protocol: dynamically get address from as server plug-and-play : Dynamic Host Configuration Protocol Goal: host gets its address from server when it joins network Can renew its lease on address in use Allows reuse of addresses overview: host broadcasts discover msg [optional] server responds with offer msg [optional] host requests address: request msg server sends address: ack msg Network Layer 4-9 Network Layer 4-10 client-server scenario A B server 7 E arriving client needs address in this network client-server scenario server: 223.1.2.5 discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction : 654 offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 transaction : 654 Lifetime: 3600 secs request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 transaction : 655 time Lifetime: 3600 secs ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 transaction : 655 Lifetime: 3600 secs arriving client Network Layer 4-11 Network Layer 4-12 2

: more than address can also return : address of first-hop for client name and address of DNS sever network mask (indicating network versus host portion of address) : example 168.1.1.1 (runs ) connecting laptop needs its address, addr of firsthop, addr of DNS server: use request encapsulated in, encapsulated in, encapsulated in 802.1 ernet ernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at running server ernet demuxed to demuxed, demuxed to Network Layer 4-13 Network Layer 4-14 : example (runs ) DCP server formulates ACK containing client s address, address of first-hop for client, name & address of DNS server encapsulation of server, frame forwarded to client, demuxing up to at client client now knows its address, name and address of DSN server, address of its first-hop addresses: how to get one? Q: How does network get subnet part of addr? A: gets allocated portion of its provider ISP s address space ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23....... Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23 Network Layer 4-15 Network Layer 4-16 Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 Organization 0 Organization 0 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23.... Organization 7 200.23.30.0/23 Fly-By-Night-ISP ISPs-R-Us 200.23.16.0/20 199.31.0.0/16 Organization 2 200.23.20.0/23.... Organization 7 200.23.30.0/23 Organization 1 200.23.18.0/23 Fly-By-Night-ISP ISPs-R-Us 200.23.16.0/20 199.31.0.0/16 or 200.23.18.0/23 Network Layer 4-17 Network Layer 4-18 3

addressing: the last word... Q: How does an ISP get block of addresses? A: ICANN: Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes rest of All datagrams leaving local network have same single source NAT address:, different source port numbers local network 10.0.0/24 Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) 10.0.0.2 10.0.0.3 Network Layer 4-19 Network Layer 4-20 Motivation: local network uses one external address: range of addresses not needed from ISP: just one address for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus). Network Layer 4-21 Implementation: NAT must: outgoing datagrams: replace (source address, port #) of every outgoing datagram to (NAT address, new port #)... remote clients/servers will respond using (NAT address, new port #) as destination addr. remember (in NAT translation table) every (source address, port #) to (NAT address, new port #) translation pair incoming datagrams: replace (NAT address, new port #) in dest fields of every incoming datagram with corresponding (source address, port #) stored in NAT table Network Layer 4-22 2: NAT changes datagram source addr from, 3345 to, 5001, updates table 2 NAT translation table WAN side addr LAN side addr, 5001, 3345 S:, 5001 D: 128.119.40.186, 80 S: 128.119.40.186, 80 D:, 5001 3 3: Reply arrives dest. address:, 5001 S:, 3345 D: 128.119.40.186, 80 1 S: 128.119.40.186, 80 D:, 3345 4 1: host sends datagram to 128.119.40.186, 80 10.0.0.2 10.0.0.3 4: NAT changes datagram dest addr from, 5001 to, 3345 16-bit port-number field: 60,000 simultaneous connections with a single LAN-side address! NAT is controversial: s should only process up to layer 3 violates end-to-end argument NAT possibility must be taken into account by app designers, e.g., P2P applications address shortage should instead be solved by v6 Network Layer 4-23 Network Layer 4-24 4

NAT traversal problem client wants to connect to server with address server address local to LAN (client can t use it as destination addr) only one externally visible NATed address: solution 1: statically configure NAT to forward incoming connection requests at given port to server e.g., (123.76.29.7, port 2500) always forwarded to port 25000 Client? NAT NAT traversal problem solution 2: Universal Plug and Play (UPnP) Allows NATed host to: learn public address () add/remove port mappings (with lease times) NAT IGD Network Layer 4-25 Network Layer 4-26 NAT traversal problem ICMP: Control Message Protocol solution 3: relaying (used in Skype) NATed client establishes connection to relay External client connects to relay relay bridges packets between connections Client 2. connection to relay initiated by client 3. relaying established 1. connection to relay initiated by NATed host NAT communicate network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping) network-layer above : ICMP msgs carried in datagrams ICMP message: type, code plus first 8 bytes of datagram causing error Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 discovery 11 0 TTL expired 12 0 bad header Network Layer 4-27 Network Layer 4-28 Traceroute and ICMP Source sends series of segments to dest first has TTL =1 second has TTL=2, etc. Unlikely port number When nth datagram arrives to nth : discards datagram and sends to source an ICMP message (type 11, code 0) ICMP message includes name of & address when ICMP message arrives, source calculates RTT traceroute does this 3 times Stopping criterion segment eventually arrives at destination host destination returns ICMP port unreachable packet (type 3, code 3) when source gets this ICMP, stops. Network Layer 4-29 5