Internet Protocol (IP)

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

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Network Layer: Internet Protocol

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

INTERNET SYSTEM. Internet Protocol. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Large Scale Networking

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

CSCI Computer Networks Fall 2016

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

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

Network layer: Overview. Network Layer Functions

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter Motivation For Internetworking

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

Network Layer: Control/data plane, addressing, routers

Lecture 8. Basic Internetworking (IP) Outline. Basic Internetworking (IP) Basic Internetworking (IP) Service Model

Lecture 8. Reminder: Homework 3, Programming Project 2 due on Thursday. Questions? Tuesday, September 20 CS 475 Networks - Lecture 8 1

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

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

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

Vorlesung Kommunikationsnetze

CS475 Networks Lecture 8 Chapter 3 Internetworking. Ethernet or Wi-Fi).

TCP/IP Protocol Suite

IP Address Assignment

Position of IP and other network-layer protocols in TCP/IP protocol suite

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

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

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

2/22/2008. Outline Computer Networking Lecture 9 IP Protocol. Hop-by-Hop Packet Forwarding in the Internet. Internetworking.

Network Layer/IP Protocols

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

NETWORK LAYER: IP Addressing

Computer Network Fundamentals Spring Week 4 Network Layer Andreas Terzis

CS 457 Networking and the Internet. Problems. Mechanisms 9/21/16. Fall 2016 Indrajit Ray

TSIN02 - Internetworking

CSC 401 Data and Computer Communications Networks

The Internet Protocol (IP)

TSIN02 - Internetworking

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

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061. Lecture 2. Internetworking IPv4, IPv6

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

Internet Protocols (chapter 18)

Recap. Recap. Internetworking. First mile problem. Internet. End Users. Last mile problem. Direct link networks Packet switching.

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

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

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

CMPE 80N: Introduction to Networking and the Internet

CSCI-1680 Network Layer: IP & Forwarding Rodrigo Fonseca

OSI Network Layer. Network Fundamentals Chapter 5. Version Cisco Systems, Inc. All rights reserved. Cisco Public 1

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

Guide to Networking Essentials, 6 th Edition. Chapter 5: Network Protocols

CH. 3 IP FORWARDING AND ROUTING

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

End-to-End Communication

b. Suppose the two packets are to be forwarded to two different output ports. Is it

Lecture 17 Overview. Last Lecture. Wide Area Networking (2) This Lecture. Internet Protocol (1) Source: chapters 2.2, 2.3,18.4, 19.1, 9.

CS 348 Computer Networks. IP and Routing. Indian Institute of Technology, Bombay

Introduction to Internet. Ass. Prof. J.Y. Tigli University of Nice Sophia Antipolis

Introduction to Internetworking

ECE 158A: Lecture 7. Fall 2015

CS 3516: Advanced Computer Networks

IPv6 Protocols and Networks Hadassah College Spring 2018 Wireless Dr. Martin Land

IPv6. IPv4 & IPv6 Header Comparison. Types of IPv6 Addresses. IPv6 Address Scope. IPv6 Header. IPv4 Header. Link-Local

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

IPv4. Christian Grothoff.

Network Basic v0.1. Network Basic v0.1. Chapter 3 Internet Protocol. Chapter 3. Internet Protocol

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

McGraw-Hill The McGraw-Hill Companies, Inc., 2000

The Interconnection Structure of. The Internet. EECC694 - Shaaban

Chapter 5 Network Layer

internet technologies and standards

Outline. IP Address. IP Address. The Internet Protocol. o Hostname & IP Address. o The Address

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

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

CS 356: Computer Network Architectures. Lecture 10: IP Fragmentation, ARP, and ICMP. Xiaowei Yang

ARP, IP. Chong-Kwon Kim. Each station (or network interface) should be uniquely identified Use 6 byte long address

Master Course Computer Networks IN2097

Chapter 20 Network Layer: Internet Protocol 20.1

Lecture 9: Internetworking

Introduction. IP Datagrams. Internet Service Paradigm. Routers and Routing Tables. Datagram Forwarding. Example Internet and Conceptual Routing Table

SEN366 (SEN374) (Introduction to) Computer Networks

CS 3516: Computer Networks

Chapter 06 IP Address

CS 457 Lecture 11 More IP Networking. Fall 2011

CIS 551 / TCOM 401 Computer and Network Security. Spring 2006 Lecture 16

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

Router Architecture Overview

Chapter 4 Network Layer: The Data Plane

OSI Data Link & Network Layer

Lecture 2: Basic routing, ARP, and basic IP

Chapter 4: network layer

CS 458 Internet Engineering Spring First Exam

