CompTIA Network+ N10-008 Certification Guide - Glen D. Singh - E-Book

CompTIA Network+ N10-008 Certification Guide E-Book

Glen D. Singh

0,0
43,19 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

This book helps you to easily understand core networking concepts without the need of prior industry experience or knowledge within this fi eld of study. This updated second edition of the CompTIA Network+ N10-008 Certification Guide begins by introducing you to the core fundamentals of networking technologies and concepts, before progressing to intermediate and advanced topics using a student-centric approach.
You’ll explore best practices for designing and implementing a resilient and scalable network infrastructure to support modern applications and services. Additionally, you’ll learn network security concepts and technologies to effectively secure organizations from cyber attacks and threats. The book also shows you how to efficiently discover and resolve networking issues using common troubleshooting techniques.
By the end of this book, you’ll have gained sufficient knowledge to efficiently design, implement, and maintain a network infrastructure as a successful network professional within the industry. You’ll also have gained knowledge of all the official CompTIA Network+ N10-008 exam objectives, networking technologies, and how to apply your skills in the real world.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 860

Veröffentlichungsjahr: 2022

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



CompTIA Network+ N10-008 Certification Guide

The ultimate guide to passing the N10-008 exam

Glen D. Singh

BIRMINGHAM—MUMBAI

CompTIA Network+ N10-008 Certification Guide

Copyright © 2022 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Mohd Riyan Khan

Publishing Product Manager: Shrilekha Malpani

Senior Content Development Editor: Sayali Pingale

Technical Editor: Nithik Cheruvakodan

Copy Editor: Safis Editing

Book Project Manager: Neil Dmello

Proofreader: Safis Editing

Indexer: Sejal Dsilva

Production Designer: Joshua Misquitta

Marketing Coordinator: Nimisha Dua

First published: November 2018

Second edition: October 2022

Production reference: 1191022

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

978-1-80323-606-3

www.packt.com

I would like to dedicate this book to the people in our society who have always worked hard in their field of expertise and who have not been recognized for their hard work, commitment, sacrifices, and ideas, but who, most importantly, believed in themselves when no one else did. This book is for you. Always have faith in yourself. With commitment, hard work, and focus, anything can be possible. Never give up, because great things take time.

– Glen D. Singh

Contributors

About the author

Glen D. Singh is an information security author and cybersecurity instructor. His areas of expertise are cybersecurity operations, offensive security tactics, and enterprise networking. He is a holder of many certifications, including CEH, CHFI, PAWSP, and 3xCCNA (in CyberOps, Security, and Routing and Switching).

Glen loves teaching and mentoring others and sharing his wealth of knowledge and experience as an author. He has written many books that focus on vulnerability discovery and exploitation, threat detection, intrusion analysis, incident response, network security, and enterprise networking. As an aspiring game-changer, Glen is passionate about increasing cybersecurity awareness in his homeland, Trinidad and Tobago.

I would like to thank God, the preserver of the universe, for all His divine grace and guidance. I would also like to thank Shrilekha Malpani, Sayali Pingale, Neil D’mello, and the wonderful team at Packt Publishing, who have provided amazing support throughout this journey. To the technical reviewer, Greg Gardner, thank you for your outstanding contribution to making this an amazing book.

About the reviewer

Greg Gardner is a former U.S. Navy Officer, government consultant, and technology expert. He has worked in the aerospace industry, at several dot-coms, at several data centers, at the Pentagon, and with most federal and many state agencies. He received his Master of Information Technology from Virginia Tech. Greg teaches and writes courseware for A+, Network+, Security+, CND, and CEH. Greg has taught at the high school and undergraduate levels as well as in private industry. He speaks at national technology conferences and has written two cyber-espionage novels.

As a long-time member of the IT community, it is my honor to be in the “give back” portion of my career. As a teacher, technology evangelist, and author, I strive to ensure that individuals who are making career changes or simply want to understand the fast-moving IT industry are prepared. Throughout my career, my family and spouse have been my greatest supporters – thank you.

Table of Contents

Preface

Part 1: Networking Concepts

1

Exploring the OSI Model and TCP/IP

Technical requirements

The need for networking models

Exploring the OSI model

Application layer

Presentation layer

Session layer

Transport layer

Network layer

Data Link layer

Physical layer

Understanding TCP/IP

Data encapsulation concepts

Ethernet header

IP headers

TCP header

UDP headers

Analyzing network packets

Summary

Questions

Further reading

2

Network Topologies and Connections

Understanding network topologies

Types of network topologies

Discovering network types

Peer-to-peer

Client-server

Personal area network

Local area network

Wide area network

Metropolitan area network

Wireless local area network

Campus area network

Storage area network

Software-defined wide area network

Multiprotocol label switching

Multipoint generic routing encapsulation

Identifying service-related entry points

Comparing provider links

Satellite

Digital Subscriber Line

Cable

Leased line

Metro optical

Summary

Questions

Further reading

3

Ethernet Technology and Virtualization

Technical requirements

Types of connections

Copper cables

Fiber optic cables

Cable management

Ethernet standards

Virtual network concepts

Hypervisors

Virtual networking components

Lab – creating a virtual machine

Summary

Questions

Further reading

4

Understanding IPv4 and IPv6 Addressing

Technical requirements

The need for IP addressing

Public versus private address spaces

Network Address Translation (NAT)

Exploring the structure of IPv4 and IPv6

Fundamentals of IPv4

Fundamentals of IPv6

Types of IPv4 and IPv6 addresses

Automatic Private IP Addressing (APIPA)

Extended unique identifier (EUI-64)

Unicast

Multicast

Broadcast

Anycast

Link-local

Loopback

Unique local address

Default gateway

Delving into IPv6 concepts

Tunneling

Dual stack

Translation

Router advertisement

Stateless Address Autoconfiguration (SLAAC)

Configuring IP addresses

Windows operating system

Linux operating system

Cisco IOS router

Summary

Questions

Further reading

5

Applied IPv4 Subnetting

Understanding the purpose of the subnet mask

Delving into network prefixes and subnet masks

Determining the network ID

Understanding the importance of subnetting

IPv4 subnetting and VLSM

Step 1 – determining the appropriate IPv4 block

