IP - Internet Protocol (Based on Kurose & Ross)

Slides:



Advertisements
Similar presentations
4 IP Address (IPv4)  A unique 32-bit number  Identifies an interface (on a host, on a router, …)  Represented in dotted-quad notation
Advertisements

CS 457 – Lecture 16 Global Internet - BGP Spring 2012.
4: Network Layer4a-1 IP Addressing: introduction r IP address: 32-bit identifier for host, router interface r interface: connection between host, router.
Announcement r Recitation tomorrow on Project 2 r Midterm Survey at the end of this class.
1 K. Salah Module 5.2: Internet Protocol CO vs. CL protocols IP Features –Fragmentation –Routing IP Datagram Format IPv6.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
Network Layer introduction 4.2 virtual circuit and datagram networks 4.3 what’s inside a router 4.4 IP: Internet Protocol  datagram format  IPv4.
IP Suite© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
The Network Layer Chapter 5. The IP Protocol The IPv4 (Internet Protocol) header.
Chapter 5 The Network Layer.
N/W Layer Addressing1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar 1 ECSE-4670: Computer Communication Networks (CCN) Network Layer Shivkumar.
11- IP Network Layer4-1. Network Layer4-2 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection.
Network Layer4-1 IP: Internet Protocol r Datagram format r IPv4 addressing r DHCP: Dynamic Host Configuration Protocol r NAT: Network Address Translation.
Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6.
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
IP Address 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to
Network Layer4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side,
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
Computer Networks The Network Layer
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
G64INC Introduction to Network Communications Ho Sooi Hock Internet Protocol.
TELE202 Lecture 9 Internet Protocols (1) 1 Lecturer Dr Z. Huang Overview ¥Last Lecture »Congestion control »Source: chapter 12 ¥This Lecture »Internet.
12 – IP, NAT, ICMP, IPv6 Network Layer.
1 Chapter 4: Network Layer r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Hierarchical routing.
Internet Protocol ECS 152B Ref: slides by J. Kurose and K. Ross.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Network Layer Lecture 15 Imran Ahmed University of Management & Technology.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
Network Layer4-1 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 The Internet (IP) Protocol.
Network Layer4-1 The Internet Network layer forwarding table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol.
Sharif University of Technology, Kish Island Campus Internet Protocol (IP) by Behzad Akbari.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
CSCI 465 D ata Communications and Networks Lecture 24 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
The Internet Network layer
Data and Computer Communications Ninth Edition by William Stallings Data and Computer Communications, Ninth Edition by William Stallings, (c) Pearson Education.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 19 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
IP Protocol CSE TCP/IP Concepts Connectionless Operation Internetworking involves connectionless operation at the level of the Internet Protocol.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
1 COMP 431 Internet Services & Protocols The IP Internet Protocol Jasleen Kaur April 21, 2016.
IP Internet Protocol. IP TCP UDP ICMPIGMP ARP PPP Ethernet.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Network Layer/IP Protocols 1. Outline IP Datagram (IPv4) NAT Connection less and connection oriented service 2.
Introduction to Networks
12 – IP, NAT, ICMP, IPv6 Network Layer.
Chapter 4: Network Layer
Computer Communication Networks
Chapter 4: Network Layer
Chapter 4: Network Layer
Dr. Richard Spillman Fall 2006
IP - The Internet Protocol
CS 1652 Jack Lange University of Pittsburgh
IP - The Internet Protocol
CS 457 – Lecture 10 Internetworking and IP
IP : Internet Protocol Surasak Sanguanpong
Wide Area Networks and Internet CT1403
Overview The Internet (IP) Protocol Datagram format IP fragmentation
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
Introduction to Networks
ECSE-4670: Computer Communication Networks (CCN)
ITIS 6167/8167: Network and Information Security
32 bit destination IP address
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Presentation transcript:

IP - Internet Protocol (Based on Kurose & Ross) Performs network and internetworking functions Probably the most important protocol No Internet without IP Rich, complex and beautiful!

Datagram networks: the Internet model Packets between same source-destination pair may take different paths application transport network data link physical 1. Send data 2. Receive data

Internet Network layer functions Transport layer: TCP, UDP IP protocol addressing conventions datagram format packet handling conventions Routing protocols path selection RIP, OSPF, BGP Network layer forwarding table ICMP protocol error reporting router “signaling” Link layer physical layer

