0% found this document useful (0 votes)
68 views50 pages

Chapter - 2: TCP / IP Reference Model

The document discusses the TCP/IP reference model and its key layers - the host-to-network layer, internet layer, transport layer, and application layer. It describes the characteristics and features of TCP and IP, including that TCP provides a reliable, connection-oriented protocol while IP provides an unreliable, connectionless protocol. The document also compares the OSI model to the TCP/IP model, noting differences in their development and how protocols are defined.

Uploaded by

Berhane Kifle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views50 pages

Chapter - 2: TCP / IP Reference Model

The document discusses the TCP/IP reference model and its key layers - the host-to-network layer, internet layer, transport layer, and application layer. It describes the characteristics and features of TCP and IP, including that TCP provides a reliable, connection-oriented protocol while IP provides an unreliable, connectionless protocol. The document also compares the OSI model to the TCP/IP model, noting differences in their development and how protocols are defined.

Uploaded by

Berhane Kifle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

CHAPTER – 2

TCP / IP Reference Model

2.1
Chapter 2

TCP/IP Model: Link Layer, Internet Layer,

Transport Layer, Application Layer, OSI and TCP/IP

layering differences and Addressing.

2.2
Transmission Control Protocol / Internet
Protocol (TCP / IP) Model

1969 :: Defense Advanced Research Projects Agency


(DARPA) Packet switching network - ARPANET.

1975 :: ARPANET – Converted to an operational network -


Given to the Defense Communication Agency (DCA).

1983 :: TCP/IP protocols were adopted MIL STD.


DARPA funded to implement TCP/IP in BerkelyUnix.2.3
Design Goals

• To connect multiple networks together, so that they appear as a

single network.

• To survive after partial subnet hardware failures.

• To provide a flexible architecture.

2.4
Characteristics
• TCP Characteristics
● Connection oriented protocol
● Provides reliability
○ Data acknowledgement
○ 3 way handshake
○ Checksums on both
header and contents
● Implements flow control

• IP Characteristics
• Connectionless Protocol
• Unreliable Protocol
• It is responsible for addressing, sending and receiving the data
packets over the Internet.

2.5
TCP / IP Key Features
• Logical Addressing: Big networks into smaller networks and
subdivided into smaller subnets - IP Address.

• Routability: TCP/IP data packets can be moved from one


network segment to another.

• Name Resolution: DNS Servers - Fully Qualified Domain


Names (FQDN).

• Interoperability: Eliminates the cross-platform boundaries.

• Multiplexing: Accepting data from different applications and


2.6
directing to different applications on different computers.
TCP / IP Reference Model
• TCP/IP reference model has only Four layers

2.7
TCP / IP Reference Model .
• The TCP/IP Protocol suite was developed prior to the OSI
model.
• TCP/IP is compared to OSI
 Host-to-Network layer is equivalent to the combination of the
Physical and Data Link Layers.
 The Internet Layer is equivalent to the Network Layer.
Transport Layer taking care of part of the duties of the Transport
Layer.
 The Application Layer is roughly doing the job of the Session,
Presentation, and Application Layers. 2.8
TCP / IP Reference Model . . .

TCP / IP Protocol Suite 2.9


An Application Layer
• It allows a user to access the services of private internet or the
global Internet.
• Many protocols are defined at this layer to provide services
such as electronic mail, file transfer, accessing the World Wide
Web, and so on.
• The communication at the application layer is end to end.
• A message generated at computer A is sent to computer B
without being changed during the transmission.

2.10
An Application Layer . . .

2.11
2.12
The Transport Layer
• Only the two end computers need to have the transport layer.
• The transport layer is responsible for delivering the whole
message, which is called a segment, a user datagram, or a packet,
from A to B.
• A segment may consist of a few or tens of datagrams.
• Since the Internet defines a different route for each datagram, the
datagrams may arrive out of order and may be lost.
• The transport layer at computer B needs to wait until all of these
datagrams to arrive, assemble them and make a segment out of
2.13
them.
The Transport Layer . . .

2.14
The Transport Layer . . .
 Traditionally, the transport layer was represented in the TCP/IP
suite by two protocols:
 User Datagram Protocol (UDP)
• Unreliable, Connectionless Protocol
 Transmission Control Protocol (TCP)
• Reliable, Connection-oriented Protocol

Stream Control Transmission Protocol (SCTP)


Support for newer applications such as voice over the Internet
2.15
(VoIP).
Combines the best features of UDP and TCP.
2.16
An Internet Layer
• Connectionless internetwork layer.
• Permit hosts to inject packets into any network.
• That packets travel independently to the destination.
• This layer defines an official packet format, transmission
mechanism and protocol called IP (Internet Protocol).
• IP transports data in packets called datagrams,
• IP has two primary responsibilities:
• Providing connectionless, best-effort delivery of datagrams.
• Providing fragmentation and reassembly of datagrams to support
data links with different MTU (Maximum Transmission Unit)
2.17