Step 2 – creating new subnets (subnetworks)

Step 3 – assigning subnets to each network

Step 4 – performing Variable-Length Subnet Masking (VLSM)

Summary

Questions

Further reading

6

Exploring Network Protocols and Services

Technical requirements

Network protocols

File protocols

Remote access protocols

Email protocols

HTTP and HTTPS

SQL database protocols

Lightweight Directory Access Protocol

Syslog

Session Initiation Protocol

Network protocol types

Internet Control Message Protocol

TCP

UDP

Network services

Network Time Protocol

Dynamic Host Configuration Protocol

DNS

Simple Network Management Protocol

Lab – analyzing FTP packets

Lab – analyzing TFTP packets

Lab – analyzing SMB packets

Lab – analyzing Telnet packets

Lab – reassembling a SIP telephone conversation

Summary

Questions

Further reading

7

Data Center Architecture and Cloud Computing

Understanding network architecture

Cisco 3-tier architecture

Cisco 2-tier architecture

Discovering software-defined networking

Components of SDN

Exploring data center architectures

Branch office versus on-premises

Spine and leaf

Delving into storage area networks

Connection types

Fundamentals of cloud computing

Deployment models

Cloud service models

Cloud connectivity solutions

Summary

Questions

Further reading

Part 2: Network Implementation

8

Networking Devices

Understanding networking devices

Hub

Layer 2 switch

Layer 3 capable switch

Bridge

Router

Access point

Wireless LAN controller

Load balancer

Proxy server

Internet modems

Repeater

Voice gateways and media converters

Exploring security appliances

Firewall

IPS/IDS

Types of networked devices

Summary

Questions

Further reading

9

Routing and Switching Concepts

Exploring routing concepts

Understanding routing protocols

Dynamic routing

Static routing

Bandwidth management

Delving into switching concepts

PoE

Spanning-Tree

Port aggregation

Neighbor discovery protocol

Exploring VLAN

Types of VLANs

Understanding switch port configurations

Duplex and speed

Port mirroring

Port security

Auto MDI-X

Summary

Questions

Further reading

10

Exploring Wireless Standards and Technologies

Exploring wireless networking

Beacons, probes, stations, and SSIDs

Frequencies, ranges, and channels

SSID

Antenna types

MIMO concepts

Delving into wireless security

Wireless encryption standards

Authentication methods

Exploring cellular technologies

Summary

Questions

Further reading

Part 3: Network Operations

11

Assuring Network Availability

Network performance metrics

SNMP

Network device logs

Understanding interface issues

Checking the link state (up/down)

Checking the speed

Checking the duplex

Checking the uptime/downtime

Interface errors or alerts

Environmental factors and sensors

Summary

Questions

Further reading

12

Organizational Documents and Policies

Plans and procedures

Change management

Incident response plans

The business continuity plan

Disaster recovery plans

The system life cycle

Standard operating procedures

Hardening and security policies

Password policies

Acceptable use policy

Bring your own device policies

Remote access policies

Onboarding and off-boarding policies

Security policies

Data loss prevention

Common documentation

Common agreements

Summary

Questions

Further reading

13

High Availability and Disaster Recovery

High availability concepts

Diverse paths

Infrastructure redundancy

Active-active versus active-passive configurations

First hop redundancy

Disaster recovery concepts

Recovery sites

Facilities and infrastructure support

Network device backup/restore

Summary

Questions

Further reading

Part 4: Network Security and Troubleshooting

14

Network Security Concepts

Understanding network security

Confidentiality, integrity, and availability

Threats, vulnerabilities, and exploits

Least privilege and RBAC

Defense in Depth and zero trust

Exploring authentication methods

Multi-factor authentication

Kerberos, single sign-on, and LDAP

Risk management

Security risk assessments

Summary

Questions

Further reading

15

Exploring Cyberattacks and Threats

Exploring network-based attacks

Denial of service

Botnets

On-path attack

DNS-based attack

VLAN hopping

Rogue DHCP

Password attacks

Understanding wireless attacks

Rogue access points and evil twins

Deauthentication attacks

Delving into human and environmental attacks

Social engineering

Types of social engineering attacks

Summary

Questions

Further reading

16

Implementing Network Security

Network hardening techniques

Wireless security techniques

SSID considerations

Password considerations

MAC filtering

Antennas and power levels

Geofencing and captive portals

Client isolation

Wireless authentication protocols

Installation considerations

Remote connectivity methods

Remote access methods

Importance of physical security

Summary

Questions

Further reading

17

Network Troubleshooting

Network troubleshooting methodology

Cable connectivity issues

Link lights/status indicators

Damaged cables and connectors

Incorrect TX/RX alignment

Attenuation

Crosstalk and Electro-Magnetic Interference (EMI)

Bad ports/transceivers

VLAN mismatch

Sub-optimal performance

Wireless connectivity issues

Physical layer issues

Antenna issues

Signal power issues

Interference

Client configuration issues

Common network issues

Hardware-based troubleshooting tools

Software-based tools and commands

Packet sniffer

Port scanner

Wi-Fi analyzer

Bandwidth speed tester

Command-line tools

Summary

Questions

Further reading

18

Practice Exam

Questions

Answers

Assessments

Chapter 1 – Exploring the OSI Model and TCP/IP

Chapter 2 – Network Topologies and Connections

Chapter 3 – Ethernet Technology and Virtualization

Chapter 4 – Understanding IPv4 and IPv6 Addressing

Chapter 5 – Applied IPv4 Subnetting

Chapter 6 – Exploring Network Protocols and Services

Chapter 7 – Data Center Architecture and Cloud Computing

Chapter 8 – Network Devices

Chapter 9 – Routing and Switching Concepts

Chapter 10 – Exploring Wireless Standards and Technologies

Chapter 11 – Assuring Network Availability

Chapter 12 – Organizational Documents and Policies

Chapter 13 – High Availability and Disaster Recovery

Chapter 14 – Network Security Concepts

Chapter 15 – Exploring Cyber Attacks and Threats

Chapter 16 – Implementing Network Security

Chapter 17 – Network Troubleshooting

Index

Other Books You May Enjoy

Preface

