COMP 361 Computer Communications Networks. Spring Semester Final Examination Solution Key

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

CS 421: COMPUTER NETWORKS SPRING FINAL May 24, minutes. Name: Student No: TOT

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

CS 421: COMPUTER NETWORKS FALL FINAL January 10, minutes

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

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

CSCI 466 Midterm Networks Fall 2011

CSCI 466 Midterm Networks Fall 2011

ECSE 414 Fall 2014 Final Exam Solutions

Question Points Score total 100

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

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

Networks Homework # 2

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

CS 458 Internet Engineering Spring First Exam

Student ID: CS457: Computer Networking Date: 5/8/2007 Name:

CSC 4900 Computer Networks: The Link Layer

The Link Layer II: Ethernet

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

ECE/CSC 570 Section 001. Final test. December 11, 2006

CSCI Networking Name:

CS 421: COMPUTER NETWORKS FALL FINAL January 12, minutes

CS 421: COMPUTER NETWORKS FALL FINAL January 5, minutes. Name: Student No: TOT

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

Chapter 5 Link Layer and LANs

CS 421: COMPUTER NETWORKS SPRING FINAL May 8, minutes

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

Student ID: CS457: Computer Networking Date: 5/8/2007 Name:

Summary of MAC protocols

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

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

CS 349/449 Internet Protocols Midterm Exam Winter /21/2003

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

ECE 4450:427/527 - Computer Networks Spring 2017

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

Network Layer PREPARED BY AHMED ABDEL-RAOUF

Data Link Layer: Multi Access Protocols

Computer Networks. Today. Principles of datalink layer services Multiple access links Adresavimas, ARP LANs Wireless LANs VU MIF CS 1/48 2/48

Principles behind data link layer services

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

LECTURE PLAN. Script. Introduction about MAC Types o ALOHA o CSMA o CSMA/CD o CSMA/CA

Hubs, Bridges, and Switches (oh my) Hubs

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

Review is pretty much complete! Please help formatting review (indenting). - Jorden

Link Layer and LANs. Our Goals. Link Layer

Lecture 6. Data Link Layer (cont d) Data Link Layer 1-1

Medium Access Protocols

Data Link Layer, Part 5. Medium Access Control

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Multiple Access. Data Communications and Networking

ECE 461 Internetworking Fall Quiz 1

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

Chapter V: Link Layer

Wireless Challenges : Computer Networking. Overview. Routing to Mobile Nodes. Lecture 25: Wireless Networking

PART X. Internetworking Part 1. (Concept, IP Addressing, IP Routing, IP Datagrams, Address Resolution)

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

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

EE 122: Ethernet and

Chapter 12 Multiple Access 12.1

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

RAJIV GANDHI COLLEGE OF ENGINEERING AND TECHNOLOGY

Ethernet Switches (more)

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

CPS 706 Computer Networks (Fall 2011)

THE HONG KONG POLYTECHNIC UNIVERSITY. Department of Computing. This is an open-book examination.

CS 640: Introduction to Computer Networks

CSC 401 Data and Computer Communications Networks

Chapter 5: Link layer

College of Computer and Information Sciences Department of Computer Engineering CEN444 Computer Networks Midterm 2 Exam Second Semester 1434/1435

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 8

Chapter Motivation For Internetworking

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

Ethernet Switches Bridges on Steroids. Ethernet Switches. IEEE Wireless LAN. Ad Hoc Networks

Master Course Computer Networks IN2097

Vorlesung Kommunikationsnetze

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

Computer Networks CS 552

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

CSE 461: Multiple Access Networks. This Lecture

COMP3331/9331 XXXX Computer Networks and Applications Final Examination (SAMPLE SOLUTIONS)

MID II Tuesday, 1 st April 2008

IPv4. Christian Grothoff.

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

Hubs. Interconnecting LANs. Q: Why not just one big LAN?

cs144 Midterm Review Fall 2010

CS 3516: Computer Networks

CS/ECE 4457 FALL Name: Computing ID: WARM UP. Question 1: What type of transmission mode is depicted in the photo below:

Redes de Computadores. Medium Access Control

The Internet Protocol. IP Addresses Address Resolution Protocol: IP datagram format and forwarding: IP fragmentation and reassembly

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

Random Assignment Protocols

Introduction to Internetworking

CS 3516: Advanced Computer Networks

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Final Exam Computer Networks Fall 2015 Prof. Cheng-Fu Chou

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

Link Layer and LANs. CMPS 4750/6750: Computer Networks

Transcription:

COMP 361 Computer Communications Networks Spring Semester 2004 inal Examination Solution Key Date: May 24, 2004. ime: 4:30pm 7:30pm. Venue: Rm LG4204 Name: Student ID: Email: Instructions: 1. his examination paper consists of 17 pages and 10 questions 2. Please write your name, student ID and Email on this page. 3. or each subsequent page, please write your student ID at the top of the page in the space provided. 4. Please answer all the questions within the space provided on the examination paper. You may use the back of the pages for your rough work. 5. Please read each question very carefully and answer the question clearly and to the point. Make sure that your answers are neatly written, readable and legible. 6. Show all the steps you use in deriving your answer, where ever appropriate. 7. or each of the questions assume that the concepts are known to the graders. Concentrate on answering to the point what is asked. Do not define or describe the concepts unless specifically asked to. Question Points Score 1 8 2 15 3 6 4 15 5 15 6 8 7 8 8 5 9 5 10 15 OAL 100 Comp361 (Spring 2004) inal Examination Page 1 of 14

1) Answer the following true/false questions by circling either or. (8 points) a) OSP is the only Intra-AS routing protocol (an Intra-AS protocol is one that routes within Autonomous Systems) in use today b) Bridge forwarding is cut-through. c) Slotted Aloha is more efficient than pure Aloha d) PPP uses a CSMA access-control protocol e) AM is an end-to-end (desktop-to-desktop) network protocol f) In Selective Repeat protocols the loss of one packet can force the retransmission of many correctly received packets. g) Domain Name Servers don't use caching to improve performance. hey perform full name resolution each time they receive a name resolution request. h) A two-dimensional parity check scheme can correct all two-bit errors in the original data. Comp361 (Spring 2004) inal Examination Page 2 of 14

2) (15pts) a) What is meant by the Hidden erminal problem? Why is this a problem? b) Draw a diagram illustrating the Hidden erminal Problem (you must explain how your diagram illustrates the problem.) c) he 802.11 Wireless LAN protocol suite uses CSMA/CA (Collision Avoidance) to help solve the hidden terminal problem. Explain how CSMA/CA works and why it solves the hidden terminal problem. When explaining how CSMA/CA works you should assume a scenario in which there is a wireless network with (i) a sender, (ii) a receiver and (iii) other nodes. You should describe the actions taken by all of the members of the network when implementing the protocol. (Note: in your explanation of how CSMA/CD works you do not have to write the formal technical names of all of the packets sent, but you do need to describe their functions.) a) he hidden terminal problem arises in wireless LANS. he problem is that (two) nodes A and B might not be able to hear each other s transmissions because they are blocked (hidden) from each other. hey are both, though, in line of transmission with a third node C with which they are trying to exchange messages. he difficulty is that, since A and B can t hear each others transmissions, they are unable to sense any collision between packets that they are trying to send to C. herefore, Collision Detection algorithms can not work in this situation and a CSMA/CD protocol is unworkable here. b) See p. 485 of the textbook or p 94 of the chapter 5 notes. c) 1) sender senses channel for DIS time. If channel is idle, sender transmits a short RS (request to send) packet (which indicates length of transmission being requested). If channel is not idle, sender performs a backoff procedure. 2) receiver waits a SIS mount of time and then, if channel is idle, replies with short CS (clear to send) packet. As well as informing sender that it can now transmit this has added effect of notifying (possibly hidden) other nodes that the transmission will take place. CS also reserves channel for a requested amount of time by saying how long the expected message will be. 3) Sender then sends actual data packet Comp361 (Spring 2004) inal Examination Page 3 of 14

4) Receiver then sends an ACK 5) Other nodes (who have heard the RS or CS) know that a transmission is taking place and will refrain from broadcasting during the reserved amount of time. Amount of time that these other nodes have calculated to wait is their network allocation vector (NAV). his solves the hidden terminal problem since the nodes whose transmission could collide with the current transmission will avoid broadcasting during the NAV period. hat is why this protocol is described as collision avoidance. Comp361 (Spring 2004) inal Examination Page 4 of 14

