CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online

Similar documents
FINAL May 21, minutes

Links. CS125 - mylinks 1 1/22/14

CSCI 466 Midterm Networks Fall 2011

CPE 548 Exam #1 (50 pts) February 17, 2016

1/29/2008. From Signals to Packets. Lecture 6 Datalink Framing, Switching. Datalink Functions. Datalink Lectures. Character and Bit Stuffing.

CPE 448/548 Exam #1 (100 pts) February 14, Name Class: 448

Lecture 6 Datalink Framing, Switching. From Signals to Packets

CS 455/555 Intro to Networks and Communications. Link Layer

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Problem Set Name the 7 OSI layers and give the corresponding functionalities for each layer.

CS 716: Introduction to communication networks. - 9 th class; 19 th Aug Instructor: Sridhar Iyer IIT Bombay

CSCI 466 Midterm Networks Fall 2011

CSE 123: Computer Networks

INSTRUCTIONS TO CANDIDATES

===================================================================== Exercises =====================================================================

Midterm Exam CSCE 232: Computer Networks Fall Instructions:

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

Department of Computer and IT Engineering University of Kurdistan. Data Communication Netwotks (Graduate level) Data Link Layer

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

Distributed Queue Dual Bus

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

PART III. Data Link Layer MGH T MGH C I 204

The Link Layer and LANs. Chapter 6: Link layer and LANs

Reminder: Datalink Functions Computer Networking. Datalink Architectures

VTU-NPTEL-NMEICT Project

Multiple Access Protocols

Chapter 5 Link Layer and LANs

Code No: RR Set No. 1

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

CSC 4900 Computer Networks: The Link Layer

EE122 Spring 2001 Final

CS244a: An Introduction to Computer Networks

ECE 653: Computer Networks Mid Term Exam all

CS244a: An Introduction to Computer Networks

High Level View. EE 122: Error detection and reliable transmission. Overview. Error Detection

Data Link Layer Overview

CSCI-1680 Link Layer I Rodrigo Fonseca

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

ECE 4450:427/527 - Computer Networks Spring 2017

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

EE 122: Error detection and reliable transmission. Ion Stoica September 16, 2002

NETWORK PROBLEM SET Due Date 6/28/2014

CSC 401 Data and Computer Communications Networks

CompSci 356: Computer Network Architectures. Lecture 8: Spanning Tree Algorithm and Basic Internetworking Ch & 3.2. Xiaowei Yang

Jaringan Komputer. Broadcast Network. Outline. MAC (Medium Access Control) Channel Allocation Problem. Dynamic Channel Allocation

Medium Access Protocols

Data Link Layer Overview

Lecture 4b. Local Area Networks and Bridges

CS 640 Lecture 4: 09/11/2014

NETWORK PROBLEM SET Solution

ECSE 414 Fall 2014 Final Exam Solutions

Chapter 4. The Medium Access Control Sublayer. Points and Questions to Consider. Multiple Access Protocols. The Channel Allocation Problem.

Chapter 5 Link Layer and LANs

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

CS244a: An Introduction to Computer Networks

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

EECS 122: Introduction to Communication Networks Final Exam Solutions

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 16

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

PRACTICE QUESTIONS ON RESOURCE ALLOCATION

Lecture 8 The Data Link Layer part I. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 3 Part 2 Switching and Bridging. Networking CS 3470, Section 1

Faculty of Science Final Examination. Computer Science B Basics of Computer Networks

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

Goals of Today s Lecture. Adaptors Communicating

Data Link Layer Overview

Error Detection Codes. Error Detection. Two Dimensional Parity. Internet Checksum Algorithm. Cyclic Redundancy Check.

COMP 361 Computer Communications Networks. Fall Semester Final Examination: Solution key

Medium Access Control. CSCI370 Lecture 5 Michael Hutt New York Institute of Technology

ECE 4450:427/527 - Computer Networks Spring 2017

SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY COMPUTER NETWORKS UNIT - II DATA LINK LAYER

Data Link Layer, Part 3 Medium Access Control. Preface

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

Outline. A Professional Company in Software-Defined Networking (SDN) Copyright , EstiNet Technologies Inc. All Rights Reserved..

HWP2 Application level query routing HWP1 Each peer knows about every other beacon B1 B3

Computer and Network Security

Link layer, LANs: outline. Chapter 5-1 Link Layer. Link layer: introduction. Link layer services

1. Data Link Layer (Layer 2)

Principles behind data link layer services

Housekeeping. Fall /5 CptS/EE 555 1

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Chapter 10 Error Detection and Correction. Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

A B C D E Total / 24 / 23 / 12 / 18 / 3 / 80

Internetworking Part 1

CS 3640: Introduction to Networks and Their Applications

