OSI Model Explained | Open System Interconnection Model | OSI 7 layers | Live Recorded Lecture

OSI Model Explained | Open System Interconnection Model | OSI 7 layers | Live Recorded Lecture

Introduction to Packet Creation

In this section, we learn how packets are created and sent over a network. The speaker explains the importance of IP addresses and introduces the concept of DNS servers.

Creating Packets

  • When a user types in a search query on their computer, the data is sent to a server.
  • To send data over a network, an IP address is required for both the source and destination.
  • The source IP address is automatically assigned by the DHCP server, while the destination IP address must be known beforehand.
  • If the user types in a website name instead of an IP address, a DNS server is used to translate that name into an IP address.

DNS Servers

  • A DNS server translates website names into their corresponding IP addresses.
  • To create a DNS server, one needs to install the DNS role on a server operating system and set up a name-to-IP table.

Conclusion

This section concludes the video by summarizing key points about packet creation and introducing the concept of DNS servers.

Key Takeaways

  • Packets require both source and destination IP addresses to be sent over a network.
  • DHCP servers automatically assign source IP addresses, while destination IP addresses must be known beforehand or obtained through a DNS server.
  • DNS servers translate website names into their corresponding IP addresses.

Creating a DNS Server

This section explains how to create a DNS server and the fixed port numbers associated with it.

Installing DNS Service

  • To create a DNS server, install the DNS service on a server operating system like 2022.
  • When you install the DNS service, port number 53 will automatically open up on the server.
  • Port number 53 is an international port number for DNS services.

Fixed International Port Numbers

  • Every service has a fixed port number.
  • For example, when you install the DNS service, it has port number 53.
  • When you want to make your server as a web server, you have to install the IS role and Port 80 will open up on your server.

Understanding How a DNS Server Works

This section explains how a DNS server works and its IP address.

Querying for IP Address

  • When you type in www.google.com in your browser, your PC creates a packet data with source IP as your PCIP and destination IP as Google's IP address.
  • Your PC checks who is the DNS by checking ncpa.cpl in your laptop.
  • Your PC then sends a query to the DNS asking for the IP address of www.google.com.

Querying Process

  • The query sent by your PC is known as a "DNS query".
  • The packet created by your PC contains data that says "I want IP of www.google.com".
  • The query is sent to the configured or default DNS server (e.g., 8.8.8.8).
  • The configured or default DNS server responds with an answer containing Google's IP address.

Understanding IP Addresses and Ports

In this section, the instructor explains the concept of IP addresses and ports in networking.

Source and Destination IP Addresses

  • Every packet has a source and destination IP address.
  • The source IP address is the IP address of the device sending the packet, while the destination IP address is the IP address of the device receiving it.
  • When sending a DNS query, the destination IP address will be that of the DNS server.

Source and Destination Ports

  • Every packet also has a source and destination port number.
  • The source port number is any random port number taken by your PC from a range of 49152 to 65535.
  • The destination port number is specific to the application or service where you are sending your packet. For example, when sending a DNS query, your PC will automatically use port number 53 as its destination port.

Source and Destination MAC Addresses

  • In addition to IPs and ports, packets also have source and destination MAC addresses.
  • The MAC addresses identify devices on a local network.

Understanding IP and MAC Addresses

In this section, the speaker explains the importance of IP and MAC addresses in communication and how they are used to create packets.

Source and Destination Information

  • Source IP is taken from your PC, while destination IP is the address you want to communicate with.
  • Your PC automatically puts in the destination port number, which can be seen using the command "ncpa.cpl".
  • Both IP and MAC addresses are required for communication. The source Mac address is known by your PC, while the destination Mac address will be explained later.

MAC Address

  • The speaker uses an example of a MAC address (AAA) to explain that it is too long to write out fully.
  • Your PC's actual MAC address will be put in place of the example.
  • The destination Mac address has a big story behind it that will be explained later.

Creating Packets

  • When creating a packet, your PC knows its own source information (IP, Mac, Port).
  • A packet has three parts: source information (IP, Mac, Port), destination information (IP, Mac), and data.
  • The packet goes through the router before reaching its final destination.

Destination Information

  • The speaker explains that he uses his router's Mac address as the destination instead of his DNS server's because it needs further explanation.
  • He promises to explain why at a later time.

