Master Course Computer Networks IN2097

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

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

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

Chapter 4: Network Layer

Router Architecture Overview

Computer Networking Introduction

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

internet technologies and standards

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

Network Layer: Internet Protocol

CSCI Computer Networks Fall 2016

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

CSC 401 Data and Computer Communications Networks

Network layer: Overview. Network Layer Functions

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

Chapter 4: network layer

TDTS06: computer Networks

COMP211 Chapter 4 Network Layer: The Data Plane

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

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

internet technologies and standards

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

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

CMPE 80N: Introduction to Networking and the Internet

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

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

Chapter 4 Network Layer

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

Chapter 4 Network Layer

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

CS 3516: Advanced Computer Networks

Lecture 3. The 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

IPv4. Christian Grothoff.

CS 3516: Advanced Computer Networks

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer: The Data Plane

Network Layer: Data Plane 4-2

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

CSC 4900 Computer Networks: Network Layer

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

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Chapter 4 Network Layer: The Data Plane

Chapter 4 Network Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

Network Layer: Router Architecture, IP Addressing

Network Layer: Control/data plane, addressing, routers

Chapter 4 Network Layer: The Data Plane

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

The Network Layer Forwarding Tables and Switching Fabric

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

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

CS 3516: Computer Networks

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

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

Chapter 4 Network Layer: The Data Plane

Chapter 4: Network Layer

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

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

EPL606. Internetworking. Part 2a. 1Network Layer

Distributed Systems. 7. Network Layer. Werner Nutt

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

Chapter 4 Network Layer: The Data Plane

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

CSC 401 Data and Computer Communications Networks

Network Layer: DHCP, ICMP, NAT, IPv6

Network layer Network Layer 4-1

Lecture 16: Network Layer Overview, Internet Protocol

Internetworking With TCP/IP

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

Chapter 4 Network Layer: The Data Plane

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

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

Different Layers Lecture 20

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

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

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

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

EECS 3214: Computer Networks Protocols and Applications

RSC Part II: Network Layer. 3. IP addressing. II.5 Network routing. II. 1 Basic Network layer concepts II.2 Introduction to IP

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

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

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

Chapter 4 Network Layer

CS 457 Lecture 11 More IP Networking. Fall 2011

COSC4377. TCP vs UDP Example Statistics

Chapter 4 Network Layer

Information Network Systems The network layer. Stephan Sigg

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 5. The Network Layer IP

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Chapter IV: Network Layer

Network Layer (4): ICMP

Transcription:

Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU München Master Course Computer Networks IN2097 Prof. Dr.-Ing. Georg Carle Christian Grothoff, Ph.D. Chair for Network Architectures and Services Institut für Informatik Technische Universität München http://www.net.in.tum.de

Chapter 4: Network Layer Chapter goals: understand principles behind layer services: layer service models forwarding versus routing how a router works routing (path selection) dealing with scale advanced topics: IPv6, mobility instantiation, implementation in the Internet Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 2

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 NAT and NAT Traversal Virtual circuit and datagram s What s inside a router Part 3 Routing algorithms Link state Distance Vector Hierarchical routing Routing in the Internet RIP OSPF BGP Broadcast and multicast routing Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 3

Network layer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side, delivers segments to transport layer layer protocols in every host, router router examines header fields in all IP datagrams passing through it application transport data link physical data link physical data link physical data link physical data link physical data link physical data link physical data link physical data link physical data link physical data link physical data link physical application transport data link physical Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 4

Two Key Network-Layer Functions routing: determine route taken by packets from source to dest. routing algorithms forwarding: move packets from router s input to appropriate router output analogy: routing: process of planning trip from source to dest forwarding: process of getting through single interchange Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 5

Interplay between routing and forwarding routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 value in arriving packet s header 0111 1 3 2 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 6

Datagram s no call setup at layer routers: no state about end-to-end connections no -level concept of connection packets forwarded using destination host address packets between same source-dest pair may take different paths application transport data link physical 1. Send data 2. Receive data application transport data link physical Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 7

Forwarding table 4 billion possible entries Destination Address Range Link Interface 11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111 otherwise 3 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 8

