0% found this document useful (0 votes)
762 views

Data Communication and Computer Networks: Addis Ababa Science and Technology University

The document discusses data communication and computer networks. It covers topics like different types of networks including LANs, WANs, and the internet. It describes the basic components of a network like devices, media, and services. It also discusses concepts like clients and servers, peer-to-peer networking, and how resources are provided over a network. The document provides examples of different end devices and network infrastructure devices. It explains how networks are represented and the differences between LANs and WANs.

Uploaded by

Mengesha Kiros
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
762 views

Data Communication and Computer Networks: Addis Ababa Science and Technology University

The document discusses data communication and computer networks. It covers topics like different types of networks including LANs, WANs, and the internet. It describes the basic components of a network like devices, media, and services. It also discusses concepts like clients and servers, peer-to-peer networking, and how resources are provided over a network. The document provides examples of different end devices and network infrastructure devices. It explains how networks are represented and the differences between LANs and WANs.

Uploaded by

Mengesha Kiros
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 191

Data Communication and

Computer Networks
Addis Ababa Science and Technology University

By: Netsanet Getnet


Chapter 1: Introduction
• Review of some of what is discussed in chapter one!
Providing Resources in a Network

Clients and Servers / Server-Based


Providing Resources in a Network
• Networks of Many Sizes
• Small Home / Office Networks
• Medium to Large Networks
• World Wide Network
• Clients and Servers
• Clients request and display
information
• Servers provide information to
other devices on the network
• Peer-to-Peer
• Computers can be both server and
client at the same time.
• What are the advantages?
• What are the disadvantages?
Providing Resources in a Network

Peer-to-Peer
LANs, WANs, and Internets

Components of a Network
There are three categories of network components:
• Devices
• Media
• Services
Components of a Network

End Devices
Some examples of end devices are:
• Computers (work stations, laptops, file servers, web servers)
• Network printers
• VoIP phones
• TelePresence endpoint
• Security cameras
• Mobile handheld devices (such as smartphones, tablets, PDAs, and
wireless debit / credit card readers and barcode scanners)
Components of a Network

Network Infrastructure Devices


Examples of intermediary network devices are:
• Network Access Devices (switches, and wireless access points)
• Internetworking Devices (routers)
• Security Devices (firewalls)
Components of a Network

Network Media
Components of a Network

Network Representations
LANs and WANs

Types of Networks
The two most common types of network infrastructures are:
• Local Area Network (LAN)
• Wide Area Network (WAN).

Other types of networks include:


• Metropolitan Area Network (MAN)
• Wireless LAN (WLAN)
• Storage Area Network (SAN)
LANs and WANs

Local Area Networks (LAN)


LANs and WANs

Wide Area Networks (WAN)


LANs, WANs, and Internets

The Internet
LANs, WANs, and the Internet

The Internet, Intranets, and Extranets


• The Internet
• Worldwide collection of
interconnected networks
• Not owned by any individual or group
• Intranets and Extranets
LANs, WANs, and the Internet

Internet Connections
• Internet Access Technologies
• Internet Service Provider (ISP)
• Broadband cable
• Broadband Digital Subscriber Line (DSL)
• Wireless WANs
• Mobile Services
• Business DSL
• Leased Lines
• Metro Ethernet

• Types of Internet Connections


• Home and Small Office
• Business
Connecting to the Internet

Connecting Remote Users to the Internet


Connecting to the Internet

Connecting Businesses to the Internet


Converged Networks

The Converging Network


The Network as a Platform

Converged Networks
• Traditional Separate Networks
• Each network with its own rules and
• The Converging Network
• Capable of delivering data, voice, and video over the same
network infrastructure
Network Trends

Data Centers
A data center is a facility used to house computer systems and
associated components including:
• Redundant data communications connections
• High-speed virtual servers (sometimes referred to as server farms or
server clusters)
• Redundant storage systems (typically uses SAN technology)
• Redundant or backup power supplies
• Environmental controls (e.g., air conditioning, fire suppression)
• Security devices
The Changing Network Environment

Networking Technologies for the Home


• Technology Trends in the Home
• Smart home
• Powerline Networking
• Uses existing electrical wiring to connect devices
• Wireless Broadband
• Wireless Internet Service Provider (WISP)
• Wireless Broadband Service using cellular
technology
Networking Technologies for the Home

Wireless Broadband
Networking Technologies for the Home

Technology Trends in the Home


Networking Technologies for the Home

Powerline Networking
Summary
• Networks and the Internet have changed the way we communicate,
learn, work, and even play.
• Networks come in all sizes. They can range from simple networks
consisting of two computers, to networks connecting millions of devices.
• The Internet is the largest network in existence. In fact, the term Internet
means a ‘network of networks. The Internet provides the services that
enable us to connect and communicate with our families, friends, work,
and interests.
• The network infrastructure is the platform that supports the network. It
provides the stable and reliable channel over which communication can
occur. It is made up of network components including end devices,
intermediate device, and network media.
Chapter 2
Protocols and Architectures
PROTOCOL LAYERING
• A protocol defines the rules that both the sender and receiver
and all intermediate devices need to follow to be able to
communicate effectively.
• When communication is simple, we may need only one simple
protocol;
• When the communication is complex, we may need to divide
the task between different layers, in which case we need a
protocol at each layer, or protocol layering.
• Two simple scenarios:
Senario 1

• Communication is so simple that it can occur in only one layer.


• Assume Maria and Ann are neighbors with a lot of common ideas.
• Communication between Maria and Ann takes place in one layer, face to
face, in the same language.
Senario 1 …
• Even in this simple scenario, we can see that a set of rules needs to
be followed.
• 1st: they should greet each other when they meet.
• 2nd: they should confine their vocabulary to the level of their friendship.
• 3rd: each should refrain from speaking when the other party is speaking.
• 4th: each party knows that the conversation should be a dialog, not a
monolog: both should have the opportunity to talk about the issue.
• 5th: they should exchange some nice words when they leave.
• We can see that the protocol used by Maria and Ann is different
from the communication between a professor and the students in
a lecture hall.
Senario 1 …
• The communication in the second case is mostly monolog; the
professor talks most of the time unless a student has a question, a
situation in which the protocol dictates that she should raise her
hand and wait for permission to speak.
• This is a normally very formal communication and is limited to the
subject being taught.
Senario 2
• Assume that Ann is offered a higher-level position in her company, but needs
to move to another branch located in a city very far from Maria.
• The two friends still want to continue their communication and exchange
ideas because they have come up with an innovative project to start a new
business when they both retire.
• They decide to continue their conversation using regular mail through the
post office.
• However, they do not want their ideas to be revealed by other people if the
letters are intercepted.
• They agree on an encryption/decryption technique.
• The sender of the letter encrypts it to make it unreadable by an intruder; the
receiver of the letter decrypts it to get the original letter.
Senario 2 …
• Assume that Maria and Ann use one technique that makes it hard to decrypt
the letter if one does not have the key for doing so.
• Now we can say that the communication between Maria and Ann takes place
in three layers.
• We assume that Ann and Maria each have three machines (or robots) that
can perform the task at each layer.
Senario 2 … A three-layer protocol
Senario 2 …
• Assume Maria sends the first letter to Ann.
• Maria talks to the machine at the third layer as though the machine is
Ann and is listening to her.
• The third layer machine listens to what Maria says and creates the
plaintext (a letter in English), which is passed to the second layer
machine.
• The second layer machine takes the plaintext, encrypts it, and creates
the ciphertext, which is passed to the first layer machine.
• The first layer machine, presumably a robot, takes the ciphertext, puts
it in an envelope, adds the sender and receiver addresses, and mails
it.
Senario 2 …
• At Ann’s side, the first layer machine picks up the letter from Ann’s
mail box, recognizing the letter from Maria by the sender address.
• The machine takes out the ciphertext from the envelope and delivers
it to the second layer machine.
• The second layer machine decrypts the message, creates the
plaintext, and passes the plaintext to the third-layer machine.
• The third layer machine takes the plaintext and reads it as though
Maria is speaking.
• Protocol layering enables us to divide a complex task into several
smaller and simpler tasks.
Why Layering?
• Protocol layering enables us to divide a complex task into several
smaller and simpler tasks.
• In the previous example, we could have used only one machine to do
the job of all three machines.
• However, if Maria and Ann decide that the encryption/decryption
done by the machine is not enough to protect their secrecy, they
would have to change the whole machine.
• In the present situation, they need to change only the second layer
machine; the other two can remain the same.
• This is referred to as modularity.
• Modularity in this case means independent layers.
Why Layering? …
• A layer (module) can be defined as a black box with inputs and outputs,
without concern about how inputs are changed to outputs.
• If two machines provide the same outputs when given the same inputs, they
can replace each other.
• For example, Ann and Maria can buy the second layer machine from two
different manufacturers.
• As long as the two machines create the same ciphertext from the same
plaintext and vice versa, they do the job.
• One of the advantages of protocol layering is that it allows us to separate the
services from the implementation.
• A layer needs to be able to receive a set of services from the lower layer and
to give the services to the upper layer; we don’t care about how the layer is
implemented.
Why Layering? …
• For example, Maria may decide not to buy the machine (robot) for
the first layer; she can do the job herself.
• As long as Maria can do the tasks provided by the first layer, in both
directions, the communication system works.
• Another advantage of protocol layering, which cannot be seen in our
simple examples but reveals itself when we discuss protocol layering
in the Internet, is that communication does not always use only two
end systems; there are intermediate systems that need only some
layers, but not all layers.
• If we did not use protocol layering, we would have to make each
intermediate system as complex as the end systems, which makes the
whole system more expensive.
Principles of Protocol Layering
• Two principles of protocol layering:
• First Principle: dictates that if we want bidirectional communication,
we need to make each layer so that it is able to perform two opposite
tasks, one in each direction.
• For example, the third layer task is to listen (in one direction) and talk (in the
other direction).
• The second layer needs to be able to encrypt and decrypt.
• The first layer needs to send and receive mail.
Principles of Protocol Layering …
• Second Principle: dictates that the two objects under each layer at
both sites should be identical.
• For example, the object under layer 3 at both sites should be a plaintext letter.
• The object under layer 2 at both sites should be a ciphertext letter.
• The object under layer 1 at both sites should be a piece of mail.
Logical Connections
• With the two principles of layering, we can think about logical
connection between each layer.
• This means that we have layer-to-layer communication.
• Maria and Ann can think that there is a logical (imaginary) connection
at each layer through which they can send the object created from
that layer.
• The concept of logical connection will help us better understand the
task of layering we encounter in data communication and networking.
Logical Connections …
TCP/IP PROTOCOL SUITE
• TCP/IP is a protocol suite (a set of
protocols organized in different layers)
used in the Internet today.
• It is a hierarchical protocol made up of
interactive modules, each of which
provides a specific functionality.
• The term hierarchical means that each
upper level protocol is supported by the
Original Layers Layers today
services provided by one or more lower
level protocols.
• The original TCP/IP protocol suite was
defined as four software layers built
upon the hardware.
• Today, however, TCP/IP is thought of as
a five-layer model.
TCP/IP PROTOCOL SUITE …
How are the layers in the TCP/IP protocol suite are involved in communication between
two hosts?
• Let us assume that we want to use the suite in a small internet made up of three
LANs (links), each with a link-layer switch.
• Let us also assume that the links are connected by one router.
TCP/IP PROTOCOL SUITE …
• Let us assume that computer A communicates with computer B.
• We have five communicating devices in this communication:
• Source host (computer A),
• The link-layer switch in link 1,
• The router,
• The link-layer switch in link 2, and
• The destination host (computer B).
• Each device is involved with a set of layers depending on the role of the device
in the internet.
• The two hosts are involved in all five layers;
• The source host needs to create a message in the application layer and send it down the
layers so that it is physically sent to the destination host.
• The destination host needs to receive the communication at the physical layer and then
deliver it through the other layers to the application layer.
TCP/IP PROTOCOL SUITE …
• The router is involved in only three layers;
• No transport or application layer in a router as long as the router is used only for routing.
• Although a router is always involved in one network layer, it is involved in n combinations
of link and physical layers where n is the number of links the router is connected to.
• The reason is that each link may use its own data-link or physical protocol.
• For this example, the router is involved in three links, but the message sent from source A
to destination B is involved in two links.
• Each link may be using different link-layer and physical-layer protocols;
• The router needs to receive a packet from link 1 based on one pair of protocols and
deliver it to link 2 based on another pair of protocols.
• A link-layer switch in a link is involved only in two layers: data-link and physical.
• Although each switch in the above figure has two different connections, the connections are
in the same link, which uses only one set of protocols.
• This means that, unlike a router, a link-layer switch is involved only in one data-link and one
physical layer.
LAYERS IN THE TCP/IP PROTOCOL SUITE
• Logical connections between layers of TCP/IP protocol suite:

