www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / CompTIA / Network+ / Section I: Networking Concepts / Chapter 1: The OSI and TCP/IP Models / The OSI Reference Model

The OSI Reference Model

The OSI reference model was defined in ISO/IEC 7498-1. It is a seven-layer model used in networking, a layered mechanism that describes how information from an application on a network device (e.g., computer, router, etc.) moves from the source to the destination using the physical medium, and then interacts with the software application on that specific network device, as illustrated in Figure 1.1 below:

 1.1

Figure 1.1 – OSI Reference Model

 

OSI was developed by the International Organization for Standardization (ISO) in 1984. The OSI mechanism involves two concepts:

  • The OSI reference model, which has seven layers
  • The OSI protocols that map to each of the seven layers

In other words, the OSI model defines the network functions required for sending data and divides them into seven categories. The seven layers of the OSI reference model, starting from the top (i.e., Layer 7), are shown in Table 1.1 below:

 

Table 1.1 – The OSI Reference Model

OSI Layers

Layer 7 Application
Layer 6 Presentation
Layer 5 Session
Layer 4 Transport
Layer 3 Network
Layer 2 Data Link
Layer 1 Physical

 

The upper layers involve application issues, such as interfacing with the user or formatting data. The lower layers relate to transport issues, such as data routing and the physical characteristics of the network.

When a network device (source) communicates with another network device (destination), the information flows as presented in Figure 1.1 above, starting from the source device’s Application Layer, going down to its Physical Layer, arriving at the destination device’s Physical Layer, and going up to its Application Layer. The response from the destination device to the source device follows the reverse order: Layer 7 to Layer 1 and then Layer 1 to Layer 7.

It is really essential to understand the OSI reference model from a design standpoint because of its modular architecture. The OSI model divides the specific tasks that are involved in moving information from one networking device to another into seven smaller and more manageable groups of tasks/actions. The overall goal of the OSI model is to enhance interoperability and functionality between different applications and vendors, as well as to make it easier for network administration to focus on the design of particular layers of the model. For example, applications can be designed without having to worry about the lower OSI layers, so a certain level of trust is present if the packet has already been analyzed by the lower layers. The same rule applies in the other direction: the Application Layer trusts that the lower layers will successfully process and send the packet over the wire.

The OSI reference model is a key concept in the networking industry and it plays an important role in the design phase of a network using a modular (layered) approach.

 

Note:    The OSI reference model represents everything that must happen in order to send data, but it does not specify how these things are done. Different protocols implement these functions differently at various layers and the OSI model provides a framework for these communication protocols to be used between devices.

 

 

Protocols

A protocol is a set of rules. Network devices need to agree on a set of rules in order to communicate and they must use the same protocol to understand each other. A wide variety of network protocols exist at different OSI layers. For example, at the lower OSI layers, LAN and WAN protocols are used. Going up the reference model, routed and routing protocols are found at Layer 3. Each layer and its associated protocols will be covered in detail in the following sections.

Protocols can be organized in protocol suites or stacks. TCP/IP is the most commonly used network protocol suite, named after the two protocols in the stack. The TCP/IP protocol suite can be found in almost all modern networks, and it is a core feature not only of the Internet but also within organizations’ networks. Other examples of protocol suites are AppleTalk and Novell NetWare.

 

OSI Application Layer

The Application Layer (Layer 7) is the layer closest to the end-user, who utilizes the network services available. For example, to transmit information such as data requests, pictures, and document files, the end-user interacts directly with an application in the Application Layer, which manages software applications that have communication-over-internetwork functionality.

Depending on the information the user wants to send over the network, a specific protocol is used at the Application Layer. A few examples include the following:

  • SMTP, POP3: used to send/receive an e-mail message
  • FTP: used to transmit a file over the network
  • Telnet: used to control a remote device

 

OSI Presentation Layer

The Presentation Layer is Layer 6 and it makes sure that the data is understandable to the end-system. In other words, the data must be converted and formatted in such a way that the system recognizes it and knows how to treat it. This includes the translation and conversion of details like formatting, compression schemes, encryption schemes, and character representation formats (e.g., ASCII to Unicode).

Most often, the Presentation Layer will handle conversion schemes and video and audio compression (e.g., MPEG, AVI, JPEG, GIF, and TIF files). If the packets from the Application Layer are sent unformatted, the Presentation Layer translates them and then passes them to the Session Layer.

Layer 6 specifies the format, data structure, coding, compression, and other ways to represent the data to ensure that information sent by a host at the Application Layer can be properly interpreted by the destination host.

 

OSI Session Layer

From a technical standpoint, communications systems are made up of different service requests and service responses between applications located on different networking devices. The Session Layer (Layer 5), establishes, manages, and terminates these communication sessions and connects the lower layers with the Presentation and Application Layers. It negotiates these connections, makes sure that the device is willing to talk to the other party, and tracks the conversation using port numbers.

 

