0% found this document useful (0 votes)
27 views75 pages

CH 02

The document discusses network models and the OSI model. It describes the OSI model as having 7 layers - physical, data link, network, transport, session, presentation, and application layer. Each layer has a specific function, with the lower layers dealing with physical delivery and the higher layers supporting users and allowing software systems to communicate. Data moves down and up the layers, with each layer adding encapsulation information. The OSI model allows complete interoperability between incompatible systems through this layered approach.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views75 pages

CH 02

The document discusses network models and the OSI model. It describes the OSI model as having 7 layers - physical, data link, network, transport, session, presentation, and application layer. Each layer has a specific function, with the lower layers dealing with physical delivery and the higher layers supporting users and allowing software systems to communicate. Data moves down and up the layers, with each layer adding encapsulation information. The OSI model allows complete interoperability between incompatible systems through this layered approach.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 75

Network Models

2.1
2-1 LAYERED TASKS

We use the concept of layers in our daily life. As an


example, let us consider two friends who communicate
through postal mail. The process of sending a letter to a
friend would be complex if there were no services
available from the post office.

Topics discussed in this section:


Sender, Receiver, and Carrier
Hierarchy

2.2
Figure 2.1 Tasks involved in sending a letter

2.3
2-2 THE OSI MODEL
Established in 1947, the International Standards
Organization (ISO) is a multinational body dedicated to
worldwide agreement on international standards. 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. An
open system is a set of protocols that allows any two
systems to communicate regardless of their underlying
architecture. OSI model is not a protocol, it is a model of
understanding and designing a network architecture that
is flexible, robust and interoperable.
Topics discussed in this section:
Layered Architecture
Peer-to-Peer Processes
2.4Encapsulation
Note

ISO is the organization.


OSI is the model.
Figure 2.2 Seven layers of the OSI model
The OSI model is a layered framework for the design of network systems that
allows communication between all types of computer systems. It consists of seven
separate but related layers, each of which defines a part of the process of moving
information across a network

2.6
Each layer defines a family of functions distinct from those of the other layers.

By defining and localizing functionality in this fashion, the designers created an


architecture that is both comprehensive and flexible.

the OSI model allows complete interoperability between incompatible systems.

Within a single machine, each layer calls upon the services of the layer just
below
it. Layer 3, for example, uses the services provided by layer 2 and provides
services for layer 4.

Between machines, layer x on one machine communicates with layer x on


another machine.

This communication is governed by an agreed-upon series of rules


and conventions called protocols.

The processes on each machine that communicate at a given layer are called
peer-to-peer processes.
2.7
Figure 2.3 The interaction between layers in the OSI model

2.8
At the physical layer, communication is direct: In Figure 2.3, device A
sends a stream of bits to device B (through intermediate nodes).

At the higher layers, however, communication must move down through


the layers on device A, over to device B, and then back up through the
layers.

Each layer in the sending device adds its own information to the message it
receives from the layer just above it and passes the whole package to the
layer just below it.

At layer I the entire package is converted to a form that can be transmitted


to the receiving device. At the receiving machine, the message is
unwrapped layer by layer, with each process receiving and removing the
data meant for it. For example, layer 2 removes the data meant for it, then
passes the rest to layer 3. Layer 3 then removes the data meant for it and
passes the rest to layer 4, and so on.

2.9
Figure 2.3 The interaction between layers in the OSI model

2.10
Interfaces Between Layers
The passing of the data and network information down through the layers of
the sending device and back up through the layers of the receiving device is
made possible by an interface between each pair of adjacent layers.

Each interface defines the information and services a layer must provide for
the layer above it. Well-defined interfaces and layer functions provide
modularity to a network.

2.11
Figure 2.3 The interaction between layers in the OSI model

2.12
Organization of the Layers

The seven layers can be thought of as belonging to three subgroups. Layers I, 2, and
3-physical, data link, and network-are the network support layers; they deal with
the physical aspects of moving data from one device to another (such as electrical
specifications, physical connections, physical addressing, and transport timing and
reliability).

Layers 5, 6, and 7-session, presentation, and application-can be thought of as the user


support layers; they allow interoperability among unrelated software systems.

Layer 4, the transport layer, links the two subgroups and ensures
that what the lower layers have transmitted is in a form that the upper layers can use.

