Search

Sunday, 24 February 2019

What is OSI Model and its Protocols?


OSI Model and Network Protocols

·         OSI Seven Layer Model

·         Physical Layer (Layer 1)
·         Data-link Layer (Layer 2)
·         Network Layer (Layer 3)
·         Transport Layer (Layer 4)
·         Protocols at the Transport Layer
·         Flow Control
·         Session Layer (Layer 5)
·         Presentation Layer (Layer 6)
·         Application Layer (Layer 7)

·         OSI Model Summary
·         Identifying the OSI Layers at Which Various Network Components Operate
·         Differentiating Among Protocols
·         Connectionless and Connection-oriented Protocols
·         Internetwork Packet Exchange/Sequenced Packet Exchange
·         IPX Addressing
·         IPX Interoperability
·         IPX/SPX Naming
·         NetBEUI Protocol
·         NetBEUI Addressing
·         Interoperability with NetBEUI
·         AppleTalk
·         AppleTalk Addressing
·         AppleTalk Interoperability
·         AppleTalk Routing
·         AppleTalk Naming
·         The TCP/IP Protocol Suite
·         TCP/IP Standards
·         TCP/IP Addressing
·         TCP/IP Interoperability
·         TCP/IP Naming
·         TCP/IP Routing
·    

OSI Model and Network Protocols
One of the most important networking concepts to understand is the Open Systems Interconnect (OSI) reference model. This conceptual model, created by the International Organization for Standardization (ISO) in 1978 and revised in 1984, describes a network architecture that allows data to be passed between computer systems.
This tutorials looks at the OSI model and describes how it relates to real-world networking. It also examines how common network devices relate to the OSI model. Even though the OSI model is conceptual, an appreciation of its purpose and function can help you better understand how protocol suites and network architectures work in practical applications.
OSI Seven Layer Model
As shown in Figure 1, the OSI reference model is built, bottom to top, in the following order: physical, data-link, network, transport, session, presentation, and application. The physical layer is classified as layer 1 and the top layer of the model, the application layer, as layer 7.

Each layer of the OSI model has a specific function. The following sections describe the function of each layer, starting with the physical layer and working up the model.

Physical Layer (Layer 1)

The physical layer of the OSI model identifies the physical characteristics of the network, including the following specifications:
·         Hardware The type of media used on the network such as type of cable, type of connector, and pinout format for cables.
·         Topology The physical layer identifies the topology to be used in the network. Common topologies include ring, mesh, star, and bus.
In addition to these, the physical layer also defines the voltage used on a given media and the frequency at which the signals that carry the data move from one state to another. These characteristics dictate the speed and bandwidth of a given media as well as the maximum distance over which a certain media type can be used.

Data-link Layer (Layer 2)

The data-link layer is responsible for getting data to the physical layer so that it can be transmitted over the network. The data-link layer is also responsible for error detection, error correction, and hardware addressing. The term frame is used to describe the logical grouping of data at the data-link layer.
The data-link layer has two distinct sublayersthe Media Access Control (MAC) sublayer and the Logical Link Control (LLC) sublayer.
·         MAC layer The MAC address is defined at this layer. The MAC address is the physical or hardware address burned into each NIC. The MAC sublayer also controls access to network media. The MAC layer specification is included in the IEEE802.1 standard.
·         LLC layer The LLC layer is responsible for the error and flow-control mechanisms of the data-link layer. The LLC layer is specified in the 802.2 standard.

Network Layer (Layer 3)

The primary responsibility of the network layer is routingproviding mechanisms by which data can be passed from one network system to another. It does not specify how the data is passed, but rather provides the mechanisms to do so. Functionality at the network layer is provided through protocols, which are software components.
Protocols at the network layer are also responsible for route selection, which refers to determining the best path for the data to take throughout the network. In contrast to the data-link layer, which uses MAC addresses to communicate on the LAN, network protocols use software configured addresses and special routing protocols to communicate on the network. The term packet is used to describe the logical grouping of data at the data-link layer.

Transport Layer (Layer 4)

The basic function of the transport layer is to provide mechanisms to transport data between network devices. Primarily it does this in three ways:
·         Error checking Protocols at the transport layer ensure that data is sent or received correctly.
·         Service addressing Protocols such as TCP/IP support many network services. The transport layer makes sure that data is passed to the right service at the upper layers of the OSI model.
·         Segmentation To traverse the network, blocks of data need to be broken down into packets that are of a manageable size for the lower layers to handle. This process, called segmentation, is the responsibility of the transport layer.

Protocols at the Transport Layer

