NetworkingBasics Incomp
NetworkingBasics Incomp
Course notes taken from Networkin Basics course from personal study
By
Link
2024
March
Contents
1 Communication in a Connected World 3
1.1 Network Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.1 Local Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2 Internet vs Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Data Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 Common Methods of Data Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Bandwidth and Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.1 Bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3.2 Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3 Network Components 10
3.1 ISP Connectivity Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1 Cable and DSL Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
5 Communication Principles 16
5.1 Communication Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Communication Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Network Communication Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.3.1 The TCP/IP Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.3.2 The OSI Reference Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3.3 OSI Model and TCP/IP Model Comparison . . . . . . . . . . . . . . . . . . . . . . . . 21
1
8 IPv4 and Network Segmentation 28
8.1 IPv4 Unicast, Broadcast, and Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.1.1 Unicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.1.2 Broadcast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.1.3 IPv4Multicast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.2 Types of IPv4 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.2.1 Public and Private IPv4 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
8.2.2 Routing to the Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2.3 Special Use IPv4 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8.2.4 Legacy Classful Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.2.5 Assignment of IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
8.3 Network Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.3.1 Broadcast Domains and Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
8.3.2 Problems with Large Broadcast Domains . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.3.3 Reasons for Segmenting Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Contact: [email protected]
2
1 Communication in a Connected World
1.1 Network Types
• Small Home Network: Small home networks connect a few computers to each other and to the
internet.
• Small Office and Home Office Networks: The SOHO network allows computer in a home office
or a remote office to connect to a corporate network, or access centralizes, shared resources.
• Medium to Large Networks: Are network type such as those used by corporations and schools, can
have many locations with hundreds or thousands of interconnected hosts.
• World Wide Network: The internet is a network of networks that connects hundreds of millions of
computer word-wide.
• Ethernet: Ethernet Ethernet is a term for a local area network (LAN). A LAN is made up of two
or more devices connected within a physical location. For example, if you work in an office, all the
computers within the building are likely connected to a LAN. Within your home, your cellphone, tablet,
computer and any other devices that connect to your modem and router using the same IP address
are also considered a LAN.
3
• Internet: Internet is the term for the worldwide network (WAN) that connects all computer systems.
“The internet is a global network of computers that works much like the postal system, only at sub-second
speeds. Just as the postal service enables people to send one another envelopes containing messages, the
internet enables computers to send one another small packets of digital data”, according to the BBC.
4
Physical media properties, current technologies, and the laws of physics all play a role in determining available
bandwidth.
The following table shows the commonly used units of measure for bandwitdh:
1.3.2 Throughput
Like bandwidth, throughput is the measure of the transfer of bits across the media over a given period of
time. However, due to a number of factors, throughput does not usually match the specified bandwidth.
Many factors influence throughput including:
• The amount of data being sent and received over the connection,
• The types of data being transmitted,
• The latency2 created by the number of network devices encountered between source and destination.
Throughput measurements focus solely on the speed or volume of data transfer without considering whether
the transmitted data is correct, relevant, or useful. In other words, it’s about the quantity of data moving
through the network, not necessarily the quality or significance of that data.
Not all data packets transmitted trough a network are intended for end-user applications or human consump-
tion. Instead, some messages are specifically for managing and maintaining the network itself 3 .
In summary, while users interact with applications and services over the network, there’s also a layer of
behind-the-scenes communication dedicated to managing the network itself, which includes handling control
messages for traffic regulation and error correction.
Note that
2 Latency refers to the amount of time, including delays, for data to travel from one given point to another.
3 For instance, network control messages are used to regulate traffic flow, manage network resources, and correct errors that
occur during transmission. These messages facilitate the smooth operation and optimization of the network infrastructure,
ensuring that data packets are routed efficiently and any issues are addressed promptly.
5
In an internetwork or network with multiple segments, throughput cannot be faster than the slowest link of
the path from sending device to the receiving device. Even if all or most of the segments have high bandwidth,
it will only take one segment in the path with lower bandwidth to create a slowdown of the throughput of
the entire network.
In summary the difference between bandwidth and throughput is that bandwidth is the maximum amount
of data that the network can transmit while throughput is the actual amount of data transmitting through
the network.
6
2 Network Components, Types, and Connections
Client and server software usually run on separate computers, but it is also possible for one computer to run
both client and server software at the same time. In small businesses and homes, many computers function
as the servers and clients on the network. This type of network is called a peer-to-peer (P2P) network.
The simplest P2P network consists of two directly connected computers using either a wired or wireless
connection. In this case, both computers acts as either a client and hosts to exchange data and services with
7
each other.
Multiple PCs can also be connected to create a larger P2P network, but this requires a network device, such
as a switch, to interconnect the computers.
The main disadvantage of a P2P environment is that the performance of a host can be slowed down if it is
acting as both a client and a server at the same time.
In larger businesses, because of the potential for high amounts of network traffic, it is often necessary to have
dedicated servers to support the number of service requests.
The advantages of P2P networking is:
• Easy to set up
• Less complex
• Lower cost because network and dedicated servers may not be required
• can be used for simple tasks such transferring files and sharing printers
• All devices may act as both clients and server which can slow their performance
A text message by network app is a example of a P2P application. In this case the application reqyured that
each end device provide a user interface while run a background service.
8
2.1.3 Multiple Roles in the Network
A computer with server software can provide services simultaneously to one or many clients, as shown in the
figure.
A computer can also run multiple types of client software, what allows it to connect to a multiple servers at
the same time.
9
3 Network Components
The network infrastructure contains three categories of hardware components, as shown in the figure:
• End devices
• Intermediate devices
• Network media
Devices and media are the physical elements, or hardware, of the network. Hardware is often the visible
components of the network platform such as a laptop, PC, switch, router, wireless access point, or the cabling
used to connect the devices. Occasionally, some components may not be so visible. In the case of wireless
media, messages are transmitted through the air using invisible radio frequencies or infrared waves.
Devices that form the interface between users and the underlying communication network are called end
devices. Some examples of end devices is:
• Computers (workstations, laptops, file servers, web servers)
• Network printers
• Telephones and teleconferencing equipment
• Security cameras
10
• Mobile devices (such as smart phones, tablets, PDAs, and wireless debit/credit card readers and barcode
scanners)
And end device (or host) is either a source or destination of a message transmitted over the network. Adresses
are used to identify the host. When a host initiates communication, it uses the address of the destination
host to specify where the message should be sent.
• Cable: Typically offered by cable television service providers, the internet data signal is carried on the
same coaxial cable that delivers cable television. It provides a high bandwidth, always on, connection
to the internet. A special cable modem separates the internet data signal from the other signals carried
on the cable and provides an Ethernet connection to a host computer or LAN.
• Digital Subscriber Line (DSL): Provides a high bandwidth, always on, connection to the internet.
It requires a special high-speed modem that separates the DSL signal from the telephone signal
11
and provides an Ethernet connection to a host computer or LAN. DSL runs over a telephone line, with
the line split into three channels:
1. Used for voice telephone calls
2. A faster download channel
3. Used for sending or uploading information. This channel is usually slightly slower than the down-
load channel.
The quality and speed of the DSL connection depends mainly on the quality of the phone line and the distance
from the central office of your phone company. The farther you are from the central office, the slower the
connection.
12
4 Build a Home Network
• Ethernet Ports: These ports connect to the internet switch of the router. These ports are usually
labeled "Ethernet" or "LAN". All devices connected to the switch ports are on the same
network (same private IP address range.
• Internet Port: This port is used to connect the device to another network. The internet port connects
the router to a different network than the Ethernet ports. This port is often used to the cable or DSL
modem in order to access the internet.
In addition to the wired ports, many home routers include a radio antenna and a built-in wireless access
point. By default, the wireless devices are on the same local network as the devices that are physically
plugged into the LAN switch ports. The internet port is the only port that is on a different network in the
default configuration.
• Category 5e Cable: Category 5e is the most common wiring used in a LAN. The cable is made up
of 4 pairs of wires that are twisted to reduce electrical interference.
13
• Coaxial Cable: Coaxial cable has an inner wire surrounded by a tubular insulating layer, that is then
surrounded by a tubular conducting shield. Most coaxial cables have an external insulating sheath or
jacket.
• Fiber-Optic Cable: Fiber-optic cables can be either glass or plastic with a diameter about the same
as a human hair and it can carry digital information at very high speeds over long distances. Fiber-optic
cables have a very high bandwidth, which enables them to carry very large amounts of data.
14
• Network mode: Determines the type of technology that must be supported. For example, 802.11b,
802,11g, 802.11n or Mixed Mode.
• Network Name (SSID5 ): Used to identify the WLAN. All devices that wish to participate in the
WLAN must have the same SSID.
• Standard channel: Specifies the channel over which communication will occur. By default, this is
set to Auto to allow the access point (AP) to determine the optimum channel to use.
• SSID Broadcast: Determines if the SSID will be broadcast to all devices within range. By default,
set to Enabled.
Network Mode:
The 802.11 protocol can provide increased throughput based on the wireless network environment. If all
wireless devices connect with the same 802.11 standard, maximum speeds can be obtained for that standard.
If the access point is configured to accept only one 802.11 standard, devices that do not use that standard
cannot connect to the access point.
A mixed mode wireless network environment can include mixed standards to allow connection of old devices
that cannot support latest standads.
The SSID is a case-sensitive, alphanumeric string that contains up to 32 characters. It is sent in the header
of all frames transmitted over the WLAN. The SSID is used to tell wireless devices, called wireless stations
(STAs), which WLAN they belong to and with which other devices they can communicate.
• What should my network be called? Before entering the configuration utility, or manually con-
figuring the router through a web browser, you should consider how your network will be used. You
do not want to configure the router and have that configuration limit what you are able to do on the
network, nor do you want to leave your network unprotected.
• What type of devices will attach to my network? Wireless devices contain radio/receivers that
function within a specific frequency range. If a device only has the necessary radio for 802.11 b/g, it
will not connect if the wireless router or access point is configured to only accept 802.11n or 802.11ac
standards. If all devices support the same standard, the network will work at its optimum speed. If you
have devices that do not support the n or ac standards, then you will have to enable legacy mode6 . A
legacy mode wireless network environment varies between router models but can include a combination
of 802.11a, 802.11b, 802.11g, 802.11n, and 802.11ac. This environment provides easy access for legacy
devices that need a wireless connection.
• How do I add new devices? The decision regarding who can access your home network should be
determined by how you plan to use the network. On some wireless routers, it is possible to set up guest
access. This is a special SSID coverage area that allows open access but restricts that access to using
the internet only.
15
5 Communication Principles
16
Protocol Characteristic Description
• Assists in protocol design, because protocols that operate at a specific layer have defined information
that they act upon and a defined interface to the layers above and below.
• Fosters competition because products from different vendors can work together.
• Enables technology changes to occur at one level without affecting the other levels.
• Provides a common language to describe networking functions and capabilities.
The first layered model for internetwork communications was created in the early 1970s and is referred to as
the internet model. It defines four categories of functions that must occur in order for communications to be
successful. The suite of TCP/IP protocols that are used for internet communications follows the structure
17
of this model, as shown in the table. Because of this, the internet model is commonly referred to as the
TCP/IP model.
18
In a simple way:
• Application: Represents data to the user, plus encoding and dialog control.
• Transport: Supports communication between various devices across diverse networks.
• Internet: Determines the best path through the network.
• Network access:Controls the hardware devices and media that make up the network.
• Protocol model: This model closely matches the structure of a particular protocol suite. A protocol
suite includes the set of related protocols that typically provides all the functionality required for people
to communicate with the data network. the TCP/IP model is a protocol model because it describes
the functions that occur at each layer of protocols within the TCP/IP suite.
• Reference model: This type of model describes the functions that must be completed at a particular
layer, but does not specify exactly how a function should be accomplished. A reference model is not
intended to provide a sufficient level of detail to define precisely how each protocol should work at each
layer. The primary purpose of a reference model is to aid in clearer understanding of the functions and
processes necessary for network communications.
The most widely known internetwork reference model was created by the Open Systems Interconnection
(OSI) project at the International Organization for Standardization (ISO). It is used for data network design,
operation specifications, and troubleshooting. This model is commonly referred to as the OSI model.
The relationship between OSI Model and TCP will be explained soon, for now, the OSI model layer are:
19
TCP Layer OSI Layer Description Protocols
The application layer contains protocols
used for process-to-process communication.
It includes protocols like HTTP for web
Application 7 - Application HTTP, SMTP, FTP, DNS
browsing, SMTP for email, FTP for file
transfer, and DNS for domain name reso-
lution.
The presentation layer provides for common
representation of the data transferred be-
tween application layer services. Protocols
Application 6 - Presentation SSL, TLS, ASCII, JPEG
like SSL and TLS ensure secure communi-
cation, while ASCII and JPEG define data
formats.
The session layer provides services to the
presentation layer to organize its dialogue
Application 5 - Session and to manage data exchange. Protocols NetBIOS, RPC, PPTP
like NetBIOS, RPC, and PPTP handle ses-
sion management and control.
The transport layer provides services to ex-
change the individual pieces of data over
the network between identified end devices.
Transport 4 - Transport TCP ensures reliable, ordered delivery (e.g., TCP, UDP
web browsing), while UDP provides connec-
tionless, unreliable delivery (e.g., stream-
ing).
The network layer is responsible for rout-
ing and forwarding of data packets between
Internet 3 - Network different networks. Protocols like IP (Inter- IP, ICMP, OSPF
net Protocol) provide addressing and rout-
ing capabilities.
The data link layer protocols describe meth-
ods for exchanging data frames between de-
Network Access 2 - Data Link vices over a common media. Protocols like Ethernet, PPP, HDLC
Ethernet, PPP, and HDLC handle framing
and error detection/correction.
The physical layer protocols describe the
mechanical, electrical, functional, and pro-
cedural means to activate, maintain, and
Network Access 1 - Physical deactivate physical connections for bit Ethernet, Wi-Fi, Bluetooth
transmission to and from a network device.
Protocols like Ethernet, Wi-Fi, and Blue-
tooth handle physical transmission media.
20
Figure 11: OSI Model Layer resume
21
Figure 12: OSI model and TCP/IP model comparison - Cisco Networking Academy.
The protocols that make up the TCP/IP protocol suite can be described in terms of the OSI reference model.
The functions that occur at the internet layer in the TCP/IP model are contained in the network layer of
the OSI Model, as shown in the figure. The transport layer functionality is the same between both models.
However, the network access layer and the application layer of the TCP/IP model are further divided in
the OSI model to describe discrete functions that must occur at these layers. The key similarities are in
the transport and network layers; however, the two models differ in how they relate to the layers above and
below each layer:
• OSI Layer 3, the network layer, maps directly to the TCP/IP internet layer. This layer is used to
describe protocols that address and route messages through an internetwork.
• OSI Layer 4, the transport layer, maps directly to the TCP/IP transport layer. This layer describes
general services and functions that provide ordered and reliable delivery of data between source and
destination hosts.
• The TCP/IP application layer includes several protocols that provide specific functionality to a variety
of end-user applications. The OSI model Layers 5, 6, and 7 are used as references for application
software developers and vendors to produce applications that operate on networks.
• Both the TCP/IP and OSI models are commonly used when referring to protocols at various layers.
Because the OSI model separates the data link layer from the physical layer, it is commonly used when
referring to these lower layers.
22
6 The Access Layer
6.1 Encapsulation and the Ethernet Frame
6.1.1 The fields of Ethernet Frame
Ethernet is technology commonly used in local area networks7 The Ethernet Protocol operates on OSI model
layer 2. Devices access Ethernet LAN using an Ethernet Network Interface Card (NIC). Each Ethernet
NIC has a unique physical address permanently embedded on the card know as a Media Access Control
(MAC) address. The MAC address for both the source and destination are fields in an Ethernet frame.
In short terms, an Ethernet frame is a structure unit of data transmitted over an Ethernet network. it
consists of a header, data payload, and a trailer8 . The header includes source and destination MAC addresses,
protocol information, and error-checking data. The data payload contains the actual information being
transmitted, while the trailer typically includes a checksum for error detection. Ethernet frames facilitate
the reliable transmission of data between devices on a network.
Lets check the Ethernet Frame:
23
6.1.2 Encapsulation
When sending a letter, the letter writer uses an accepted format to ensure that the letter is delivered and
understood by the recipient. The process of placing one message format (the letter) inside another message
format (the envelop) is called encapsulation. De-encapsulation occurs when the process reversed by the
recipient and the letter is removed from the envelope. For computers, that analogy works well. Each
computer message is encapsulated in a specific format, called a frame, before it is sent over the network.
A frame provides the address of the intended destination and the address of the source host. The format
and contents of a frame are determined by the type of message being sent and the channel over which it is
communicated. Message that are not correctly formatted are not successfully delivered to or processed by
the destination host.
Similar to sending a letter, a message that is sent over a computer network follows specific format rules for
it to be delivered and processed.
Internet Protocol (IP) is a protocol with a similar function to the envelope example. In the figure, the fields
of the IP version (IPv6)9 packet identify the source of the packet and its destination. IP is responsible for
sending a message from the message source to destination over one or more networks.
24
6.2 The Access Layer
6.2.1 Ethernet Switches
Ethernet switches are networking devices (hardware) commonly used in local area networks (LANs) to connect
devices. They operate at the Data Link (Layer 2) of the OSI model. That’s because they make their
forwarding decisions based on layer 2 information. They are designed to efficiently manage forward data
packets within a network. Here’s how Ethernet switches operate:
1. Packet Switching: Ethernet switches use packet switching to forward data packets between devices
on a network. When a data packet arrives at a switch, the switch examines the destination MAC
address in the packet header to determine the appropriate outgoing port.
2. MAC Address Table: Switches maintain a MAC address table (also known as a forwarding table
or content addressable memory - CAM table) that maps MAC addresses to the corresponding switch
ports. When a packet arrives, the switch checks its MAC address table to determine the outgoing port
for the destination MAC address.
3. Learning MAC Addresses: Initially, the MAC address table is empty. As data packets are received,
the switch learns the MAC addresses of devices connected to its ports by examining the source MAC
addresses of incoming packets. The switch then associates these MAC addresses with the corresponding
ports in its MAC address table.
4. Forwarding Frames: When a packet arrives at a switch, the switch looks up the destination MAC
address in its MAC address table to determine the outgoing port. If the destination MAC address is
not found in the table, the switch forwards the packet to all ports except the incoming port (a process
known as flooding), ensuring that the packet reaches its destination.
5. Broadcast and Multicast Handling: Switches handle broadcast and multicast traffic differently
from unicast traffic. Broadcast packets are forwarded to all ports except the incoming port, while
multicast packets are forwarded only to ports where multicast group members are connected.
6. Filtering and Frame Filtering: Switches filter and forward frames based on MAC addresses, which
reduces network congestion and improves overall network performance compared to hubs or repeaters.
Each switch port acts as a separate collision domain, allowing full-duplex communication between
connected devices.
7. Spanning Tree Protocol (STP): Ethernet switches use the Spanning Tree Protocol to prevent net-
work loops and ensure redundant paths in the network topology. STP identifies and disables redundant
links, thus creating a loop-free logical topology.
25
7 The Internet Protocol
7.1 Purpose of an IPv4 Address
7.1.1 The IPv4 Address
A host needs an IPv4 address to participate on the internet and almost all LANs today. The IPv4 address is a
logical network address that identifies a particular host. It must be properly configured and unique within
within the LAN, for local communication as well as to be unique in the world, for remote communication.
An IPv4 address is assigned to the network interface connection for a host. This connection is usually a
network interface card (NIC) installed in the device. Some servers can have more than one NIC and each of
these has its own IPv4 address. Router interfaces that provide connections to an IP network10 will also have
an IPv4 address.
Every packet sent across the internet has a source and destination IPv4 address. This information is required
by networking devices to ensure the information gets to the destination and any replies are returned to the
source.
• Network Portion: The network portion of the IPv4 address identifies the network to which a device
belongs. This portion of the address is used by routers to determine the appropriate path for forwarding
data packets to their destination networks. The size of the network portion can vary depending on the
network’s subnet mask and the network’s class (Class A, B, or C).
• Host Portion: The host portion of the IPv4 address identifies the specific device within the network.
It distinguishes individual devices from each other within the same network. The size of the host
portion depends on the number of devices within the network and the available address space.
• Subnet Mask: The subnet mask is used to divide the IPv4 address into network and host portions.
It determines the size of the network and host portions by defining which bits in the address belong to
the network portion and which bits belong to the host portion. The subnet mask is typically expressed
in dotted-decimal notation (e.g., 255.255.255.0) or as a prefix length (e.g., /24).
• Subnetting: In a multi-networking environment, subnetting is used to divide a single network into
multiple smaller subnetworks or subnets. Each subnet has its own network address and subnet mask,
allowing for more efficient use of IP address space and better management of network resources.
• Classful vs. Classless Addressing: In the past, IPv4 addresses were assigned based on a classful
addressing scheme (Class A, B, or C), which determined the default network and host portions of the
address. However, with the introduction of classless addressing (CIDR - Classless Inter-Domain
Routing), subnet masks can be of variable length, allowing for more flexibility in address allocation
and subnetting.
In summary, in a multi-networking environment, IPv4 addresses are structured to allow for efficient routing
and communication between different networks. The network portion, host portion, subnet mask, subnetting,
and addressing schemes all play crucial roles in defining the IPv4 address structure and facilitating effective
network communication. For a better understanding
10 An IP network is a collection of interconnected devices, such as computers, servers, routers, and other network devices, that
26
7.2.1 Subnet-Mask Lenght
The subnet mask length, also known as the prefix length in CIDR (Classless Inter-Domain Routing) notation,
indicates the number of bits in the subnet mask that are set to 1. It specifies the size of the network portion
of an IP address.
Here’s what the subnet mask length means:
• The subnet mask length is expressed as a number followed by a slash ("/") and indicates the number
of bits set to 1 in the subnet mask.
• For example, a subnet mask length of 24 (often written as "/24") means that the first 24 bits of the
subnet mask are set to 1, and the remaining 8 bits are set to 0 in the subnet mask.
• The subnet mask length determines the size of the network and the number of available host addresses
within that network.
• A larger subnet mask length corresponds to a smaller number of available host addresses but a larger
number of subnets.
• Conversely, a smaller subnet mask length corresponds to a larger number of available host addresses
but a smaller number of subnets.
• Common subnet prefixes include /24 (255.255.255.0), /16 (255.255.0.0), and /8 (255.0.0.0), among
others, each defining different sizes of subnets and addressing schemes.
• Subnet:
– A subnet, short for sub-network, is a logical subdivision of an IP network. It allows a larger
network to be divided into smaller, more manageable parts.
– Subnets are created by partitioning a network into smaller segments to improve performance,
security, and manageability.
– Each subnet operates as a separate network within the larger network, with its own unique range
of IP addresses and its own set of hosts and devices.
• Subnet Mask:
– A subnet mask is a 32-bit number used in conjunction with an IP address to determine the network
portion and the host portion of the address.
– It is a binary pattern that separates the network and host portions of an IP address.
– The subnet mask consists of a series of contiguous 1s followed by a series of contiguous 0s. The
1s indicate the network portion, and the 0s indicate the host portion.
– The subnet mask helps devices determine whether an IP address is on the same subnet as the
device itself or whether it needs to be routed to another subnet.
27
8 IPv4 and Network Segmentation
8.1 IPv4 Unicast, Broadcast, and Multicast
8.1.1 Unicast
There are different ways to send a packet from a source device, and these different transmissions affect the
destination IPv4 addresses.
Unicast transmission refers to one device sending a message to one other device in one-to-one communi-
cation.
A unicast packet has a destination IP address that is a unicast address which goes to a single recipient. A
source IP address can only be a unicast address, because the packet can only originate from a single
source. This is regardless of whether the destination IP address is a unicast, broadcast, or multicast. When
a destination is destined only for a single device, it is a unicast too.
However, it’s important to note that unicast communication is not solely limited to communication destined
for a single device. Unicast communication can also involve one sender transmitting data to a specific group
of receivers, as long as the data is intended for those receivers individually, and not broadcasted to all de-
vices on the network. Note: In this course, all communication between devices is unicast unless
otherwise noted.
8.1.2 Broadcast
Broadcast transmission refers to a device sending a message to all the devices on a network in one-to-all
communications. A broadcast packet has a destination IP address with all ones (1s) in the host portion, or
32 one (1) bits, that means 11111111.11111111.11111111.11111111 or in decimal, 255.255.255.255.
Note: IPv4 uses broadcast packets. However, there are no broadcast packets with IPv6.
A broadcast packet must be processed by all devices in the same broadcast domain. A broadcast domain
identifies all hosts on the same network segment. A broadcast may be directed or limited. A directed
broadcast is sent to all hosts on a specific network. For example:
Sending a broadcast to 192.168.1.255 and sending to 255.255.255.255 have different implications in terms of
their scope and reach within the network:
1. 192.168.1.255 Broadcast:
• This is a limited broadcast address specific to the subnet 192.168.1.0/24.
• It targets all devices within the same local network segment as the sender.
• Routers do not forward packets with this destination address beyond the local subnet.
• Limited broadcasts are used to communicate with all devices on the same local network, such as
ARP requests for MAC address resolution or DHCP requests for IP address assignment.
2. 255.255.255.255 Broadcast:
• This is a global broadcast address that targets all devices on the entire network.
• It reaches all devices connected to any network segment within the entire network infrastructure.
• Routers typically do not forward packets with this destination address beyond the local subnet.
• Global broadcasts are rare and generally not used due to their potential for causing excessive
network traffic and security concerns.
In summary, while both types of broadcasts aim to reach multiple devices, the difference lies in their scope:
192.168.1.255 is limited to the local subnet, while 255.255.255.255 is intended for all devices across the entire
network. It’s essential to use the appropriate broadcast address based on the desired scope of communication
to minimize unnecessary network traffic and ensure efficient network operation.
Remember: By default, routers do not forward broadcasts.
28
8.1.3 IPv4Multicast
Multicast transmission reduces traffic by allowing a host to send a single packet to a selected set of hosts
that subscribe to a multicast group.
29
8.2.2 Routing to the Internet
Most internal networks, from large enterprises to home networks, use private IPv4 addresses for addressing
all internal devices (intranet) including hosts and routers. However, private addresses are not globally
routable.
In the figure, customer networks 1, 2, and 3 are sending packets outside their internal networks. These
packets have a source IPv4 address that is a private address and a destination IPv4 address that is public
(globally routable). Packets with a private address must be filtered (discarded) or translated to
a public address by Private IPv4 Adress and Network Translation (NAT) before forwarding the
packet to an ISP.
Before the ISP can forward this packet, it must translate the source IPv4 address, which is a private
address, to a public IPv4 address using Network Address Translation (NAT). NAT is used to translate be-
tween private IPv4 and public IPv4. This is usually done on the router that connects the internal network
to the ISP network. Private IPv4 addresses in the organization’s intranet will be translated to public IPv4
addresses before routing to the internet.
Loopback Addresses Loopback addresses (127.0.0.0 /8 or 127.0.0.1 to 127.255.255.254) are more com-
monly identified as only 127.0.0.1. these are special addresses used by a host to direct traffic to itself. For
30
example, the ping command is commonly used to test connection to other hosts. But you can also the ping
command to test if the IP configuration on your own device.
When you ping your own device’s IP address, you are essentially sending a small packet of data to your
own device and waiting for a response. If your device responds to the ping request, it indicates that the IP
configuration on your device is correctly set up and that your device is reachable over the network.
This can be a useful troubleshooting tool to verify that your device’s network settings, such as IP address
assignment, subnet mask, and default gateway, are configured correctly and that your device is able to
communicate with other devices on the network.
Note: There is also a Class D multicast block consisting of 224.0.0.0 to 239.0.0.0 and a Class E experimental
address block consisting of 240.0.0.0 - 255.0.0.0.
In the mid-1990s, with the introduction of the World Wide Web (WWW), classful addressing was deprecated
to more efficiently allocate the limited IPv4 address space. Classful address allocation was replaced with
classless addressing, which is used today. Classless addressing ignores the rules of classes (A, B, C). Public
IPv4 network addresses (network addresses and subnet masks) are allocated based on the number of addresses
that can be justified.
31
Figure 16: The five RIRs - Cisco Networking Academy
Routers do not propagate broadcasts. When a router receives a broadcast, it does not forward it out
other interfaces. For instance, when R1 receives a broadcast on its Gigabit Ethernet 0/0 interface, it does
not forward out another interface.
11 In essence, a Layer 2 broadcast is a way for devices within the same local network to communicate with each other
32
Therefore, each router interface connects to a broadcast domain and broadcasts are only propagated within
that specific broadcast domain.
Notice how the prefix length has changed from a single /16 network to two /24 networks. This is the
basis of subnetting: using host bits to create additional subnets.
Note: The terms subnet and network are often used interchangeably. Most networks are a subnet of
some larger address block.
33
Understanding how to subnet networks is a fundamental skill that all network administrators must develop.
Various methods have been created to help understand this process. Although a little overwhelming at first,
pay close attention to the detail and, with practice, subnetting will become easier.
34
9 IPv6 Addressing Formats and Rules
35