dccn ass 4
dccn ass 4
a. Stop-and-Wait ARQ
● Concept: The sender transmits one frame at a time and waits for an
acknowledgment (ACK) before sending the next frame. If no ACK is received within a
timeout period, the frame is retransmitted.
● Advantages: Simple to implement.
● Disadvantages: Low efficiency for long-distance or high-speed links.
Diagram:
Sender: Frame 1 ---> Receiver
ACK 1 <--- Receiver
b. Go-Back-N ARQ
● Concept: The sender transmits multiple frames but can only send up to N
unacknowledged frames. If an error is detected, all subsequent frames are
retransmitted starting from the erroneous one.
● Advantages: Improves efficiency over Stop-and-Wait.
● Disadvantages: Higher bandwidth wastage in retransmissions.
Diagram:
Sender: Frame 1, Frame 2, Frame 3 ---> Receiver
ACK 1 <--- Receiver
● Concept: The sender retransmits only the frames that were received incorrectly or
not at all, based on negative acknowledgments (NAKs).
● Advantages: Reduces unnecessary retransmissions.
● Disadvantages: More complex to implement.
Diagram:
Sender: Frame 1, Frame 2 ---> Receiver
NAK 2 <--- Receiver
Frame 2 ---> Receiver
ARQ techniques can be classified based on error recovery and data acknowledgment.
Header Format
● Fields:
1. Source Port (16 bits)
2. Destination Port (16 bits)
3. Length (16 bits)
4. Checksum (16 bits)
Applications
Header Format
● Fields:
1. Source Port, Destination Port (16 bits each)
2. Sequence Number (32 bits)
3. Acknowledgment Number (32 bits)
4. Header Length (4 bits)
5. Flags (e.g., SYN, ACK, FIN) (6 bits)
6. Window Size, Checksum, Urgent Pointer
Connection Termination
6. Here’s a comparison of UDP and TCP protocols based on the specified parameters:
Error Checking Error detection via checksum and Error detection via
error recovery mechanisms. checksum only. No recovery.
Protocols Used by HTTP, FTP, SMTP, IMAP, Used by DNS, DHCP, VoIP,
etc. video streaming, etc.
● TCP is preferred where data accuracy and reliability are critical, such as web
browsing, email, and file transfers.
● UDP is preferred for real-time applications requiring low latency, like video streaming,
online gaming, and DNS lookups.
7. What is the three-way handshaking method for Connection establishment and Connection
termination in TCP.
Diagram:
2.
3. Step 2: SYN-ACK (Synchronize and Acknowledge)
Diagram:
4.
5. Step 3: ACK (Acknowledge)
Diagram:
6.
Connection Termination
TCP uses a four-step process to terminate a connection, as both sides need to agree to
close the connection.
Diagram:
Diagram:
4.
5. Step 3: FIN (Finish)
○ The receiving side sends its own FIN packet to indicate it has finished
transmitting data.
Diagram:
6.
7. Step 4: ACK (Acknowledge)
Diagram:
8.
The concept of security on the Internet through firewalls revolves around creating a
barrier between trusted internal networks (e.g., corporate or home networks) and untrusted
external networks (e.g., the Internet). Firewalls enforce security policies by monitoring,
filtering, and controlling incoming and outgoing traffic based on predefined rules.
1. What is a Firewall?
a. Access Control
d. Segmentation
● Separates networks into zones with varying security levels, such as:
○ DMZ (Demilitarized Zone): A zone for public-facing services (e.g., web
servers).
○ Internal trusted networks for sensitive data.
Types of Firewalls
1. Packet-Filtering Firewalls
3. Proxy Firewalls
Limitations of Firewalls
Conclusion
Firewalls are a cornerstone of Internet security. They enforce security policies, monitor
traffic, and provide a first line of defense against external threats. However, they work best
when combined with other security measures, such as encryption, antivirus software, and
intrusion detection systems.
What is Email?
Email (Electronic Mail) is a method of exchanging digital messages over the Internet or a
network. It enables communication between users, typically through email servers and
clients.
Scenarios for Using Email
Email Architecture
Email architecture consists of three main components: User Agent (UA), Message Transfer
Agent (MTA), and Message Delivery Agent (MDA).
○The application (e.g., Gmail, Outlook) that allows users to compose, send,
and read emails.
2. Message Transfer Agent (MTA):
○ Delivers emails to the recipient's inbox using protocols like IMAP (Internet
Message Access Protocol) or POP3 (Post Office Protocol).
1. Email Composition:
○ The UA sends the email to an SMTP server (MTA), which routes the message
to the recipient's server.
3. Email Storage (MDA):
○ The recipient retrieves the email using an email client (UA) and protocols like
IMAP or POP3.
Congestion control is the process of managing network traffic to prevent congestion, where
excessive traffic leads to degraded performance and packet loss.
Transport layer protocols like TCP implement congestion control to ensure efficient data flow.
1. Slow Start:
○
Begins with a low transmission rate and gradually increases the rate
(exponential growth) to avoid overloading the network.
2. Congestion Avoidance:
○When congestion is detected (e.g., through packet loss), the rate of data
transmission is reduced to avoid further congestion.
○ Uses techniques like Additive Increase/Multiplicative Decrease (AIMD):
■ Additive Increase: Gradually increases the congestion window size.
■ Multiplicative Decrease: Reduces the window size upon packet loss.
3. Fast Retransmit:
○If three duplicate ACKs are received, the sender assumes a packet is lost and
retransmits it immediately without waiting for a timeout.
4. Fast Recovery:
○ Routers mark packets with a congestion signal instead of dropping them. The
sender reduces the transmission rate upon receiving such a signal.
6. Leaky Bucket Algorithm:
○
Limits the data flow rate to ensure traffic is smooth, regardless of the
burstiness of incoming data.
7. Token Bucket Algorithm:
○ Allows bursts of data but ensures that the long-term transmission rate does
not exceed a specified limit.
Conclusion
Congestion control in the transport layer ensures efficient and reliable data delivery,
minimizes packet loss, and optimizes network performance. TCP's mechanisms, such as
slow start, congestion avoidance, and fast retransmit, are widely used to handle congestion
effectively.
—------------------------------------------------------------------------------------------------------------------------
11. What are the Congestion Control Techniques. Describe the following Congestion Control
Techniques along with causes and effects: (a) Open-loop Congestion Control Technique (b)
Close-loop congestion control technique 12. Illustrate the various Congestion Control
Techniques along with causes and effects.
Congestion control techniques are strategies used to manage network congestion to ensure
efficient and reliable data transfer. They can be broadly categorized into open-loop
congestion control and closed-loop congestion control.
● Definition:
Open-loop congestion control attempts to prevent congestion from occurring by
managing traffic during the network design or configuration phase. It does not rely on
feedback from the network.
● Techniques:
○ Traffic Shaping:
■ Techniques like Leaky Bucket or Token Bucket ensure traffic flows at
a regulated rate, preventing sudden bursts.
○ Admission Control:
■ Limits the number of flows entering the network, ensuring no more
traffic is admitted than the network can handle.
○ Resource Reservation:
■ Allocates fixed resources for specific flows to guarantee performance,
e.g., reserving bandwidth.
● Causes of Congestion:
○ Packet delays.
○ Increased packet loss.
○ Degraded network throughput.
● Definition:
Closed-loop congestion control detects congestion after it occurs and responds
dynamically to reduce or mitigate its effects. It relies on feedback from the network.
● Techniques:
○ Backpressure:
■ Intermediate nodes signal upstream nodes to slow down data
transmission when congestion is detected.
○ Choke Packets:
■ Special packets are sent from congested nodes to the source,
instructing it to reduce the transmission rate.
○ Implicit Signaling:
■ Congestion is inferred by observing packet loss, delays, or
retransmission requests.
○ Explicit Signaling:
■ Network elements mark packets explicitly to indicate congestion, e.g.,
using ECN (Explicit Congestion Notification).
● Causes of Congestion:
Here are common congestion control techniques with their causes and effects:
● Mechanism:
Smoothens traffic by releasing packets at a constant rate, regardless of bursts.
● Causes Addressed:
Traffic bursts overwhelming the network.
● Effects:
○ Prevents congestion by regulating packet flow.
○ Potential delay for bursty data.
● Mechanism:
Allows traffic bursts up to a limit by storing tokens; packets can be transmitted only if
tokens are available.
● Causes Addressed:
Bursty traffic requiring some flexibility.
● Effects:
○ Supports bursty traffic while preventing sustained congestion.
● Mechanism:
Gradually increases the transmission rate until congestion signals are detected.
● Causes Addressed:
Sudden traffic surges.
● Effects:
○ Prevents overshooting network capacity.
○ Slower initial data transfer.
● Mechanism:
Increases the transmission window size linearly and decreases it multiplicatively
upon detecting congestion.
● Causes Addressed:
Gradual buildup of traffic.
● Effects:
○ Ensures stable network throughput.
○ Avoids drastic performance drops.
● Mechanism:
Routers mark packets to indicate congestion instead of dropping them.
● Causes Addressed:
Packet loss due to congestion.
● Effects:
○ Reduces retransmission overhead.
○ Improves throughput.
6. Backpressure (Closed-Loop)
● Mechanism:
Routers signal upstream nodes to stop sending packets when their buffer is full.
● Causes Addressed:
Bottlenecks due to overloaded routers.
● Effects:
○ Reduces packet loss.
○ Causes temporary delays.
Causes of Congestion
Effects of Congestion
Conclusion
Open-loop congestion control focuses on preventing congestion through pre-emptive
techniques like traffic shaping, while closed-loop techniques aim to mitigate congestion
dynamically through feedback mechanisms. A combination of both ensures efficient and
reliable network performance.
11.
a. Email Protocols
Key Protocols
Architecture
Sender UA -> SMTP Server -> Internet -> Recipient SMTP Server -> POP3/IMAP ->
Recipient UA
Scenario:
Example:
b. Firewalls
Definition:
A firewall monitors and controls incoming/outgoing network traffic based on security policies.
Types:
Architecture:
User -> Firewall -> Network/Internet
Scenario:
Example:
Definition:
HTTP is a protocol used for communication between web browsers and servers.
Architecture:
Client (Browser) -> HTTP Request -> Web Server -> HTTP Response -> Client
Scenario:
Example:
Definition:
Modes:
1. Active Mode: The client opens a port and waits for the server to connect.
2. Passive Mode: The server opens a port for the client to connect.
Architecture:
Client -> Control Connection -> FTP Server -> Data Connection -> Client
Scenario:
● A developer uploads files to a web server using an FTP client like FileZilla.
Example:
Definition:
Architecture:
Client -> DNS Resolver -> Root Server -> TLD Server -> Authoritative Server -> IP Address
Scenario:
Example:
f. Telnet
Definition:
Telnet is a protocol used for remote command-line interface access over a network.
Architecture:
Client -> Telnet Request -> Server -> Command Execution -> Response -> Client
Scenario:
● A network administrator accesses a remote router to configure settings.
Example:
Diagram Summary
● Each protocol can be represented using sequence diagrams showcasing their flow:
○ Email: Sender to SMTP Server to Recipient via IMAP/POP3.
○ Firewalls: Network flow passes through the firewall for monitoring.
○ HTTP: Browser makes requests, server responds.
○ FTP: File transfers between client and server.
○ DNS: Resolves domain names to IPs.
○ Telnet: Command execution on a remote system.
These protocols underpin modern network communication, offering diverse functionalities for
seamless interaction.
A firewall is a security system that monitors and controls network traffic based on
predetermined rules. It acts as a barrier between a trusted internal network and untrusted
external networks like the internet.
Types of Firewalls
1. Packet Filtering Firewall: Filters data packets based on IP addresses, ports, and
protocols.
2. Stateful Inspection Firewall: Tracks the state of active connections and makes
decisions based on context.
3. Proxy Firewall: Operates as an intermediary between the user and the external
network.
4. Next-Generation Firewall (NGFW): Includes advanced features like intrusion
detection and application-layer filtering.
Concept
Firewalls:
Diagram
Internal Network <-> Firewall <-> External Network (Internet)
Example
Key Components
1. User Agent (UA): Software like Outlook or Gmail for composing and reading emails.
2. Mail Server: Stores and forwards emails (e.g., SMTP, IMAP, POP3 servers).
3. Protocols:
○ SMTP: Sends emails.
○ IMAP/POP3: Retrieves emails.
Diagram
Sender UA -> SMTP Server -> Internet -> Recipient SMTP Server -> IMAP/POP3 ->
Recipient UA
Diagram:
User <-> SSH Client <-> Encrypted Connection <-> SSH Server
● Definition: Encrypts data transferred between clients and servers, ensuring security.
● Example: HTTPS websites use SSL for secure communication.
● Definition: Facilitates the real-time delivery of audio and video over IP networks.
● Example: Video conferencing.
These protocols and their comparisons illustrate their specific use cases, architecture, and
functionalities in modern networking.