Lecture 16: Network Layer Overview, Internet Protocol

Similar documents
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

CSC 401 Data and Computer Communications Networks

Chapter 4 Network Layer: The Data Plane

COMP211 Chapter 4 Network Layer: The Data Plane

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

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

Chapter 4 Network Layer: The Data Plane

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

Topic 4a Router Operation and Scheduling. Ch4: Network Layer: The Data Plane. Computer Networking: A Top Down Approach

Network Layer: Router Architecture, IP Addressing

CSCI Computer Networks Fall 2016

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 4: network layer

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

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

Network Layer: Data Plane 4-2

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

CSC 4900 Computer Networks: Network Layer

Chapter 4 Network Layer

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

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

TDTS06: computer Networks

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

Chapter 4 Network Layer: The Data Plane

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

Network Layer: Control/data plane, addressing, routers

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

Router Architecture Overview

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

CS 3516: Advanced Computer Networks

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

Chapter 4 Network Layer: The Data Plane

CSC 401 Data and Computer Communications Networks

CS 3516: Computer Networks

internet technologies and standards

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

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

Chapter 4: Network Layer

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

internet technologies and standards

CSE 3214: Computer Network Protocols and Applications Network Layer

Chapter 4. Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, sl April 2009.

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

NETWORK LAYER DATA PLANE

Master Course Computer Networks IN2097

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

Network layer: Overview. Network Layer Functions

CPSC 826 Internetworking. The Network Layer: Routing & Addressing Outline. The 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)

The Network Layer Forwarding Tables and Switching Fabric

CMSC 332 Computer Networks Network Layer

Lecture 20: Link Layer

Chapter 4 Network Layer

CMPE 80N: Introduction to Networking and the Internet

Computer Networks. Instructor: Niklas Carlsson

Chapter 4 Network Layer

Chapter 4 Network Layer: The Data Plane

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

Chapter 4 Network Layer

Chapter 4 Network Layer: The Data Plane

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

Lecture 2: Internet Structure

Network Layer: Internet Protocol

Network Layer: outline

Chapter 4: Network Layer

Key Network-Layer Functions

Lecture 13: Transport Layer Flow and Congestion Control

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

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

HW3 and Quiz. P14, P24, P26, P27, P28, P31, P37, P43, P46, P55, due at 3:00pm with both soft and hard copies, 11/11/2013 (Monday) TCP), 20 mins

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

Internet protocol stack

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

Lecture 19: Network Layer Routing in the Internet

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

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

Lecture 7. Network Layer. Network Layer 1-1

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

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

LS Example 5 3 C 5 A 1 D

Computer Networks LECTURE 10 ICMP, SNMP, Inside a Router, Link Layer Protocols. Assignments INTERNET CONTROL MESSAGE PROTOCOL

Internet Technology 3/23/2016

Computer Networking Introduction

cs144 Midterm Review Fall 2010

Network Layer. CMPS 4750/6750: Computer Networks

Lecture 9: Transpor Layer Overview and UDP

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

Network layer overview

Information Network Systems The network layer. Stephan Sigg

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

Internetworking With TCP/IP

EPL606. Internetworking. Part 2a. 1Network Layer

ECE 158A: Lecture 7. Fall 2015

ECE 4450:427/527 - Computer Networks Spring 2017

Transcription:

Lecture 16: Network Layer Overview, Internet Protocol COMP 332, Spring 2018 Victoria Manfredi Acknowledgements: materials adapted from Computer Networking: A Top Down Approach 7 th edition: 1996-2016, J.F Kurose and K.W. Ross, All Rights Reserved as well as from slides by Abraham Matta at Boston University, and some material from Computer Networks by Tannenbaum and Wetherall.

1. Announcements homework 6 posted discuss: UDP ping server, chat server + reliability midterm graded 2. Network layer overview what s inside a router Internet protocol (IP) 3. Addressing IPv4 addressing usage in routing how to get an IP address IPv6 addressing Dynamic Host Configuration Protocol (DHCP) Network Address Translation (NAT) 2

Network Layer vumanfredi@wesleyan.edu 3

Goal move pkt from one host to another How done on Internet? routers examine header fields in every IP pkt determines outgoing link 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 Internet e2e argument some functionality only properly implemented in end systems smart hosts vs. dumb routers network data link physical network data link physical network data link physical application transport network data link physical Network layer is in every host and router on Internet vumanfredi@wesleyan.edu 4

Sender encapsulates segments into packets, puts src, dest IP in IP pkt hdr Receiver decapsulates packets into segments, delivers to transport layer Max len of TCP data in bytes MSS: Max Segment Size MSS = MTU IP hdr TCP hdr TCP header >= 20bytes Max len of IP packet in bytes MTU: Max Transmission Unit 1500 bytes if Ethernet used as link layer protocol IP pkt IP data TCP data TCP hdr TCP segment IP hdr 5

1. Control plane comprises traffic only between routers, to compute routes between src and dst network-wide: routers run routing algorithms Trip analogy Plan trip from src to dst 2. Data plane comprises traffic between end hosts, forwarded by routers forwarding table set based on routes computed in control plane local: each router stores, forwards packets Get through one interchange vumanfredi@wesleyan.edu 6

