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

Lecture1 Layered Models OSI

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

IS 014 Network Systems and

Security

Layered Models
Layered Models
1. Introduction to Layered Models
2. OSI and TCP/IP Models
3. Benefits of Using a Layered Model
1. Introduction to Layered Models
• General problems in communication networks
• Hardware failure
• Hosts, routers
• Network congestion
• Networks have limited capacity
• Packet delay
• Data corruption
• Electric, magnetic interferences
• H/W failure
• Data duplication
1. Introduction to Layered Models
• Existing problems in communication networks
• One (possible) solution: The use of Protocols
• Protocol definition
• The need for protocols
• Set of protocols: Layering
• What is Layering?
• Why Layering?
1. Introduction to Layered Models
• Protocol
• Agreement about communication
• Specifies
• Format of messages
• Meaning of messages
• Rules for exchange
• Procedures for handling problems
• Protocols allow to specify or understand communication without
knowing the details of a particular hardware
1. Introduction to Layered Models
• The need for protocols
• Many problems can occur
• Bits corrupted or destroyed
• Entire packet lost
• Packet duplicated
• Packets delivered out of order
1. Introduction to Layered Models
• The need for protocols (cont’d)
• Need mechanisms to distinguish among
• Multiple computers on a network
• Multiple applications on a computer
• Multiple copies of a single application on a computer
• Different Operating Systems (OS)
• Protocols: the concept of layering
• Protocols designed in layers – each layer devoted to one sub-problem
1. Introduction to Layered Models
• The concept of layering
• A technique to organize a Sender The modules of
Receiver
network system into a Protocol S/W are
succession of logically distinct Layer n on each machine Layer n
stacked vertically
entities, such that the service … into layers …
provided by one entity is Layer 2 Layer 2
solely based on the service
provided by the previous Layer 1 Layer 1
entity