Expected Time: 90 min PART-A Max Marks: 42

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Data Link Technology. Suguru Yamaguchi Nara Institute of Science and Technology Department of Information Science

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

Networking Technologies and Applications

LAN Overview (part 2) Interconnecting LANs - Hubs

Data Link Layer Overview

Media Access Control (MAC) Sub-layer and Ethernet

Part3. Local Area Networks (LAN)

Transcription:

1 CS/ECE 438: Communication Networks for Computers Spring 2018 Midterm Examination Online Solutions 1. General Networking a. In traditional client-server communication using TCP, a new socket is created. Explain why. How would it hurt performance it only one socket is used? The server would not be able to accept incoming connections from other clients on the same port. b. Why is determining and handling byte order left up to the programmer and not handled by the operating system? Give an example of what could go wrong. The system doesn t have access to knowledge about the user s data c. Suppose packets on a wireless link consist of N data bits and H header bits each, where H is fixed. Suppose bits are received in error with probability P, independently of each other, and that N is adjusted to maximize the throughput of data in bits per second. If P gets smaller, does the optimal value of N get larger or smaller? Why? As P 0, N monotonically, so N gets larger. Intuitively, overhead is more important than loss for smaller P. 2. Physical Layer, Framing and Encoding a. What is the relationship between bit rate and baud rate? Bitrate = baudrate * number of bits per symbol b. Explain how a receiver detects the end of a frame with length-based framing. Explain what will happen if the length indicator gets corrupted. The length is indicated in the header of the frame. The sender and receiver will lose all synchronization. c. The data rate of a QAM system using M-ary symbols does not change if the bandwidth is increased while M and the baud rate are held constant. What, if anything, is the benefit of using more bandwidth? Fewer bit errors, less erasures, less misinterpreted symbols, cleaner/clearer symbols, less dispersion Tolerates more noise, tolerates lower s/n (i.e., since we now have fewer errors, we can introduce errors and maintain the same error rate as the original system) d. What properties of NRZI encoding make it a good choice for pairing with 4B/5B encoding? Explain why. Because NRZI guarantees no long sequences of 0s and NRZI guarantees no long sequences of 1s. 3. Error Control (both sides of sheet)

2 a. How does the Internet checksum detect an error? What could cause the checksum algorithm to fail to detect an error? It adds up all of the bytes and transmits the sum. And set of bytes that adds up to the same sum will be considered correct. b. Given a code with Hamming distance n, i. how many errors can be detected in the presence of three erasures? n-4 ii. how many errors can be corrected in the presence of three erasures? ë(n-4)/2û or é(n-5)/2ù c. Consider a frame consisting of three characters of four bits each. Assume that the probability of error is 10-4, independent for each bit. What is the probability that the frame is received correctly? How might adding a parity bit to each character improve the framing scheme? (1-10^4) 12 If you add parity chances of bit errors increase, but chances of undetected errors decrease. 4. Medium Access a. Give two reasons why a CSMA/CD-type protocol cannot be used in a wireless environment. Wireless devices are not full duplex, so they can t check the channel state and transmit at the same time. Additionally, due the non-symmetric nature of the medium, it is not guaranteed that a collision can be detected at both ends. b. During backoff, Ethernet used fixed time slots. How long are these timeslots? What could go wrong if the fixed slots were not used? c. Consider a 5-hop wireless network with one sender at one end and one receiver at the other end. Give two reasons why the sender cannot utilize the full link bandwidth on all links at the same time. d. Why does Ethernet have a minimum packet size? How is it determined? To ensure that all nodes can detect a collision. It is based on the maximum distance between two nodes. 5. Packet Switching a. In the Perlman distributed spanning tree algorithm, why does the root bridge periodically send messages even after the tree is determined? As a heartbeat to verify the tree and make sure none of the links or bridges on the tree have failed. b. Explain two drawbacks of datagram-based forwarding. Each packet must contain full destination address,

3 Router must maintain global state, Large amount of forwarding information

4 6. Spanning Tree Algorithm for Intelligent Bridges 13 points Suppose the Perlman spanning tree algorithm and the bridge learning algorithm for forwarding are used for the network shown below. A 4 D Jupiter 3 F Mars B 5 C 7 E 8 1 2 9 G 6 H Venus a) (7 points) Fill in the tables below indicating the root port for each bridge (as a LAN) and the designated bridge for each LAN. Bridge Root port LAN 1-2 E 3 F 4 D 5 D 6 H 7 E 8 E 9 H LAN Designated Bridge A 4 B 5 C 6 D 8 E 1 F 2 G 9 H 1 a) (3 points) After the spanning tree has converged: i) (1 point) Which bridge transmits configuration messages onto LAN D? 8

