OSI Seven Layer model Explained
Layer model is a theoretical approach to describe how data is going to be transmitted over the network. There are several layer models available, among those following three models are the most popular and highly tested in CCNA Exam.
1. OSI Reference model
2. TCP / IP Reference model
3. Cisco three-layer model
OSI Reference model
It was developed in 1984 by the International Organization for Standardization (ISO). This model has the following seven layers.
Application Layer
Application layer provides a platform to send and receive data over the network. All applications and utilities that communicate with network fall in this layer. For examples
· Browsers:- Mozilla Firefox, Internet Explorer, Google Chrome etc
· Email clients:- Outlook Express, Mozilla Thunderbird etc.
· FTP clients :- Filezilla, sFTP, vsFTP
Application layer protocols that you should know for the exam are as follows:
· SNMP (Simple Network Management Protocol):— Allows control of networked devices.
· TFTP (Trivial File Transfer Protocol):— Simple, lightweight file transfer.
· DNS (Domain Naming System):— Translates a website name (easy for people) to an IP address (easy for computers).
· DHCP (Dynamic Host Configuration Protocol):— Assigns IP, mask, and DNS server (plus a bunch of other stuff) to hosts.
· Telnet:— Provides a remote terminal connected to manage devices, which you are not close enough to use a console cable.
· HTTP (Hypertext Transfer Protocol):— Browse web pages.
· FTP (File Transfer Protocol):— Reliably sends/retrieves all file types.
· SMTP (Simple Mail Transfer Protocol):— Sends email.
· POP3 (Post Office Protocol v.3):— Retrieves email.
· NTP (Network Time Protocol):— Synchronizes networked device clocks.
Presentation layer
Presentation layer prepares the data. It takes data from application layer and mark it with formatting code such as .doc, .jpg, .txt, .avi etc. These file extensions make it easy to realize that a particular file is formatted with a particular type of application. With formatting presentation layer also deals with compress and encapsulation. It compresses or decompresses the data file. This layer can also encapsulate the data, but its uncommon as this can be handled by lower layers more effectively.
The Session Layer
Session layer deals with connections. It establishes, manages, and terminates sessions between two communicating nodes. This layer provides its services to the presentation layer. Session layer also synchronizes dialogue between the presentation layers of the two hosts and manages their data exchange. For example, web servers may have many users communicating with the server at a given time. Therefore, keeping track of which user communicates on which path is important and session layer handle this responsibility accurately.
Transport Layer
So far CCNA exam is a concern, this is the most important layer to study. I suggest you pay extra attention on this layer, as it is heavily tested in the exam.
- · It sets up and maintain the connection between the two devices.
- · It multiplexes connections that allow multiple applications to simultaneously send and receive data.
- · According to requirement data transmits method can be connection-oriented or connectionless.
- · For unreliable data delivery connectionless method is used.
- · Connection fewer methods use UDP protocol.
- · For reliable data delivery connection-oriented method is used.
- · Connection oriented methods use the TCP protocol.
- · When Implemented a reliable connection, sequence numbers and acknowledgements (ACKs) are used.
- · Reliable connection controls flow through the use of windowing or acknowledgements.
For the exam, purpose remembers five main functions of the transport layer.
1. Segmentation
2. Connection management
3. Reliable and unreliable data delivery
4. Flow control
5. Connection multiplexing
Let's cover these function in more depth
Segmentation
Segmentation is the process of breaking large data file into small manageable size that the network can accommodate. To understand this in an easy way, think about a 700 MB movie that you want to download from the internet. You have 2MBPS internet connection. How will you download a 700MB movie on 2MBPS internet connection ?. And the answer is the segmentation process. On server transport layer breaks the 700MB movie in a smaller size of segments (less than your internet connection speed) that your PC can easily download. So next time when you see the download progress bar in the browser, think it about segment receiver progress bar. Once your browser received all segments from the server, it pops up a message indicating download completed.
Connection management
Transport layer setup, maintain and tear down connections for the session layer. Actual mechanic of connection is controlled by the transport layer. Transport layer uses two protocols for connection management UDP and TCP.
UDP
UDP is connectionless protocols. Connection-less transmission is said to be unreliable. Now, don't get worried about the term "unreliable" this doesn't mean that the data isn't going to get its destination; it only means that it isn't guaranteed to get its destination. Think of your options when you are sending a postcard, put it in the mailbox, and chances are good that it will get where it's supposed to go—but there is no guarantee, and stuff does go missing in the way. On the other hand, it's cheap.
TCP
TCP is connection-oriented protocols. Connection-oriented transmission is said to be reliable. Thinks TCP as registry AD facility available in the Indian post office. For this level of service, you have to buy an extra ticket and put a bunch of extra labels on it to track where it is going and where it has been. You get a receipt when it is delivered, you are guaranteed delivery, and you can keep track of whether your shipment got to its destination. All of this costs you more—but it is reliable!
Reliability
Reliability means guaranteed data delivery. To ensure delivery of every single segment, a connection-oriented method is used. In this approach before sending any segments three-way handshake process is done.
Once connection established data transmission is initiated. To provide maximum reliability it cover these items :-
· Detect lost packets and resend them
· Detect packets that arrived out of order and reorder them
· Recognize duplicate packets and drop extra packet
· Avoid congestion by implementing flow control
Flow control
The transport layer can implement two flow control methods:
· Ready/not ready signals
· Windowing
Ready / not ready signals method
In this method sender sends data according to its buffer size. Receiver receives data in its buffer. When receivers buffer get filled, it send a not ready signal to sender, so sender can stop transmitting more segments. Receivers send ready signal when it become ready to receive next segment. There are two problems with the use of ready/not ready signals to implement flow control.
First, the receiver may respond to the sender with a not ready signal when its buffer fills up. While this message is on its way to the sender, the sender is still sending segments to the receiver, which the receiver will have to drop because its buffer space is full.
The second problem with the use of these signals is that once the receiver is ready to receive more segment, it must first send a ready signal to the sender, which must receive it before more segment can be sent.
Windowing
In windowing a window size is defined between sender and receiver. Sender host will wait for an acknowledgement signal after sending the segments equal to window size. If any packet lost in way receiver will respond with acknowledgement for lost packet. And sender will send lost packet again. Window size is automatically set during the three step handshake process. It can be adjust anytime throughout the lifetime of connection.
Connection Multiplexing/Application Mapping
Connection multiplexing features allow multiple applications to connect at once. For example a server performs a number of functions like email, FTP, DNS, Web service, file service, data service etc. Suppose server has a single IP address, still it can perform all these different functions for all the hosts that want to connect with it. To make this possible transport layer assigns a unique set of numbers for each connection. These numbers are called port or socket numbers. These port number allows multiple applications to simultaneously send and receive data.
Port numbers are divided into ranges by the IANA. Following are the current port ranges:
Port number
|
Descriptions
|
0–1023
|
Well-Known—For common TCP/IP functions and applications
|
1024–49151
|
Registered—For applications built by companies
|
49152–65535
|
Dynamic/Private—For dynamic connections or unregistered applications
|
Common TCP and UDP Port Numbers
TCP
|
UDP
|
||
FTP
|
20,21
|
DNS
|
53
|
Telnet
|
23
|
DHCP
|
67,68
|
SMTP
|
25
|
TFTP
|
69
|
DNS
|
53
|
NTP
|
123
|
HTTP
|
80
|
SNMP
|
161
|
POP
|
110
|
||
NNTP
|
119
|
||
HTTPS
|
443
|
Network Layer
Network layer is responsible for providing logical address know as IP address. Router works on this layer. Main functions of this layer are following :-
· Define IP address
· Find routes based on IP address to reach its destination
· Connect different data link type together like as Token Ring, Serial, FDDI, Ethernet etc.
IP packet
Network layer receive segment from transport layer and wrap it with IP header that is known as packet.
Datagram
Datagram is just another name of packet. Network layer use datagram to transfer information between machines.
Two types of packets are used at the Network layer: data and route updates.
Data packets
Data packets are used to transport the user data across the network. Protocols used by data packets are known as routed protocol. For example IP and IPv6
Route update packets
These packets are used to update routers information within internetwork. Protocols that send route update packets are called routing protocols; for example RIP, RIPv2, EIGRP, and OSPF
IP addresses are broken into two components:
· Network component :- Defines network segment of device.
· Host component :- Defines the specific device on a particular network segment
IP Classes
Class A addresses range from 1-126.
Class B addresses range from 128-191.
Class C addresses range from 192-223.
Class D addresses range from 224-239.
Class E addresses range from 240-254.
· 0 [Zero] is reserved and represents all IP addresses;
· 127 is a reserved address and is used for testing, like a loop back on an interface:
· 255 is a reserved address and is used for broadcasting purposes.
Class A, B,C address are known as public address that can be used to access devices in other public networks, such as the Internet. IANA (Internet Assigned Numbers Authority) is responsible for handing out and managing public addresses. You receive public address from ISP, which get them from one of five upstream address registries:
1. American Registry for Internet Numbers (ARIN)
2. Reseaux IP Europeans Network Coordination Center (RIPE NCC)
3. Asia Pacific Registry for Internet Numbers (APNIC)
4. Latin American and Caribbean Internet Address Registry (LACNIC)
5. African Network Information Centre (AfriNIC)
Private IP and ISP
Private IP address can be used to configure private network. You can use private IP to build your network without paying a single penny. But one biggest problem with private IP is that with private IP you cannot access the internet. This is the point where ISP comes from. ISP purchase a bulk of public IP address and provide them on rent. Whatever you pay to ISP for accessing internet is actually the charge of using public IP address.
Private IP address:- Not routable in public network
Class A: 10.0.0.0 - 10.255.255.255
Class B: 172.16.0.0 - 172.31.255.255
Class C: 192.168.0.0 - 192.168.255.255
Network layer protocols that you should know for exam
Protocol
|
Description
|
IP
|
IP of TCP/IP, featuring routable 32-bit addressing.
|
IPX
|
The equivalent of IP in Novell Netware.
|
ICMP
|
Internet Connection Management Protocol. Incorporates Ping and Traceroute, which are layer 3 link-testing utilities.
|
OSPF, IGRP, EIGRP, RIP, ISIS
|
Dynamic routing protocols that learn about remote networks and update them other neighbor routers running the same protocol.
|
ARP, RARP
|
Address Resolution Protocol (and Reverse ARP). ARP learns what MAC address is associated with a given IP address. Reverse ARP learns an IP address given a MAC address.
|
Data link layer
Main functions of data link layer are
· Defining the Media Access Control (MAC) or hardware addresses
· Defining the physical or hardware topology for connections
· Defining how the network layer protocol is encapsulated in the data link layer frame
· Providing both connectionless and connection-oriented services
· Defines hardware (MAC) addresses as well as the communication process that occurs within a media.
MAC Address
MAC address is a 48 bit long layer two address. It is also known as hardware address. This address is burnt with device by manufacturing company.
· The first six hexadecimal digits of a MAC address represent its manufacture company.
· MAC addresses only need to be unique in a broadcast domain.
· You can have the same MAC address in different broadcast domains .
Frame
Data link layer receive packet from network layer and wrap it with layer two header that is known as frame. There are two specifications of Ethernet frame.
1. Ethernet II
2. 802
Key points to remember :-
· Ethernet II does not have any sub layers, while IEEE 802.2/3 has two: LLC and MAC.
· Ethernet II has a type field instead of a length field (used in 802.3).
· 802.2 use a SAP or SNAP field to differentiate between encapsulated layer-3 payloads.
· With a SNAP frame, the SAP fields are set to 0xAA and the type field is used to indicate the layer-3 protocol.
· 802.2 SAP frame is eight bits in length and only the first six bits are used for identifying upper-layer protocols, which allows up to 64 protocols.
· 802.2 SNAP frame support of up to 65,536 protocols.
Physical Layer
Physical layer deals with communication media. This layer receive frame from data link layer and convert them in bits. It load these bits on actual communication media.
Depending on media type these bit values are converted in single. Some use audio tones, while others utilize state transitions—changes in voltage from high to low and low to high. Specific protocols are needed for each type of media to explain the proper bit patterns to be used, how data is encoded into media signals.
Fiber Cabling
Two types of fiber are used for connections: multimode and single-mode.
Multimode fiber
· Multimode fiber has thickness of either 850 or 1300 nm(nanometers).
· Light signals are provided by an LED.
· Multimode fiber can achieve speeds in hundreds of MBPS.
· Multiple signals can be transmitted per fiber.
Single-mode fiber
· Single mode fiber has a thickness of 1300 or 1550 nm.
· Light signals are provided by lasers.
· Single mode fiber can achieve speed up 100Gbps.
· Only one signal cab be transmitted per fiber.
Loss factor
Loss factor is used to describe any signal loss in the fiber before the light source gets to the end of the fiber.
Connector loss
Connector loss is a loss that occurs when a connector joins two pieces of fibers.
Attenuation
Attenuation is a signal loose due to distance.
Microbending
Microbending describe distortion in light source due to wrinkle in the fiber, typically where the cable is slightly bent.
Macrobending
Macrobending describe leakage of the light source from the fiber, usually from a bend in the fiber cable.
Transmission of signals across the fiber are defined by two standards SONET and SDH. Both of these standards define the physical layer framing used to transmit light sources, which also includes overhead for the transmission.
SONET
SONET is defined by the Exchange Carriers Standards Association (ECSA) and American National Standards Institute (ANSI) and is typically used in North America.
SDH
SDH is an international standard used throughout most of the world (with the exception of North America).
TCP/IP protocol
TCP/IP protocol model is another popular layer model that describe network standards. For CCNA exam you should be aware about this model as well. This model have same names of layers as OSI reference model have. Don't be confuse with same name, layers at both model have different functionality in each model.
Let's see how TCP/IP model is different from OSI reference model
Application layer:
TCP/IP model combine the functionality of application layer, presentation layer and session layer from OSI model in single application layer. In TCP/IP model application layer do all tasks those are performed by upper layers in OSI model. Application layer deals with high level protocols, including data presentation, compression and dialog control.
Transport layer:
In TCP/IP model transport layer provides quality of services. TCP protocol is used for reliable data delivery. Flow control and error correction methods are used for guaranteed data delivery.
Internet layer:
In TCP/IP model Internet layer provide all the functionality those network layer provide in OSI model. Internet layer is responsible for finding the correct path for datagram [ packet].
Network access layer:
Name of this layer may confuse you as OSI model have a layer of same name. In TCP/IP model network access layer deals with LAN and WAN protocols and all the functionality provided by physical and data link layer in OSI model.
Cisco's three-layer hierarchical model
Cisco's three layer hierarchical model is a set of networking specification provided by Cisco. This model describe which cisco device works on which layers.
Core Layer
This is a core layer that provides high-speed layer-2 switching infrastructure.
Distribution Layer
Distribution layer stands between access and core layers. Router and layer 3 switch works on this layer.
No comments: