Vous êtes sur la page 1sur 24

Introduction

TCP/IP is the first set of protocols used in internet. Allows computers to communicate / share resources across network Work on TCP/IP started in 1970s
Funded ARPA Network

by US Military
protocols of ARPANET where upgraded

TCP/IP and the internet

The modern internet sits on top of the TCP/IP technology


Used

as a standard To bridge the gap between non-compatible platforms All the computers are connected to the internet understands TCP/IP

TCP/IP and the internet

In 1978 international standard Organization (ISO) proposed a seven layer reference model for network services and protocols
Known

as the OSI model TCP/IP does not strictly follow this 7 layer model TCP/IP follows simplified 4 layer model

Why layering?

To provide well-defined interfaces between adjacent layers


A

change in one layer does not affect the other layer Interface must remain the same

Allows structured development of network software

The simplified 4 layer model


Application
Runs on top of layer 1, 2 and 3 End to end manage transfer

Transport Network Data Link

Packet delivery over internet Frame transmission over link

Data flow in 4 layer model


Application

Transport Network Network

Data Link

Data Link

TCP/IP protocol suite


Refers to the family of protocols The protocols are built up on connectionless technology
Data

sent from one node to other node as sequence of datagram Each data gram sent independently The datagram corresponding to same massage may follow different routes
Variable

delay arrival order at destination

TCP/IP family members


FTP TFTP
SNMP

SMTP DNS

User process
UDP

TCP IP

ICMP

IGMP

ARP

RARP

Data Link and hardware layer (Eg: Ethernet)

TCP/IP simplified data flow model


User process TCP
IP
Data Link and hardware layer (Eg: Ethernet)

User process UDP

What does IP do?

IP transports datagrams (packets) from source node to destination node


Responsible

for routing packets Breaks the packet into smaller packet if required Unreliable source
A

packet may be lost in a transmit Packets may arrive out of order Duplicate packets may be generated

What does TCP do?

TCP provides a connection oriented reliable service for sending messages


Split

message into packets Reassemble packets at the destination Resend the packet that were lost in transmit

Interface with IP
Each

packet forwarded to IP for delivery Error control is done by TCP

What does UDP do?

UDP provides the connectionless unreliable service for sending datagrams (packets)
Messages

small enough to fit in a packet (eg: DNS

query) Simpler and faster than TCP Never split data into multiple packets Does not care about error control

Interface with IP
Each

UDP packet sent to IP for delivery

Addresses in TCP/IP
User process
TCP IP
Data Link and hardware layer (Eg: Ethernet)

User process
UDP
Port address (16 bits) Internet address (32 bits)

Physical address (48 bits)

Encapsulation

Basic concept:
As

data flows down the protocol hierarchy, headers (and trailers) get upended to it As data moves up hierarchy headers and trailers are removed off

Example:
Trivial

File Transfer Protocol (TFTP) TFTP client transfers 200 bytes of data 4 bytes of TFTP header gets added

TCP over Ethernet


TFTP Client
UDP IP Ethernet

TFTP Server

UDP IP Ethernet

How the headers and trailers get upended ?


Data
H-TFTP H-UDP H-IP H-En
14

Data Data Data Data


200

H-TFTP H-TFTP H-TFTP


4

H-UDP H-UDP
8

H-IP
20

T-En
4

The IP layer

IP layer provides a connectionless, unreliable delivery of system for packets Each packet is independent of one another
IP

layer need not maintain any history Each IP packet must contain the source and destination addresses IP layer does not guarantee delivery of packets

The IP layer(contd.)

IP layer encapsulation
Receives

a data chunk from higher layer (TCP or UDP) Prepends header of minimum 20 bytes
Containing

relevant information for handling routing flow

control

Illustration

Data 20 bytes IP header

Data

Datagram

Format of IP datagram

H E A D E R

IP header field

VER- (4 bits)
Version

of the IP protocol in use (is typically 4)

HLEN (4bits)
Length

of header is expressed as the number of 32 bit

words Minimum size is 5 and maximum is 15

Total Length - (16 bits)


Length

in bytes for the datagram including header Maximum datagram size : 216 = 65536 bytes

IP header field (contd.)

Source type - (8 bits)


Allows

packet to be assigned priority Router can use this field to route packets Not universally used

Time to live - (8 bits)


Prevents

a packet from traveling in a loop Sender sets a value that is decremented at each hop, If it reaches zero packet is discarded

Protocol - (8 bits)
Identifies

the higher layer protocol being used

IP header field (contd.)

Source IP address (32 bits)


Internet

address of sender
address of receiver

Destination IP address (32 bits)


Internet

Identification, flags, fragment offset


Used

for handling fragmentation

Options - (variable width)


Can

be given provided router supports For eg. Source routing

IP header field (contd.)

Header checksum
Covers

only IP header How it is computed


Header

is treated as sequence of 16 bit integer The integers are added using ones complement arithmetic Ones complement of final sum is taken as checksum
Mismatch

in checksum causes the datagram to be discarded

Vous aimerez peut-être aussi