Solution sheet Mid-Semester Test 2009

Similar documents
Networking Test 4 Study Guide

Internet Protocol version 4 Part I

CS335 Sample Questions for Exam #2

Transport and Network Layer

IP - The Internet Protocol

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Lecture Computer Networks

RARP: Reverse Address Resolution Protocol

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above

CSE331: Introduction to Networks and Security. Lecture 8 Fall 2006

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Written examination in Computer Networks

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

2. IP Networks, IP Hosts and IP Ports

Internet Control Protocols Reading: Chapter 3

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Layer 3 Routing User s Manual

Computer Networks. Lecture 3: IP Protocol. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Dynamic Routing Protocols II OSPF. Distance Vector vs. Link State Routing

Network Layer: Network Layer and IP Protocol

Introduction to TCP/IP

Internet Control Message Protocol (ICMP)

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

Internet Protocols. Addressing & Services. Updated:

Candidates should attempt FOUR questions. All questions carry 25 marks.

Introduction to LAN/WAN. Network Layer

Route Discovery Protocols

(Refer Slide Time: 02:17)

Routing Protocols (RIP, OSPF, BGP)

Introduction to IP v6

Routing with OSPF. Introduction

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Objectives of Lecture. Network Architecture. Protocols. Contents

Router and Routing Basics

Understanding TCP/IP. Introduction. What is an Architectural Model? APPENDIX

Computer Networks. Main Functions

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

: Interconnecting Cisco Networking Devices Part 1 v2.0 (ICND1)

The Internet. Internet Technologies and Applications

CSC458 Lecture 6. Homework #1 Grades. Inter-domain Routing IP Addressing. Administrivia. Midterm will Cover Following Topics

TCP/IP and the Internet

Data Link Layer Overview

IP Multicasting. Applications with multiple receivers

Chapter 10 Link-State Routing Protocols

21.4 Network Address Translation (NAT) NAT concept

Network Protocol Configuration

IP Networking. Overview. Networks Impact Daily Life. IP Networking - Part 1. How Networks Impact Daily Life. How Networks Impact Daily Life

Interconnection of Heterogeneous Networks. Internetworking. Service model. Addressing Address mapping Automatic host configuration

Transport Layer Protocols

Internet Protocols Fall Lectures 7-8 Andreas Terzis

How do I get to

Ethernet. Ethernet. Network Devices

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Chapter 4. Distance Vector Routing Protocols

Advanced Networking Routing: RIP, OSPF, Hierarchical routing, BGP

SUPPORT DE COURS. Dr. Omari Mohammed Maître de Conférences Classe A Université d Adrar Courriel : omarinmt@gmail.com

Address Resolution Protocol (ARP), Reverse ARP, Internet Protocol (IP)

Chapter 9. IP Secure

Overview of Computer Networks

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

Network Basics GRAPHISOFT. for connecting to a BIM Server (version 1.0)

Internetworking and Internet-1. Global Addresses

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

Computer Networks. Introduc)on to Naming, Addressing, and Rou)ng. Week 09. College of Information Science and Engineering Ritsumeikan University

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Lecture 8. IP Fundamentals

PRASAD ATHUKURI Sreekavitha engineering info technology,kammam

Routing and Packet Forwarding

Chapter 5: Sample Questions, Problems and Solutions Bölüm 5: Örnek Sorular, Problemler ve Çözümleri Örnek Sorular (Sample Questions):

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

TCP/IP Network Essentials. Linux System Administration and IP Services

IP Subnetting and Addressing

IP Routing Configuring RIP, OSPF, BGP, and PBR

- IPv4 Addressing and Subnetting -

Lecture 8: Routing I Distance-vector Algorithms. CSE 123: Computer Networks Stefan Savage

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

Internet Addresses (You should read Chapter 4 in Forouzan)

6.263 Data Communication Networks

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

IP Addressing A Simplified Tutorial

20. Switched Local Area Networks

Chapter 19 Network Layer: Logical Addressing 19.1

8.2 The Internet Protocol

CSET 4750 Computer Networks and Data Communications (4 semester credit hours) CSET Required IT Required

Sheet 7 (Chapter 10)

ICTTEN8195B Evaluate and apply network security

CS Computer Networks 1: Routing Algorithms