Introduction to Wireshark

In this section, the instructor introduces the Wireshark tool and explains how it can be used to capture packets and analyze network traffic.

Using Wireshark to Capture Packets

  • The instructor explains that in this networking course, they will be diving deep into how the backend of networking works.
  • To demonstrate how packets are created and transmitted in reality, the instructor uses a popular free tool called Wireshark.
  • After opening Wireshark, the tool prompts the user to select where they want to capture packets from. If connected via LAN, select Ethernet; if connected via WiFi, select WiFi.
  • Once capturing packets from Ethernet or WiFi is selected, all incoming and outgoing packets are captured by Wireshark.

Capturing DNS Packets with Wireshark

  • To show how a PC sends a DNS query when typing a website URL like www.google.com, the instructor uses the command NS lookup in CMD.
  • By filtering with DNS on Wireshark after running NS lookup for www.google.com on CMD, all DNS-related query packets sent by the PC are captured by Wireshark.
  • When clicking on one of these captured DNS query packets in Wireshark, details such as source IP address and destination IP address can be seen.

Understanding DNS Query and Response

In this section, the speaker explains how a DNS query is created and sent from a PC to a DNS server, and how the response is received by the PC.

Creating a DNS Query

  • A packet is created when typing in a website name on a PC.
  • The packet contains source IP, destination IP, source port number, destination port number, source MAC address, and destination MAC address.
  • The DNS query asks for the IP address of the website being searched for.

Receiving a Response

  • The response packet comes from the DNS server to the PC.
  • The response contains the IP address of the website being searched for.
  • The source and destination IPs, ports, and MAC addresses are reversed in the response packet compared to the original query packet.

Understanding Crisscrossing of Source/Destination Information in DNS Response

In this section, the speaker explains how source/destination information crisscrosses between packets during a DNS query/response exchange.

Crisscrossing of Source/Destination Information

  • When sending a reply back after receiving an initial request (like replying to a letter), "from" becomes "to" and vice versa.
  • After receiving a response with an IP address from the DNS server, PCs are ready to send packets directly to that IP address.
  • The source and destination IPs, ports, and MAC addresses are reversed in the response packet compared to the original query packet.

Conclusion

In this section, the speaker concludes by summarizing how DNS queries and responses work.

Summary

  • DNS queries are created on a PC with source/destination information.
  • Responses come from a DNS server with crisscrossed source/destination information.
  • PCs can then send packets directly to the IP address received in the response.

Creating a Secure Web Server

This section covers the process of creating a secure web server, including installing the necessary software and obtaining a certificate.

Setting up the Web Server

  • To complete a DNS query packet, source and destination ports, source MAC address, and destination MAC address are required.
  • Google created their web server by installing Windows Server 2022 operating system and opening Port 80 for HTTP traffic.
  • All websites today use HTTPS instead of HTTP to ensure secure communication between client and server.
  • HTTPS requires a certificate to be obtained from a Certificate Authority (CA), which is installed on the web server.

Securing Communication with HTTPS

  • After enabling HTTPS on the web server, HTTP is disabled to prevent insecure communication.
  • Communication between client and server is secured through HTTPS using port 443.

Packet Headers

  • Every packet has headers that include source IP address, destination IP address, source port number (randomly generated by PC), destination port number (e.g. Port 80 for HTTP or Port 443 for HTTPS), source MAC address, and destination MAC address.

Understanding Packets and Packet Capture

In this section, the instructor explains how packets work and demonstrates how to capture packets using Wireshark.

Destination Port for HTTP and HTTPS

  • The destination port for HTTPS is 443, while the destination port for HTTP is 80.
  • The source IP is the laptop IP, while the destination IP is that of Google.
  • The source MAC address is that of the laptop, while the destination MAC address is that of the router.

Capturing Packets with Wireshark

  • To capture packets with Wireshark, start a packet capture and continue without saving.
  • Use filters such as IP dot DST underscore host space to capture all packets going to a particular IP address.
  • When capturing packets going to a website like Flipkart or Google, ensure that you have captured all relevant packets by filtering based on their destination IP addresses.

Packet Capture Example

  • The instructor demonstrates how to show captured packets in Wireshark by starting a packet capture and opening an incognito window.
  • He shows an example of a captured packet when he goes to Flipkart.com.