When breaking into the networking industry, you often hear people ask which certification is the best one to start pursuing. The CompTIA Network+ N10-008 certification is a vendor-neutral networking certification designed to help learners and certification holders to obtain the technical skills and hands-on experience needed to design, build, maintain, and troubleshoot modern-day network infrastructure to support the ever-growing demands of the network services, technologies, and resources that organizations heavily rely upon to support their business processes and users. Furthermore, this certification helps learners to validate their skills that are needed to support various types of network infrastructure and architectures on any platform while providing the learner with the specific skills that are needed by network professionals within the industry.

As a cybersecurity and networking lecturer with years of industry and academic experience, my goal is to help aspiring network and security professionals break into the industry. As technologies advance quickly, certification vendors such as CompTIA update their certification objectives to ensure learners acquire the latest knowledge and skills needed in the industry. Likewise, this new edition contains all-new updated content relevant to the CompTIA Network+ N10-008 exam objectives with practice questions, exercises, and labs to help reinforce learning and development. During the writing process of this book, I’ve used a student-centric and learner-friendly approach, helping you to easily understand the most complex topics, terminologies, and how to design, implement, and troubleshoot networks.

In this new edition, learners will become more aware of the various network architectures that are used within data centers and cloud service providers’ environments, such as Software-Defined Network (SDN), and understand how SDN can be integrated into existing network infrastructures. Additionally, learners will encounter in-depth emphasis on new and emerging wireless standards and how businesses can leverage the flexibility of wireless technologies to support their business needs. Furthermore, we offer a dedicated focus on the network security principles, cyberattacks, threats, and network hardening techniques that are used to secure organizations from threat actors and data breaches.

This book begins by introducing you to networking models such as the Open Systems Interconnection (OSI) and Transmission Control Protocol/Internet Protocol (TCP/IP), which are responsible for helping systems exchange data over a wired or wireless network using a set of protocols that describes how data is encoded and formatted before it’s sent to its destination. Then, you will explore common network topologies and network types used within many organizations around the world. Next, you will discover common Ethernet standards and how they are implemented in various network components and cable types within the modern network infrastructure. Additionally, you will gain a solid understanding of how to implement both IPv4 and IPv6 addressing within a network.

Furthermore, you will learn how to break down an IPv4 network block using a step-by-step approach for performing subnetting and Variable Length Subnet Mask (VLSM) for a multi-branch network. You will also explore common network protocols, services, and protocol types that are found on most modern networks. Then, you will discover data center architectures and the need for virtualization and cloud computing.

The second part of this book describes aspects of network implementation such as the role and function of common networking devices and security appliances required by organizations around the world. Then, you will explore routing and switching mechanisms that are used by routers and switches to efficiently forward messages to their destinations over a network. Additionally, you will learn about wireless networking, technologies, and security standards that are needed to design and implement a resilient and secure wireless network infrastructure.

The third part of this book covers network operations, examining best practices for measuring, monitoring, and improving the performance of a network, and detecting and resolving interface issues on devices. Furthermore, you will explore common plans, policies, and procedures that are developed and maintained within organizations to improve the security posture of their network infrastructure, and common agreements for employees. Additionally, you will discover how organizations implement High Availability (HA) within their networks to ensure critical services and resources are available for users, along with a look at disaster recovery best practices.

The final part of this book focuses on network security and troubleshooting concepts, covering the fundamentals of network security and risk management strategies for companies. Furthermore, you will learn about various types of cyber-attacks and threats on wired and wireless networks, and how threat actors perform human-based attacks. Furthermore, you will learn network security hardening techniques, wireless security best practices, common remote access technologies, and physical security. Lastly, you will discover how to use network troubleshooting methodology to efficiently discover and resolve common wired and wireless network issues using both hardware- and software-based tools.

By completing this book, you will be taken through an amazing journey from beginner to professional in terms of learning, understanding, and developing the skills and confidence needed to pass the official CompTIA Network+ N10-008 certification exam, while becoming well versed in a variety of network administration and security solutions as an aspiring network professional within the industry.

Who this book is for

This book is designed for beginners who are interested in starting a career in the field of networking and students who are pursuing the official CompTIA Network+ N10-008 certification. This certification guide is targeted at anyone, whether you’re a beginner or seasoned professional who is looking to boost your career in network administration and operations. This book helps learners prepare to support various types of network infrastructure and platforms, while providing specific skills that are needed by the next generation of network professionals for the industry.

What this book covers

Chapter 1, Exploring the OSI Model and TCP/IP, introduces you to common networking models used to define how systems exchange messages over a network.

Chapter 2, Network Topologies and Connections, explores popular networking designs, types, and service provider links.

Chapter 3, Ethernet Technology and Virtualization, introduces you to Ethernet standards and technologies, cable types, and virtual networking concepts.

Chapter 4, Understanding IPv4 and IPv6 Addressing, introduces you to both IPv4 and IPv6 addressing structures and the types of IP addresses found on a network.

Chapter 5, Applied IPv4 Subnetting, introduces you to IPv4 subnetting and applying Variable Length Subnet Masking (VLSM) on a network.

Chapter 6, Exploring Network Protocols and Services, explores the roles and functions of common networking protocols and services.

Chapter 7, Data Center Architecture and Cloud Computing, introduces you to popular network architectures that are used within data center environments and cloud computing technologies.

Chapter 8, Networking Devices, introduces you to the roles and functions of common networking devices and security appliances.

Chapter 9, Routing and Switching Concepts, explores dynamic routing protocols, static routing concepts, and switching concepts to improve the performance and scalability of a network.

Chapter 10, Exploring Wireless Standards and Technologies, introduces you to wireless networking technologies and security standards.

Chapter 11, Assuring Network Availability, introduces you to best practices to ensure the availability and monitoring of network resources and assets.

Chapter 12, Organizational Documents and Policies, focuses on exploring common organizational plans, procedures, and security policies to prevent network and security incidents.

Chapter 13, High Availability and Disaster Recovery, explores high availability concepts to ensure critical network resources are always accessible, and describes disaster recovery concepts.

Chapter 14, Network Security Concepts, explores the need for information security, authentication systems, and risk management within organizations.

Chapter 15, Exploring Cyberattacks and Threats, focuses on various types of wired, wireless, and human-based cyberattacks and threats.