Protocols that operate at the transport layer can either be connectionless, such as the User Datagram Protocol (UDP) , or connection oriented, such as Transmission Control Protocol (TCP). For a further discussion of these protocols, and of the difference between connection oriented and connectionless protocols, refer to the information on network protocols later in this chapter.

Flow Control

The transport layer is also responsible for data flow control, which refers to the way in which the receiving device can accept data transmissions. There are two common methods of flow control used, buffering and windowing:
·         Buffering When buffering flow control is used, data is temporarily stored and waits for the destination device to become available. Buffering can cause a problem if the sending device transmits data much faster than the receiving device is able to manage it.
·         Windowing In a windowing environment, data is sent in groups of segments that require only one acknowledgment. The size of the window (that is, how many segments fit into one acknowledgment) is defined at the time the session between the two devices is established. As you can imagine, the need to have only one acknowledgment for every, say, five segments can greatly reduce overhead.

Session Layer (Layer 5)

The session layer is responsible for managing and controlling the synchronization of data between applications on two devices. It does this by establishing, maintaining, and breaking sessions. Whereas the transport layer is responsible for setting up and maintaining the connection between the two nodes, the session layer performs the same function on behalf of the application.

Presentation Layer (Layer 6)

The presentation layer's basic function is to convert the data intended for or received from the application layer into another format. Such conversion is necessary because of the way in which data is formatted, so it can be transported across the network. This conversion is not necessarily readable by applications. Some common data formats handled by the presentation layer include the following:
·         Graphics files JPEG, TIFF, GIF, and so on are graphics file formats that require the data to be formatted in a certain way.
·         Text and data The presentation layer can translate data into different formats such as American Standard Code for Information Interchange (ASCII) and the Extended Binary Coded Decimal Interchange Code (EBCDIC).
·         Sound/video MPEGs, QuickTime video, and MIDI files all have their own data formats to and from which data must be converted.
Another very important function of the presentation layer is encryption, which is the scrambling of data so that it can't be read by anyone other than the intended recipient. Given the basic role of the presentation layerthat of data-format translatorit is the obvious place for encryption and decryption to take place.

Application Layer (Layer 7)

In simple terms, the function of the application layer is to take requests and data from the users and pass them to the lower layers of the OSI model. Incoming information is passed to the application layer, which then displays the information to the users. Some of the most basic application-layer services include file and print capabilities.
The most common misconception about the application layer is that it represents applications that are used on a system such as a Web browser, word processor, or a spreadsheet. Instead, the application layer defines the processes that enable applications to use network services. For example, if an application needs to open a file from a network drive, the functionality is provided by components that reside at the application layer

OSI Model Summary

In summary, Table 1 lists the seven layers of the OSI model and describes some of the most significant points of each layer.
Table 1 OSI Model Summary
OSI Layer Major Functions
Physical (Layer 1) Defines thephysical structure of the network and the topology.
Data-link (Layer 2) Provides error detection and correction. Uses two distinct sublayers: the Media Access Control (MAC) and Logical Link Control (LLC) layers. Identifies the method by which media is accessed. Defines hardware addressing through the MAC sublayer.
Network (Layer 3) Handles the discovery of destination systems and addressing. Provides the mechanism by which data can be passed from one network system to another.
Transport (Layer 4) Provides connection services between the sending and receiving devices and ensures reliable data delivery. Manages flow control through buffering or windowing. Provides segmentation, error checking, and service identification.
Session (Layer 5) Synchronizes the data exchange between applications on separate devices.
Presentation (Layer 6) Translates data from the format used by applications into one that can be transmitted across the network. Handles encryption and decryption of data. Provides compression and decompression functionality. Formats data from the application layer into a format that can be sent over the network.
Application (Layer 7) Provides access to the network for applications.

Identifying the OSI Layers at Which Various Network Components Operate

When you have an understanding of the OSI model, it is possible to relate network connectivity devices to the appropriate layer of the OSI model. Knowing at which OSI level a device operates allows you to better understand how it functions on the network. Table 2 identifies various network devices and maps them to the OSI model.
Table 2 Mapping Network Devices to the OSI Model
Device OSI Layer
Hub Physical (Layer 1)
Switch Data-link (Layer 2)
Bridge Data-link (Layer 2)
Router Network (Layer 3)
NIC Data-link (Layer 2)
WAP Data-link (Layer 2)

Differentiating Among Protocols

You might find yourself working with a number of protocols in today's networked environments. The primary function of these protocols is to facilitate communication between network devices. This section reviews the main characteristics of the most widely used protocols.

Connectionless and Connection-oriented Protocols

