Friday, September 25, 2015

OSI Layers Model

Understanding the Layers
As shown in Table 3.2, the OSI model has seven layers. Many people use mnemonics to
memorize the layers. For example, “All People Seem To Need Data Processing” works for some
people. The first letter in each of the words represents the first letter of the layer. The A in All is for
Application, the P in People is for Presentation, and so on. Another common mnemonic is “Please Do
Not Throw Sausage Pizza Away” (for Physical, Data Link, Network, Transport, Session,
Presentation, and Application).
After mastering the mnemonic, you also need to remember which layer is Layer 1, and which
layer is Layer 7. This memory technique may help. You may have heard about a “Layer 8 error.” This
is another way of saying “user error” and users interact with applications. In other words, a user on
the mythical Layer 8 interacts with applications, which are on Layer 7. I don’t mean to belittle users
or user errors—I make my fair share of errors. However, this memory trick has helped me and many
other people remember that the Application layer is Layer 7.
The following sections provide a short synopsis of the OSI model. If you’d like to dig deeper,
check out the “Open System Interconnection Protocols” section on Cisco’s DocWiki site at
http://docwiki.cisco.com/wiki/Open_System_Interconnection_Protocols.

Layer 1: Physical
The Physical layer is associated with the physical hardware. It includes specifications for cable
types, such as 1000BaseT, connectors, and hubs. Computing devices such as computers, servers,
routers, and switches transmit data onto the transmission medium in a bit stream. This bit stream is
formatted according to specifications at higher-level OSI layers.

Layer 2: Data Link
The Data Link layer is responsible for ensuring that data is transmitted to specific devices on the
network. It formats the data into frames and adds a header that includes MAC addresses for the
source and destination devices. It adds frame check sequence data to the frame to detect errors. This
does not support error correction though. The Data Link layer simply discards frames with detected
errors. Flow control functions are also available on this layer.
Switches operate on this layer. As a reminder, computer NICs have a MAC assigned and
switches map the computer MAC addresses to physical ports on the switch. Systems use ARP to
resolve IPv4 addresses to MAC addresses, and NDP to resolve IPv6 addresses to MAC addresses.
VLANs are defined on this layer.

Layer 3: Network
The Network layer uses logical addressing in the form of IP addresses at this layer. This
includes both IPv4 addresses and IPv6 addresses. Packets identify where the traffic originated (the
source IP address) and where it is going (the destination IP address). Other protocols that operate on
this layer are IPsec and ICMP. Routers and Layer 3 switches operate on this layer.

Layer 4: Transport
The Transport layer is responsible for transporting data between systems, commonly referred to
as end-to-end connections. It provides reliability with error control, flow control, and segmentation
of data. TCP and UDP operate on this layer.

Layer 5: Session
The Session layer is responsible for establishing, maintaining, and terminating sessions between
systems. In this context, a session refers to an extended connection between two systems sometimes
referred to as dialogs or conversations. As an example, if you log on to a web page, the Session layer
establishes a connection with the web server and keeps it open while you’re interacting with the web
pages. When you close the pages, the Session layer terminates the session.
If you’re like many users, you probably have more than one application open at a time. For
example, in addition to having a web browser open, you might have an email application open. Each
of these is a different session, and the Session layer manages them separately.

Layer 6: Presentation
The Presentation layer is responsible for formatting the data as needed by the end-user
applications. For example, American Standard Code for Information Interchange (ASCII) and
Extended Binary Coded Decimal Interchange Code (EBCDIC) are two standards that define codes
used to display characters on this layer.

Layer 7: Application
The Application layer is responsible for displaying information to the end user in a readable
format. Application layer protocols typically use this layer to determine if sufficient network
resources are available for an application to operate on the network.
Note that this layer doesn’t refer to end-user applications directly. However, many end-user
applications use protocols defined at this layer. For example, a web browser interacts with DNS
services to identify the IP address of a web site name. Similarly, HTTP transmits web pages over the
Internet on this layer, which are ultimately displayed in a web browser.

Some of the protocols that operate on this layer are DNS, FTP, FTPS, HTTP, HTTPS, IMAP4,
LDAP, POP3, RDP, SCP, SFTP, SMTP, SNMP, SSH, Telnet, and TFTP. SCP isn’t defined in an RFC
so you won’t find a definitive source indicating which layer it operates on. However, SCP uses SSH
for data transfer and SSH operates on Layer 7. Similarly, RDP is a proprietary protocol and
Microsoft doesn’t link it to an OSI layer. However, RDP is listed as an Application layer protocol on
the TCP/IP model.
Many advanced devices are application aware and operate on all of the layers up to the
Application layer. This includes proxies, application-proxy firewalls, web application firewalls,
web security gateways, and UTM security appliances.

No comments:

Post a Comment