Questions

November 12, 2017 | Author: وقاص وکی | Category: Internet Protocols, Computer Network, Transmission Control Protocol, Network Packet, Latency (Engineering)
Share Embed Donate


Short Description

Assignemnt...

Description

Question 1: Network Foundations Question 1.1 a) Define latency as a metric of network performance, and explain what its component parts are. [4 marks]

Ans: Latency is the amount of time a message takes to traverse a system. In a computer network, it is an expression of how much time it takes for a packet of data to get from one designated point to another. It is sometimes measured as the time required for a packet to be returned to its sender. Latency has following several parts like. Processing delay – time routers take to process the packet header Queuing delay – time the packet spends in routing queues Transmission delay – time it takes to push the packet's bits onto the link Propagation delay – time for a signal to reach its destination b) Besides latency, what is the other key metric of network performance? [1 mark] Ans: Besides latency, there are the following other key metric of network performance. Bandwidth and throughput Uptime or responsiveness Jitter Hardware and software c) Give an example of an application for which latency is the more critical of the two key network performance metrics. [1 mark]

Ans: Voice over IP (VoIP) or any other application that relies on live, real-time transmission of video or audio, you need to ask your service provider about their latency.

Question 1.2 Give one example of an application for which bandwidth is more critical than latency. [1 mark]

Bandwidth is a key concept in many telephony applications. In radio communications, for example, bandwidth is the frequency range like in POTS telephone line, that carry telephone conversation.

Question 1.3 a) List two advantages of using a layered approach to network architecture. [2 marks]

Ans: 1. Layered architecture enables teams to work on different parts of the application parallely with minimal dependencies on other teams.

2. Layered architecture enables develop loosely coupled systems.

b) Suppose the designers of this link wanted to run TCP over it. Identify two distinct challenges

that they would have to deal with - one as a result of the large distance between Earth and Mars, and the other as a result of the large delay * bandwidth product of the link. [2 marks]

Ans: Designers will have following problems like. 1. Transmission delay 2. Elephants: the term elephant refers to a network that is deemed to be "long" and "fat." "Elephant" is derived from the acronym for long fat network, LFN. An LFN is a network that is composed of a long distance connection ("long") and high bandwidth capacity ("fat"). So they will need to provide high bandwidth capacity for long distance.

Suppose you have been asked to design an optimal ARQ strategy for this link. Identify two distinct challenges your design will need to consider as a result of the large variance in distance between Earth and Mars? [2 marks] Ans: 1. Packet Loss on a Link due to large variance in distance 2. Delay Across a Link 3. Defining ARQ Protocols persistency for large distance variance

a) List three advantages and/or disadvantages of using a layered approach to network architecture. [3 marks]

Advantages: 1. Layered architecture increases flexibility, maintainability, and scalability. 2. Multiple applications can reuse the components. 3. Different components of the application can be independently deployed, maintained, and updated, on different time schedules. Disadvantages 1.

There might be a negative impact on the performance as we have the extra overhead of passing through layers instead of calling a component directly. 2. Development of user-intensive applications can sometime take longer if the layering prevents the use of user interface components that directly interact with the database. 3. The use of layers helps to control and encapsulate the complexity of large applications, but adds complexity to simple applications.



List the names of the two layers in the OSI model that do not appear explicitly in our 5-layer model. [1 mark]

Ans: Session and presentation layers does not come in 5 layer model

Q: Suppose a 100 Mbps point-to-point link is being set up between the earth and a new lunar colony. The distance from the moon to the earth is approximately 384,000 km, and data signals travel at the speed of light – 300,000 km/second. a) Calculate the minimum RTT (Round trip time) for the link. Show your working. Ans: Minimum RTT = 2 x Propagation Propagation = Distance / Speed of Light = 2 x 385000 km / 3 x 108 m/s = 2 x 385000000 m / 3 x 108 m/s = 2 x 385 / 300 sec = 2.57 sec b) What is the significance of the minimum RTT value when implementing reliability on this link? Ans: The important part of calculating RTO is to determine how long it takes for a segment to go to the receiver and for ACK to come back from receiver to sender. This is a Round Trip Time, or RTT. In some ideal world (and very static for that matter) this value would be constant and would never change. And RTO would be easy to determine, it is equal to RTT, maybe slightly slightly larger, but nevertheless the two would be almost equal. c) Using RTT as a delay, calculate the delay * bandwidth product for the link. Show your working. Ans: Delay x Bandwidth = 2.57 sec x 100 Mbits/sec = 257 Mbits = 257/8 MB = 32MB