The upper OSI layers are almost always implemented in software; lower layers are a
combination of hardware and software, except for the physical layer, which is mostly
hardware.

Figure, which gives an overall view of the OSI layers, D7 means the data
unit at layer 7, D6 means the data unit at layer 6, and so on.

The process starts at layer 7 (the application layer), then moves from layer to layer in
descending, sequential order. At each layer, a header, or possibly a trailer, can be added to
2.13
the data unit.
Figure 2.4 An exchange using the OSI model

2.14
2-3 LAYERS IN THE OSI MODEL

In this section we briefly describe the functions of each


layer in the OSI model.

Topics discussed in this section:


Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer

2.15
Figure 2.5 Physical layer

2.16
Note

The physical layer is responsible for movements of


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

2.17
The physical layer is also concerned with the following:

o Physical characteristics of interfaces and medium. The physical layer defines the
characteristics of the interface between the devices and the transmission medium. It
also defines the type of transmission medium.

o Representation of bits. The physical layer data consists of a stream of bits (sequence
of Os or 1s) with no interpretation. To be transmitted, bits must be
encoded into signals--electrical or optical. The physical layer defines the type of
encoding (how Os and I s are changed to signals).

o Data rate. The transmission rate-the number of bits sent each second-is also defined
by the physical layer.

o Synchronization of bits. The sender and receiver not only must use the same bit rate
but also must be synchronized at the bit level. In other words, the sender and the
receiver clocks must be synchronized.

o Line configuration. The physical layer is concerned with the connection of devices to
the media. Point to point and Multi point

o Physical topology. The physical topology defines how devices are connected to make
a network.
2.18
Figure 2.6 Data link layer

2.19
Note

The data link layer is responsible for moving


frames from one hop (node) to the next.

2.20
Other responsibilities of the data link layer include the following:

Framing. The data link layer divides the stream of bits received from the network
layer into manageable data units called frames.

o Physical addressing. If frames are to be distributed to different systems on the


network, the data link layer adds a header to the frame to define the sender and/or
receiver of the frame. If the frame is intended for a system outside the sender's
network, the receiver address is the address of the device that connects the network
to the next one.
D Flow control. If the rate at which the data are absorbed by the receiver is less than
the rate at which data are produced in the sender, the data link layer imposes a flow
control mechanism to avoid overwhelming the receiver.

o Error control. The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism
to recognize duplicate frames. Error control is normally achieved through a
trailer added to the end of the frame.

D Access control. When two or more devices are connected to the same link, data
link layer protocols are necessary to determine which device has control over the
link at any given time.
Figure 2.7 illustrates hop-to-hop (node-to-node) delivery by the data link layer.
2.21
Figure 2.7 Hop-to-hop delivery

2.22
Figure 2.8 Network layer

2.23
Note

The network layer is responsible for the


delivery of individual packets from
the source host to the destination host.

2.24
Other responsibilities of the network layer include the following:

o Logical addressing. The physical addressing implemented by the data link layer
handles the addressing problem locally. If a packet passes the network boundary,
we need another addressing system to help distinguish the source and destination
systems. The network layer adds a header to the packet coming from the upper
layer that, among other things, includes the logical addresses of the sender and
receiver.

o Routing. When independent networks or links are connected to create intemetworks


(network of networks) or a large network, the connecting devices (called routers
or switches) route or switch the packets to their final destination. One of the functions
of the network layer is to provide this mechanism.

2.25
Figure 2.9 Source-to-destination delivery

2.26
Figure 2.10 Transport layer

2.27
Other responsibilities of the transport layer include the following:
o Service-point addressing. Computers often run several programs at the same time. For this
reason, source-to-destination delivery means delivery not only from one computer to the next
but also from a specific process (running program) on one computer to a specific process
(running program) on the other. The transport layer header must therefore include a type of
address called a service-point address (or port address). The network layer gets each packet to
the correct computer; the transport layer gets the entire message to the correct process on
that computer.
o Segmentation and reassembly. A message is divided into transmittable segments, with each
segment containing a sequence number. These numbers enable the transport layer to reassemble
the message correctly upon arriving at the destination and to identify and replace packets that
were lost in transmission.
o Connection control. The transport layer can be either connectionless or connection oriented.
A connectionless transport layer treats each segment as an independent packet and delivers it to
the transport layer at the destination machine. A connection oriented transport layer makes a
connection with the transport layer at the destination machine first before delivering the packets.
After all the data are transferred, the connection is terminated.

