Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

OSI and TCP IP

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 26

TCP/IP Protocol Suite

ALTTC/ BB Faculty 1
Objectives
 What is Internet?
 Comparison of TCP/IP & OSI
 Data Encapsulation
 TCP-IP Protocol Suite

ALTTC/ BB Faculty 2
What is Internet?
 Internet is network of networks, with
different hardware/software technologies
 Also known by the name TCP/IP Internet
 Name TCP/IP is taken from the names of
the one of the transport layer protocols
(Transport Control Protocol) and the
network layer protocol (Internet Protocol)
 TCP/IP is backbone of the Internet

ALTTC/ BB Faculty 3
TCP/IP and OSI
 OSI is made of seven layers.
 TCP/IP protocol is made of five layers.

APPLICATION
APPLICATION
PRESENTATION

SESSION

OSI Model TRANSPORT TRANSPORT TCP/IP Model


NETWORK NETWORK

DATA LINK DATA LINK

PHYSICAL PHYSICAL

ALTTC/ BB Faculty 4
Data Encapsulation

Application Data

TPT Layer TCP Header Data


TCP Segment
UDP Header Data

UDP Message

NW Layer IP Header TCP-UDP Data

IP Datagram

Data Link Frame Head IP Header TCP-UDP Data Trailer


Frame

ALTTC/ BB Faculty 5
TCP/IP Protocol Suite..

FTP TFTP
A SMTP NFS
TELNET SNMP
HTTP DNS

T TCP UDP

N ICMP IGMP IP ARP RARP

D
Protocols defined by the underlying networks
P

ALTTC/ BB Faculty 6
TCP Details
 Provides application programs access to the
network using a reliable connection-oriented
transport layer service
 TCP sends and receives data reliably using
sequence numbers and acknowledgments
 TCP is a byte oriented protocol i.e. every
byte in each packet is assigned a sequence
number
 Data stream handed over to TCP is called an
unstructured stream
 TCP divides this data stream into segments
for transmission to remote network
ALTTC/ BB Faculty 7
TCP Header..
Octet +0 Octet +1 Octet +2 Octet +3
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

SOURCE PORT DESTINATION PORT

SEQUENCE NUMBER

ACKNOWLEDGEMENT NUMBER

UA P R S F
HELEN R C S S Y I WINDOW SIZE
GK HT NN

CHECKSUM URGENT POINTER

OPTIONS AND PADDING

ALTTC/ BB Faculty 8
Well known port numbers

PORT DESCRIPTION

20 File Transfer-Data

21 File Transfer-Control

23 Telnet

25 SMTP

53 Domain Name Server

69 Trivial File Transfer

80 WWW

123 Network Time Protocol

179 Border Gateway Protocol

ALTTC/ BB Faculty 9
Three-Way-Handshake

Sender 0 1 Receiver

SN-95426
2 AN-00000 SN-16780 3
1 0 000B AN- 95427
1 1 000B
SN-95427
AN-16781
4
0 1 000B

0-Closed; 1-Listen; 2-SYN-Sent; 3-SYN-Received; 4-Established

ALTTC/ BB Faculty 10
Data Transfer
0 SN-95426 1
Sender AN-00000 SN-16780 Receiver
2 1 0 000B AN- 95427
3
1 1 000B
SN-95427
4
AN-16781 SN-16781
5
0 1 000B AN- 95428
0 1 100B
SN-95428
5 AN-16881 SN-16881
AN- 95628 5
0 1 200B
0 1 150B

SN-95628
5 AN-17031 SN-17031

0 1 250B AN- 95878 5


0 1 300B

0-Closed; 1-Listen; 2-SYN-Sent; 3-SYN-Received; 4-Established; 5-Data Transfer


ALTTC/ BB Faculty 11
Closing a TCP Connection

SN - 95880
6 AN -17334
Sender Receiver
0 1 1 0B
SN - 17334
AN - 95881
0 1 0 0B

WAIT
SN - 17334
AN - 95881 6
0 1 1 0B
SN - 95881
AN -17334

0 0 1 0 0B 0

6-Finish; 0- Closed

ALTTC/ BB Faculty 12
User Datagram Protocol
 Provides unreliable connectionless service
 Transfers data without establishing a
session
 Used for services that have an inbuilt
reliability
 Does not use end to end error checking and
correction
 Does not order the packets; may loose or
duplicate a packet
 Runs faster than TCP due to less overheads

ALTTC/ BB Faculty 13
UDP Header..

Octet +0 Octet +1 Octet +2 Octet +3


0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
SOURCE PORT DESTINATION PORT
MESSAGE LENGTH CHECKSUM

ALTTC/ BB Faculty 14
Internet Protocol.
 Provides best-effort or connectionless
