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

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

Chapter 4 Network Layer

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

Network layer: Overview. Network Layer Functions

Chapter 4 Network Layer. Network Layer 4-1

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

Master Course Computer Networks IN2097

Network Layer: Internet Protocol

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

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

CSCE 463/612 Networks and Distributed Processing Spring 2017

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

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Network layer functions

Router Architecture Overview

CSCD 330 Network Programming Spring 2018

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

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

CSCD 330 Network Programming Spring 2017

Chapter 4: Network Layer

Announcement. Project 2 extended to 2/20 midnight Project 3 available this weekend Homework 3 available today, will put it online

Chapter 4: Network Layer

Chapter 4: Network Layer

EE 122: Intra-domain routing

Module 3 Network Layer CS755! 3-1!

internet technologies and standards

Why dynamic route? (1)

CS 3516: Advanced Computer Networks

Lecture 19: Network Layer Routing in the Internet

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

CS 3516: Computer Networks

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

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

Topics for This Week

Chapter 4: Network Layer, partb

Chapter 4: Network Layer

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

CMPE 80N: Introduction to Networking and the Internet

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

Antonio Cianfrani. Routing Protocols

CSC 401 Data and Computer Communications Networks

Chapter 4: Network Layer

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

CSCI Computer Networks Fall 2016

CSC 4900 Computer Networks: Routing Algorithms

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

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

Interplay between routing, forwarding

Computer Networks ICS 651. IP Routing RIP OSPF BGP MPLS Internet Control Message Protocol IP Path MTU Discovery

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Network layer Network Layer 4-1

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer. Chapter goals:

CS118 Discussion 1A, Week 6. Zengwen Yuan Dodd Hall 78, Friday 10:00 10:50 a.m.

Chapter 5 Network Layer: The Control Plane

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

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

CSC 4900 Computer Networks: Routing Protocols

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

Department of Computer Science Southern Illinois University Carbondale

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

CSC 8560 Computer Networks: Control Plane

CSc 450/550 Computer Networks Internet Routing

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

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

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

DATA COMMUNICATOIN NETWORKING

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

internet technologies and standards

Telematics I. Chapter 7 Network Layer

Dynamic Routing. The Protocols

Network Layer: Control/data plane, addressing, routers

TDTS06: computer Networks

Network Layer. CMPS 4750/6750: Computer Networks

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

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

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

UNIT III THE NETWORK LAYER

Computer Networks II IPv4 routing

IPv4. Christian Grothoff.

ECE 428 Internet Protocols (Network Layer: Layer 3)

Lecture 16: Network Layer Overview, Internet Protocol

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

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

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

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Chapter 4 Network Layer

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

Network Layer: ICMP and Network Management

COSC4377. TCP vs UDP Example Statistics

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

EECS 3214: Computer Networks Protocols and Applications

Networking: Network layer

Network Layer: Routing

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

Chapter 4: network layer

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

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

Transcription:

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

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 ver head. len 16-bit identifier time to live type of service upper layer 32 bits flgs length fragment offset Internet 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, pecify list of routers to visit.

IP Fragmentation & Reassembly network links have MTU (max.transfer unit) - 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

IP Fragmentation and Reassembly MTU = 1500 Byte Offset: The fragments are numbered on the basis of the position of their first data byte in the original packet Counted in blocks of 8 bytes ( fragment length must be a multiple of 8) Three fragments: - 1480 Byte (offset=0) - 1480 Byte (offset= 1480/8) - 1020 Byte (offset= 2960/8) length =4000 ID =x length =1500 length =1500 length =1040 fragflag =0 ID =x ID =x ID =x offset =0 fragflag =1 fragflag =1 fragflag =0 offset =0 offset =185 offset =370

Private IP addresses Problem: there are not enough IP addresses to be assigned to all Internet devices Introduction of private IP addresses: to be used only in the private networks (RFC 1918)

Private IP addresses Advantages No need to request public IP addresses for many devices (not all!) Reduction of public IP addresses Security improvement: real devices IP addresses hidden Drawbacks: Extra-load for access routers Breaking of the layers separation rule NAT: Network Address Translation protocol IPv6: IP addresses of 128 bit

NAT NAT router: a local interface and a public interface. The public interface has a public IP address (assigned by an ISP). The single public IP address will allow all hosts of the private network to connect to Internet. NAT operation: modifying IP header (source or destination IP address) and using port numbers. Private Network Public Network 192.168.10.0/24 NAT Router 192.168.10.2 192.168.10.254 209.235.168.3 Internet 192.168.10.3

NAT Private Network Public Network 192.168.1.2 SP 1024 SA 192.168.1.2 NAT SP 55001 SA 209.235.168.3 Internet 192.168.1.3 SA = Source IP Address SP = Source Port Inside Local IP Address & port NAT Table Inside Global IP Address & port 151.100.37.12:80 SERVER HTTP 192.168.1.2:1024 192.168.1.3:1723 209.235.168.3:55001 209.235.168.3:55002