d) What is the significance of the delay * bandwidth product value when implementing reliability on this link? Ans: This represents the amount of data the sender can send before it would be possible to receive a response. This is the minimum amount of sent-but-unacknowledged data the sender must be able to handle – if it wants to keep transmitting at the full bandwidth of the link. In other words, if the sender has less send-buffer space than this, it cannot utilise the full capacity of the link.

Question 2: Physical Layer a) What is the single most important function of the Physical Layer? [1 mark] Ans: The most important function of physical layer is to establish connection between two stations. What is baseline shift? Which of the encoding methods we looked at in lectures (Manchester, 4B/5B) provides the strongest solution to this problem? Justify your choice. [3 marks] Network baselining is the act of measuring and rating the performance of a network in real-time situations. Providing a network baseline requires testing and reporting of the physical connectivity, normal network utilization, protocol usage, peak network utilization, and average throughput of the network usage. Such in-depth network analysis is required to identify problems with speed and accessibility, and to find vulnerabilities and other problems within the network. So baseline shift is the shift in the performance of a network. Solution: In telecommunication, 4B5B is a form of data communications Block Coding. 4B5B maps groups of 4 bits onto groups of 5 bits, with a minimum density of 1 bits in the output. When NRZI-encoded, the 1 bits provide necessary clock transitions for the receiver. For example, a run of 4 bits such as 00002 contains no transitions and that causes clocking problems for the receiver. 4B5B solves this problem by assigning each block of 4 consecutive bits an equivalent word of 5 bits. These 5 bit words are predetermined in a dictionary and they are chosen to ensure that there will be at least two transitions per block of bits. A collateral effect of the code is that more bits are needed to send the same information than with 4 bits. An alternate to using 4B5B coding is to use a scrambler. Depending on the standard or specification of interest, there may be several 4B5B characters left unused. The presence of any of the "unused" characters in the data stream can be used as an indication that there is a fault somewhere in the link. Therefore, the unused characters can be used to detect errors in the data stream. Manchester encoding is an alternative strategy. Briefly describe what it is. What is the cost? In telecommunication and data storage, Manchester coding (also known as phase encoding, or PE) is a line code in which the encoding of each data bit is either low then high, or high then low, of equal time • 1 bit encoded by a rising voltage transition; 0 bit encoded by a falling voltage transition. • For consecutive 1s, or for consecutive 0s, we also need a voltage transition between bits; thus must be able to do two physical-layer signal transitions per bit. In other words, we cannot transmit one bit per physical-layer transition: we are limited to ½ a bit per transition – which means we just lost half of our bandwidth. Note that signal transitions do not always occur at the 'bit boundaries' (the division between one bit and another), but that there is always a transition at the centre of each bit.The encoding may be alternatively viewed as a phase encoding where each bit is encoded by a postive 90 degree phase transition, or a negative 90 degree phase transition. The Manchester code is therefore sometimes known as a Biphase

Question 3: Link Layer Question 3.1 Ethernet addresses are supposed to be globally unique. Briefly explain the standard strategy for ensuring this. [1 mark] This is because Vendors are given a range of MAC addresses that can be assigned to their products by the IEEE (Institute of Electrical and Electronics Engineers). MAC Address are assigned to Vendors in various sized blocks as appropriate. There are 248 or 281 474 976 710 656 different potential combinations. They are reasonably unique. The first 3 octets define the manufacturer. The last 3 octets are usually generated at the time of PROM burning. It's up to the manufacturer how they do this.