Chapter 16, Implementing Network Security, explores best practices for implementing countermeasures and mitigation techniques to prevent cyberattacks and threats.

Chapter 17, Network Troubleshooting, provides troubleshooting methodologies for detecting and resolving issues on wired and wireless networks using both hardware- and software-based tools.

Chapter 18, Practice Exam, provides a series of practice exercises to help reinforce your learning while preparing for the official certification exam.

To get the most out of this book

All exercises were completed on a system running Windows 10 as the host operating system with virtualization enabled on the processor.

All labs and exercises that were performed in this book used a free version of the required application to ensure you will be able to easily complete the exercises without the need for acquiring paid applications. However, you are free to use commercial tools and applications as needed.

After completing this book, using your imagination and wisdom acquired, attempt to create additional lab scenarios such as building a personal home lab environment using virtualization technologies and setting up virtual networks with virtual machines. This will help you to continue learning and exploring new technologies while further developing your skills as an aspiring network professional.

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/a27qd.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The wireless router is connected to the wired LAN via the network switch that’s on the 172.16.1.0/24 network.”

A block of code is set as follows:

*Apr 28, 15:53:58.5353: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “To configure the duplex mode on a Windows operating system, open Device Manager, right-click on the interface, and select Properties | Advanced tab.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share your thoughts

Once you’ve read CompTIA Network+ N10-008 Certification Guide - Second Edition, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

Download a free PDF copy of this book

Thanks for purchasing this book!

Do you like to read on the go but are unable to carry your print books everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters, and great free content in your inbox daily

Follow these simple steps to get the benefits:

Scan the QR code or visit the link below

https://packt.link/free-ebook/9781803236063

Submit your proof of purchaseThat’s it! We’ll send your free PDF and other benefits to your email directly

Part 1: Networking Concepts

In this part, you will be able to understand both the OSI reference model and TCP/IP stack, the purpose of network port numbers, protocols, and network design (topologies). Furthermore, you will be able to understand IP addressing and subnetting, fundamentals of virtualization, and cloud computing technologies.

This part of the book comprises the following chapters:

Chapter 1, Exploring the OSI Model and TCP/IPChapter 2, Network Topologies and ConnectionsChapter 3, Ethernet Technology and VirtualizationChapter 4, Understanding IPv4 and IPv6 AddressingChapter 5, Applied IPv4 SubnettingChapter 6, Exploring Network Protocols and ServicesChapter 7, Data Center Architecture and Cloud Computing

1

Exploring the OSI Model and TCP/IP

As you embark on the journey of acquiring new knowledge and developing your skills as an aspiring network professional, you will be exploring the latest networking technologies and concepts needed by professionals within the networking and Information Technology (IT) industry. The CompTIA Network+ certification is filled with the latest technologies and content for the next generation of network professionals. It ensures learners gain the knowledge and in-demand skills needed to support the network infrastructure that organizations rely upon each day.

As an aspiring network professional, I’m sure you are very eager to dive into the technologies and start looking at network traffic, and even learn about cyber-attacks and network security solutions to help defend organizations from threat actors. However, all great journeys of becoming an expert within a field of study, such as networking, begin with developing a solid foundation and gaining a strong understanding of the fundamentals of network communication.

During this chapter, you will learn about the importance of and the need for using a protocol suite on a network to communicate with devices and share resources. You’ll be exploring each layer of both the Open Systems Interconnection (OSI) and Transmission Control Protocol/Internet Protocol (TCP/IP) networking models, and how all the layers work together to ensure systems can exchange messages over a network. Additionally, you’ll gain fundamental knowledge of how datagrams are encapsulated and de-encapsulated when devices send and receive messages. Lastly, you’ll gain the hands-on skills of exploring the headers and fields found within packets using industry-recognized tools.

In this chapter, we will cover the following topics:

The need for networking modelsExploring the OSI modelUnderstanding TCP/IPData encapsulation conceptsAnalyzing network packets

Let’s dive in!

Technical requirements

To follow along with the exercises in this chapter, please ensure that you have met the following requirement:

Wireshark: https://www.wireshark.org/

The need for networking models

One of the most frequently asked questions from many learners who are starting their journey in the field of networking is, what is a network? A network is defined as having two or more computing devices interconnected, using a set of communication protocols (rules) that allow them to share a resource between themselves. A resource can be anything, such as a file on a centralized server, a multiplayer game on an online server, and even a network-connected printer. Networks are all around us and we use them every day to communicate with each other, share information, and even deliver an online service. The largest network in the world is the internet and every day it is continuously growing as more devices are connecting to it and organizations are joining their networks to the internet.

Important note

In the 1960s, the age before the internet, the US Department of Defense (DoD) provided financial funding to the Defense Advanced Research Projects Agency (DARPA), which allowed computer scientists to start developing a prototype to allow academic institutions such as universities and government-funded research centers to establish a computer network over existing telephone lines. This early generation prototype was known as the Advanced Research Projects Agency Network (ARPANET). However, the ARPANET was unable to support communication as expected and crashed when a user attempted to send an input such as a string of text across the ARPANET. Therefore, the project was dismissed.

While the internet is the largest network in the world, it is not owned by a single person, organization, or government, but various organizations globally have the responsibility of ensuring its sustainability, availability, security, and scalability. The following are important organizations that play key roles on the internet:

Internet Society (ISOC): The Internet Society is a non-profit organization whose mission is to encourage the open development, usage, and evolution of the internet in a way that is beneficial to everyone in the world. You can learn more about the Internet Society on their website at https://www.internetsociety.org. Internet Engineering Task Force (IETF): The IETF is an organization with the responsibility of both developing and promoting internet technical standards such as protocol suites. Simply put, the IETF is responsible for ensuring the internet is a better place for all. You can learn more about the IETF on their website at https://www.ietf.org.Internet Architecture Board (IAB): The IAB is a committee within the IETF that serves as an advisory board for overseeing the internet standards processes and the IETF architectural designs. You can learn more about the IAB on their website at https://www.iab.org.Internet Assigned Numbers Authority (IANA): IANA is responsible for coordinating, distributing, and managing domain names, number resources, and protocol assignments on the internet and networks. Additionally, IANA oversees the Autonomous System Number (ASN) allocation and Domain Name System (DNS) root zone management. You can learn more about IANA on their official website at https://www.iana.org.Internet Corporation for Assigned Names and Numbers (ICANN): ICANN is a non-profit organization that is responsible for the coordination, procedures, and maintenance of both namespaces and numerical spaces on the internet to ensure its stability and security. You can learn more about ICANN on their website at https://www.icann.org.