PART IV. Network Layer

Transcription:

Solution sheet Mid-Semester Test 2009 Question 1 Short Answer Questions 1.1 Match the following to one or more layers of the OSI model: a) Communicates directly with the user s application program application layer b) Error correction and retransmission Data link layer and transport layer c) Mechanical, electrical, and functional interface physical layer d) Responsibility for carrying frames between adjacent nodes. data link layer 1.2 Which error detection method consists of just one redundant bit per data unit? a) Simple parity check b) Two-dimensional parity check c) CRC d) Checksum [1 mark] 1.3 We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called: a) Datawords b) Blockwords c) Codewords d) None of the above [1 mark] 1.4 To guarantee the detection of up to 5 errors in all cases, the minimum Hamming distance in a block code must be: a) 5 b) 6 c) 11 d) None of the above Provide a brief explanation for your selection d min = s + 1 Where d min is the minimum Hamming Distance 1.5 To guarantee correction of up to 5 errors in all cases, the minimum Hamming distance in a block code must be: a) 5 b) 6 c) 11 d) None of the above Provide a brief explanation for your selection d min = 2t + 1 Where d min is the minimum Hamming Distance 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 1 of 13

1.6 The number of addresses in a class B block is: a) 65,536 b) 16,777,216 c) 256 d) None of the above [1 mark] 1.7 An IPv6 address can have up to hexadecimal digits. a) 16 b) 32 c) 8 d) None of the above [1 mark] 1.8 In an IPv4 header, an HLEN value of decimal 10 means. a) there are 10 bytes of options b) there are 40 bytes of options c) there are 10 bytes in the header d) there are 40 bytes in the header HLEN defines the length of the header in 4-byte words so its value must be multiplied by 4 to give the overall length in bytes. [1 mark] 1.9 ICMP messages are divided into two broad categories:. a) query and error reporting messages b) request and response messages c) request and reply messages d) None of the above [1 mark] 1.10 An ICMP message has header and a variable-size data section. a) a 16-byte b) a 32-byte c) an 8-byte d) None of the above [1 mark] 1.11 The Open Shortest Path First (OSPF) protocol is an intra-domain routing [1 mark] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 2 of 13