Before getting into the characteristics of the various network protocols and protocol suites, it's important to first identify the difference between connection-oriented and connectionless protocols.
In a connection-oriented communication, there is guaranteed delivery of the data. Any packet that is not received by the destination system is resent by the sending device. Communication between the sending and receiving devices continues until the transmission has been verified. Because of this, connection-oriented protocols have a higher overhead and place greater demands on bandwidth.
In contrast to connection-oriented communication, connectionless protocols offer only a best-effort delivery mechanism. Basically, the information is sentthere is no confirmation that the data has been received. If there is an error in the transmission, there is no mechanism to resend the data, so transmissions made with connectionless protocols are not guaranteed. Connectionless communication requires far less overhead than connection-oriented communication, so it is popular in applications such as streaming audio and video where a small number of dropped packets might not represent a significant problem.

Internetwork Packet Exchange/Sequenced Packet Exchange

Like TCP/IP and AppleTalk that are also discussed in this chapter, IPX/SPX is not a single protocol but rather a protocol suite. IPX/SPX was created by Novell for use on Novell networks. When Novell had a larger presence in the network arena, so too did the IPX/SPX protocol suite. Today, the popularity of IPX/SPX has yielded to TCP/IP although it is still used in some network environments enough. TCP/IP's suitability for large multisite networks and its general acceptance has now even led Novell to adopt TCP/IP as the protocol of choice. Table 3 shows some of the protocols that comprise the IPX/SPX suite and their functions.
3 IPX/SPX Protocols and Their Functions
Protocol Function Related OSI Layer(s)
Internetwork Packet Exchange (IPX) A connectionless transport protocol that is primarily responsible for logical network addressing, route selections, and connection services. Network, Transport
NetWare Link State Protocol (NLSP) NLSP uses a link-state route discovery method to build routing tables. Network
NetWare Core Protocol (NCP) NCP is a connection-oriented protocol that provides the connection between clients and services. Application, Presentation, Session
Routing Information Protocol (RIP) Similar to the routing protocol used with TCP/IP, RIP is responsible for the routing of packets on an IPX/SPX network. Network
Service Advertising Protocol (SAP) SAP allows systems providing services to the network, such as file and print services, to announce their services and addresses to the network. Application, Presentation, Session
Sequenced Packet Exchange (SPX) SPX is a connection-based protocol used when guaranteed message delivery is required on the network. Transport

IPX Addressing

An example of an IPX address is 0BAD33CE:0003FE7C06EC. The0BAD33CE portion represents the IPX address for the network, which is also sometimes referred to as the network number. The part0003FE7C06EC is the MAC address of the node, which is used for the second part of the address. The node MAC address is derived directly from the MAC address burned on to each network card, but in IPX addressing, it is expressed without the colons (:). In addition to this format, IPX addresses can also be written with each group of four hexadecimal characters separated by colonsfor example, 0000:0007:003C:7F53:04CF. In some cases, any leading 0s on the network address portion are dropped. For example, 00000007can be expressed simply as 7. The address would then be7:003C:7F53:04CF.

IPX Interoperability

As you might expect, the IPX/SPX protocol suite is fully supported by Novell NetWare, but it can also be used in a Microsoft Windows environment. Microsoft includes its own version of the IPX/SPX protocol, NWLink, which provides this interoperability. Using the NWLink protocol and the Microsoft Client for NetWare, Windows systems can connect to a NetWare server using IPX/SPX.
Because of the prevalence of TCP/IP, interoperability with the IPX/SPX protocol has become less important. For some time now, TCP/IP has been used as the default protocol on Novell networks. As far as Linux is concerned, there is a way to use the IPX/SPX protocol on a Linux system, but TCP/IP is the protocol of choice there too.

IPX/SPX Naming

Unlike TCP/IP, which is discussed later, there are few issues with IPX/SPX naming because servers are normally the only parts of a network that are assigned names. These names, which are sometimes referred to as addresses, can be up to 47 characters (in current versions of NetWare). Workstations do not need such names and instead just use IPX addresses.

NetBEUI Protocol

NetBEUI was once a popular protocol for smaller networks. It is fast and easy to configure but has one significant drawback in that it is not routable. This one fact limits NetBEUI to a single network segment far too restrictive for the majority of today's networking environments.

NetBEUI Protocol

NetBEUI was once a popular protocol for smaller networks. It is fast and easy to configure but has one significant drawback in that it is not routable. This one fact limits NetBEUI to a single network segment far too restrictive for the majority of today's networking environments.

NetBEUI Addressing