Network
1. Introduction to Layered Models
• Conceptually: sending a message from an application program on one
machine to an application program on another means:
• Transferring the message down through successive layers of protocol
software on the sender’s machine,
• Forwarding the message across the network, and
• Transferring the message up through successive layers of protocol software
on the receiver’s machine
1. Introduction to Layered Models
• Example: Five Layers
Application
• Application: supporting network applications: ftp,
smtp, http Transport
• Transport: host-to-host data transfer: TCP, UDP
• Network: routing datagrams from source to Network
destination: IP, routing protocols
• Link: data transfer between neighboring network Link
elements: PPP, Ethernet
• Physical: bits “on the wire” Physical
1. Introduction to Layered Models
• Protocol layering and data Application M Message
• Each layer takes data from
Transport H M Segment
above
• Adds header information Network H H M Datagram
to create new data unit
• Passes new data unit to Link H H H M Frame
layer below
Physical
• Each layer (receiving side)
• Removes header from
incoming packet
1. Introduction to Layered Models
• Benefits of layering
• Breaks down complex problems into more manageable components
• Implementation details of one layer are abstracted (hidden) away from other
layers
Homework
• Discuss the disadvantages of layering
2. OSI and TCP/IP Models
• Two models for organizing the responsibility of networking
components
1. Open System Interconnection (OSI) reference model
2. Transmission Control Protocol/Internet Protocol (TCP/IP) reference
model
OSI Reference Model
• The Open Systems Interconnection (OSI) is a model developed by the
International Standards Organization (ISO)
• The 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 model (OSI), first introduced in the late
1970s
• ISO is the organization, OSI is the model
OSI Reference Model
• The OSI Model is an abstract description for layered
communications and computer network protocol design
• It divides network architecture into seven layers which,
from top to bottom, are:
• Application
• Presentation
• Session
• Transport
• Network
• Data Link
• Physical
• It is therefore often referred to as the OSI Seven Layer
Model
OSI Reference Model – Seven Layers
• Defines 7 conceptual layers
• Each serves a very specific purpose
• Developed as a reference to be used for all future protocols
• The OSI model organizes networks in series of seven layers to:
• Provide modular engineering (reduce design complexity) to standardized
interfaces among layers
• Improve interoperability (vendor create interoperable network devices and
software in form of protocols)
• Guide to network troubleshooting
OSI Reference Model – Seven Layers
OSI Model
Category Data unit Layer Function
7. Application Network process to application
Data representation, encryption
Data 6. Presentation
Host and decryption
layers 5. Session Inter-host communication
End-to-end connections and
Segment 4. Transport
reliability, Flow control
Packet
Path determination and logical
(datagram 3. Network
addressing
Media )
layers Frame 2. Data Link Physical addressing
Media, signal and binary
Bit 1. Physical
transmission
OSI Reference Model – Seven Layers
• Peer-to-peer processes
• Layer x on one machine communicates with layer x on another machine - called
Peer-to-Peer Processes
• Interfaces between Layers
• Each interface defines what information and services a layer must provide for
the layer above it
• Well defined interfaces and layer functions provide modularity to a network
• Organizations of the layers
• Network support layers: Layers 1, 2, 3
• User support layers: Layer 5, 6, 7
• Transport layer: Layer 4 – links the two subgroups
OSI Reference Model – Seven Layers
• An exchange using the OSI
model
• The data portion of a
packet at level N-1 carries
the whole packet from
level N.
• The concept is called
encapsulation.
Layer Descriptions – The Physical Layer
• Provides physical interface for transmission of information
• Defines rules by which bits are passed from one system to another on
a physical communication medium
• Covers all - mechanical, electrical, functional and procedural aspects
for physical communication
• Characteristics are such as:
• Voltage levels, timing of voltage changes, physical data rates, maximum
transmission distances, physical connectors and other similar attributes
Layer Descriptions – The Physical Layer
• The physical layer is responsible for movement of individual bits (0s and 1s) from
one hop (node) to the next
• The bits are carried through the medium in form of signals
• Conversion from 0s and 1s to signal – beyond the scope of this course
Layer Descriptions – The Data Link Layer
• Provides reliable communication over the physical layer interface
• Breaks the outgoing data into frames and reassembles the frames at the receiver
• Creates and detects frame boundaries (framing)
• Handles errors by implementing an acknowledgement and retransmission
scheme
• Implements flow control
• Procedures to inform senders how much and when to transmit data
• Supports point-to-point as well as broadcast communication
• Supports simplex, half-duplex or full-duplex communication
Layer Descriptions – The Data Link Layer
• Simplex - One direction only
• e.g. Television and radio broadcast

• Half duplex - Either direction, one way at a


time
• e.g. radio call

• Full duplex - Both directions at the same