protocol based on routing. a) distance vector b) link state c) path vector d) None of the above 1.12 The protocol allows the administrator to assign a cost, called the metric, to each route. a) OSPF b) RIP c) BGP d) None of the above Provide two (2) example metrics that could be used for this protocol. Throughput and delay 1.13 One of the responsibilities of the transport layer protocol is to create a communication. a) host-to-host b) process-to-process c) node-to-node d) None of the above [1 mark] 1.14 UDP is called a transport protocol. a) connectionless, reliable b) connection-oriented, unreliable c) connectionless, unreliable d) None of the above [1 mark] 1.15 Change the following IP addresses from dotted decimal notation to binary notation: a. 124.74.3.8 b. 218.24.54.42 Binary notation: a. Binary: 124.74.3.8 is 01111100 01001010 00000011 00001000 b. Binary: 218.24.54.42 is 11011010 00011000 00110110 00101010 1.16 Which TWO of the following statements correctly relate to the OSPF routing protocol? a) Each router maintains a view of the overall topology total and calculates its own best path to each other router. b) Routing tables are exchanged between adjacent routers at 90 second intervals (typically). c) Slow convergence is a particular OSPF feature. d) Hop-count is the significant metric. e) Routing table recalculation updates are triggered by topology changes. f) OSPF only considers information concerning the status of static routes. 1.17 Briefly explain the two army problem and the implications of that example to the development of transport layer protocols. Answer (taken directly from Lecture notes but a summary is actually [4 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 3 of 13

sufficient in the answer) Consider two warring armies, the Blue Army, and the White Army. The White Army is camping in a mountain valley. The Blue Army, while larger and more powerful, is divided into two groups hiding in the surrounding mountains. If the two Blue Army platoons attack the White Army together and at exactly the right time, they will prevail. The longer they wait, the more surprised the White Army will be by the attack. But if they wait too long, they will run out of supplies, grow weak, and starve. The timing is critical. But if they are not coordinated, they will surely lose. They must attack at exactly the same time. When the time is right B1 will send a messenger to B2 that says, "Attack at dawn!" But B1 may become concerned that B2 did not get the message and consequently not attack. If that happens, B1 will be defeated. Alternately, B2 may become concerned that B1 will become concerned, so they may not attack, leaving B1 to be defeated in solitude. Conclusion The moral of this story is that there is no solution to this problem if the communications medium is unreliable. Please note that we said the medium, not the protocol. This is an important distinction. A reliable protocol above an unreliable medium can guarantee that a message will eventually be sent provided of course that the recipient eventually becomes ready and accessible. But no protocol can guarantee that a message will be delivered within a finite amount of time error conditions may persist for long and indeterminate amounts of time. 1.18 For the BGP4 routing protocol, using a simple sketch, explain the differences between the following three types of Autonomous Systems: a. Stub AS b. Multi-homed AS c. Transit AS Answer should resemble something like this: 1.19 What is the main difference between the delivery of a frame in the data link layer and the delivery of a packet in the network layer? 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 4 of 13

Answer: The delivery of a frame in the data link layer is node-to-node. The delivery of a packet at the network layer is host-to-host. Total [30 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 5 of 13

Question 2 More Detailed Answers Required 2.1 a) When the Bellman-Formany repetitions of the Relax process are required? Explain your answer. algorithm is applied to the network of Figure 1, how b) Initialise the data structures and then perform two (2) iterations (ONLY!) of the Bellman-Ford Algorithm using the following sequence for the 16 links and summarise your results for the distances d j for these links. The origin node is node A. The link processing orderr to be used for your Relax process is as follows: {AB, FH, GH, CD, AD, EH, BC, CG, AC, DG, DF, BE, CE, CF, EF, FG} c) Apply the Dijkstra algorithm to the network of Figure 1 and compare this optimal result with the results obtained in b) and comment. (No need to show detailed working.) Figure 1: Sample Network from the Internet Answers: a) There are 8 nodes in this network, and hence there needs to be 8 1= 7 repetitions required for the Relax method to complete be completed. This number of iterations required to cover case where diameter of network is 7: b) The two iterations are: Status after iteration #1 Node A: Label = 0 : Previous Node :0 Node B: Label = 3 : Previous Node :A Node C: Label = 6 : Previous Node :B Node D: Label = 3 : Previous Node :A Node E: Label = 8 : Previous Node :B Node F: Label = 10 : Previous Node :E Node G: Label = 18 : Previous Node :D [(1+2)+5+4 = 12 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 6 of 13

Node H: Label = INFINITY: Previous Node :0 Status after iteration #2 Node A: Label = 0 : Previous Node :0 Node B: Label = 3 : Previous Node :A Node C: Label = 6 : Previous Node :B Node D: Label = 3 : Previous Node :A Node E: Label = 8 : Previous Node :B Node F: Label = 10 : Previous Node :E Node G: Label = 18 : Previous Node :D Node H: Label = 18 : Previous Node :E Note: There are multiple solutions for the predecessor nodes in this example. c) Good comparison, the Bellman-Ford method had actually converged after only two iterations. Actual solution using Dijkstra shown but specific working not required. (Note that there are multiple solutionss for the predecessor nodes in this example.) 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 7 of 13