Understanding Packet Capture and Filters

In this section, the speaker explains how to capture packets and use filters to find specific information.

Capturing Packets

  • To capture packets, you need to know the IP address of the website you want to capture.
  • The structure of a packet is the same for all websites if you are using HTTPS.
  • You can use filters to capture all packets going from your PC to a specific website.

Using Filters

  • Filters help you find what you need when capturing packets.
  • DNS filter captures DNS query packets when performing an NS lookup.
  • ip.destination host filter captures all packets going to a specific website based on its IP address.
  • TCP contains filter captures entire communication happening between two devices.

Understanding OSI Model

In this section, the speaker explains what OSI model is and why it's important.

What is OSI Model?

  • OSI model stands for Open System Interconnection and was created by ISO (International Organization for Standardization).
  • The purpose of creating standards is to avoid Monopoly in the market.

Importance of OSI Model

  • Monopoly is dangerous because it allows providers to charge whatever they want without competition.
  • Different providers in the market create competition which leads to better offers for customers.

Introduction to OSI Model

In this section, the instructor introduces the OSI model and explains how it enables communication between different vendors.

The Need for a Standard Language

  • Before the creation of the OSI model, companies like Microsoft and IBM had their own standards for communication.
  • The International Organization for Standardization created a standard language that all network devices could follow, known as the OSI model.
  • The OSI model consists of seven layers that every device must follow.

Understanding the Seven Layers of OSI Model

  • The seven layers of the OSI model are:
  • Layer 1: Physical
  • Layer 2: Data Link
  • Layer 3: Network
  • Layer 4: Transport
  • Layer 5: Session
  • Layer 6: Presentation
  • Layer 7: Application
  • Each layer has its own job and responsibilities in networking.

Sending and Receiving Data with OSI Model

  • When sending data, it goes from layer seven to layer one. When receiving data, it goes from layer one to layer seven.
  • The physical layer is responsible for sending and receiving data at its most basic level.
  • Each layer has specific responsibilities in processing data.

DNS Query Packet and DNS Cache

  • When typing a website name into a browser, your PC creates a packet but may not have the IP address of the website.
  • If there is no IP address available, your PC will create a DNS query packet to get it from a DNS server.
  • Once your PC gets an IP address from a DNS server, it stores it in its cache for one hour. This means that within that hour, your PC will not need to ask for the IP address again when accessing the same website.

Understanding the OSI Model and Layers

In this section, the speaker explains the OSI model and its layers. He also discusses how data is transmitted between these layers.

The Application Layer

  • When typing https, HTTP, DNS, etc., you are at the application layer.
  • The Chrome browser is not an application; it's a browser that helps access websites.
  • HTTPS is an application.

The Transport Layer

  • Data from the news word will come directly to the transport layer.
  • In the transport layer, headers such as source port and destination port are added.

Other Layers

  • There is no job for a session layer in Internet model OSI.
  • There is no by default encryption and compression in Internet networks.

Understanding the OSI Model

In this section, we will learn about the OSI model and how it works.

The Transport Layer

  • The application layer is followed by the transport layer.
  • The transport layer adds source port and destination port to your packet.
  • Source port is any random port number and destination Port is the port number of the application you are using.

Adding Headers

  • The job of the OSI model is to add headers to your data packets.
  • At the transport layer, source port and destination port are added as headers.
  • At the network layer, source IP address and destination IP address are added as headers.
  • At the data link layer, source MAC address and destination MAC address are added as headers.

Physical Layer

  • The physical layer consists of all those things which you can touch and feel like cables or Wi-Fi signals.
  • Data will be converted into a current or wireless signal before being sent out from your device.

TCP vs UDP

In this section, we will learn about TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

TCP

  • TCP stands for Transmission Control Protocol.
  • It provides reliable communication between applications by establishing a connection between them.
  • It uses a three-way handshake process to establish a connection: SYN, SYN/ACK, ACK.
  • It ensures that all packets are received in the correct order and retransmits any lost packets.

UDP

  • UDP stands for User Datagram Protocol.
  • It is a connectionless protocol, meaning it does not establish a connection before sending data.
  • It does not guarantee reliable communication or packet delivery.
  • It is used for applications where speed is more important than reliability, such as video streaming or online gaming.