In terms of addressing, NetBEUI is perhaps the simplest of all the protocols discussed here. For this reason, it is still sometimes used on very small simple networks such as those found in a home or on very small business networks. Computers on a NetBEUI network are identified by NetBIOS names. The NetBIOS name can be no longer than 15 characters and must be unique to the network. Using the 15 characters, you can assign the computers descriptive names such as workstation, student1, or secretary2.

Interoperability with NetBEUI

The discussion on interoperability with NetBEUI is a short one; it is used on Windows platforms exclusively.

AppleTalk

AppleTalk is a protocol associated with Apple networks. The AppleTalk protocol is an established protocol, having been introduced in the early 1980s, and continued development toward the end of the 1980s enabled it to become a viable internet-working protocol.
Like the IPX/SPX and TCP/IP protocol suites, the AppleTalk protocol suite is composed of several protocols. Table 4 lists the protocols within the AppleTalk protocol suite and their functions.
Table 4 AppleTalk Protocols and Their Functions
Protocol Function OSI Layer
AppleShare AppleShare provides application layer services, including file and print sharing. Application (Layer 7)
AppleTalk Address Resolution Protocol (AARP) AARP is used to map AppleTalk addresses to Ethernet and Token Ring physical addresses. Network (Layer 3)
AppleTalk Data Stream Protocol (ADSP) ADSP is a session layer protocol used to establish connections between network devices. It also functions at the transport layer and manages flow control. Session (Layer 5)
AppleTalk Filing Protocol (AFP) The AFP protocol manages file sharing for the network. Presentation (Layer6)/ Application (Layer 7)
AppleTalk Session Protocol (ASP) Similar to the ADSP protocol, ASP works at the session layer of the OSI model and establishes and releases connections between networked devices. Session (Layer 5)
AppleTalk Transaction Protocol (ATP) ATP establishes a connectionless session between networked systems. ATP functions at the transport layer. Transport (Layer 4)
Datagram Delivery Protocol (DDP) Performs datagram delivery and also handles routing functions. Network (Layer 3)
EtherTalk Link Access Protocol (ELAP) ELAP is a variation of the AppleTalk protocol that is compatible with the Ethernet protocol. Data-Link (Layer 2)
Name Binding Protocol (NBP) The NBP protocol is used to map computer hostnames to network layer addresses. Transport (Layer 4)
Printer Access Protocol (PAP) PAP is a session layer protocol used to provide printing services on an AppleTalk network. Session (Layer 5)
Routing Table Maintenance Protocol (RTMP) RTMP is the protocol on AppleTalk networks that maintains the routing tables for the network. Transport (Layer 4)
TokenTalk Link Access Protocol (TLAP) TLAP is a variation on the AppleTalk protocol that is compatible with the Token Ring protocol. Data-Link (Layer 2)
Zone Information Protocol (ZIP) ZIP is used to divide network devices into logical groups called zones. Session (Layer 5)

AppleTalk Addressing

Like the other protocols discussed, the AppleTalk protocol uses a two-part addressing schemea node and a network section. The node portion of the address is assigned automatically when the system is first brought up onto the network. It is a randomly generated number and then broadcast to the entire network. If a duplicate node address is assigned, another will be assigned and rebroadcast to the network. The network portion of the address is assigned by the network administrator.
The actual AppleTalk address is 24 bits long with 16 bits used for the network address and 8 bits for the node address. AppleTalk addresses are expressed in decimal format, with the network and node addresses separated by a period. An example of an AppleTalk address might be 4.67. The 4 represents the network number, and 67 is the node number.

AppleTalk Interoperability

AppleTalk was designed for the purpose of being used on Apple networks and, as such, is not natively supported by most of the other major operating systems. Because of this, today, other protocols such as TCP/IP are a more common choice, even for Apple-based networks. In fact, Macintosh systems themselves support the use of TCP/IP. AppleTalk can be configured to work with other platforms, but, given the proliferation of TCP/IP, this is not widely done.

AppleTalk Routing

The earliest implementations of AppleTalk were not routable, but later versions were. Routing functionality for AppleTalk is provided by the RTMP protocol. RTMP provides similar functionality to the RIP protocol used with IPX/SPX and TCP/IP networks.

AppleTalk Naming

AppleTalk networks use logical hostnames, making systems readily recognizable on the network. The network address-to-hostname resolution is handled by the NBP protocol in the AppleTalk protocol suite. It performs a similar function to that provided by DNS on a TCP/IP network.

The TCP/IP Protocol Suite

