Answer to the written exam given on TDTS06 Computer networks, October 23,

Similar documents
interface Question 1. a) Applications nslookup/dig Web Application DNS SMTP HTTP layer SIP Transport layer OSPF ICMP IP Network layer

II. Principles of Computer Communications Network and Transport Layer

CSE 473 Introduction to Computer Networks. Final Exam. Your name here: 12/17/2012

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

CSE 473 Introduction to Computer Networks. Exam 2. Your name here: 11/7/2012

CS164 Final Exam Winter 2013

FINAL May 21, minutes

Examination 2D1392 Protocols and Principles of the Internet 2G1305 Internetworking 2G1507 Kommunikationssystem, fk SOLUTIONS

EE-311 Data Communication & Networks

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

Question Points Score total 100

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Examination 2D1392 Protocols and Principles of the Internet 2E1605 Internetworking. Date: June 1 st 2007 at 14:00 19:00 SOLUTIONS

No, the bogus packet will fail the integrity check (which uses a shared MAC key).!

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Networking: Network layer

Chapter 09 Network Protocols

TCP /IP Fundamentals Mr. Cantu

Your Name: Your student ID number:

Closed book. Closed notes. No electronic device.

CSCI 466 Midterm Networks Fall 2011

Sirindhorn International Institute of Technology Thammasat University

CSE 422 Jeopardy. Sockets TCP/UDP IP Routing Link $100 $200 $300 $400. Sockets - $100

Written examination in TDTS06 Computer Networks at 8 12

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

Written examination in TDTS06 Computer Networks at 8 12

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

EEC-484/584 Computer Networks

Da t e: August 2 0 th a t 9: :00 SOLUTIONS

Worksheet #2 EE122 Fall 2011

Student ID: CS457: Computer Networking Date: 3/20/2007 Name:

The Transport Layer. Part 1

Final Exam. Course Grade

QUESTION BANK EVEN SEMESTER

Topics for This Week

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

CSE 473 Introduction to Computer Networks. Midterm Exam Review

c) With the selective repeat protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

EITF25 Internet Techniques and Applications L7: Internet. Stefan Höst

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

UNIVERSITY OF TORONTO FACULTY OF APPLIED SCIENCE AND ENGINEERING

TSIN02 - Internetworking

Network Layer, Link Layer, and Network Security Summary

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

Chapter 12 Network Protocols

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

IP - The Internet Protocol. Based on the slides of Dr. Jorg Liebeherr, University of Virginia

Telecom Systems Chae Y. Lee. Contents. Overview. Issues. Addressing ARP. Adapting Datagram Size Notes

UNIT IV -- TRANSPORT LAYER

Networks Fall This exam consists of 10 problems on the following 13 pages.

Interconnecting Networks with TCP/IP. 2000, Cisco Systems, Inc. 8-1

CSCI Networking Name:

CSCI Spring Final Exam Solution

ECSE 414 Fall 2014 Final Exam Solutions

The Internet. The Internet is an interconnected collection of netw orks.

CCNA 1 Final Exam Answers UPDATE 2012 eg.1

Peer entities. Protocol Layering. Protocols. Example

Introduction to Open System Interconnection Reference Model

The Transport Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

Tutorial 2 Solutions

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

ES623 Networked Embedded Systems

20-CS Cyber Defense Overview Fall, Network Basics

ECE 653: Computer Networks Mid Term Exam all

Outline. Routing. Introduction to Wide Area Routing. Classification of Routing Algorithms. Introduction. Broadcasting and Multicasting

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

Final Exam for ECE374 05/03/12 Solution!!

Top-Down Network Design, Ch. 7: Selecting Switching and Routing Protocols. Top-Down Network Design. Selecting Switching and Routing Protocols

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

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

ICS 351: Networking Protocols

CS144 Final Review. Dec 4th, 2009 Tom Wiltzius

Network Layer. Goals of This Lecture. Internet Reference Model. Outline of the Class

EXAM - HP0-Y52. Applying HP FlexNetwork Fundamentals. Buy Full Product.

cs/ee 143 Communication Networks

H

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

Indian Institute of Technology, Kharagpur

EEC-684/584 Computer Networks

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

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Computer Networks (Introduction to TCP/IP Protocols)

Chapter 3 Review Questions

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

Lecture 33. Firewalls. Firewall Locations in the Network. Castle and Moat Analogy. Firewall Types. Firewall: Illustration. Security April 15, 2005

Computer Networks (Unit wise Questions)

Flow and Congestion Control (Hosts)

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

Internetworking/Internetteknik, Examination 2G1305 Date: August 18 th 2004 at 9:00 13:00 SOLUTIONS