time
• e.g. telephone
Layer Descriptions – The Data Link Layer
• The data link layer is responsible for moving frames from one hop
(node) to the next
Layer Descriptions – The Network Layer
• Routes packets through the network
• Defines the most optimum path that packets should take from source
to destination
• Defines logical addressing so that any endpoint can be identified
• Handles congestion in the network
• Facilitates interconnection between heterogeneous networks
(Internetworking)
• Defines how to fragment a packet into smaller packets
Layer Descriptions – The Network Layer
• The network layer is responsible for the delivery of individual packets
from the source host to the destination host
Layer Descriptions – The Transport Layer
• Provides a reliable mechanism for the exchange of data (message) between two
processes in different computers
• Ensures that the data units are delivered error free
• Ensures that data units are delivered in sequence
• Ensures that there is no loss or duplication of data units
• Provides connectionless or connection-oriented service
• See later in the course
• Provides for connection management
• Multiplex multiple connection over a single channel
• multiplexing
Layer Descriptions – The Transport Layer
• The transport layer is responsible for the delivery of a message
(multiple segments) from one process to another
Layer Descriptions – The Session Layer
• Provides mechanism for controlling the dialogue between two end systems
• Defines how to start, control and end conversations (sessions) between
applications
• Requests for a logical connection to be established on an end-user’s request
• Handles log-on or password validation
• Terminates the connection after a session
• Provides services like dialogue discipline which can be full duplex or half duplex
• Provides check-pointing mechanism such that if a failure occurs between
checkpoints, all data can be retransmitted from the last checkpoint
Layer Descriptions – The Session Layer
• The session layer is responsible for dialog control and synchronization
Layer Descriptions – The Presentation Layer
• Defines the format in which the data is to be exchanged between the two
communicating entities
• Handles data compression and data encryption (cryptography)
• Responsible for translation, compression, and encryption
Layer Descriptions – The Application Layer
• Interacts with application programs and is the highest level in the OSI
model
• Contains management functions to support distributed applications
• Examples of application layer are applications such as file transfer,
electronic mail, remote login etc.
• Responsible for providing services to the user
Layer Descriptions – The Application Layer
OSI in action
• A message begins at the top application layer and moves down the OSI layers to the bottom physical
layer
• As the message descends, each successive OSI model layer adds a header to it (encapsulation)
• A header is layer-specific information that explains what functions the layer carried out
• Conversely, at the receiving end, headers are stripped-off from the message as it travels up the
corresponding layers
DATA ENCAPSULATION AND
DECAPSULATION
Data Encapsulation
•Sending and receiving of data from a source device to the destination
device is possible with the help of networking protocols by using data
encapsulation.
•When a host transmits data to another device across a network, the
data is encapsulated with protocol information at each layer of the OSI
reference model.
•Each layer communicates with its neighbor layer on the destination.
Each layer uses Protocol Data Units (PDUs) to communicate and
exchange information.
Protocol Data Unit (PDU)
• The Protocol Data Units contain the control information attached to
the data at each layer. The information is attached to the header of
the data field but can also be in end of the data field or trailer.
• PDUs are encapsulated by attaching them to the data at each layer of
the OSI reference model.
• Each Protocol Data Unit has a name depending on the information
each header has. This PDU information is only read by the neighbor
layer on the destination and then is stripped off and the data is
handed to the next layer
OSI Layer Model and PDUs

• The seven layered Open System Interconnection (OSI) model is


basically defined for reducing the complexity of the internetworking.
• The OSI Model is then divided into two segments for more ease,
Upper layers and Data Flow layers. The 7th, 6th and 5th layer of the
OSI reference model are application layers also known as upper
layers. The upper layers are directly related with user interface while
the 4rth, 3rd, 2nd and 1st layer of the OSI model are also called data
flow layers because they are related with the flow of the data. Each
data flow layer has a Protocol Data Unit.
The Protocol Data Unit of each data flow layers is defined as follows:
•Transport Layer: Segment is the PDU of the Transport layer.
•Network Layer: Packet is the PDU of the Transport layer.
•Data Link Layer: Frame is the PDU of the Transport layer.
•Physical Layer: Bit is the PDU of the Transport layer.
• The encapsulation and de-encapsulation of header control
information on each layer of the OSI reference model is as follows:
Encapsulation and De-Encapsulation Process
The encapsulation and de-encapsulation of header control information on each layer of
the OSI reference model is as follows:

TCP Header Encapsulation


•The application-layers user data is converted for transmission on the network. The data
stream is then handed down to the Transport layer, which sets up a virtual circuit to the
destination. The data stream is then broken up, and a Transport layer header is created
and called a segment. The header control information is attached to the Transport layer
header of the data field. Each segment is sequenced so the data stream can be put back
together on the destination exactly as transmitted.

