No Slide Title

Download Report

Transcript No Slide Title

Telecommunications Networking
II
Lecture 30
The Internet(working) Protocol (IP)
Tanenbaum: pp 412-424
Copyright 1999, S.D. Personick. All Rights Reserved.
The IP (layer 3) Internet Protocol
• The purpose of the IP layer protocol is to
accept datagrams from the Transport
protocol (layer 4) and to deliver them to
their designated address on a “best effort”
basis
• Issues we will be concerned with here are
-the IP header format
-the IP address structure and how it is
interpreted
Copyright 1999, S.D. Personick. All Rights Reserved.
IP
• IP Datagram
20 bytes + optional field
Transport
IP
Layer Packet Header
Router
IP datagram = Transport Layer Packet + IP Header
Copyright 1999, S.D. Personick. All Rights Reserved.
IP Header
32 bits
Version
IHL
Type of Service
Identification
Time to Live
Total Length
DM
Protocol
Fragment Offset
Header Checksum
Source Address
Destination Address
Options (0 or more 32-bit words)
Copyright 1999, S.D. Personick. All Rights Reserved.
IP Header Contents
• Version: which version of the IP protocol
(4 bits)
• IHL: Header length: in 32 bit words (4 bits)
• Type of Service: Precedence (3 bits);
Delay, Throughput, Reliability (3 bits)
Type of service is currently ignored by most
routers, but will become increasingly
important in the future
Copyright 1999, S.D. Personick. All Rights Reserved.
IP Header Contents
• Total length: Specifies the total length of
the IP packet, up to 65,535 bytes (16 bits)
• Fragmentation:
-Identification: identifies the datagram
that a fragment belongs to (16 bits)
-DF: don’t fragment (1 bit)
-MF: more fragments (1 bit)
-Fragment offset: (13 bits)
Copyright 1999, S.D. Personick. All Rights Reserved.
IP Header Contents
• Time to Live: Essentially a hop counter that
is decremented from 255 down to zero as a
datagram goes through a sequence of N
routers (8 bits)
• Protocol: Defines the transport layer
protocol that the IP datagram should be
delivered to (e.g., TCP, UDP) (8 bits)
• Header Checksum: (16 bits)
Copyright 1999, S.D. Personick. All Rights Reserved.
IP Addresses (IPv4)
Drexel
129
25
60
1
SDP’s mail server
Network address: 1,2 or 3 bytes (0,10, 110)
Host address: 1,2, or 3 bytes
Host + Network = 4 bytes
Assigned by the Network Information Center (NIC)
Copyright 1999, S.D. Personick. All Rights Reserved.
Looking Up an IP Address
Routing Table
144.118.0.0
129.25.60.1
Drexel Gateway
Router
129.25.0.0
129.25.60.1
Everything else
Copyright 1999, S.D. Personick. All Rights Reserved.
The Address Resolution Protocol
ARP
Layer 4
Layer 4
IP Datagram
(129.25.60.1)
IP Datagram
Layer 3
129.25.60.1
Layer 3
Ethernet Frame (E2)
2
Copyright 1999, S.D. Personick. All Rights Reserved.