diff options
| author | mo khan <mo@mokhan.ca> | 2025-09-29 19:06:08 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-09-29 19:06:08 -0600 |
| commit | 532586aa65cbd07ba30e767409a2fa99c6b9516f (patch) | |
| tree | 390fe54dd8a4078f7c2756bc749dbeb5abcc4a7d | |
| parent | c6a0d4e170952fdbf66b77e48e9c9e161964de76 (diff) | |
Remove the answers to 2 and 3
| -rw-r--r-- | assignments/2/README.md | 167 | ||||
| -rw-r--r-- | assignments/3/README.md | 196 |
2 files changed, 88 insertions, 275 deletions
diff --git a/assignments/2/README.md b/assignments/2/README.md index c7a4d32..75ebb0f 100644 --- a/assignments/2/README.md +++ b/assignments/2/README.md @@ -13,129 +13,70 @@ linestretch: 1.0 ## 1.1 TCP Reliable Data Transfer (5%) -> (5%) TCP provides a reliable data transfer service on top of IP’s unreliable best‑effort service. Study related sections of the textbook and articles from other sources. In your own words, explain how TCP provides a reliable data transfer service. - -TCP provides reliable data transfer over IP's best-effort service using: -- Sequence numbers and cumulative ACKs: Each byte is sequenced; ACK(n) confirms receipt of all bytes up to n−1. -- Checksums: Header+payload checksum detects corruption; corrupt segments are discarded (no ACK). -- Timeout and retransmission: RTO based on RTT estimation; missing ACKs trigger retransmission. -- Fast retransmit/fast recovery: Triple-duplicate ACKs imply loss and trigger immediate retransmission and window adjustment. -- Flow control: Receiver-advertised window prevents overrunning receiver buffers. -- Reordering/in-order delivery: Out-of-order segments are buffered and reassembled before delivery to the application. -- Connection management: Three-way handshake establishes state; graceful close ensures all data delivered. - -Reference: Kurose & Ross, 8th ed., Ch. 3 (Transport Layer: TCP services, checksums, reliable data transfer, flow control, fast retransmit/recovery). +> (5%) TCP provides a reliable data transfer service on top of IP's +unreliable best‑effort service. Study related sections of the textbook +and articles from other sources. In your own words, explain how TCP +provides a reliable data transfer service. ## 1.2 Go-Back-N Protocol (5%) -> (5%) While the RDT protocols are essentially stop‑and‑wait protocols, the GBN protocol allows the sender to send multiple packets without waiting for acknowledgement from the receiving parties. How does GBN achieve that? - -GBN achieves higher throughput than stop-and-wait via a sliding window that allows up to N unacknowledged packets in flight. The sender maintains base (oldest unACKed) and nextseqnum, uses a single timer for the oldest unACKed packet, and the receiver sends cumulative ACKs. On timeout, the sender retransmits from base ("goes back N"). This pipelining avoids per-packet waiting. - -Reference: Kurose & Ross, 8th ed., Ch. 3 (Pipelined reliable data transfer: Go‑Back‑N). +> (5%) While the RDT protocols are essentially stop‑and‑wait +protocols, the GBN protocol allows the sender to send multiple packets +without waiting for acknowledgement from the receiving parties. How does +GBN achieve that? ## 1.3 IPv6 Transition (5%) -> (5%) Invention and adoption of IPv6 is a big advance in computer networking. What problems was IPv6 intended to solve? With the large number of networking devices and applications using IPv4 still in use, how is the transition from IPv4 to IPv6 being resolved? - -Motivation: Vast address space (no exhaustion), fewer routing entries via hierarchical aggregation, simplified autoconfiguration (SLAAC, DHCPv6), removal of many NAT constraints, and native IPsec support. - -Transition: Dual stack (IPv4+IPv6), tunneling (e.g., 6in4/6to4/Teredo), and translation (NAT64/DNS64) allow coexistence while IPv6 adoption increases. - -Reference: Kurose & Ross, 8th ed., Ch. 4 (The Internet Protocol (IP): IPv4, Addressing, IPv6, and More; transition mechanisms). +> (5%) Invention and adoption of IPv6 is a big advance in computer +networking. What problems was IPv6 intended to solve? With the large +number of networking devices and applications using IPv4 still in use, +how is the transition from IPv4 to IPv6 being resolved? ## 1.4 SNMP Protocol (5%) -> (5%) SNMP is a protocol for network management. It has seven message types. What are the purposes of the SNMP GetRequest and SetRequest messages? Why were UDP datagrams chosen to transport SNMP messages? - -- GetRequest: Manager reads MIB object values from an agent. -- SetRequest: Manager changes configuration parameters on an agent. -- Why UDP: Low overhead and no connection setup; scalable for polling many devices; SNMP defines its own retry/timeout; resilient during control-plane stress when maintaining TCP connections is harder. - -Reference: Kurose & Ross, 8th ed., Ch. 5 (Network management and SNMP). +> (5%) SNMP is a protocol for network management. It has seven message +types. What are the purposes of the SNMP GetRequest and SetRequest +messages? Why were UDP datagrams chosen to transport SNMP messages? ## 1.5 SDN-Enabled Devices (5%) -> (5%) In today’s market and its applications, there are many SDN-enabled networking devices. What are the preferrable features that an SDN-enabled networking device usually has? - -Preferable features: -- Separation of control/data planes; secure controller channel; OpenFlow or similar southbound API. -- Programmable match-action pipelines and flow tables; counters/telemetry. -- Network virtualization (slicing/overlays), QoS, and service chaining support. -- Northbound APIs/integration for centralized policy and automation. -- Security via centralized policy (ACLs, microsegmentation). +> (5%) In today’s market and its applications, there are many +SDN-enabled networking devices. What are the preferrable features that +an SDN-enabled networking device usually has? Reference: Kurose & Ross, 8th ed., Ch. 5 (SDN control plane, generalized forwarding). ## 1.6 BGP Loop Detection (5%) -> (5%) BGP is a routing protocol used for routing among ISPs. One problem that BGP faces is detecting loops in paths. What are the loops? Why should loops be avoided? How does BGP detect the loops in paths? - -- Loops: Paths that revisit the same AS/router (e.g., A->B->C->B->...). -- Avoidance: Loops waste bandwidth, add delay, and cause instability. -- Detection: AS_PATH attribute lists traversed ASes; if a received route’s AS_PATH contains the local AS, discard it. Policies/filters and max-path-length provide additional safeguards. - -Reference: Kurose & Ross, 8th ed., Ch. 5 (Inter-AS routing: BGP; loop prevention via AS_PATH). - ---- +> (5%) BGP is a routing protocol used for routing among ISPs. One problem +that BGP faces is detecting loops in paths. What are the loops? Why +should loops be avoided? How does BGP detect the loops in paths? # Part 2: Long Answer Questions (70%) ## 2.1 1's Complement Checksum (10%) -> (10%) UDP and TCP use 1’s complement for their checksums to detect errors. Suppose you have the following 8‑bit bytes: 11011001, 01010010, 11001010, 10100100 and 01011001. -> a) What is the 1’s complement of the sum of these 8‑bit bytes? Show all the details of your work. -> b) Why do UDP and TCP take the 1’s complement of the sum as their checksum, instead of the just sum of these bytes? -> c) With the 1’s complement scheme, how does the receiver detect errors? -> d) With this checksum scheme, is it possible that any 1‑bit error will go undetected? How about a 2‑bit error? Explain your answer. +> (10%) UDP and TCP use 1’s complement for their checksums to detect +errors. Suppose you have the following 8‑bit bytes: 11011001, 01010010, +11001010, 10100100 and 01011001. -Given 8-bit bytes: 11011001, 01010010, 11001010, 10100100, 01011001. - -a) 1’s complement of the sum (8-bit 1’s-complement arithmetic with end-around carry): - -- Interpret bytes (hex/dec): D9 (217), 52 (82), CA (202), A4 (164), 59 (89) -- Running sum with wrap-around: - - D9 + 52 = 0x12B → keep 0x2B, add carry 1 → 0x2C (44) - - 0x2C + CA = 0xF6 (246), no carry - - 0xF6 + A4 = 0x19A → keep 0x9A, add carry 1 → 0x9B (155) - - 0x9B + 59 = 0xF4 (244), no carry -- Final 1’s-complement sum = 0xF4 = 11110100 -- Checksum = bitwise complement = 0x0B = 00001011 - -Answer: 00001011 - -b) Why 1’s complement? With 1’s-complement addition and end-around carry, adding data plus checksum yields an all-ones result in the absence of errors, which is easy to verify. It provides better coverage than a simple modulo-2^n sum while remaining simple to implement. +> a) What is the 1’s complement of the sum of these 8‑bit bytes? Show all the details of your work. -c) Receiver detection: Add all bytes including the checksum using 1’s-complement arithmetic. A correct segment sums to all 1s (for 8-bit, 0xFF); equivalently, the 1’s complement of the total is 0x00. Otherwise, declare error. +> b) Why do UDP and TCP take the 1’s complement of the sum as their checksum, instead of the just sum of these bytes? -d) Error coverage: Detects all single-bit errors and most multi-bit errors. Certain balanced multi-bit patterns can evade detection (so some 2-bit errors may go undetected). +> c) With the 1's complement scheme, how does the receiver detect errors? -Reference: Kurose & Ross, 8th ed., Ch. 3 (Internet checksum in UDP/TCP) and Ch. 6 (parity/checksum context at link layer). +> d) With this checksum scheme, is it possible that any 1‑bit error will go undetected? How about a 2‑bit error? Explain your answer. ## 2.2 Dijkstra's Shortest Path Algorithm (20%) -> (20%) The following table is used to compute the shortest path from A to all other nodes in a network, according to the link‑state algorithm, which is better known as Dijkstra’s shortest path algorithm. -> a) Interpret the table above in your words: what it is showing and what are each row and each column showing? -> b) Consider the network shown in the following diagram. With the indicated link costs, use Dijkstra’s shortest path algorithm to compute the shortest path from x to all other network nodes. Show how the algorithm works by computing a table like the one above. - -a) Interpretation of the sample table: Each row is one iteration. N’ lists nodes whose shortest-path distances from the source are finalized. Each D(n),P(n) shows the current best known distance to node n and its predecessor on the tentative shortest path. At each iteration, the node with the smallest tentative D(·) is added to N’, and edges from that node are relaxed to update neighbors’ D(·)/P(·). - -b) Apply Dijkstra from source x (see figure). The following table shows the iterations and tentative distances; final paths are listed after the table. +> (20%) The following table is used to compute the shortest path from A +to all other nodes in a network, according to the link‑state algorithm, +which is better known as Dijkstra’s shortest path algorithm. -| Step | N’ | D(s),P(s) | D(t),P(t) | D(u),P(u) | D(v),P(v) | D(w),P(w) | D(y),P(y) | D(z),P(z) | -|:----:|:----------------|:----------|:----------|:----------|:----------|:----------|:----------|:----------| -| 0 | {x} | 5,x | $\infty$ | $\infty$ | $\infty$ | 3,x | 5,x | $\infty$ | -| 1 | {x,w} | 5,x | $\infty$ | 4,w | $\infty$ | 3,x | 5,x | $\infty$ | -| 2 | {x,w,u} | 5,x | $\infty$ | 4,w | 5,u | 3,x | 5,x | $\infty$ | -| 3 | {x,w,u,s} | 5,x | 6,s | 4,w | 5,u | 3,x | 5,x | $\infty$ | -| 4 | {x,w,u,s,v} | 5,x | 6,s | 4,w | 5,u | 3,x | 5,x | $\infty$ | -| 5 | {x,w,u,s,v,y} | 5,x | 6,s | 4,w | 5,u | 3,x | 5,x | $\infty$ | -| 6 | {x,w,u,s,v,y,t} | 5,x | 6,s | 4,w | 5,u | 3,x | 5,x | 9,t | -| 7 | {x,w,u,s,v,y,t,z}| 5,x | 6,s | 4,w | 5,u | 3,x | 5,x | 9,t | - -Final shortest-path costs from x: w=3; u=4 (x->w->u); s=5 (x->s); y=5 (x->y); v=5 (x->w->u->v); t=6 (x->s->t); z=9 (x->s->t->z). +> a) Interpret the table above in your words: what it is showing and what are each row and each column showing? -Reference: Kurose & Ross, 8th ed., Ch. 5 (Routing algorithms: Dijkstra/Link-State). +> b) Consider the network shown in the following diagram. With the indicated link costs, use Dijkstra’s shortest path algorithm to compute the shortest path from x to all other network nodes. Show how the algorithm works by computing a table like the one above. ## 2.3 CIDR Routing (20%) @@ -152,45 +93,27 @@ Reference: Kurose & Ross, 8th ed., Ch. 5 (Routing algorithms: Dijkstra/Link-Stat > c) 192.53.40.6 > d) 192.53.56.7 -CIDR routing uses longest-prefix match: for each packet’s destination, select the matching entry with the longest prefix; otherwise use Default. - -Decisions: -- 135.46.61.10 → matches 135.46.60.0/22 (covers 135.46.60.0–135.46.63.255) → Interface 1 -- 135.46.53.16 → no /22 match (those cover 56.0–63.255) → Default → Router 3 -- 192.53.40.6 → matches 192.53.40.0/23 (covers 40.0–41.255) → Router 2 -- 192.53.56.7 → no match → Default → Router 3 - -Reference: Kurose & Ross, 8th ed., Ch. 4 (IP addressing, CIDR, and longest‑prefix matching). ## 2.4 TCP Congestion Control (20%) -> (20%) Consider that only a single TCP connection uses a 1 Gbps link, which does not buffer any data. Suppose that this link is the only congested link between the sending and receiving hosts. Assume that the TCP sender has a huge file to send to the receiver and the receiver’s receive buffer is much larger than the congestion window. Further assume that each TCP segment size is 1,500 bytes; the two-way propagation delay of this connection is 15 msec; and this TCP connection is always in the congestion avoidance phase (ignore slow start). -> a) What is the maximum window size (in segments) that this TCP connection can achieve? -> b) What is the average window size (in segments) and average throughput (in bps) of this TCP connection? -> c) How long would it take for this TCP connection to reach its maximum window again after recovering from a packet loss? -> d) Assume we want the 1 Gbps link to buffer a finite number of segments and always keep the link busy sending data. How would you choose a buffer size? Justify your answer. +> (20%) Consider that only a single TCP connection uses a 1 Gbps link, +which does not buffer any data. Suppose that this link is the only +congested link between the sending and receiving hosts. Assume that the +TCP sender has a huge file to send to the receiver and the receiver’s +receive buffer is much larger than the congestion window. Further assume +that each TCP segment size is 1,500 bytes; the two-way propagation delay +of this connection is 15 msec; and this TCP connection is always in the +congestion avoidance phase (ignore slow start). Given: Single TCP flow over a 1 Gbps link, no buffering at the link; MSS=1500 B (12,000 bits); two-way propagation delay (RTT) ≈ 15 ms; always in congestion avoidance. -a) Maximum window (segments): -- BDP = C x RTT = 1e9 bps x 0.015 s = 15e6 bits -- W_max ≈ BDP / MSS = 15e6 / 12,000 ≈ 1,250 segments - -b) Average window and throughput: -- AIMD sawtooth average ≈ 0.75 x W_max ≈ 937.5 segments -- Average throughput ≈ (937.5 x 12,000 bits) / 0.015 s ≈ 7.5e8 bps ≈ 750 Mbps - -c) Time to recover to W_max after a loss: -- After halving to W_max/2, cwnd increases by ~1 MSS per RTT → needs W_max/2 RTTs -- 625 RTTs x 0.015 s ≈ 9.375 s +> a) What is the maximum window size (in segments) that this TCP connection can achieve? -d) Buffer sizing to keep the link busy: -- For a single flow, provision on the order of the BDP to absorb bursts and maintain full utilization despite window dynamics: ≈ 15 Mb ≈ 1.875 MB ≈ ~1,250 MSS-sized segments. -- With many flows, smaller buffers (≈ BDP/sqrt(N)) can suffice, but for N=1, BDP is the safe choice. +> b) What is the average window size (in segments) and average throughput (in bps) of this TCP connection? -Reference: Kurose & Ross, 8th ed., Ch. 3 (TCP congestion control: AIMD, sawtooth behavior; throughput/window relations). +> c) How long would it take for this TCP connection to reach its maximum window again after recovering from a packet loss? ---- +> d) Assume we want the 1 Gbps link to buffer a finite number of segments and always keep the link busy sending data. How would you choose a buffer size? Justify your answer. # References diff --git a/assignments/3/README.md b/assignments/3/README.md index 27724f4..278af7f 100644 --- a/assignments/3/README.md +++ b/assignments/3/README.md @@ -15,194 +15,84 @@ linestretch: 1.0 > (5%) What is the role of the anchor MSC in GSM networks? -The anchor MSC (Mobile Switching Center) keeps a call anchored to a single MSC for its entire duration while the mobile moves. It: -- Coordinates with HLR/VLR for authentication, location, and subscriber data. -- Manages intra- and inter-MSC handovers by setting up and tearing down trunks to visited MSCs while keeping the original call leg. -- Maintains continuity so numbering, charging, and signaling remain stable as the user roams. - -Reference: 3GPP TS 23.002; TS 23.009 (high-level architecture and handover procedures in GSM/UMTS networks). - ## 1.2 LTE Network Characteristics (5%) -> (5%) What are the main characteristics of LTE radio access networks? How does LTE network differ from previous generations of cellular networks? - -- E-UTRAN with a flat architecture: eNodeBs handle radio and many control functions; no RNC. All-IP core (EPC). -- Air interface: OFDMA (DL), SC-FDMA (UL); flexible channel bandwidths (1.4 to 20 MHz). HARQ; 1 ms TTI. -- MIMO and advanced scheduling; adaptive modulation and coding; QoS bearers (default/dedicated EPS bearers). -- Compared to 3G (UMTS/WCDMA): LTE moves from wideband CDMA to OFDM-based access, eliminates circuit-switched core (CS services via IMS/VoLTE), reduces latency, increases spectral efficiency, and simplifies the RAN. - -Reference: 3GPP TS 36.300 (E-UTRAN overall description); Kurose & Ross, 8th ed., Ch. 7 (cellular overview). +> (5%) What are the main characteristics of LTE radio access networks? How +does LTE network differ from previous generations of cellular networks? ## 1.3 CSMA/CD Protocol (5%) -> (5%) What does CSMA/CD stand for? How does the protocol work? Explain why RTT on an Ethernet LAN is an important parameter for the CSMA/CD protocol to work properly. - -- CSMA/CD: Carrier Sense Multiple Access with Collision Detection. -- Operation: Sense channel idle, transmit; while transmitting, detect collision (signal energy). On collision, send jam signal and abort; back off using binary exponential backoff (choose K in {0..2^n-1} slots; slot = 512 bit times); retry. -- RTT/slot-time importance: To guarantee any collision is detected while transmitting, frames must be at least 512 bits so transmission lasts at least one round-trip propagation time (including repeater delays). If frames were shorter than the slot time, a station could finish sending without detecting a collision. - -Reference: Kurose & Ross, 8th ed., Sec. 6.3.2 (CSMA/CD), Sec. 6.4.2 (Ethernet frame and slot time). +> (5%) What does CSMA/CD stand for? How does the protocol work? Explain +why RTT on an Ethernet LAN is an important parameter for the CSMA/CD +protocol to work properly. ## 1.4 CSMA/CA Protocol (5%) -> (5%) What does CSMA/CA stand for? How does the protocol work? How can collisions be avoided in the protocol? - -- CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance (802.11 DCF). -- Operation: After sensing idle for DIFS, choose random backoff; decrement timer while idle; transmit when backoff reaches zero; receiver sends ACK after SIFS. Collisions are inferred by missing ACK. -- Avoidance: Random backoff spaces transmissions; RTS/CTS reserves the channel and mitigates hidden terminals; interframe spacing (SIFS/DIFS) prioritizes control/ACK. - -Reference: Kurose & Ross, 8th ed., Ch. 7 (802.11 MAC/DCF, RTS/CTS). +> (5%) What does CSMA/CA stand for? How does the protocol work? How can +collisions be avoided in the protocol? ## 1.5 Data Link Layer Error Detection/Correction (5%) -> (5%) What techniques can be used for error-detection and error-correction, respectively, on the data link layer? - -- Detection: Parity (single, two-dimensional), checksum (1's complement), CRC. -- Correction: Hamming codes, Reed-Solomon, convolutional/turbo/LDPC codes. ARQ/HARQ combine FEC with retransmissions. - -Reference: Kurose & Ross, 8th ed., Sec. 6.2 (parity, checksum, CRC). +> (5%) What techniques can be used for error-detection and +error-correction, respectively, on the data link layer? ## 1.6 Wi-Fi Network Standards (5%) -> (5%) What wireless (Wi-Fi) network standards are used in today's industries? What are the characteristics of the link specified in each standard? - -- 802.11n (Wi-Fi 4): 2.4/5 GHz, 20/40 MHz channels, MIMO, up to 600 Mbps PHY. -- 802.11ac (Wi-Fi 5): 5 GHz, 20/40/80/160 MHz, MU-MIMO (DL), higher-order QAM, multi-Gbps PHY. -- 802.11ax (Wi-Fi 6/6E): 2.4/5/6 GHz, OFDMA, MU-MIMO (UL/DL), BSS coloring, TWT; higher efficiency and capacity. -- 802.11be (Wi-Fi 7, emerging): 2.4/5/6 GHz, 320 MHz channels, multi-link operation, higher-order MIMO and QAM; very high throughput. - -Reference: IEEE 802.11 standard family (e.g., 802.11-2016 and amendments); Kurose & Ross, 8th ed., Ch. 7. - ---- +> (5%) What wireless (Wi-Fi) network standards are used in today's +industries? What are the characteristics of the link specified in each +standard? # Part 2: Long Answer Questions (70%) ## 2.1 Code Division Multiple Access (CDMA) (15%) -> (15%) Begin with reading about the simple CDMA protocol... choose one CDMA scheme and explain how it works. Describe the advantages that CDMA has over other coding schemes, such as TDM and FDM. Include in your answer the titles and sources of the articles/documents you consulted. - -Chosen scheme: UMTS W-CDMA (FDD). -- Spreading: User data is spread by orthogonal variable spreading factor (OVSF) channelization codes to a common chip rate (3.84 Mcps). Scrambling codes separate cells/users at the cell and UE level. -- Power control: Fast closed-loop power control combats near-far and fading (e.g., 1500 Hz downlink commands). -- Receiver: RAKE combining aligns and coherently combines energy from multipath components (fingers), exploiting multipath diversity. -- Handover: Soft/softer handover maintains simultaneous links to multiple cells/sectors; diversity improves robustness. -- Advantages over TDM/FDM: Interference averaging (soft capacity), graceful degradation as load increases, strong multipath resilience via RAKE, flexible rate adaptation by varying spreading factor and coding, inherent security through spreading. - -Sources consulted: -- 3GPP TS 25.213, Spreading and Modulation (FDD). -- Holma & Toskala, WCDMA for UMTS: HSPA Evolution and LTE. -- Proakis & Salehi, Digital Communications. -- Kurose & Ross, 8th ed., Ch. 7 (high-level cellular/CDMA context). +> (15%) Begin with reading about the simple CDMA protocol... choose one +CDMA scheme and explain how it works. Describe the advantages that CDMA +has over other coding schemes, such as TDM and FDM. Include in your +answer the titles and sources of the articles/documents you consulted. ## 2.2 Two-Dimensional Checksum (15%) -> (15%) Suppose host A has payload 1011 0110 1010 1011 to send to host B, and A wants to use a two-dimensional checksum for host B to detect and correct any 1-bit error that may occur during the transmission. Furthermore, host A wants to minimize the length of the checksum to conserve bandwidth of the communication channel. What would the value of the checksum field be if an even parity scheme is used? Show all your work and prove why the checksum you have worked out is the shortest. Prove that any 1-bit error can be detected and corrected. - -Arrange the 16 data bits in a 4x4 matrix (row-major): - -Row1: 1 0 1 1 (sum 3) -> row parity pR1 = 1 (to make even) -Row2: 0 1 1 0 (sum 2) -> pR2 = 0 -Row3: 1 0 1 0 (sum 2) -> pR3 = 0 -Row4: 1 0 1 1 (sum 3) -> pR4 = 1 - -Column parities: -- Col1: 1,0,1,1 (sum 3) -> pC1 = 1 -- Col2: 0,1,0,0 (sum 1) -> pC2 = 1 -- Col3: 1,1,1,1 (sum 4) -> pC3 = 0 -- Col4: 1,0,0,1 (sum 2) -> pC4 = 0 - -Overall parity p0: even parity over all 16 data bits plus 8 parity bits. Data ones = 10 (even). Row parity ones = 2. Column parity ones = 2. Total so far = 14 (even) -> p0 = 0. - -Checksum bits (one possible ordering): [pR1 pR2 pR3 pR4 pC1 pC2 pC3 pC4 p0] = 1 0 0 1 1 1 0 0 0. - -Why shortest: For an m x n arrangement, checksum length is m + n + 1. For 16 bits, possibilities include 1x16 (18), 2x8 (11), 4x4 (9), 8x2 (11), 16x1 (18). Thus 4x4 is minimal. - -1-bit detect/correct: A single flipped data bit causes exactly one row parity and one column parity to fail, and toggles overall parity (odd). The intersection of the failing row and column identifies the bit to correct. If a parity bit flips, overall parity detects it while rows/columns localize which parity bit erred. - -Reference: Kurose & Ross, 8th ed., Sec. 6.2.1 (two-dimensional parity). +> (15%) Suppose host A has payload 1011 0110 1010 1011 to send to +host B, and A wants to use a two-dimensional checksum for host B +to detect and correct any 1-bit error that may occur during the +transmission. Furthermore, host A wants to minimize the length of +the checksum to conserve bandwidth of the communication channel. What +would the value of the checksum field be if an even parity scheme is +used? Show all your work and prove why the checksum you have worked out +is the shortest. Prove that any 1-bit error can be detected and corrected. ## 2.3 CSMA/CD Ethernet Analysis (20%) -> (20%) Assume a 1 Gbps Ethernet has two nodes, A and B, connected by a 180 m cable with three repeaters in between, and they each have one frame of 1,024 bits to send to each other. Further assume that the signal propagation speed across the cable is 2*10^8 m/sec; CSMA/CD uses back-off intervals of multiples of 512 bits; and each repeater will insert a store-and-forward delay equivalent to 20-bit transmission time. At time t = 0, both A and B attempt to transmit. After the first collision, A draws K = 0 and B draws K = 1 in the exponential backoff protocol after sending the 48 bits jam signal. -> a) What is the one-way propagation delay (including all repeater delays) between A and B in seconds? At what time is A's packet completely delivered at B? -> b) Now suppose that only A has a packet to send and that the repeaters are replaced with switches. Suppose that each switch has an 8-bit processing delay in addition to a store-and-forward delay. At what time, in seconds, is A's packet delivered at B? +> (20%) Assume a 1 Gbps Ethernet has two nodes, A and B, connected by +a 180 m cable with three repeaters in between, and they each have one +frame of 1,024 bits to send to each other. Further assume that the +signal propagation speed across the cable is 2*10^8 m/sec; CSMA/CD +uses back-off intervals of multiples of 512 bits; and each repeater +will insert a store-and-forward delay equivalent to 20-bit transmission +time. At time t = 0, both A and B attempt to transmit. After the first +collision, A draws K = 0 and B draws K = 1 in the exponential backoff +protocol after sending the 48 bits jam signal. > In your calculations for a and b, you must include all the delays that occur according to CSMA/CD, and you must show the details of your work. -Given: -- Rate = 1e9 bps. Frame length = 1024 bits. Jam = 48 bits. Slot = 512 bits. -- Cable propagation = 180 m / (2e8 m/s) = 0.9 microseconds. -- 3 repeaters x 20-bit times = 60 ns = 0.06 microseconds (treated as added delay per the problem statement). -- One-way propagation including repeaters: 0.9 + 0.06 = 0.96 microseconds. - -a) Timeline with collision at t = 0: -- Both start transmitting at t = 0. -- Each detects collision when the other's signal arrives: t = 0.96 microseconds. -- Each sends 48-bit jam: duration 48 ns = 0.048 microseconds. Local jam ends at 1.008 microseconds. -- The last bit of B's jam arrives at A at 1.008 + 0.96 = 1.968 microseconds (channel becomes idle then). -- Backoff: A draws K = 0, B draws K = 1. A begins retransmission immediately when idle; B would attempt after 1 slot (0.512 microseconds) but will sense busy and defer. -- A's frame transmission time: 1024 bits / 1e9 = 1.024 microseconds. Last bit leaves A at 1.968 + 1.024 = 2.992 microseconds. -- Last bit arrives at B after one-way propagation: 2.992 + 0.96 = 3.952 microseconds. - -Answer (a): one-way delay = 0.96 microseconds; A's packet completely delivered at B at about 3.952 microseconds. - -b) Replace 3 repeaters with 3 store-and-forward switches (8-bit processing per switch): -- Per switch delay = frame time + processing = 1.024 microseconds + 8 ns = 1.032 microseconds. -- End-to-end: A transmits 1.024 microseconds, then 3 switches each add 1.032 microseconds, plus cable propagation (0.9 microseconds). Delivery time (from t = 0): - 1.024 + 3*(1.032) + 0.9 = 1.024 + 3.096 + 0.9 = 5.020 microseconds. - -Answer (b): about 5.020 microseconds. +> a) What is the one-way propagation delay (including all repeater delays) between A and B in seconds? At what time is A's packet completely delivered at B? -Reference: Kurose & Ross, 8th ed., Sec. 6.3.2 (CSMA/CD timing, jam, backoff) and Sec. 6.4.3 (store-and-forward switching). +> b) Now suppose that only A has a packet to send and that the repeaters are replaced with switches. Suppose that each switch has an 8-bit processing delay in addition to a store-and-forward delay. At what time, in seconds, is A's packet delivered at B? ## 2.4 802.11 RTS/CTS Transmission (10%) -> (10%) Suppose an 802.11 station is configured to always reserve the channel with RTS/CTS. At t = 0 it wants to transmit 1024 bytes. All other stations are idle. At what time will the station complete the transmission? At what time can the station receive the acknowledgement? - -Assumptions (matching common textbook values and ignoring PHY preamble/PLCP overheads unless specified): -- Data rate = 11 Mbps. DIFS = 50 microseconds. SIFS = 10 microseconds. -- Frame sizes: RTS = 160 bits; CTS = 112 bits; ACK = 112 bits; DATA payload = 1024 bytes = 8192 bits; assume MAC header + FCS bring the data bits to 8416 bits. - -Timing (all at 11 Mbps except interframe spaces): -- DIFS: 50.000 microseconds. -- RTS: 160/11e6 = 14.545 microseconds. -- SIFS: 10.000 microseconds. -- CTS: 112/11e6 = 10.182 microseconds. -- SIFS: 10.000 microseconds. -- DATA: 8416/11e6 = 765.091 microseconds. -- SIFS: 10.000 microseconds. -- ACK: 112/11e6 = 10.182 microseconds. - -Totals: -- Data transmission complete at: 50 + 14.545 + 10 + 10.182 + 10 + 765.091 = 859.818 microseconds. -- ACK received at: 859.818 + 10 + 10.182 = 880.000 microseconds. - -Reference: Kurose & Ross, 8th ed., Ch. 7 (802.11 timing and RTS/CTS). +> (10%) Suppose an 802.11 station is configured to always reserve the +channel with RTS/CTS. At t = 0 it wants to transmit 1024 bytes. All +other stations are idle. At what time will the station complete the +transmission? At what time can the station receive the acknowledgement? ## 2.5 Bluetooth Frame Format Analysis (10%) -> (10%) Conduct research about Bluetooth technology and describe and comment on the format of the Bluetooth frame. Focus on its features and limitations. Is there anything in the frame format that inherently limits the number of active nodes in a network to eight active nodes? Explain. - -Classic Bluetooth baseband frame: -- Access Code (72 bits): preamble, sync word (based on lower address), trailer; used for timing and identification. -- Header (54 bits transmitted with 1/3 FEC over an 18-bit header): AM_ADDR (3 bits), Type (4), Flow (1), ARQN (1), SEQN (1), HEC (8); robust via FEC. -- Payload (0 to 2745 bits) with 16-bit CRC; optional FEC (2/3, 3/5) and whitening; various packet types define payload length and structure. - -Features and limitations: -- Robust short-range links with FEC, ARQ, fast frequency hopping; low power design. -- Payload and slot structure constrain throughput; tight timing and hopping sequence complexity. -- Piconet concurrency: AM_ADDR is 3 bits, yielding up to 7 active slaves addressed by the master (plus the master itself). Additional devices can be parked (no AM_ADDR) and polled in/out, and multiple piconets can form scatternets, but a single piconet supports at most 7 active slaves concurrently due to the 3-bit address field in the frame header. - -References: Bluetooth Core Specification (e.g., v5.x); Kurose & Ross, 8th ed., Ch. 6/7 (MAC/link framing context). - ---- +> (10%) Conduct research about Bluetooth technology and describe and +comment on the format of the Bluetooth frame. Focus on its features and +limitations. Is there anything in the frame format that inherently limits +the number of active nodes in a network to eight active nodes? Explain. # References - Kurose, J. F., & Ross, K. W. (8th ed.). Computer Networking: A Top-Down Approach. (See Ch. 6: Link Layer and LANs; Ch. 7: Wireless and Mobile Networks.) -- 3GPP TS 23.002: Network Architecture; 3GPP TS 23.009: Handover Procedures. -- 3GPP TS 36.300: E-UTRAN Overall Description. -- 3GPP TS 25.213: Spreading and Modulation (FDD) for W-CDMA. -- IEEE 802.11 Standard (e.g., 802.11-2016 and amendments for 11n/ac/ax/be context). -- Bluetooth SIG, Bluetooth Core Specification (e.g., v5.x). -- Proakis, J. G., & Salehi, M. Digital Communications. (CDMA fundamentals.) -- Holma, H., & Toskala, A. WCDMA for UMTS: HSPA Evolution and LTE. |
