QUESTION 1 QUESTION 2 QUESTION 3 QUESTION 4 QUESTION 5 QUESTION 6

Similar documents
2 Network Basics. types of communication service. how communication services are implemented. network performance measures. switching.

NETWORK PROBLEM SET Solution

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

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

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

Links. CS125 - mylinks 1 1/22/14

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

CS1302 / Computer Networks

NETWORK PROBLEM SET Due Date 6/28/2014

CS321: Computer Networks Introduction to Computer Networks and Internet

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

Digital Communication Networks

Reminder: Datalink Functions Computer Networking. Datalink Architectures

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

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

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING B.E. ECE UNIT I DATA COMMUNICATION PART A

TCOM 370 NOTES 99-1 NETWORKING AND COMMUNICATIONS

Code No: RR Set No. 1

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

Computer Networks Summer 2013

Outline: Connecting Many Computers

CS3600 SYSTEMS AND NETWORKS

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

ECE 4450:427/527 - Computer Networks Spring 2017

FINAL Wednesday, 30 th July 2008

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

ECE 653: Computer Networks Mid Term Exam all

Data Communication & Networks Final Exam (Fall 2008) Page 1 / 13. Course Instructors: Engr. Waleed Ejaz. Marks Obtained Marks

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

Lecture 2: Internet Structure

1: Review Of Semester Provide an overview of encapsulation.

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

Data Networks. Lecture 1: Introduction. September 4, 2008

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Data Link Layer Overview

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

CS 4453 Computer Networks Winter

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

Data Link Layer Overview

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

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

CS 421: COMPUTER NETWORKS SPRING FINAL May 21, minutes

Media Access Control (MAC) Sub-layer and Ethernet

Final Wednesday, 30 th July 2008

ECE 650 Systems Programming & Engineering. Spring 2018

3201 Computer Networks (Final Exam) (Model Answer)

Data and Computer Communications

Data Link Layer Overview

UNIVERSITI TUN HUSSEIN ONN MALAYSIA FINAL EXAMINATION SEMESTER I SESSION 2009/10

ENGI 4557 Digital Communications Practice Problems 2017 (Part 2)

Contention Protocols and Networks

(a) Client server model (b) MAN (c) Interfaces and services. [4+6+6] FirstRanker

Chapter 1. Computer Networks and the Internet

Data Communication. Introduction of Communication. Data Communication. Elements of Data Communication (Communication Model)

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

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Data Link Layer Overview

Computer Networks and reference models. 1. List of Problems (so far)

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT COMPUTER NETWORKS APRIL 2015 EXAMINERS REPORT

Network Models. Behrouz A. Forouzan Data communication and Networking Fourth edition

QUESTION BANK EVEN SEMESTER

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

2IC10 Computer Networks Assignments week 4

Network Management & Monitoring

Outline. Computer Communication and Networks. The Network Core. Components of the Internet. The Network Core Packet Switching Circuit Switching

Computer Networks - Midterm

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

Chapter 8 OSI Physical Layer

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

EE 122: Ethernet and

No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

ES623 Networked Embedded Systems

FINAL May 21, minutes

EECS 122: Introduction to Communication Networks Final Exam Solutions

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Overview of Networks

ECSE 414 Fall 2014 Final Exam Solutions

Chapter 9. Ethernet. Part II

EE-311 Data Communication & Networks

Housekeeping. Fall /5 CptS/EE 555 1

Advantages and disadvantages

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

UNIT IV -- TRANSPORT LAYER

COSC 6377 Mid-Term #2 Fall 2000

Lecture 6 Datalink Framing, Switching. From Signals to Packets

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

Introduction to Real-Time Communications. Real-Time and Embedded Systems (M) Lecture 15

QUESTION BANK ENGINEERS ACADEMY. Computer Networks Computer Network Basics Segentation is done in. 12. Session layer is used for

Distributed Queue Dual Bus

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

FINAL Tuesday, 20 th May 2008

Chapter 5 Link Layer and LANs

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

UNIT - IV Ques.4 Ques.5

CSCD 433/533 Advanced Networks

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

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

DATA COMMUNICATION AND NETWORKS

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

Transcription:

QUESTION 1 Three packet-switching networks each contain 8 nodes, A - H. The first network has a star topology with a central switch; the second is a (bidirectional) ring; and the third is a fully interconnected mesh, with a wire from every node to every other node. What are the best, average, and worst case transmission path lengths in hops? QUESTION 2 Suppose you want to add two new computers to an existing network, which currently has five computers. How many new links would be needed for a star topology, a (bidirectional) ring topology and a fully connected mesh topology? QUESTION 3 Which layer of the OSI Model handles each of the following functions? Finding a path from source to destination Encrypting the data for security purposes Retransmitting in reply to an error reported by a neighboring node QUESTION 4 When is packet switching usually preferred to circuit switching? Always When network delays have to be small When the input traffic is bursty When the transmission rate is high QUESTION 5 Which of the following correctly explains the term encapsulation as used in layered network architectures? Each layer may add control information as data is passed down the protocol stack at a sending host, without processing the data itself; Each layer is programmed as if it were directly connected to its peer process in another host although the actual direction of transmission in a protocol stack is vertical; Each layer only has interfaces with the layers directly above and below it. QUESTION 6 Apply the different layers of the OSI model to an email program, saying what each layer does. 1