OSI Transport Layer

The middle stack layer, the Transport Layer (Layer 4), accepts data from the Session Layer and breaks it up into transport segments. The Transport Layer is responsible for the information reaching the destination device in an error-free fashion and in the proper order (i.e., the correct sequence of packets), utilizing the following features to accomplish this task:

  • Reliability
  • Transmission error checking
  • Error correction
  • Data retransmission
  • Flow control
  • Sequencing
  • Data multiplexing

From a technical standpoint, all of these features are implemented by establishing a virtual circuit between the sender and receiver devices. The Transport Layer initiates, maintains, and terminates these virtual circuits at OSI Layer 4 and uses segments as the protocol data units (PDUs). Segments are defined sets of data that include control information and they are sent between the Transport Layers of the endpoints.

The following two protocols in the Transport Layer are used on the Internet:

  • Transmission Control Protocol (TCP): a reliable, connection-oriented protocol
  • User Datagram Protocol (UDP): an unreliable, low overhead, connectionless protocol

Connection-oriented protocols establish a logical connection and use sequence numbers to ensure that all the data is received at the destination. Connectionless protocols only send the data, relying on the upper-layer protocols to handle error detection and correct possible problems.

 

Note:    The process of segmenting the data is transparent to the upper layers, as the Transport Layer

at the other end will re-assemble everything before passing the data over to the Session Layer.

 

 

OSI Network Layer

Layer 3, also known as the Network Layer, is responsible for identifying the internetwork path (routing) from the sender device to the receiver device. Considering this aspect, Layer 3 is responsible for the logical addressing schemes (e.g., IP, IPX, and AppleTalk) that assign logical addresses to the network hosts on both sides of the communication path.

The Network Layer sends datagrams (or packets), which are a defined set of data that includes addressing and control information. Datagrams are routed between source and destination devices. If a datagram needs to be sent across a network that can handle only a certain amount of data at a time, it can be fragmented into multiple packets and reassembled by the receiving device. In other words, a datagram is considered a unit of data and a packet is what physically goes on the network. If no fragmentation occurs, a datagram is a single packet.

In addition to logical addressing schemes, the Network Layer is also responsible for route selection and packet forwarding, and it deals with two types of protocols:

  • Routed protocols: IP, IPX/SPX, AppleTalk, and DECnet
  • Routing protocols: RIP, EIGRP, OSPF, IS-IS, and BGP

Routed protocols are responsible for the actual rules and processes involved in the encapsulation of the data packets that are ultimately routed over the internetwork. Routing protocols find available routes that exist on the network, build routing tables, and make routing decisions. Network devices that operate at Layer 3 are called routers.

 

OSI Data Link Layer

Layer 2 (Data Link Layer) defines the format of data that is transmitted across the physical network and encapsulates it based on the media type. A frame represents the organization of data in a specific fashion so that both parties can understand it, and the Data Link Layer chooses the proper frame type based on the link in use. The Data Link Layer has two sublayers: the Logical Link Control (LLC) sublayer and the Media Access Control (MAC) sublayer. The LLC sublayer deals with the Network Layer, while the MAC sublayer has access to physical media in the Physical Layer (Layer 1). These sublayers are shown in Figure 1.2 below:

1.2

Figure 1.2 – Data Link Sublayers

 The LLC sublayer (IEEE 802.2) allows multiple Network Layer 3 protocols to communicate over the same physical link by allowing those protocols to be specified in the LLC fields. The MAC sublayer (IEEE 802.3) specifies the physical MAC address that identifies a device on a network. Each frame sent over the wire contains a MAC Address field and only those devices with that specific MAC address will process the frame. A Source MAC Address field is also included in the frame.

The Data Link Layer offers reliable transmission of data across a physical network link and allows different Data Link Layer specifications that provide different network and protocol characteristics. This includes physical addressing, different network topologies, error notifications, frame (Layer 2 data units) sequences, and frame flow control.

Layer 2 manages physical addressing, while Layer 3 handles logical addressing. Physical addressing is generally in the form of MAC addresses (burned into a computer network interface card (NIC) or in the interfaces of network devices). MAC addresses are 48 bits long and the standard format contains six groups of two hexadecimal digits separated by hyphens (-) or colons (:), for example, aa:bb:12:34:56:67 or aa-bb-12-34-56-67. Every device on the network has a unique physical address that has to be included in the message so it can be delivered to the proper device. If the physical address of the destination is not known, the packet will be forwarded to all the devices on that segment. Network devices that operate at Layer 2 are called switches.

 

Note:    MAC addresses are also called burned-in addresses (BIAs) or hardware addresses.

 

 

OSI Physical Layer