IP Header Encapsulation
•Each segment is then handed to the Network layer for logical addressing and routing
through a routed protocol, for example IP, IPX, Apple Talk and DECNET etc. The Network-
layer protocol adds a header to the segment handed down to the Data Link layer.
Remember that the 3rd and 4rth layers work together to rebuild a data stream on a
destination host. However, they have no responsibility for placing their Protocol Data Units
on a local network segment, which is the only way to get the information to host or router.
MAC Header Encapsulation
•The Data Link layer receives the packets from the Network layer and placing them
on the network medium such as cable or wireless media. The Data Link layer
encapsulates each packet in a frame, and the MAC header carries the source Mac
address and destination Mac address. If the device is on a different network, then
the frame is sent to a router to be routed through an internetwork.

Physical Layer Encapsulation


•Once the frame gets to the destination network, a new frame is used to get the
packet to the destination host. To put this frame on the network, it must first be
put into a digital signal. Since a frame is really a logical group of 1s and 0s, the
Physical layer of the OSI model is responsible for encapsulating these digits into a
digital signal, which is read by devices on the same local network.
Data encapsulation flow

• At a transmitting device, the data encapsulation method works as follows:


• User information is converted into data for transmission on the network.
Data is converted into segments and a reliable or unreliable connection is
set up between the source and destination devices using connection
oriented and connectionless protocols. Segments are converted into
packets using a logical address such as IP datagram using an IP address.
Packets are converted into frames for transmission on the local network.
Media Access Control (MAC) addresses or Ethernet addresses are
commonly used to uniquely identify hosts on a local network segment.
Frames are converted into bytes and bits, and a digital encoding and
clocking or signaling method is used.
Data encapsulation flow
De-Encapsulation

• On destination side, the receiving devices will synchronize on the digital


signal and extract the 1s and 0s from the digital signal. At this point the
devices build the frames, run a Cyclic Redundancy Check (CRC), and then
check their output against the output in the Frame Check Sequence (FCS)
field of the data frame. If the information matches then the packet is pulled
from the frame, and the frame is discarded. This process is known as de-
encapsulation. The packet then transfers to the Network layer, where the IP
address is checked. If the IP address matches then the segment is pulled
from the packet, and the packet is discarded. The data is processed at the
Transport layer that rebuilds the data stream and acknowledges to the
transmitting station that it received each piece of segment. It then happily
transfers the data stream to the upper layer application.
Collision Domain
• Collision domain is a set of LAN devices whose frames could collide
with one another. This happens with hubs, bridges, repeaters and
wireless access points as only one device can send and receive at a
time. If more than one device tries sending or receiving, the
information is lost and irrecoverable and it will need to be resent.
This can slow down network performance along with making it a
security threat.
• A hub is considered a layer one device of the OSI model; all it does is
send packets out on all ports including the port in which the packet
was received on. This causes a collision because only one device can
transmit at time. This also shares the bandwidth of all devices
connected to that collision domain
Overview of Network Devices

Routers
Switches, Bridges
Hub, Repeaters

• Ethernet networks used to be built using repeaters.


• When the performance of these networks began to suffer because too many devices shared the same
segment, network engineers added bridges to create multiple collision domains.
• As networks grew in size and complexity, the bridge evolved into the modern switch, allowing
microsegmentation of the network.
• Today’s networks typically are built using switches and routers, often with the routing and switching
function in the same device.
Bridges

• A bridge is a Layer 2 device used to divide, or segment, a network.


• A bridge is capable of collecting and selectively passing data frames between
two network segments.
• Bridges do this by learning the MAC address of all devices on each connected
segment. Using this information, the bridge builds a bridging table and
forwards or blocks traffic based on that table.
• This results in smaller collision domains and greater network efficiency.
• Bridges do NOT restrict broadcast traffic.
Switches

• Switches create a virtual circuit between two connected devices, establishing


a dedicated communication path between two devices.
• Switches on the network provide microsegmentation.
• This allows maximum utilization of the available bandwidth.
• A switch is also able to facilitate multiple, simultaneous virtual circuit
connections.
• Broadcast frames to all connected devices on the network.
Router

• A router is a Layer 3 device.