2 ANSWERS QUESTION 1 Star Topology: Best Path A B = 2 Hops Worst Path A E = 2 Hops Average Path (Equation below) = 2 Hops 2 7 14 1 8 ) ( ) ( ) ( ) ( ) ( ) ( ) ( = = + + + + + + H A G A F A E A D A C A B A Ring Topology: Best Path A B = 1 HOP Worst Path A E = 4 HOPS A E B C D F G H A B C D E F G H

Average Path A->B = 1 hop A->C = 2 hops A->D = 3 hops A->E = 4 hops A->F = 3 hops A->G = 2 hops A->H = 1 hops 1+ 2 + 3 + 4 + 3 + 2 + 1 = 8 1 16 7 = 2.286 Hops Mesh Network: A H B G C F D E Best Path A B = 1 HOP Worst Path A E = 1 HOP Average Path = 1 HOP QUESTION 2 Star Topology Two Links 3

H A B G X C Y F E D Ring Topology Four Links A H B G C F D E X Y Mesh Topology: 17 Links 4

A H B G C F D X E Y QUESTION 3 Network layer Presentation layer Data link layer QUESTION 4 When the input traffic is bursty The phone network is a typical circuit switching system. A phone line can be allocated only for a single conversation at a time. Anyone else who needs to use the phone (e.g. a phone line in a house) has to wait for the previous person to finish his/her call. The postal network is a typical packet switching system. A postman can bring many letters to their destinations all in the same post van. However, for that the letters need to be placed in an envelope with the destination address written on it. As well it takes longer for a letter to reach its destination as the postman will have to deliver letters to more places. Therefore for fast transmission (small delays or high data rates) circuit switching is preferred where possible. Bursty traffic is very similar to letters (in some days more, in others less in computer networks we talk in terms of microseconds and milliseconds) so it is preferred not to keep a line (switching circuit) permanently engaged as we don t have a continuous stream of data. Keeping the line (circuit) permanently engaged means no other computer can use that line. 5

QUESTION 5 The first one - Although the other two statements are true, they do not explain encapsulation. QUESTION 6 Application layer the actual text editor, icons, buttons and windows, spell checker, address book Presentation layer privacy encryption of the message Session layer keeps track of which user is connected and his/her preferences or access rights Transport layer makes sure that your message is delivered to destination. Divides the message into packets that are better suited for transmission of that particular type of data (text, html, images). Makes sure that all packets arrive to destinations (retransmitting the packets that happen to be lost on the way to destination) and reordering packets if some of them arrive late. Network layer finds a way for each packet to be sent to destination. Each packet is treated as an independent unit and sent to the destination on the best (shortest, securest) path available. All packets don t necessarily follow the same path as from second to second various paths may become congested. Data link layer sends each packet to the neighbouring node (computer or switch) inside one network. The network layer is concerned with sending the data between networks (Internet level), the data link layer works only inside a network (school network level - between your computer and the school server). Physical layer specifies standards for wires, connectors and transmission codes used to connect computers at the network. 6

QUESTION 7 What is the maximum reliable bit rate possible over a telephone channel with the following parameters? a. W = 2.4 khz SNR=20dB b. W =2.4 khz SNR=40dB c. W = 3.0 khz SNR=20dB d. W = 3.0 khz SNR=40dB QUESTION 8 Encode the bit stream 0011100101011 using the following: a. Polar b. NRZ inverted c. Manchester d. Differential Manchester QUESTION 9 Most digital transmission systems are self clocking in that they derive the bit synchronization from the signal itself. Transitions between voltage levels help define the boundaries of the bit intervals: a. Plot a sequence of 10 1 s followed by 10 0 s for polar return to zero and explain why this coding scheme has synchronization problems. b. Repeat part a) for the NRZI scheme and say if this scheme has synchronization problems. c. Repeat for Manchester encoding and say how synchronization has been addressed. QUESTION 10 Suppose we have a phase modulation scheme as follows: the base signal is Acos (2Πft+ω) where four phases ω are used to denote two bits of information as follows: for 00 ω =0, for 01 ω =Π/2, for 10 ω =Π, and for 11 ω =3Π/2 a. Plot the modulated waveform that results from the binary sequence 01100011. b. For a differential phase modulation scheme coding is done according to the change in phase. Plot the modulated waveform that results from the binary sequence 01100011 for a differential phase modulation scheme using phase changes as above. 7

QUESTION 11 If the modem for Question 10 works at 1200 baud, how many bits per second are transmitted? QUESTION 12 Suppose that a 64,000 bit packet is to be transmitted on a link with the following characteristics: propagation speed: 2 x 10^8 m/sec, link length: 1,000 m. The node can transmit at a rate of 4 Gbps (in other words, 4 x 10 9 bps). a. What is the transmission time for the packet? b. What is the propagation delay on the link? c. If the node starts transmitting the packet at time t=0, at what time is the packet fully received at the destination? Answers Question 7 The relevant formula is C =W log 2 (1+SNR) W SNR (db) SNR C (b sec -1 ) 2.4kHz 20 100 15979.71 2.4kHz 40 10 4 31890.86 3.0kHz 20 100 19974.63 3.0kHz 40 10 4 39863.57 Note: SNR (db) = 10 log 10 (SNR) 8

QUESTION 8 0 0 1 1 1 0 0 1 0 1 0 1 1 Polar NRZI Manchester Differential Manchester 9

QUESTION 9 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 NRZ NRZI Manchester a. There is no way to embed timing information in a long sequence of 1 s or 0 s b. The sequence of 1 s provides synchronisation, but the 0 s still have no timing information. c. Here, there is at least one transition per bit time, and this can be used for synchronisation. 10

QUESTION 10 π/2 3π/2 0 π 2π 01 ϕ = π/2 10 ϕ = π 00 ϕ = 0 11 ϕ = 3π/2 01 ϕ = π/2 10 ϕ = π/2+π 00 ϕ = 3π/2+0 11 ϕ = 3π/2+3π/2 11

QUESTION 11 QUESTION 12 Answered in Tutorial Data Link Layer QUESTION 13 a) Suppose the data string to be transmitted is 1110010. What is the transmitted codeword using: (i) Single parity check code? (ii) Hamming code with even parity? b) Suppose you are using the Hamming code with even parity. Given the received word 10101011110, detect and correct any errors. You may assume there is a maximum of one error in the transmitted data and no errors in the transmitted check bits. c) Assuming CRC is used with a generator function of 11001 say whether the received code word 110011000010 is error free. QUESTION 13 Solution a) Data string to be transmitted is 1110010 i) The single parity check code adds an extra bit (parity bit) to the original code word. The added bit is: 1 when the code word has an odd number of 1 bits 0 when the code word has an even number of 1 bits In our case (1110010) there are 4 bits of 1 in the codeword, so the parity bit is 0. The codeword with the parity bit included becomes: 11100100 ii) The Hamming code: 12