sizes.
An Internet Layer . . .
• Datagrams can travel along different routes and can arrive out of
sequence or be duplicated.
• IP does not keep track of the routes and has no facility for
reordering datagrams once they arrive at their destination.
• Communication at the network layer is end to end .
• The datagram started at computer A is the one that reaches
computer B.
• The network layers of the routers can inspect the source and
destination address of the packet for finding the best route.
2.18
• Routers are not allowed to change the contents of the packet.
An Internet Layer . . .

2.19
An Internet Layer . . .

2.20
IP Packet Header
An Internet Layer . . .

2.21
The Host – to - Network Layer
• TCP/IP does not define any specific protocol for the physical
layer.

• It supports all of the standard and proprietary protocols.

• At this level, the communication is between two hops or nodes,


either a computer or router.

• The unit of communication is a single bit.

• When the connection is established between the two nodes, a


stream of bits is flowing between them.

2.22
The Host – to - Network Layer . . .
• Assuming two computers have discovered that the most efficient way

to communicate with each other is via routers R1, R3, and R4.

• Note that if a node is connected to n links, it needs maximum n

physical-layer protocols, one for each link.

• The reason is that different links may use different physical-layer

protocols.

2.23
The Host – to - Network Layer . . .

2.24
The Host – to - Network Layer . . .
 Each computer involves with only one link; each router involves
with only two links.

 As Figure shows, the journey of bits between computer A and


computer B is made of four independent short trips.

 Computer A sends each bit to router R1 in the format of the


protocol used by link 1.

 Router 1 sends each bit to router R3 in the format dictated by


the protocol used by link 3.

 It is the same situation with the other two routers involved in the
2.25
communication.
The Host – to - Network Layer . . .

 Router R1 has two / three physical layers (two are shown in our
scenario).

 The layer connected to link 1 receives bits according to the


format of the protocol used by link 1; the layer connected to
link 3 sends bits according to the format of the protocol used by
link 3.

2.26
The Host – to - Network Layer . . .

2.27
OSI TCP/IP
OSI represents Open System TCP/IP model represents the Transmission
Interconnection. Control Protocol / Internet Protocol.

OSI is a generic, protocol independent TCP/IP model depends on standard


standard. It is acting as an interaction protocols about which the computer
gateway between the network and the network has created. It is a connection
final-user. protocol that assigns the network of hosts
over the internet.
The OSI model was developed first, and The protocols were created first and then
then protocols were created to fit the built the TCP/IP model.
network architecture’s needs.
It provides quality services. It does not provide quality services.
The OSI model represents defines It does not mention the services,
administration, interfaces and interfaces, and protocols.
conventions. It describes clearly which
layer provides services.
The protocols of the OSI model are better The TCP/IP model protocols are not
unseen and can be returned with another hidden, and we cannot fit a new protocol
appropriate protocol quickly. stack in it.
OSI TCP/IP

It is difficult as distinguished to It is simpler than OSI.


TCP/IP.
It provides both connection and It provides connectionless
connectionless oriented transmission transmission in the network layer
in the network layer; however, only and supports connecting and
connection-oriented transmission in connectionless-oriented
the transport layer. transmission in the transport layer.

It uses a horizontal approach. It uses a vertical approach.


The smallest size of the OSI header is The smallest size of the TCP/IP
5 bytes. header is 20 bytes.
Protocols are unknown in the OSI In TCP/IP, returning protocol is not
model and are returned while the difficult.
technology modifies. 2.29
Addressing

 Four levels of addresses are used in an internet employing


the TCP/IP protocols .

2.30
Addressing . . .

2.31
Physical Address
• Also known as the link address.
• It is included in the frame used by the data link layer.
• It is the lowest-level address.
• The physical addresses have authority over the link.
• Can be either unicast (one single recipient), multicast (a group
of recipients), or broadcast (to be received by all systems)
• The size and format of addresses vary depending on the
network.
• For example,
• Ethernet - 6-byte physical address that is imprinted NIC. 2.32
• Local Talk (Apple) - 1-byte dynamic address.
Physical Address . . .
Example 1
Node with physical address 10 sends a frame to a node
with physical address 87. The two nodes are connected by a link
(bus topology LAN).

2.33
Physical Address . . .
Example 2

Most LANs use a 48-bit (6-byte) physical address


written as 12 hexadecimal digits; every byte (2 hexadecimal
digits) is separated by a colon.

07:01:02:01:2C:4B

2.34
Logical Address
 Physical addresses are not adequate in an internetwork
environment.
 Different networks can have different address formats.
 Each host can be identified uniquely.
 So, Logical addresses are necessary for universal
communications.
 A logical address in the Internet is 32-bit IP Address that
can uniquely define a host connected to the Internet.
2.35
Logical Address – IP Address
• IPv4 uses 32-Bit and IPv6 uses 128-Bit for logical address.
• An IP address represented in dotted decimal notation.
Ex.- 123.22.33.44
• IP Addresses are divided into five classes

IP
Starting First No. of
Address Last Address No. of Host
Binary Value Address Network
Class
27-1
Class A 0 1.0.0.0 126.255.255.254 1-126 224– 2
127 loopback