The Physical Layer is placed at the bottom of the OSI protocol stack and it represents the actual physical medium on which the information is traveling between network devices. Layer 1 interconnects with the Data Link Layer through the Layer 2 MAC sublayer and sends the physical signals that encode 0 and 1 bits, or “binary digits” (i.e., electrical signals over copper links, fiber-optic light beams, and radio frequencies for wireless transmissions).

The protocols that operate at the Physical Layer include the following:

  • Local Area Network (LAN) protocols: Ethernet,* IEEE 802.3, 100BaseT, Token Ring/IEEE 802.5, and FDDI
  • Wide Area Network (WAN) protocols: EIA/TIA-232, EIA/TIA-449, V.35, and EIA-530

Layer 1 defines physical media procedures, electrical or mechanical aspects, encoding, and modulation (voltage) on the line, and the electrical signal generated either will be a 0 or a 1 bit or will be placed into a transition state. The Physical Layer also activates, maintains, and deactivates the actual physical links between multiple systems in LAN and WAN networks.

*Ethernet actually operates at both Layer 1 and Layer 2 of the OSI reference model.

 

Note:    Every process and function within Layers 2 to 7 of the OSI reference model (or Layers 2 to 4 of the TCP/IP protocol suite) happens logically inside the network device, whereas Physical Layer (TCP/IP Network Access Layer) functionality transmits bits as electrical signals on the wire, light beams on fiber-optic links, or radio frequencies in Wi-Fi networks.

 

 

Encapsulation

In both LANs and WANs, packet transmission can be analyzed using the seven-layer OSI reference model. When data is transmitted by the source toward a specific destination, it passes through the Application, Presentation, and Session Layers and the PDU arrives at Layer 4 (Transport Layer).

The process of sending data down the protocol stack (from the Application Layer to the Physical Layer) is called encapsulation. The upper layer sends data down to the next level, which adds its own specific information (using a header and a trailer) before sending it down to the next layer where the process is repeated, making the message bigger at each layer. The opposite process is called decapsulation, in which the destination device receives the message and moves it up the protocol stack to the Application Layer. As the message travels through the layers, each layer removes the lower layer’s additional information (i.e., header and trailer), making the message smaller as it goes up the protocol stack.

As illustrated in Figure 1.3 below, the Transport Layer (Layer 4) places a 20-byte header in front of the data. Regardless of the protocol used (i.e., TCP or UDP), the Layer 4 header and the data form a segment that is passed down to Layer 3 (Network Layer).

The Network Layer places its header in front of the segment received and this group becomes a packet (or a datagram). The Layer 3 header contains very important fields that include the logical address (IP address) of both the source and destination device.

The newly formed packet is passed down to Layer 2 (Data Link Layer), which creates a new data unit (i.e., a frame) by adding the Layer 2 frame header and trailer. The frame is then passed down to the Physical Layer (Layer 1), which converts the information into 0 and 1 bits that are sent over physical media using, for example, electrical signals (for a copper link). Finally, the data is sent over the wire using a wide variety of methods, such as Ethernet, Token Ring, or other technologies.

The headers and trailers used in the encapsulation process contain specific control information that allows the data to go through the network properly. Thus, the data at each layer is encapsulated by information appropriate for that specific layer, including addressing and error checking.

  1.3

Figure 1.3 – Packet Encapsulation

 

A protocol data unit (PDU) is a group of data used to exchange information at a particular OSI layer. The Layer 1 to Layer 4 PDU types, signifying the group of data and the specific headers and trailers, are summarized in Table 1.2 below:

 

Table 1.2 – PDU Types

Layer

PDU Types

Layer 1

Bit

Layer 2

Frame

Layer 3

Packet (Datagram)

Layer 4

Segment

 

To summarize, referring to Figure 1.3, with encapsulation the amount of information increases as the data travels down through the lower layers to the Physical Layer (as shown on the left). With decapsulation the destination device receives the data and this additional information is analyzed and then removed as the data is passed up through the higher layers to the Application Layer (as shown on the right).

In addition to the Layer 3 logical addressing fields in the header, an addressing structure is also applied in the Layer 2 header (i.e., the MAC address). Every network device has a physical BIA located in a special field in the Data Link Layer header. This address changes as the packet passes from one device to another (e.g., from the source PC to the switch to the router to another switch and, finally, to the destination PC), but the original IP source and destination addresses do not change when transiting the network because the packet is stripped of its Layer 3 header once it goes beyond a router. When a packet stays within the same LAN, it passes through switches only and is decapsulated until it reaches the Layer 2 header, which contains the MAC address. This header changes as the packet is re-encapsulated, as do the MAC address fields.

Finally, different protocols are available at each layer. For example, IP packets are different from IPX packets. Proper network operation implies that both the source and the destination endpoints are communicating using the same protocol.

Next

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.