Answers to Sample Questions on Network Layer

Similar documents
Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

ECE 358: Computer Networks. Solutions to Homework #4. Chapter 4 - The Network Layer

CS335 Sample Questions for Exam #2

IP addressing. Interface: Connection between host, router and physical link. IP address: 32-bit identifier for host, router interface

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Exam 1 Review Questions

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

IP addressing and forwarding Network layer

Network layer: Overview. Network layer functions IP Routing and forwarding

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

CS 5480/6480: Computer Networks Spring 2012 Homework 3 Due by 1:25 PM MT, Monday March 5 th 2012

Internet Packets. Forwarding Datagrams

Introduction to IP v6

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Computer Networks - CS132/EECS148 - Spring

Chapter 4 Network Layer

Dynamic Host Configuration Protocol (DHCP) 02 NAT and DHCP Tópicos Avançados de Redes

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

CS 78 Computer Networks. Internet Protocol (IP) our focus. The Network Layer. Interplay between routing and forwarding

Internet Protocol (IP) IP - Network Layer. IP Routing. Advantages of Connectionless. CSCE 515: Computer Network Programming IP routing

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

Network Address Translation (NAT)

Classful IP Addressing (cont.)

Chapter 4 Network Layer

Routing in packet-switching networks

Transport and Network Layer

R2. The word protocol is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol?

8.2 The Internet Protocol

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

IP Addressing A Simplified Tutorial

College 5, Routing, Internet. Host A. Host B. The Network Layer: functions

10CS64: COMPUTER NETWORKS - II

Networking Test 4 Study Guide

Internet Protocols Fall Lectures 7-8 Andreas Terzis

Load Balancing. Final Network Exam LSNAT. Sommaire. How works a "traditional" NAT? Un article de Le wiki des TPs RSM.

Future Internet Technologies

The Network Layer Functions: Congestion Control

Technical Support Information Belkin internal use only

Chapter 19 Network Layer: Logical Addressing 19.1

Networking Basics for Automation Engineers

Internetworking II: VPNs, MPLS, and Traffic Engineering

IP address format: Dotted decimal notation:

Internetworking II: MPLS, Security, and Traffic Engineering

2. IP Networks, IP Hosts and IP Ports

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

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

The internetworking solution of the Internet. Single networks. The Internet approach to internetworking. Protocol stacks in the Internet

Assignment #3 Routing and Network Analysis. CIS3210 Computer Networks. University of Guelph

IP Subnetting and Addressing

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

Zarząd (7 osób) F inanse (13 osób) M arketing (7 osób) S przedaż (16 osób) K adry (15 osób)

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

Final for ECE374 05/06/13 Solution!!

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

Scaling the Network: Subnetting and Other Protocols. Networking CS 3470, Section 1

Guide to TCP/IP, Third Edition. Chapter 3: Data Link and Network Layer TCP/IP Protocols

Computer Networks CS321

CS 43: Computer Networks IP. Kevin Webb Swarthmore College November 5, 2013

IP Multicasting. Applications with multiple receivers

6LoWPAN Technical Overview

RARP: Reverse Address Resolution Protocol

NAT & IP Masquerade. Internet NETWORK ADDRESS TRANSLATION INTRODUCTION. NAT & IP Masquerade Page 1 of 5. Internal PC

CE363 Data Communications & Networking. Chapter 6 Network Layer: Logical Addressing

Variable length subnetting

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Module 2 Overview of Computer Networks

Proxy Server, Network Address Translator, Firewall. Proxy Server

Internet Working 5 th lecture. Chair of Communication Systems Department of Applied Sciences University of Freiburg 2004

Network Layers. CSC358 - Introduction to Computer Networks

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

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

PART IV. Network Layer

IP Addressing Introductory material.

Savera Tanwir. Internet Protocol

CS268 Exam Solutions. 1) End-to-End (20 pts)

IT 3202 Internet Working (New)

Overview. Lecture 16: IP variations: IPv6, multicast, anycast. I think we have a problem. IPv6. IPv6 Key Features

OSBRiDGE 5XLi. Configuration Manual. Firmware 3.10R

WAN Data Link Protocols

Architecture and Performance of the Internet

Section #6: Addressing

Wide Area Networks. Learning Objectives. LAN and WAN. School of Business Eastern Illinois University. (Week 11, Thursday 3/22/2007)

LAN TCP/IP and DHCP Setup

Classful IP Addressing. Classless Addressing: CIDR. Routing & Forwarding: Logical View of a Router. IP Addressing: Basics

UIP1868P User Interface Guide

his document discusses implementation of dynamic mobile network routing (DMNR) in the EN-4000.

(Refer Slide Time: 02:17)

Introduction To Computer Networking

IST 220 Exam 3 Notes Prepared by Dan Veltri

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

Internet Protocol Version 6 (IPv6)

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

EECS 489 Winter 2010 Midterm Exam