B E A C F H D G 2.2 In a few brief sentences, briefly explain the principal differences in operation and functions of a hub, a switch and a router. Answers: Hub acts as a repeater. It receives packets and broadcasts them across the network. The destination host picks up the packet and all other hosts discard the packet if it is not destined for them. [3 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 8 of 13

Switch only sends packet to the correct address as indicated in its table. Router as discussed has multiple interfaces between networks 2.3 A data transmission system uses a CRC generator (key) of: 1101 Determine the FCS and the transmitted frame for the message: 100100 Answer: The FCS is 001 Transmitted frame is: 100100001 Working: [3 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 9 of 13

Number of bits in divisor is 4, so we append 3 bits to the dividend: 1101 100100000 Remainder is 001. 2.4 An organisation is granted 1024 subnets: a. Find the subnet mask required b. Find the number of addresses in each subnet c. Find the first and last allocatable addresses in subnet 1 d. Find the first and last allocatable addresses in subnet 32 Answers: a) 1024 = 2 n where n = 10. The address is a Class B address so the default mask is /16 and so if we require 10 bits for the subnets then the required subnet mask is /16+10 = /26. (Could be specified as 0xffffffc0, or 255.255.255.192 in dotted decimal format) b) The remaining bits must be used for the addresses in each subnet ie we shall have 32 26 = 6 bits for the address component, or 2 6 = 64 bits. We lose two addresses per subnet as they are not actually allocatable c) The first and last allocatable addresses in subnet 1 are 130.56.0.1 to 130.56.0.62 Working the block 130.56.0.0/16. The administrator wants to create The first address for the block is found by ANDing the address 130.56.0.0 with the subnet mask /26 giving 10000010 00111000 00000000 00000000 (130.56.0.0) But this is not an allocatable address, so the next one is 10000010 00111000 00000000 00000001 (130.56.0.1) Finally, we note that the broadcast address is the last one of the 64 addresses so the last allocatable one is the one before that broadcast address so it must be 10000010 00111000 00000000 00111110 (130.56.0.62) d) The first and last allocatable addresses in subnet 32 are: [6 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 10 of 13

130.56.7.193 to 130.56.7.254 Working To find the 32 nd subnet we have to add 31 to the subnet number of the first subnet. We can add this amount to the first allocatable address of the first subnet as we know that the first address in every block is not allocatable as it is a special address. The format is: nnnnnnnn.nnnnnnnn.ssssssss.sshhhhhh 31 10 = 11111 2 inserted in bit positions 22-26 inclusive 10000010 00111000 00000111 11000001 (130.56.7.193) As there are 64 addresses in the range with the first and last being reserved, the last allocatable one must be 61 addresses after the above first allocatable address. Now 61 10 = 111101 2 is added to the first allocatable address to get: 10000010 00111000 00000111 11000001 (130.56.7.193) + 00000000 00000000 00000000 00111101 (0.0.0.61) 10000010 00111000 00000111 11111110 (130.56.7.254) Thus the final allocatable address must be 130.56.7.254 Summary: IP Address format summary Hex: 823807fe Octal: 20216003776 Decimal: 2184710142 Binary: 10000010 00111000 00000111 11111110 IP Address: 130.56.7.254 IP Class is: Class B Default mask: /16 Length of the mask required: /26 Network mask format summary Hex: ffffffc0 Octal: 37777777700 Decimal: 4294967232 Binary: 11111111 11111111 11111111 11000000 IP Address: 255.255.255.192 Number of subnets: 1024 (Bits borrowed for subnets: 10) Number of hosts : 64 (Bits used for hosts: 6) Network address only details Hex: 82380000 Octal: 20216000000 Decimal: 2184708096 Binary: 10000010 00111000 00000000 00000000 IP Address: 130.56.0.0 Subnet address only details Hex: 7c0 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 11 of 13

Octal: 3700 Decimal: 1984 Binary: 00000000 00000000 00000111 11000000 IP Address: 0.0.7.192 Subnet #: (31) Host address only details Hex: 3e Octal: 76 Decimal: 62 Binary: 00000000 00000000 00000000 00111110 IP Address: 0.0.0.62 2.5 The IETF has identified three possible strategies for making the transition between IPv4 and IPv6. These strategies are: 1) Dual stack 2) Tunnelling 3) Header translation Briefly describe the operation of each strategy. Answer: 1) Dual stack means running IPv4 and IPv6 simultaneously until everyone is ready for IPv6. (To figure out which version of IP to use when sending a packet to the destination, the source must send a query to the DNS server. If the DNS server returns an IPv4 address then the source sends an IPv4 packet, else it sends an IPv6 packet.) Figure 2: Demonstrating Dual Stack 2) Tunnelling involves encapsulating an IPv4 packet inside an IPv6 packet or vice versa and setting the protocol indicator for the packet as IP [2 + 2 + 2 = 6 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 12 of 13

Figure 3: Demonstrating tunnelling process 3) Header translation used if the receiver doesn t understand IPv4and you are using IPv6. Translation is required at the router that connects to the IPv4 destination network. Figure 4: Demonstrating header translation Total [30 marks] 159.334 Computer Networks Answers Mid-Semester Test 2009 Page 13 of 13