Internet Protocol Addressing and Routing. Redes TCP/IP

Agenda L2 versus L3 Switching IP Protocol, IP Addressing IP Forwarding ARP and ICMP IP Routing First Hop Redundancy

IP: Addressing, ARP, Routing

IP Addressing Week 6. Module : Computer Networks Lecturer: Lucy White Office : 324

Chapter 4: Network Layer

The Internet. 9.1 Introduction. The Internet is a global network that supports a variety of interpersonal and interactive multimedia applications.

CC231 Introduction to Networks Dr. Ayman A. Abdel-Hamid. Internet Protocol Suite

OSI Data Link & Network Layer

Internetworking: philosophy, addressing, forwarding, resolution, fragmentation

Transcription:

CPSC 360 - Network Programming Internet Protocol (IP) Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu March 14, 2005 http://www.cs.clemson.edu/~mweigle/courses/cpsc360 Internet Protocol (IP)! Addressing - Ch 18 " Classful " Classless (CIDR) " Special Addresses! Address Resolution (ARP) - Ch 19! Datagrams and Forwarding - Ch 20! Encapsulation and Fragmentation - Ch 21 "Encapsulation "Fragmentation "Reassembly

IP Addressing! Goal of internetworking: Provide seamless communication system "hide details of physical networks! Need addressing "use hardware addresses? IP Addressing! Each host assigned 32-bit number (IP address) "network prefix "host suffix! Why use hierarchical addressing? "each computer assigned a unique address "suffixes can be assigned locally w/o global coordination

IP Addressing Classful (or class-based) Addressing! Class A " 128 networks " 65,536 to 224 hosts! Class B " 16,384 networks " 256 to 65,536 hosts! Class C " 221 networks " less than 256 hosts! Class D " 28-bit multicast addresses " No origin or network information is encoded 0 1 2 3 4 8 16 24 31 0 1 0 1 2 3 4 8 16 24 31 1 net id 0 1 2 3 4 8 16 24 31 1 0 net id 0 1 2 3 4 8 16 24 31 1 0 net id host id (IP addresses 1.0.0.0 through 127.255.255.255) host id (IP addresses 128.0.0.0 through 191.255.255.255) 1 1 0 multicast address host id (IP addresses 192.0.0.0 through 223.255.255.255) (IP addresses 224.0.0.0 through 239.255.255.255) Addressing Classful Addressing Class A B C D Range 0-127 128-191 192-223 224-239

Addressing Classful Addressing! Classes aren t divided equally! 1/2 of all addresses are in Class A Addressing Private Addresses! Network addresses assigned by IANA (Internet Assigned Number Authority)! Private addresses available "10.0.0.0-10.255.255.255 "172.16.0.0-172.31.255.255 "192.168.0.0-192.168.225.255 (see RFC 1597)

Addressing Classful Addressing Addressing Classless Addressing (CIDR)! Why don t we use classful addressing anymore?! Today, we use subnet addressing, or classless addressing (CIDR)!Netmask "32-bit number to identify which bits are network prefix in the IP address

Addressing Classless Addressing (CIDR)! Router compares destination IP with known network IP "D is dest IP addr, M is mask, A is network IP addr "A == (D & M)! Example: "M = 11111111 11111111 00000000 00000000 (255.255.0.0) "D = 10000000 00001010 00000010 00000011 (128.10.2.3) "A = 10000000 00001010 00000000 00000000 (128.10.0.0) "Using binary AND between M and D, we get A. Addressing Classless Addressing (CIDR)! With CIDR, 128.10.0.0 Class B address becomes 128.10.0.0/16 "first 16 bits are network prefix "second 16 bits are host suffix "see Appendix 3 (pg. 686) 10000000 128 00001010 10 00000000 0 00000000 0 Network part 11001000 00010111 00010000 00000000 200.23.16.0 / 23 Host part

Addressing Classless Addressing (CIDR)! Example w/classful addressing "ISP has one class B address (128.211.0.0) "Two customers have 12 computers "ISP can t assign them (can t break up the class B address space)! Example w/classless addressing "one customer gets 128.211.0.16/28 "one customer gets 128.211.0.32/28 "ISP keeps rest of the addresses for other customers Addressing Classless Addressing (CIDR)! One customer gets 128.211.0.16/28 " 28 bits for network prefix, 4 bits for host suffix " 10000000 128 " 11010011 211 " 00000000 0 " 00001000 16! How do customers assign addresses to hosts?! 128.211.0.17-128.211.0.30 " host part all 0s and host part all 1s are reserved

