You are on page 1of 55

Chapter 1

The Network Model

1
OBJECTIVES:
❑ To discuss the idea of multiple layering in data communication
and networking and the interrelationship between layers.
❑ To discuss the OSI model and its layer architecture and to show
the interface between the layers.
❑ To briefly discuss the functions of each layer in the OSI model.
❑ To introduce the TCP/IP protocol suite and compare its layers
with the ones in the OSI model.
❑ To show the functionality of each layer in the TCP/IP protocol
with some examples.
❑ To discuss the addressing mechanism used in some layers of the
TCP/IP protocol suite for the delivery of a message from the
source to the destination.

2
Chapter 2.1 Protocol
Outline Layers
2.2 The OSI
Model
2.3 TCP/IP Protocol
Suite
2.4
Addressing

3
2-1 PROTOCOL LAYERS

When communication is not simple, we may


divide the complex task of communication into
several layers.
Let us use a scenario in communication in
which the role of protocol layering may be better
understood.

4
Topics Discussed in the Section
✔Hierarchy
✔Services

5
Example 2.1
Assume Maria and Ann are neighbors with a lot of common
ideas.
However, Maria speaks only Spanish, and Ann speaks only
English.
Since both have learned the sign language in their
childhood, they enjoy meeting in a cafe a couple of days
per week and exchange their ideas using signs.
Occasionally, they also use a bilingual dictionary.
Communication is face to face and Happens in one layer as
shown in Figure 2.1.

6
Figure 2.1 Example 2.1

7
Example 2.2
Now assume that Ann has to move to another town
because of her job.

The first machine can scan and transform a letter in


English to a secret code or vice versa.
The other machine can scan and translate a letter in
Spanish to the same secret code or vice versa.
Ann takes the first machine; Maria keeps the second one.
The two friends can still communicate using the secret
code, as shown in Figure 2.2.

8
Figure 2.2 Example 2.2

TCP/IP Protocol Suite 9


2-2 THE OSI MODEL

Established in 1947, the International Standards


Organization (ISO) is a multinational body
dedicated to worldwide agreement on
international standards.

Almost three-fourths of countries in the world


are represented in the ISO.

An ISO standard that covers all aspects of


network communications is the Open Systems
Interconnection (OSI) model. It was first
introduced in the late 1970s. 10
Topics Discussed in the Section
✔Layered Architecture
✔Layer-to-layer Communication
✔Encapsulation
✔Layers in the OSI Model
✔Summary of OSI Layers

11
Note

ISO is the organization;


OSI is the model.

12
Figure 2.3 The OSI model

13
Figure 2.4 OSI layers

14
Figure 2.5 An exchange using the OSI model

15
Note

The physical layer is responsible for


moving individual bits from one
(node) to the next.

16
Figure 2.6 Summary of OSI Layers

17
2-3 TCP/IP PROTOCOL SUITE

The TCP/IP protocol suite was developed prior to


the OSI model. Therefore, the layers in the
TCP/IP protocol suite do not match exactly with
those in the OSI model. The original TCP/IP
protocol suite was defined as four software
layers built upon the hardware. Today, however,
TCP/IP is thought of as a five-layer model with
the layers named similarly to the ones in the OSI
model. Figure 2.7 shows both configurations.

18
Topics Discussed in the Section
✔Comparison between OSI and TCP/IP
✔Layers in the TCP/IP Suite

19
Figure 2.7 Layers in the TCP/IP Protocol Suite

20
• The source host create a message in the
application layer and send it down the
layers so that it is physically sent to the
destination host.

• The destination host needs to receive the


communication at the physical layer and
then deliver it through the other layers in
the application layer.

TCP/IP Protocol Suite 21


Physical Layer
Physical layer is the lowest level in the TCP/IP
protocol suite.

Physical Layer is responsible for carrying individual


bits in frame

Two devices are connected by a transmission


medium under the physical layer

The transmission medium does not carry bits but, it


carries electrical or optical signals

The logical unit between two physical layers in two


device is a bit.
22
Data-Link
The data link layer is responsible for taking the
datagram and moving it across the link.

The link can be


Wired LAN
Wireless LAM
Wired WAN
Wireless WAN

The data-link layer takes a datagram and


encapsulates it in a packet called a frame

Some link layer protocols provide a complete


error detection and error correction

nk23
Network Layer
The Network layer is responsible for creating a connection
between the source computer and destination computer.for
host-to-host communication and routing the packet through
possible routes.

The Internet Protocol(IP) defines the format of the packet


called a datagram at the network layer. IP is a connectionless
protocol that provides no flow control, no error control, no
congestion control services

Auxiliary protocols that help IP are


1.Internet Control Message Protocol(ICMP)-reports problem
when routing packet
2.Internet Group Message Protocol(IGMP) helps multitasking
3.Dynamic host configuration Protocol(DHCP) to get network
layer address for a host
4.Address Resolution Protocol(ARP) helps to find link address
of a host.
24
Transport Layer
The transport layer is responsible for giving services to the
application layer, to get a message from an application
program running on the source host and deliver it to the
corresponding application program on the destination host.

Protocol of Transport Layer


Transmission control Protocol(TCP)
1.connection oriented protocol that establishes the logical
connection between transport layers at two hosts before transferring
data
2.TCP provides flow control, error control, and congestion control

User Datagram protocol


1.Connection less protocol that transmits user datagram's without
first creating a logical connection.
2.UDP does not provide flow, error and congestion control

Stream control Transmission Protocol(SCTP)


1.Designed form applications of multimedia
25
Application Layer

The logical connection between the two application layers is


end to end.
The communication among the application layer is between
two processes

