OSI Model Overview
This is just a brief OSI model Overview; we will go more into depth later on the subject.
Why do we have two models?
The TCP/IP model and OSI models are both used for of all network communications, while the TCP/IP model is the older and original; itself is also an important protocol used in all Internet operations.
At the same time as TCP/IP model was being developed in the 1970s by Vinton Gray & Robert Elliot Kahn who were DARPA scientist, in the late ’70s, a French software engineer Hubert Zimmermann developed the OSI Model which became the more popular and way to describe network protocols.
Generally, when we talk about layer 2, layer 3 or layer 7 in which a network device works, we are referring to the OSI model. The TCP/IP model is used for both modelling current Internet architecture and providing a set of rules that are followed by all forms of transmission over the network.
Protocol Data Unit (PDU) is a specific block of information transferred over a network. It is often used in reference to the OSI model
OSI Model Overview – Application (TCP Layer)
The application, presentation and session layer are all self-contained, this is why the TCP/IP model lumps them all into the TCP/IP Application layer
Application Layer houses the network-aware application; the application it moves it down to the Presentation Layer which makes sure the application is understood on both sides of the network, then the session layer provides the mechanism for opening, closing and managing a session between end-user application processes.
OSI Model Overview – Transport
The transport layer is where we as engineers start to get our teeth into because we tend not to get involved into the application level, well until we have to prove it’s not a ‘network fault’.
The application makes a choice of which protocol to use within the TCP/IP layer; inside the TCP/IP is a suite of different protocols such as TCP, UDP and ICMP.
UDP is unreliable but fast, real-time traffic such as video streaming and VoIP phone call, UDP does not wait for an acknowledgement that the packet has been sent, for example, if you were on a phone call and part of the conversation is missed, you wouldn’t want to send that part again because the conversation has moved on and if some were missed; generally, you will hear the other person on the call say some like ‘sorry, I didn’t get that, could you repeat it please’.
If the software developer needs to make sure that each packet that is sent has been received, then they would use TCP as this is a reliable protocol but a little slower, each packet that is sent requires an acknowledgement from the other side that it’s been received, if there is no acknowledgement then the packet is sent again before any more are sent.
Also at the application will have a port number assigned to it, this separates the application from any other allocation that is running on the network, for example, FTP traffic uses the TCP protocol and port 21 and HTTP uses port 80, you wouldn’t want your FTP and HTTP traffic getting mixed up with each other, would you? If you make an HTTP request to a web server, the server will look at the destination port, in this case, port 80 and will instantly know that port 80 is HTTP. The port number is the bridge from the transport layer and the application level.
OSI Model Overview – Network (TCP/IP model – Internet)
This primary role of the Network layer is the logical addressing such as IP addresses, Routing, Encapsulation, Fragmentation and reassembly and error handling.
Each node that needs to send and receive must have a logical address which would be either IPv4 or IPv6, these are assigned via DHCP or manually, we usually assign IP addresses to printer or servers and let the DHCP deal with end-user devices.
The Router appends Layer 4 (Transport) to Layer 3 (Network) and sends the packet to the Datalink Layer (layer 2) which is called data encapsulation.
OSI Model Overview – Data and Physical Layers
The TCP/IP model grouped the Data link and Physical links together, as far as software developers were concerned this was the network, whereas in the world of the networks we also deal with the physical elements like Ethernet or Fibre.
The data link is where the physical addressing (MAC Addresses) is used and is a layer that handles the moving of data into and out of a physical link in a network.
The data link layer will convert all that data into 1’s and 0’s and passed it onto the physical layer; the wire and send it on to its destination MAC address.
Remember that every interface on a Router is a network.
Putting all this together, I’m going to buy a new laptop from dell using my favourite web browser.
- Chrome (Application Layer) is already browsing to Dell when we click Purchase
- The application passes it down to the presentation so it can be formatted so the Dell Server recognises it, it’s then passed onto the session layer
- As we are already browsing to Dell, we already have a session open so the session passes it down to the transport layer
- Because we are browsing to Dell and purchasing, we will know that we will be using HTTPS and destination port 443, this is what the Application has informed the transport layer to use, our device will use a port number above port 1024 for its source.
- The network layer populates the logical addressing (IP address) that we have used on our network, the source IP address being the device browsing to Dell, for example, 192.168.5.25 and the destination IP address will be Dell’s IP address of their website 220.127.116.11.
- The Datalink layer is going to fill in the MAC address of the source and the destination which is the layer 2 addresses which allow local communication to happen. The destination MAC address will be the next Router along the hop, which will be our own Router, the source MAC address will be the device that is making the web request to Dell. Once that is in place it adds an FCS to the end, this checks that as the frame is transmitted across the network, it doesn’t change.
When the Router 1 receives the frame from the Switch, it opens it and strips of the destination and source MAC address and looks at the destination IP address, the Router then looks into its Routing table checks how to gets to 18.104.22.168 which is more than likely your ISP. So at this point, the source MAC address will be R1 and the destination MAC address will be the ISP’s MAC address, the same will happen when the frame hits the ISP, the source and destination MAC’s gets ripped off and replaced with the destination MAC of R3 and the source as the ISP’s MAC.
When the frame gets to R3 and it checks the IP address of the destination 22.214.171.124, the server looks at the port (443) which is the web server, the application then processes the purchase, once the purchase is complete you need confirmation back, this is achieved by stepping back through the process of getting the frame to the server.