Question 3.2 What is framing, and how does it help the link layer to improve upon the services provided by the physical layer? [3 marks] Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. Ethernet, token ring, frame relay, and other data link layer technologies have their own frame structures. Frames have headers that contain information such as error-checking codes. Improve upon the services: In physical layer framing improves services provided by physical layer by following functions. 1. Error Control The bit stream transmitted by the physical layer is not guaranteed to be error free. The data link layer is responsible for error detection and correction. 2. Flow Control If the sender keeps pumping out frames at high rate, at some point the receiver will be completely swamped and will start losing some frames. This problem may be solved by introducing flow control. Most flow control protocols contain a feedback mechanism to inform the sender when it should transmit the next frame. 3. Stream resynchronisation. If a sender gets confused about the interpretation of a stream of incoming bits, framing enables the receiver to recognise the start of a subsequent frame and correctly interpret subsequent data. Some frames may still be lost, but at least that doesn't doom us to losing all subsequent incoming data. Without framing, this would be extremely difficult (likely impossible). 4. In addition, framing facilitates addressing (useful on a shared medium or a switched network), and multiplexing (frames from separate data flows can be interleaved).

Question 3.3 A stream of 4 bytes of data is to be transmitted with 2-D parity data added. The output stream is to consist of (in this order): 1. the four data bytes (32 bits) 2. four row-parity bits (one for each byte) 3. eight column-parity bits 4. one corner parity bit Odd parity is used throughout. Here is the stream of bits received at the destination: 01010010110100101011111001110101 0110 10110100 1 Is the received data free of bit-errors? Justify your answer. [4 marks]

a) Convert this 48-bit binary Ethernet address into its hexadecimal equivalent: 0001 0000 00100100 00101111 11110100 10011001 11000011. [2 marks] Ans: 10242FF499C3

a) Ethernet addresses are supposed to be globally unique. Briefly explain the standard strategy for ensuring this. [1 mark] The MAC address is a 48 bit address that is considered unique so that each component can be positively identified across as many networks as it is used on. The IEEE standard posits a 100 year life span for all MAC-48 addresses; in other words, no other device will have a particular device's MAC address for 100 years. b) Explain why a sliding window ARQ is preferable to a stop-and-wait ARQ. [2 marks] Sliding window ARQ preferable to stop and wait ARQ because Sliding window ARQ provides unique consecutive sequence number and the receiver uses the numbers to place received packets in the correct order, discarding duplicate packets and identifying missing ones

b) What is framing, and how does it help the link layer to improve upon the services provided by the physical layer? [3 marks]

Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. Ethernet, token ring, frame relay, and other data link layer technologies have their own frame structures. Frames have headers that contain information such as error-checking codes. Improve upon the services: In physical layer framing improves services provided by physical layer by following functions. 1. Error Control The bit stream transmitted by the physical layer is not guaranteed to be error free. The data link layer is responsible for error detection and correction. 2. Flow Control If the sender keeps pumping out frames at high rate, at some point the receiver will be completely swamped and will start losing some frames. This problem may be solved by introducing flow control. Most flow control protocols contain a feedback mechanism to inform the sender when it should transmit the next frame. 3. Stream resynchronisation. If a sender gets confused about the interpretation of a stream of incoming bits, framing enables the receiver to recognise the start of a subsequent frame and correctly interpret subsequent data. Some frames may still be lost, but at least that doesn't doom us to losing all subsequent incoming data. Without framing, this would be extremely difficult (likely impossible). 4. In addition, framing facilitates addressing (useful on a shared medium or a switched network), and multiplexing (frames from separate data flows can be interleaved).



Explain in specific detail why the Ethernet frame format includes an optional pad field. [4 marks]

Question 3.5 What does the acronym “ARP” stand for? State it's role in the network, and briefly outline its principal request/reply mechanism. [3 marks]