In Hamming code, parity bits are required at the bit positions that are powers of two, i.e. 2 0, 2 1, 2 2 etc. The parity bits are decided by the number of ones, if even parity is used the number of ones must be even and vice versa. 11 10 9 8 7 6 5 4 3 2 1 d 7 d 6 d 5 p 4 d 4 d 3 d 2 p 3 d 1 p 2 p 1 1 1 1 x 0 0 1 x 0 x x 1 x 1 x 0 x 1 x 0 x 1 1 1 x x 0 0 x x 0 0 x x x x x 0 0 1 1 x x x 1 1 1 1 x x x x x x x 1 1 1 1 0 0 1 1 0 0 1 Transmitted codeword: 111100101001 b) First of all we need to check if there was an error. Fill in the table and check each parity bit, filling in ones where necessary. If there are no errors, you will get 0000. Anything else indicates an error in that position. 11 10 9 8 7 6 5 4 3 2 1 d 7 d 6 d 5 p 4 d 4 d 3 d 2 p 3 d 1 p 2 p 1 1 0 1 0 1 0 1 1 1 1 0 1 x 1 x 1 x 1 x 1 x 0 1 1 0 x x 1 0 x x 1 1 x 0 x x x x 1 0 1 1 x x x 1 1 0 1 0 x x x x x x x 0 The result is 1010, which represents position 5 which means that d 2 is the error bit. To correct it, we switch this bit. The corrected sequence, excluding the parity bits, is: 1011001 c) With CRC, you divide the generator function into the received code word. If the remainder is zero, it is error free. Otherwise there is an error. To perform the division, you use the XOR function. Your aim is to cancel out the preceding 1 each time. 13

Remainder non-zero Error QUESTION 14 Consider building a CSMA/CD network running at 1Gbps over a 1km cable with no repeaters. The propagation speed in the cable is 200,000 km/sec. What is the minimum frame size? QUESTION 15 There are 100 nodes attached to an Ethernet coaxial cable which is 1000 metres long. Suppose that the average frame length is 500 bits and the bit rate is 10Mbps. The signal propagation speed in coaxial cable is approximately 2.3 10 8 meters/sec. Use the expression for Ethernet efficiency to find the average number of frames that each node can send per second. If each frame header is 5 bytes long, what is the network throughput in information bits per second? QUESTION 16 Ethernet frames must be at least 64 bytes long to ensure that the transmitter is still going in the event of a collision at the far end of the cable. Fast Ethernet has the same 64 byte minimum frame size but can transmit ten times faster. How is it possible to maintain the same frame size? 14

QUESTION 17 Consider a token ring network with the following specifications. The token is 24 bits long, the average frame length is 1000 bits and the bit rate is 10Mbps. The ring is a 500 metre length of coaxial cable to which 40 nodes are attached. The signal propagation speed in coaxial cable is approximately 2.3 10 8 metres/second. Assuming all nodes have an infinite supply of frames, what is the overall throughput of the protocol in packets per second? Assuming exactly one node transmits, what is the throughput for that node in frames per second? SOLUTION to QUESTION 14 Remember: the frame must be long enough so that it takes at least twice the bit propagation delay to transmit. This ensures that all collisions are detected by the transmitter. Propagation Distance 1(km) 6 Propagation Delay = = = 5 10 Propagation Speed 200,000 (km/sec) The frame must take at least 10 10-6 seconds to transmit. Therefore the minimum frame length is: 9 Data Rate 1 10 (bits/sec) Frame Length = = = 1 10 2 Propagation Time 2-6 ( 5 10 (sec)) 14 SOLUTION to QUESTION 15 1 Ethernet Efficiency = Propagation Delay 1+ 5.4 Frame Transfer Time Propagation Delay = Propagation Distance Propagation Speed 1000 (m) = = 4.348 10 8 2.3 10 (m/sec) Length of Frame 500 bits FrameTransfer Time = = = 5 10 Channel Bandwidth 10 10 bits/sec 5 6 15

1 1 Ethernet Efficiency = = 6 4.348 10 1+ 5.4 1+ 5.4-5 5 10 Efficiency 0.676 Total Throughput = = 13520(frames/second) 5 FrameTransfer Time 5 10 = Total Throughput 13600 Throughput per Node = = = 135.2(frames/second) Number of Nodes 100 SOLUTION to QUESTION 16 ( 0.08876) - = 16 0.676 Ethernet collision is handled as follows: A computer that wants to send data (transmitter) first listens on the cable to check that there s no other transmitter active. If there s no transmitter active it will start to transmit data, otherwise it will wait until the on-going transmission is over. Collisions occur when more than one transmitter prepares to send data at the same moment. For example two computers A and B have data to transmit. A, listens on the cable and there s no on-going transmission. In exactly the same moment B listens on the cable and finds that there s no on-going transmission. At this moment both A and B decide to start transmitting and both start transmitting simultaneously, and their sent data will collide. In order to detect collisions a transmitter compares the data it had sent with the actual data that circulates in the cable. If the sent data and the actual data in the cable are identical no collision occurred, otherwise there must have been a collision and the data needs to be sent again. From above we can derive that a transmitter should stay active, checking for collisions, long enough for the first data bit sent to reach the far end of the cable. The critical time interval during a collision is the duration between sending the first bit and the bit reaching the computer at the far end of the cable, because in this time the farthest computer didn t find yet that there s an on-going transmission on the cable and may start transmitting itself causing a collision. For Ethernet a frame size of at least 64 bytes ensures that a transmitter is still active when the first bit sent reaches the far end of the cable. Fast Ethernet is 10 times faster, that means that it will take 10 times less time to send a 64 byte frame. Therefore assuming the same signal propagation speed in the cable, the Fast Ethernet transmitter will have finished transmission long before the first bit of data reaches the far end of the cable. Therefore the length of the cable must be reduced by a factor of 10. SOLUTION to QUESTION 17 [ TRANSF + TRANST + PROP] PROP Cycle Time = N + N = number of nodes TRANSF = frame transmission time TRANST = token transmission time PROP = ring latency = propagation delay around ring