• Using logical connections makes it easier to understand the duty of each layer:
• The duty of the application, transport, and network layers is end-to-end.
• Whereas, the duty of the data-link and physical layers is hop-to-hop, in which a hop is a
host or router.
• In other words, the domain of duty of the top three layers is the internet, and the domain
of duty of the two lower layers is the link.
LAYERS IN THE TCP/IP PROTOCOL SUITE …
• Another way of thinking of the logical connections is the data unit created from
each layer:
• In the top three layers, the data unit (packets) should not be changed by any router or link-layer
switch.
• In the bottom two layers, the packet created by the host is changed only by the routers, not by the
link-layer switches.
• Remember the second principle of protocol layering.
THE PHYSICAL LAYER
• Responsible for carrying individual bits in a frame across the link.
• Although the lowest level in the TCP/IP protocol suite, the communication between two
devices at the physical layer is still a logical communication because there is another,
hidden layer, the transmission media, under the physical layer.
• Two devices are connected by a transmission medium (cable or air).
• Note that the transmission medium does not carry bits; it carries electrical or optical
signals.
• So the bits received in a frame from the data-link layer are transformed and sent
through the transmission media, but we can think that the logical unit between two
physical layers in two devices is a bit.
THE DATA-LINK LAYER
• An internet is made up of several links (LANs and WANs) connected by routers.
• Several overlapping sets of links that a datagram can travel from the host to the
destination.
• Routers are responsible for choosing the best links.
• Next link to travel is determined by the router; the data-link layer is responsible
for taking the datagram and moving it across the link.
• The link can be a wired LAN with a link-layer switch, a wireless LAN, a wired
WAN, or a wireless WAN.
• We can also have different protocols used with any link type.
• In each case, the data-link layer is responsible for moving the packet through
the link.
• TCP/IP does not define any specific protocol for the data-link layer.
THE DATA-LINK LAYER …
• It supports all the standard and proprietary protocols.
• Any protocol that can take the datagram and carry it through the link suffices
for the network layer.
• The data-link layer takes a datagram and encapsulates it in a packet called a
frame.
• Frame contains headers. E.g. “Type Field”:
• This field in the frame header indicates the network protocol in the data portion.
• For example, this field might indicate that the Data field contains an IP, IPv6, or ARP
packet, to name just a few possibilities.
• Each link-layer protocol may provide a different service.
• Some link-layer protocols provide complete error detection and correction,
some provide only error correction.
NETWORK LAYER
• The network layer is responsible for creating connection between the source
computer and the destination computer.
• The communication at the network layer is host-to-host (end-to-end).
• However, since there can be several routers from the source to the
destination, the routers in the path are responsible for choosing the best
route for each packet.
• The network layer is responsible for host-to-host communication and routing
the packet through possible routes.
• Why do we need the network layer?
• We could have added the routing duty to the transport layer and dropped this layer.
• 1st reason: as said before, is the separation of different tasks between different layers.
• 2nd reason: is that the routers do not need the application and transport layers.
• Separating the tasks allows us to use fewer protocols on the routers.
NETWORK LAYER …
• The network layer in the Internet includes the main protocol: Internet Protocol (IP)
• Responsibilities of IP:
• Defines the format of the packet, called a datagram at the network layer.
• Defines the format and the structure of addresses used in this layer.
• Route a packet from its source to its destination, which is achieved by each router forwarding
the datagram to the next router in its path.
• IP is a connectionless protocol
• Provides no flow control, no error control, and no congestion control services.
• If any of theses services is required for an application, the application should rely only on the
transport-layer protocol.
• The network layer also includes unicast (one-to-one) and multicast (one-to-many)
routing protocols.
• A routing protocol does not take part in routing (it is the responsibility of IP), but it
creates forwarding (routing) tables for routers to help them in the routing process.
NETWORK LAYER …
• The network layer also has some auxiliary protocols that help IP in its
delivery and routing tasks.
• ICMP (Internet Control Message Protocol): helps to report some problems during
packet routing.
• IGMP (Internet Group Management Protocol): helps IP in multicasting
• DHCP (Dynamic Host Configuration Protocol): helps IP get the network-layer address
for a host.
• ARP (Address Resolution Protocol): helps IP find the link-layer address of a host or a
router given its network-layer address.
TRANSPORT LAYER
• The logical connection at the transport layer is also end-to-end.
• The transport layer at the source host
• gets the message from the application layer,
• encapsulates it in a transport layer packet (called a segment or a user datagram in different
protocols) and
• sends it, through the logical (imaginary) connection, to the transport layer at the destination host.
• In other words, the transport layer is responsible for giving services to the application
layer:
• Get a message from an application program running on the source host and
• Deliver it to the corresponding application program on the destination host.
• Why do we need an end-to-end transport layer when we already have an end-to-end
application layer?
• The separation of tasks and duties (as discussed earlier).
• The transport layer should be independent of the application layer.
• We have more than one protocol in the transport layer, with each application program using the
protocol that best matches its requirement.
TRANSPORT LAYER …
• A few transport-layer protocols in the Internet, each designed for some specific task.
1. Transmission Control Protocol (TCP):
• TCP (main transport protocol) is a connection-oriented protocol that first establishes a
logical connection between transport layers at two hosts before transferring data.
• It creates a logical pipe between two TCPs for transferring a stream of bytes.
• It provides:
• Flow control (matching the sending data rate of the source host with the receiving data rate of the
destination host to prevent overwhelming the destination),
• Error control (to guarantee that the segments arrive at the destination without error and resending the
corrupted ones), and
• Congestion control to reduce the loss of segments due to congestion in the network.
2. User Datagram Protocol (UDP):
• The other common protocol, is a connectionless protocol that transmits user datagrams
without first creating a logical connection.
• In UDP, each user datagram is an independent entity without being related to the previous
or the next one (the meaning of the term connectionless).
TRANSPORT LAYER …
• UDP is a simple protocol that does not provide flow, error, or congestion control.
• Its simplicity (small overhead) is attractive to an application program that needs to send
short messages and cannot afford the retransmission of the packets as in TCP, when a
packet is corrupted or lost.
• Stream Control Transmission Protocol (SCTP): A new protocol designed to respond to
new applications that are emerging in the multimedia.
APPLICATION LAYER
• The logical connection between the two application layers is end-to-end.
(refer slide 51 here)
• The two application layers exchange messages between each other as
though there were a bridge between the two layers.
• However, remember that the communication is done through all the
layers.
• Communication at the application layer is between two processes (two
programs running at this layer).
• To communicate:
• A process sends a request to the other process and receives a response.
• Process-to-process communication is the duty of the application layer.
APPLICATION LAYER …
• The application layer in the Internet includes many predefined protocols, but a
user can also create a pair of processes to be run at the two hosts. Here are
some of the predefined protocols:
• HTTP (Hypertext Transfer Protocol): is a vehicle for accessing the World Wide
Web (WWW).
• SMTP (Simple Mail Transfer Protocol) is the main protocol used in electronic mail
(e-mail) service.
• FTP (File Transfer Protocol) is used for transferring files from one host to another.
• TELNET (Terminal Network) and SSH (Secure Shell) are used for accessing a site
remotely.
• SNMP (Simple Network Management Protocol) is used by an administrator to
manage the Internet at global and local levels.
• DNS (Domain Name System) is used by other protocols to find the network-layer
address of a computer.
TCP/IP and Protocols
ENCAPSULATION and DECAPSULATION
• One of the important concepts in protocol layering in the Internet is
encapsulation/decapsulation.
• Information added at the front of data is called a header, and information
added at the end of data is called a trailer.
• Encapsulation/decapsulation for the simple internet shown on slide 47 is here.
ENCAPSULATION and DECAPSULATION …
• One of the important concepts in protocol layering in the Internet is
encapsulation/decapsulation.
• The layers for the link-layer switches are not shown because no
encapsulation/decapsulation occurs in this device.
• Encapsulation in the source host,
• Decapsulation in the destination host,
• Encapsulation and decapsulation in the router.
• Encapsulation at the Source Host:
1. At the application layer, the data to be exchanged is referred to as a
message. The message is passed to the transport layer.
2. The transport layer takes the message as the payload, the load that the
transport layer should take care of.
ENCAPSULATION and DECAPSULATION …
• It adds the transport layer header to the payload, which contains:
• Identifiers of the source and destination application programs (called port
numbers) that want to communicate
• Information for end-to-end delivery of the message: flow control, error control,
congestion control
• Result: transport layer packet (PDU) which we call segment (in TCP) and user
datagram (in UDP)
3. The network layer takes the transport-layer packet as data or payload
and adds its own header to the payload.
• The header contains
• The addresses of the source and destination hosts and
• some more information used for error checking of the header, fragmentation information, and
so on.
• The result is the network-layer packet, called a datagram.
• The network layer then passes the packet to the data-link layer.
ENCAPSULATION and DECAPSULATION …
4. The data-link layer takes the network-layer packet as data or payload and adds its
own header, which contains:
• The link-layer addresses of the host or the next hop (the router).
• The result is the link-layer packet, which is called a frame.
• The frame is passed to the physical layer for transmission.
• Decapsulation and Encapsulation at the Router
• At the router, we have both decapsulation and encapsulation because the router is
connected to two or more links.
1. After the set of bits are delivered to the data-link layer, this layer:
• Decapsulates the datagram from the frame and passes it to the network layer.
2. The network layer only inspects the source and destination addresses in the
datagram header and consults its forwarding table to find the next hop to which the
datagram is to be delivered.
• The contents of the datagram should not be changed by the network layer in the router
unless there is a need to fragment the datagram if it is too big to be passed through the
next link.
ENCAPSULATION and DECAPSULATION …
3. The data-link layer of the next link encapsulates the datagram in a frame and
passes it to the physical layer for transmission.
• Decapsulation at the Destination Host
• At the destination host, each layer:
• Decapsulates the packet received,
• Removes the payload, and
• Delivers the payload to the next-higher layer protocol until the message reaches
the application layer.
• It is necessary to say that decapsulation in the host involves error checking.
ENCAPSULATION and DECAPSULATION …
Segment

Packet

Frame
ENCAPSULATION and DECAPSULATION …
ENCAPSULATION and DECAPSULATION …
Comparison of OSI and TCP/IP

(Practical Model)

Similar to
TCP/IP

Similar
to OSI
Ethernet Frames

Ethernet frame format


Chapter 3: Data Encoding, Data
Transmission and Multiplexing
Analog and Digital Data
• Data can be analog or digital.
• Analog data refers to information that is continuous;
• Digital data refers to information that has discrete states.
• For example, an analog clock that has hour, minute, and second hands gives information in a
continuous form;
• the movements of the hands are continuous.
• On the other hand, a digital clock that reports the hours and the minutes will change suddenly from
8:05 to 8:06.
• Analog data: such as the sounds made by a human voice, take on continuous values.
• When someone speaks, an analog wave is created in the air.
• This can be captured by a microphone and converted to an analog signal or sampled and converted
to a digital signal.
• Digital data take on discrete values.
• For example, data are stored in computer memory in the form of 0s and 1s. They can be converted
to a digital signal or modulated into an analog signal for transmission across a medium.
Analog and Digital Signals
• Like the data they represent, signals can be either analog or digital.
• An analog signal has infinitely many levels of intensity over a period of time.
• As the wave moves from value A to value B, it passes through and includes an infinite
number of values along its path.
• A digital signal, on the other hand, can have only a limited number of defined values.
• Although each value can be any number, it is often as simple as 1 and 0.
• The simplest way to show signals is by plotting them on a pair of perpendicular axes.
• The vertical axis represents the value or strength of a signal and the horizontal axis
represents time.
• Figure below illustrates an analog signal and a digital signal.
• The curve representing the analog signal passes through an infinite number of points.
• The vertical lines of the digital signal, however, demonstrate the sudden jump that the
signal makes from value to value.
Analog and Digital Signals …

• Periodic and Nonperiodic/Aperiodic


• Both analog and digital signals can take one of two forms: periodic or nonperiodic/aperiodic;
• A periodic signal completes a pattern within a measurable time frame, called a period, and
repeats that pattern over subsequent identical periods.
• The completion of one full pattern is called a cycle.
• A nonperiodic signal changes without exhibiting a pattern or cycle that repeats over time.
• Both analog and digital signals can be periodic or nonperiodic.
• In data communications, we commonly use periodic analog signals and nonperiodic digital
signals.
Periodic Analog Signals
• Periodic analog signals can be classified as simple or composite.
• A simple periodic analog signal, a sine wave, cannot be decomposed into simpler
signals.
• A composite periodic analog signal is composed of multiple sine waves.
• The sine wave is the most fundamental form of a periodic analog signal.
• A simple oscillating curve, changing over the course of a cycle smoothly and
consistently, with a continuous, rolling flow.
• A sine wave can be represented by three parameters: the peak amplitude, the
frequency, and the phase. These three parameters fully describe a sine wave.
Sine Wave
Periodic Analog Signals …
• Peak Amplitude: of a signal is the absolute value of its highest intensity, proportional to the energy it carries.
• For electric signals, peak amplitude is normally measured in volts.

• Period and Frequency


• Period refers to the amount of time, in seconds, a signal needs to complete 1 cycle.
• Frequency refers to the number of periods in 1 s.
• Note that period and frequency are just one characteristic defined in two ways.
• Frequency and period are inverses of each other.
Periodic Analog Signals … here !!

Units of frequency and period

For example: the power we use at home has a


frequency of 60 Hz.

Period, T = 1/f = 1/60 = 0.0166 s = 16.6 ms


Two signals with the same amplitude
and phase, but different frequencies
• If a signal does not change at all, its frequency is zero.
• If a signal changes instantaneously, its frequency is infinite. (1/0)
Periodic Analog Signals …
• Phase (or Phase Shift): describes the position of the waveform relative to time 0.
• Think of the wave as something that can be shifted backward or forward along the time
axis.
• Phase describes the amount of that shift.
• It indicates the status of the first cycle.
• Measured in degrees or radians: [360º is 2π rad; 1º is 2π/360 rad, and 1 rad is 360/(2π)].
• A phase shift of 360º corresponds to a shift of a complete period;
• A phase shift of 180° corresponds to a shift of one-half of a period;
• And, a phase shift of 90o corresponds to a shift of one-quarter of a period.
Periodic Analog Signals …
• A sine wave with a phase of 0° starts at time 0 with a zero
amplitude. The amplitude is increasing. A sine wave with a
phase of 0° is not shifted.

 • A sine wave with a phase of 90° starts at time 0 with a peak


amplitude. The amplitude is decreasing. It is shifted to the
left by cycle. However, note that the signal does not really
exist before time 0.

 • A sine wave with a phase of 180° starts at time 0 with a zero


amplitude. The amplitude is decreasing. It is shifted to the
left by cycle. However, note that the signal does not really
exist before time 0.

• Three sine waves with the same amplitude and frequency, but different phases
Periodic Analog Signals …
• Wavelength: is another characteristic of a signal traveling through a transmission medium.
• Wavelength binds the period or the frequency of a simple sine wave to the propagation speed
of the medium.

• Relationship between wavelength and period

• The frequency of a signal is independent of the medium, but the wavelength depends on both
the frequency and the medium.
• Wavelength is a property of any type of signal.
• For example, wavelength is used to describe the transmission of light in an optical fiber.
• The wavelength is the distance a simple signal can travel in one period.
Periodic Analog Signals …
•• Given
  the propagation speed, and period of the signal, then wavelength, is

• We usually consider the propagation speed of segnals to be equal to speed of light, and
hence, we have:

• in vacuum, and speed is lower in air, even lower in cable.


• The wavelength is normally measured in micrometers (microns) instead of meters.
• For example, the wavelength of red light () in air is

• However, if it were in a coaxial or fiber-optic cable, the wavelength is shorter (0.5 μm)
because the propagation speed in the cable is decreased.
Time and Frequency Domains

• To show the relationship between amplitude and frequency, we can use what is
called a frequency-domain plot.
• A frequency-domain plot is concerned with only the peak value and the frequency.
• A complete sine wave in the time domain can be represented by one single spike in the frequency
domain.
Composite Signals
• Simple sine waves have many applications: sending a single sine wave to
carry electric energy from one place to another.
• E.g.: the power company sends a single sine wave with a frequency of 60 Hz to
distribute electric energy to customers.
• If we had only one single sine wave to convey a conversation over the
phone, it would make no sense and carry no information.
• We would just hear a buzz.
• We need to send a composite signal to communicate data.
• A composite signal is a signal made of many simple sine waves.
• A single-frequency sine wave is not useful in data communications; we
need to send a composite signal, a signal made of many simple sine
waves.
Composite Signals …
• French mathematician, Jean-Baptiste Fourier showed that any composite
signal is a combination of simple sine waves of different frequencies,
amplitudes and phases.
• A composite signal can be periodic or nonperiodic.
• Periodic composite signal: can be decomposed into a series of simple sine waves
with discrete frequency values (1, 2, 3, and so on)
• Nonperiodic composite signal: can be decomposed into a combination of sine waves
with continuous frequencies.
Composite Signals …

A composite periodic signal

Time-domain decomposition of a
composite signal

Frequency-domain decomposition
of a composite signal
Composite Signals …
• The amplitude of the sine wave with frequency f is almost the same as the peak amplitude of
the composite signal.
• The amplitude of the sine wave with frequency 3f is one-third of that of the first.
• And, amplitude of the sine wave with frequency 9f is one-ninth of the first.
• The frequency of the sine wave with frequency f is the same as the frequency of the composite
signal;
• It is called the fundamental frequency, or first harmonic.
• The sine wave with frequency 3f has a frequency of 3 times the fundamental frequency;
• it is called the third harmonic.
• The third sine wave with frequency 9f has a frequency of 9 times the fundamental frequency;
• it is called the ninth harmonic.
• Note that the frequency decomposition of the signal is discrete: frequencies f, 3f and 9f
• No frequencies such as 1.2f or 2.6f
• Periodic composite signals are always made of discrete spikes.
Composite Signals …
• For nonperiodic composite signal, however, we have a continuous frequencies (for example,
human voice).

• Although the number of frequencies in a human voice is infinite, the range is limited.
• A human can create a continuous range of frequencies between 0 and 4kHz.
• The telephone network was designed to work with analog signals in the voice frequency
range of about 300 to 3400 Hz.
Bandwidth
• Bandwidth is the range of frequencies contained in a composite signal.
• It is the difference between the highest frequency and the lowest frequency in that
signal.
Bandwidth: Examples
1. A nonperiodic composite signal has a bandwidth of 200 kHz, with a middle frequency
of 140 kHz and peak amplitude of 20 V. The two extreme frequencies have an
amplitude of 0. Draw the frequency domain of the signal.

20V

2. FM radio stations have a BW of 200-kHz. Total BW dedicated to FM radio ranges from


88 to 108 MHz.
3. AM radio stations have a 10-kHz BW. Total BW dedicated to AM radio ranges from 530
to 1700 kHz.
DIGITAL SIGNALS
• Information can also be represented by a digital signal.
• Example: a 1 can be encoded as a positive voltage, a o as a zero voltage.
• A digital signal can have more than two levels.
• In this case, we can send more than 1 bit for each level.
• For example, 2 bits can be represented using four different signal levels.
• For L levels, we have log2L bits per level.
• Advantage of having more levels: better data
rate
• Problem: difficulty to discern levels at receiver.
• Example: for a signal with 8 levels, we have
• log2L = log28 = 3 bits per level.
• For a signal with 9 levels: log29 = 3.17 bits.
• 4 bits per level
DIGITAL SIGNALS …
• Most digital signals are nonperiodic. Hence, we don’t use period/frequency to
characterize them.
• Instead of frequency, bit rate is used to describe digital signals.
• Bit rate: the number of bits sent in 1 second, expressed in bps.
• Example: assume we need to download text documents at the rate of 100 pages per
second. What is the required bit rate of the channel?
• Solution: a page has 24 lines on average, with 80 characters in each line. Assume each
character requires 8 bits.
Bit rate = 100 pages x 24 lines/page x 80 characters/line x 8 bits/character
= 1,536,000 bps = 1.536 Mbps
• Bit length is digital equivalent for wavelength:
bit length = propagation speed x bit duration
DIGITAL SIGNALS …
• Note that both bandwidths are infinite,
but the periodic signal has discrete
frequencies while the nonperiodic signal
has continuous frequencies.
• Only finite frequencies are used: those
with most of the signal energy.
• No medium supporting infinite BW

The time and frequency domains of periodic and nonperiodic digital signals
• Infinite BW.
• Digital signal components: Horizontal and Vertical lines.
• A vertical line in the time domain means a frequency of infinity (sudden change in time);
• A horizontal line in the time domain means a frequency of zero (no change in time).
• All frequencies in between are part of the domain.
TRANSMISSION OF DIGITAL SIGNALS
• A digital signal is a composite analog signal with an infinite BW. (frequencies b/n 0 and infinity).
• Consider only nonperiodic digital signals (what we really have in digital communication)
• How to send a digital signal from point A to point B?
• Two approaches of digital transmission: baseband and broadband
• Baseband Transmission: Sending a digital signal over a channel without changing the digital
signal to an analog signal.
• It requires that we have a low-pass channel, a channel with a bandwidth that starts from zero.
• This is the case if we have a dedicated medium with a bandwidth constituting only one channel.
For example, the entire bandwidth of a cable connecting two computers is one single channel.
• Wide bandwidth: we need to send the entire spectrum (continuous range of frequencies
between 0 and infinity)
• Possible if we have a dedicated medium with an infinite BW b/n sender and receiver, that
preserves the exact amplitude of each component of the composite signal.
TRANSMISSION OF DIGITAL SIGNALS …
• This is not possible b/n two devices.
• But the amplitudes of the frequencies at the border of the BW are so small that they can be
ignored.

Baseband transmission using a dedicated medium