Class B 10 128.0.0.0 191.255.255.254 214 216-2

Class C 110 192.0.0.0 223.255.255.254 221 28-2


2.36
Class D 1110 224.0.0.0 239.255.255.254 Multicast

Class E 1111 240.0.0.0 254.255.255.254 Undefined


Logical Address – IP Address – Class A
• It uses first octet for network address to uniquely identify the
network and rest three octet for host address to uniquely identify the
host on that network.
• First bit is of the first octet is set to zero for class A (00000001 to
01111111), so 1 to 127 is the network address. 127 is used as
loopback address.
• It means 27-1= 127 network i.e., 1 to126
• A host portion with all 1s refers to an IP broadcast address and the host portion
with all 0s is a reference to the network.
• Class A network is: 224– 2 = 16,777,214 number of host.
Net ID Host ID 2.37
€======8======> €=====================24=======================>
8 bit 8 bit 8 bit 8 bit
Logical Address – IP Address – Class B
• It uses first two octets for network address to uniquely identify
the network and rest two octet for host address to uniquely
identify the host on that network.
• (10000000 to 10111111 ie. 128 to 191 ) First two bits of first octet
are set to 10. Totally 14 bits are used to distinguish this network
from all other networks.
• Hence 214= 16,384 number of Class B networks.
• 216-2= 65534 number of host on class B network.

Net ID Host ID
€=============16=============> €===========16============> 2.38
8 bit 8 bit 8 bit 8 bit
Logical Address – IP Address – Class C
• It uses first three octets for network address to uniquely identify
the network and last octet for host address to uniquely identify the
host on that network.
• (11000000 to 11011111 ie. 192 to 223 ) First three bits of first octet
are set to 110. Totally 21 bits are used to distinguish this network
from all other networks.
• Hence 221= 2,097,152 number of Class C networks.
• 28-2=254 number of host on class C network.

Net ID Host ID
€===================24=====================> €======8=====> 2.39
8 bit 8 bit 8 bit 8 bit
Logical Address – IP Address – Class D
• In the first octet, the first 4 bits are 1110.
• (11100000 to 11101111 ie. 224 to 239 ) First four bits of first octet are set to 1110.
Class D addresses are called Multicast Address.
• The purpose of a multicast address is to enable a server somewhere to send data
to a Class D address that no one host has so that several hosts can listen to that
address at the same time.
• Watching TV on the Internet or listening to the radio on the Internet, your
computer is listening to a Class D address.
• No server is sending data directly to your workstation; instead, a server is
sending data to the multicast address.
• Any host can use software to listen for data at that address, and many hosts can
2.40
be listening at once.
Logical Address – IP Address – Class E
• 240 t0 254
• 240.0.0.0 t0 255.255.255.254
• Class E addresses are reserved addresses and are invalid host
addresses.
• They are used for experimental purposes by the IETF.
Special Address:
• Address use for Private use
Class A: 10.0.0.0 to 10.255.255.255
Class B: 172.16.0.0 to 172.31.255.255
Class C: 192.168.0.0 to 192.168.255.255 2.41

• Loop Back Address: 127.0.0.0 to 127.255.255.


Logical Address – IP Address
Example 3
Internet with two routers connecting three LANs. Each device
(computer or router) has a pair of addresses (logical and physical) for
each connection. In this case, each computer is connected to only one
link and therefore has only one pair of addresses. Each router,
however, is connected to three networks. So each router has three pairs
of addresses, one for each connection.

2.42
Logical Address – IP Address . . .

2.43
Port Addresses
• The IP address and the physical address are necessary for a
quantity of data to travel from a source to the destination host.

• However, arrival at the destination host is not the final objective


of data communications on the Internet.

• Today, computers are devices that can run multiple processes at


the same time.

• The end objective of Internet communication is a process


communicating with another process.

2.44
Port Addresses . . .
• For example, computer A can communicate with computer C by
using TELNET.
• At the same time, computer A communicates with computer B
by using the File Transfer Protocol (FTP).
• For these processes to receive data simultaneously, we need a
method to label the different processes. In other words, they
need addresses.
• In the TCP/IP architecture, the label assigned to a process is
called a Port Address.
• A port address in TCP/IP is 16 bits in length. 2.45
Port Addresses . . .
Example 4

Two computers communicating via the Internet. The


sending computer is running three processes at this time with
port addresses a, b, and c. The receiving computer is running
two processes at this time with port addresses j and k. Process a
in the sending computer needs to communicate with process j in
the receiving computer. Note that although physical addresses
change from hop to hop, logical and port addresses remain the
same from the source to destination. 2.46
Port Addresses . . .

2.47
Port Addresses . . .

Example 5

A port address is a 16-bit address represented by one


decimal number as shown.

753

2.48
The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.

2.49
Application-Specific Addresses
• Some applications have user-friendly addresses that are designed
for that specific application.

• Examples
• e-mail address

• Universal Resource Locator (URL)

• These addresses, however, get changed to the corresponding port


and logical addresses by the sending computer

2.50

You might also like