Imagine a world without computer networks; there would be so many challenges that both organizations and individuals would face each day. Imagine an employee of a company who wants to send a document to an employee of another organization. The traditional method would be to securely package the document with its contents within an envelope and use a courier service for delivery. However, using the internet and email services, the sender can attach the document file within an email message and forward it to the intended destination (recipient); the time it takes the message to be delivered between the sender and the recipient via the internet is highly reduced with the help of networking protocols compared to using traditional courier services.

Within the educational industry, there are many amazing certifications, qualifications, and study programs from various academic institutions around the world. Using the internet, educational institutions can deliver their learning content to students around the globe compared to the traditional on-campus learning method. Companies are also using networking technologies and the internet to extend their products and services beyond traditional borders. To ensure communication between networked devices such as computers works as expected, it’s vital to understand the need for vendor-neutral networking models for intercommunication.

In today’s world, many types of devices connect to our networks compared to traditional computers and servers. Some of these new devices include smart technologies and Internet of Things (IoT) devices such as smartphones and tablets, gaming consoles, and smart electronics and appliances. Connecting computers and IoT devices to a network is a seamless process and everything works as expected. However, back in the 1970s, early computer vendors started developing their proprietary networking models to allow their computers to intercommunicate and share resources over a network. For many organizations, this concept may have worked well if the company had bought computers from a specific computer vendor only. If, in the future, the company decided to purchase computers from another computer vendor, the company would not be able to create a unified network with all the computers from different vendors. This was one of the biggest issues with communication in the early days as each computer vendor developed its own proprietary networking model. As a result, companies would need to create separate networks for each vendor’s device; this concept does not support network scalability for a growing company. This intercommunication issue led to the development of a common networking model that allows different devices to communicate over a network.

In the 1970s, the International Organization for Standardization (ISO) took the initiative on developing the OSI networking model for computer networks. The OSI model was designed to be a common standard for using networking protocols (rules) to allow intercommunication between devices that are connected over a network. However, the OSI model didn’t have the traction needed to be implemented as a networking protocol suite within systems. At the same time during the 1970s, the US DoD also started working on developing a vendor-neutral protocol suite for intercommunication across computer networks; this protocol suite included the research and efforts of many organizations, such as universities and government agencies, to develop the networking protocols that made up the protocol suite we all know today as TCP/IP.

Important note

A network protocol is simply the rules and guidelines that are used by a device to allow communication or the exchange of messages from one device to another. There are many network protocols, each of which has a different purpose and characteristic. During this book, you will discover and learn about their functionalities and use cases.

In the 1980s and 1990s, organizations began implementing computer systems that supported various networking models such as those that were proprietary to specific computer vendors and even TCP/IP within their companies. As mentioned previously, companies experienced the challenge of interconnecting computers that used different networking models from computer vendors. Eventually, by the early 2000s, vendors had started to fully adopt and implement TCP/IP as the preferred network protocol suite to allow intercommunication between devices from different vendors. Hence, TCP/IP is considered to be the universal language of communication within the networking industry.

Important note

AppleTalk was a short-lived proprietary networking model created by Apple in 1985 and was used on Apple devices until 1995, when the TCP/IP protocol suite was adopted. Another short-lived networking model was Novell NetWare, a proprietary model created by Novell back in 1983 using the Internetwork Packet Exchange (IPX) networking protocol until 1995, when TCP/IP was adopted.

Having completed this section, you have gained an understanding of the importance of using a networking model to ensure devices can successfully communicate with one another over a network. In the next section, we will explore the roles and responsibilities of each layer of the OSI model.

Exploring the OSI model

The OSI model was originally developed to be an open networking model for computer networks to allow different devices to use a set of mutual protocols (rules) to allow communication between each other over a network. While the OSI model is commonly described as a reference model because it’s not technically implemented on any networked devices such as computers, servers, or networking devices, networking professionals still use its terminology during their discussions and when writing documentation and publications. Therefore, as aspiring networking professionals within the industry, it’s vital to gain a solid understanding of the characteristics and functionality of each layer within the OSI model.

The OSI model contains a total of seven layers that describe how communication occurs between one device and another over a network. Each layer of the OSI model has a unique role and responsibility to ensure a message from a sender contains all the necessary details to be successfully delivered to the intended destination. Imagine the challenges that would exist if networking models did not exist. Imagine writing a letter to a friend and posting it via the postal service with the hope it will be successfully delivered to the destination. However, if the address information is incorrect on the envelope, the postal service may have difficulties locating the destination. If the contents of the message are not correctly formatted or structured, the recipient of the message will not be able to clearly understand the contents. Similarly, on a network without a networking model or protocols, computers will have challenges ensuring their messages are delivered to their destination and that the contents of the messages are properly formatted and structured. Hence, the OSI model is a seven-layered networking model that contains the protocols (rules) and guidelines on how systems can communicate over a network.

The following diagram shows the seven layers of the OSI model:

Figure 1.1 – OSI model

As shown in the preceding diagram, the seven layers of the OSI model are in the following order:

ApplicationPresentationSessionTransportNetworkData LinkPhysical

At each layer of the OSI model, when a message exists at a specific layer, the message is commonly referred to as a Protocol Data Unit (PDU). A PDU is simply described as a single unit of data/information that can be transmitted from one host to another over a network. As the PDU is created at the Application layer of the OSI model of the host, it is referred to as data, which is the raw message. As the PDU travels down the OSI model, each of the lower layers is responsible for attaching additional information within a header onto the PDU to ensure proper addressing details are inserted to deliver the message. This process is commonly referred to as encapsulation. When a host on the network receives the message, the PDU travels upward on the OSI model, where each layer de-encapsulates the message, removing the header information until the raw message is delivered to the Application layer on the recipient device.

The following diagram shows an overview of the process of sending and receiving a message between two devices using the OSI model:

Figure 1.2 – Sending and receiving messages