Referring to the above question, the end-to-end delay (transmission delay plus propagation delay) is

The Internet. Internet Technologies and Applications

Chapter 9. IP Secure

CIRA s experience in deploying IPv6

EE4367 Telecom. Switching & Transmission. Prof. Murat Torlak

Transcription:

Answers to Sample Questions on Network Layer ) IP Packets on a certain network can carry a maximum of only 500 bytes in the data portion. An application using TCP/IP on a node on this network generates a TCP segment with,000 bytes in the data portion. How many IP packets are transmitted to carry this TCP segment, and what are their sizes (including the header)? Answer: The TCP segment is of size,020 bytes. Therefore, we will need 3 IP packets of sizes 520, 520 and 40 bytes. 2) What is the difference between routing and forwarding? Answer: Forwarding is about moving a packet from a router s input link to the appropriate output link. Routing is about determining the end-to-routes between sources and destinations. 3) Consider a VC network with a 2-bit filed for the VC number. Suppose that the network wants to set up a virtual circuit over four links: link A, link B, lick C and link D. Suppose that each of those links is currently carrying two other virtual circuits, and the VC numbers of these other VCs are as follows: Link A Link B Link C Link D 00 0 0 0 0 00 Assume that each of the existing VCs may only traverse one of the four links. a) If each VC is required to use the same VC number on all the four links along its path, what VC number could be assigned to the new VC? Answer: Notice that there is no one common VC number that is not being used on all the four links. As a result, there is no VC number, which could be assigned to the new VC. This example illustrates a problem associated with having to pick a common VC number along the end-to-end of a virtual circuit. b) If each VC is permitted to have a different VC number in the different links along its path, how many different combinations of four VC numbers (one for each of the four links) could be used? Answer: In this case, a VC number can be assigned independently on each of the four links. Since there are two vacant VC numbers on each of these four links, the possible combinations are 2 4 = 6. One example combination is (0,00,00,0). 4) Consider a datagram network using 8-bit host addresses. Suppose a router uses longest-prefix matching and has the following forwarding table:

Prefix Match Interface 00 0 0 0 2 3 For each of the four interfaces give the associated range of destination host addresses and the number of addresses in the range. Answer: Destination Address Range Link Interface 00000000 through 0 00 0000000 through 0 0000000 through 2 0 000000 through 3 number of addresses in each range = 2 6 = 64 5) The only entries in a certain route table are (28.59.28.0/22, port 0), (28.59.28.0/23, port ) and (28.59.28.0/24, port 2). These entries indicate CIDR network number, the prefix indication and the corresponding port to which a packet should be forwarded. If a packet arrives with a destination IP address equal to 28.59.29.8, which port will this router will this router forward the packet to? (QUESTION FROM PREVIOUS EXAM) Answer: The address of the IP packet matches 28.59.28.0 in the first 23 bits. The 24th bit is different. Since we use the longest prefix match, the router will use the port corresponding to 28.59.28.0/23 in its route table, and forward the packet to port. 6) Suppose datagrams are limited to,500 bytes (including header) between source Host A and destination Host B. Assuming a 20-byte IP header and a 20-byte TCP header, how many datagrams would be required to send an MP3 consisting of 4 million bytes. Answer: MP3 file size = 4 million bytes. Assume the data is carried in TCP segments, with each TCP segment also having 20 bytes of header. Then each datagram can carry 500-40=460 bytes of the MP3 file.

6 $ 4 % 0 " Number of datagrams required = = = 2740. All but the last datagram will be # 460!,500 bytes; the last datagram will be 060+40 = 00 bytes. Note that here there is not fragmentation the source host does not create datagrams larger than 500 bytes, and these datagrams are smaller than the MTUs of the links. 7) Consider a subnet with prefix 0.0.0.64/26. Given an example of one IP address (of form xxx.xxx.xxx.xxx) that can be assigned to this network. Answer: Example of IP address - 0.0.0.65 8) Suppose an ISP owns the block of addresses of the form 0.0.28/7. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets? Answer: Four equal size subnets 0.0.28/9, 0.0.60/9, 0.0.92/9, 0.0.224/9. 9) Consider sending a 3,000 byte datagram into a link which has an MTU of 500 bytes. Suppose the original datagram is stamped with the identification number 422. How many fragments are generated? What are their characteristics? Answer: The maximum size of data field in each fragment = 480 (20 bytes IP header). $ 3000 % 20" Thus the number of required fragments = = 7 # 480! Each fragment will have Identification number 422. Each fragment except the last one will be of size 500 bytes (including IP header). The last datagram will be of size 20 bytes (including IP header). The offsets of the 7 fragments will be 0, 60, 20, 80, 240, 300, 360. Each of the first 6 fragments will have flag=; the last fragment will have flag=0. 0) Consider the network shown below. (a) Show the operation of Dijkstra s (Link State) algorithm for computing the least cost path from F (the rightmost node in the figure below) to all destinations. Also explicitly list all the shortest path routes from F to all destinations that are the result of the algorithm s computation. (b) Show the distance table that would be computed by the distance vector algorithm in B. (Note: you do not have to run the distance vector algorithm; you should be able to compute the table by inspection.) A 3 4 B 3 C D 4 0 E 4 F