o Flow control. Like the data link layer, the transport layer is responsible for flow
control. However, flow control at this layer is performed end to end rather than
across a single link.
o Error control. Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed process-to process rather than across a single
link. The sending transport layer makes sure that the entire message arrives at the receiving
2.28
Note

The transport layer is responsible for the delivery


of a message from one process to another.

2.29
Figure 2.11 Reliable process-to-process delivery of a message

2.30
Figure 2.12 Session layer

2.31
Note

The session layer is responsible for dialog


control and synchronization.

2.32
Specific responsibilities of the session layer include the following:

o Dialog control. The session layer allows two systems to enter into a dialog. It allows the
communication between two processes to take place in either halfduplex (one way at a time) or
full-duplex (two ways at a time) mode.

o Synchronization. The session layer allows a process to add checkpoints, or synChronization


points, to a stream of data. For example, if a system is sending a file of 2000 pages, it is
advisable to insert checkpoints after every 100 pages to ensure that each 100-page unit is
received and acknowledged independently. In this case, if a crash happens during the
transmission of page 523, the only pages that need to be resent after system recovery are pages
501 to 523. Pages previous to 501 need not be resent. Figure 2.12 illustrates the relationship of
the session layer to the transport and presentation layers.

2.33
Figure 2.13 Presentation layer

2.34
Note

The presentation layer is responsible for translation,


compression, and encryption.

2.35
Specific responsibilities of the presentation layer include the following:

o Translation. The processes (running programs) in two systems are usually exchanging
information in the form of character strings, numbers, and so on. The information must be
changed to bit streams before being transmitted. Because different computers use different
encoding systems, the presentation layer is responsible for interoperability between these
different encoding methods. The presentation layer at the sender changes the information from
its sender-dependent format into a common format. The presentation layer at the receiving
machine changes the common format into its receiver-dependent format.

o Encryption. To carry sensitive information, a system must be able to ensure privacy.


Encryption means that the sender transforms the original information to another form and sends
the resulting message out over the network. Decryption reverses the original process to
transform the message back to its original form.

o Compression. Data compression reduces the number of bits contained in the


information. Data compression becomes particularly important in the transmission
of multimedia such as text, audio, and video.

2.36
Figure 2.14 Application layer

2.37
Note

The application layer is responsible for providing services


to the user.
It provides user interfaces and support for services such as
electronic mail,
remote file access and transfer, shared database management,
and other types of distributed information services.

2.38
Specific services provided by the application layer include the following:

o Network virtual terminal. A network virtual terminal is a software version of a physical


terminal, and it allows a user to log on to a remote host. To do so, the application creates a
software emulation of a terminal at the remote host. The user's computer talks to the software
terminal which, in turn, talks to the host, and vice versa. The remote host believes it is
communicating with one of its own terminals and allows the user to log on.

o File transfer, access, and management. This application allows a user to access
files in a remote host (to make changes or read data), to retrieve files from a remote
computer for use in the local computer, and to manage or control files in a remote
computer locally.
o Mail services. This application provides the basis for e-mail forwarding and
storage.
o Directory services. This application provides distributed database sources and
access for global information about various objects and services.

2.39
Figure 2.15 Summary of layers

2.40
2-4 TCP/IP PROTOCOL SUITE

The layers in the TCP/IP protocol suite do not exactly


match those in the OSI model. The original TCP/IP
protocol suite was defined as having four layers: host-to-
network, internet, transport, and application. However,
when TCP/IP is compared to OSI, we can say that the
TCP/IP protocol suite is made of five layers: physical,
data link, network, transport, and application.

Topics discussed in this section:


Physical and Data Link Layers
Network Layer
Transport Layer
Application Layer
2.41
Figure 2.16 TCP/IP and OSI model