5 ii) (1 point) Which bridge(s) listen for such messages? 3, 4, 5, 8 iii) (1 point) Which bridge(s) forward such messages? 4,5 b) (3 points) Suppose after the configuration is complete, host Mars attaches to LAN B, host Venus attaches to LAN H and host Jupiter attaches to LAN F. Immediately after the spanning tree configuration is complete, the three hosts send consecutive messages (i.e. assume that each message crosses all necessary LAN s before the next message is sent). Answer the following for the following sequence: Mars sends a message to Venus, Jupiter sends a message to Mars, Venus sends a message to Jupiter. i) (1 point) Mars sends a message to Venus All ii) (1 point) Jupiter sends a message to Mars B, D, E, F iii) (1 point) Venus sends a message to Jupiter C, E, F, G, H

6 7. Error Detection with Cyclic Redundancy Checks 13 points Use the CRC generator polynomial C(x)=x 4 +x 3 +x+1 (i.e., check sequence 11011) for all parts of this problem. a) (4 points) What is the shortest pattern of error bits (equivalently, the polynomial of smallest degree) that can go undetected with C(x)? 11011, which is C(x), since all undetected burst errors must be a multiple of C(x). b) (5 points) What is the shortest two-bit error that can go undetected with C(x)? Find the first multiple of C(x) that begins and ends with 1's, and contains only 0's between the 1's. 11011 11011 ------ 101101 11011 ------- 1000001 = X 6 + 1 c) (4 points) Can a five-bit error go undetected with C(x)? Give an example or explain why no such example exists. No 5-bit error can go undetected since C(x) has an even number of 1's or since C(x) has a factor of (x + 1).

7 8. Medium Access Control 13 points Consider the problem of medium access control using carrier sense multiple access with collision detection (CSMA/CD, the algorithm used with Ethernet) for the network shown below. There is exactly 15km between neighboring stations. Assume that signals travel directly from any sender to all receivers, propagating at the speed of light in a fiber: 3x10 8 m/sec. (a) (4 points) If a transmitter sends at 40 Mbps, how long must packets be to guarantee collision detection by the transmitter? Longest link = 4*15 = 60 km, so maximum one-way delay is: (60x10 3 m) / (3 x 10 8 m/s) = 20 x 10-5 sec = 200 µsec Therefore, maximum RTT is 400 µsec. So at a rate of 40 Mbps, we get: (40x10 6 bps) * 200 µsec = 16000 bits = 2000 bytes (b) Divide time into slots the length of the maximum round-trip propagation delay in the network. One packet may be transmitted each time slot. Assume that each of the hosts attempts to transmit with probability p in each time slot. What is the probability of a successful transmission in any given slot if i) (2 points) p = 1/2? 5 x (1/2) x (1 1/2) 4 = 5 / 32 ii) (2 points) p = 2/3? 5 x (2/3) x (1 2/3) 4 = 10 / 243

8 For the last part of the problem, assume that each packet requires 200 bytes of header/trailer and 1000 bytes of data. Also assume the probability of successful transmission calculated for part (b)(i) (using p=1/2). (c) (5 points) A packet transmission may require more than one slot to complete. Assume that other hosts sense the continuation of the transmission (carrier sense) and simply discard any packets that arrive during those slots. Calculate the average throughput for the network. (Hint: use cycle analysis) 1000 + 200 B < 2000 B, so, only one slot is needed for transmission. Throughput = 5/32 * (1000 / 2000) * 40 Mbps = 3.125 Mbps

9 9. Switch Fabrics 13 points Banyan and Batcher networks are two types of self-routing fabrics often used to construct large switches from simpler components. A single stage of a n n Banyan network consists of n/2 switches of dimension 2 2. An n n Batcher network can be made from two Batcher networks of size n/2 n/2 plus a merge network with n/2 log2n switches. a. For n = 16, how many stages are required to route packets from the inputs to the outputs of a Banyan Network? For a Banyan network with n inputs, we need to have log2n stages. This is true because the first stage examines the most significant bit, the second stage examines the second most significant bit and so on so that the last stage examines the least significant bit. If we have n inputs, we need log2n bits to represent the inputs. Thus for n = 16, we need log216 = 4 stages. b. How many 2 2 switches are required for the network in part a)? At each stage, there needs to be n/2 switches. For n = 16, we will need 16 switches at each of the 4 stages for a total of 64 switches. c. Write down a recurrence relation T(n) for the number of switches in a Batcher network of size n n. This can be written immediately from the description of the Batcher Network above. The number of switches in a Batcher network of size n n is given by the recurrence relation T(n) = 2 * T(n/2) + n/2 logn, for n>2 and T(2)=1. d. Give the number of switches required for n = 16. The number of switches required for the Batcher network with n = 16 is T(16) = 80.