• Although the output signal is not an exact replica of the original signal, the data can still be
deduced from the received signal.
• Note that although some of the frequencies are blocked by the medium, they are not critical.
(small amplitdues at those frequencies)
TRANSMISSION OF DIGITAL SIGNALS …
• Relationship between frequency and data rate
• The duration of each pulse is 1/(2f ), i.e., ½ T; thus the data rate is 2f bits per second
(bps).
• For digital signal of bit rate N, f = N/2.
• The more frequency harmonics we have the better the approximation of the digital
signal.
TRANSMISSION OF DIGITAL SIGNALS …
• Baseband transmission of a digital signal that preserves the shape of the digital signal
is possible only if we have a low-pass channel with an infinite or very wide bandwidth.
• In baseband transmission, the required bandwidth is proportional to the bit rate; if we
need to send bits faster, we need more bandwidth.
• Broadband Transmission (Using Modulation)
• Broadband transmission or modulation means changing the digital signal to an analog
signal for transmission.
• Modulation allows us to use a bandpass channel—a channel with a bandwidth that
does not start from zero.
• This type of channel is more available than a low-pass channel.
• If the available channel is a bandpass channel, we cannot send the digital signal
directly to the channel; we need to convert the digital signal to an analog signal before
transmission.
TRANSMISSION OF DIGITAL SIGNALS …
• Bandwidth of a bandpass channel

• Next slide shows the modulation of a digital signal.


• In the figure, a digital signal is converted to a composite analog signal.
• We have used a single-frequency analog signal (called a carrier); the
amplitude of the carrier has been changed to look like the digital signal.
• The result, however, is not a single-frequency signal; it is a composite
signal.
MODULATION
• Modulation: converting a digital signal to a composite analog signal.
• We use single-frequency analog signal (called a carrier); the amplitude of the carrier has
been changed to look like the digital signal.
• The result is not a single-frequency signal; it is a composite signal.

• Modulation of a digital
signal for transmission
on a bandpass channel
MODULATION …
• An example of broadband transmission using modulation:
• The sending of computer data through a telephone subscriber line, the line connecting a
resident to the central telephone office.
• These lines, are designed to carry voice (analog signal) with a limited bandwidth
(frequencies between 0 and 4 kHz).
• Although this channel can be used as a low-pass channel, it is normally considered a
bandpass channel.
• One reason is that the bandwidth is so narrow (4 kHz) that if we treat the channel as low-
pass and use it for baseband transmission, the maximum bit rate can be only 8 kbps.
• The solution is to consider the channel a bandpass channel, convert the digital signal from
the computer to an analog signal, and send the analog signal.
• We can install two converters to change the digital signal to analog and vice versa at the
receiving end.
• This converter is called a modem (modulator/demodulator).
MODULATION …
• Modulation involves operation on one or more of the three characteristics
of a carrier signal: amplitude, frequency, and phase.
• Accordingly, there are three basic encoding or modulation techniques for
transforming digital data into analog signals
• Amplitude Shift Keying (ASK),
• Frequency Shift Keying (FSK), and
• Phase Shift Keying (PSK).
MODULATION: Amplitude Shift Keying (ASK)
•• In
  ASK, the two binary values are represented by two different amplitudes of the carrier frequency.
• Commonly, one of the amplitudes is zero; that is, one binary digit is represented by the presence, at
constant amplitude, of the carrier, the other by the absence of the carrier.
• The resulting transmitted signal for one bit time is,

• Where the carrier signal is .


• ASK is susceptible to sudden gain changes and is a rather inefficient modulation technique. On
voice-grade lines, it is typically used only up to 1200 bps.
• The ASK technique is used to transmit digital data over optical fiber. For LED
• (light-emitting diode) transmitters, Equation (5.2) is valid. That is, one signal element
• is represented by a light pulse while the other signal element is represented by
• the absence of light.
MODULATION: Frequency Shift Keying (FSK)
• The
  most common form of FSK is binary FSK (BFSK), in which the two binary
values are represented by two different frequencies near the carrier frequency.
• The resulting transmitted signal for one bit time is:

• where and are typically offset from the carrier frequency by equal but
opposite amounts.
• BFSK is less susceptible to error than ASK. On voice-grade lines, it is typically
used up to 1200 bps.
• It is also commonly used for high-frequency (3 to 30 MHz) radio transmission.
• It can also be used at even higher frequencies on local area networks that use
coaxial cable.
MODULATION: Frequency Shift Keying (FSK) …
• multiple FSK (MFSK): A signal that is more bandwidth efficient, but also more susceptible
to error,
• More than two frequencies are used.
• In this case, each signaling element represents more than one bit.
• The transmitted MFSK signal for one signal element time can be defined as follows:
MODULATION …
MODULATION: Frequency Shift Keying (FSK) …
• Example:
 
• we have the following frequency assignments for each of the eight possible 3-bit data
combinations:

• MFSK Frequency Use (M = 4)


MODULATION: Phase Shift Keying (PSK) …
• In PSK, the phase of the carrier signal is shifted to represent data.
• Two-Level PSK: the simplest scheme uses two phases to represent the two binary digits
(see Figure) and is known as binary phase shift keying.
• The resulting transmitted signal for one bit time is

• Because a phase shift of 180° is equivalent to flipping the sine wave or multiplying it by -1,
the rightmost expressions in the Equation can be used.
• This leads to a convenient formulation.
• An alternative form of two-level PSK is differential PSK (DPSK). Figure below shows an
example.
• In this scheme, a binary 0 is represented by sending a signal burst of the same phase as the
previous signal burst sent.
• A binary 1 is represented by sending a signal burst of opposite phase to the preceding one.
MODULATION: Phase Shift Keying (PSK) …
• In differential encoding, the information to be transmitted is represented in terms of the
changes between successive data symbols rather than the signal elements themselves.
• This term differential refers to the fact that the phase shift is with reference to the
previous bit transmitted rather than to some constant reference signal.

Differential Phase-
Shift Keying (DPSK)
MODULATION: Phase Shift Keying (PSK) …
• Four-Level
  PSK More efficient use of bandwidth can be achieved if each signaling
element represents more than one bit. For example, instead of a phase shift of 180°, as
allowed in BPSK, a common encoding technique, known as quadrature phase shift keying
(QPSK), uses phase shifts separated by multiples of .

• Thus each signal element represents two bits rather than one.
ENCODING (Line Coding)

Line coding and decoding

• Line coding is the process of converting digital data to digital signals.


• Data, in the form of text, numbers, graphical images, audio, or video, are stored in
computer memory as sequences of bits.
• Line coding converts a sequence of bits to a digital signal.
• At the sender, digital data are encoded into a digital signal; at the receiver, the digital
data are recreated by decoding the digital signal.
ENCODING (Line Coding) …
Signal Element Versus Data Element

• In data communications, our goal is to send data elements.


• A data element is the smallest entity that can represent a piece of information: this is the bit.
• In digital data communications, a signal element carries data elements.
• A signal element is the shortest unit (timewise) of a digital signal.
• In other words, data elements are what we need to send; signal elements are what we can
send.
• Data elements are being carried; signal elements are the carriers.
• Let r be the number of data elements carried by each signal element.
• One data element could be carried by one signal element, (r = 1).
• Two signal elements could carry one data element, (r = ½).
• One signal element could carry two data elements, (r = 2).
• A group of data elements could be carried by a group of signal elements.
ENCODING (Line Coding) …
Figure. Signal Element Versus Data Element
ENCODING (Line Coding) …
• Analogy: Suppose each data element is a person who needs to be carried from one place to
another.
• We can think of a signal element as a vehicle that can carry people.
• When r = 1, it means each person is driving a vehicle.
• When r > 1, it means more than one person is travelling in a vehicle.
• We can also have the case where one person is driving a car and a trailer (r = ½).
• Data Rate Versus Signal Rate
• The data rate defines the number of data elements (bits) sent in 1s.
• The unit is bits per second (bps).
• The signal rate is the number of signal elements sent in 1s.
• The unit is the baud.
• The data rate is sometimes called the bit rate; the signal rate is sometimes called the
pulse rate, the modulation rate, or the baud rate.
ENCODING (Line Coding) …
• One goal in data communications is to increase the data rate while decreasing the signal
rate.
• Increasing the data rate increases the speed of transmission; decreasing the signal rate
decreases the bandwidth requirement.
• In the vehicle-people analogy, we need to carry more people in fewer vehicles to prevent
traffic jams.
• We have a limited bandwidth in our transportation system.
• The relationship between data rate (N) and signal rate (S):
S = N/r
• It is the baud rate, not the bit rate, that determines the required bandwidth for a digital
signal.
• For the analogy, the number of vehicles, not the number of people being carried, affects the
traffic.
• More changes in the signal mean injecting more frequencies into the signal. (frequency is
rate of change!)
ENCODING Schemes
• Unipolar Non-Return-to-Zero (NRZ)
• The most common, and easiest, way to transmit digital signals is to use two different
voltage levels for the two binary digits.
• A scheme in which the positive voltage defines bit 1 and the zero voltage defines bit 0.
• Codes that follow this strategy share the property that the voltage level is constant
during a bit interval; there is no transition (no return to a zero voltage level).
• It is called NRZ because the signal does not return to zero at the middle of the bit.
ENCODING Schemes
• Unipolar Non-Return-to-Zero (NRZ)
• The most common, and easiest, way to transmit digital signals is to use two different voltage
levels for the two binary digits.
• A scheme in which the positive voltage defines bit 1 and the zero voltage defines bit 0.
• Codes that follow this strategy share the property that the voltage level is constant during a
bit interval; there is no transition (no return to a zero voltage level).
• It is called NRZ because the signal does not return to zero at the middle of the bit.
• For example, the absence of voltage can be used to represent binary 0, with a constant
positive voltage used to represent binary 1.
• More commonly, a negative voltage represents one binary value and a positive voltage
represents the other.
• This is called Nonreturn to Zero-Level (NRZ-L).
• NRZ-L is typically the code used to generate or interpret digital data by terminals and other
devices.
ENCODING Schemes
• Unipolar Non-Return-to-Zero (NRZ)

Unipolar NRZ scheme

Polar NRZ Schemes:


Nonreturn to Zero-Level
(NRZ-L) & Nonreturn to Zero-
Invert (NRZ-I)
ENCODING Schemes …
• A variation of NRZ is known as NRZI (Nonreturn to Zero, invert on ones).
• As with NRZ-L, NRZI maintains a constant voltage pulse for the duration of a bit time.
• The data themselves are encoded as the presence or absence of a signal transition at the
beginning of the bit time.
• A transition (low to high or high to low) at the beginning of a bit time denotes a binary 1
for that bit time; no transition indicates a binary 0.
• NRZI is an example of differential encoding.
• In differential encoding, the information to be transmitted is represented in terms of the
changes between successive signal elements rather than the signal elements themselves.
• The encoding of the current bit is determined as follows: If the current bit is a binary 0,
then the current bit is encoded with the same signal as the preceding bit; if the current bit
is a binary 1, then the current bit is encoded with a different signal than the preceding bit.
• Benefit of differential encoding is that it may be more reliable to detect a transition in the
presence of noise than to compare a value to a threshold.
ENCODING Schemes …
• In NRZ-L the level of the voltage determines the value of the bit.
• In NRZ-I the inversion or the lack of inversion determines the value of the bit.
ENCODING Schemes …
• Return-to-Zero (RZ)
• The main problem with NRZ encoding occurs when the sender and receiver
clocks are not synchronized.
• The receiver does not know when one bit has ended and the next bit is starting.
• One solution is the return-to-zero (RZ) scheme, which uses three values:
• Positive, Negative, and Zero.
• In RZ, the signal changes not between bits but during the bit.
• As shown in figure below, the signal goes to 0 in the middle of each bit.
• It remains there until the beginning of the next bit.
• The main disadvantage of RZ encoding is that it requires two signal changes to
encode a bit and therefore occupies greater bandwidth.
ENCODING Schemes …