Useful Time Within a Cycle = N TRANSF Useful Time Efficiency = Cycle Time Efficiency Throughput = TRANSF 1000(bits) TRANSF = = 1 10 6 10 10 4 seconds 24(bits) TRANST = = 2.4 10 6 10 10 6 seconds 500(metres) PROP = = 2.174 10 8 2.3 10 6 seconds Cycle Time = 40 Useful Time Within a Cycle 4 6 6 6 3 [ 1 10 + 2.4 10 + 2.174 10 ] + 2.174 10 = 4.19 10 4 3 = 40 ( 1 10 ) = 4 10-3 4 10 Efficiency = -3 4.19 10 = 0.955 0.955 Throughput = 4 1 10 - = 9550 (frames/second) If only one node transmits, cycle time is: -4 ( 40 TRANST) + PROP = 1.98 10 Cycle Time = TRANSF + Useful Time Within a Cycle = N TRANSF = 1 10-4 -4 1 10 Efficiency = -4 1.98 10 = 0.51 0.51 Throughput = 4 1 10 - = 5100 (frames/second) 17

QUESTION 18 Assuming that all routers and hosts are working properly and that all software in both is free of errors is there any chance (however small), that a packet will be delivered to the wrong destination? QUESTION 19 A network on the Internet has a subnet mask of 255.255.240.0. What is the maximum number of hosts it can handle? QUESTION 20 Suppose a host with IP address 128.96.34.15 has a subnet mask of 255.255.255.128. What is the subnet number of the subnet this host is attached to? QUESTION 21 The host in part Example 2 wants to send an IP datagram to a host with IP address 128.96.34.139. Is the destination on the same subnet as the sender or not? QUESTION 22 A router using distance vector routing has the following routing table: Net2 6 A Net3 4 E Net4 3 A Net6 2 C Net7 1 B The router received the following packets from router C: Net2 4 Net3 5 Net4 2 Net6 3 Net7 2 Show the updated routing table for the router SOLUTION to QUESTION 18 Yes. Even if all routers and hosts are working correctly and all software in them is error-free, a large enough noise burst could be undetected by the error protection mechanisms. Since all practical error protection mechanisms have undetectable errors, this means we can't rule out a valid packet for destination A being corrupted to a valid packet for destination B, which will result in mis-routing. SOLUTION to QUESTION 19 The given subnet masks encoded IP address is: 11111111.11111111.11110000.00000000 There are 12 0 s; therefore 12 bits are available for the host id 2 ^ 12 possible host ids However all 0's (255.255.240.0) and all 1's (255.255.255.255) are reserved, so the maximum number of hosts on this subnet is: 212-2 = 4094 hosts. 18

SOLUTION to QUESTION 20 The encoded IP addresses are: 10000000011000000010001000001111 - IP address AND 11111111111111111111111110000000 - Subnet mask 10000000011000000010001000000000 This, after converting back into dotted-decimal notation, is a subnet number of 128.96.34.0. SOLUTION to QUESTION 21 The bitwise AND of the destination address and the host's subnet mask yields: 10000000011000000010001010001011 AND 11111111111111111111111110000000 10000000011000000010001010000000 This, when converted into dotted-decimal form is 128.96.34.128. This does not match the sending host's subnet number, so the destination is not on its subnet and the datagram must be sent to a router. SOLUTION to QUESTION 22 The routing table should be read as follows: - Lets name the router as X. A data package from X can reach Net2 in 6 hops via A, then Net3 in 4 hops via E and so on. Assuming a 1hop distance between X and C, the updated routing table for X is the minimum between the routing tables of X and C (considering as well the 1 hop route to C). Net2 = min {6 (via A); 4 (via C) + 1 (X to C)} = 5 (via C) Net3 = min {4 (via E); 5 (via C) + 1 (X to C)} = 4 (via E) Net4 = min {3 (via A); 2 (via C) + 1 (X to C)} = 3 (via A) Net6 = min {2(via C not available anymore, C had update it to 3); 3 (via C) + 1 (X to C)} = 4 (via C) Net7 = min {1(via B); 2 (via C) + 1 (X to C)} = 1 (via B) Updated table: Net2 5 C Net3 4 E Net4 3 A Net6 4 C Net7 1 B Network basics 1. A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete "slots", with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots are wasted due to collisions? 19

2. 3 packet-switching networks each contain n nodes. The first network has a star topology with a central switch; the second is a (bidirectional) ring; and the third is fully interconnected, with a wire from every node to every other node. What are the best, average, and worst case transmission path lengths in hops? 3. Suppose you want to add two new computers to an existing network with five computers. If the network has a fully connected mesh topology, how many new links are needed? If the network instead had a ring topology, how many new links would be needed? 4. According to the OSI Model, which layers are implemented in the nodes within a subnet? 5. Why is the transmission of information between two peer processes in the OSI Model called virtual transmission? 6. Which layer of the OSI Model handles each of the following functions? (a) Find a path from source to destination; (b) Encrypt the data for security purposes; (c) Retransmit in reply to an error reported by a neighbouring node; (d) Break the transmitted bit stream into frames. 7. Which of the following correctly explains the term "encapsulation" as used in layered network architectures: (a) each layer may add control information as data is passed down the protocol stack at a sending host, without processing the data itself; (b) each layer is programmed as if it were directly connected to its peer process in another host although the actual direction of transmission in a protocol stack is vertical; (c) each layer only has interfaces with the layers directly above and below it. 8. List two ways in which the OSI Reference Model and the TCP/IP Reference Model are the same, and two ways in which they differ. 9. When is packet switching usually preferred to circuit switching? (Note: more than one answer may be correct) (a) always; (b) when network delays have to be small; (c) when the input traffic is bursty; (d) when the transmission rate is high. 10. Datagram packet switching is often preferred to virtual circuit packet switching for the transmission of a short message (one that can be split up into a small number of packets). State one condition under which virtual circuit packet switching could be preferred even for short messages. 20