IP packet forwarding IP router actions to be performed for each incoming packet: reading the IP destination field of the incoming packet; looking at the IP routing table to find the longest prefix matching for the IP destination address; detecting the next-hop router toward the destination; forwarding the packet toward the proper outgoing interface; 1 2 3 IP IP

The IP routing table is present in all network routers and hosts Routing information about known destination networks Each row is dedicated to a specific destination network and contains the following fields: N, the IP destination network M, the destination netmask IP routing table NH, the IP address of the first router (the next-hop router) in the path toward the destination I, the outgoing interface to reach the destination The Longest Prefix Matching rule is used: Given D as the IP destination address, for each row i the following operation is performed: If [D AND M(i)] = N then Matching(i)=M(i) The rule having the greatest Matching(i) value is used to forward the packet

IP routing table Rete 11.0.0.0/8 11.0.0.5 20.0.0.5 20.0.0.6 Tabella di instradamento di R2 130.11.0.6 213.2.97.7 eth0 Rete Rete R1 20.0.0.0/8 R2 R3 130.11.0.0/16 eth1 130.11.0.7 213.2.98.12 Rete 213.2.97.0/24 INTERNET Rete 213.2.98.0/24 Destinazione N Maschera M Next hop NH Interfaccia I 20.0.0.0 255.0.0.0 d.c. (20.0.0.6) eth0 130.11.0.0 255.255.0.0 d.c. (130.11.0.6) eth1 11.0.0.0 255.0.0.0 20.0.0.5 eth0 213.2.97.0 255.255.255.0 130.11.0.7 eth1 213.2.98.0 255.255.255.0 130.11.0.7 eth1 0.0.0.0 0.0.0.0 130.11.0.7 eth1

Static and dynamic routing Routing tables are computed/configured on the basis of network paths: Static Routing (configuration performed by network administrator); Dynamic Routing (exchange of control packets among routers Routing Protocols). Static Routing: manual configuration; not scalable; (very) slow to react to network changes.

Autonomous System An Autonomous System (AS) is a portion of Internet (routers and networks) managed by a single administrative entity An AS is identified by means of a 16 bit string (AS number) A routing protocol in each AS (chosen by the network administrator) A single routing protocol for the path computation among ASes (agreement) Routing protocol classification: 1) Distance Vector vs Link State 2) Intra-AS vs Inter-AS

Intra-AS and Inter-AS routing a Host h1 C.b AS13 b a d c b Intra-AS routing within AS 3 AS 3 A.a Inter-AS routing between AS3 and AS 88 A.c B.a Host c h2 a b AS 88 Intra-AS routing within AS 88

Routing Routing protocol Goal: determine good path (sequence of routers) thru network from source to dest. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links link cost: delay, $ cost, or congestion level A 1 2 5 B D 2 3 1 3 good path: C E 1 5 2 F typically means minimum cost path other def s possible

Routing Algorithm classification Global or local network knowledge? Global: all routers have complete topology, link cost info Link State algorithm Local: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors Distance Vector algorithms

A Link-State Routing Algorithm Dijkstra s algorithm network topology, link costs known to all nodes Flooding mechanism All nodes have same info computes least cost paths from one node ( source ) to all other nodes gives routing table for that node iterative: after k iterations, know least cost path to k dest. s Notation: c(i,j): link cost from node i to j. cost infinite if not direct neighbors D(v): current value of cost of path from source to dest. V p(v): predecessor node along path from source to v, that is next v N: set of nodes whose least cost path definitively known

Dijsktra s Algorithm 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(a,v) 6 else D(v) = infty 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N

Dijkstra s algorithm, discussion Algorithm complexity: n nodes O(n**2) more efficient implementations possible: O(nlogn) Re-computation: The whole algorithm must be executed if a network change happens: Link cost change Link failure/insertion Node failure/insertion

Distance Vector Routing Algorithm distributed: each node communicates only with directly-attached neighbors iterative: continues until no nodes exchange info. self-terminating: no signal to stop asynchronous: nodes need not exchange info/iterate in lock step! Distance Table data structure each node has its own row for each possible destination column for each directlyattached neighbor to node example: in node X, for dest. Y via neighbor Z: X D (Y,Z) = = distance from X to Y, via Z as next hop Z c(x,z) + min {D (Y,w)} w

Internet Routing Protocols Intra-AS, also known as Interior Gateway Protocols (IGP) RIP: Routing Information Protocol Distance Vector Link cost equal to 1 hop count OSPF: Open Shortest Path First Link State Link cost inversely proportional to its bandwidth Inter-AS, also known as Exterior Gateway Protocols (EGP) BGP: Border Gateway Protocol Path Vector protocol (the entire path is notified) Path: list of ASes crossed

ICMP: Internet Control Message Protocol used by hosts, routers, gateways to communication network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping and traceroute) network-layer above IP: ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP 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 router discovery 11 0 TTL expired 12 0 bad IP header

Exercise Subnetting from 192.168.0.0/24 Routing table of B pc-net 100 host A x-net-1 20 host B Link-1 Link-3 ws-net 50 host Link-2 INTERNET C