Routing (slower time scale) routers view Internet as graph run shortest path algorithms Forwarding (faster time scale) routers use paths to choose best output link for packet destination IP address if one link fails, chooses another Routing algorithm Local forwarding table Dest IP Output link 129.133.*.* 43.*.*.* 43.56.*.* 189.37.35.* 2 3 3 1 3 1 2 2 control-plane approaches 1. traditional routing algorithms implemented in routers 2. software-defined networking (SDN) implemented in (remote) servers Dest IP addr in header of arriving packet vumanfredi@wesleyan.edu 7

Individual routing algorithm components in each and every router interact in the control plane Routing Algorithm Local forwarding table header 0100 0110 0111 1001 output 3 2 2 1 Control plane Data plane Values in arriving packet header 0111 3 1 2 vumanfredi@wesleyan.edu 8

A distinct (typically remote) controller interacts with local control agents (CAs) Remote Controller CA Control plane Data plane CA CA CA CA Values in arriving packet header 0111 1 3 2 vumanfredi@wesleyan.edu 9

Q: What service model does network layer provide to transport layer for moving packets from sender to receiver? Example services individual packets guaranteed delivery guaranteed delivery with less than 40 ms delay flow of packets in-order packet delivery guaranteed minimum bandwidth to flow restrictions on changes in inter-packet spacing vumanfredi@wesleyan.edu 10

Network Architecture Service Model Bandwidth Guarantees? Loss Order Timing Congestion feedback Internet ATM ATM ATM ATM best effort CBR VBR ABR UBR none constant rate guaranteed rate guaranteed minimum none no yes yes no no no yes yes yes yes no yes yes no no no (inferred via loss) no congestion no congestion yes no ATM: Asynchronous Transfer Mode e.g., used in public switched telephone network vumanfredi@wesleyan.edu 11

Network Layer vumanfredi@wesleyan.edu 12

Run routing protocols (control) and store and forward pkts (data) pkt pkt physical link network Routing processor: run routing algorithms, maintain routing state high-speed switching fabric: connects inputs to outputs Control plane - complex Routing management (software) Operates in millisecond timescale Data plane - simple Forwarding (hardware) Operates in nanosecond timescale High-level view of generic router architecture Router input ports Router output ports Port is an interface not a socket 13

line termination link layer protocol (receive) lookup, forwarding queueing switch fabric Physical layer: bit-level reception, terminate phys. conn. Data link layer: e.g., Ethernet processing, error-checking, de-capsulation, Network layer validate/update checksum, decrement TTL switching: use header field values, lookup output port queue: if packets arrive faster than forwarding rate into switch fabric vumanfredi@wesleyan.edu 14

Transfer packet from input buffer to appropriate output buffer Switching rate rate at which packets can be transferred from inputs to outputs N inputs: switching rate = N x line rate desirable 3 types of switching fabrics memory Memory Bus Crossbar Speed limited by memory bandwidth Speed limited by bus contention Forward multiple pkts in parallel 15

Switching fabric slower than input ports combined queueing may occur at input queues queueing delay and loss due to input buffer overflow! Head-of-the-Line (HOL) blocking queued pkt at front of queue prevents others from moving forward switch fabric switch fabric Output port contention: only one red datagram can be transferred. Lower red packet is blocked One packet time later: green packet experiences HOL blocking 16

This slide in HUGELY important! switch fabric datagram buffer queueing link layer protocol (send) line termination Buffering when packets arrive from fabric faster than transmission rate packet loss: due to congestion, lack of buffers Scheduling chooses next among queued packets to transmit on link net neutrality: who gets best performance vumanfredi@wesleyan.edu 17

FIFO (first in first out) send in order of arrival to queue Priority multiple classes, with different priorities (e.g., based on hdr info) send highest priority queued packet Round robin scheduling multiple classes, cyclically scan class queues send one packet from each class (if available) Weighted fair queueing packet arrivals queue (waiting area) generalized round robin each class gets weighted amount of service in each cycle link (server) packet departures In practice: hardware queues use FIFO, need software to do priority 18

Network Layer vumanfredi@wesleyan.edu 19

THE network layer protocol of the Internet protocol your device must implement to run on Internet RFC published ~1980 Provides best effort service to get pkts from one end host to another across many interconnected networks using dst IP address in IP hdr addressing format and usage of addresses fragmentation e.g., if pkt size exceeds Ethernet MTU of 1500 bytes some error detection Q: what does IP not provide? QoS, reliability, ordering, persistent state for e2e flows, connections 20

Network layer functions on hosts and routers transport layer: TCP, UDP Network layer Routing protocols path selection RIP, OSPF, BGP forwarding table IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router signaling link layer physical layer vumanfredi@wesleyan.edu 21