ARP: address resolution protocol Role: The address resolution protocol (arp) is a protocol used by the Internet Protocol (IP) [RFC826], specifically IPv4, to map IP network addresses to the hardware addresses used by a data link protocol. The protocol operates below the network layer as a part of the interface between the OSI network and OSI link layer Principals: But this means that every time machine A wants to send packets to machine B, A has to send an ARP packet to resolve the MAC address of B and hence this will increase the traffic load too much, so to reduce the communication cost computers that use ARP maintains a cache of recently acquired IP_to_MAC address bindings, i.e. they dont have to use ARP repeatedly. ARP Refinements Several refinements of ARP are possible: When machine A wants to send packets to macine B, it is possible that machine B is going to send packets to machine A in the near future. So to avoid ARP for machine B, A should put its IP_to_MAC address binding in the special packet while requesting for the MAC address of B. Since A broadcasts its initial request for the MAC address of B, every machine on the network should extract and store in its cache the IP_to_MAC address binding of A When a new machine appears on the network (e.g. when an operating system reboots) it can broadcast its IP_to_MAC address binding so that all other machines can store it in their caches. This will eliminate a lot of ARP packets by all other machines, when they want to communicate with this new machine. Example for explanation: Consider a scenario where a computer tries to contact some remote machine using ping program, assuming that there has been no exchange of IP datagrams previously between the two machines and therefore arp packet must be sent to identify the MAC address of the remote machine. The arp request message (who is A.A.A.A tell B.B.B.B where the two are IP addresses) is broadcast on the local area network with an Ethernet protocol type 0x806. The packet is discarded by all the machines except the target machine which responds with an arp response message (A.A.A.A is hh:hh:hh:hh:hh:hh where hh:hh:hh:hh:hh:hh is the Ethernet source address). This packet is unicast to the machine with IP address B.B.B.B. Since the arp request message included the hardware address (Ethernet source address) of the requesting computer, target machine doesn't require another arp message to figure it out.

Question 4: Network Layer – 14 marks Question 4.1 Consider the circuit-switched network in this diagram:

Assume that a switch will assign virtual-circuit identifiers sequentially, starting at zero, and that all virtual circuit tables are initially empty. Give the complete virtual circuit table for each individual switch after all of the following connections are established in sequence: 1. Host A connects to Host B 2. E connects to J 3. F connects to B 4. E connects to B [6 marks] 1) Host A to B At Switch 1 Incoming Interface

Incoming VCI

Outgoing Interface

Outgoing VCI

Page 7 of 30

Question 4.2 Explain why IPv4 does reassembly only at the destination host, and not at intermediate routers? [2 marks]

Question 4.3 Link-state and distance-vector are two major classes of routing algorithms. Briefly explain the key conceptual difference between these two approaches. Specifically, in each algorithm what information do network nodes send out, and which nodes do they send it to? [2 marks]

Question 4.4 Consider a 1300-byte IP datagram with an identification number of 426 travelling through a network. It arrives at a router which decides to forward it over a link with an MTU of 512 bytes. How many fragments are generated, and what are their characteristics (size, offset, flag bits, and identification)? Assume that only standard IP headers are used. [4 marks]

e) What is the 8-bit “time to live” field in the IPv4 header actually used for in current IPv4 implementations? Why is it necessary? [2 marks]

Explain what the count-to-infinity problem is. Construct a concrete numerical example that clearly illustrates it. Include a diagram that supports your explanation.

h) What is the 32-bit binary equivalent of the network address 192.168.170.18? [2 marks]

Question 5: Transport Layer – 10 marks Question 5.1 What is the single most important service provided by the Transport Layer? [1 mark]

Question 5.2 State the full terms represented by the following acronyms: [2 marks] • TCP •

UDP



IP



ICMP

What is a port number, as used in TPC/IP?

Question 5.3 Suppose that host A sends two consecutive TCP segments to host B over a TCP connection: the first, segment X, has sequence number 807, and is lost in transit. the second, segment Y, has sequence number 828, and arrives successfully at B. b) How much payload data is in segment X? [1 mark]

c) Suppose that all data prior to segment X has already arrived at host B and has been acknowledged. When segment Y arrives at host B, what acknowledgement number will host B send back to host A? [2 marks]

d) Suppose that host A sends two consecutive TCP segments to host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 112. 1) How much data is in the first segment? [1 mark]

2) Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgement that host B sends to host A, what will be the acknowledgement number? [2 marks]

Question 5.4 It is sometimes claimed that UDP is “faster” than TCP. Explain some arguments for and/or against this assertion. [4 marks]

e) What is the three-way handshake used to establish a TCP connection? What information is passed between the two hosts at each stage? [3 marks]

Question 6: Application Layer – Question 6 – Application Layer Question 6.1 Describe and clearly distinguish the roles in DNS of: authoritative name servers, local name servers, and root name servers. [6 marks]

(b) What is the difference between a recursive DNS

query and an iterative DNS query? Describe a scenario in which an iterative query is beneficial and identify two specific benefits. Describe a scenario in which a recursive query is beneficial and identify two specific benefits. [6 marks]

(c) List four non-proprietary Internet applications and the application-layer protocols they each use. [4 marks]

(d) Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP? [2 marks]

Question 6.2 Why does DNS usually run on top of UDP rather than on TCP? [2 marks]

Question 6.3 Explain how HTTP/1.1 can reduce latency compared to HTTP/1.0. [2 marks]

Question 6.4 An HTTP proxy cache can be usefully deployed in a client network or in a server network. What benefits can be achieved in each scenario? [3 marks]

Question 7.5 Why is the Telnet protocol regarded as a security risk? [2 marks]

Question 7.2 The following cipher text has been encoded with the Caesar Cipher (ROT-3): jrrg ghfubswlrq Recover the original plaintext. [2 marks]

Question 7.3 What is a frequency analysis attack, and why are substitution ciphers particularly vulnerable to such attacks? [2 marks]

Question 7: Reliability – Question 8.1 Consider transmitting data over a series of unreliable links with the following characteristics: • end-to-end path traverses 3 separate links • a link-layer frame transmitted over any one link has a 95% chance of being delivered intact to the other end of that link • the Transport-Layer packets being transmitted are too large for the Link-Layer MTUs, and must each be broken down into 8 separate Network-Layer packets, each of which fits in one LinkLayer frame. What is the probability of a Transport-Layer packet being successfully delivered without triggering Transport-Layer retransmission if the Link Layer provides.. b) … an unacknowledged connectionless service (no retransmission of lost frames)? Show your calculations. [2 marks]

b) … an acknowledged connectionless service with up to four transmission attempts (original

attempt plus up to three retries) for a lost/damaged frame? Show your calculations. [4 marks]

Question 8.2 Discuss the pros and cons of implementing reliability at the Link Layer versus implementing it at the Transport Layer. [5 mark]

b) Describe what is meant by “reliability” in the context of computer networks, and discuss the pros and cons of implementing reliability at the Network Layer versus implementing it at the Transport Layer. [6 marks]

Question 8: Processes and Scheduling – Question 9.1 Draw a state transition diagram for the 7-state Process Model: • Include the name of each state in your diagram. • Draw arrows for all required state transitions. • Do not include arrows for any invalid transitions. • Valid but optional transitions may be either included or omitted. [10 marks]

Question 9.2 What is “starvation”? Propose a strategy for avoiding starvation in a priority scheduling algorithm. [2 marks]

Question 9.3 In a mono-programming batch environment, what scheduling algorithm will optimise average turnaround time? What is the main difficulty with implementing this algorithm? [2 marks]

Question 9.4 Multiprogramming allows multiple processes to be resident in memory at the same time and leads to more efficient utilisation of the CPU. a) What is the formula for calculating the CPU utilisation based on a simplified analysis of multiprogramming? [0.5 marks]

U = ....................................... b) State the meaning of each term in your formula. [1.5 marks]

Question 9:

Concurrency and Deadlock –

Question 10.1 a) Consider the following sequence of resource allocation requests. Assume that there is only one instance of each resource, a resource can only be allocated to one process at a time, and resource requests are immediately granted if the resource is available. ▪ Process P1 requests Resource R1. ▪ Process P2 requests Resource R2. ▪ Process P3 requests Resource R3. ▪ Process P2 requests Resource R4. ▪ Process P1 requests Resource R2. ▪ Process P1 requests Resource R3. Draw a resource allocation graph to depict the current state. Is the system currently deadlocked? Give a reason for your answer. [4 marks]

