Vous êtes sur la page 1sur 50

TCP/IP Concepts

History

In 1969 the first inter-network Advanced Research Project


Agencies (ARPANET) agencies of Department Of Defense
(DOD) of US Military connected with 4 nodes using routing
devices that allowed data packet deliveries between otherwise
incompatible computers.

In 1974 Vinton G. Curf and Robert E. Kahn proposed a suite of


protocols named TCP/IP to connect a number different networks
designed by different vendors into a network of networks
TCP/IP stands for Transmission Control
Protocol/Internet Protocol.
TCP/IP is a network protocol used on LANs,
WANs and the Internet.

It is a datagram based protocol

It is a four layer communication protocol which


provides:-
End to end communication
Unreliable communication line handling
Packet sequencing
Internet work routing
Application Layer Telnet FTP DNS NFS
Application Level

Transport Layer
Host Level TCP UDP

Internetwork Layer
Gate Way Level IP & ICMP

Network Access Layer


Network Level LLC
TCP/IP has proved to respond well to the
following requirements:
• Ability to route data between sub-networks
• Independence of sub-network technology
• Independence of host computer hardware
• Independence of operating system
• Tolerance of any error routes in sub-networks
• Robust recovery from failures
• Ability to add a new sub-network and keep going
Layered Protocol
Like most network protocols, TCP/IP is a layered
protocol. Each layer builds upon the layer below it,
adding new functionality. The lowest-level protocol is
concerned purely with the business of sending and
receiving data (any data) using specific network
hardware. At the top are protocols de-signed
specifically for tasks like transferring files or delivering
email. In between are levels concerned with things
like routing and reliability.
Link Layer
TCP/IP is a four-layer protocol. The lowest level,
the link layer, is implemented within the
network adapter and its device driver. Like all
the TCP/IP protocols, it is defined by
standards.The standards for generic Ethernet-
type net-works are defined by the IEEE 802
Committee: for example, IEEE 802.3 for
Ethernet networks, or IEEE 802.5 for Token
Ring networks. Other link layer protocols that
could be used include Serial Line IP (SLIP) or
Point-to-Point Protocol (PPP), which are used
when connecting to a network over an
asynchronous dial-up link.
The Ethernet protocol is designed for carrying
blocks of data called frames. A frame consists of
a header containing 48-bit hardware destination
and source addresses (which identify specific
network adapters), a 2-byte length field, and
some control fields. There follows the data, and
then a trailer which is simply a 32-bit cyclic
redundancy check (CRC) field. The data portion
of an Ethernet frame must be at least 38 bytes
long, so filler bytes are inserted if necessary.
The frames are at least 64 bytes long, even if
they carry only one byte of user data: a
significant overhead in some types of application.
Frames also have a maximum size. Less headers,
the maximum size for an Ethernet frame is 1492
bytes, which is the maximum transmission unit
(MTU) for Ethernet. All link layer protocols have
an MTU. It is one hardware characteristic that the
higher-level protocol needs to be aware of,
because larger blocks of data must be
fragmented into chunks that fit within the MTU
and then reassembled on arrival at their
destination.
The link-layer Ethernet protocol needs to know the
unique hardware address of the specific network
adapter it has to deliver the message to and, in case
of an error, the address of the one it came from. To
make this possible, the TCP/IP protocol suite includes
link-layer protocols which convert between IP and
hardware addresses. The Address Resolution Protocol
(ARP) finds out the physical address corresponding to
an IP address. It does this by broadcasting an ARP
request on the network. When a host recognises an
ARP re-quest containing its own IP address, it sends
an ARP reply containing its hardware address. There is
also a Re-verse ARP (RARP) protocol. This is used by a
host to find out its own IP address if it has no way of
doing this except via the network.
Network Layer
The next layer up from the link layer is called the
network layer. The most important protocol at this
level is IP, the Internet Protocol. Its job is to send
packets or datagrams (a term which basically means
“blocks of data”) from one point to another. It uses
the link layer protocol to achieve this. Both the
network layer and the link layer are concerned with
getting data from point A to point B. However, whilst
the network layer works in the world of TCP/IP, the
link layer has to deal with the real world.
An IP address is a “soft” address. It is a bit like
calling your office block “Telephone House” instead
of its real address, 236, Main Street, Civil Lines,
Jabalpur. The former is no use to the postman
Internet Protocol
IP is the bedrock protocol of TCP/IP. Every message
and every piece of data sent over any TCP/IP network
is sent as an IP packet. IP’s job is to enable data to be
transmitted across and between networks. Hence the
name: inter-net protocol. In a small LAN, it adds little
to what could be achieved if the network applications
talked directly to Ethernet. If every computer is
connected to the same Ethernet cable, every message
could be sent directly to the destination computer.
Once you start connecting networks together,
however, direct Ethernet communication becomes
impractical. At the application level you may address a
message to a computer on the far side of the world,
but your Ethernet card can’t communicate with the
Ethernet card on that computer. Physical Ethernet
limitations would prevent it, for a start.
Features Of IP
IP is a connectionless protocol. This means that it has
no concept of a job or a session. Each packet is
treated as an entity in itself. IP is rather like a postal
worker sorting letters. He is not concerned with
whether a packet is one of a batch. He simply routes
packets, one at a time, to the next location on the
delivery route.
IP is also unconcerned with whether a packet reaches
its eventual destination, or whether packets arrive in
the original order. There is no information in a packet
to identify it as part of a sequence or as belonging to a
particular job. Consequently, IP cannot tell if packets
were lost or whether they were received out of order.
IP is an unreliable protocol. Any mechanisms for
ensuring that data sent arrives correct and intact are
pro-vided by the higher-level protocols in the suite.
IP layer provides a datgram service that routs data
packets between dissimilar network architecture
It gives data reliability
It does not guarantee delivery of data

IP - is responsible for:
• Moving packet of data from node to node. IP
forwards each packet based on a four-byte destination
address (the IP number).

Data concurrency, sequencing and delivery gurantee


is the job of TCP Protocol
TCP/IP stands for Transmission Control Protocol/Internet
Protocol. TCP/IP is a piece of networking software. The
package will contain two main things:
• A set of networking protocols
• Network applications which use the networking protocols

The TCP/IP protocol suite is so named for two of its most important
protocols:
• Transmission Control Protocol (TCP) and
• Internet Protocol (IP).
TCP - is mainly responsible for
• Data Concurrency,
• Packet Sequencing
• Delivery guarantee
• Error control
• Retransmission
TCP/IP provides the three core services:

• File transfer
• Remote login
• Electronic mail
IP Protocols
• Internet or IP technology over the years has emerged
as the most prominent data communication
technology.
• TCP/IP protocol has become de-facto data
communication standard throughout the world.
• It can carry even voice/video also over IP protocol and
in turn has started challenging the complete monopoly
of TDM technology in voice communication.
TCP/IP and OSI

• OSI is made of seven layers.


• TCP/IP protocol is made of five layers.
APPLICATION
PRESENTATION APPLICATION

SESSION
OSI Model TRANSPORT
TCP/IP Model
TRANSPORT
NETWORK NETWORK
DATA LINK DATA LINK
PHYSICAL PHYSICAL
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
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
Octet +0
TCP Header
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

UAP RS F
HELEN RCS S YI WINDOW SIZE
GKHT NN

CHECKSUM URGENT POINTER

OPTIONS AND PADDING


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
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 45 670 1 2 3 4 5 6 7

VER HLEN TOS TOTAL LENGTH

IDENTIFICATION DM FRAGMENT OFFSET


F F

TIME TO LIVE PROTOCOL HEADER CHECKSUM

SOURCE ADDRESS OF HOST

DESTINATION ADDRESS OF HOST

OPTIONS PADDING
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.
• ICMP uses echo/reply to test whether a destination is
reachable and responding.
ICMP..
• 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
ICMP…
• 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
Internet Group Message Protocol
• Internet Group Message Protocol provides allows
for multicast to operate on an internetwork.
– Multicast is one-to-many communication.
– A message sent can be simultaneously received by a
group of hosts.
• Special type of Class-D IP addresses, starting with
1110, are reserved as multicast addresses.
Address Resolution Protocol
• Address Resolution Protocol is used to
translate 32 bits IP addresses to 48 bits
Ethernet addresses.
• A host’s physical address is determined by
broadcasting its IP address to all machines.
• The machine with matching IP address, in
broadcast message, sends its hardware
address to the machine originating broadcast.
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
129.1.1.2 129.1.1.3
Reverse Address Resolution Protocol
• Reverse Address Resolution Protocol is used
to get the 32 bits Source IP address, knowing
the 48 bits Hardware address.
• It is reverse of ARP, hence named Reverse
Address Resolution Protocol.
• A diskless workstation broadcasts RARP-
Request to find its IP Address at the time of
boot up.
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
IPv4 Address