Interconnecting Networks with TCP/IP

H

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

MODULE: NETWORKS MODULE CODE: CAN1102C. Duration: 2 Hours 15 Mins. Instructions to Candidates:

The aim of this unit is to review the main concepts related to TCP and UDP transport protocols, as well as application protocols. These concepts are

Switching & ARP Week 3

Congestion / Flow Control in TCP

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

Outline. Connecting to the access network: DHCP and mobile IP, LTE. Transport layer: UDP and TCP

Cisco Cisco Certified Network Associate (CCNA)

Transcription:

Answer to the written exam given on TDTS06 Computer networks, October 23, 2009 --------------------------------------------------------------------- Answers provided by Juha Takkinen, IDA, juha.takkinen@liu.se. Question 1. Protocol = a set of rules for what messages to send (syntax), in what order (timing), and what they mean (semantics). Network architecture = an architecture for how to organize protocols that provide network functionality to an application, usually consisting of layers, where a layer provides services to the layer above it. (Reference model for network architectures = standardized network architecture, for example the OSI model with seven layers or the Internet model with four layers) (Network design = how to organize the network equipment, such as computers, hubs, switches, and routers, so that it fulfills the performance requirements of the network users and applications) The sender has 4 states (two for each sequence number, of whch one is for DATA and the other one for ACK) while the receiver has 2 states (one for each sequence number). The receiver does nothing when a packet is lost; it just ACKs all packets that are received. Question 2. [the question does not have any part] Assume no other delays than those stated (RTT) and headers included in calculations. Also assume that the ACK has no transmission time, only propagation. i) The total transfer time = (handshake time) + (transfer of packet A--R1) + (transfer of fragments R1--B) + (transfer of ACK B--A) = = (2 x RTT) + ( (1000 x 8 x 10^3) / (5 x 10^6) ) + (2 x (250 x 8 x 10^3) / (5 x 10^6) + 3 x (250 x 8 x 10^3) / (5 x 10^6) ) + (RTT / 2) = = 0.2 s + 1.6 s + 2 s + 0.05 s = 3.85 s. (note that the routers are performing work in parallell when data is divided into packets) ii)

The average throughput = data amount / total transfer time = (1000 x 8 x 10^3) / 3.85 bps = 2078 x 10^3 bps = 260 KB/s The sender will move its window only one step to the right, covering positions 1-5, when it receives the four remaining ACKs because of the missing ACK for packet no. 1. The retransmission timers for the other packets till be stopped. The retransmission timer for packet 1 will count down and then the packet till be retransmitted by the sender. The receiver will retransmit the ACK for packet 1. When the ACK for packet 1 is received by the sender, the sender can move the window to positions 5-10. Question 3. [For clarity s sake, the whole session is given below, with the lines from the question inserted with their number] telnet smtp.liu.se 25 Trying 130.236.230.205... Connected to smtp.liu.se. Escape character is ^]. ix) 220 munin.unit.liu.se ESMTP Postfix [the smtp server presents itself and the protocol version] ii) helo liu.se [the smtp client and its domain present itself to the server] x) 250 munin.unit.liu.se [the server acknowledges the helo command] viii) mail from:<juha.takkinen@liu.se> [the client lists the sender] x) 250 Ok [the server acknowledges the mail command] v) rcpt to:<lena.stromback@liu.se> [the client lists the receiver] x) 250 Ok i) data [start of data] 354 End data with <CR><LF>.<CR><LF> iii) mime-version: 1.0 [the message will be encoded using mime so that more than 7-bit ascii can be accommodated, if any] vii)happy holidays! [the message] iv). [period] [the message is finished and will now be sent] x) 250 Ok: queued as AA756279A9F vi) quit [quit the session; no more e-mails from this domain] 221 Bye Connection to smtp.liu.se closed by foreign host.

% The DHT data structure is commonly used as an index for storing and looking up information about hosts and what data they have stored. Data is stored as <key, value> pairs in the nodes of the DHT. The key in the data pair is, for example, the name of the music file to be searched, and the value is the ip address of the host that has the mp3 file in question. Both the node ID and the data key are hashed using the same hash function. In this way a simple match can be performed on the data key and the node ID in order to locate the node that has the key and subsequently look up the value (ip address). The root server knows about TLD servers, while the authoritative server knows about hosts owned by the organization where the authoritative server is situated, including mail drops, if any. Question 4. The timeout value is based on the samplertt, estimatedrtt and devrtt and three different constants, all calculated using the exponential moving weighted average. [a list of the relevant formulas follows] single ACK = transmit the next segment in the sending window, which has the exact sequence number of the ACK double ACK = update the counter for duplicate ACKs triple duplicate ACK = reset the counter for duplicate ACKs and go to fast retransmit of the lost segment with the same sequence number as the ACK. Then, halve the sending rate by setting the congestion window to half of its value and the threshold to this halved value. Question 5. Ip packets can get lost, i.e., dropped in a router because they have the wrong checksum or the outgoing queue is full (another reason can be that the TTL field has reached zero). When an ip packet is fragmented each fragment is sent as an individual ip packet. They are reassembled at the receiver, based on the information stored in the second word in the packet header: the ID field has the same value for every fragment that belong to the