As shown in the preceding diagram, when the computer sends a message, the message is created at the Application layer of the OSI model and works its way down the stack to the Physical layer. When the server receives the message through the network, the message is sent across the Physical layer and enters the Data Link layer before moving upward to the Application layer of the server.

Furthermore, the upper layers of the OSI model, such as the Application, Presentation, and Session layers, are designed to provide support for the application’s functionality; in other words, they are designed to ensure the datagram (raw message) that’s created by the sender can be transmitted across the network between the sender and receiver. The lower layers of the OSI model, such as the Transport, Network, Data Link, and Physical layers, focus on inserting the addressing information needed to deliver the datagram to the destination. Simply put, you can think of the lower layers as having the responsibility of ensuring end-to-end connectivity between hosts over a network.

Over the next few subsections, you will gain an in-depth understanding of the roles and responsibilities of each layer of the OSI model and how they help devices, such as computers, exchange messages between themselves and another host.

Application layer

The Application layer is the layer that is the closest to the end user, such as yourself. This layer provides an interface so that you can run the applications of a host such as a computer or even a smartphone to communicate with the underlying network protocols of the OSI model. To gain a better understanding of the responsibility and importance of the Application layer, imagine you’re interested in visiting the CompTIA website to learn more about the examination details of the CompTIA Network+ N10-008 certification. A typical user will simply open their favorite web browser application and use their preferred search engine to find CompTIA’s official website at www.comptia.org. Once the user clicks on the Uniform Resource Locator (URL) address, within a couple of seconds, the website downloads onto your device and the web browser renders the web language into something understandable to humans.

The following screenshot shows a standard web browser using HTTPS as the Application layer protocol to communicate with the CompTIA web server:

Figure 1.3 – Observing an Application layer protocol

While this process seems very simple and works well, there are a lot of underlying network protocols that work together to ensure your computer can access the internet and view the website. The end device, such as your computer or even smartphone, has an operating system that allows you to interact with the hardware components of your device to perform tasks. As a user, we generally install additional applications onto our operating system to add new functionality compared to the core functions and features that are present on the bare version of the operating system. Installing a web browser on your computer allows your operating system to interact with the Hypertext Transfer Protocol (HTTP) and Hypertext Transfer Protocol Secure (HTTPS) protocols. These are two examples of Application Layer protocols that allow you to interact/interface with web services on a network. Another example is using an email application such as Microsoft Outlook or Thunderbird running on your local computer to interact/interface with the Simple Mail Transfer Protocol (SMTP), an application layer protocol that is responsible for sending email messages over a network.

Each application layer protocol creates a datagram (raw message) or PDU that can only be interpreted by the same application layer protocol that created it. Simply put, a PDU created by HTTPS can only be interpreted by HTTPS and not another application protocol such as SMTP. As you may recall, a protocol is a rule that allows communication between devices over a network. Therefore, each protocol uses its own set of rules and structure for creating a PDU. At the Application layer, the PDU contains only the raw data created by the application layer protocol and does not have any addressing information needed to be delivered to the intended recipient. At the Application layer, the PDU is known as Data. Once the application layer protocol finishes its task of creating the PDU, it passes it down to the next layer, which is the Presentation layer.

Presentation layer

While the application layer protocols of the Application layer create system-dependent data (for example, ASCII or JPEG), the Presentation layer transforms it into an independent format. The PDU is then sent to lower layers to address the receiving system. This allows the Presentation layer on the receiving system to transform the data back into the system-dependent format (ASCII or JPEG) that the Application layer requires.

To gain a better understanding of the Presentation layer, imagine writing a letter to your friend. If you don’t use the proper format of putting the destination delivery address and your sender’s address on the external envelope, the postal service may experience some challenges when attempting to deliver the letter to the correct postal address. Overall, the Presentation layer ensures the PDU is formatted in a way that it will be supported by the lower layers of the OSI model and work on the actual network. Hence, it’s important to ensure the PDU from the Application layer is formatted properly. At this layer of the OSI model, the PDU is still known as Data.

The following are the main responsibilities of the Presentation layer:

Data formatting (encoding)Data compressionData encryption Data decryption

Once the Presentation layer finishes its task of formatting, encoding, and/or encrypting the PDU, it is sent down the OSI model stack to the next layer, known as the Session layer.

Session layer

Before a host can send a message to another host over a network, the sender needs to establish a logical session between itself and the destination device. The Session layer is responsible for ensuring that the devices across a network can create or establish a session between the sender and receiver. The Session layer is also responsible for maintaining the logical session (connection) between the hosts over the network. This allows each device to transmit their messages between themselves for the duration of the session. Lastly, the Session layer is responsible for terminating the logical session (connection) when both the sender and receiver are no longer communicating with each other. If the session is terminated during data transmission between the two hosts over the network, all data transmission will cease (stop) as well.

The following are the core functions of the Session layer:

Create/establish a sessionMaintain the sessionTerminate a session

While the PDU exists within the Session layer, it is commonly referred to as Data. Once the Session layer completes its task, the PDU is sent down to the next layer within the networking model, known as the Transport Layer.

Transport layer

Networked devices such as computers, servers, and smart devices send and receive messages between each other very frequently and everything works well. Imagine if a client device such as a computer is requesting the web page from a web server on the internet. What occurs within the OSI model? At the Application layer of the client device, the HTTP application layer protocol of the OSI model creates an HTTP GET message to request the web page from the web server. Keep in mind that the Application layer is not responsible or concerned about how the data is delivered over the network. The data from the application layer protocol such as HTTP is sent down to the Transport layer.

Important note

In the TCP/IP protocol suite, the Transport layer is responsible for delivering the message between the Application layer and the network.

The Transport layer assigns a service port number to the PDU so that the receiving system will know how the Presentation layer should interpret and format the data. Then, the receiving system can read the data in the Application layer.

The following diagram shows a high-level visual representation of the client using HTTP to communicate with the same application layer protocol on the web server:

Figure 1.4 – Application layer protocol communication

The Transport layer ensures datagrams are delivered to the correct application layer protocol by assigning service port numbers to the PDU. Within an operating system that supports TCP/IP, there are 65,535 service port numbers.

The following diagram shows how these ports are categorized:

Figure 1.5 – Service port ranges

The service ports that exist within the range of well-known ports belong to the application layer protocols, which are very common on a network. Some of these common application layer protocols are HTTP, HTTPS, and SMTP. The registered port range belongs to users and organizations who have officially registered a service port number to operate on a custom build application or software. The private/dynamic range belongs to service ports that are temporarily used during communication, such as using a randomly generated service port on the sender’s device as the source port.

While many people will think these ports are physical ports or interfaces on a device, these service ports are logical ports within an operating system. The service ports are the logical entry, while the exit ports on a system are used as doorways for sending and receiving datagrams on a network. You can think of a service port as a traditional airport that is used as a port of entry and exit of a country via air travel. Each service port number is logically mapped to an application layer protocol, so the Transport layer assigns the source and destination service port numbers to the PDU when it’s received from the Application layer.

The following is a brief list of common application layer protocols and their corresponding service ports numbers:

Figure 1.6 – Common application layer protocols

Using the same analogy from earlier, the Application layer on the client device sends the datagram to the Transport layer; the Transport layer encapsulates (inserts) a layer 4 header onto the datagram that contains both the source and destination service port numbers. Once the layer 4 header is added to the datagram from the Application layer, the PDU is referred to as a segment.

The following diagram shows a segment at the Transport layer containing a source and destination service port number with the data received from the application layer protocol:

Figure 1.7 – Segment

As shown in the preceding diagram, the layer 4 header contains the source and destination service port numbers. The Data field contains the data received from the upper layer, such as the Application layer. The source service port number is a randomly generated number between 49,152 and 65,535. Since the source service port number is randomly generated by the operating system of the sender device, it is also referred to as an ephemeral port number. The source port number is important on the datagram as it informs the recipient about the sender’s return address, similar to putting the return address information on a traditional letter. The destination service port number is inserted into the datagram, which informs the destination device about which application layer protocol to deliver the message to. For example, if the client is sending an HTTP message from itself to a web server on the internet, the Transport layer of the client device will insert a randomly generated source port number such as 49,161 and set the destination service port as 80. It uses port 80 since the application layer protocol on the destination device (web server) is running a web service that uses HTTP and HTTP uses service port 80 by default.

The following diagram shows a visual representation of the client sending a message to the web server that is running HTTP as the application layer protocol on service port 80:

Figure 1.8 – HTTP Request message

The following diagram shows the addressing information used by the web server to respond to the client on the network:

Figure 1.9 – HTTP Response message

As shown in the preceding diagram, the Transport layer ensures the correct source and destination services ports are assigned to the HTTP Request and HTTP Response messages. As you have learned thus far, the Transport layer is all about transporting/delivering the messages from one device to another while ensuring the datagrams are delivered to the appropriate application layer protocol on the destination device.

Thus far, we have focused a lot on understanding how service port numbers play a vital role in communication over a network. However, the Transport layer contains two protocols that assist with transporting and delivering datagrams over the network. These Transport layer protocols are as follows:

Transmission Control Protocol (TCP)User Datagram Protocol (UDP)

As mentioned earlier, the application layer protocols are not responsible for or concerned about the delivery of messages from a sender to a receiver over the network. Hence, the Transport layer uses either TCP or UDP to ensure the messages from the Application layer of the OSI model are delivered to the destination host. The service ports on a system can use either TCP or UDP for communication over a network. Over the next couple of subsections, you will learn about the similarities and differences between TCP and UDP.

Transmission Control Protocol

The Transmission Control Protocol (TCP) is a connection-oriented protocol that establishes a logical connection between the source and destination devices before exchanging messages over a network. This connection is commonly referred to as the TCP three-way handshake.

The following diagram shows a high-level overview of the TCP three-way handshake between two devices:

Figure 1.10 – TCP three-way handshake

The following is a breakdown of this process:

The client device wants to communicate with the server, so the client device sends a synchronization (SYN) message to the server. The SYN message is used to initiate a connection with the server. Within the SYN message, a randomly generated sequence number is created. This is used to indicate the beginning or starting sequence number for the data that will be transmitted from the client, as shown in the following diagram:

Figure 1.11 – SYN sequence number

The server receives the SYN message from the client and the server responds with an acknowledgment (ACK) message. Within the ACK message is an ACK sequence number; this number is the client’s sequence number + 1. The server also includes a SYN message within its response, containing a randomly generated sequence number to inform the client it also wants to initiate a connection; this message is known as a SYN/ACK, as shown in the following diagram:

Figure 1.12 – SYN/ACK sequence number

The client receives the SYN/ACK message from the server and responds with an ACK message. The ACK message from the client contains an increment value of the SYN message received from the server, as shown in the following diagram:

Figure 1.13 – ACK sequence number

Keep in mind that a device will respond with an ACK message for each SYN message it receives over a network. The following diagram shows a more technical representation of the TCP three-way handshake as it occurs between two devices over a network, including randomly generated sequence numbers:

Figure 1.14 – TCP three-way handshake with sequence numbers

Using a network protocol analyzer tool such as Wireshark, network professionals can perform packet analysis on their network infrastructure and analyze the network traffic. The following screenshot shows the TCP three-way handshake captured using Wireshark on a real network:

Figure 1.15 – Wireshark capture

As shown in the preceding screenshot, packet #1 shows a sender, 192.168.0.2, sending a TCP SYN message that has a SYN sequence number of 0 to a destination device with an IP address of 192.168.0.1. Next, packet #2 indicates the device with the IP address of 192.168.0.1 responds with a SYN/ACK message that contains a SYN sequence number of 0 and an ACK sequence number of 1. Lastly, packet #3 indicates that the device with an IP address of 192.168.0.2 responds with an ACK message that contains an ACK sequence number of 1.

Important note

The sequence numbers used by TCP allow a destination device to easily reassemble incoming messages if they are received out-of-order compared to the order they were sent onto the network.

Once a TCP three-way handshake has been established, both hosts will begin sending messages to each other. When a client sends a message to another device using TCP as the Transport layer, the receiver of the message responds with an ACK packet to the sender. The ACK packet confirms the message was delivered successfully. If the sender does not receive an ACK packet from the intended destination host, after a while, the sender will attempt to retransmit the same message, repeating the process to ensure the message is delivered successfully. This is another benefit of using TCP when communicating over a network as it provides guaranteed delivery of messages and retransmits messages when needed.