11. Suppose the network layer uses datagram packet switching. Is it possible for this network architecture to offer connection-oriented communication services to its end users? 12. If 2 virtual circuits pass through a network node N, and packets are travelling on both virtual circuits at the same time so that node N sees an interleaved stream of packets, how does node N know which packets belong to the first virtual circuit and which packets belong to the second? 13. Compare the delay in sending a message of length x bits over a k-hop path in a circuitswitched network and in a (lightly-loaded) datagram packet-switched network. The circuit setup time is s seconds, the propagation delay is d seconds per hop, the packet size is p bits, and the data rate at each node is b bits per second. Under what conditions on s, k, b, and p does the packet-switched network have a lower delay? Assume that x is a multiple of p (in other words, the total number of bits to be transmitted is a multiple of the packet length). The x bits to be transmitted in the packet-switched network include the packet headers (in other words, the header bits are already accounted for in x). Finally, assume the packet-switched network is lightly loaded (in other words, the queueing delays in each intermediate node can be taken to be zero). 14. Suppose the setup time for a virtual circuit is 100 millisec, and that the virtual circuit contains 3 links. Each node in the network transmits at 56 kbps (in other words, 56 000 bps). Each packet travelling on the virtual circuit has 200 data bits and a 2-byte header (1 byte = 8 bits). If datagram packet switching is used instead, no setup time is needed but the header is 8 bytes long. Assume that the network is lightly loaded so that the queueing delay in all nodes is zero; that the propagation delay is zero on all links; and that the datagrams happen to follow the same path through the network as the packets do on the virtual circuit. Find the time taken to transport N packets end-to-end using the virtual circuit and using datagrams. For what range of values of N is it faster to use virtual circuit transport in this case? 15. Suppose that a 64,000 bit packet is to be transmitted on a link with the following characteristics: propagation speed: 2 x 10^8 m/sec, link length: 1,000 m. Further suppose that the node can transmit at a rate of 4 Gbps (in other words, 4 x 10^9 bps). (A) What is the transmission time for the packet? (B) What is the propagation delay on the link? (C) If the node starts transmitting the packet at t t=0, at what time is the packet fully received at the destination? Solutions Tutorial 1: Network basics 1. A disadvantage of a broadcast subnet is the capacity wasted when multiple hosts attempt to access the channel at the same time. As a simplistic example, suppose that time is divided into discrete "slots", with each of the n hosts attempting to use the channel with probability p during each slot. What fraction of the slots are wasted due to collisions? 21

a slot has the following possibilities: empty (no host tries to use the slot); successful (exactly one host tries to use the slot); and collision (two or more hosts try to use the slot). The fraction of the slots wasted due to collisions is the same as the probability of a collision, which is P_collision = 1 - P_empty - P_successful. If the probability of a host trying to use the channel in a slot is p, then the probability of a host NOT trying to use the channel in a slot is (1-p). There is only 1 way for the slot to be empty: if all n hosts don't try to use the channel in the slot. This happens with probability P_empty = (1-p) n, since each of the n hosts doesn't try to use the channel with probability (1-p) and we assume all hosts act independently. The probability of exactly 1 host using the channel in a slot is p*(1-p) n-1 : p for the host who tries to use the channel, and (1-p) n-1 for the other n-1 hosts who don't try to use the channel. But there are n different ways for exactly 1 node to use the channel in a slot, since it could be any of the n hosts who tries. Therefore the success probability is P_successful = np(1-p) n-1. Therefore P_collision = 1 - (1-p) n - np(1-p) n-1 collisions. which is the fraction of slots wasted due to As a numerical example, if n=10 and p=0.1, the fraction of slots wasted due to collisions is P_collision = 0.2639, or approximately 26%. If n=10 and p=0.01, the fraction of slots wasted due to collisions drops to P_collision = 0.0043, or under 1%. In this case, the other probabilities are P_empty = 0.9044 and P_successful = 0.0913. So in this case the majority of the slots are wasted, but not due to collisions: since the probability of an individual host using the channel is so low, and there are only 10 hosts, the most likely scenario is that no host tries to use the channel in a slot. You should try some other numerical examples to get an understanding of how the individual host behaviours influence the performance of the overall system. 2. 3 packet-switching networks each contain n nodes. The first network has a star topology with a central switch; the second is a (bidirectional) ring; and the third is fully interconnected, with a wire from every node to every other node. What are the best, average, and worst case transmission path lengths in hops? best average worst --------------------------------------------------------- 22

star 2 2 2 bi-dir. ring* 1 approx n/4 approx n/2 full mesh 1 1 1 * there is a slight difference depending on whether n is even or odd 3. Suppose you want to add two new computers to an existing network with five computers. If the network has a fully connected mesh topology, how many new links are needed? If the network instead had a ring topology, how many new links would be needed? in a full mesh, need 11 new links. In a ring, need only 2 new links (assuming one existing link can be re-directed to one of the new nodes). You can see how to get these solutions by drawing the network topologies and simply counting the number of new links needed... 4. According to the OSI Model, which layers are implemented in the nodes within a subnet? within a subnet only the physical, datalink and network layers are implemented (the bottom 3 layers of the OSI model). 5. Why is the transmission of information between two peer processes in the OSI Model called virtual transmission? transmission of information between two peer processes is referred to as virtual transmission because the processes are concerned only with the information content being exchanged, and not the way in which this information is actually transmitted. The actual transmission of information is down the protocol stack at the sender, across the physical medium, and up the protocol stack at the receiver, but to the peer processes it appears that they are directly exchanging information. 6. Which layer of the OSI Model handles each of the following functions? (a) Find a path from source to destination; (b) Encrypt the data for security purposes; (c) Retransmit in reply to an error reported by a neighbouring node; (d) Break the transmitted bit stream into frames. 23

(a) network; (b) presentation; (c) datalink; (d) datalink. 7. Which of the following correctly explains the term "encapsulation" as used in layered network architectures: (a) each layer may add control information as data is passed down the protocol stack at a sending host, without processing the data itself; (b) each layer is programmed as if it were directly connected to its peer process in another host although the actual direction of transmission in a protocol stack is vertical; (c) each layer only has interfaces with the layers directly above and below it. (a) is correct. 8. List two ways in which the OSI Reference Model and the TCP/IP Reference Model are the same, and two ways in which they differ. similarities -- both the OSI and TCP/IP reference models are layered models; both have network, transport, and application layers; in both models the transport layer can provide reliable end-to-end transfer of bytes; in both models the end-users don't have to be concerned about the physical communication network. differences -- OSI model has 7 layers, TCP/IP model has 4 layers; TCP/IP model does not have session and presentation layers; OSI model can provide connectionless or connectionoriented service in the network layer, whereas TCP/IP model only provides a connectionless network layer service. 9. When is packet switching usually preferred to circuit switching? (Note: more than one answer may be correct) (a) always; (b) when network delays have to be small; (c) when the input traffic is bursty; (d) when the transmission rate is high. packet switching is preferred to circuit switching when the traffic is bursty (answer c). Packet switching is not necessarily used if the delays have to be small or if the transmission rate is high. 10. Datagram packet switching is often preferred to virtual circuit packet switching for the transmission of a short message (one that can be split up into a small number of packets). State one condition under which virtual circuit packet switching could be preferred even for short messages. 24

