Master Course Computer Networks IN2097

Similar documents
IP addressing and forwarding Network layer

Chapter 4 Network Layer

Network layer: Overview. Network layer functions IP Routing and forwarding

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Classful IP Addressing. Classless Addressing: CIDR. Routing & Forwarding: Logical View of a Router. IP Addressing: Basics

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Chapter 4 Network Layer

DHCP, ICMP, IPv6. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley DHCP. DHCP UDP IP Eth Phy

8.2 The Internet Protocol

Master Course Computer Networks IN2097

Internet Protocol: IP packet headers. vendredi 18 octobre 13

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

IP - The Internet Protocol

Transport and Network Layer

Lecture Computer Networks

Subnetting,Supernetting, VLSM & CIDR

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

Network Layer 4- density - A Top Down Approach

Internet Control Protocols Reading: Chapter 3

Future Internet Technologies

IP Address Classes (Some are Obsolete) Computer Networking. Important Concepts. Subnetting Lecture 8 IP Addressing & Packets

Technical Support Information Belkin internal use only

Troubleshooting Tools

Internet Protocols Fall Lectures 7-8 Andreas Terzis

RARP: Reverse Address Resolution Protocol

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Auxiliary Protocols

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Internet Protocols. Addressing & Services. Updated:

NETWORK LAYER/INTERNET PROTOCOLS

Network Layer: Network Layer and IP Protocol

Компјутерски Мрежи NAT & ICMP

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Answers to Sample Questions on Network Layer

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

04 Internet Protocol (IP)

Network layer. Assignment 3

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Classful IP Addressing (cont.)

Internet Packets. Forwarding Datagrams

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

- IPv4 Addressing and Subnetting -

Introduction to TCP/IP

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Chapter 11. User Datagram Protocol (UDP)

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

PPS Internet-Praktikum. Prof. Bernhard Plattner Institut für Technische Informatik und Kommunikationsnetze (TIK)

Themen der Praktikumsnachmittage. PPS Internet-Praktikum. Zielsetzung. Infrastruktur im ETF B5

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Internet Protocols Fall Outline

Networking Test 4 Study Guide

CS 78 Computer Networks. Internet Protocol (IP) our focus. The Network Layer. Interplay between routing and forwarding

CS335 Sample Questions for Exam #2

IP address format: Dotted decimal notation:

Master Course Computer Networks IN2097

Overview Computer Networking. IP Address Classes (Some are Obsolete) Outline. Lecture 9 IP Packets. CIDR IP addressing. Forwarding examples

IP Subnetting and Addressing

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

Internet Infrastructure Measurement: Challenges and Tools

Unix System Administration

Internet and IP addressing

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

Internet Protocol Version 6 (IPv6)

Internet Addresses (You should read Chapter 4 in Forouzan)

The Network Layer. Raj Jain. Washington University in St. Louis

Internetworking and Internet-1. Global Addresses

Final for ECE374 05/06/13 Solution!!

What is a DoS attack?

IP Addressing Introductory material.

TCP/IP Basis. OSI Model

Internetworking. Problem: There is more than one network (heterogeneity & scale)

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

Computer Networks. Main Functions

IP Addressing. IP Addresses. Introductory material.

The Internet. Internet Technologies and Applications

Efficient Addressing. Outline. Addressing Subnetting Supernetting CS 640 1

Based on Computer Networking, 4 th Edition by Kurose and Ross

2. IP Networks, IP Hosts and IP Ports

Internetworking and IP Address

IP Addressing. -Internetworking (with TCP/IP) -Classful addressing -Subnetting and Supernetting -Classless addressing

VLAN und MPLS, Firewall und NAT,

Network Layer: Address Mapping, Error Reporting, and Multicasting

Raritan Valley Community College Academic Course Outline. CISY Advanced Computer Networking

Savera Tanwir. Internet Protocol

Layer Four Traceroute (and related tools) A modern, flexible path-discovery solution with advanced features for network (reverse) engineers

Internet Architecture and Philosophy

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

Instructor Notes for Lab 3

Introduction to LAN/WAN. Network Layer (part II)

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

The internetworking solution of the Internet. Single networks. The Internet approach to internetworking. Protocol stacks in the Internet

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 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 Chapter 4: Network Layer 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 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 application transport Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 2 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 4 1

Two Key Network-Layer Functions Datagram s 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 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 1. Send data 2. Receive data application transport Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 5 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 7 Interplay between routing and forwarding Forwarding table 4 billion possible entries routing algorithm value in arriving packet s header local forwarding table header value output link 0100 0101 0111 1001 0111 3 2 2 1 1 3 2 Destination Address Range 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 Link Interface otherwise 3 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 6 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 8 2

Longest prefix matching The Internet Network layer Host, router layer functions: 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? Network layer Routing protocols path selection RIP, OSPF, BGP Transport layer: TCP, UDP forwarding table IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router signaling DA: 11001000 00010111 00011000 10101010 Which interface? Link layer layer Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 9 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 11 Chapter 4: Network Layer IP datagram format 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 IP protocol version number header (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 32 bits ver head. type of len service fragment 16-bit identifier flgs time to upper header live layer checksum 32 bit source IP address 32 bit destination IP address Options (if any) data (variable, typically a TCP or UDP segment) total datagram (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 10 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 12 3

IP Fragmentation & Reassembly Chapter 4: Network Layer 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 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 13 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 15 IP Fragmentation and Reassembly IP Addressing: introduction Example 4000 byte datagram MTU = 1500 bytes 1480 bytes in data field = 1480/8 =4000 ID =x =1500 =1500 =1040 fragflag =0 ID =x ID =x ID =x =0 One large datagram becomes several smaller datagrams fragflag =1 fragflag =1 fragflag =0 =0 =185 =370 IP address: 32-bit identifier for host, router interface interface: connection between host/router and 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.1 223.1.3.27 223.1.2.2 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 14 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 16 4

Subnets 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 ly 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.2.2 223.1.1.3 223.1.3.27 subnet 223.1.3.1 223.1.3.2 consisting of 3 subnets How many? 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.7.1 223.1.8.1 223.1.8.0 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 17 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 19 Subnets IP addressing: CIDR 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 CIDR: 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.3.0/24 Subnet mask: /24 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 18 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 20 5

IP addresses: how to get one? DHCP client-server scenario 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 A B 223.1.1.1 223.1.1.2 223.1.1.4 223.1.2.9 223.1.1.3 223.1.3.1 DHCP server 223.1.3.27 223.1.2.1 223.1.2.2 E 223.1.3.2 arriving DHCP client needs address in this Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 21 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 23 DHCP: Dynamic Host Configuration Protocol DHCP client-server scenario 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 DHCP server: 223.1.2.5 time DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 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 arriving client Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 22 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 24 6

IP addresses: how to get one? Hierarchical addressing: more specific routes Q: How does get subnet part of IP addr? A: gets allocated portion of its provider ISP s address space ISPs-R-Us has a more specific route to Organization 1 Organization 0 200.23.16.0/23 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 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 25 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 27 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 200.23.30.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 Internet 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 26 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 28 7

Chapter 4: Network Layer Traceroute and ICMP 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 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 29 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 31 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 8