Longest prefix matching Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011000 1 11001000 00010111 00011 2 otherwise 3 Examples DA: 11001000 00010111 00010110 10100001 Which interface? DA: 11001000 00010111 00011000 10101010 Which interface? Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 9

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 NAT and NAT Traversal Virtual circuit and datagram s What s inside a router Part 3 Routing algorithms Link state Distance Vector Hierarchical routing Routing in the Internet RIP OSPF BGP Broadcast and multicast routing Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 10

The Internet Network layer Host, router layer functions: 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 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 11

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 overhead ver head. len 16-bit identifier time to live type of service upper layer 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 or UDP segment) total datagram length (bytes) for fragmentation/ reassembly E.g. timestamp, record route taken, specify list of routers to visit. Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 12

IP Fragmentation & Reassembly 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 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 13

IP Fragmentation and Reassembly Example 4000 byte datagram MTU = 1500 bytes length =4000 ID =x fragflag =0 offset =0 One large datagram becomes several smaller datagrams 1480 bytes in data field offset = 1480/8 length =1500 length =1500 length =1040 ID =x ID =x ID =x fragflag =1 fragflag =1 fragflag =0 offset =0 offset =185 offset =370 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 14

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 NAT and NAT Traversal Virtual circuit and datagram s What s inside a router Part 3 Routing algorithms Link state Distance Vector Hierarchical routing Routing in the Internet RIP OSPF BGP Broadcast and multicast routing Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 15

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 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 16

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.1.2 223.1.2.1 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.27 223.1.2.2 subnet 223.1.3.1 223.1.3.2 consisting of 3 subnets Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 17

Subnets Recipe To determine the subnets, detach each interface from its host or router, creating islands of isolated s. Each isolated is called a subnet. 223.1.1.0/24 223.1.2.0/24 223.1.3.0/24 Subnet mask: /24 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 18

Subnets 223.1.1.2 How many? 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 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 19

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 11001000 00010111 00010000 00000000 200.23.16.0/23 host part Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 20

IP addresses: how to get one? Q: How does a host get IP address? hard-coded by system admin in a file Windows: control-panel->->configuration->tcp/ip- >properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server plug-and-play Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 21

DHCP: Dynamic Host Configuration Protocol Goal: allow host to dynamically obtain its IP address from server when it joins Can renew its lease on address in use Allows reuse of addresses (only hold address while connected an on ) Support for mobile users who want to join (more shortly) DHCP overview: host broadcasts DHCP discover msg DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 22

DHCP client-server scenario A 223.1.1.1 DHCP server 223.1.2.1 B 223.1.1.2 223.1.1.4 223.1.2.9 223.1.2.2 223.1.1.3 223.1.3.27 223.1.3.1 223.1.3.2 E arriving DHCP client needs address in this Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 23

DHCP client-server scenario DHCP server: 223.1.2.5 DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 arriving client time DHCP request DHCP offer src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 24

IP addresses: how to get one? Q: How does get subnet part of IP 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 200.23.16.0/23 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 IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 25

Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 200.23.16.0/23 Organization 1 200.23.18.0/23 Organization 2 200.23.20.0/23 Organization 7.... Fly-By-Night-ISP Send me anything with addresses beginning 200.23.16.0/20 Internet 200.23.30.0/23 ISPs-R-Us Send me anything with addresses beginning 199.31.0.0/16 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 26

Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 Organization 0 200.23.16.0/23 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 Send me anything with addresses beginning 200.23.16.0/20 Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23 Internet Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 27

IP addressing: the last word... Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 28

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 NAT and NAT Traversal Virtual circuit and datagram s What s inside a router Part 3 Routing algorithms Link state Distance Vector Hierarchical routing Routing in the Internet RIP OSPF BGP Broadcast and multicast routing Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 29

ICMP: Internet Control Message Protocol used by hosts & routers to communicate -level information error reporting: unreachable host,, port, protocol echo request/reply (used by ping) -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. unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest 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 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 30

Traceroute and ICMP Source sends series of UDP segments to dest First has TTL =1 Second has TTL=2, etc. Unlikely port number When nth datagram arrives to nth router: Router discards datagram And sends to source an ICMP message (type 11, code 0) Message includes name of router& IP address When ICMP message arrives, source calculates RTT Traceroute does this 3 times Stopping criterion UDP segment eventually arrives at destination host Destination returns ICMP host unreachable packet (type 3, code 3) When source gets this ICMP, stops. Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 31