/8 255.0.0.0 16777216 Class A /9 255.128.0.0 8388608 /10 255.192.0.0 4194304 /11 255.224.0.0 2097152 /12 255.240.0.0 1048576 /13 255.248.0.0 524288 /14 255.252.0.0 262144 /15 255.254.0.0 131072 /16 255.255.0.0 65536 Class B /17 255.255.128.0 32768 ISP / large business /18 255.255.192.0 16384 ISP / large business /19 255.255.224.0 8192 ISP / large business /20 255.255.240.0 4096 Small ISP / large business /21 255.255.248.0 2048 Small ISP / large business /22 255.255.252.0 1024 /23 255.255.254.0 512 /24 255.255.255.0 256 Class C /25 255.255.255.128 128 Large LAN /26 255.255.255.192 64 Small LAN /27 255.255.255.224 32 Small LAN /28 255.255.255.240 16 Small LAN /29 255.255.255.248 8 /30 255.255.255.252 4 /31 255.255.255.254 2 /32 255.255.255.255 1 Addressing Special IP Addresses! 127.0.0.1 is the most popular address for loopback

Internet Protocol (IP)! Addressing - Ch 18! Address Resolution (ARP) - Ch 19! Forwarding - Ch 20! Fragmentation - Ch 21 ARP!Each NIC has a MAC address and an IP address!when would we need to know the MAC address of a computer s interface?!how to find the MAC address given an IP address? "is there a direct mapping?

ARP! Address Resolution Protocol (ARP) "request message!ip address of destination "reply message!ip address of destination!mac address of destination! Request messages are broadcast! Reply messages are unicast ARP and Caching! Each computer maintains an ARP table "entries time out after ~20 minutes!entries added when ARP replies are received! Entries added when ARP request received and we re responding

ARP Sending Messages Across a WAN! Applications use IP addresses! How do messages get to the destination across a WAN?! Example: "User sends HTTP request "IP destination address is web server "What s the address in the link layer destination field? Internet Protocol (IP)! Addressing - Ch 18! Address Resolution (ARP) - Ch 19! Forwarding - Ch 20! Fragmentation - Ch 21

IP Datagrams and Forwarding IP Header! Once we add the IP header, our data packets are called datagrams! At the link layer (once we add the Ethernet header, for example), they are called frames ver head. len 16-bit identifier time to live 32 bits type of service protocol type 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 segment or UDP datagram) IP Datagrams and Forwarding if (( mask[i] & D) == destination[i]) forward to nexthop[i];

IP Datagrams and Forwarding Best Effort! IP is connectionless! IP is not reliable! Makes the best effort to deliver datagrams! Does not go to extra effort to prevent "duplication "delays "out-of-order delivery "corruption of data "loss Internet Protocol (IP)! Addressing - Ch 18! Address Resolution (ARP) - Ch 19! Forwarding - Ch 20! Fragmentation - Ch 21

Encapsulation! Routers may need to translate from one type of physical network to another! Operation: "Frame arrives containing link-layer destination address of router "Router extracts IP datagram and throws away frame header "Router determines next-hop depending upon IP address "Router builds new frame header! what s the destination address in the frame? Encapsulation 2 8 bytes 6 bytes 6 bytes bytes 46 to 1500 bytes 4 bytes Preamble Destination Address Source Address Data CRC CRC Type Link layer addresses (not same as IP addresses) IP header TCP header data user data IP Datagram TCP Segment

Fragmentation! MTU - maximum transmission unit "defined for each type of hardware technology "maximum amount of data in a frame! What if frame travels from network with one MTU to one with smaller MTU? "fragmentation Fragmentation! Router sets bit in flags field! All fragments have same identifier! Fragment offset identifies how the fragment should be reassembled! Otherwise, IP header unchanged ver head. len 32 bits 16-bit identifier flgs time to live type of service protocol type length fragment offset Internet checksum 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, typically a TCP segment or UDP datagram)

Fragmentation Ethernet MTU example length = 4000 ID = x fragment = 0 offset = 0 One large IP datagram becomes several smaller IP datagrams IP datagram (20 byte IP header + 3,980 byte TCP segment) encapsulated in one FDDI frame length =1500 length =1500 length =1040 ID =x ID =x ID =x fragment =1 fragment =1 fragment =0 offset =0 offset =1480 offset =2960 Each IP datagram encapsulated in one Ethernet frame! Consider a 3,980 byte message sent in an FDDI frame! Generates 3 fragments when it transits an Ethernet " How much application data is in each fragment? Reassembly! Who reassembles the datagram?!why?! Fragmented datagram cannot be reassembled unless all fragments are received

Fragmentation of Fragments?! Can a fragment be fragmented?