3) (6pts) Consider the picture below. Suppose Host A sends a datagram to host B. Assume that the datagram sent is small enough to fit into one link-layer frame. 1A-1A-1A-1A-1A-05 111.111.113.112 1A-1A-1A-1A-1A-04 111.111.113.111 1A-1A-1A-1A-1A-01 111.111.111.112 1A-1A-1A-1A-1A-00 111.111.111.111 A 1A-1A-1A-1A-1A-08 111.111.115.111 1A-1A-1A-1A-1A-07 111.111.113.113 R1 1A-1A-1A-1A-1A-03 111.111.112.111 1A-1A-1A-1A-1A-06 111.111.112.112 R4 1A-1A-1A-1A-1A-02 111.111.111.113 R2 1A-1A-1A-1A-1A-10 111.111.114.111 1A-1A-1A-1A-1A-11 111.111.114.112 1A-1A-1A-1A-1A-13 111.111.116.112 R3 1A-1A-1A-1A-1A-09 111.111.115.113 1A-1A-1A-1A-1A-0A 111.111.115.112 1A-1A-1A-1A-1A-12 111.111.116.111 1A-1A-1A-1A-1A-16 111.111.117.111 1A-1A-1A-1A-1A-14 111.111.117.113 B 1A-1A-1A-1A-1A-15 111.111.117.112 During the transmission of this datagram from A to B a frame is sent from R4 to R1, a frame is sent from R1 to R2 and a frame from R2 to R3. (Other frames might be sent as well but in this question we are not concerned with them).each of these frames contains a (1) frame source (MAC) address, (2) a frame destination (MAC) address and an encapsulated datagram containing a (3) source IP address and a (4) destination IP address. In the table below the diagram fill in the values of these four items for each of the 3 frames indicated rame sent on link from rame Source (MAC) Address rame Destination (MAC) Address IP Datagram SourceAddress IP Datagram Destination Address R4 to R1 1A-1A-1A-1A-1A-03 1A-1A-1A-1A-1A-06 111.111.111.111 111.111.117.112 R1 to R2 1A-1A-1A-1A-1A-10 1A-1A-1A-1A-1A-11 111.111.111.111 111.111.117.112 R2 to R3 1A-1A-1A-1A-1A-12 1A-1A-1A-1A-1A-13 111.111.111.111 111.111.117.112 Comp361 (Spring 2004) inal Examination Page 5 of 14

4) (15pts) he picture above describes the format of an IPv4 datagram. he diagram below illustrates Router R1 sending a datagram to host H through Router R2. R1 L1 R2 L2 H. Link L1 only permits a MU of 1000 bytes. Link L2 permits a MU of 1500 bytes. (MU= Maximum ransfer Unit) A is an IP datagram which i) Has size 4000 bytes (the size of a datagram includes its header) ii) Is not using any of the option fields in its header. Because A is larger than the MU of Link L1, A is fragmented when it is sent over L1. a) Into how many IP datagrams is A fragmented when it is sent from R1 to R2 over L1? What is the size (in bytes) of each of these smaller fragments? b) or some fields of the IP header, the fragments created all contain the same value. or some fields, the fragments contain different values. In particular the fragmentation offset and offset-flag bit are different in different fragments. or each of the fragments described in (a) give the the value of the fragmentation offset and offset-flag bit. c) In order for Host H to receive the data in A, R2 must also send some datagrams to H. Describe the datagrams that R2 sends to H. How many are there and what are their sizes? Comp361 (Spring 2004) inal Examination Page 6 of 14

d) Explain how the fragmentation offset field and offset-flag bit are used to reconstruct datagrams. e) IPv6 does not support fragmentation. Give one reason why the designers of IPv6 decided not to support fragmentation. a) and b) 5 fragments. Note that A has 20 bytes of header and therefore only has 3980 bytes of data. ragment Size (header + data) flag offset 1 1000 (20+980) 1 0 2 1000 (20+980) 1 980 3 1000 (20+980) 1 1960 4 1000 (20+980) 1 2940 5 80 (20+60) 0 3920 c) Since fragments are only reassembled at the destination (H) R2 only has the responsibility of forwarding the 5 fragments it receives from R1 to H. Since all 5 fragments have size less than 1500 (the MU of L2) R2 simply forwards the 5 fragments it receives, as is, without further fragmenting them. d) he receiving host can tell (i) which fragment is the first (offset =0), which fragment is the last (flag = 0) and, given two fragments B and C, whether C comes immediately after B (if offset B + length B = offset C). he receiving host then takes all fragments it receives with the same ID and checks to see if they can be put together from first to last without any gaps. If they can, that s the reconstructed datagram. If not, it behaves as if the full datagram was lost. e) ragmentation (and reassembly) are time consuming operations that can slow down IP-forwarding in the network. Removing them from the router can speed up IPforwarding in the network. Comp361 (Spring 2004) inal Examination Page 7 of 14

5) (15pts) Consider the following linear network. A B C D E Assume that propagation speed of electromagnetic waves sent over the medium is 2*10 8 m/s and the transmission rate of the network is 10Mbps. Also, assume that we are using a CSMA/CD protocol with minimum frame size of 400 bits. What is the maximum length of the linear network, i.e., distance from A to, that will ensure that CSMA/CD will work properly for this network? Explain your reasoning. he solution to this problem is a slightly modified form of the presentation in the supplementary notes of week 13. Let d = distance between hosts X and Y. Let R = 2*10^8 m/s be the propagation speed of the network Suppose host X starts transmitting a frame of size. hen, before hearing the first bit of the frame, host Y starts transmitting a frame. Since Y transmits BEORE hearing X this can be at most d/r time after X starts transmitting. X hears the beginning of Y s transmission d/r time after that. herefore, the MAXIMUM amount of time that can pass from the time that X starts transmitting until X hears the first bit from Y is 2d/R. herefore we must have /10Mbps >= 2d/R or R/20Mbps >=d. Plugging in all of the values we find that 4km = 4 X 10^3 m >=d. Comp361 (Spring 2004) inal Examination Page 8 of 14

