Addressing in Transport Layer:
1. Setting Up Connections: When an application wants to connect to another application on a different
computer, it needs to specify where to connect. This is like knowing which house to send a letter to.
2. Ports and TSAPs: In the Internet, computers use something called ports to listen for connections. Think of
these as numbered doors where applications wait for connections. Each door has its unique number, known
as a Transport Service Access Point (TSAP).
3. Network Layer Addresses: Similar to how TSAPs work in the transport layer, there are Network Service
Access Points (NSAPs) in the network layer. IP addresses are examples of these.
4. Connection Establishment: To establish a connection, one application attaches itself to a local TSAP and
sends a request to connect to a remote TSAP. This creates a path through NSAPs on each computer involved.
5. Connection Scenario: For example, when sending an email, a mail server process waits for a connection on
its TSAP. When a client wants to send an email, it attaches to its TSAP and requests a connection to the mail
server's TSAP.
6. Communication: Once connected, the email is sent, and responses are received.
7. Connection Release: After the communication is done, the connection is released.
Initial Connection Protocol:
1. Efficiency: To save resources, not all server processes are always active and listening. Instead, there's a
special process server that acts as a proxy.
2. Process Server: This server, like "inetd" on UNIX systems, listens to multiple ports simultaneously, waiting for
connection requests.
3. Connection Request: When a user wants a service, they send a request specifying the TSAP address of the
service they need.
4. Process Server Interaction: If no specific server is waiting, the user connects to the process server instead.
5. Dynamic Server Creation: Upon receiving a request, the process server spawns the requested server,
allowing it to handle the user's request.
6. Efficient Resource Usage: After the work is done, the new server handles the task, while the process server
goes back to listening for new requests. This method is useful when servers can be created as needed.
Connection Establishment Techniques:
1. Packet Lifetime Bounding: In network communication, data is sent in small units called packets. Each packet has a “lifetime”, which is the
maximum time that the packet is allowed to exist in the network before it is discarded. This lifetime is typically bounded to prevent packets from
circulating indefinitely due to routing errors or other issues. When the lifetime of a packet is bounded, it means there’s a known maximum time that a
packet can exist in the network. This allows for the establishment of connections more reliably and safely. If a packet doesn’t reach its destination
within its lifetime, it’s discarded, and the data must be retransmitted. This helps to ensure that outdated or redundant packets do not congest the
network
To ensure safe connection establishment, techniques are used to limit how long packets live in the network.
• Restricted Subnet Design: Designing the network in a way that prevents packets from looping and
bounding delay, considering potential congestion.
• Hop Count in Packets: Each packet contains a hop counter that decreases as the packet moves
through the network. Packets with zero hop count are discarded.
• Time Stamping: Each packet carries a timestamp indicating its creation time. Routers discard packets
older than an agreed-upon time.
2. Three-Way Handshake:
1. Protocol Introduction: Tomlinson introduced the three-way handshake.
• Step 1: Host 1 sends a CONNECTION REQUEST with a sequence number (x) to Host 2.
• Step 2: Host 2 replies with an ACK acknowledging x and announces its own sequence number
(y).
• Step 3: Host 1 acknowledges Host 2's sequence number choice in the first data segment it sends.
3. Protocol Scenarios:
• Normal Operation (Fig A): Both hosts follow the three-way handshake process smoothly.
• Delayed Duplicate CONNECTION REQUEST (Fig B):
• Host 2 receives an old duplicate CONNECTION REQUEST.
• Host 2 sends an ACK to verify if Host 1 is indeed trying to establish a new connection.
• If Host 1 rejects the attempt, Host 2 realizes the duplicate and abandons the connection.
• In the worst case, both a delayed CONNECTION REQUEST and ACK exist in the network, but no
harm is done.
• Duplicate CONNECTION REQUEST and Duplicate ACK (Fig C):
• Host 2 proposes an initial sequence number (y) for traffic to Host 1.
• Even if delayed segments arrive, Host 2 can distinguish old duplicates from current requests.
• The protocol ensures no accidental connection setups occur when they're not desired.
Connection Release Protocols:
1. Asymmetric Release: Similar to hanging up a telephone, where one party ends the call, and the connection
is terminated immediately.
2. Symmetric Release: Treats the connection as two separate one-way connections, requiring each side to
release independently.
Three-Way Handshake Protocol for Connection Release:
• Fig-8(a): Shows the normal case where a three-way handshake protocol is used for connection release.
• Fig-8(b): If the final acknowledgment (ACK) is lost, a timer ensures the connection is eventually released.
• Fig-8(c): If the response to the disconnection request (DR) is lost, the initiating user will timeout and start
over.
• Fig-8(d): If subsequent DRs are lost after multiple attempts, the sender gives up and releases the connection.
Detailed Explanation:
1. Initiating Release: One user sends a DISCONNECTION REQUEST (DR) to start the connection release process.
2. Response and Timer:
• The recipient responds with a DR-TPDU and starts a timer.(TPDU: Transaction Protocol Data Unit.)
• If the DR arrives, the original sender responds with an ACKTPDU and releases the connection.
• If the final ACK-TPDU is lost, a timer ensures the connection is eventually released.
3. Lost Responses:
• If the second DR is lost, the initiating user will not receive the expected response and will timeout,
starting over.
• After multiple failed attempts due to lost responses, the sender gives up and releases the
connection.
Conclusion:
• These scenarios illustrate various cases of connection release using a three-way handshake protocol.
• Despite potential challenges like lost responses, timers help ensure eventual connection release.
Client-Server Architecture:
• Server and Clients: One central server and multiple clients scattered across the network.
• Server Functionality: Server is always on, listens for client requests, and provides services upon request.
• Communication: Clients initiate communication by sending packets to the server's fixed IP address.
• Client Interactions: Typically, clients do not communicate directly with each other.
• Examples: Common applications like FTP, telnet, web, and email use this architecture.
Data Center:
• Evolution: Originally, a single-server host was used, but now data centers are employed due to high client
demand.
• Purpose: Data centers house many hosts to create a powerful virtual server.
• Maintenance: Requires significant power and upkeep to manage hundreds of servers.
• Example: Google operates around 50 data centers globally, supporting services like search, YouTube, and
Gmail.
Peer-to-Peer (P2P) Architecture:
• Serverless: No dedicated server; pairs of hosts, called peers, communicate directly.
• Ownership: Peers are user-controlled laptops, not owned by service providers.
• Applications: Popular applications like BitTorrent for file sharing and Skype for internet telephone use P2P
architecture.
• Self-Scalability: Each peer both generates workload and adds service capacity to the system.
• Advantages: Cost-effective as it doesn't require server infrastructure or bandwidth.
Challenges of P2P Applications:
1. ISP Friendly: P2P applications can impact Internet Service Providers (ISPs) because they typically shift more
traffic upstream, which can stress networks that are designed for more downstream traffic (like most
residential ISPs).
2. Security: Due to their distributed nature and openness, P2P applications can pose security challenges. They
often require careful management to prevent vulnerabilities and protect against potential threats.
3. Incentive: The success of P2P networks largely depends on users volunteering their bandwidth and
resources. Without sufficient participation, P2P networks can’t function effectively.
Transport Services Available to Applications:
• Multiple Protocols: Networks offer different transport-layer protocols for various applications.
• Protocol Selection: Developers choose a protocol based on their application's needs.
• Service Variability: Different protocols offer different services.
Reliable Data Transfer:
• Reliable vs. Unreliable: TCP ensures data is reliably delivered, while UDP may not guarantee delivery.
• Acceptable Unreliability: Some applications, like multimedia, can tolerate occasional data loss without
significant impact.
Throughput:
• Definition: Throughput is the rate at which data is transferred between sender and receiver.
• Fluctuation: Network congestion and usage by other hosts can cause throughput to vary.
• Types of Applications:
1. Bandwidth Sensitive: Require guaranteed throughput, like multimedia apps.
2. Elastic: Don't need guaranteed throughput, like email, file transfer, and web browsing.
Timing:
• Guarantees: Transport protocols can ensure timely delivery of data.
• Examples: Useful for real-time applications like internet telephony, virtual environments, teleconferencing,
and multiplayer games.
Security:
• Encryption: Transport protocols can encrypt transmitted data for security.
• Decryption: They can also decrypt received data to ensure secure communication.
Transport Services Provided by the Internet:
Non-Persistent Connections:
• Imagine you're browsing a website. Each time you click on a link or request a new page, your web browser
has to create a new connection to the server to get that page.
• Once your browser gets the page, the connection is closed immediately.
• This means every time you want to see a new page or download something, a new connection has to be set
up and then torn down afterward.
• It's like calling a friend every time you want to ask a question, and then hanging up as soon as you get the
answer. It's a bit inefficient because you're making lots of short calls.
• Definition: Each request/response pair is sent over a separate TCP connection.
• Closure: Connection is closed after the server sends the requested object to the client.
• Usage: Typically used in HTTP when downloading multiple objects, requiring multiple connections.
• Delay: Each object suffers a delivery delay of two round-trip times (RTTs): one to establish the TCP
connection and another to request and receive the object.
Persistent Connections:
• Now, think of persistent connections like keeping a line open with your friend. Instead of calling and hanging
up each time, you keep the line open so you can chat whenever you want.
• Similarly, with a persistent connection, your web browser doesn't close the connection with the server after
getting one page. It keeps it open so it can request more pages or files without starting from scratch each
time.
• This way, you don't have to set up a new connection for every single thing you want to see or download. It's
like having a continuous conversation with your friend instead of making lots of short calls.
• The server will eventually close the connection if it's not being used for a while, but until then, it's there for
quick and easy communication.
• Definition: The server leaves the TCP connection open after sending responses, allowing subsequent
requests and responses between the same client and server to be sent over the same connection.
• Closure: The server closes the connection only when it's not used for a certain amount of time.
• Default Mode: HTTP generally uses persistent connections with pipelining.
• Advantages: Requires only one RTT for all referenced objects, improving performance by approximately 20%.
Web Caching:
1. What is a Web Cache?
• Think of a web cache as a special storage space on the internet that sits between you (the user) and
the actual website servers.
• This storage space keeps copies of web pages that users have recently accessed.
2. How Does it Work?
• When you try to access a web page, instead of going directly to the website's servers, your request
first goes to the web cache.
• The cache checks if it already has a copy of the page you're asking for.
• If it does, great! It sends you that copy of the page directly, saving time.
• But if it doesn't have the page, it acts like a runner and goes to the website's servers to get it for you.
3. Advantages of Caching:
• Faster Response Time: Since the cache is closer to you than the original server, it can send you the
page much faster than if you had to wait for the server to respond every time.
• Reduced Internet Traffic: By keeping copies of popular pages nearby, the cache helps reduce the
amount of data that needs to travel across the internet. This makes things faster for everyone and
saves bandwidth.
• Less Strain on Servers: Imagine if everyone went directly to the website servers for every page they
wanted to see. It would overload those servers! But with caching, the cache handles a lot of those
requests, taking some of the load off the servers and keeping things running smoothly.
Electronic Mail (E-mail):
1. What is E-mail?
• E-mail is a way for people to send and receive messages electronically.
• It's like sending letters but much faster and cheaper, and you can send messages with attachments,
links, formatted text, and images.
2. Components of an E-mail System:
• User Agents: These are programs like Microsoft Outlook or Apple Mail that allow users to read,
compose, and manage their emails.
• Mail Servers: These servers store users’ emails. When you send an email, it first goes to your mail
server1. Then, your mail server sends it to the recipient’s mail server2. If there’s a problem delivering
the email, it will be queued and retried later.
• SMTP (Simple Mail Transfer Protocol): This is a set of rules used for sending emails over the
internet3. It uses TCP, a reliable connection protocol, to move emails from one mail server to
another.
3. How SMTP Works:
• SMTP uses TCP to transfer emails between servers.
• It runs on both the sender's and recipient's mail servers.
• When you send an email, your mail server connects to the recipient's mail server over a TCP
connection and sends the email.
• If the recipient's server is unavailable, your server will try again later.
• SMTP ensures that emails are delivered reliably across different networks.
4. Mail Access Protocols:
• Since mail servers need to be always-on and have fixed IP addresses, users access their emails using
mail access protocols.
• Examples include Post Office Protocol (POP), Internet Mail Access Protocol (IMAP), and even HTTP.
POP (Post Office Protocol):
1. What is POP?
• POP is a simple protocol used to access emails from a remote server.
• It's like going to a post office to collect your mail.
2. How POP Works:
• Your email client (like Outlook or Apple Mail) connects to the POP server on port 110.
• It goes through three phases:
• Authentication: You provide your username and password to log in.
• Transaction: You can retrieve messages, mark them for deletion, or get statistics about your
mailbox. The server responds with either "+OK" (if everything is fine) or "-ERR" (if something
goes wrong).
• Update: When you're done, you issue a quit command, and the server removes any
messages you marked for deletion.
3. Disadvantages of POP:
• You can't manage your emails directly on the server. For example, you can't delete messages from
the server using POP.
IMAP (Internet Message Access Protocol):
1. What is IMAP?
• IMAP is another protocol for accessing emails, but it's more advanced than POP.
• It allows for better organization of emails into folders and provides more features.
2. How IMAP Works:
• Each message is associated with a folder on the server, like your inbox or a custom folder.
• You can move, read, delete, and search for messages on the server.
• IMAP servers remember your actions across sessions, so you can pick up where you left off.
Web-Based Email:
1. What is Web-Based Email?
• Web-based email allows you to access your emails through a web browser instead of an email client.
• It's like checking your emails on a website.
2. How Web-Based Email Works:
• You use your web browser to connect to your email provider's website via HTTPS (secure HTTP).
• You log in using your username and password, and then you can read, send, and manage your emails
directly on the website.
• Many companies like Google and Yahoo offer web-based email services.
DNS - The Internet’s Directory Service:
DNS, which stands for Domain Name System, is a crucial internet service that converts human-readable domain
names into IP addresses, which computers use to identify each other on the internet. For example, DNS translates a
domain name like "[Link]" into its corresponding IP address, such as "[Link]". This translation
makes it easier for us humans to remember website names.
Services Provided by DNS:
1. Distributed Database:
• DNS operates as a distributed database spread across a hierarchy of DNS servers.
• It's like having many phone books distributed across different locations instead of one big book.
2. Application-Layer Protocol:
• DNS also functions as an application-layer protocol, allowing computers to query the distributed
database to find IP addresses associated with domain names.
3. Implementation:
• DNS servers are typically UNIX machines running software like BIND (Berkeley Internet Name
Domain).
4. Protocol and Port:
• The DNS protocol runs over UDP and uses port 53 for communication.
5. Usage by Applications:
• DNS is used by various application-layer protocols such as HTTP (web browsing), SMTP (email), and
FTP (file transfer).
How DNS Works:
1. Client-Side DNS Application:
• When you enter a website address (URL) into your browser, your computer runs the client-side of
the DNS application.
2. Query to DNS Server:
• Your browser extracts the hostname (e.g., "[Link]") from the URL and sends it to a
DNS server.
3. Receiving IP Address:
• The DNS server eventually responds with the corresponding IP address for the hostname.
4. Initiating Connection:
• With the IP address obtained, your browser can then establish a TCP connection to the HTTP server
to fetch the webpage.
Additional Services Provided by DNS:
1. Host Aliasing:
• DNS allows a host to have one or more alias names, which can simplify complex hostnames.
2. Mail Server Aliasing:
• DNS assists in creating mnemonic (easy-to-remember) email addresses.
3. Load Distribution:
• DNS is used to distribute the load among replicated servers, ensuring efficient handling of internet
traffic.
Advantages of Distributed Database Design:
• Avoiding Single Point of Failure: With a distributed system, the failure of one DNS server does not affect the
entire internet.
• Traffic Distribution: Distributed DNS servers handle global traffic more efficiently.
• Reduced Delays: Placing DNS servers closer to users reduces query response times.
• Ease of Maintenance: Distributing the database reduces the burden of updating records for every new host
on a single server.