IP Features Connectionless (best effort) End to end delivery Data Units are datagrams or packets Global Addressing Routing Fragmentation and Reassembly Route recording, time stamping options QoS options, but seldom used in v4

32 bit destination IP address IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit. how much overhead with TCP? 20 bytes of TCP 20 bytes of IP = 40 bytes + app layer overhead

Header Fields (1) Version Internet header length Currently 4 IP v6 Internet header length In 4 byte words Including options if used Type of service – priority (3 bits), DTR (Delay, Throughput, Reliability) Total length Of datagram, in octets <= 65535

Header Fields (2) Identification (datagram) Flags Sequence number Used with addresses and user protocol to identify datagram uniquely Flags M - More bit D - Don’t fragment Fragmentation offset – units of 8 octets Time to live TTL (<= 255) Protocol Next higher layer to receive data field at destination ICMP (1), TCP (6), UDP (17)

Protocol numbers http://www. iana Protocol numbers http://www.iana.org/assignments/protocol-numbers c:/winnt/system32/drivers/etc 0 HOPOPT IPv6 Hop-by-Hop Option ICMP Internet Control Message IGMP Internet Group Management GGP Gateway-to-Gateway IP IP in IP (encapsulation) ST Stream TCP Transmission Control EGP Exterior Gateway Protocol] IGP any private interior gateway (used by Cisco for their IGRP) 17 UDP User Datagram

Header Fields (3) Header checksum Source address Destination address Reverified and recomputed at each router 16 bit ones-complement sum of all 16 bit words in header Set to zero during calculation Source address Destination address Options Padding To fill to multiple of 4 bytes long

Options Specified as Type + length + value Security – classification level Strict Source Routing Loose Source Routing Record Route Time Stamp

Data Field Carries user data from next layer up – TCP, UDP, ICMP etc. Integer multiple of 8 bits long (octet) Max length of datagram (header plus data) 65,535 octets

Fragmentation & Re-assembly Different packet sizes for different networks When to re-assemble At destination (IP approach) Results in packets getting smaller as data traverses internet Intermediate re-assembly (possible, but not used) Need large buffers at routers Buffers may fill with fragments All fragments must go through same router Inhibits dynamic routing

Fragmentation - fields Uses fields in header D flag – don’t fragment Datagram Identifier (ID) Total length (data length + 20 bytes) Offset Position of fragment of user data in original datagram In multiples of 64 bits (8 octets) ‘M’ or More flag - last fragment?

Another example An IP packet with: total length 4820, datagram ID = 571 (decimal), fragment offset 32 and M=0 has to be fragmented for an Ethernet network. Show how this could be done, giving the values of the relevant header fields in all the fragments.

Solution Frag ID M D Offset Comments 1 571 32 The original offset 2 217 185 (1480/8) + 32 3 402 Another 185 4 587 The original datagram is the last fragment of a larger packet, offset = 32. Ethernet payload = 1500 (1480 + IP header)

Dealing with Failure Re-assembly may fail if some fragments get lost Need to detect failure Re-assembly time out Assigned to first fragment to arrive If timeout expires before all fragments arrive, discard partial data

Node Addresses - MAC & IP MAC addresses (6 bytes) Defined at layer 2 OSI AKA Physical addresses Fixed, burned-in to NIC Guaranteed globally-unique IP addresses (4 bytes, 4.295 x 109 addresses) Defined at layer 3 Referred to as Logical addresses Configured by network manager Facilitates logical grouping The total number of possible combinations of 32 bits is 4.295 billion, but not all addresses are actually usable.

IP addresses An IP address consists of two parts: The network address The first part of the address Identifies the network to which a host belongs Used by routers in path determination The host address The last part of the address Used in the local network to identify a host Network portion Host portion 32-bit IP address A subnet mask is used to mark the length of the network part A ‘1’ indicates a network bit, a ‘0’ indicates a host bit If network portion is 24 bits and host portion is 8 bits subnet mask will be 11111111111111111111111100000000 written in dotted decimal format as 255.255.255.0 Mask: 1111111 …. 111111 00000 …. 00000