1.The Hypertext Transfer protocol (HTTP) is a vehicle for


accessing the World Wide Web(WWW)
2.The Simple Mail Transfer Protocol(SMTP) is used in e-mail
service.
3.The File Transfer Protocol (FTP) is used for transferring files
from one host to another
4.The Terminal Network(TELNET) and Secure Shell(SSH) is used
by administrator to manage the Internet at global and local
levels.

1.Domain Name System(DNS) is used by other protocols to find


the network layer address of a computer
2.Internet Group Management protocol(IGMP) is used to collect
membership in group 26ion Laye
Figure 2.8 TCP/IP and OSI model

27
Figure 2.9 A private internet

28
Figure 2.10 Communication at the physical layer

29
Note

The unit of communication at the


physical layer is a bit.

30
Figure 2.11 Communication at the data link layer

31
Note

The unit of communication at the data


link layer is a frame.

32
Figure 2.12 Communication at the network layer

33
Note

The unit of communication at the


network layer is a datagram.

34
Figure 2.13 Communication at transport layer

35
Note

The unit of communication at the


transport layer is a segment, user
datagram, or a packet, depending on the
specific protocol used in this layer.

36
Figure 2.14 Communication at application layer

37
Note

The unit of communication at the


application layer is a message.

38
Figure 2.8 TCP/IP and OSI model

39
Figure 2.15 Addresses in the TCP/IP protocol suite

TCP/IP Protocol Suite 40


2.2.4 Encapsulation and Decapsulation

The encapsulation occurs in the source host and


decapsulation in the destination host.

41
TCP/IP Protocol Suite 42
2.2.4 Encapsulation at the source Host

Encapsulation at the source Host


1.The message is passed to the transport layer
2.The transport layer takes the message as
payload and add transport layer header to the
payload (the load that the transport layer should
take care of) which contains identifiers of source
and destination.
3.The transport layer passes the packet to
network layer

43
2.2.4 Encapsulation at the source Host

4.The network layer takes the transport layer


packet and add its own header. The header
contains the address of the source and
destination host.
5. The network layer passes the packet to the
data-link layer.
6. The data-link takes the network-layer packet
as data or payload and add its own header,
which contains the link-layer addresses of the
host or the next hop.
7. The frame is passed to the physical layer for44
Decapsulation and Encapsulation at the Router

As router is connected to two or more links, both


decapsulation and encapsulation takes place

1. The data link layer decapsulates the datagram


from the frame and passes it to the network
layer.
2. The network layer inspects the source and
destination addresses in the datagram header
and consults its forwarding table to find the
next hop to which the datagram is to be
delivered.
3. The data-link-layer of the next link45
Decapsulation at the Destination Host

1.At the destination host, each layer only


decapsulates the packet received
2. Removes the payload, and delivers the
payload to the next-higher layer protocol until
the message reaches the application layer.
3. The decapsulation in the host involves error
checking

46
Multiplexing and Demultiplexing

• As TCP/IP protocol suite uses several protocols


at some layers, multiplexing is done at the
source and demultiplexing at the destination.

• Multiplexing: a protocol at a layer can


encapsulate a packet from several next-higher
layer protocols(one at a time)

• DeMultiplexing: a protocol can decapsulate and


deliver a packet to several next-higher layer
protocols.
47
ADDRESSIN
G• Any communication that involves two parties needs two
addresses, source address and destination address.

• We normally have only four addresses, because the


physical layer does not need addresses

• the unit of data exchange at the physical layer is a bit,


which cannot have an address

• At the application layer, use names to define the site


that provides services, such as someorg.com. Or e-mail
adress such as somebody@gmail.com

48
ADDRESSIN
GFour levels of addresses are used in an internet
employing the TCP/IP protocols:

▪ physical address,
▪ logical address,
▪ port address,
▪ application-specific address.

Each address is related to a one layer in the


TCP/IP architecture, as shown in Figure 2.15.

49
Topics Discussed in the Section
✔ Physical Addresses
✔ Logical Addresses
✔ Port Addresses
✔ Application-Specific Addresses

TCP/IP Protocol Suite 50


Figure 2.15 Addresses in the TCP/IP protocol suite

TCP/IP Protocol Suite 51


ADDRESSIN
• At the transport layer, addresses are called port
Gnumbers.
• Port numbers are local addresses that distinguish
between several programs running at the same time.

• At the network-layer address uniquely defines the


connection of a device to the internet.
• The link-layer addresses, called MAC addresses are
locally defined addresses, each of which defines a
specific host or router in a network(LAN or WAN)

• A media access control address (MAC address) is


a unique identifier) is a unique identifier assigned to 52
a network interface controller) is a unique identifier assigned
Example 2.3
In Figure 2.16 a node with physical address 10 sends a frame to
a node with physical address 87.
The two nodes are connected by a link (a LAN).
At the data link layer, this frame contains physical (link)
addresses in the header.
As the figure shows, the computer with physical address 10 is
the sender, and the computer with physical address 87 is the
receiver.

The data link layer at the sender receives data from an upper
layer. It encapsulates the data in a frame.
The frame is propagated through the LAN.
Each station with a physical address other than 87 drops the
frame because the destination address in the frame does not
match its own physical address.
The intended destination computer, however, finds a match
between the destination address in the frame and its own
53
physical address.
TCP/IP Protocol Suite
Figure 2.16 Example 2.3: physical addresses

TCP/IP Protocol Suite 54


Example 2.4
As we will see in Chapter 3, most local area networks use a
48-bit (6-byte) physical address written as 12 hexadecimal
digits; every byte (2 hexadecimal digits) is separated by a
colon, as shown below:

07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address

TCP/IP Protocol Suite 55

You might also like