Chapter 1 Lab
R7 – Ethernet Transmission Rate
Ethernet LANs operate at a range of transmission rates depending on the standard. Common rates include 100 Mbps (Fast Ethernet), 1 Gbps (Gigabit
Ethernet), and 10 Gbps (10-Gigabit Ethernet), with even higher rates (40/100
Gbps) available in modern data center deployments.
R11 – End-to-End Delay with One Packet Switch
With store-and-forward switching, the switch must receive the entire packet
before it begins transmitting it on the outgoing link. Let L be the packet length
in bits, and R1 , R2 be the transmission rates (bps) on the first and second links
respectively.
• Time to transmit the packet from the sending host to the switch:
L
R1
• Time to transmit the packet from the switch to the receiving host:
L
R2
Therefore, the total end-to-end delay (ignoring queuing, propagation, and
processing delays) is:
dend-to-end =
L
L
+
R1
R2
R12 – Circuit Switching vs. Packet Switching;
TDM vs. FDM
Circuit switching advantage: Circuit-switched networks guarantee a dedicated, fixed bandwidth for the duration of a call. This provides predictable,
consistent performance with no queuing delay – desirable for real-time applications like voice or video calls.
TDM advantage over FDM: In TDM (Time Division Multiplexing), each
user is allocated the full channel bandwidth during its dedicated time slot, which
avoids the interference issues associated with FDM. TDM is also more flexible
1
and easier to adapt digitally, whereas FDM requires precise analog filtering
to separate frequency bands and is susceptible to crosstalk between adjacent
channels.
R13 – Circuit Switching vs. Packet Switching with
Multiple Users
A 2 Mbps link is shared among users. Each user transmits at 1 Mbps when
active, but is only active 20% of the time.
(a) Circuit switching – number of users supported:
Each active user requires 1 Mbps of dedicated bandwidth. Since the total
link capacity is 2 Mbps:
Number of users =
2 Mbps
= 2
1 Mbps
(b) Why essentially no queuing if ≤ 2 users transmit simultaneously:
If at most 2 users transmit at the same time, the combined demand is at
most 2 × 1 = 2 Mbps, which exactly equals (or is below) the link capacity.
No queue builds up. If all 3 users transmit simultaneously, the combined
demand is 3 Mbps > 2 Mbps, so packets must queue.
(c) Probability that a given user is transmitting:
Each user is active 20% of the time, so:
p = 0.20
(d) Three users – probability all three transmit simultaneously and
fraction of time queue grows:
Each user independently transmits with probability p = 0.2. The probability all three transmit at the same time follows a binomial distribution:
3
P (all 3 transmitting) =
(0.2)3 (0.8)0 = (0.2)3 = 0.008
3
Since the queue grows only when all three users transmit simultaneously
(demand exceeds capacity), the fraction of time during which the queue
grows is also 0.008, or 0.8%.
R16 – Delay Components in End-to-End Delay
For a packet traveling from a source to a destination over a fixed route, the
end-to-end delay consists of the following components at each node (link) along
the path:
2
1. Processing delay (dproc ): Time for a router to examine the packet header
and determine where to forward it. Typically on the order of microseconds.
Essentially constant.
2. Queuing delay (dqueue ): Time a packet waits in the output queue before
being transmitted. Depends on congestion and traffic load. Variable.
3. Transmission delay (dtrans ): Time to push all bits of the packet onto
the link:
L
dtrans =
R
where L is packet length and R is link transmission rate. Constant for a
given packet size and link.
4. Propagation delay (dprop ): Time for one bit to travel from one end of
the link to the other:
d
dprop =
s
where d is the physical link distance and s is the propagation speed. Constant for a given link.
Summary: Processing delay, transmission delay, and propagation delay are
essentially constant for a fixed route and packet size. Queuing delay is variable,
depending on network congestion.
R19 – Throughput and File Transfer Time
Path from Host A to Host B has three links with rates R1 = 500 kbps, R2 = 2
Mbps, R3 = 1 Mbps.
(a) Throughput with original rates:
Throughput is limited by the bottleneck link (minimum rate along the
path):
Throughput = min(R1 , R2 , R3 ) = min(500 kbps, 2 Mbps, 1 Mbps) = 500 kbps
(b) Transfer time for a 4-million-byte file:
File size in bits: 4 × 106 × 8 = 32 × 106 bits = 32 Mb.
T =
32 × 106 bits
= 64 seconds
500 × 103 bps
(c) With R2 reduced to 100 kbps:
New bottleneck:
Throughput = min(500 kbps, 100 kbps, 1 Mbps) = 100 kbps
Transfer time:
T =
32 × 106 bits
= 320 seconds
100 × 103 bps
3
R22 – Tasks a Layer Can Perform
Five tasks that a layer in a protocol stack can perform include:
1. Error detection and correction – identifying and/or fixing corrupted
bits.
2. Reliable data transfer – ensuring all data arrives correctly and in order.
3. Flow control – preventing a fast sender from overwhelming a slow receiver.
4. Segmentation and reassembly – breaking large messages into smaller
units and reconstructing them.
5. Multiplexing and demultiplexing – sharing a single channel among
multiple sessions and directing data to the correct application.
Yes, it is possible for two or more layers to perform the same task. For example, error detection is performed at both the link layer (e.g., CRC in Ethernet
frames) and the transport layer (e.g., UDP/TCP checksums). This redundancy
can provide additional reliability.
R23 – The Five-Layer Internet Protocol Stack
1. Application Layer: Supports network applications and their protocols
(e.g., HTTP, SMTP, DNS, FTP). The unit of data is a message.
2. Transport Layer: Transfers application-layer messages between application endpoints. Provides process-to-process delivery, error checking, and
(for TCP) reliable, ordered delivery and congestion control. The unit of
data is a segment.
3. Network Layer: Routes datagrams from source to destination host
across the network. Handles logical addressing (IP) and routing via protocols like OSPF and BGP. The unit of data is a datagram.
4. Link Layer: Moves a datagram from one node to the next along the route
(e.g., Ethernet, Wi-Fi, PPP). Handles framing, link access, and local error
detection. The unit of data is a frame.
5. Physical Layer: Transmits individual bits of a frame over the physical
medium (e.g., twisted-pair copper, fiber, wireless). The specific protocols
depend on the link type.
4
R24 – PDU Names at Each Layer
• Application-layer message: A chunk of data created and consumed
by application-layer protocols (e.g., an HTTP request/response, an email
message).
• Transport-layer segment: The PDU formed when the transport layer
(TCP or UDP) appends a header to an application-layer message. The
header includes source/destination port numbers, sequence numbers (TCP),
and a checksum.
• Network-layer datagram: The PDU formed when the network layer
appends an IP header to a transport-layer segment. The header includes
source and destination IP addresses used for routing across the Internet.
• Link-layer frame: The PDU formed when the link layer encapsulates
a network-layer datagram with a link-layer header (and trailer). Used to
transfer data between adjacent nodes on a single link.
R28 – Malicious Actions by Trudy (Man-in-theMiddle)
If Trudy can intercept and replace all packets between Alice and Bob, she can
perform the following attacks:
1. Eavesdropping: Read all messages sent between Alice and Bob, exposing
passwords, personal data, or confidential information.
2. Message modification: Alter the content of packets in transit – e.g.,
changing a bank transfer amount or corrupting a file download.
3. Impersonation / Masquerade: Respond to Alice while pretending to
be Bob (and vice versa), establishing two separate sessions and acting as
a relay – a classic man-in-the-middle attack.
4. Message injection: Insert entirely new packets into the stream that appear to come from Alice or Bob (e.g., forging commands or transactions).
5. Message deletion / suppression: Drop packets silently, denying service
or preventing acknowledgments from reaching their destination.
6. Replay attack: Capture a valid message (e.g., a login or payment) and
retransmit it later to produce an unauthorized repeated action.
5