Quite often, TCP/IP is referred to as a network protocol, although that's not entirely accurate. Like IPX/SPX and AppleTalk, TCP/IP is actually a protocol suite comprised of many separate protocolseach of which has its own purpose and function. Combined, they all provide the TCP/IP functionality. The following list contains some of the more well-known protocols found within the TCP/IP protocol suite:
·         Address Resolution Protocol (ARP)
·         File Transfer Protocol (FTP)
·         Internet Control Message Protocol (ICMP)
·         Internet Protocol (IP)
·         Reverse Address Resolution Protocol (RARP)
·         Simple Mail Transfer Protocol (SMTP)
·         Transmission Control Protocol (TCP)
This is just an introduction to the protocols found within the TCP/IP protocol suite.

TCP/IP Standards

One of the strengths of the TCP/IP protocol suite is that it is not owned by any one party and is not licensed. This is in contrast to protocols such as AppleTalk and IPX/SPX, which are owned by Apple and Novell, respectively. Because of its non-proprietary nature, TCP/IP has an open development model with its standards published in documents known as Requests for Comments (RFCs). RFCs are maintained by the Internet Engineering Task Force (IETF). You can find RFCs pertaining to TCP/IP on IETF's website at www.ietf.org.

TCP/IP Addressing

Anyone who has worked with TCP/IP knows that TCP/IP addressing can be a complex topic. This section provides an overview of TCP/IP addressing to compare how other protocols handle addressing.
In the most commonly deployed version of TCP/IP, version 4, (IPv4) addresses are composed of four sets of 8 bits referred to as octets. These are expressed in numbers and separated by periods. An example of a TCP/IP address is 192.168.3.2. This format is often referred to as a 32-bit dotted decimal.
A single TCP/IP address represents both the IP address of an individual system and the network to which the system is attached. Determining which part of the IP address belongs to the network and which belongs to the node is the responsibility of the subnet mask. If part of the address refers to the network, it is assigned a binary value of 1 within the subnet mask. If it is the node address, it's assigned a binary value of 0 within the subnet mask.
For example, if you had a subnet mask of 255.255.255.0, the first two octets refer to the network and the second refer to the node address. So using the previous IP address as an example, the192.168.3 portion of the address represents the network ID, and the .2 portion of the address represents the node ID. Table 5 shows default subnet masks and addressing examples.
Table 5 Determining Network and Node Addresses
Subnet Mask IP Address Network Address Node Address
255.0.0.0 192.168.10.100 192 168.10.100
255.255.0.0 192.168.10.100 192.168 10.100
255.255.255.0 192.168.10.100 192.168.10 100

TCP/IP Interoperability

Of all the protocols used on today's networks, TCP/IP is by far the most versatile and interoperable. All of the popular operating systems today not only support TCP/IP, but the vast majority also use it as the default protocol. This means that in any network environment, you can have Linux, Windows, and NetWare servers and clients all communicating using TCP/IP.

TCP/IP Naming

Systems on a TCP/IP network can be accessed from the network either by their IP address or by a hostname. Hostnames are the names assigned to the system to make them easier to remember. For instance, the secretary's computer might have the address of192.168.4.23, but you can access it using its hostname of secretary1 or whatever name you assign it.
The name-resolution process from IP address to hostname is often performed dynamically through a Domain Name Server (DNS). It can also be done statically using a text file called 'Hosts,' which is stored on each system.

TCP/IP Routing

TCP/IP is a fully routable protocol, making it a natural choice for large networks and those that span multiple locations. As mentioned previously, TCP/IP is a protocol suite; there are two primary protocols within TCP/IP that provide the routing functionality Routing Information Protocol (RIP) and Open Shortest Path First (OSPF).

Protocol Summary

The most pertinent information from this section is listed in Table 6.
Table 6 Comparison of the Various Protocols Discussed in This Chapter
Protocol Overview Routable Addressing
IPX/SPX Used to be the default protocol for NetWare, but now TCP/IP is preferred. Still supported by Netware, Windows, and Linux. Simplest addressing scheme of routable protocols discussed here. Yes Uses the MAC address to identify the node, and an eight character (4-byte) hexadecimal address to identify the network.
NetBEUI Used by Windows. No Uses NetBIOS names to identify systems on the network.
AppleTalk Used by Macintosh withsome support on other platforms. Yes Uses a two-part addressing scheme. The first is a randomly generated number for the node address, and the second an administrator assigned number for the network address.
TCP/IP Used by default with UNIX, Linux, NetWare and Windows systems. Also supported by Macintosh systems and practically every other computing platform. The most inter-operable of all protocols. Yes Uses four sets of 8 bits referred to as octets. A subnet mask is used to define what parts of the address refer to the network, and what parts refer to the node.


No comments:

Post a Comment