CN
1. Communication Networks (CN) Basics
Definition: A collection of computers that are interconnected
to exchange information. They can be connected by various
technologies like copper wire, optical fiber, or radio waves,
regardless of their location.
Uses:
o Business Applications: Sharing resources like printers
and databases, daily communication through email and
video conferencing, and conducting business
electronically (e.g., e-commerce).
o Home Applications: Accessing remote information,
person-to-person communication (chat rooms, social
media), interactive entertainment (video on demand), and
e-commerce.
o Social Issues: Networking has introduced new social,
ethical, and political problems, such as identity theft and
contentious online discussions on topics like politics and
religion.
2. Network Types & Hardware
Network Categories by Scale:
o Personal Area Networks (PANs): Very small networks
with a range of about 1 meter, connecting devices within a
single person's workspace, such as a computer with its
peripherals.
o Local Area Networks (LANs): Networks that span a
limited area like a room, building, or campus.
o Metropolitan Area Networks (MANs): Cover a larger
area, such as a city.
o Wide Area Networks (WANs): Span large geographical
areas like countries or continents. The Internet is a WAN.
Network Hardware Devices:
o Network Interface Cards (NIC): Provides a computer
with a dedicated connection to a network. It has a unique
MAC address and implements the physical layer circuitry.
o Repeater: An analog device that regenerates a signal to
extend its transmission distance. It operates at the
physical layer.
o Bridge: Connects similar LAN segments at the data link
layer. It uses MAC addresses to forward data frames and
can isolate data traffic.
o Hub: A multi-port repeater that operates at the physical
layer. It's the center of a star network, but it sends data
packets to all connected devices, making it slow and
insecure.
o Switch: A multi-port bridge that operates at the data link
layer. It's a faster and more secure replacement for hubs,
as it forwards packets selectively to the correct port after
performing error checking.
o Router: A network layer device that routes data packets
based on their IP addresses. It connects different
networks, such as LANs and WANs.
o Gateway: Connects two dissimilar networks by translating
between different protocols and data formats.
o Firewall: A security device that filters incoming network
traffic to protect a network from unwanted packets.
o Modem: Converts digital signals into analog signals for
transmission and vice versa.
o RJ45: A physical interface used for terminating twisted-
pair cables.
3. Network Topologies
Definition: The physical or logical layout of a network, defining
how devices are connected.
Bus Topology: A single backbone cable connects all nodes.
o Advantages: Easy to set up, minimal wiring.
o Disadvantages: Performance decreases with more traffic,
easy to crash, poor security.
Star Topology: All devices connect to a central hub.
o Advantages: Easy to set up, a single cable failure won't
crash the network.
o Disadvantages: The central hub crashing brings down the
entire network, uses a lot of cable.
Ring Topology: Devices are connected to form a ring, and
data flows in one direction using tokens.
o Advantages: No data collisions, predictable timing for data
transmission.
o Disadvantages: Slow, a single node failure can cause the
entire network to fail.
Mesh Topology: Each device has a point-to-point connection
to every other device.
o Advantages: High redundancy and fault tolerance, good
security and privacy.
o Disadvantages: Requires a lot of cable, expensive, hard to
set up.
Hybrid Topology: A combination of two or more topologies.
o Advantages: Reliable, scalable, and flexible.
o Disadvantages: Complex design, expensive.
4. Network Software and Protocols
Layered Architecture: Networks are organized as a stack of
layers. Each layer performs a specific, well-defined function
and offers services to the layer above it.
Service vs. Protocol:
o Service: A set of operations that a layer provides to the
layer above it. It defines
what the layer does.
o Protocol: A set of rules that a layer uses to exchange
information with its peer on another machine. It defines
how the layer performs its function.
OSI Reference Model: A seven-layer model to standardize
networking.
1. Physical: Moves individual bits between nodes.
2. Data Link: Moves frames (blocks of information) between
adjacent nodes and handles flow control.
3. Network: Delivers individual packets from a source to a
destination host, handling routing and congestion control.
4. Transport: Delivers messages between processes on the
source and destination machines (end-to-end delivery).
5. Session: Establishes and manages sessions between
users on different machines, controlling data exchange
and synchronization.
6. Presentation: Handles the syntax and semantics of the
transmitted information, including translation,
compression, and encryption.
7. Application: Provides services to the user's applications,
such as HTTP for web browsing.
TCP/IP Reference Model: A four-layer model that is widely
used in practice.
o Host-to-Network Layer: Deals with how a host connects
to a network and sends IP packets.
o Internet Layer: Delivers IP packets to the destination and
handles routing and congestion avoidance.
o Transport Layer: Enables conversation between
processes on source and destination hosts. It has two
main protocols:
TCP (reliable, connection-oriented) and UDP (unreliable,
connectionless).
oApplication Layer: Contains higher-level protocols like
FTP, SMTP, HTTP, and DNS.
Addressing in TCP/IP: Four types of addresses are used.
1. Physical Addresses: Used at the data link layer (e.g., a
48-bit MAC address).
2. Logical Addresses: Used at the network layer (e.g., an
IP address).
3. Port Addresses: Used at the transport layer to identify a
specific process on a machine.
4. Application-Specific Addresses: Used for identifying
resources in the application layer.
5. Physical Layer Details
Wire Propagation Effects: When signals travel through a
physical medium, they are affected by:
o Attenuation: Loss of signal energy over distance.
o Distortion: The signal changes its shape or form.
o Noise: Unwanted signals like thermal noise, crosstalk,
and impulse noise.
Maximum Data Rate:
o Nyquist's Theorem (Noiseless Channel): C=2Hlog2V.
o Shannon's Limit (Noisy Channel): C=Hlog2(1+S/N). The
final channel capacity is the smaller of these two values.
Multiplexing vs. Multiple Access:
o Multiplexing: Combines multiple independent signals into
a single composite signal for transmission over a common
channel.
o Multiple Access: Allows multiple users to access a
shared channel or link.
Multiplexing Techniques:
o Frequency Division Multiplexing (FDM): Uses non-
overlapping frequency ranges for each user. It's an analog
technique and requires guard bands to prevent
interference.
o Time Division Multiplexing (TDM): Divides transmission
time into slots and gives each user a turn. It's a digital
technique.
Synchronous TDM: Allocates a fixed time slot to
each user.
Statistical TDM: Allocates slots dynamically based
on need.
o Wavelength Division Multiplexing (WDM): An analog
technique for optical fiber that uses different wavelengths
(frequencies) of light for each signal.
o Code Division Multiplexing (CDM): An advanced
technique where multiple devices can transmit
simultaneously on the same frequency using unique
codes. It's used in mobile communications.
6. Switching Techniques
Circuit Switching: A dedicated, end-to-end path is
established for the entire communication duration.
o Advantages: The communication channel is dedicated.
o Disadvantages: Inefficient use of the channel, as it's not
used when no data is being sent.
Message Switching: Messages are sent as a whole from
node to node, stored completely at each node, and then
forwarded. It's a "store-and-forward" network.
o Advantages: Can reduce traffic congestion by temporarily
storing messages.
o Disadvantages: Not good for real-time applications due to
delays; requires large storage capacity at each node.
Packet Switching: Data is divided into small packets, each
with the sender and receiver's addresses. Packets can travel
independently and may not arrive sequentially.
o Datagram: Each packet is a self-contained unit and can
take a different path through the network. Packets may
arrive out of order and must be reordered at the
destination.
o Virtual Circuit: A preplanned route is established before
data is sent, so all packets follow the same path. This
guarantees that packets arrive in the correct order with no
duplicates or errors.
o Advantages: Cost-effective and more efficient than circuit
switching; packets can be rerouted if there's a problem.
o Disadvantages: Protocols are more complex; systems
may not be suitable for applications requiring very low
delay, like voice calls