if the virtual circuit setup time was low or zero; or if the additional datagram header (see Problem 14) was large enough that it outweighed the effect of virtual circuit setup time. Also, if in-order delivery was required, and the datagrams were likely to get out of order, a virtual circuit would be preferable (though this is an unlikely requirement for short messages). 11. Suppose the network layer uses datagram packet switching. Is it possible for this network architecture to offer connection-oriented communication services to its end users? yes, it is possible. On top of the network layer, the network architecture should support: end-to-end acknowledgement of correct packets; reordering of packets; and requests for lost packets. For example, TCP and IP combine to support a connection-oriented communication service, although IP itself uses datagram packet switching. 12. If 2 virtual circuits pass through a network node N, and packets are travelling on both virtual circuits at the same time so that node N sees an interleaved stream of packets, how does node N know which packets belong to the first virtual circuit and which packets belong to the second? each packet carries with it the virtual circuit identifier for its virtual circuit; these identifiers are chosen to be different for different virtual circuits. So by examining a packet's virtual circuit identifier field, node N can determine which virtual circuit the packet is travelling on. 13. Compare the delay in sending a message of length x bits over a k-hop path in a circuitswitched network and in a (lightly-loaded) datagram packet-switched network. The circuit setup time is s seconds, the propagation delay is d seconds per hop, the packet size is p bits, and the data rate at each node is b bits per second. Under what conditions on s, k, b, and p does the packet-switched network have a lower delay? Assume that x is a multiple of p (in other words, the total number of bits to be transmitted is a multiple of the packet length). The x bits to be transmitted in the packet-switched network include the packet headers (in other words, the header bits are already accounted for in x). Finally, assume the packet-switched network is lightly loaded (in other words, the queueing delays in each intermediate node can be taken to be zero). in circuit switching, the bits are pipelined through the network; whereas in packet switching, it's packets that are pipelined through the network, but a packet can't be forwarded from an intermediate node until it's fully received at the node (hence the "store-and-forward" delay). Also, we assume here that packets can be transmitted back-to-back at the nodes, and that no processing time is needed at intermediate nodes once the packet has been fully received. Circuit switching : delay = (setup time) + (time to transmit x bits at the sender) + (propagation delay of last bit along the path) = s + (x/b) + kd Packet switching : delay = (time to transmit x bits at the sender) + (propagation delays of last bit of last packet along the path) + (packet retransmission delays at the intermediate nodes) 25

and since we assumed that the number of bits x is a multiple of the packet length p, this delay is delay = (x/b) + kd + (k-1)(p/b) By comparing the two delay expressions, we see that the packet switched option is faster if s > (k-1)(p/b). 14. Suppose the setup time for a virtual circuit is 100 millisec, and that the virtual circuit contains 3 links. Each node in the network transmits at 56 kbps (in other words, 56 000 bps). Each packet travelling on the virtual circuit has 200 data bits and a 2-byte header (1 byte = 8 bits). If datagram packet switching is used instead, no setup time is needed but the header is 8 bytes long. Assume that the network is lightly loaded so that the queueing delay in all nodes is zero; that the propagation delay is zero on all links; and that the datagrams happen to follow the same path through the network as the packets do on the virtual circuit. Find the time taken to transport N packets end-to-end using the virtual circuit and using datagrams. For what range of values of N is it faster to use virtual circuit transport in this case? the transmission time of a packet is different for the virtual circuit and datagram options because the packets are different lengths. Using the notation of the previous problem, VC: p/b = (200 + 2x8)/(56 000) = 3.8571 millisec datagram: p/b = (200 + 8x8)/(56 000) = 4.7143 millisec We are using store-and-forward packet switching in both cases, so both VC and datagram packet switching can take advantage of pipelining as in the previous problem. Denote the time taken to send N packets over the VC by Tvc and the time taken for N packets to travel the same route using datagram transport as Td. If there are 3 links in the route, that means there are 2 intermediate nodes. Accounting for the setup time of the VC, we have Tvc = 100 + (N+2)x(3.8571), in millisec Td = (N+2)x(4.7143), in millisec and therefore Tvc < Td when N > 114.66 packets, or in other words, N greater than or equal to 115 packets. 15. Suppose that a 64,000 bit packet is to be transmitted on a link with the following characteristics: propagation speed: 2 x 10^8 m/sec, link length: 1,000 m. Further suppose that the node can transmit at a rate of 4 Gbps (in other words, 4 x 10^9 bps). (A) What is the transmission time for the packet? (B) What is the propagation delay on the link? (C) If the node starts transmitting the packet at t t=0, at what time is the packet fully received at the destination? (A) 64,000 bits / 4 x 10 9 bps = 16 µsec, or equivalently,16 x 10-6 seconds 26

(B) 1,000 m / 2 x 10 8 m/s = 5 µsec, or 5 x 10-6 sec (C) It takes the transmission time to get the packet onto the link. Once there, it is not fully received until the last bit is received: this occurs after the propagation delay. The total time is therefore 16 µsec + 5 µsec = 21 µsec So at t=21 microsec the packet is fully received at the destination. Tutorial Physical Layer a) What is the maximum reliable bit rate possible over a telephone channel with the following parameters: a. W=2.4 khz SNR=20dB b. W=2.4 khz SNR=40dB c. W=3.0 khz SNR=20dB d. W=3.0kHz SNR=40dB Note that log 2 x=lnx/ln2=log 10 x/log 10 2 b) Suppose we wish to transmit at a rate of 64kbps over a 3kHz telephone channel. What is the minimum SNR required to accomplish this? c) Encode the bit stream 0011100101011 using the following: a. Polar b. NRZ inverted c. Manchester d. Differential Manchester d) Most digital transmission systems are self clocking in that they derive the bit synchronization from the signal itself. Transitions between voltage levels help define the boundaries of the bit intervals. a. Plot a sequence of 10 1 s followed by 10 0 s for polar return to zero and explain why this coding scheme has synchronisation problems. b. Repeat part a for the NRZI scheme and say if this scheme has synchronisation problems. c. Repeat for Manchester encoding and say how synchronisation has been addressed. e) In SONET clocks have a drift of about 1 part in 10 9. Assuming a bit rate of 51.84Mbps how long does it take for the drift to equal the width of one bit? What are the implications of this calculation? f) Suppose a CATV system uses coaxial cable to carry 100 channels, each of GMHz bandwidth. Suppose QAM is used. a. What is the bit rate/channel if a 4 point constellation is used (e.g. two amplitudes, two phases). b. What if eight points are used (e.g. two amplitudes, 4 phases)? 27