When both hosts are no longer transmitting data between themselves over the network, TCP will attempt to gracefully tear down/terminate the connection using a four-step process, as shown here:

Figure 1.16 – TCP terminating a connection

As we can see, the client sends a FINISH (FIN) message to the server, indicating it no longer wants to maintain the session. The server responds with an ACK message to the client, indicating it is acknowledging that the client wants to terminate the connection. The server also sends a FIN message to the client to indicate it no longer wants to send any data. The final message is sent from the client – an ACK message – to confirm the termination.

The following are the benefits of using TCP as a transport layer protocol:

Establishes a session such as the TCP three-way handshake before exchanging data.Provides reliability in delivering data over a network.Delivers data using the same order of delivery from the sender to the receiver.Uses flow control by creating a window size that has been mutually agreed upon between the source and destination hosts. The flow control window size determines the amount of data that can be sent at a time between the hosts.

While there are many benefits to using TCP as the preferred transport layer protocol, there are many disadvantages, such as the following:

There is more overhead on a network when using TCP as the Transport layer protocol. For each message delivered to a destination device, the receiver responds with an ACK message.When a host is sending multiple messages to another host over a network, the messages are not sent all at once. TCP creates a logical window size between the source device and destination device that determines how much data can be sent at a time. TCP will send several messages within the TCP window and wait for acknowledgment messages from the receiver before sending more data. This creates a delay in the delivery of the messages.

In the next section, we will learn about the characteristics of another Transport layer protocol, the User Datagram Protocol (UDP).

User Datagram Protocol

UDP is another Transport layer protocol that assists with delivering messages between devices over a network. Unlike TCP, UDP is a connectionless protocol that does not establish a logical connection between the source and destination devices. Being a connectionless protocol, UDP does not provide any guarantee of delivery of messages over a network, so if any messages are corrupted or discarded, UDP does not attempt to retransmit those messages. UDP does not provide any acknowledgments when messages are delivered, so the sender does not know whether the messages were delivered to the destination host or not. This makes UDP an unreliable Transport layer protocol within the networking model.

When using UDP as the preferred Transport layer protocol, the sender device does not use sequence numbers. As quickly as the datagrams from the Application layers are being sent down to the Transport layer, the Transport layer uses UDP and quickly places the datagrams on the actual network without adding any sequencing information. Therefore, when a destination host receives incoming messages over the network, there is no way to determine how to properly reassemble the messages in their correct order.

While TCP may seem to always be the preferred Transport layer protocol, UDP has some advantages, such as the following:

Since UDP does not wait for any acknowledgment from the destination host, clients can send messages faster across the network to the destination devices. It is beneficial for application layer protocols that are time-sensitive such as Voice over IP (VoIP) and Video over IP solutions that are used in real time.Low overhead on the network since no acknowledgment messages are returning to the sender.UDP is commonly used with application layer protocols, which are not dependent on delivery or require acknowledgment.UDP is commonly used when applications have more efficient means of guaranteeing delivery of data and do not want the additional overhead TCP requires.

Once the Transport layer inserts its layer 4 header onto the datagram using TCP or UDP, it sends the segment down to the next layer on the OSI model. In the next section, we will learn about the role and functionality of the Network layer within the OSI model.

Network layer

The Network layer of the OSI model is responsible for ensuring the logical addressing information is inserted into the datagram. On a network, each device requires a unique Internet Protocol version 4 (IPv4) or Internet Protocol version 6 (IPv6) address that allows them to communicate with devices on their local and remote networks. The Network layer encapsulates a layer 3 header onto the datagram by inserting the source and destination IP addresses of the sender and destination host. Without inserting the source IP address onto the datagram, the recipient of the message will not be able to return any messages. Without including a destination IP address in the message, networking devices such as routers will not know how to forward the message to its intended destination. Once the PDU from the Transport layer is encapsulated with the layer 3 header, it is referred to as a Packet.

The following diagram shows a high-level overview of a client sending a message to a server:

Figure 1.17 – Packet header

As shown in the preceding diagram, the packet contains a source IP address of 192.168.1.10, which belongs to the client device, and a destination IP address of 192.168.1.100, which belongs to the web server.

Additionally, the Network layer is responsible for the routing services that occur on the network. Devices such as routers are considered to be layer 3 devices that can interconnect different networks and forward packets between networking using the information within the layer 3 header of the packet, such as the destination IP address. Between a sender and receiver, there may be multiple routers and paths, and each time a router on the network receives a packet, it checks the destination IP address within the layer 3 header of the packet and the routing table on the router to determine whether a valid route to the destination exists. Therefore, a sender must insert the accurate layer 3 addressing (IP addresses) onto the layer 3 header of the packet to ensure networking devices such as routers can forward the packet to the intended destination.

Important note

The source IPv4 address on a packet may change due to the Network Address Translation (NAT) operating on a router. We will discuss the processes and needs of using NAT later in this book.

Internet Protocol (IP) is a connectionless layer 3 protocol that does not establish any logical connection or session between the sender and receiver of the message. Being connectionless simply means the IP will not create a dedicated, logical end-to-end session/connection before sending any data between the source and destination hosts over a network. Therefore, if packets are lost or corrupted during the transmission process, the messages are not retransmitted. Additionally, being connectionless does not notify the intended recipient about any incoming data/messages from a sender.

As the IP is a connectionless layer 3 protocol, it uses its best effort when transmitting data between sender and receiver devices over a network. Since it does not establish any end-to-end connections, it is unreliable and does not provide any guarantee that the data will be delivered to the destination host. However, it provides low overhead on the network as a connectionless protocol. Lastly, the IP indicates to the Transport layer whether or not to use the TCP, UDP, or other protocols in its header information. For example, if the data requires connection-oriented delivery, the IP will indicate TCP.

Important note

The operation of the IP is independent of the type of medium being used to transmit the data, such as wired, wireless, or even fiber optics. The lower layers, such as the Data Link layer of the OSI model, are responsible for ensuring the packets are prepared for the type of medium before they’re placed on the actual network. The Maximum Transmission Unit (MTU