From the course: Juniper Networks Certified Associate JNCIA-Junos (JN0-105) Cert Prep

OSI model

- [Instructor] Let's start with the first topic of networking fundamentals known as the OSI model. If you've taken any networking course or if you've read any networking book in the past, you would've noticed that the OSI model is discussed right in the beginning. And that's because the OSI model is a fundamental topic for networking. Let's talk about it. It stands for open systems interconnection. The history of the OSI model dates back to the earliest days of network communication when every vendor had their own protocol for their equipment. This would mean that if you connected two devices from two different vendors, they wouldn't talk because there was no common protocol. So in the 1970s, the International Standards Organization, also known as ISO, came forward to standardize network communication. The goal was to have a common protocol irrespective of the underlying hardware or manufacturer. The OSI model divides network communication into seven layers. The entire process of communicating over the network is broken down into seven layers, and each layer is assigned a certain set of functions. It is important to keep in mind that the OSI model is a purely logical concept. The layers of the OSI model do not represent any networking components. The OSI model looks like this. Let's start from the bottom. The first layer is the physical layer. Then we have the data link layer. Then we have the network layer, transport layer, session layer, presentation layer, and application layer. I found a pneumonic to remember these layers in order. It goes this way. Please do not throw sausage pizza away. The first letters of those words correspond to the names of the layers. Now let's talk about each of these layers in detail. We'll start with the first layer, which is the physical layer. This is the layer where data arrives in raw format, which is bits made up of zeros and ones. The physical layer is responsible for defining the electrical and physical specifications of hardware used to communicate over network. So that means it is responsible for defining standards for cables, connectors, frequencies of wireless signals, voltage specifications, et cetera. The physical layer also defines standards for the type of communication. So we have three types of communication: Simplex, which is one way only. Think of a radio broadcast. The second type of communication is half duplex, which is two-way, but you can only send or receive at a time. Think of a walkie talkie. The third one is full duplex, which is two-way communication, where you can send and receive data at the same time. Think of a phone call. So it's the physical layer that's responsible for defining standards for the type of communication. There are some devices that operate at the physical layer. This includes hubs, network interface cards, and repeaters. Let's now talk about the second layer, which is the data link layer. The bits received by the physical layer when they move up one level, they reach the data link layer and they're now transformed into frames. And that's because some headers are added on top of the bits and now they become frames. The data link layer is responsible for communication over the local area network, also known as LAN, or the same network. You'll hear network administrators say this is a layer two traffic. That means it is traffic designed for the same network and it is handled by the data link layer. The data link layer is also responsible for physical addressing of devices. So every network device will have a physical address, which is burned onto the chip, and that's known as the MAC address. That is a function of the data link layer. Other functions include flow control, which is synchronizing the sending and receiving of frames, and also error control. The protocols that operate at the data link layer include ethernet, which is a very popular protocol, frame-relay, token ring, and fiber distributed data interface, also known as FDDI. The devices that operate at this layer include bridges and layer two switches. Let's now talk about the third layer, which is the network layer. The frames that were present at the data link layer when they move one level up, some headers are added on top of that and it is now transformed into packets. The network layer is responsible for logical addressing of devices. This is done using IP addresses. So IP addresses, which could be IPv4 or IPv6 are a function of the network layer. We call them as logical addresses because they are not tied to a device. You can take an IP address from one device and assign it to another device, which is why we call them as logical addresses. While MAC addresses are burnt onto the chip, so we call them as physical addresses. So logical addressing is a function of the network layer. It is also responsible for routing packets, and also for fragmentation and reassembly of packets. The protocols that operate at this layer include IPv4, IPv6, ICMP, IPsec, et cetera. And the devices that operate at this layer include layer three switches, routers, firewalls, et cetera. Now let's talk about the fourth layer, which is the transport layer. The packets at the network layer when they move one level up, some headers are added on top of them and they're now transformed into segments. The transport layer is responsible for a very important function, which is to provide a transport protocol, such as TCP and UDP. TCP is used when you need a reliable data connection because it is a connection-oriented protocol. While UDP is a connectionless protocol, so it operates faster and is used for real-time services, such as voice and video. The transport layer is also responsible for another important function, which is process separation. This allows multiple programs on the same device to communicate using port numbers. Think about this. Think about the browser that you may be using right now. You may have multiple tabs open on the browser, but every tab is able to correctly communicate with its own server without the traffic from other tabs getting mixed up. That is a function of the transport layer. This process separation is a function of the transport layer, and this is done using port numbers. Moving up, we have the session layer. This is responsible for establishing and controlling sessions between the sender and the receiver. It's also responsible for synchronizing the session, and this is done using sequence numbers. The protocols that operate at this layer include NetBIOS, SOCKS, and network file system, also known as NFS. Moving up, we have the presentation layer. This is responsible for presenting or formatting the data received in generic format from the lower layers into well-known formats. Examples include JPEG, MPEG, et cetera. We as end users are used to viewing data in well known formats, like MP4, JPEG, et cetera, and we do not interact with data in other formats like packets or frames or bits in the form of zeros and ones. So it's the presentation layer that's responsible for taking the data that comes from these lower layers in the form of packets and segments, and transforming that into well-known formats that we can understand. The presentation layer is also responsible for compression and encryption. The last layer is the application layer. This is responsible for providing an interface between the applications and the underlying network. An important thing to keep in mind, the application layer is not the same as the applications used on the computer. The application layer provides an interface for the applications, but does not directly represent the applications that you run on your computer. It provides the services or protocols that allow applications to communicate with the network stack. Protocols at this layer include DNS, HTTP, FTP, et cetera. The functions that we discussed here are not the only functions performed by these layers. The layers actually perform a lot more functions. But at the JNCIA level, this is good enough for us to know to give us a good start. The functions of the OSI model are not important from the JNCIA examination perspective, but as a network administrator, you should know the important functions of the OSI layer at a high level.

Contents