Chapter 3: Models
Note: I have discontinued this blog. Instead I have started a FREE video series on CCNA in YouTube. You can find it here.
Models???
Yes, Models. You cannot go for long in the networking industry, before somebody says, 'Oh that is Layer 1 functionality' or 'Check the Layer 3 devices'! What does it mean when somebody says Layer 1 or Network Layer in the networking field? Well that is what we will learn in this chapter!
Tell me more!
In the mid 70s, when the networks first came into being, a computer could communicate only with another computer of the same manufacturer! With different manufacturers around, this was something that did not have a future! In the late 1970, Open Systems Interconnection (OSI) reference model was created by International Organisation for Standardization (ISO) to break the barrier.
The main aim of the OSI was to help vendors create interoperable network devices and software, that could be used by all manufacturers! This was a boon for users' as well, so that they did not have to be locked in with a particular vendor!
Ah I see, but I thought you said 'LAYERS'...
Yes! The basis for OSI was a layered approach. OSI reference model was a conceptual blueprint on how communication should take place. It addresses all the process required for communication and divides them into logical groupings called as Layers!
As an analogy, we can compare it to a large company with different departments! Each department has their own functions and their role. For the company to run smoothly, each department must trust and rely on information being passed from other departments. Similarly, each layer has its own functions. The adjacent layer, will rely on the functions/outputs of any layer, without bothering how it functions or gets the output. This inherently gives manufacturers and developers flexibility to change their design or code any time, but making sure the output remains unchanged!
Interesting.... so what do you reckon are the advantages of a layered approach?
As mentioned above, there are lot of advantages. Just to list a few:
- It divides the network communication process into smaller and simpler components
- It allows multiple-vendor development through standardization of network components
- It encourages industry standardization by defining what functions occur at each layer of the model
- It allows various types of network hardware and software to communicate
- It prevents changes in one layer from affecting other layers, so it does not hamper development
Let us see the OSI Reference Model in brief!
As mentioned earlier, it was a model created by ISO. It has 7 layers as mentioned below:
Application (Layer 7)
Presentation (Layer 6)
Session (Layer 5)
Transport (Layer 4)
Network (Layer 3)
Data Link (Layer 2)
Physical (Layer 1)
As a network engineer, you will only be bothered about the last 4 layers. The top 3 layers are to be concerned with the computer system. Nevertheless, we will try to understand the functioning of all the layers. I cannot stress this enough, but remember - OSI Model and the TCP Model is the very basic fabric of your networking career! Get this concept right, and you will fly through your networking career!
Application Layer:
This layer comes into play, when a computer needs to access the network! This is where all the user actions happen. For example, if you uninstalled all network components of your pc like TCP/IP, NIC card and so on and use Internet Explorer to view local HTML document, then Application Layer WILL NOT come into picture. But the moment you ask it to fetch a document or a website from the internet, the application layer is kicked into action. Protocols like HTTP, FTP, TFTP, TELNET and so on are used by the application layer to take information down to other layer functions.
Presentation Layer:
This layer gets its name from its function: Presenting data to the Application layer or formatting data for the Sessions layer. This layer is essentially a translator and provides coding and conversion functions. A successful data transfer technique is to adapt the data into a standard format before transmission. This ensures that all the data going to lower functions, are formatted exactly the same way, across all system including the ones manufactured by different manufacturers!
Session Layer:
This layer is responsible for setting up, managing and then tearing down session between presentation layer entities. That means, if you open a web browser and also uploading files through FTP, the session layers maintains separate session for each of these protocols. It also co-ordinates communications between systems and servers to organize their communication, by offering three different modes: simplex, half-duplex and full-duplex!
NOTE: Layers from here down are crucial for a Network Engineer!
Transport Layer:
From a CCNA perspective, Cisco expects you to know only about TCP. Hence we will look closely at TCP.
We will learn more about Routers and protocols in later chapters.
This layer also breaks down the Network Layer packets into smaller sections called Frames and adds its headers. At this layer a footer is also added.
This IEEE Ethernet Data Link layer has two subsections:
Transport Layer:
This layer is responsible for segmenting data going down and reassembling data going up! It also sequences each segment, so that it can reassemble each of them in the correct order! At this layer, an application can choose between TCP (Transmission Control Protocol - which is reliable) or UDP (User Datagram Protocol - which is UNreliable). TCP is more reliable because it makes uses of flowcontrol, windowing and segment acknowledgement. It is used for more secure level of communication. Whereas UDP does not have acknowledgement and is used as a best effort delivery. This is used in realtime applications like voice chats and video chats (this is why you see missed pixels on your video chats)!
From a CCNA perspective, Cisco expects you to know only about TCP. Hence we will look closely at TCP.
TCP is used for Connection-Oriented Communication. Before they start communicating, they need to establish a connection which is also sometime referred to as THREE WAY HANDSHAKE! It works as described in the diagram below:
As we can see from the diagram, the first machine sends a SYN signal to the second machine. When it receives the SYN, it sends back a SYN-ACK to the first machine. The first machine then sends an ACK back. At this point their connection is said to be established and they can start sending data.
TCP also uses a concept known as FLOW CONTROL to make sure that data transmission is secure. It is as given in the following diagram:
After sending each segment, the sender waits for an acknowledgement from the receiver. If it receives, the acknowledgement it sends the next sequence. But if it doesn't get an acknowledgement within the specified time, it resends the sequence. The segments are sequenced in the proper order at the receiving end.
To make this process even more efficient, a concept called WINDOWING was introduced. As per this concept, instead of the sender waiting after sending just one segment, it sends more segments as per the WINDOW size of the receiver. If it receives all the segments, it send just ONE acknowledgement stating the next segment it is expecting. If at all one or more segments are lost in transmission, and the receiver does not get that, it will send ACK for that segment. The sender will only send the lost segment. This concept will become more clear with the following diagram:
Network Layer:
Network layer is responsible for tracking where the devices are on the network, manages device addressing and determines the best way to move data. Routers are specified at this layer and provide the routing services within an internetwork. This is the layer that is concerned with IP ADDRESSES.
When a router receives a segment, it breaks it into packets and adds headers. It then checks its routing table to see if it knows a route to the destination network. If it knows, it just forwards the packet to the interface of the router through which it can reach the network. If it doesn't it just drops the packet.
There are two types of packets:
- Data Packets - Used to transport data through the internetwork. Protocols used to support data traffic are called Routed Protocols
- Route Update Packets - Used to update neighbouring routers about the networks connected to all routers within the internetwork. Protocols that send route updates are called Routing Protocol
Data Link Layer:
This layer provides physical transmission of the data and handles error notification, network topology and flow control. This layer is concerned with MAC address and delivery of message to the proper device on LAN using MAC addresses.This layer also breaks down the Network Layer packets into smaller sections called Frames and adds its headers. At this layer a footer is also added.
This IEEE Ethernet Data Link layer has two subsections:
- Media Access Control (MAC) 802.3 - It defines how the packets are placed on the media. It is always a 'first come first serve' access where everyone shares the bandwidth.
- Logical Link Control (LLC) 802.2 - Responsible for identifying Network Layer protocols and encapsulating them.
Switches and bridges work at this layer.
Physical Layer:
This layer is the last layer down (or layer 1 in naming convention). This is layer that is actually concerned in transmitting the bits and receiving them. The physical medium can be anything, like Ethernet cables, fibre optic cables, wire less, or any other medium. They all have their protocols to make sure data is encapsulated according to their requirement at one of the upper layers.
This layer specifies the electrical, mechanical, procedural and functional requirements for activating, maintaining and deactivating a physical link between end systems. This layer is also where you identify between DTE (Data Termincal Equipment) and DCE (Data communication Equipment). The physical layers connectors and different topologies are defined by the OSI standards.
And what about The TCP Model?
Well the TCP Model is derived from the OSI model, and is the model that is more relevant to a network engineer. Some of the layers in OSI has been combined to form a single layer. The TCP layers are:
- Application Layer: HTTP, Telnet, FTP, TFTP, SNMP, DNS, SMTP
- Transport Layer: TCP, UDP, RTP
- Internet Layer: IP, ICMP, ARP, RARP
- Network Access (Interface) Layer: Ethernet, Token Ring, FDDI, X.25, Frame Relay, RS-232, v.35
The functions of layers of OSI and TCP are quite similar, except that some have combined together. Hence I have just listed all the protocols in each layer.
A comparison summary is as given in the diagram below:
The following diagram explains data flowing through the layers, with headers being added at each layer.
Summary
We have learnt models today. Let us summarize:
- Definition of Models
- Why is a layered approach necessary?
- Understanding of the OSI Model and its protocols
- Understand the TCP Model and protocol
- Comparison between the models
- Understand how the data flows through the model
Fastest Finger First
A) OSI Model is a ..........
- Physical Model
- Real Model
- Reference Model
- IEEE Model
B) Application layer protocols are ...........
- HTTP
- TELNET
- FTP
- All of the above
C) TCP is a .........
- Connection-less protocol
- Connection-oriented protocol
- Unsecure protocol
- All of the above
D) The 4 layer is.......
- Session
- Network
- Transport
- Presentation
Thank You!
If you have any queries, post it as a comment below. I will answer all your queries. Also as soon as you complete today's class, give the correct answers for FASTEST FINGER FIRST in the comment section below.