2.42
TCP/IP is a hierarchical protocol made up of interactive modules, each of which
provides a specific functionality; however, the modules are not necessarily interdependent.
Whereas the OSI model specifies which functions belong to each of its layers,
the layers of the TCP/IP protocol suite contain relatively independent protocols that
can be mixed and matched depending on the needs of the system. The term hierarchical
means that each upper-level protocol is supported by one or more lower-level
protocols.
Physical and Data Link Layers
At the physical and data link layers, TCPIIP does not define any specific protocol
Network Layer
At the network layer (or, more accurately, the internetwork layer), TCP/IP supports
the Internetworking Protocol. IP, in turn, uses four supporting protocols: ARP,
RARP, ICMP, and IGMP
Internetworking Protocol (IP)
The Internetworking Protocol (IP) is the transmission mechanism used by the TCP/IP
protocols. It is an unreliable and connectionless protocol-a best-effort delivery service.
The term best effort means that IP provides no error checking or tracking. IP assumes
the unreliability of the underlying layers and does its best to get a transmission through
to its destination, but with no guarantees.
IP transports data in packets called datagrams, each of which is transported separately.
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.
2.43
Address Resolution Protocol
The Address Resolution Protocol (ARP) is used to associate a logical address with a
physical address. On a typical physical network, such as a LAN, each device on a link
is identified by a physical or station address, usually imprinted on the network interface
card (NIC). ARP is used to find the physical address of the node when its Internet
address is known
Reverse Address Resolution Protocol
The Reverse Address Resolution Protocol (RARP) allows a host to discover its Internet
address when it knows only its physical address. It is used when a computer is connected
to a network for the first time or when a diskless computer is booted
Internet Control Message Protocol
The Internet Control Message Protocol (ICMP) is a mechanism used by hosts and
gateways to send notification of datagram problems back to the sender. ICMP sends
query and error reporting messages
Internet Group Message Protocol
The Internet Group Message Protocol (IGMP) is used to facilitate the simultaneous
transmission of a message to a group of recipients
Transport Layer
Traditionally the transport layer was represented in TCP/IP by two protocols: TCP and
UDP. IP is a host-to-host protocol, meaning that it can deliver a packet from one
physical device to another. UDP and TCP are transport level protocols responsible
for delivery of a message from a process (running program) to another process. A new
2.44
transport layer protocol, SCTP, has been devised to meet the needs of some newer
User Datagram Protocol
The User Datagram Protocol (UDP) is the simpler of the two standard TCPIIP transport
protocols. It is a process-to-process protocol that adds only port addresses, checksum
error control, and length information to the data from the upper layer. UDP is discussed
in Chapter 23.
Transmission Control Protocol
The Transmission Control Protocol (TCP) provides full transport-layer services to
applications. TCP is a reliable stream transport protocol. The term stream, in this context,
means connection-oriented: A connection must be established between both ends
of a transmission before either can transmit data.
At the sending end of each transmission, TCP divides a stream of data into smaller
units called segments. Each segment includes a sequence number for reordering after
receipt, together with an acknowledgment number for the segments received. Segments
are carried across the internet inside of IP datagrams. At the receiving end, TCP collects
each datagram as it comes in and reorders the transmission based on sequence
Numbers
Stream Control Transmission Protocol
The Stream Control Transmission Protocol (SCTP) provides support for newer
applications such as voice over the Internet
Application Layer
The application layer in TCPIIP is equivalent to the combined session, presentation,
and application layers in the OSI modeL Many protocols are defined at this layer

2.45
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.

TCP/IP
46
Protocol Suite
Figure 2.7 Layers in the TCP/IP Protocol Suite

TCP/IP
47
Protocol Suite
Figure 2.8 TCP/IP and OSI model

TCP/IP
48
Protocol Suite
Figure 2.10 Communication at the physical layer

Legend Source Destination

A R1 R3 R4 B
Physical Physical
layer layer
Link 1 Link 3 Link 5 Link 6

011 ... 101


01
1.
..
10
1

011 ... 101 011 ... 101

TCP/IP
49
Protocol Suite
Note

The unit of communication at the


physical layer is a bit.

TCP/IP
50
Protocol Suite
Figure 2.11 Communication at the data link layer

Legend Source Destination D Data H Header


A R1 R3 R4 B
Data link Data link

Physical Physical
Link 1 Link 3 Link 5 Link 6

D2 H2
Frame
D2 ame
Fr

H2

D2 H2 D2 H2
Frame Frame

TCP/IP
51
Protocol Suite
Note

The unit of communication at the data


link layer is a frame.

TCP/IP
52
Protocol Suite
Figure 2.12 Communication at the network layer

Legend Source Destination D Data H Header


A R1 R3 R4 B
Network Network

Data link Data link

