INTRODUCTION TO INTERNET PROTOCOL(IP)
Download
Report
Transcript INTRODUCTION TO INTERNET PROTOCOL(IP)
INTRODUCTION TO INTERNET
PROTOCOL(IP)
For more notes and topics visit:
www.eITnotes.com
eITnotes.com
INTRODUCTION TO INTERNET
PROTOCOL(IP)
•T H E N E T W O R K P R O T O C O L I N T H E I N T E R N E T
•I P A D D R E S S
NETWORK ID + HOST ID
•T R A N S M I T D A T A G R A M ' S F R O M O N E H O S T T O
ANOTHER. IF NECESSARY, VIA INTERMEDIATE
ROUTERS
•U N R E L I A B L E P A C K E T D E L I V E R Y
eITnotes.com
OSI 7-Layer Model
Open Systems Interconnection
model
developed by the ISO (International
Organization for Standardization) in 1984
provides an abstract model of networking
divides the tasks involved in moving
information
between networked computers into 7
task groups
each task group is assigned a layer
Each layer is reasonably selfcontained, so
can be implemented independently
changes/updates to a layer need not effect
other layers
eITnotes.com
Protocol Layers
Application layer
describes how applications will communicate
e.g., HTTP, FTP, Telnet, SMTP
Presentation layer
describes the form of data being transferred & ensures that it will be readable by
receiver
e.g., floating point formats, data compression, encryption
Session layer
describes the organization of large data sequences & manages communication
session
e.g., coordinates requests/responses (“traffic flow”)
Transport layer
describes the quality and nature of data delivery
e.g., how retransmissions are used to ensure delivery
eITnotes.com
Protocol layer (cont…)
Network layer
describes how a series of exchanges over various data links can deliver data
across a network
e.g., addressing and routing
Data Link layer
describes the logical organization of data bits transmitted on a particular
medium
e.g., frame sequencing, error notification
Physical layer
describes the physical & electrical properties of the communications media
e.g., voltage levels, data rates, max distances
eITnotes.com
Data encapsulation and transmission
M
message
segment Ht M
datagram Hn Ht M
frame Hl Hn Ht M
Hn
Hl Hn
Ht
Ht
Ht
eITnotes.com
M
M
M
M
applicatio
n
transport
network
link
physical
destination
applicatio
n
transport
network
link
physical
link
physical
Hn Ht
Hl Hn Ht
M
M
network
link
physical
switch
Hn Ht
M
router
TCP/IP
The Internet Protocol (IP) is the transmission
mechanism used by the TCP/IP protocols
at the network layer.
IP must be paired with a reliable protocol such as
TCP.
eITnotes.com
TCP/IP
OSI Model
TCP/IP Hierarchy
7th
Application Layer
6th
Presentation Layer
Application Layer
5th
Session Layer
4th
Transport Layer
Transport Layer
3rd
Network Layer
Network Layer
2nd
Link Layer
Link Layer
1st
Physical Layer
eITnotes.com
Protocols
Internet Protocol Datagram
•
The Internet Protocol divides information into packets for delivery.
•
Internet Protocol adds packet routing info (20 bytes).
eITnotes.com
IP datagram
A datagram is a variable-length packet consisting of
two parts: header and data.
The header is 20 to 60 bytes in length and contains
information essential to routing and delivery.
4 = IP-in-IP
encapsulation
17 = UDP
6 = TCP
2 = IGMP
1 = ICMP
IP
eITnotes.com
Moving a Datagram from Source to
Destination
eITnotes.com
IP Fragmentation
IP router splits the datagram into several datagram
Fragments are reassembled at receiver
o
o
o
Fragmentation can be done at the sender or at intermediate routers
The same datagram can be fragmented several times.
Reassembly of original datagram is only done at destination hosts !!
eITnotes.com
What’s involved in Fragmentation?
The following fields in the IP header are involved:
version
header
length
DS
Identification
time-to-live (TTL)
Fragment offset
Total length
eITnotes.com
total length (in bytes)
ECN
0
protocol
DM
F F
Fragment offset
header checksum
Offset of the payload of the current
fragment in the original datagram
Total length of the current fragment
What’s involved in Fragmentation?
A datagram with size 2400 bytes must be
fragmented according to an MTU limit of 1000
bytes
The limit on the maximum IP datagram size, imposed by the data link protocol is
called maximum transmission unit (MTU)
eITnotes.com
IP addresses
IP addresses are numerical labels assigned to computers in a network,
used for identification and addressing (passing information)
IP addresses (under IP version 4) are 32 bits long
10010011 10000110 00000010 00010100
↓
written as a dotted sequence
147.134.2.20
eITnotes.com
IP address (cont…)
divided into 5 classes
class A: start with 0, then 7-bit code
224 = 16,777,216 hosts in subnetwork
class B: start with 10, then 14-bit code
216 = 65,536 hosts in subnetwork
class C: start with 110, then 21-bit code
28 = 256 hosts in subnetwork
class D: start with 1110
used for multicasting
class E: start with 11110
reserved for future use
eITnotes.com
IP Service
IP provide provides an unreliable connectionless best effort service
(also called: “datagram service”).
Unreliable: IP does not make an attempt to recover lost packets
Connectionless: Each packet (“datagram”) is handled
independently. IP is not aware that packets between hosts may be
sent in a logical sequence
Best effort: IP does not make guarantees on the service (no
throughput guarantee, no delay guarantee,…)
Consequences:
• Higher layer protocols have to deal with losses or with
packets
•
Packets may be delivered out-of-sequence
eITnotes.com
duplicate
IP Service (cont…)
IP supports the following services:
one-to-one
one-to-all
one-to-several
(unicast)
(broadcast)
(multicast)
unicast
broadcast
multicast
•IP multicast also supports a many-to-many service.
•IP multicast requires support of other protocols (IGMP, multicast routing)
eITnotes.com
Domain Name System
• rarely do applications deal directly with IP addresses
a hierarchical system of domain names can be used instead
top level domains: edu, com, gov, org, net, …
commonly:
e.g.,
hostname.subdomain.domain (possibly many subdomains)
csc.liv.ac.uk
• domain names serve as “listings” in a “phone book” for the internet,
i.e. when you enter a domain name in a web browser, a “look up” is
done to find the corresponding IP address
• domain names also simplify things in that if the physical network
changes (e.g. IP addresses are modified), the domain names can
remain the same while the “phone book” entries are updated with
the new IP address
eITnotes.com
Domain Name Servers (cont.)
• a domain name server (DNS) is a machine that keeps a
table of names and corresponding IP addresses (i.e. this
performs the “look up” to match domain names to their
corresponding IP address)
•
there are 13 root servers in the world
while there are only 13 root servers, there are multiple physical
servers (that mirror them) that operate in different geographic
locations to provide reliable service in case of hardware failures
•
when an application specifies a host name,
•
•
•
•
go to local domain name server and try lookup in its stored cache
if not stored there, then local DNS requests address from a root server
root server determines appropriate name server & forwards request
eITnotes.com
Routing Protocols
• routers (or gateways) are special purpose machines
on the Internet that determine the path for packets
from source to destination
when a router receives a packet, inspects the destination
address
looks up that address in a routing table
based on the contents of the table, forwards the packet to
another router (or to its final destination if possible)
eITnotes.com
Routing Protocol(cont….)
•
Routing Information Protocol (RIP)
•
Open Shortest Path First Protocol (OSPF)
•
describes how routers exchange routing table information
uses hop-count as the metric of a path's cost
more robust, scalable protocol than RIP
doesn't exchange entire tables, only updates changed links
Internet Control Message Protocol (ICMP)
adjunct to IP, notifies sender (or other router) of abnormal events
e.g., unreachable host, net congestion
eITnotes.com
HTTP
• Hypertext Transfer Protocol (HTTP):
application-level protocol for distributed, collaborative,
hypermedia information systems
generic, stateless, object-oriented
can be used for many tasks, such as name servers & distributed
object management systems
underlying language of the Web
eITnotes.com
Cont.…
•
HTTP/1.0 allows only connectionless message passing
•
each request/response requires a new connection
to download a page with images requires multiple connections
can overload the server, require lots of overhead
HTTP/1.1 provides persistent connection by default
once client & server connect, remains open until told to close it (or
timeout)
reduces number of connections, saves overhead
client can send multiple requests without waiting for responses
e.g., can request all images in a page at once
eITnotes.com
eITnotes.com