Network
1) here are five layers in the Internet protocol stack, (Describe what
classes exist and), (Compare how it differs from the OSI reference
model) , (Describe the main functions supported in each layer).
Physical Layer
Function: Transmits raw bits (0s and 1s) over a physical medium like
cables, radio waves, or fiber optics.
TCP/IP Model: This layer is combined with the Data Link Layer in
the TCP/IP stack.
OSI Model: The Physical Layer is separate and does only the actual
transmission of raw data.
2. Data Link Layer
Function: Transfers data between two devices connected on the same
network, handling error detection and correction.
TCP/IP Model: Sometimes called the Link Layer, it includes the
functionality of both the Data Link and Physical layers in the OSI
model.
OSI Model: The Data Link Layer is responsible for reliable data
transfer between two nodes on the same network, such as Ethernet or
Wi-Fi.
3. Network Layer
Function: Handles routing of packets across multiple networks (like
the internet). This layer adds IP addresses to data packets and chooses
the best path for data to travel.
TCP/IP Model: This layer is called the Internet Layer in the TCP/IP
stack.
OSI Model: The Network Layer is similar in both models, focusing on
routing and addressing. It corresponds to the Internet Layer in TCP/IP.
4. Transport Layer
Function: Ensures reliable data transfer between devices, controlling
flow, error checking, and providing end-to-end communication (e.g.,
TCP and UDP).
TCP/IP Model: The Transport Layer handles protocols like TCP
(reliable) and UDP (unreliable).
OSI Model: The Transport Layer is the same in both models,
ensuring data is delivered without errors and in the correct order.
5. Application Layer
Function: Supports the actual applications like web browsers, email
clients, and file transfers. It provides network services to end-users.
TCP/IP Model: The Application Layer includes application protocols
like HTTP (for websites), FTP (for file transfers), SMTP (for email), etc.
OSI Model: In the OSI model, this is split into three layers:
Application, Presentation, and Session.
o Presentation Layer: Deals with data format translation (e.g.,
encryption, compression).
o Session Layer: Manages sessions (e.g., opening/closing
connections).
The TCP/IP model is simpler and more practical, being the basis of
the modern internet.
The OSI model is more theoretical and detailed, useful for
understanding how each function works.
2) Explain why the time it takes for a client to receive an object requested
from a web server can be saved by using web caching
Web caching speeds up the time it takes for a client to get an object
from a web server by storing copies of popular items closer to the user.
Here's why it saves time:
1. Shorter Distance: The object comes from a nearby cache instead of
the original server, so it travels a shorter distance, making it quicker.
2. Less Work for the Server: The original server doesn't have to handle
the request again, making the process faster.
3. Faster Access: Cached items are delivered right away without extra
steps, reducing the waiting time.
New or Rare Objects: If an object is new or not frequently
requested, it might not be in the cache yet. In this case, the client has
to request it from the original server, which takes the same time as
without caching.
Expired or Updated Objects: Cached objects have a time limit
(known as "time-to-live" or TTL). If an object in the cache is outdated or
expired, the cache has to request the updated version from the server,
which may take extra time.
Dynamic Content: Some web content changes frequently, like live
data or personalized pages. These dynamic objects are usually not
cached, so the cache can't help save time for these requests.
Cache Misses: If the requested object isn't in the cache (called a
"cache miss"), the cache can't save time, and the object must be
fetched from the original server.
3) .
Meaning of "ACK 5" delivered to the sender:
Go-Back-N: ACK 5 means that the receiver has received all packets up
to packet 5. The sender can now send packets starting from 6.
Selective Repeat: ACK 5 only means that packet 5 has been received
successfully. The sender can now send other unacknowledged packets,
but it doesn’t imply that previous packets were received.
To what packet a retransmission timer is allocated at the
sender:
Go-Back-N: The timer is set for the oldest unacknowledged
packet. If this timer expires, all packets from this packet onward will
be retransmitted.
Selective Repeat: Each packet has its own individual timer. Only
the specific packet whose timer expires will be retransmitted.
What packets are retransmitted when the retransmission
timer expires:
Go-Back-N: When the timer expires, all packets starting from the
one with the expired timer are retransmitted.
Selective Repeat: Only the specific packet with the expired timer is
retransmitted.
How the receiver handles out-of-order packets:
Go-Back-N: The receiver discards out-of-order packets and only
keeps the expected packet.
Selective Repeat: The receiver buffers out-of-order packets until
the missing packet(s) are received, allowing in-order delivery to the
upper layers.
How the receiver treats duplicate packets:
Go-Back-N: Duplicate packets are discarded.
Selective Repeat: Duplicate packets are also discarded, but the
receiver can already have stored other out-of-order packets.
Condition of the minimum sequence number:
Go-Back-N: The minimum sequence number is the one immediately
following the last acknowledged packet.
Selective Repeat: The minimum sequence number can be any packet
that has not yet been acknowledged, as the receiver can accept
out-of-order packets.
4)
Scope: Intra-AS is local (inside one organization), while Inter-AS is global
(between different organizations).
5)in simple terms, unlike wired Ethernet, IEEE 802.11 (Wi-Fi) senders
wait for an ACK from the receiver to confirm that data was received
successfully. This is important due to the challenges of wireless
communication, where signals can be lost or disrupted. By waiting for
an ACK, the sender can ensure that the data gets through correctly and
reliably.
In simple terms, RTS and CTS messages in CSMA/CA are used to
"reserve" the communication channel before sending data. The RTS
message asks for permission to send, and the CTS message gives the
go-ahead. This helps prevent collisions and ensures that the channel is
used efficiently, making communication more reliable.