Physical Physical

D3 H3
Datagram

D3 H3
Datagram
TCP/IP
53
Protocol Suite
Note

The unit of communication at the


network layer is a datagram.

TCP/IP
54
Protocol Suite
Figure 2.13 Communication at transport layer

A Legend Source Destination D Data H Header B


Transport Transport
R1 R3 R4
Network Network

Data link Data link

Physical Physical

D4 H4
Segment

D4 H4
Segment
TCP/IP
55
Protocol Suite
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.

TCP/IP
56
Protocol Suite
Figure 2.14 Communication at application layer

A B
Application Legend Source Destination D Data H Header Application

Transport Transport
R1 R3 R4
Network Network

Data link Data link

Physical Physical

D5 D5
Message

D5 D5
TCP/IP
57 Message
Protocol Suite
Note

The unit of communication at the


application layer is a message.

TCP/IP
58
Protocol Suite
2-5 ADDRESSING

Four levels of addresses are used in an internet employing


the TCP/IP protocols: physical, logical, port, and specific.

Topics discussed in this section:


Physical Addresses
Logical Addresses
Port Addresses
Specific Addresses

2.59
Figure 2.17 Addresses in TCP/IP

2.60
Figure 2.18 Relationship of layers and addresses in TCP/IP

2.61
Physical address (MAC address):
- The physical address is the physical hardware device.
- This is specified by the manufacture company of the card.
- A hardware address that uniquely identifies each node of a network.
-The MAC layer interfaces directly with the network medium.
An example of a MAC-48 address would be
"00-08-74-4C-7F-1D".
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 ( : ) or ( - ),
as shown below:
Example 2.2
07:01:02:01:2C:4B
07-01-02-01-2C-4B
Logical address (IP):
•An IP address of the system is called logical address.
• This address is used by network layer to identify a particular network (source to
destination) among the networks.
•This address can be changed by changing the host position on the network. So it
2.62
is called logical address.
Port Address:
§ There are many application running on the computer.
§ Each application run with a port no.(logically) on the computer.

753
A 16-bit port address represented as one single number.

Specific Address:
- User-friendly addresses
- Examples include the e-mail address (for example, [email protected]) defines
the recipient of an e-mail

2.63
Example 2.1

In Figure 2.19 a 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). As the
figure shows, the computer with physical address 10 is
the sender, and the computer with physical address 87 is
the receiver.

2.64
Figure 2.19 Physical addresses

2.65
Example 2.2

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.

2.66
Example 2.3

Figure 2.20 shows a part of an 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 (only two are shown in the figure). So
each router has three pairs of addresses, one for each
connection.

2.67
Figure 2.20 IP addresses

2.68
Example 2.4

Figure 2.21 shows 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.69
Figure 2.21 Port addresses

2.70
Note

The physical addresses will change from hop to hop,


but the logical addresses usually remain the same.

2.71
Example 2.5

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


decimal number as shown.

753

A 16-bit port address represented


as one single number.

2.72
Note

The physical addresses change from hop to hop,


but the logical and port addresses usually remain the same.

2.73
Data Flow and Encapsulation
Data flow occurs when two devices are connected in a network with some kind of shared
transmission medium.
1) An application running on the source device creates some kind of data. This happens
at the Application layer.
2) The application needs to add encryption to that data. This will be done at
the Presentation layer.
3) At the Session layer it appends the Session ID.
4) The Transport layer breaks the data into blocks of data which we call Segments .
Every Segment also gets the Port number to identify which upper layer application
needs to receive the data on the destination device
5) The Network layer takes the Segment, and appends the source and destination IP
address. At that point the Segment becomes a Packet.
6) At Data Link layer the source and destination MAC address and the CRC is added. At
this point we have a Frame.
7) The Frame then is sent to the physical device where it is translated into some kind of a
signal (often call it Bits)

2.74
Decapsulation at the Destination Device

1) The destination device receives series of bits and interprets them as a Frame.
2) It removes MAC addresses and the CRC, and passes the data up to the Network layer.
3) IP addresses are removed and the Packet is forwarded up to the Transport layer .
4) The Port number is looked at and the Segment gets forwarded up the to the appropriate
application specified by the Port number.
5) The Session ID is used.
6) Encryption will be removed.
7) The data in its original form is presented to the application that needs to interpret it.

2.75

You might also like