same original packet; the MF flag is set to 1 if the fragment is not the last fragment; and the Offset field tells the receiver where in the original packet the fragment belongs. In order to locate the subnets, isolate each interface that has an ip address, i.e., the interfaces belonging to routers and the hosts (see figure below). Concludingly, there are three subnets in the network: two subnets with two addresses and one subnet with nine addresses (not including the switch). Host A is behind R2, host F is behind R1 and the rest of the hosts are connected to the subnet limited by R1, R2 and R3. If the network grows with one-third of hosts then there wll be a need for 3, 3 and 12 hosts in each respective subnet. However, since there are two reserved addresses in each subnet (the broadcast all-ones and "this network" all-zeros) the no. of addresses needed are 6, 6 and 14, respectively. The two smaller subnets would then need a subnet mask of 29 bits (increased with one bit from before the expansion) while the larger subnet will need 28 bits, i.e., 255.255.255.232 (which actually is the same subnet mask as before the expansion). Question 6. i) Two approaches are possible. The first approach is that host A uses the ip address and the subnet mask to initially find out that host G is in a different subnet, so it sends the packet to R2 using the ip address. R2 will in turn use ARP (assuming it does not know about host G yet) and broadcast an ARP request with a query for the MAC address of G belonging to G s ip address that R2 got from host A. Host G will respond with a unicast ARP packet to R2 containing G s MAC address. The second approach uses a proxy-arp in R2, which means that host A sends the packet with G s ip address in a MAC frame directly addressed to router R2. R2 then performs the same operations as in the first approach above. ii) Because the switching table is empty and the three first communications introduce new nodes, the procedure for these three will all look the same with regard to the steps performed: the switch will store the sending node s MAC address and also the link in the switching table and then flood the frame on every other link except the incoming one. The receiver will pick up the frame and respond directly to the sender, which will cause the switch to discover both the receiver s MAC address and link and put this information into the switching table. In the last communication, between E and R1, router R1 is already known to the switch, so the switch will put the frame directly on to the correct link, after storing host E s MAC address and link in the switching table.

The sender reserves the channel by sending an RTS to the receiver. The receiver responds with a CTS, which is heard by all stations within range of the receiver and which are also hidden from the sender. Then the sender can transmit its data, after which the receiver concludes with an ACK. The ACK is also heard by the hidden stations, which now are free to try and access the channel. Question 7. [the algorithm actually builds the routing table, which in turn is used to derived the forwarding table] N B C D E F A 1, A - - - - AB done 2, B - - - ABC done done 3, C - - ABCD done done done 4, D 10, D ABCDE done done done done 5, E ABCDEF done done done done done The forwarding table in A consists of columns for destination, nexthop and cost as follows: A - - B B 1 C B 2 D B 3 E B 4 F B 5 The inter-as protocol is concerned only with reachability and implements an organization s policy about its network s visibility to the outside world, what and how much traffic from other companies to carry, etc. The BGP protocol implements this. The intra-as protocol is concerned with least-cost paths and varying requirements connected to different-sized organizations. Therefore, several routing protocols are available here, such as RIP, OSPF and others by Cisco for example. The interplay between the two types of protocols listed above is based on distributing varying information to all routers within ASs about which outside networks (foreign ASs) that are reachable from each AS and where a next-hop foreign router is along a path of ASs. Routing loops is a problem that can occur in routing protocols, which means that the

same node occurs more than once along a path. Question 8. The handshake is needed because SSL must negotiate several security protocols (for encryption and hashing) before data can be transferred. Also, the communicating nodes must authenticate themselves, at the same time preventing insertion and playback attacks by using nonces and MACs. The operations are true because the message m is encrypted. This is accomplished using a shared secret key (session key, Ks) randomly created by the sender. In order for the receiver to be able to decrypt the confidential message, the session key is appended (+) to the sent message and encrypted using the public key of the receiver (Kb+). Authentication in WEP is done using a shared secret key. A nonce is encrypted with this key in order to prevent playback attacks. This action is performed by both the wireless station and the access point.