Figure: Polar RZ scheme

• Another problem is the complexity: RZ uses three levels of voltage, which is


more complex to create and discern.
• As a result of all these deficiencies, the scheme is not used today.
• Instead, it has been replaced by the better-performing Manchester and
differential Manchester schemes
ENCODING Schemes …
• Manchester and Differential Manchester
• The idea of RZ (transition at the middle of the bit) and the idea of NRZ-L are combined into the Manchester scheme.
• In Manchester encoding, the duration of the bit is divided into two halves.
• The voltage remains at one level during the first half and moves to the other level in the second half.
• The transition at the middle of the bit provides synchronization.
• Differential Manchester, on the other hand, combines the ideas of RZ and NRZ-I.
• There is always a transition at the middle of the bit, but the bit values are determined at the
beginning of the bit.
• If the next bit is 0, there is a transition; if the next bit is 1, there is none.
• The only drawback is the signal rate.
• The signal rate for Manchester and differential Manchester is double that for NRZ.
• The reason is that there is always one transition at the middle of the bit and maybe one transition at
the end of each bit. Figure below shows both Manchester and differential Manchester encoding
schemes.
ENCODING Schemes …
• Note that Manchester and differential Manchester schemes are also called
biphase schemes.
In Manchester and differential
Manchester encoding, the transition
at the middle of the bit is used for
synchronization.

Polar biphase: Manchester and


differential Manchester schemes
MULTIPLEXING
• Whenever the bandwidth of a medium linking two devices is greater than
the bandwidth needs of the devices, the link can be shared.
• Multiplexing is the set of techniques that allows the (simultaneous)
transmission of multiple signals across a single data link. As data and
telecommunications use increases, so does traffic.

Dividing a link into channels


Categories of multiplexing
Frequency-division multiplexing (FDM)

• FDM is an analog multiplexing technique that combines analog signals.


• It uses the concept of modulation discussed
FDM Process
FDM Demultiplexing Process
Example 1
Assume that a voice channel occupies a bandwidth of 4 kHz. We
need to combine three voice channels into a link with a bandwidth
of 12 kHz, from 20 to 32 kHz. Show the configuration, using the
frequency domain. Assume there are no guard bands.

Solution
We shift (modulate) each of the three voice channels to a different
bandwidth, as shown in Figure 6.6. We use the 20- to 24-kHz
bandwidth for the first channel, the 24- to 28-kHz bandwidth for
the second channel, and the 28- to 32-kHz bandwidth for the third
one. Then we combine them as shown in Figure.
Figure for Example 1.
Example 6.2
Five channels, each with a 100-kHz bandwidth, are to be
multiplexed together. What is the minimum bandwidth of
the link if there is a need for a guard band of 10 kHz
between the channels to prevent interference?

Solution
For five channels, we need at least four guard bands. This
means that the required bandwidth is at least
5 × 100 + 4 × 10 = 540 kHz,
as shown in Figure 6.7.
Figure for Example 2
TRANSMISSION OF DIGITAL SIGNALS …
• The OSI physical layer provides
the means to transport the bits
that make up a data link layer
frame across the network media.
• The physical layer encodes the
frames and creates the electrical,
optical, or radio wave signals that
represent the bits in each frame.
• These signals are then sent on
the media, one at a time.
• The destination node physical
layer retrieves these individual
signals from the media, restores
them to their bit representations,
and passes the bits up to the data
link layer as a complete frame.
TRANSMISSION OF DIGITAL SIGNALS …
• There are three basic forms of
network media. The physical layer
produces the representation and
groupings of bits for each type of
media as:
• Copper cable: The signals are patterns
of electrical pulses.
• Fiber-optic cable: The signals are
patterns of light.
• Wireless: The signals are patterns of
microwave transmissions.
TRANSMISSION OF DIGITAL SIGNALS …
• The physical layer standards address three functional areas:
• Physical Components
• The physical components are the electronic hardware devices,
media, and other connectors that transmit and carry the signals to
represent the bits. Hardware components such as NICs, interfaces
and connectors, cable materials, and cable designs are all specified
in standards associated with the physical layer. The various ports
and interfaces on a Cisco 1941 router are also examples of physical
components with specific connectors and pinouts resulting from
standards.
• Encoding
• Encoding or line encoding is a method of converting a stream of
data bits into a predefined "code”. Codes are groupings of bits used
to provide a predictable pattern that can be recognized by both the
sender and the receiver. In the case of networking, encoding is a
pattern of voltage or current used to represent bits; the 0s and 1s.
• For example, Manchester encoding represents a 0 bit by a high to
low voltage transition, and a 1 bit is represented as a low to high
voltage transition. An example of Manchester encoding is illustrated
in Figure 1. The transition occurs at the middle of each bit period.
This type of encoding is used in 10 b/s Ethernet. Faster data rates
require more complex encoding.
TRANSMISSION OF DIGITAL SIGNALS …
• There are many ways to transmit
signals. A common method to send
data is using modulation techniques.
Modulation is the process by which
the characteristic of one wave (the
signal) modifies another wave (the
carrier).
• The nature of the actual signals
representing the bits on the media
will depend on the signaling method
in use.
TRANSMISSION OF DIGITAL SIGNALS …
• Interference from two sources:
• Electromagnetic interference (EMI) or radio
frequency interference (RFI) - EMI and RFI
signals can distort and corrupt the data signals
being carried by copper media. Potential
sources of EMI and RFI include radio waves and
electromagnetic devices, such as fluorescent
lights or electric motors as shown in the figure.
• Crosstalk - Crosstalk is a disturbance caused by
the electric or magnetic fields of a signal on
one wire to the signal in an adjacent wire. In
telephone circuits, crosstalk can result in
hearing part of another voice conversation
from an adjacent circuit. Specifically, when an
electrical current flows through a wire, it
creates a small, circular magnetic field around
the wire, which can be picked up by an
adjacent wire.
IP Addresses and Subnetting
• An IP address is a numeric identifier assigned to each machine on an IP network.
• An IP address is a software address, not a hardware address—the latter is hard-coded on a
network interface card (NIC) and used for finding hosts on a local network.
• IP addressing was designed to allow hosts on one network to communicate with a host on a
different network
• IPv4 Addresses
• An IPv4 address is a 32-bit number divided into four 8-bit values called “octets.”
• Each octet can have a value from 0 to 255.
• IPv4 addresses are written in dotted decimal notation.
• This format consists of four decimal numbers, each in the range 0 to 255, separated by a period.
• Every IP address contains a network ID, which specifies the network on which the computer is
found, and a host ID, which uniquely identifies the computer on that network.
• Determining which part of the IP address is the network ID and which part is the host ID
depends on the subnet mask.
IP Addresses ...
• Examples:
• IP address: 10.1.221.101
• Subnet mask: 255.0.0.0
• Hence the network address/ID is 10, written
as 10.0.0.0 • IP address: 172.31.100.6
• Host ID is 1.221.101 • Subnet mask: 255.255.0.0
• Hence the network address/ID is ?
• IP address: 192.168.14.250 • Host ID is ?
• Subnet mask: 255.255.255.0
• Hence the network address/ID is 10, written
as 10.0.0.0
• And, host ID is 250
•When referring to the network ID, we always fill in the host part of the address with 0s.
•A subnet mask is another 32-bit dotted decimal number consisting of a contiguous series of
binary 1 digits followed by a contiguous series of binary 0 digits.
•A contiguous series of eight binary 1s equals the decimal value 255.
•Example: a typical subnet mask is 255.0.0.0 or 255.255.0.0.
•In these two examples, for each 255 in the subnet mask, the corresponding octet of the IP
address is part of the network ID / network address.
IP Addresses ...
• Network address is the designation used in routing to send packets to a remote network
— for example, 10.0.0.0, 172.16.0.0, and 192.168.10.0.
• Broadcast address The address used by applications and hosts to send information to all
nodes on a network is called the broadcast address.
• Examples of layer 3 broadcasts:
• 255.255.255.255, which is any network, all nodes;
• 172.16.255.255, which is all subnets and hosts on network 172.16.0.0;
• 10.255.255.255, which broadcasts to all subnets and hosts on network 10.0.0.0.
• We can’t have the subnet mask 255.0.255.0 because the network ID must be contiguous.
• But, you can have an IP address and a subnet mask such as 172.16.67.5 and
255.255.192.0.
• Look at the third octet of this subnet mask?
• This subnet mask doesn’t look like the other examples, but it’s still a contiguous series of
1s followed by a contiguous series of 0s.
• In binary, this subnet mask looks like this: 11111111.11111111.11000000.00000000
IP Addresses ...
• The decimal equivalent of this binary number is 255.255.192.0, making the network ID of
the 172.16.67.5 address equal to 172.16.64.0 and the host ID equal to 3.5.
• 10101100.00010000.01000011.00000101 (binary for 172.16.67.5) AND
• 11111111.11111111.11000000.00000000 (binary for 255.255.192.0)
= 10101100.00010000.01000000.00000000 (binary for 172.16.64.0)
network ID 172.16.64.0
The remaining bits in the IP address that aren’t part of the network ID are the host ID.
In this case, it’s 00000011.00000101, which is equal to decimal 3.5.
• Anywhere there’s a 1 bit in the subnet mask, the corresponding bits in the IP address are
part of the network ID; Anywhere there are 0 bits in the subnet mask, the corresponding
bits are part of the host ID.
• The Hierarchical IP Addressing Scheme
• An IP address consists of 32 bits of information.
• These bits are divided into four sections, referred to as octets or bytes, with each
containing 1 byte (8 bits).
IP Addresses ...
• You can depict an IP address using one of three methods:
• Dotted-decimal, as in 172.16.30.56
• Binary, as in 10101100.00010000.00011110.00111000
• Hexadecimal, as in AC.10.1E.38
• All these examples represent the same IP address.
• Dotted-decimal or binary representation most common.
• The 32-bit IP address is a structured or hierarchical address as opposed to a flat or
nonhierarchical address.
• Advantage: can handle a large number of addresses
• The disadvantage of the flat addressing scheme, and the reason it’s not used for IP addressing,
relates to routing.
• If every address were unique, all routers on the Internet would need to store the address of
each and every machine on the Internet.
• This would make efficient routing impossible, even if only a fraction of the possible addresses
were used!
IP Addresses ...
• Solution is to use a two- or three-level hierarchical addressing scheme structured by
network and host (two level) or by network, subnet, and host (three level).
• Compare to telephone numbers:
• Area Code (very large area)
• Local call area
• Customer number
Example: 251 11 551 25 36
• IP addresses use the same type of layered structure.
• Rather than all 32 bits being treated as a unique identifier, as in flat addressing,
• a part of the address is designated as the network address and
• the other part is designated as either the subnet and host or just the node address.
IP Addresses …
• IP Address Classes
IP Addresses ...
• Class D addresses are reserved for multicasting, in which a packet is addressed so that more
than one destination can receive it.
• Applications using this feature include videoconferencing and streaming media; Routing
protocols use them to set up routes.
• In a Class D address, the first octet is in the range 224 to 239.
• Class D addresses can’t be used to assign IP addresses to host computers.
• Class E addresses have a value from 240 to 255 in the first octet.
• This range of addresses is reserved for experimental use and can’t be used for address
assignment.
• Network Address Range: Class A
• the first bit of the first byte in a Class A network address must always be 0.
• 00000000 (0) through 01111111 (127), and total networks: 26
• Network Address Range: Class B
• The first bit of the first byte must always be turned on, but the second bit must always be turned
off.
• 10000000 (128) through 10111111 (191), and total networks: 214
IP Addresses ...
• Network Address Range: Class C
• The first 2 bits of the first octet as always turned on, but the third bit can never be on.
• 11000000 (192) through 11011111 (223), total networks 221
• Network Address Ranges: Classes D and E
• The addresses between 224 to 255 are reserved for Class D and E networks.
• Class D: 11100000 (224) – 11100000 (239), used for multicast addresses.
• Class E: 11110000 (240) – 11111111 (255), used for scientific purposes.
• Valid host IDs
• All host bits off (0) = network address
• All host bits on (1) = broadcast address
• Valid host IDs are those in between these two.
• Examples:
• Class A: 10.0.0.0 – 10.255.255.255; Valid hosts: 10.0.0.1 – 10.255.255.254
• Class B: 172.16.0.0 – 172.16.255.255; Valid hosts: 172.16.0.1 – 172.16.255.254
• Class C: 192.168.100.0 – 192.168.100.255; Valid hosts: 192.168.100.1 – 192.168.100.254
IP Addresses ...
• Private IP Addresses
• Addresses that can be used on a private network, but not routable through the Internet.
• For the purpose of creating a measure of security and saving IP address space.
• Using private IP addresses, ISPs, corporations, and home users only need a relatively
small group of IP addresses to connect their networks to the Internet.
• This is economical because they can use private IP addresses on their inside networks and
get along just fine.
• To do this, the ISP and the corporation need to use something called Network Address
Translation (NAT), which basically takes a private IP address and converts it for use on the
Internet.

Reserved Private IP
address space
IP Addresses ...
• IPv4 Address Types
• Loopback (localhost): Used to test the IP stack on the local computer. Can be any address from 127.0.0.1
through 127.255.255.254.
• Layer 2 broadcasts: These are sent to all nodes on a LAN.
• Known as hardware broadcasts—they only go out on a LAN, but they don’t go past the LAN boundary (router).
• The broadcast would be all 1s in binary, (all Fs in hexadecimal), as in ff:ff:ff:ff:ff:ff
• Every NIC will receive and read the frame, including the router, since this was a layer 2 broadcast, but the router
would never, ever forward this!
• Broadcasts (layer 3): These are sent to all nodes on the network.
• Broadcast messages are meant to reach all hosts on a broadcast domain.
• These are the network broadcasts that have all host bits on.
• 72.16.255.255—all host bits on.
• Broadcasts can also be “any network and all hosts,” as indicated by 255.255.255.255
• Unicast: This is an address for a single interface, and these are used to send packets to a single destination host.
• All hosts on the broadcast domain would receive this frame and accept it.
• Only the destination NIC of 10.1.1.2 would accept the packet; the other NICs would discard the packet.
• Multicast: These are packets sent from a single source and transmitted to many devices on different networks.
Referred to as “one-to-many.”
IP Addresses ...
Broadcast

Unicast
IP Addresses ...
• Multicast enables multiple recipients to receive messages without flooding the messages
to all hosts on a broadcast domain
• Multicast works by sending messages or data to IP multicast group addresses.
• Unlike with broadcasts, which aren’t forwarded, routers then forward copies of the
packet out to every interface that has hosts subscribed to that group address.
• This is where multicast differs from broadcast messages—with multicast communication,
copies of packets, in theory, are sent only to subscribed hosts.
• For example, when I say in theory, I mean that the hosts will receive a multicast packet
destined for 224.0.0.10.
• This is an EIGRP packet, and only a router running the EIGRP protocol will read these.
• All hosts on the broadcast LAN will pick up the frame, read the destination address, then
immediately discard the frame unless they’re in the multicast group.
IP Addresses ...
Subnetting
• Subnets: subdivisions of an IP network address space.
• Subnetting: a process that reallocates bits from an IP address’s host portion to the network portion,
creating multiple smaller address spaces.
• Classless Interdoamin Routing (CIDR):
• IP address configuration where subnet masks could be configured regardless of the address class.
• For example, assigning the IP address 172.31.210.10 with a subnet mask of 255.255.255.0 (instead of the
default of 255.255.0.0) is acceptable.
• In this case, the network ID is 172.31.210, and the host ID is 10.
• CIDR Notation:
• Writing IP addresses with their subnet masks can be tedious and takes up a lot of space.
• It is enough to know how many bits of the IP address constitute the network ID.
• For this, we can specify an IP address and its subnet mask with CIDR notation.
• CIDR notation uses the format A.B.C.D/n; n is the number of 1 bits in the subnet mask (the number of bits in
the network ID) and it’s called the prefix.
• Examples: 172.31.210.10 with subnet mask 255.255.255.0 is expressed as 172.31.210.10/24 in CIDR notation.
• 10.25.106.12 with subnet mask 255.255.240.0 is expressed as 10.25.106.12/20.
• 20 bits for network, 12 bits for hosts.
Subnetting …
Subnet Mask CIDR Prefix Subnet Mask CIDR Prefix
255.0.0.0 /8 255.255.224.0 /19 • The /8 through /15 can only be
used with Class A network
255.128.0.0 /9 255.255.240.0 /20
addresses.
255.192.0.0 /10 255.255.248.0 /21 • /16 through /23 can be used by
255.224.0.0 /11 255.255.252.0 /22 Class A and B network
255.240.0.0 /12 255.255.254.0 /23 addresses.
255.248.0.0 /13 255.255.255.0 /24 • /24 through /30 can be used by
255.252.0.0 /14 255.255.255.128 /25 Class A, B, and C network
255.254.0.0 /15 255.255.255.192 /26 addresses.
255.255.0.0 /16 255.255.255.224 /27 • This is a big reason why most
255.255.128.0 /17 255.255.255.240 /28 companies use Class A network
255.255.192.0 /18 255.255.255.248 /29 addresses.
• Since they can use all subnet
255.255.255.252 /30
masks, they get the maximum
flexibility in network design.
Subnetting …

FIGURE (a): One network

FIGURE (b): Multiple networks connected together


Subnetting …
• Broadcast Domains:
• All computers and devices with the same network ID in their IP address are in the same broadcast
domain.
• A broadcast domain defines which devices must receive a packet that’s broadcast by any other device.
• Each port on a router constitutes a broadcast domain because routers don’t forward broadcast
packets.
• TCP/IP communication relies heavily on broadcast packets to perform a variety of functions.
• For example, DHCP and ARP use broadcasts to perform their tasks.
• Every time a computer receives a broadcast packet, the NIC generates an interrupt, causing the CPU to
stop what it’s doing to read the packet.
• If the broadcast isn’t relevant to the computer, the packet is discarded.
• Now imagine 65,000 computers on the same broadcast domain; at any moment, several thousand are
sending broadcast packets.
• The amount of traffic generated and the additional CPU utilization would bring the network to a stop.
• Preventing this problem is one of the reasons to subnet. (first reason)
• Suppose we have 65,000 computers in an organization:
• Without subnetting: this is one large network with the network address 172.31.0.0/16.
• With subnetting: we can divide this very large network into many smaller subnets.
Subnetting …
• For example, we can use 172.31.0.0/24, 172.31.1.0/24, … up to 172.31.255.0/24.
• This subnetting, makes 256 smaller subnets with a maximum of 28 - 2, or 254, devices per subnet.
• The single broadcast domain is now subdivided into multiple (256) broadcast domains.
• In general, number of hosts per subnet for n host bits (0’s in the subnet mask): 2h – 2
• If a computer on one subnet needs to communicate with a computer on another subnet, the
packets are sent to a router that locates the subnet and forwards the data.
• Now the maximum size of your broadcast domain is only 254 computers, which is more
manageable.
• Analogy: 100 students, in 4 groups of 25 each, having its own topic of discussion
• [All 100 in a single room] Vs [4 rooms, one for each group]!
• Second reason to subnet: is to conserve IP addresses.
• In the past, if we had four Web servers and two routers that needed IP addresses, the only thing
an ISP had to do was to assign a class C network address consisting of 254 possible host
addresses, thereby wasting 248 addresses.
• By subnetting a network, the ISP can assign an address such as 198.60.123.0/29
• This uses only addresses 198.60.123.0 through 198.60.123.7, which satisfies the company’s needs and
• makes addresses 198.60.123.8 through 198.60.123.254 available for other customers.
Subnetting …
•• A
  third reason to subnet: is to divide a network into logical groups.
• One large network is divided into two or more smaller subnets
• A router serves as a security barrier between the two subnets
• Access control lists can be configured on it to restrict the type of network traffic traveling from one
subnet to another.
• Two approaches to subnetting:
1. To provide a network with a certain number of host addresses
2. To provide a network with a certain number of subnets
• Follow this process:
1. Decide how many subnets you need.
• Figure out the number of subnets needed by seeing how many network cable segments are or will
be connected to router interfaces.
• Each router interface connection indicates a required subnet.
2. Decide how many bits you need to meet the number of required subnets.
• Calculate , where is the number of subnets and is the number of bits to reallocate from host ID to
network ID.
Subnetting …
• Example
  1: starting network number is the Class B address 172.16.0.0, its default subnet
mask is 255.255.0.0, our starting point.
• The number of subnets you create is always a power of 2, so if you need 20 subnets, you must
reallocate:
• = = 5, (25 = 32) more than enough for 20 subnets
• Reallocating 4 bits gives only 24, or 16, subnets.
3. Reallocate bits from the host ID, starting from the most significant host bit (that is,
from the left side of the host ID).
4. Make sure you have enough host bits available to assign to computers on each subnet.
To determine the number of host addresses available, use the formula:
• 2n- 2, with n representing the number of host (0) bits in the subnet mask.
• Example: A company wants 60 subnets for its Class B address: 172.16.0.0/16.
• The nearest power of 2 to 60 is 64.
• This means you must reallocate 6 bits from the host portion of the original subnet mask
(255.255.0.0) and make them subnet bits.
Subnetting …
•• 11111111
  . 11111111 . 00000000 . 00000000 Original mask: 16 bits on (1), class B
255 . 255 . 0 . 0
• 11111111 . 11111111 . 11111100 . 00000000 Reallocated: 22 bits on (1), classless
255 . 255 . 252 . 0
• CIDR Notation: 172.16.0.0/22
• Calculate number of host addresses for each subnet
• Subtract the number of network ID bits from the total number of bits in an IP address:
• h = 32 – 22 = 10 or just take the number of 0 bits, which is 10.
• These are number of bits left for the host ID.
• Determine the number of host addresses: = addresses per subnet, which should be more than enough for
most networks.
• Next, determine network numbers that can be derived from this subnetting.
• To do this, take the reallocated 6 bits, place them in the network number, and cycle the 6 bits through
the possible combinations of values they represent.
• 000000, 000001, 000010, 000011, 000100, 000101, 000110, 000111, …
• Insert these into the network number to find all the networks (subnets)
• 172.16.00000000.00000000, 172.16. 00000100.00000000, 172.16. 00001000.00000000, …
Subnetting …
Subnetwork Number in Subnetwork Subnetwork Number in Subnetwork
Binary Address Binary Address
172.16.00000000.00000000 172.16.0.0 172.16.00110000.00000000 172.16.48.0
172.16.00000100.00000000 172.16.4.0 172.16.00110100.00000000 172.16.52.0
172.16.00001000.00000000 172.16.8.0 172.16.00111000.00000000 172.16.56.0
172.16.00001100.00000000 172.16.12.0 172.16.00111100.00000000 172.16.60.0
172.16.00010000.00000000 172.16.16.0 172.16.01000000.00000000 172.16.64.0
172.16.00010100.00000000 172.16.20.0 172.16.01000100.00000000 172.16.68.0
172.16.00011000.00000000 172.16.24.0 172.16.01001000.00000000 172.16.72.0
172.16.00011100.00000000 172.16.28.0 172.16.01001100.00000000 172.16.76.0
172.16.00100000.00000000 172.16.32.0 172.16.01010000.00000000 172.16.80.0
172.16.00100100.00000000 172.16.36.0 172.16.01010100.00000000 172.16.84.0
172.16.00101000.00000000 172.16.40.0 … …
172.16.00101100.00000000 172.16.44.0 172.16.11111100.00000000 172.16.252.0
Subnetting …
• Note: the subnet numbers increment by 4. This can be automatically understood by
looking at the rightmost bit’s place value. In this case it is 4.
Subnetwork Number in Subnetwork Valid Host Addresses
Binary Address
172.16.00000000.0000000 172.16.0.0 172.16.00000000.00000001 -
0 172.16.00000011.11111110
172.16.0.1 – 172.16.3.254
172.16.00000100.0000000 172.16.4.0 172.16.00000100.00000001 -
0 172.16.00000111.11111110
172.16.4.1 – 172.16.7.254
172.16.00001000.0000000 172.16.8.0 172.16.00001000.00000001 -
0 172.16.00001011.11111110
172.16.8.1 – 172.16.11.254
172.16.00001100.0000000 172.16.12.0 172.16.00001100.00000001 -
0 172.16.00001111.11111110
... … 172.16.12.1 – 172.16.15.254
172.16.11111100.0000000 172.16.252.0 172.16. 11111100.0000001 - 172.16. 11111111.11111110
0
Subnetting … The only class C subnet masks
• Binary Decimal CIDR 11100000 = 255.255.255.224 /27
00000000 = 255.255.255.0 /24 11110000 = 255.255.255.240 /28
10000000 = 255.255.255.128 /25 11111000 = 255.255.255.248 /29
11000000 = 255.255.255.192 /26 11111100 = 255.255.255.252 /30
• Fast Way: Five questions
1. How many subnets does the chosen subnet mask produce? 2n, n = number of masked bits (1s)
2. How many valid hosts per subnet are available? 2y – 2, y = number of unmasked bits (0s)
3. What are the valid subnets? 256 – subnet mask = block size (increment number)
• 256 – 252 = 4 in the previous example.
4. What’s the broadcast address of each subnet? is always the number right before the next subnet.
• Broadcast address for subnet 172.16.8.0 is: 172.16.11.255
• Broadcast address for subnet 172.16.48.0 is: 172.16.51.255
• Broadcast address for subnet 172.16.192.0 is: 172.16.195.255
5. What are the valid hosts in each subnet? Are the numbers between the subnets. i.e. numbers between subnet
address and broadcast address.
• Valid hosts in subnet 172.16.8.0: 172.16.8.1 – 172.16.11.254
Subnetting …
• Subnetting Example 2: Class C Addresses
• 192.168.10.0/25 (255.255.255.128)
• 128 is 10000000 in binary, there is only 1 bit for subnetting and 7 bits for hosts.
• Subnet the Class C network address 192.168.10.0.
• 192.168.10.0 = Network address
• 255.255.255.128 = Subnet mask
1. How many subnets does the chosen subnet mask produce? 21 = 2
2. How many valid hosts per subnet are available? 27 – 2 = 126 (always = block size – 2)
3. What are the valid subnets? 256 – 128 = 128 = block size (increment number)
• Subnets are: 0 and 128 (192.168.10.0 and 192.168.10.128)
4. What’s the broadcast address of each subnet?
• Broadcast address for subnet 192.168.10.0, broadcast address is: 192.168.10.127
• Broadcast address for subnet 192.168.10.128, broadcast address is: 192.168.10.255
5. What are the valid hosts in each subnet?
• Valid hosts in subnet 192.168.10.0: 192.168.10.1 – 192.168.10.126
• Valid hosts in subnet 192.168.10.128: 192.168.10.129 – 192.168.10.254
192.168.10.0/25

• Example #3: Class C Address, 192.168.10.0/27 (255.255.255.224)


1. How many subnets does the chosen subnet mask produce? 23 = 8
2. How many valid hosts per subnet are available? 25 – 2 = 30 (always = block size – 2)
3. What are the valid subnets? 256 – 224 = 32 = block size (increment number)
Subnets are: 0, 32, 64, 96, 128, 160, 192, 224
4. What’s the broadcast address of each subnet?
Broadcast address for subnet 192.168.10.0, broadcast address is: 192.168.10.31
Broadcast address for subnet 192.168.10.32, broadcast address is: 192.168.10.63
Broadcast address for subnet 192.168.10.64, broadcast address is: 192.168.10.95 …
5. What are the valid hosts in each subnet? IPv4 configuration
for PC2
Valid hosts in subnet 192.168.10.0: 192.168.10.1 – 192.168.10.30 (1st subnet)
Valid hosts in subnet 192.168.10.32: 192.168.10.33 – 192.168.10.62 (2nd subnet)
Valid hosts in subnet 192.168.10.64: 192.168.10.65 – 192.168.10.94 (3rd subnet) …
Subnetting …

Table: All the subnets for the


255.255.255.224 Class C subnet
mask

FIGURE: Implementing a
Class C /27 logical network
Subnetting …
• Subnetting Example 3: Class C Addresses
• 192.168.10.0/28 (255.255.255.240)
• Subnet the Class C network address 192.168.10.0.
• Subnet mask = 255.255.255.240
• How many subnets does the chosen subnet mask produce? 24 = 16
1. How many valid hosts per subnet are available? 24 – 2 = 14 (block size – 2)
2. What are the valid subnets? 256 – 240 = 16 = block size (increment number)
• Subnets are: 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240
3. What’s the broadcast address of each subnet?
• Broadcast address for subnet 192.168.10.0 is: 192.168.10.15
• Broadcast address for subnet 192.168.10.16 is: 192.168.10.31 …
4. What are the valid hosts in each subnet?
• Valid hosts in subnet 192.168.10.0: 192.168.10.1 – 192.168.10.14
• Valid hosts in subnet 192.168.10.128: 192.168.10.17 – 192.168.10.30 …
Subnetting …
Table: Subnets, hosts, and broadcast addresses provided from a Class C 255.255.255.240 mask
Subnet 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240
First Host 1 17 33 49 65 81 97 113 129 145 161 177 193 209 225 241
Last Host 14 30 46 62 78 94 110 126 142 158 174 190 206 222 238 254
Broadcast 15 31 47 63 79 95 111 127 143 159 175 191 207 223 239 255

• Subnetting Example 4: Given the class C address 50 with subnet mask 255.255.255.224
• First determine the subnet where the IP address belongs.
• Block size = 256 – 224 = 32
Where would .138
• Subnets are: 0, 32, 64, 96, … , 224 (total: 8 subnets)
be? And .205?
• Our 50 falls between 32 and 64, and must be part of the 192.168.10.32 subnet.
• Next subnet is 64, so the broadcast address of our subnet is 192.168.10.63.
• Valid host ranges: between subnet address and broadcast address: 192.168.10.33 – 192.168.10.62
• Subnetting Example 5: Given Class C address 192.168.10.50 and subnet mask 255.255.255.240
• Block size = 256 – 240 = 16
• Subnets are: 0, 16, 32, 48, 64, 80, 96, … , 240 (total: 16 subnets)
• Our 50 falls between 48 and 64, and must be part of the 192.168.10.48 subnet. Where would .174
• Next subnet is 64, so the broadcast address of our subnet is 192.168.10.63. be? And .191?
• Valid host ranges: 192.168.10.49 – 192.168.10.62 (total: 14 hosts)
Subnetting …
• Subnetting Class B Addresses
• All the possible Class B subnet masks: a lot more subnet masks than we have with Class C
• 255.255.0.0 (/16) 255.255.252.0 (/22) 255.255.255.192 (/26)
• 255.255.128.0 (/17) 255.255.254.0 (/23) 255.255.255.224 (/27)
• 255.255.192.0 (/18) 255.255.248.0 (/21) 255.255.255.240 (/28)
• 255.255.224.0 (/19) 255.255.255.0 (/24) 255.255.255.248 (/29) 255.255.240.0
(/20) 255.255.255.128 (/25) 255.255.255.252 (/30)
• Remember the Class B network address has 16 bits available for host addressing.
• This means we can use up to 14 bits for subnetting because we need to leave at least 2 bits for host
addressing.
• The process of subnetting a Class B network is similar to Class C, except that you have more host bits
and you start in the third octet.
• Use the same subnet numbers for the third octet with Class B that you used for the fourth octet with
Class C, but add a zero to the network portion and a 255 to the broadcast section in the fourth octet.
• For example: consider this /20 (255.255.240.0):
Subnetting …
• Example 1B: 172.16.0.0, 255.255.128.0 (/17)
• Number of Subnets: 21 = 2, number of hosts: 215 – 2 = 32,766
• Block size: 256 – 128 = 128, Subnets: 172.16.0.0, 172.16.128.0 (same numbers as a Class C 240
mask, except that we put them in the 3rd octet!)
• Broadcast addresses: 172.16.127.255 and 172.16.255.255
• Example 2B: 172.16.0.0, 255.255.192.0 (/18)
• Number of Subnets: 22 = 4, number of hosts: 214 – 2 = 16,382
• Block size: 256 – 192 = 64, Subnets: 172.16.0.0, 172.16.64.0, 172.16.128.0, 172.16.192.0 (same
numbers as a Class C 240 mask, except that we put them in the 3rd octet!)
• Broadcast addresses: 172.16.63.255, 172.16.127.255, 172.16.191.255, 172.16.255.255
Subnetting …
• Example 3B: 172.16.0.0, 255.255.240.0 (/20)
• Number of Subnets: 24 = 16, number of hosts: 212 – 2 = 4094
• Block size: 256 – 240 = 16, subnets: 172.16.0.0, 172.16.16.0, 172.16.32.0, … , 172.16.240.0 (same
numbers as a Class C 240 mask, we just put them in the 3rd octet!)
• Broadcast addresses: 172.16.15.255, 172.16.31.255, 172.26.47.255, …, 172.16.255.255

• Example 4B:172.16.0.0, 255.255.254.0 (/23)


• Number of Subnets: 27 = 128, number of hosts:
29 – 2 = 510
• Block size: 256 – 254 = 2
• Subnets: 0.0, 2.0, 4.0, 6.0, 8.0, …, 254.0
• Broadcast addresses: 1.255, 3.255, 5.255, 7.255,
…, 255.255
Subnetting …
• Example 5B: 172.16.0.0, 255.255.255.0 (/24): This is a Class B subnet mask with 8 bits of
subnetting—it’s logically different from a Class C mask.
• Number of Subnets: 28 = 256, number of hosts: 28 – 2 = 254
• Block size: 256 - 255 = 1, Subnets: 172.16.0.0, 172.16.1.0, 172.16.2.0, 172.16.3.0, …, 172.16.255.0
• Broadcast addresses: 172.16.0.255, 172.16.1.255, 172.16.2.255, 172.16.3.255, …, 172.16.255.255
• Valid hosts: 172.16.0.1 – 172.16.0.254, 172.16.1.1 – 172.16.1.254, 172.16.2.1 – 172.16.2.254, …
Subnetting …
• Example 6B: 172.16.0.0, 255.255.255.224 (/27)
• Number of Subnets: 211 = 2048, number of hosts: 25 – 2 = 30
• Block size: 256 – 224 = 32, subnets: 0.0, 0.32, 0.64, 0.96, 0.128, 0.160, 0.192, 0.224, 1.0, 1.32, … ,
255.192, 255.224
• Broadcast addresses: 0.31, 0.63, 0.95, 0.127, 0.159, 0.191, 0.223, 0.255, 1.31, 1.63, … 255.223,
255.255
• Tables: The first eight and last eight subnets
Subnetting …
• Example 7B: What is the subnet and broadcast address of the subnet in which 172.16.10.33 /27
resides?
• Interesting octet is the 4th one. Block size: 256 – 224 = 32. 0, 32, 64, 96, …
• Subnet: 172.16.10.32, broadcast address: 172.16.10.63, since 10.64 is the next subnet.
• Example 8B: What subnet and broadcast address is the IP address 172.16.66.10 255.255.192.0
(/18) a member of?
• Interesting octet is 3rd one! 256 – 192 = 64. 0, 64, 128, 192, …
• Subnet is: 172.16.64.0 (hosts range: 172.16.64.1 – 172.16.127.254)
• Broadcast address: 172.16.127.255
• Example 9B: What subnet and broadcast address is the IP address 172.16.50.10 255.255.224.0
(/19) a member of?
• Interesting octet is 3rd one! 256 – 224 = 32. 0, 32, 64, 96, …
• Subnet is: 172.16.32.0 (hosts range: 172.16.32.1 – 172.16.63.254)
• Broadcast address: 172.16.63.255
Subnetting …
• Example 10B: What subnet and broadcast address is the IP address 172.16.45.14
255.255.255.252 (/30) a member of?
• Interesting octet is 4th one! 256 – 252 = 4. 0, 4, 8, 12, 16, 20, …
• Subnet is: 172.16.45.12 (hosts range: 172.16.45.13 – 172.16.45.14)
• Broadcast address: 172.16.45.15 (because the next subnet is 172.16.45.16)
• Example 10B: What is the subnet and broadcast address of the host 172.16.88.255/20?
• /20 = 255.255.240.0, Interesting octet 240. block size = 256 – 240 = 16. 172.16.0.0, 172.16.16.0,
172.16.32.0, 172.16.48.0, 172.16.64.0, 172.16.80.0, 172.16.96.0, …
• 88 is between 80 and 96 so the subnet is 172.16.80.0 with host ranges: 172.16.80.1 –
172.16.95.254, and broadcast address is 172.16.95.255.
• Example 11B: A router receives a packet on an interface with a destination address of
172.16.46.191/26. What will the router do with this packet?
• /26 = 255.255.255.192, interesting octet = 192, 256 – 192 = 64. 0, 64, 128, 192
• 172.16.46.191 is in subnet 172.16.46.128, and it is the broadcast address! Hence the router
discards any broadcast packet!
Subnetting …
• Subnetting Class A Addresses: 24 bits to use here!
MASK CIDR MASK CIDR MASK CIDR
255.0.0.0 /8 255.255.0.0 /16 255.255.255.0 /24
255.128.0.0 /9 255.255.128.0 /17 255.255.255.128 /25
255.192.0.0 /10 255.255.192.0 /18 255.255.255.192 /26
255.224.0.0 /11 255.255.224.0 /19 255.255.255.224 /27
255.240.0.0 /12 255.255.240.0 /20 255.255.255.240 /28
255.248.0.0 /13 255.255.248.0 /21 255.255.255.248 /29
255.252.0.0 /14 255.255.252.0 /22 255.255.255.252 /30
255.254.0.0 /15 255.255.254.0 /23

• We have more host bits and we use the same subnet numbers we used with Class B and C, but we start using these
numbers in the second octet.
• However, the reason Class A addresses are so popular to implement is because they give the most flexibility.
• You can subnet in the second, third or fourth octet.
Subnetting …
• Example 1A: 10.0.0.0, 255.255.0.0
• The 255.255.0.0 mask with a Class A address is using 8 subnet bits:
• Subnets? 28 = 256, hosts = 216 – 2 = 65,534.
• Interesting octet: 255, hence 256 – 255 = 1. 0, 1, 2, 3, … (all in the second octet!)
• So the subnets will be: 10.0.0.0, 10.1.0.0, 10.2.0.0, 10.3.0.0, …, 10.255.0.0

• Example 2A: 10.0.0.0, 255.255.240.0 (/20)


• Subnets? 212 = 4096,
• hosts = 212 – 2 = 4094.
• Interesting octet: 240.
• 256 – 240 = 16
• Subnet in the second octet has a block size of 1, and that in the third has a block size of 16.
Subnetting …
• Example 2A: If network host ID is 10.20.80.30 /20, what is your subnet, broadcast address, and
valid host range?
• 255.255.240.0, the subnet in the second octet is 20 with a block size of 1, but the third octet is in
block sizes of 16.
• So we have subnets: 0, 16, 32, 48, 64, 80, 96…
• So our subnet is: 10.20.80.0, with range of hosts: 10.20.80.1 – 10.20.95.254.
• Broadcast address: 10.20.95.255 (next subnet is 10.20.96.0)
• Example 2A: If network host ID is 10.1.3.65/23
• 255.255.254.0, interesting octet = 254, hence 256 – 254 = 2. 0, 2, 4, 6, 8, 10, …, 254
• 10.1.2.0 is our subnet, with ranges 10.1.2.1 – 10.1.3.254, and
• Broadcast address: 10.1.3.255, because next subnet is 10.1.4.0
Subnetting …
• Creating 1000 Subnets with a /8 Network
Practical Examples of Subnets
• An enterprise is using the private network address 192.168.1.0/24 range and requires three
subnets.

• Borrowing 1 bit is not enough. So we borrowed 2 bits from host portion, hence creating 22 = 4
subnets.
• 255.255.255.1100 0000, since last 1’s bit position value is 64, our subnets are: .0, .64, .128 and .
192
128
64
Practical Examples of Subnets
• d
IPv6
• Overview
• The Internet Engineering Task Force (IETF) started development on IPng (IP next generation) in 1994,
and it was later named IPv6.
• IPv6 was developed to address IPv4’s shortcomings.
• Some improvements and changes in IPv6 include the following:
1. Larger address space—IPv4 addresses are 32 bits, which provide a theoretical four billion addresses.
IPv6 addresses are 128 bits, so the number of possible addresses can be expressed as 34 followed by
37 0s, or 340 trillion trillion trillion.
2. Hierarchical address space—Unlike IPv4, in which numbers in the address have little meaning other
than the address class, and the network ID and host ID, IPv6 addresses have a more defined
structure.
• For example, the first part of an address can indicate a particular organization or site.
3. Autoconfiguration—IPv6 can be self-configuring or autoconfigured from a router or server running
IPv6 or through DHCPv6.
4. Built-in quality of service (QoS) support—IPv6 includes built-in fields in packet headers to support
QoS strategies (used to prioritize data packets based on the type or urgency of information they
contain) without having to install additional protocol components, as IPv4 does.
IPv6 …
5. Built-in support for security—From the ground up, IPv6 is built to support secure protocols,
such as Internet Protocol Security (IPsec), whereas IPv4’s support for IPsec is an add-on
feature.
6. Support for mobility—With built-in support for mobility, routing IPv6 packets generated by
mobile devices over the Internet is more efficient than with IPv4.
7. Extensibility—IPv6 uses extension headers instead of IPv4’s fixed-size 40-byte header.
Extension headers allow adding features to IPv6 simply by adding a new header.
• IPv6 Address Structure
• With IPv6 subnetting is not as difficult as it is in IPv4.
• IPv6 addresses are written as eight 16-bit hexadecimal numbers separated by colons.
• E.g. fe80:0:0:0:18ff:0024:8e5a:60
• Pv6 addresses often have several 0 values. One or more consecutive 0 values can be written as a
double colon (::).
• Our example address can be written asfe80::18ff:0024:8e5a:60.
• However, you can have only one double colon in an IPv6 address.
IPv6 …
• Leading 0s are optional.
• The value 0024 in the previous example could just as easily have been written as 24, and the value 60
could have been written as 0060.
• The hexadecimal numbering system was chosen to represent IPv6 addresses mostly because
it’s much easier to convert to binary than decimal is.
• Each hexadecimal digit represents 4 bits, so to convert an IPv6 address to binary, simply
convert each hexadecimal digit (accounting for leading 0s) to its binary equivalent.
• For example, the first field in the preceding address (fe80) can be written as follows:
•1111 1110 1000 0000
f e 8 0
• IPv6 addresses have a prefix length that is always 64 for host addresses because in IPv6, all
network IDs are 64 bits.
• So a typical IPv6 address can be written as follows:
• fe80:0:0:0:18ff:0024:8e5a:60/64
• However, because the prefix is always 64 for an IPv6 host address, the prefix is often omitted.
IPv6 …
• The IPv6 Interface ID
• Because the prefix length (network ID) of an IPv6 address is, 64 bits, the interface ID (the
host ID in IPv4) is also 64 bits.
• So you can easily identify the network ID of an IPv6 address by looking at the first 64 bits
(16 hex digits or four fields) and the interface ID by looking at the last 64 bits.
• Example: in the address fe80:0:0:0:18ff:0024:8e5a:60
• The network ID is fe80:0:0:0, and the interface ID is 18ff:0024:8e5a:60.
• An IPv6 interface ID can be assigned to a host in these ways:
1. Using the 48-bit MAC address—Because a MAC address is only 48 bits, the other 16
bits come from the value fffe inserted after the first 24 bits of the MAC address.
• In addition, the first two 0s that compose most MAC addresses are replaced with 02.
• Example: given the MAC address 00-0C-29-7C-F9-C4, the host ID of an IPv6 address is
020c:29ff:fe7c:f9c4.
• This autoconfigured 64-bit host ID is called an Extended Unique Identifier (EUI)-64 interface
ID.
IPv6 …
2. A randomly generated permanent interface identifier
• The interface ID is generated randomly but is a permanent assignment maintained through
system restarts.
• Windows Vista and later use this method by default for permanent interfaces, such as Ethernet
ports.
• However, you can have Windows use EUI-64 addresses with this netsh command:
netsh interface ipv6 set global randomizeidentifiers=disabled
3. A temporary interface identifier
• Some connections, such as dial-up Point-to-Point Protocol (PPP) connections, might use this
method for interface IPv6 address assignment, whereby the interface ID is assigned randomly
and changes each time IPv6 is initialized to maintain anonymity.
4. Via DHCPv6
• Addresses are assigned via a DHCPv6 server to IPv6 interfaces when they’re initialized.
5. Manually
• Similar to IPv4 configuration, the IPv6 address is entered manually in the interface’s Properties
dialog box.
IPv6 …
IPv6 Address Types
• IPv4 defines unicast, multicast, and broadcast addresses, and
• IPv6 defines unicast, multicast, and anycast addresses.
1. IPv6 Unicast Addresses
• A unicast address specifies a single interface on a device.
2. Link-Local Addresses
• Addresses starting with fe80 are called link-local IPv6 addresses and are self-configuring.
• Link-local addresses can’t be routed and are somewhat equivalent to Automatic Private IP Addressing (APIPA) in IPv4.
3. Unique Local Addresses
• Unique local IPv6 addresses are analogous to the familiar private IPv4 addresses
• Unique local IPv6 addresses are analogous to the familiar private IPv4 addresses
4. Global unicast Addresses
• Are analogous to public IPv4 addresses.
• They are accessible on the public Internet and can be routed.
• Essentially, an IPv6 address is global if it doesn’t fall into one of the other categories of address (special use,
link-local, unique local, loopback, transition, and so forth).
• IPv6 addresses have one sizable advantage over IPv4 addresses, aside from the much larger address space; a
structure, or a hierarchy, can be built into them that allows more efficient routing on the Internet.

You might also like