delivery service.
 No error checking or tracking
 If reliability is important, IP must be paired
with a reliable protocol like TCP
 Transmits blocks of data called datagrams
each of which is transported separately
 Responsible for IP addressing
 Datagrams may travel along different routes
and may arrive out of sequence or
duplicated.

ALTTC/ BB Faculty 15
IP Header..
Octet +0 Octet +1 Octet +2 Octet +3
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

VER HLEN TOS TOTAL LENGTH

IDENTIFICATION D M FRAGMENT OFFSET


F F

TIME TO LIVE PROTOCOL HEADER CHECKSUM

SOURCE ADDRESS OF HOST

DESTINATION ADDRESS OF HOST

OPTIONS PADDING

ALTTC/ BB Faculty 16
Fragmentation..
MTU-1500 MTU-1500
172.16.2.0 MTU-576 172.16.3.0

1500 B
IP TCP Data
512 B 512 B 476 B
IP IP TCP Data IP Data IP Data
DF=0; MF=1; Offset=0 DF=0; MF=1; Offset=64 DF=0; MF=0; Offset=128

IP TCP Data Data Data

IP TCP Data

ALTTC/ BB Faculty 17
Socket Connection..
 Ports along with an IP address, known as
socket connection, allow any application in
any machine on an internet to be uniquely
defined.
 Multiple applications can run simultaneously
on a host by making use of separate socket
connection for each application.

ALTTC/ BB Faculty 18
Socket Connection-Multiplexing

A.B.C.D E.F.G.H

FTP DNS FTP DNS


DATA
2764 3753 21 53
DATA

TCP UDP T DATA 3753-53


TCP UDP
DATA 2764-21
IP N
DATA 3753-53 A.B.C.D-E.F.G.H
D
DATA 2764-21 A.B.C.D-E.F.G.H
P TRAILER DATA 3753-53 A.B.C.D-E.F.G.H HEADER

TRAILER DATA 2764-21 A.B.C.D-E.F.G.H HEADER

1. A.B.C.D(2764) – E.F.G.H(21) 2. A.B.C.D(3753) – E.F.G.H(53)

ALTTC/ BB Faculty 19
Socket Connection-Demultiplexing

A.B.C.D E.F.G.H

FTP DNS DATA FTP DNS


2764 3753 DATA 21 53
DATA 53- 3753
TCP UDP T TCP UDP
DATA 21- 2764

IP N DATA 53- 3753 E.F.G.H-A.B.C.D

DATA 21- 2764 E.F.G.H-A.B.C.D


D
TRAILER DATA 53- 3753 E.F.G.H-A.B.C.D HEADER
P
TRAILER DATA 21- 2764 E.F.G.H-A.B.C.D HEADER

1. A.B.C.D(2764) – E.F.G.H(21) 2. A.B.C.D(3753) – E.F.G.H(53)

ALTTC/ BB Faculty 20
Internet Control Message Protocol
 Internet Control Message Protocol is a
mechanism used by hosts and routers to
send notification of datagram problems back
to the sender.
 Sends error messages only to the source
and not to intermediate routers.
 Sole function is to report problems, not to
correct them.
 An important use of ICMP is echo/reply to
test whether a destination is reachable and
responding.
ALTTC/ BB Faculty 21
Internet Control Message Protocol
 Echo request/reply (PING; Packet INternet
Gropher)
 Destination unreachable
 0-Network unreachable
 1-Host unreachable
 2-Protocol unreachable
 3-Port unreachable
 4-Fragment needed but DF bit is set
 5-Source route failed
 6-Destination network unknown

ALTTC/ BB Faculty 22
Internet Control Message Protocol
 7-Destination host unknown
 8-Source host isolated
 9-Communication with destination network
administratively prohibited
 10-Communication with destination host
administratively prohibited
 11-Network unreachable for type of service
 12-Host unreachable for type of service
 Time exceeded message format
 0-TTL exceeded
 1-Fragment reassembly time exceeded

ALTTC/ BB Faculty 23
ARP Operation

Give me MAC address of 129.1.1.4 Here is my MAC address

129.1.1.1 129.1.1.4

ARP Request Request That’s


Response Ignored Ignored Me
Accepted 08-00-10-99-AC-54
08-00-39-00-2F-AB 129.1.1.2 129.1.1.3
08-00-39-00-2F-C3 08-00-5A-21-A7-22

ALTTC/ BB Faculty 24
RARP Operation

Give me my IP address RARP Response

Diskless
work
station RARP
Server
08-00-39-00-2F-AB
223.1.2.1 223.1.2.3
08-00-39-00-2F-C3 223.1.2.2 08-00-10-99-AC-54
08-00-5A-21-A7-22

ALTTC/ BB Faculty 25
ALTTC/ BB Faculty 26

You might also like