c. Suppose a digital TV signal requires 4Mbps. How many TV signals can each channel handle for parts a and b? g) Suppose we have a phase modulation scheme as follows: the base signal is Acos(2πft+ϕ) where four phases ϕ are used to denote two bits of information as follows: for 00 ϕ=0, for 01 ϕ=π/2, for 10 ϕ=π, and for 11 ϕ=3π/2 a. Plot the modulated waveform that results from the binary sequence 01100011. b. For a differential phase modulation scheme coding is done according to the change in phase. Plot the modulated waveform that results from the binary sequence 01100011 for a differential phase modulation scheme using phase changes as above. h) If the modem for problem 7 works at 1200 baud, how many bits per second are transmitted? i) How many frequencies does a full duplex QAM-64 modem use? Tutorial solutions: Physical Layer a) What is the maximum reliable bit rate possible over a telephone channel with the following parameters: a. W=2.4 khz SNR=20dB b. W=2.4 khz SNR=40dB c. W=3.0 khz SNR=20dB d. W=3.0kHz SNR=40dB Note that log 2 x=lnx/ln2=log 10 x/log 10 2 Note that SNR must be converted from db. 20dB corresponds to 100 and 40 db to 10000. a. C=15,980 bps b. C=31,891 bps c. C=19,975 bps d. C=39,864 bps b) Suppose we wish to transmit at a rate of 64kbps over a 3kHz telephone channel. What is the minimum SNR required to accomplish this? Solve 64,000=3000log2(1+SNR) SNR=2,642,245 or 64.2dB c) Encode the bit stream 0011100101011 using the following: a. Polar b. NRZ inverted c. Manchester d. Differential Manchester 28

0 0 1 1 1 0 0 1 0 1 0 1 1 a. b. c. d. d) Most digital transmission systems are self clocking in that they derive the bit synchronization from the signal itself. Transitions between voltage levels help define the boundaries of the bit intervals. a. Plot a sequence of 10 1 s followed by 10 0 s for polar NRZ and explain why this coding scheme has synchronisation problems. b. Repeat part a for the NRZI scheme and say if this scheme has synchronisation problems. c. Repeat for Manchester encoding and say how synchronisation has been addressed. a. 10 ones 10 zeroes There is no way to embed timing information in a long sequence of ones or zeroes. b. 10 ones 10 zeroes The sequence of ones is alright, but the zeroes still have no timing information. c. 29

Here, there is at least one transition per bit time, and this can be used for synchronisation. e) In SONET clocks have a drift of about 1 part in 10 9. Assuming a bit rate of 51.84Mbps how long does it take for the drift to equal the width of one bit? What are the implications of this calculation? 51.84 Mbps means a bit time of 19.29 nsec. The clock drift is 1 nsec per sec. Therefore, it takes only 19 seconds for the clock to drift by one bit. f) Suppose a CATV system uses coaxial cable to carry 100 channels, each with a rate of 12Mbaud. Suppose QAM is used. a. What is the bit rate/channel if a 4 point constellation is used (e.g. two amplitudes, two phases). b. What if eight points are used (e.g. two amplitudes, 4 phases)? c. Suppose a digital TV signal requires 4Mbps. How many TV signals can each channel handle for parts a and b? a. 2bits/baud*12Mbaud*100=2.4Gbps b. 3bits/baud*12Mbaud*100=3.6Gbps c. 600 for a. and 900 for b. g) Suppose we have a phase modulation scheme as follows: the base signal is Acos(2πft+ϕ) where four phases ϕ are used to denote two bits of information as follows: for 00 ϕ=0, for 01 ϕ=π/2, for 10 ϕ=π, and for 11 ϕ=3π/2 a. Plot the modulated waveform that results from the binary sequence 01100011. b. For a differential phase modulation scheme coding is done according to the change in phase. Plot the modulated waveform that results from the binary sequence 01100011 for a differential phase modulation scheme using phase changes as above. a. 01 ϕ=π/2 10 ϕ=π 00 ϕ=0 11 ϕ=3π/2 30

b. 01 ϕ=π/2 10 ϕ=π/2+π 00 ϕ=3π/2+0 11 ϕ=3π/2+3π/2=π h) If the modem for problem 7 works at 1200 baud, how many bits per second are transmitted? 4 distinct phases allows a distinction between the 4 two bit combinations. So 1200*2=2400bps i) How many frequencies does a full duplex QAM-64 modem use? Two one frequency for each direction Tutorial 3: Data Link Layer a) Suppose the data string to be transmitted is 1110010. What is the transmitted codeword using (a) the single parity check code? (b) the Hamming code? b) Suppose you are using the Hamming code. Given the received word 10111010110, detect and correct any errors. You may assume there is a maximum of one error in the transmitted data and no errors in the transmitted check bits. c) In the General Parity Check error-handling scheme, if the minimum Hamming distance is D, this scheme can detect any combination of <= D-1 bit errors and correct any combination of strictly less than D/2 bit errors. Give a plausible explanation (NOT a proof) of these results, based on the definition of Hamming distance and the way this scheme works. d) Show the codeword for 01111001 assuming CRC is used with a generator function of 11001. e) Assuming CRC is used with a generator function of 11001 say whether the received code word 110011000010 is error free. f) Consider an error free 64kbps satellite channel used to send 512 byte data frames in one direction, with very short acknowledgements coming back the other way. What is the maximum throughput for window sizes of 1, 7, 15, and 127? The earth-satellite propagation time is 270 msec. g) Consider a link in which the probability of error on the forward path is p=0.01 and the probability of error on the return path is q=0.005. Processing delay is negligible at both sender and receiver. The link is a 200 meter length of optical fiber, in which the signal propagation speed is approximately 2.0x10 8 meters/second. Frames in the forward direction 31

