Network Protocol Fundamentals and Performance Analysis
Classified in Computers
Written on in
English with a size of 10.64 KB
Layered Protocols: Advantages and Disadvantages
Layered protocols are a fundamental concept in network design. Understanding their benefits and drawbacks is crucial for efficient system development.
Reasons for Using Layered Protocols
Using layered protocols offers several benefits, including:
- Breaking up the design problem into smaller, more manageable pieces.
- Allowing protocols to be changed without affecting higher or lower layers, promoting modularity and flexibility.
Disadvantages of Layered Protocols
Potential drawbacks of using layered protocols include:
- More overhead: This is due to added information or operations performed in each layer, which can increase processing and transmission costs.
- Information hiding: Information useful for other layers (e.g., an application needing to know if it's running over wired or wireless) might be hidden or unavailable. Retrieving such information may require added computational overhead.
Factors Increasing Client Response Time
The response time of a client can be significantly larger than the theoretical best-case delay due to several factors:
- Request or response messages may get corrupted or lost during transmission, necessitating a retransmission delay.
- The client's processing unit may become overloaded when handling multiple requests simultaneously, leading to processing delays.
- Request or response messages may be queued in the network along with other messages, introducing queuing delays.
Switching Delay in Store-and-Forward Systems
Consider a store-and-forward packet-switching system where the switching time through a switch is 10 μsec. We need to determine if this is a major factor in the response of a client-server system with a 5000 km separation between New York and California, assuming 50 switches along the path.
Assumptions:
- Switching time per switch: 10 μsec
- Client-server separation: 5000 km
- Number of switches: 50
- Propagation speed in copper and fiber: 2/3 the speed of light in vacuum (approx. 300,000 km/s)
Calculation:
The speed of propagation is (2/3 × 300,000 km/s) = 200,000 km/sec, or 200 meters/μsec.
In 10 μsec, the signal travels:
Distance = Speed × Time = 200 meters/μsec × 10 μsec = 2000 meters = 2 km
Thus, each switch adds the equivalent of 2 km of extra cable to the path in terms of propagation delay.
For 50 switches, the total added equivalent distance is:
Total Added Distance = 50 switches × 2 km/switch = 100 km
This 100 km added distance represents:
Percentage = (100 km / 5000 km) × 100% = 2%
Conclusion:
Traversing 50 switches adds only 100 km to the total path, which is merely 2% of the 5000 km separation. Therefore, switching delay is not a major factor under these circumstances, as propagation delay dominates.
Calculating Router Topology Inspection Time
Consider five routers to be connected in a point-to-point subnet. Between each pair of routers, there are four possibilities: a high-speed line, a medium-speed line, a low-speed line, or no line. If it takes 100 ms of computer time to generate and inspect each topology, we need to calculate the total time required to inspect all possible topologies.
Calculation:
Let the routers be R1, R2, R3, R4, and R5.
The number of potential point-to-point connections between 5 routers is given by the combination formula C(n, 2), where n=5:
C(5, 2) = 5! / (2! * (5-2)!) = (5 * 4) / (2 * 1) = 10 potential lines
These ten potential lines are: R1-R2, R1-R3, R1-R4, R1-R5, R2-R3, R2-R4, R2-R5, R3-R4, R3-R5, R4-R5.
Each of these 10 lines has four possibilities (high-speed, medium-speed, low-speed, or no line).
Therefore, the total number of unique topologies is:
Total Topologies = 410 = 1,048,576
Given that it takes 100 ms to inspect each topology:
Total Inspection Time = 1,048,576 topologies × 100 ms/topology = 104,857,600 ms
Converting milliseconds to seconds:
104,857,600 ms / 1000 ms/sec = 104,857.6 seconds
Converting seconds to hours:
104,857.6 seconds / 3600 seconds/hour ≈ 29.127 hours
Conclusion:
It will take approximately 29.127 hours to inspect all possible topologies.
Broadcast Subnet Collisions and Wasted Capacity
A significant disadvantage of a broadcast subnet is the wasted capacity that occurs when multiple hosts attempt to access the channel simultaneously, leading to collisions.
Consider a simplistic example where time is divided into discrete slots, and each of the n hosts attempts to use the channel with probability p during each slot. We want to determine the fraction of slots wasted due to collisions.
Probability of a Successful Transmission (No Collision):
A successful transmission occurs when exactly one host transmits, and all other (n-1) hosts do not transmit.
For a specific host to transmit with probability p, and the remaining (n-1) hosts not to transmit (each with probability (1-p)), the probability for this specific host is:
P(specific host transmits successfully) = p × (1-p)(n-1)
Since any of the n hosts could be the one to transmit successfully, and these events are mutually exclusive, the total probability of exactly one host transmitting (i.e., no collision and no idle slot) is the sum of probabilities for each host:
P(exactly one host transmits) = n × p × (1-p)(n-1)
Fraction of Slots Wasted Due to Collisions:
The fraction of slots wasted due to collisions is the probability that more than one host transmits. This can be found by subtracting the probability of an idle slot and the probability of a successful transmission from 1.
- Probability of an idle slot: No host transmits. This occurs when all n hosts do not transmit:
(1-p)n - Probability of a successful transmission: Exactly one host transmits:
n × p × (1-p)(n-1)
The probability of a collision (wasted slot) is:
P(collision) = 1 - P(idle slot) - P(successful transmission)
P(collision) = 1 - (1-p)n - n × p × (1-p)(n-1)
This formula represents the fraction of slots that will be wasted due to collisions.
Network Resilience: Partitioning a Subnet
Consider a subnet designed for high resilience, such as one intended to withstand a nuclear war. We want to determine the minimum number of bombs required to partition the nodes into two disconnected sets, assuming each bomb eliminates a node and all its connected links.
Analysis:
Based on the network's design (as described, without a visual figure), there does not appear to be a group of nodes connected to the rest of the network by fewer than three other nodes. This implies a high degree of connectivity and redundancy, characteristic of a robust network architecture.
For instance, if we consider a hypothetical scenario where two nodes in an "upper-right corner" are to be isolated, they would typically be connected to the main network through at least three distinct nodes. Eliminating these three connecting nodes would disconnect the corner nodes from the rest.
Conclusion:
Therefore, we conclude that three bombs are needed to partition this network. The system is designed to withstand the loss of any two nodes without becoming partitioned.
Traceroute Analysis: Identifying Network Delays
Let's analyze the provided traceroute output to identify links with the largest delays and their approximate locations.
1 cs-gw (128.119.240.254) 1.009 ms
2 128.119.3.154 (128.119.3.154) 0.931 ms
3 border4-rt-gi-1-3.gw.umass.edu (128.119.2.194) 1.032 ms
4 acr1-ge-2-1-0.Boston.cw.net (208.172.51.129) 10.006 ms
5 agr4-loopback.NewYork.cw.net (206.24.194.104) 12.272 ms
6 acr2-loopback.NewYork.cw.net (206.24.194.62) 13.225 ms
7 pos10-2.core2.NewYork1.Level3.net (209.244.160.133) 12.218 ms
8 gige9-1-52.hsipaccess1.NewYork1.Level3.net (64.159.17.39) 13.081 ms
9 p0-0.polyu.bbnplanet.net (4.25.109.122) 12.716 ms
10 cis.poly.edu (128.238.32.126) 14.080 ms
Delay Analysis:
To find the delay for each link, we subtract the round-trip time (RTT) of the previous hop from the current hop's RTT. Note that negative differences can occur due to routing changes or measurement fluctuations.
- Hop 1: 1.009 ms
- Hop 2: 0.931 ms (Link delay: 0.931 - 1.009 = -0.078 ms, likely measurement noise or routing change)
- Hop 3: 1.032 ms (Link delay: 1.032 - 0.931 = 0.101 ms)
- Hop 4: 10.006 ms (Link delay: 10.006 - 1.032 = 8.974 ms) - Largest Delay
- Hop 5: 12.272 ms (Link delay: 12.272 - 10.006 = 2.266 ms) - Second Largest Delay
- Hop 6: 13.225 ms (Link delay: 13.225 - 12.272 = 0.953 ms)
- Hop 7: 12.218 ms (Link delay: 12.218 - 13.225 = -1.007 ms, likely routing change or congestion fluctuation)
- Hop 8: 13.081 ms (Link delay: 13.081 - 12.218 = 0.863 ms)
- Hop 9: 12.716 ms (Link delay: 12.716 - 13.081 = -0.365 ms, likely routing change or congestion fluctuation)
- Hop 10: 14.080 ms (Link delay: 14.080 - 12.716 = 1.364 ms)
The observation that the round-trip time to router 8 (13.081 ms) is greater than to router 9 (12.716 ms) suggests that two separate round-trip probes were sent at slightly different times. During these times, congestion in the links along the path likely changed, causing the RTT to fluctuate. This indicates more congestion in at least one of the first eight links during the first probe compared to the second probe.
Identification of Largest Delays and Locations:
- The largest delay occurs between router 3 and router 4 (approximately 8.974 ms). Router 3 is located at UMass (Amherst, Massachusetts), and router 4 is in Boston.
- The second largest delay occurs between router 4 and router 5 (approximately 2.266 ms). Router 4 is in Boston, and router 5 is in New York City.