32 Bits
Network Host

8 8 8 8
Bits Bits Bits Bits

172 . 16 . 122 . 204


IPv4 Address Classes
Class-A: N H H H

Class-B: N N H H

Class-C: N N N H

Class-D: For Multicast

Class-E: For Research

Present day Internet does not use Class full addressing, Instead
Classless addressing is used.
TCP/IP
• TCP/IP andhierarchical
has simple OSI Model design
• In clear corresponding relations with OSI
OSI reference model TCP/IP
reference model.
7 Application layer
Application layer
6 Presentation layer

5 Conversation layer

Transport layer
4 Transport layer

3 Network layer Interconnection layer

2 Data link layer Data link layer

1 Physical layer Physical layer


TCP/IP Protocol Stack
HTTP, Telnet, FTP, Provide application program
Application Layer
TFTP, Ping, etc network interfaces

TCP/UDP Establish terminal to


Transport Layer
terminal connection
ICMP
Interconnection Layer IP Addressing and
ARP/RARP
route selecting
Ethernet, 802.3, PPP,
Data link Layer HDLC, FR, etc Physical media access

Interfaces and Binary data flow transmission


Physical Layer
wires/cables
Data Encapsulation
TELNET FTP SMTP TFTP
23 20/21 25 69
TCP/UDP
6/17
IP PACKETS
FRAMES
BITS
Application Layer
• File transfer
– FTP, TFTP
• Mail service
– SMTP, POP3
• Network management
– SNMP, Telnet, Ping, Tracert
• Network service
– HTTP, DNS, WINS
Transport Layer Overview
Application layer TCP

Transport layer
UDP
Network layer

Data Link layer


0 TCP/UDP Header Format
8 16 24 31
16 bits source port 16 bits destination port
16 bits UDP length 16 bits UDP checksum
Data

UDP header format

0 8 16 24 31
16 bits source port 16 bits destination port
32 bits sequence number
32 bits acknowledge number
URG
ACK

SYN

offset
FIN
PSH
RST

Reserved(6 bits 16 bits window size


16 bits TCP checksum 16 bits urgent pointer
Options
Data

TCP header format


Port Number
• TCP protocol uses port numbers to mark
and distinguish various application
programs.
HTTP FTP Telnet SMTP DNS TFTP SNMP
53
80 20/21 23 25 69 161
Socket

TCP UDP

IP data packet
TCP Connection
Internet
client server
SYN(s
eq=a)

k =a+1)
b, a c
eq=
SYN(s

SYN(s
eq=a+
1,ack=
) b+1
Slide Window
len 1024
win4096
len 1024
win4096
len 1024
To modify the win4096 The sender is
len 1024
win4096
widows size too fast
win2048
ack 4097
len 1024
win4096
len 1024
win4096

win2048
ack 6145

len 1024
win4096
len 1024
win4096
Network Layer Overview
Application layer

IP
Transport layer
ARP
Network layer
RARP
Data Link layer ICMP
0 4
IP8 Header
16
Format 31

Message Total length


Version Service type
length

Identification Flag Chip offset

Time to live Protocol Message header checksum

Source IP address

Destination IP address

IP options
ARP
This is my Ethernet
address 00-E0-FC-00-
00-12

IP:10.0.0.1/24 ARP Reply IP:10.0.0.2/24


MAC:00-E0-FC-00-00-11 MAC:00-E0-FC-00-00-12
I need the
Ethernet
address of
10.0.0.2
ARP Request?
RARP
Your IP address is
10.0.0.1

Diskless RARP Reply


workstation RARP Server

What is my IP
address?
RARP Request?
ICMP
I am here.
A B
ICMP Echo Reply

Is B
accessible?
ICMP Echo Request
TCP/IP was developed by US DOD for ARPA (Advance
Research Project Agency)

WAN, LAN implementation

Datagram based Protocol

Popular within Unix N/W

Vous aimerez peut-être aussi