are 1000 bits long; return frames carrying ACK or NAK are 50 bits long. The transmission rate in both directions is 100Mbps. Assume that TIMEOUT is chosen optimally and that the window size is large enough to allow the sender to transmit frames continuously in the absence of errors. Find throughput and efficiency for Go-Back-n in this case. Tutorial 3 solutions: Data Link Layer a) Suppose the data string to be transmitted is 1110010. What is the transmitted codeword using (a) the single parity check code? (b) the Hamming code? (a) 11100100 since we want an even number of ones. (b) 11110011001 1 1 1 _ 0 0 1 _ 0 XOR positions with 1 s in them 5 0101 9 1001 10 1010 11 1011 1101 b) Suppose you are using the Hamming code. Given the received word 10111010110, detect and correct any errors. You may assume there is a maximum of one error in the transmitted data and no errors in the transmitted check bits. XOR all positions with 1 s in them. 2 0010 3 0011 5 0101 7 0111 8 1000 9 1001 11 1011 1001 Error in position 9. The corrected code word is 10011010110 making the data 1001011 32

c) In the General Parity Check error-handling scheme, if the minimum Hamming distance is D, this scheme can detect any combination of <= D-1 bit errors and correct any combination of strictly less than D/2 bit errors. Give a plausible explanation (NOT a proof) of these results, based on the definition of Hamming distance and the way this scheme works. if the minimum Hamming distance is D, then D is the smallest number of bit errors that changes one valid codeword into another. Since the way of computing the check bits is known, a list of all the valid codewords can be compiled and stored at the receiver. Then, when a word W is received, the receiver finds the closest valid codeword to W (in Hamming distance) and assumes that this codeword was the transmitted codeword. (1) Suppose the sender transmits a valid codeword C. If, during transmission, there are <= D-1 bit errors in C, then the received word cannot be a valid codeword, by definition of D, so the errors will be detected by the receiver. (2) Suppose the sender transmits a valid codeword C. If, during transmission, there are < D/2 bit errors in C, then the closest valid codeword to the received word will still be C, so the receiver will assume correctly that C was transmitted, which means all the bit errors were corrected. Put another way: if more than D/2 bit errors occurred, then there could be another valid codeword closer than C to the received word; if exactly D/2 bit errors occurred, there could be another valid codeword the same distance as C from the received word. In either of these cases, the receiver could assume the wrong codeword was transmitted. So errors can only be corrected if there were less than D/2 of them. d) Show the codeword for 01111001 assuming CRC is used with a generator function of 11001. 1010111 11001 011110010000 11001 0011101 11001 0010000 11001 10010 11001 10110 11001 01111 Codeword: 0111100101111 e) Assuming CRC is used with a generator function of 11001 say whether the received code word 110011000010 is error free. 33

10000111 11001 110011000010 11001 0000010000 11001 10010 11001 01011 Since there is a remainder, the received code word was not error free. f) Consider an error free 64kbps satellite channel used to send 512 byte data frames in one direction, with very short acknowledgements coming back the other way. What is the maximum throughput for window sizes of 1, 7, 15, and 127? The earth-satellite propagation time is 270 msec. TRANSF=512x8/64,000=64msec. PROP=270msec. Round trip time=2xprop=540msec. Thus a window size of 540/64 (9 frames) keeps the channel busy. For a window size of 1, we send 4096bits/540msec for a throughput of 7585bps. For a window size of 7, we send 7x4096bits/540msec for the throughput of 53.096kbps. For a window size of 9 or greater, the throughput is 64kbps. g) Consider a link in which the probability of error on the forward path is p=0.01 and the probability of error on the return path is q=0.005. Processing delay is negligible at both sender and receiver. The link is a 200 meter length of optical fiber, in which the signal propagation speed is approximately 2.0x10 8 meters/second. Frames in the forward direction are 1000 bits long; return frames carrying ACK or NAK are 50 bits long. The transmission rate in both directions is 100Mbps. Assume that TIMEOUT is chosen optimally and that the window size is large enough to allow the sender to transmit frames continuously in the absence of errors. Find throughput and efficiency for Go-Back-n in this case. PROP=200/2.0x10 8 =10-8 sec 34

TRANSF=1000/100x10 6 =10-5 sec TRANSA=50/100x10 6 =5x10-7 sec TIMEOUT=TRANSF+TRANSA+2xPROP=1.051x10-5 sec r = p+(1-p)*q=0.01+(1-0.01)(.005)= 0.01495 average packet throughput = (1-r) / [TRANSF + r*timeout] =(1-0.01495)/[ 10-5 +0.01495*1.051x10-5 ] =0.9703x10 5 packets/sec efficiency = [(1-r)*TRANSF] / [TRANSF + r*timeout]=0.9703 Tutorial 4: LANs a) In a broadcast network with a shared communication channel, there are 3 basic contention resolution strategies: (1) divide the channel into independent sub-channels, (2) collision resolution, and (3) reservations. (a) Briefly explain under what circumstances the strategy of dividing the channel into independent sub-channels is NOT a good idea. (b) Given the circumstances mentioned in part (a), what are the advantages and disadvantages of the other two contention resolution strategies? b) Consider building a CSMA/CD network running at 1Gbps over a 1 km cable with no repeaters. The propagation speed in the cable is 200,000 km/sec. What is the minimum frame size? c) There are 100 nodes attached to an Ethernet coaxial cable 1000 meters long. Suppose that the average frame length is 500 bits and the bit rate is 10Mbps. a. Use the expression for Ethernet efficiency to find the average number of frames each node can send per second. b. If each frame header is 5 bytes long, what is the network throughput in information bits per second. d) Ethernet frames must be at least 64 bytes long to ensure that the transmitter is still going in the event of a collision at the far end of the cable. Fast Ethernet has the same 64 byte minimum frame size but can transmit ten times faster. How is it possible to maintain the same frame size? e) Consider a token ring with the following specifications. The token is 24 bits long, the average frame length is 1000 bits, and the bit rate is 10 Mbps. The ring is a 500 meter length of coaxial cable to which 40 nodes are attached. The signal propagation speed in coaxial cable is approximately 2.3 x 108 meters/sec. a. Assuming all nodes have an infinite supply of frames, what is overall throughput of the protocol in packets per second? b. Assuming exactly one node transmits what is the throughput for that node in frames per second? 35