Answer: Step N D(A), D(B), D(C), D(D), p(d) D(E), p(e) p(a) p(b) p(c) 0 F 4,F.F FE 4.F 5,E 2 FEB 5,B 7,B 5,E 3 FEBD 5,B 6,D 4 FEBDA 6,D 5 FEBDAC The shortest path routes from F to all the destinations have been shown as thick lines in the figure above. The destination table in B is shown below Cost to A C D E F 3 4 5 4 ) Suppose a peer with user name Arnold discovers through querying that a peer with user name Bernard has a file it wants to download. Also suppose that Bernard is behind a NAT whereas Arnold isn t. Let 38.76.29.7 be the WAN-side address of the NAT and let 0.0.0. be the internal IP address for Bernard. Assume that the NAT is not specifically configured for the P2P application. (a) Discuss why Arnold s peer cannot initiate a TCP connection to Bernard s peer, even if Arnold knows the WAN-side address of the NAT, 38.76.29.7. Answer: NAT will not have an entry for a connection initiated from the WAN side, hence will drop incoming packets from Arnold. (b) Now, suppose that Bernard has established an ongoing TCP connection to another peer, Cindy who is not behind a NAT. Also suppose that Arnold learned from Cindy that Bernard has the desired file and that Arnold can establish (or already has established) a TCP connection with Cindy. Describe how Arnold can use these two TCP connections (one from Bernard to Cindy and the other from Arnold to Cindy) to instruct Bernard to initiate a direct TCP connection (that is, not passing through Cindy) back to Arnold. This technique is sometimes called connection reversal. Note that even though Bernard is behind a NAT, Arnold can use this direct TCP connection to request the file, and Bernard can use the connection to deliver the file. Answer: Bernard can know the IP address of Arnold through Cindy. Then, the p2p application can initiate a connection through NAT to Arnold and upload the file.

2) Consider the network shown below, and assume that each node initially knows the costs to each of its neighbours, Consider the distance vector algorithm and show the distance table entries at node z. 2 u x 2 z 5 0 v y 5 Answer: The distance table in z is: Cost to u v x y z From v 0 3 4 5 x 2 3 0 2 y 3 4 0 3 z 4 5 2 3 0 3) What is head of line blocking? Does it occur in input ports or output ports? Answer: HOL blocking a queued packet in an input queue must wait for transfer through the fabric because it is blocked by another packet at the head of the line. It occurs at the input port. 4) Suppose you purchase a wireless router/adsl modem and connect it to your telephone socket. Also suppose that your ISP dynamically assigns one IP address to your connecting device (i.e. your router/modem). Also suppose that you have five PCs at home that use 802. to wirelessly connect to your wireless router. How are IP addresses assigned to five PCs? Does the wireless router use NAT? Why or why not? Answer: Typically the wireless router includes a DHCP server. DHCP is used to assign IP addresses to the 5 PCs and to the router interface. Yes, the wireless router also uses NAT as it obtains only one IP address from the ISP. 5) Consider the following topology. Assign network addresses to each of these 6 subnets, with the following constraints: All addresses must be allocated from 24.97.254/23 Subnet A should have enough addresses to support 250 interfaces Subnet B should have enough addresses to support 20 interfaces Subnet C should have enough addresses to support 20 interfaces Of course, subnets D, E and F should each be able to support 2 interfaces For each subnet, the assignment should either take the form a.b.c.d/x or a.b.c.d/x e.f.g.h/y

Now using the address assignments from above, provide the forwarding tables (using longest prefix matching) for each of the three routers. Subnet A Subnet F Subnet D Subnet E Subnet C Subnet B Answer: From 24.97.254/23, one possible assignment is as follows: Subnet A: 24.97.255/24 (256 addresses) Subnet B: 24.97.254.0/25-24.97.254.0/29 (28-8 = 20 addresses) Subnet C: 24.97.254.28/25 (28 addresses) Subnet D: 24.97.254.0/3 (2 addresses) Subnet E: 24.97.254.2/3 (2 addresses) Subnet F: 24.97.254.4/30 (4 addresses) To simplify the solution, assume that no datagrams have router interfaces as ultimate destinations. Router Longest Prefix Match Outgoing Interface 000 00000 Subnet A 000 00000 0 0000000 Subnet D 000 00000 0 00000 Subnet F

Router 2 Longest Prefix Match Outgoing Interface 000 00000 0000000 Subnet D 000 00000 0 0 Subnet B 000 00000 0 000000 Subnet E Router 3 Longest Prefix Match Outgoing Interface 000 00000 00000 Subnet F 000 00000 0 000000 Subnet E 000 00000 0 Subnet C