• Used to “route” traffic between two or more Layer 3 networks.
• Routers make decisions based on groups of network addresses, or classes, as
opposed to individual Layer 2 MAC addresses.
• Routers use routing tables to record the Layer 3 addresses (IP Address) of the
networks that are directly connected to the local interfaces and network
paths learned from neighboring routers.
• Routers are does not forward broadcasts.
Elements of Ethernet/802.3 networks

• Broadcast data frame delivery of Ethernet/802.3


• The carrier sense multiple access/collision detect (CSMA/CD) method allows
only one station to transmit at a time.
• Multimedia applications with higher bandwidth demand such as video and the
Internet, coupled with the broadcast nature of Ethernet, can create network
congestion.
Collision Domain
• A collision domain is a network segment connected by a shared medium or
through repeaters where simultaneous data transmissions collide with one another.
• The collision domain applies particularly in wireless networks, but also affected early
versions of Ethernet. A network collision occurs when more than one device attempts to
send a packet on a network segment at the same time. Members of a collision domain
may be involved in collisions with one another. Devices outside the collision domain do
not have collisions with those inside.
• Only one device in the collision domain may transmit at any one time, and the other
devices in the domain listen to the network and refrain from transmitting while others are
already transmitting in order to avoid collisions. Because only one device may be
transmitting at any one time, total network bandwidth is shared among all devices on the
collision domain. Collisions also decrease network efficiency on a collision domain as
collisions require devices to abort transmission and retransmit at a later time.
Collision Domain
• Since data bits are propagated at a finite speed, simultaneously is to be
defined in terms of the size of the collision domain and the minimum packet
size allowed. A smaller packet size or a larger dimension would make it
possible for a sender to finish sending the packet without the first bits of the
message being able to reach the most remote node. So, that node could start
sending as well, without a clue to the transmission already taking place and
destroying the first packet. Unless the size of the collision domain allows
the initial sender to receive the second transmission attempt – the collision –
within the time it takes to send the packet he would neither be able to detect
the collision nor to repeat the transmission – this is called a late collision.
Collision Domain

All the devices are connected to a


hub in this diagram. When two pcs
send data at the same time, there
can be a collision so the number of
collision domain of hub is one.
Question.
Answer : Number of Collision domain is 4
Description:
•Here our network has a Switch and a Hub. A switch uses layer two of the
OSI model, so the switch uses MAC addresses to send the packet to the
correct device. Rather than sending it to all ports, a switch only sends the
packet out one port, if it has the MAC address in its MAC address table. If
not the switch will send the packet on all ports except for the port in which
the packet was received on. Switches provide separate collision domains on
each port. This provides dedicated bandwidth to that device. This also allows
simultaneous conversations between devices on different ports. Each port
can be operated at full-duplex so the device can send and receive
information at the same time. Switch has collision domain per-port.
•The 3 directly connected pc to the switch will have their own collision
domain and the port with which the pc is connected to the hub is shared
with hub, as hub will entertain the switch as an end device and put the
switch with the other two pc in the same collision so the total number of
collision domains is 4. 3 pc’s and 1 shared with hub.
BROADCAST DOMAIN

• The definition of a broadcast domain is a set of devices that if one device


sends a broadcast frame, all other devices will receive that frame in the
same broadcast domain. So if devices are in the same IP network, they
will be able to receive a broadcast message. Having a smaller broadcast
domain can improve network performance and improve against security
attacks. The more PCs and network devices connected to a single
broadcast domain, the more broadcast messages you will have.
Remember a broadcast message goes to every PC and network device.
BROADCAST DOMAIN

Switch by default has single broadcast domain and per-port collision domain.
Router has per-port collision and broadcast domain.
Hub has single broadcast and collision domain.
Answer
• The number of collision domain is 3
• And the broadcast domain is 3

• Explain the above answer


Answer

•The number of collision domain is 8


•And the broadcast domain is 2

•Explain the above answer

You might also like