Not widely used IP protocol version number header length (# of 32bit words) max number remaining hops (decremented at each router) upper layer protocol to deliver payload to ICMP=1, UDP=17, TCP=6 ver head. len 16-bit identifier time to live type of service upper layer Q: Why is version 1 st? So you know how to parse pkt 32 bits 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 segment or UDP datagram) total packet length (bytes) for fragmentation/ reassembly e.g. timestamp, record route taken, specify routers to visit. When used usually indicate suspicious activity How much overhead? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead 1-22 Bits transmitted left to right, top to bottom

Look at IP headers and ping/traceroute vumanfredi@wesleyan.edu 1-23

Network links have MTU largest possible link-level frame different link types have different MTUs Fragment when pkt > MTU 1 pkt becomes several pkts IP header bits used to identify, order related fragments reassembled only at final dest re-fragmentation possible don t recover from lost fragments (IPv6 does not support) reassembly vumanfredi@wesleyan.edu fragmentation: in: one large pkt out: 3 smaller pkts DoS attack: send fragmented pkts but leave one out 24

4000 byte packet 3980 bytes payload IP hdr >=20 bytes MTU = 1500 bytes length =4000 ID =x fragflag =0 1480 bytes in data field offset =0 length =1500 ID =x fragflag =1 offset =0 One large pkt becomes several smaller pkts length =1500 length =1040 ID =x ID =x fragflag =1 fragflag =0 offset =185 offset =370 offset = 1480/8 = 185 Identify as last segment 25

Addressing vumanfredi@wesleyan.edu 26

Globally unique 32-bit identifier associated with host or router interface Interface: connection between host/router and physical link host: usually 1 or 2 interfaces router: usually many interfaces 223.1.1.1 Hierarchical subnet part variable len# of high order bits assigned by ICANN host part variable len # of low order bits network + host 223.1.1.2 223.1.1.3 223.1.2.1 223.1.1.4 223.1.2.9 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 27

Pros scalable: routers don t need to look at host part all pkts on same network forwarded in same direction only when pkt reaches network does host matter Cons every IP addr belongs to specific network but what if host moves networks and wants to keep same addr? mobile IP contrast with fixed Ethernet link layer addr 28

Q: how are interfaces actually connected? A: see Ch 5, 6. 223.1.1.2 223.1.1.1 223.1.1.4 223.1.2.9 223.1.2.1 223.1.1.3 223.1.3.27 223.1.2.2 A: wired Ethernet interfaces connected by Ethernet switches 223.1.3.1 223.1.3.2 For now: don t worry about how one interface is connected to another (with no intervening router) A: wireless WiFi interfaces connected by WiFi base station vumanfredi@wesleyan.edu 29

IP address subnet part: high order bits host part: low order bits What s a subnet? set of interfaces that all have same subnet part of IP addr devices can reach other without intervening routers Subnet mask divides IP addr into subnet addr + host addr included in routing protocol info given to routers 223.1.1.1 223.1.1.3 Network comprising 3 subnets vumanfredi@wesleyan.edu 223.1.1.2 223.1.2.1 223.1.1.4 223.1.2.9 223.1.3.1 223.1.3.27 223.1.2.2 subnet 223.1.3.2 30

Recipe to find subnets detach each interface from its host or router create islands of isolated networks 223.1.1.0/24 223.1.2.0/24 223.1.1.1 223.1.1.2 223.1.2.1 223.1.1.4 223.1.2.9 Each isolated network is called a subnet 223.1.1.3 223.1.3.1 223.1.2.2 223.1.3.27 subnet 223.1.3.2 223.1.3.0/24 subnet mask: /24 vumanfredi@wesleyan.edu 31

223.1.1.2 223.1.1.1 223.1.1.4 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 vumanfredi@wesleyan.edu 32

Allows more fine-grained division of blocks of addresses Subnet masks define variable partition of host part of addresses e.g., /23 subnet mask: 11111111 11111111 11111110 00000000 logical and of subnet mask with addr Address format if a and b are both 1 then 1 otherwise 0 a.b.c.d/x, where x is # bits in subnet portion of address subnet part 11001000 00010111 00010000 00000000 200.23.16.0/23 host part 33

Suppose we must have 223.1.1 as network prefix we need block of 90 addresses 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 What should subnet mask be? how many bits for 90 addresses? 128 64 32 16 8 4 2 1 223.1.1.0/24 gives 256 addresses [0-255] 0 2 6 2 5 2 4 2 3 2 2 2 1 2 0 64 32 16 8 4 2 1 223.1.1.0/25 gives 128 addresses [0-127] 1 2 6 2 5 2 4 2 3 2 2 2 1 2 0 64 32 16 8 4 2 1 223.1.1.128/25 gives a different set of 128 addresses [128-255] vumanfredi@wesleyan.edu 34

Private subnet (used in NAT), do not appear on Internet 172.16-31.*.* 10.*.*.* 192.168.*.* Loopback address: 127.*.*.* Addresses you can t assign to devices *.*.*.255: broadcast addr *.*.*.0: used for subnet name Broadcast address 255.255.255.255: broadcast to all hosts on network indicated if no mask: local network if mask: broadcast on that network Address when device booting up 0.0.0.0 35