6) (8 points) Consider the network below with the given link costs. B 3 C 2 2 6 E 10 A 2 D ill in the final values in C s distance table that will result after running the distance vector routing algorithm with Poisoned Reverse. C D () cost to dest via B E d e s t A B 5 3 inf inf D 7 inf E inf 2 Comp361 (Spring 2004) inal Examination Page 9 of 14

7) (8pts) In this question you must calculate CRC bits. he input data is the string of 4 bits D = 1 0 0 1. Set r=3. he r+1 generator bit pattern used by the algorithm will be G = 1 0 1 0. Given D and G as above, find the r CRC bits generated by the CRC algorithm. or full credit you must show your calculations. D(x) = x^6 + x^3 G(x) = x^3 + x Dividing (modulo base 2) we get D(x) = G(x) (x^3 + x + 1) + (x^2 + x) so R(x) = x^2 + x And (since R is supposed to have 3 bits) R=110 Comp361 (Spring 2004) inal Examination Page 10 of 14

8) (5pts) Consider the following Inter-AS routing Scenario Customer X is dual-homed, i.e., it is connected to two different service providers B and C. Customer X does not want to route datagrams from Network C to Network B. Explain how BGP allows customer X to avoid routing datagrams from Network C to Network B. X will not send any BGP advertisements to Network C advertising a route to Network B. herefore, C will never know that a route to B via X even exists. Comp361 (Spring 2004) inal Examination Page 11 of 14

9) (5 pts) a) What is the difference between classful addressing (the original scheme used in the Internet) and classless addressing (CIDR)? b) What is the reason that CIDR was introduced? a) IP addresses are 32 bits long. hey are split into a (prefix) network address followed by a (suffix) host address. All machines on the same network will share the same network address. Classful addressing essentially required that the network address component be one of 8 (class A), 16 (class B), or 24 (class C) bits. hose were the only options allowed. In classless addressing the network part of an IP address can be any number of bits long. his is often denoted by the dotted decimal form a.b.c.d/x where x is the number of (leading) bits that compose the network component of the address. b) A reason the CIDR was introduced is that classful addressing led to inefficient use of the IP address space and the internet was running out of addresses. More specifically, Class C networks only allow a very small number (254) of network addresses so they were too small for many organizations. Most small and medium size organizations therefore requested Class B networks.. But these have an address space of 65,634 addresses, which is more than most of these organizations needed. herefore, much of the IP address space was going to waste. CIDR permits organizations to request (and pay for) an address space that more closely matches their needs, permitting more efficient use of the IP address space. Comp361 (Spring 2004) inal Examination Page 12 of 14

10) (15 pts) Bridges are self-learning (plug-and-play) devices that implement filtering/forwarding of frames on the same LAN. A bridge maintains a bridge table, which is a mapping between MAC addresses of nodes in the LAN and its (the bridge s) interfaces. a) When the bridge is first turned on, its bridge table is empty. Explain how a bridge learns the information that it uses to fill in its bridge table. b) When a bridge detects a frame on one of its interfaces it filters the frame and decides whether the frame should be forwarded to other interfaces and, if so, to which interface(s). Describe the algorithm that the bridge uses to do this filtering and forwarding. a) Whenever a new frame is received, bridge learns location (=the interface from which the frame enters) of sender and records sender/location pair in bridge table b) When bridge receives a frame: index bridge table using MAC dest address if entry found for destination then{ if dest on segment (interface) from which frame arrived then drop the frame else forward the frame on interface indicated } else (i.e., no entry found) flood by forwarding on all interfaces except the one on which the frame arrived Comp361 (Spring 2004) inal Examination Page 13 of 14

c) Consider the following diagram of a LAN composed of three LAN segments connected by a bridge. Assume that the bridge table starts off empty and the given sequence of frames is sent, in the given order (frame 1, frame 2, etc.). As the bridge filters the frames it is using the standard bridge learning algorithm to fill in its table. or each frame write down to which interfaces (if any) the Bridge forwards the frame (the answer to the first one is filled in for you) Note that it is possible that in some cases the Bridge will drop the frame and not forward it. If this happens you should say so. You should assume that the entries in the bridge table L fields are large enough so that no bridge table entry times-out while these frames are being sent. D E 2 C G B 1 Bridge 3 H A I rame Source node Destination Node Bridge forwards frame to interfaces # 1 A D 2,3 2 H D 1,2 3 C H 3 4 G H Nothing (drop frame) 5 E D 1,3 6 B E 2 Comp361 (Spring 2004) inal Examination Page 14 of 14