IP Addressing

In this section, we will learn about IP addressing and how it works.

IPv4 vs IPv6

  • There are two versions of IP addresses: IPv4 and IPv6.
  • IPv4 addresses are 32 bits long and expressed in dotted decimal notation (e.g., 192.168.0.1).
  • IPv6 addresses are 128 bits long and expressed in hexadecimal notation (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

Subnetting

  • Subnetting allows you to divide a network into smaller subnetworks.
  • It helps to reduce network congestion and improve performance.
  • Subnets can be identified by their subnet mask, which determines the range of IP addresses within the subnet.

Private vs Public IP Addresses

  • Private IP addresses are used within a private network and cannot be accessed from outside the network.
  • Public IP addresses are assigned by ISPs and are used to access the internet.
  • NAT (Network Address Translation) is used to map private IP addresses to public IP addresses when accessing the internet.

Routing

In this section, we will learn about routing and how it works.

Routing Tables

  • A routing table is a database that contains information about network topology.
  • It is used by routers to determine the best path for forwarding packets.
  • The routing table contains information such as destination network address, subnet mask, next hop address, and interface.

Routing Protocols

  • Routing protocols are used by routers to exchange information about network topology.
  • Examples of routing protocols include RIP (Routing Information Protocol), OSPF (Open Shortest Path First), and BGP (Border Gateway Protocol).
  • Each protocol has its own advantages and disadvantages depending on the size and complexity of the

OSI Model and DNS Query Packet

In this section, the speaker explains the importance of the OSI model and how it is followed by all network device manufacturers. The speaker also explains how a DNS query packet is created.

Importance of OSI Model

  • The OSI model is important because it provides a standard structure for all network devices to follow.
  • When a packet is received, it is read from bottom to top (layers 1-7).
  • If presentation and session layers are not present, the application layer will read the data.
  • All companies and manufacturers follow the same structure provided by the OSI model.

DNS Query Packet Creation

  • When a user types in a website name (e.g. www.amazon.com), their PC creates a DNS query packet to get the IP address of that website.
  • The data in the DNS query packet contains "I want IP of [website name]."
  • Source port and destination port are added by transport layer; source port is any random number while destination port is 53.
  • Network layer adds source IP (PC's IP address) and destination IP (DNS server's IP address).
  • Data link layer adds source MAC (PC's MAC address) and destination MAC (router's MAC address).
  • Finally, physical layer converts packet to current or Wi-Fi signal and sends it out.

Conclusion

The OSI model provides a standard structure for all network devices to follow. When a user types in a website name, their PC creates a DNS query packet to get the IP address of that website. The packet is then sent through the layers of the OSI model, with each layer adding necessary information until it reaches its destination.

OSI Model and Network Layers

In this section, the speaker explains the different layers of the OSI model and their functions.

Physical Layer

  • The physical layer is responsible for connecting devices.
  • Devices that come under the physical layer include Hub, LAN cable, fiber cable, SFP module, RJ45 connector, LC connector, LAN adapter, and wireless adapter.

Data Link Layer

  • The data link layer is layer 2 in the OSI model.
  • At this layer, source MAC and destination MAC addresses are added.
  • Switches work at the data link layer and can only understand MAC addresses.

Network Layer

  • The network layer is where source IP and destination IP addresses are added.
  • Routers or L3 switches work at this layer.
  • They can read source IP and destination IP addresses.

Transport Layer

  • The transport layer is a very important layer responsible for adding source port and destination port to data packets.
  • It also ensures error-free communication between devices by performing segmentation and marking tasks.
  • TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two protocols used at this layer.

TCP vs UDP

In this section, the speaker explains the differences between TCP and UDP protocols used in transport layers.

Transmission Control Protocol (TCP)

  • TCP adds reliability to data transmission by ensuring that all packets arrive at their destination without errors or loss.
  • It uses a three-way handshake process to establish a connection between devices before transmitting data packets.
  • It also performs flow control to ensure that data is transmitted at an optimal rate.

User Datagram Protocol (UDP)

  • UDP does not provide reliability as it does not perform error checking or retransmission of lost packets.
  • It is faster than TCP as it does not have to wait for acknowledgments or perform flow control.
  • It is used in applications where speed is more important than reliability, such as online gaming and video streaming.

Understanding TCP and UDP

In this section, the speaker discusses the importance of understanding TCP and UDP in interviews. They also explain how someone decides whether their application will be TCP or UDP.

Full Forms in Interviews

  • Interviewers may ask for full forms of technical terms.
  • It is recommended to not start with full forms but to explain them if asked.
  • Some interviewers are interested in full forms, so it's important to know them.

Importance of Technical Knowledge

  • Non-technical people may conduct interviews, but they may not understand technical concepts.
  • Communication skills are important, but being non-technical can lead to issues in the long run.

TCP and UDP

  • The creator of an application decides whether it will be TCP or UDP.
  • DNS is typically UDP while HTTP and HTTPS are usually TCP.
  • TCP provides reliability while UDP does not.

Guaranteeing Delivery of Data

In this section, the speaker discusses the importance of guaranteeing delivery of data and how TCP and UDP work.

TCP vs. UDP

  • The speaker explains that TCP guarantees delivery of data through a three-way handshake.
  • UDP is faster than TCP but unreliable because there is no mechanism to ensure delivery if a query is not received properly.

Three-Way Handshake

  • The speaker explains that when using TCP, a PC does a three-way handshake to guarantee delivery of data.
  • When sending a DNS query packet, the PC asks the DNS server for the IP address and then sends the news word to the Google server using HTTPS, which is a TCP-based application.
  • Before sending the news word, the transport layer creates a three-way handshake to ensure delivery.

Importance of Networking

  • The speaker emphasizes that networking has both theoretical concepts and practical applications.
  • Practical networking requires clear understanding of theoretical concepts in order to avoid critical outages like Facebook's routing issue outage.
  • Network engineers handle important and critical things that can bring down an entire company.

Overall, this section covers how guaranteeing delivery of data works with TCP and UDP protocols. It also highlights the importance of understanding theoretical concepts in networking for practical applications.

Three-Way Handshake

This section explains the concept of a three-way handshake in TCP-based applications like HTTP and HTTPS.

The Concept of a Handshake

  • A handshake is necessary to establish communication between two parties.
  • In TCP-based applications, a three-way handshake is performed before data transfer can begin.
  • The three-way handshake involves sending a sync packet, receiving a sync act packet, and sending an acknowledgment packet.

Importance of Three-Way Handshake

  • The purpose of the three-way handshake is to confirm that the server is available and ready to receive data.
  • If the server does not respond with a sync act packet, no data transfer will occur.

Transport Layer

This section discusses the role of the transport layer in establishing connections between devices.

Role of Transport Layer

  • The transport layer checks whether an application is TCP or UDP.
  • If it's TCP, it performs a three-way handshake before data transfer can begin.
  • If it's UDP, no three-way handshake is performed.

Example: Connecting to Amazon.com

  • Before sending any data to Amazon.com over HTTPS (which uses TCP), your PC sends a three-way handshake to confirm connectivity with Amazon's server.

Transport Layer Overview

This section covers the role of the transport layer in creating sync packets and segmenting data.

Sync Packets

  • Sync packets are created by the transport layer before sending actual data.
  • The source and destination port, IP, and MAC addresses are added to the sync packet by different layers.
  • The dummy packet contains no data but is used for acknowledgment purposes.

Segmentation and Marking

  • Segmentation is the process of dividing large amounts of data into smaller packets.
  • The transport layer marks each packet with a sequence number to ensure proper reassembly at the receiving end.
  • Segmentation allows for more efficient transmission of large files over networks.

TCP vs UDP

This section explains why TCP is used for critical applications while UDP is used for DNS queries.

TCP

  • TCP is a secure protocol that ensures reliable delivery of data.
  • It's used for critical applications like HTTP, HTTPS, WhatsApp, etc.

UDP

  • UDP is designed for fast response times and is commonly used for DNS queries where thousands of requests come in at once.
  • Unlike TCP, it does not guarantee reliable delivery of data.

Example: Segmenting Data

This section provides an example of how segmentation works in practice.

Segmenting Data

  • When uploading or downloading large files, the transport layer divides them into smaller packets.
  • Each packet is marked with a sequence number to ensure proper reassembly at the receiving end.
  • Even small messages like news articles can be divided into multiple packets using segmentation.

TCP and UDP

This section explains the differences between TCP and UDP protocols.

TCP Protocol

  • TCP guarantees delivery of data by acknowledging each packet sent.
  • If an acknowledgment is not received, TCP will retransmit the packet until it is acknowledged.
  • TCP is used for applications that require reliable communication, such as HTTPS.

UDP Protocol

  • UDP does not guarantee delivery of data and does not use acknowledgments.
  • It is faster than TCP but less reliable.
  • UDP is used for applications that require fast response times, such as DNS queries.

Comparison of TCP and UDP

This section provides a comparison between the features of TCP and UDP protocols.

Features of TCP Protocol

  • TCP uses sequence numbers to ensure packets are delivered in order.
  • It also uses acknowledgments to ensure reliable delivery of data.
  • The maximum size of a packet in TCP is determined by the Maximum Segment Size (MSS).

Features of UDP Protocol

  • UDP does not use sequence numbers or acknowledgments, making it faster but less reliable than TCP.
  • The maximum size of a packet in UDP is determined by the Maximum Transmission Unit (MTU).

Port Numbers and Applications

This section explains port numbers and their associated applications.

Port Numbers

  • Port numbers are used to identify specific applications running on a device.
  • They range from 0 to 65535, with well-known ports ranging from 0 to 1023.

Well-Known Ports

  • Well-known ports are reserved for specific applications, such as HTTP (port 80) and HTTPS (port 443).
  • They range from 0 to 1023.

Registered Ports

  • Registered ports are used by applications that have been registered with the Internet Assigned Numbers Authority (IANA).
  • They range from 1024 to 49151.

Dynamic/Private Ports

  • Dynamic/private ports are used by applications that are not registered with IANA.
  • They range from 49152 to 65535.

Understanding MTU and Packet Segmentation

In this section, the instructor explains how the transport layer segments packets and creates multiple packets with a specific size known as MTU.

Transport Layer Packet Segmentation

  • The transport layer segments the packet into multiple packets.
  • Each packet has a specific size known as MTU.
  • MTU stands for Maximum Transmission Unit.

Installing Packet Tracer

In this section, the instructor provides instructions on how to install Packet Tracer for the next lecture.

Installing Packet Tracer

  • Install Packet Tracer before attending the next lecture.
  • Watch the video in LMS for installation instructions.
Video description

In this video, you are going to learn 1) How Packet is Constructed 2) What are IP Address 3) What are Port Numbers 4) Need of OSI Model 5) Layers in OSI Model 6) Physical Layer 7) DataLink Layer 8) Network Layer 6) Transport Layer 7) Session Layer 8) Presentation Layer 9) Application Layer 10) What is TCP 11) What is UDP 12) TCP versus UDP If you liked this video, drop a comment and subscribe to this channel We Provide Hands-On Practical Training for the CCNA course ✔️ CCNA Syllabus:- https://attariclasses.in/ccna ✔️ WhatsApp Support:- https://wa.me/917738375431 ✔️ Contact our Career Guidance Expert:- +91-7738375431 ✔️ Buy our CCNA Video Course:- https://lms.attariclasses.in/ *************************** Upcoming batch Schedule *************************** ✔️ Get Upto 20% Off on all Courses https://attariclasses.in/batch/ *********************** About Attari Classes *********************** Attari Classes is a leading IT Training institute for VMware, AWS, AZURE, MCSE and CCNA We provide Online Instructor-led Live, Hands-on Practical training to candidates across the globe, and we provide classroom Training in Mumbai, we also have self-paced training options available at https://lms.attariclasses.in/ The world-class training at Attari Classes is offered through several innovative learning methods and delivery models to cater to the unique requirements of a global customer base which emphasizes maximum practical learning Check Reviews https://attariclasses.in/reviews/ Check Success Stories https://attariclasses.in/success-stories/ *********************** Our Course Offerings *********************** VMware - vSphere https://attariclasses.in/vmware AWS - Cloud https://attariclasses.in/aws AZURE - Cloud https://attariclasses.in/azure MCSE - Windows Server https://attariclasses.in/mcse CCNA - Networking https://attariclasses.in/ccna #attariclasses