b) Following on from the above scenario, Process P3 requests Resource R4. Is the system deadlocked now? State your reason/s. [1 mark]

Question 10.3 The following diagram illustrates the synchronisation we would like to achieve between a set of cooperating processes:

We want process A's critical region to complete before either B's or C's critical regions commence, and D should not commence its critical region until both B's and C's critical regions have completed. Eight binary semaphores have been set up called sem1, sem2, …, sem8. Each has been initialised to zero. You may use any of them that you need. For each process (A, B, C, & D), write signal() and wait() calls to be called before/after the critical region that would enforce the desired synchronisation. Use only as many separate semaphore objects in your solution as you actually require for a simple, straightforward solution. Where no signal()s or wait()s are required, write “none”. [4 marks] Process A

B

C

D

Before critical region

After critical region

Question 10.4 c) List and briefly describe the four conditions that must apply for deadlock to occur. [6 marks]

Q2.4 [4 marks] Binary semaphores, general semaphores, and monitor condition variables all provide signal() and wait() operations that seem quite similar. However, if there is no thread/process currently wait()ing, a signal() is handled quite differently by the three different types of synchronisation objects. State concisely and precisely what that difference is.

c) One possible solution to the Dining Philosophers problem is to get some of the philosophers to pick up their left chopstick first and then their right chopstick, whilst others pick up their right chopstick first followed by their left chopstick. This strategy negates one of the above four conditions of deadlock. State exactly which one. [2 marks]

Question 10: Memory Management – Question 11.1 What is the key difference between paging and virtual memory? [1 mark]

Question 11.2 A process is running on a machine with 8-bit memory addresses, and it's page table is as follows: Page Number

Frame Number

Valid?

00

00

0

01

11

1

10

01

1

11

01

0

a) What is the size of a page (number of bytes)?

[1 mark]

b) What 8-bit physical address corresponds to the virtual address 10010111? Show your working.

[2 marks]

c) Give one example of a non-zero 8-bit virtual address that will generate a page fault.

[1 mark]

Question 11.3 A process has 8 virtual pages, and a resident set size (RSS) limit of 4 physical frames. The process needs to access data on the following pages (in this order): 0,1,7,2,3,2,7,1,0,3,2. Assume the 4 frames are initially empty. How many page faults occur if the system uses a LRU page replacement strategy? Show your working. [3 marks]

Question 11.4 The following two code fragments each calculate the sum of all elements in a two-dimensional array. /* code fragment #1 */ for(int c = 0; c < cols; c++){ for(int r = 0; r < rows; r++){ sum += array[r][c]; } } /* code fragment #2 */ for(int r = 0; r < rows; r++){ for(int c = 0; c < cols; c++){ sum += array[r][c]; } }

Assuming the compiler will lay out a 2-D array in row-wise fashion, which piece of code conforms more closely to the principle of locality? Explain. [3 marks]

Question 11.5 Define internal fragmentation and external fragmentation. Which type of fragmentation is often associated with static memory partitioning schemes? [3 marks]

Question 11.6 Describe what each of the following is, and what problem it is intended to solve: • page table • inverted page table • translation look-aside buffer [6 marks]

Q3.4

Define internal fragmentation and external fragmentation. Which type of fragmentation is often associated with static memory partitioning schemes?

Q3.9

What is overlay programming? State one specific advantage of virtual memory compared to overlay programming.

Question 11: Performance Monitoring – Question 13.1 List the names of any two system performance monitoring tools generally available on unix platforms, and briefly explain the primary capabilities of each. [3 marks]

Question 13.2 Imagine your manager has asked you to collect system performance statistics on a large server to determine how best to improve system performance. Outline and justify your strategy for collecting the necessary evidence. [5 marks]

Q7.1 [6 marks]

Explain the differences between programmed I/O, interrupt-driven I/O, and DMA.

Q7.2 [3 marks]

What is non-blocking I/O? Give an example of where it might be used.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF