Introduction To Network
Introduction To Network
1. Bus Topology:
All devices are connected to a central cable, known as the bus or backbone.
Data is transmitted in both directions from one end to the other.
Easy to install and cost-effective for small networks, but if the main cable fails,
the entire network can be affected.
2. Star Topology:
3. Ring Topology:
Each device is connected to exactly two other devices, forming a closed loop.
Data travels in one direction around the ring.
If one device or connection fails, it can disrupt the entire network.
Less common in modern networks due to its vulnerability to failures.
4. Mesh Topology:
5. Hybrid Topology:
1. Physical Layer: Deals with the physical connection between devices and
transmission of raw data bits over a physical medium.
2. Data Link Layer: Manages the communication between neighboring network
devices, ensuring data is delivered error-free across the physical layer.
3. Network Layer: Handles routing and forwarding of data packets across
different networks, using logical addressing and routing protocols.
4. Transport Layer: Provides reliable data transfer services between devices,
ensuring data integrity and flow control.
5. Session Layer: Establishes, manages, and terminates sessions between
applications on different devices.
6. Presentation Layer: Translates, encrypts, and compresses data to ensure it
is presented correctly to the application layer.
7. Application Layer: Provides network services directly to user applications,
allowing access to network resources.
Data link layer functionality: The data link layer in a computer network provides
reliable data transfer across a physical link, ensuring error-free transmission between
adjacent network devices. Its key functionalities include:
1. Frame Creation and Encapsulation: Divides data into frames and adds
headers and trailers to each frame for transmission.
2. Error Detection and Correction: Detects and sometimes corrects errors that
may occur during data transmission using techniques like CRC (Cyclic
Redundancy Check).
3. Flow Control: Regulates the flow of data between devices to ensure that the
sender does not overwhelm the receiver.
4. Access Control: Manages access to the physical medium, especially in shared
media environments, to avoid collisions.
5. Link Layer Addressing: Assigns unique MAC (Media Access Control)
addresses to devices for identification within the local network.
6. Logical Link Control: Provides services to the network layer, including framing,
error checking, and flow control.
Multiple access techniques: Multiple access techniques refer to methods for allowing
multiple devices to share the same communication medium in a computer network.
Here are some common multiple access techniques:
Devices listen to the medium before transmitting. If the medium is busy, they wait
for it to become idle before transmitting.
Variants include CSMA/CD (Collision Detection), used in Ethernet networks,
where devices detect collisions and retransmit after a random backoff period.
2. Token Passing:
A token circulates among devices in a predefined sequence. Only the device with
the token can transmit data.
Used in Token Ring networks to prevent collisions and manage access control.
Divides the channel into frequency bands. Each device is allocated a unique
frequency band for transmitting data.
Commonly used in cellular networks to separate different users by frequency.
Circuit Switching:
Packet Switching:
Concept: Breaks data into packets that are independently routed from source to
destination.
Operation: Each packet travels through the network independently and may take
different paths.
Characteristics: Efficient use of network resources, better suited for bursty data.
Example: Internet Protocol (IP) networks use packet switching for data
transmission.
Comparison:
Resource Allocation: Circuit switching allocates resources upfront for the entire
communication, while packet switching dynamically shares resources as needed.
Efficiency: Packet switching is generally more efficient for handling varying
traffic loads and prioritizing different types of data.
Flexibility: Packet switching allows for flexible routing and scalability compared
to the fixed path of circuit switching.
LAN Technologies: LAN (Local Area Network) technologies are used to connect
devices within a limited geographical area, such as an office building, school campus, or
home. Some common LAN technologies include:
1. Ethernet:
o Description: Most widely used LAN technology.
o Operation: Uses CSMA/CD (Carrier Sense Multiple Access with Collision
Detection) for media access control.
o Speeds: Common speeds include 10 Mbps (Ethernet), 100 Mbps (Fast
Ethernet), 1 Gbps (Gigabit Ethernet), and higher.
o Media: Uses twisted pair cables (e.g., Cat 5e, Cat 6) or fiber optic cables.
o Applications: Suitable for both small-scale and large-scale networks.
2. Wi-Fi (Wireless LAN):
o Description: Wireless LAN technology based on IEEE 802.11 standards.
o Operation: Uses radio waves for communication between devices and
access points.
o Speeds: Various standards (e.g., 802.11n, 802.11ac) offer different
speeds (up to several Gbps).
o Media: Airwaves (radio frequency spectrum).
o Applications: Provides flexibility and mobility, commonly used in homes,
offices, and public places.
3. Token Ring:
o Description: Older LAN technology using token passing access method.
o Operation: Devices pass a token around the network to control access to
the shared medium.
o Speeds: Typically operated at 4 Mbps or 16 Mbps.
o Media: Uses twisted pair cables or shielded cables.
o Applications: Less commonly used today compared to Ethernet and Wi-
Fi.
4. FDDI (Fiber Distributed Data Interface):
o Description: LAN technology using fiber optics for high-speed data
transmission.
o Operation: Uses token passing for medium access control.
o Speeds: Operates at speeds of 100 Mbps.
o Media: Fiber optic cables.
o Applications: Historically used in backbone networks, now largely
replaced by Ethernet.
1. Uniqueness: Each network device (e.g., network interface card - NIC) has a
globally unique MAC address burned into its hardware by the manufacturer.
2. Format: MAC addresses are 48 bits (6 bytes) long, typically represented as six
groups of two hexadecimal digits separated by colons or hyphens (e.g.,
00:1A:2B:3C:4D:5E).
3. Role: MAC addresses are used at the data link layer (Layer 2 of the OSI model)
to uniquely identify devices on the same physical network segment.
4. Function: MAC addresses are used by network protocols like Ethernet to deliver
data packets to the correct destination within a LAN, regardless of the higher-
layer IP address.
5. Examples: Used in Ethernet LANs, Wi-Fi networks, and other technologies
where devices need to communicate within a local network.
1. Router:
o Function: Connects multiple networks and routes data between them
based on IP addresses.
o Features: Provides firewall security, network address translation (NAT),
and port forwarding.
2. Switch:
o Function: Connects devices within a local area network (LAN) and
forwards data based on MAC addresses.
o Features: Improves network efficiency by reducing collisions and
optimizing bandwidth usage.
3. Hub:
o Function: Connects multiple Ethernet devices, allowing them to
communicate with each other.
o Features: Operates at the physical layer (Layer 1) of the OSI model and
simply broadcasts data to all connected devices.
4. Access Point (AP):
o Function: Enables wireless devices to connect to a wired network using
Wi-Fi.
o Features: Supports IEEE 802.11 standards and provides wireless
coverage within a specified area.
5. Modem:
o Function: Converts digital data from a computer into analog signals for
transmission over telephone lines (for DSL) or cable lines (for cable
internet).
o Features: Provides Internet connectivity by communicating with the
Internet Service Provider (ISP).
6. Firewall:
o Function: Protects a network by filtering and controlling incoming and
outgoing network traffic based on predetermined security rules.
o Features: Prevents unauthorized access, monitors traffic, and detects
potential threats.
7. Bridge:
o Function: Connects two or more network segments and forwards data
between them based on MAC addresses.
o Features: Helps reduce network traffic by dividing a larger network into
smaller segments.
IPv4 and IPv6: IPv4 (Internet Protocol version 4) and IPv6 (Internet Protocol version 6)
are two versions of the Internet Protocol used for identifying and addressing devices on
a network. Here’s a short comparison:
IPv4:
IPv6:
Summary:
IPv4 is the traditional and still dominant protocol but faces address depletion
issues.
IPv6 offers a larger address space and additional features to meet the growing
demands of internet-connected devices.
IP Addressing: IP (Internet Protocol) addressing is a fundamental aspect of computer
networking, allowing devices to communicate with each other within a network or across
different networks. Here’s a concise overview of IP addressing:
Sub netting: Sub netting is the process of dividing a single, large network into smaller,
more manageable sub-networks (subnets). Here’s a concise overview:
1. Purpose: Sub netting allows for efficient use of IP addresses and better
management of network resources by dividing a large network into smaller
segments.
2. Subnet Mask: Determines the boundary between the network portion and the
host portion of an IP address. It is used in conjunction with IP addresses to
define subnets.
3. Benefits:
o Address Efficiency: Reduces wastage of IP addresses by allocating
them more effectively.
o Network Management: Facilitates better organization and administration
of network resources.
o Traffic Control: Improves network performance by controlling and
isolating traffic within smaller segments.
4. Process:
o Choose a suitable subnet mask based on the number of required subnets
and hosts per subnet.
o Apply the subnet mask to the IP addresses to determine the network and
host portions.
o Assign IP addresses to devices within each subnet accordingly.
5. Example:
o An organization may subnet a network to create separate subnets for
different departments (e.g., Sales, Marketing, IT), each with its own range
of IP addresses.
Ports and Sockets: In computer networking, ports and sockets are fundamental
concepts that facilitate communication between applications over a network. Here’s a
brief explanation:
1. Port:
o Definition: Ports are virtual endpoints within a host that applications use
to identify specific processes or services.
o Range: Ports are numbered from 0 to 65535.
o Usage: Well-known ports (0-1023) are reserved for commonly used
services (e.g., HTTP on port 80, FTP on port 21). Registered ports (1024-
49151) are assigned by IANA (Internet Assigned Numbers Authority) for
specific purposes. Dynamic or ephemeral ports (49152-65535) are used
temporarily by client applications.
2. Socket:
o Definition: A socket is a combination of IP address and port number that
uniquely identifies a communication endpoint in a network.
o Usage: When a server application listens for incoming connections, it
binds to a specific socket (IP address + port). Client applications use
sockets to establish connections to servers.
3. Relationship:
o Server-side: A server binds to a specific port and listens for incoming
connections on that port.
o Client-side: A client application connects to a server using the server's IP
address and port number.
4. Example:
o Web servers typically listen for incoming HTTP requests on port 80
(HTTP) or port 443 (HTTPS).
o Email servers use ports like 25 (SMTP), 110 (POP3), and 143 (IMAP) for
sending and receiving email.
1. Initiation:
o One device (client) initiates a connection request to another device
(server) using its IP address and a specific port number associated with
the service or application.
2. Handshake:
o Client Request: The client sends a connection request to the server,
typically using a SYN (synchronize) packet.
o Server Response: Upon receiving the request, the server responds with a
SYN-ACK (synchronize-acknowledge) packet, acknowledging the request
and indicating readiness to proceed.
o Client Confirmation: Finally, the client sends an ACK (acknowledge)
packet back to the server, confirming receipt of the server's
acknowledgment.
3. Establishment:
o Once the handshake process is complete, the connection is established,
and both devices can start transmitting data.
4. Protocol Examples:
o This process is fundamental to connection-oriented protocols like TCP
(Transmission Control Protocol), ensuring reliable and ordered data
delivery.
5. Use Cases:
o Connection establishment is crucial for applications such as web
browsing, email, file transfer, and any service that requires continuous and
reliable communication between devices over a network.
Flow and Congestion Control: Flow control and congestion control are two key
mechanisms used in computer networks to manage the transmission of data and
ensure efficient use of network resources. Here’s a concise overview:
1. Flow Control:
o Purpose: Prevents a fast sender from overwhelming a slower receiver
with data.
o Mechanism: Achieved through techniques like sliding window protocol in
TCP, where the receiver signals the sender to slow down transmission if
its buffer is full.
o Benefits: Ensures data integrity and prevents loss by regulating the flow
of data according to the receiver's ability to process it.
2. Congestion Control:
o Purpose: Prevents network congestion, which occurs when routers and
links become overwhelmed with data packets.
o Mechanism: Uses algorithms and protocols (e.g., TCP's congestion
control algorithms like AIMD - Additive Increase Multiplicative Decrease)
to detect and alleviate congestion.
o Benefits: Improves network performance, reduces packet loss, and
ensures fair allocation of network resources among competing users.
3. Differences:
o Scope: Flow control operates between sender and receiver, while
congestion control operates at a broader network level involving routers
and multiple hosts.
o Goals: Flow control ensures efficient data transfer between specific
sender-receiver pairs, while congestion control aims to prevent and
manage network-wide congestion.
4. Implementation:
o Both flow control and congestion control are integral parts of protocols like
TCP, which dynamically adjust data transmission rates based on network
conditions to optimize performance and reliability.