IP Address Classes Class E: 1111xxxx: reserved for IAB R&D network host 10 110 1110 multicast address A B C D class 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 32 bits Class E: 1111xxxx: reserved for IAB R&D Mask: 1’s for network bits, 0 for host bits e.g. 255.255.0.0, 255.255.255.0, 255.255.224.0 etc Three main classes of address are used, based on the organisation size: Class A Range 0.0.0.0 – 127.255.255.255 First octet 0xxxxxxx Number of hosts per network 224 = 16,777,216 Usable hosts per network 224 -2 = 16,777,214 Subnet mask 255.0.0.0 Class B Range 128.0.0.0 – 191.255.255.255 First octet 10xxxxxx Number of hosts per network 216 = 65536 Usable hosts per network 216 -2 = 65534 Subnet mask 255.255.0.0 Class C Range 192.0.0.0 – 223.255.255.255 First octet 110xxxxx Number of hosts per network 28 = 256 Usable hosts per network 28 -2 = 254 Subnet mask 255.255.255.0

Class A Start with binary 0 (first bit) Addresses starting with 00000000 reserved 01111111 (127) reserved for loopback Range 1.x.x.x to 126.x.x.x All allocated 16,777 million hosts per network

Class B Start 10 (first 2 binary bits) Range 128.x.x.x to 191.x.x.x Second octet also included in network address 214 = 16,384 class B networks All allocated 216 = 65536 host-ids per networks

Class C Start 110 (first 3 binary bits) Range 192.x.x.x to 223.x.x.x Second and third octet also part of network address 221 = 2,097,152 addresses Nearly all allocated 256 host-ids per network

Special Addresses First octet >= 224 (E0 1110 0000) - multicast. First octet >= 240 (F0 11110000): IAB use 127.X.X.X - local loop back address for debugging Host-id = 0 refers to network. 194.203.121.0 Net-id = 0 - 'this network‘ 128.0.124.56 (class B address) 0.0.0.0: used by RARP, BOOTP DHCP – own address unknown 0.0.0.0: destination address for default route in routers. Broadcast addresses: host part is all 1’s Local broadcast 255.255.255.255 Not forwarded by routers, to all hosts in sender’s broadcast domain Directed broadcast: <Network Address>.255: forwarded by routers to specified network; to all hosts in specified network

Private Addresses 10.0.0.0 – 10.255.255.255 172.16.0.0 – 172.31.255.255 192.168.0.0 – 192.168.255.255 Not routable on the public Internet. Can be reused on private (home, company, campus) networks. A home router may use these for PCs connected to its ports, with NAT

IP addressing: suffix notation Address Class scheme wastes addresses CIDR: Classless InterDomain Routing Network portion of address of arbitrary length address format: a.b.c.d/x x is the number of bits in network portion of address Will be discussed later

Addresses & Interfaces 223.1.1.1 IP address: for each host, for each router interface interface: connection between host/router and physical link router’s typically have multiple interfaces host may have multiple interfaces 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 223.1.3.1 223.1.3.2 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

What is an ‘IP Network’? From IP address perspective device interfaces with same network part of IP address can physically 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 LAN 223.1.3.1 223.1.3.2 A network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address)

How to find the networks? 223.1.1.2 Detach each interface from router, host create “islands of isolated networks 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

Address Allocation I How does host get IP address? hard-coded by system admin in a file Windows: control-panel->network->configuration->tcp/ip->properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server “plug-and-play”

Address Allocation II Q: How does network get network address? 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

Address Allocation III Q: How does an ISP get a block of addresses? A: IANA: Internet Assigned Numbers Authority Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes http://www.iana.org/

Getting a datagram from source to destination (1) forwarding table in A Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 IP datagram: misc fields source IP addr dest data 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E datagram remains unchanged, as it travels source to destination addr fields of interest here

Getting a datagram from source to destination (2) forwarding table in A misc fields Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 223.1.1.1 223.1.1.3 data Starting at A, send IP datagram addressed to B: look up net. address of B in forwarding table find B is on same net. as A link layer will send datagram directly to B inside link-layer frame B and A are directly connected 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E

Getting a datagram from source to destination (3) forwarding table in A misc fields Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 223.1.1.1 223.1.2.2 data Starting at A, dest. E: look up network address of E in forwarding table E on different network A, E not directly attached routing table: next hop router to E is 223.1.1.4 link layer sends datagram to router 223.1.1.4 inside link-layer frame datagram arrives at 223.1.1.4 continued….. 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E

Getting a datagram from source to destination (4) forwarding table in router Dest. Net router Nhops interface 223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27 misc fields 223.1.1.1 223.1.2.2 data Arriving at 223.1.1.4, destined for 223.1.2.2 look up network address of E in router’s forwarding table E on same network as router’s interface 223.1.2.9 router, E directly attached link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 datagram arrives at 223.1.2.2 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E