Adjacent Layers - Computer Netrwork - Solved exam, Exams of Computer Networks

These are the Exam of Computer Network and its key important points are: Adjacent Layers, Protocol, Information Interchange, Adjacent, Factors, Packet Delay, Propagation Delay, Transmission Delay, Processing Delay, Causes

Typology: Exams

2012/2013

Uploaded on 03/28/2013

rohit-sharma
rohit-sharma 🇮🇳

4.3

(11)

200 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Final Exam for Computer Networks Fall 2008
>>> SOLUTIONS <<<
Welcome to the Final Exam for Computer Networks. Read each problem carefully. There are ten required
problems (each problem is worth 10 points). There is also an additional extra credit question worth 10 points.
You may have with you a calculator, pencils, erasers, blank paper, and one 8.5 x 11 inch “formula sheet”. On
this formula sheet you may have anything you want (definitions, formulas, homework answers, old exam
answers, etc.) as handwritten by you on both sides of the sheet. Photocopies, scans, or computer
generated/printed text are not allowed on this sheet. You have 120 minutes for the exam. Please use a separate
sheet of paper for each question. Good luck and be sure to show your work!
Problem #1
Answer the following questions on the basics of computer networks and the Internet.
a) Sketch the five-layer Internet protocol stack that we have been using in the class (and is used in Kurose and
Ross)
2pts total - 0.5 pts per layer
+---------------+
| Application | 5
+---------------+
| Transport | 4
+---------------+
| Network | 3
+---------------+
| Link | 2
+---------------+
| Physical | 1
+---------------+
b) Define protocol. Define interface.
2pts total – 1 pt each item.
A protocol is a complete set of rules for information interchange between same level layers at different sites. An
interface is a complete set of rules for information interchange between adjacent layers in one site.
c) What are the four factors of packet delay?
2pts total - 0.25 pts per item
Processing delay, transmission delay, propagation delay, and queueing (or buffering) delay
d) What are the two possible causes of packet loss? In the wired Internet, which is the most common cause of
packet loss?
2pts total - 1 pt per item
Electrical noise and buffer overflow. Wired networks generally have little noise, so buffer overflow is the predominant
factor for packet loss in the wired Internet.
e) Name a tool (or utility) that can be used to measure delay in the Internet.
2pts total
Ping (also traceroute) can be used to measure round-trip time for a packet.
Points off are “rounded-up”. For example, if in Problem 1(a)
one layer is wrong, then it is -1. If two layers are wrong it is
still -1. If three layers are wrong it is -2. And, so on.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Adjacent Layers - Computer Netrwork - Solved exam and more Exams Computer Networks in PDF only on Docsity!

Final Exam for Computer Networks Fall 2008

>>> SOLUTIONS <<<

Welcome to the Final Exam for Computer Networks. Read each problem carefully. There are ten required

problems (each problem is worth 10 points). There is also an additional extra credit question worth 10 points.

You may have with you a calculator, pencils, erasers, blank paper, and one 8.5 x 11 inch “formula sheet”. On

this formula sheet you may have anything you want (definitions, formulas, homework answers, old exam

answers, etc.) as handwritten by you on both sides of the sheet. Photocopies, scans, or computer

generated/printed text are not allowed on this sheet. You have 120 minutes for the exam. Please use a separate

sheet of paper for each question. Good luck and be sure to show your work!

Problem

Answer the following questions on the basics of computer networks and the Internet.

a) Sketch the five-layer Internet protocol stack that we have been using in the class (and is used in Kurose and

Ross)

2pts total - 0.5 pts per layer +---------------+ | Application | 5 +---------------+ | Transport | 4 +---------------+ | Network | 3 +---------------+ | Link | 2 +---------------+ | Physical | 1 +---------------+

b) Define protocol. Define interface.

2pts total – 1 pt each item. A protocol is a complete set of rules for information interchange between same level layers at different sites. An interface is a complete set of rules for information interchange between adjacent layers in one site.

c) What are the four factors of packet delay?

2pts total - 0.25 pts per item Processing delay, transmission delay, propagation delay, and queueing (or buffering) delay

d) What are the two possible causes of packet loss? In the wired Internet, which is the most common cause of

packet loss?

2pts total - 1 pt per item Electrical noise and buffer overflow. Wired networks generally have little noise, so buffer overflow is the predominant factor for packet loss in the wired Internet.

e) Name a tool (or utility) that can be used to measure delay in the Internet.

2pts total Ping (also traceroute) can be used to measure round-trip time for a packet.

Points off are “rounded-up”. For example, if in Problem 1(a) one layer is wrong, then it is -1. If two layers are wrong it is still -1. If three layers are wrong it is -2. And, so on.

Problem

Answer the following questions related to the Application layer.

a) An application layer protocol defines how an application’s processes, running in different end systems, pass

messages to each other. In particular, an application-layer protocol defines four things. What are these four

things?

2pts total – 0.5 pts each item The four things are 1) types of messages, 2) syntax of messages, 3) semantics of messages, and 4) rules for determining when to send messages (timing).

b) Sketch the packet format of an HTTP packet on Ethernet. Show all packet headers and trailers. You do not

need to show the contents of the headers or trailers.

2pts total – 0.5 pts field +--------------+---------+---------+----------+-----------+---------------+ | Ethernet hdr | IP hdr | TCP hdr | HTTP hdr | appl data | Ethernet trlr | +--------------+---------+---------+----------+-----------+---------------+

c) Name three email access protocols (that is, from user agent to SMTP server) for email download.

2pts total – 1 pt each item POP, IMAP, and HTTP

d) What is DNS? Describe what it does and (at a very high level) how it works.

2pts total – 1 pt for what and 1 pt for how DNS is the Domain Name System and is the Internet-wide “phone book” that associates a host name with an IP address. DNS is a hierarchy of servers. A query for a hostname to IP address resolution travels up the hierarchy of DNS servers until a match is found. Lower-level DNS servers can cache hostname to IP address mappings.

e) P2P is an application for sharing files. P2P can have a centralized directory of what files are available and

where they are accessible (e.g., Napster) or be completely decentralized (e.g., Gnutella). Briefly describe the

trade-offs of centralized versus distributed P2P directories.

2pts total – 1 pt for bottleneck and 1 pt for scalability A centralized directory is simple, but offers a single point of failure and can be a performance bottleneck. A decentralized approach (as used by Gnutella) requires flooding of query messages, which is unscalable (due to overwhelming query traffic).

Problem

The appendix contains tcpServer.c with some “bugs”. Identify the bugs and explain how to fix them. The

program compiles successfully for Microsoft Windows. The bugs are, I think, fairly major in scope.

1 pt each The following are the bugs:

  • No WSAStartUp() after line 27
  • Wrong protocol family in line 29 (should be streams, not datagram)
  • Wrong socket is in bind in line 39 (should be welcome_s)
  • No listen() after line 45
  • Only 2 bytes being copied in memcpy in line 56 (should be 4 bytes)

e) Is there a better reliable data transfer protocol than SAW with regards to achieving a higher U? If so, what is

it and what does it do?

2 pts – 1 pt for identifying SW and 1 pt for explaining what it does In the Sliding Window (SW) protocol multiple data frames (call the window size) can be outstanding (i.e., in flight) before an ACK is required to be received (which when received increments the “window” of frames that can be outstanding).

Problem

Answer the following questions about ARP, IPv4, and IPv

a) What is the purpose of ARP? Describe how ARP works.

2 pts The purpose of ARP is to resolve IP addresses to MAC addresses within a subnet. ARP uses MAC-level broadcast where only the host with the matching IP address responds to the host sending the ARP. From this response, the sending host can learn the MAC address of the responding host.

b) IP addresses are split into netid and hosted portions. Why?

2 pts This is to simplify (reduce the size of) router tables; router tables contain only netids. Thus, routers route only to the destination network. Within the network (and using the ARP cache) is the final forwarding of the packet to the destination host.

c) List and describe the fields in an IPv4 packet header.

4pts total - 1/3 pts each (and round up) An IPv4 header is 20 bytes, the fields are:

  • Ver = version
  • IHL = Internet header length
  • Type = type of service (not used)
  • Total length = total length of data unit length
  • Identifier = unique value to identify this datagram
  • Flags = indicates if fragmentation allowed
  • Fragment offset = where fragment belongs
  • TTL = time to live
  • Protocol = type of next protocol
  • Header checksum – to be able to detect errors in the header
  • Source and destination address – IP addresses that are 32 bits each
  • Options = sender optional stuff

d) Why was IPv6 created? Describe the most significant changes of IPv6 compared to IPv4.

2 pts IPv6 was primarily created to overcome the address shortage of IPv4 addresses. The most significant change is the increase in address length from 32 bits to 128 bits. Another change was the addition of a flow label.

Problem

Answer the following questions about LANs and Ethernet.

a) What is a LAN?

2 pts total A LAN is a data network optimized for a medium sized area (10s to 100s of stations and 100s to 1000s of meters span). A LAN is owned and operated by a single organization.

b) What are the fields of an IEEE 802.3 Ethernet frame (state how many bytes in each field)?

3 pts total – 0.5 pts each field and for description of frame size Number of bytes: 7 1 6 6 2 Var 4 +----------+------+-----------+-------------+-----------+------+-----+ | Preamble | SDEL | Dest addr | Source addr |frame type | data | FCS | +----------+------+-----------+-------------+-----------+------+-----+

An Ethernet frame must be between 64 and 1500 (1518 to be precise) bytes in length. The data field is padded if the needed to achieve the minimum frame size of 64 bytes.

c) Precisely describe (i.e., give the algorithms) CSMA/CD and BEB as used in IEEE 802.3 Ethernet

5 pts total – roughly 1 pt for each line Ethernet uses a 1-persistent CSMA algorithm:

(1) if medium is idle then transmit (2) if medium is busy then wait until idle and then transmit (3) if detect a collision during my transmission immediately halt transmission, transmit a brief jam signal, and wait a random period of time, then (1)

The random period of time is determined using the BEB algorithm:

while (attempts < backoff_limit) k := min(attempts, 10) r := rand(0, 2^k) delay := r * slot_time

The variable attempts is reset to zero on a successful transmission and incremented on a collided transmission. The variable delay is the random period of time for the delay is step (3). The constant slot_time is equal to the minimum frame size (512 bits).

Problem

Answer the following questions about layer-2 bridging.

a) For the network below, give the contents of the bridge forwarding tables (assume that these are IEEE 802.

transparent bridges). Assume that all stations have communicated with all other stations, EXCEPT that

station A has never sent a frame (it may have received frames). Assume that the letters (A, B, C, etc.) are the

station MAC addresses.

LAN #1 LAN #2 LAN

A---+ | |

+-- Bridge #1 --+ G --+

B --+ | |

| E --+ +--F

C --+ | |

| +-- Bridge #2 --+

D --+ | |

start random backoff time timer counts down while channel is idle transmit when timer expires if no ACK received then increase the backoff time and repeat (2)

At the receiver: if frame is received OK then send an ACK

DIFS is the Distributed Interframe Space and SIFS is the Short Interframe Space. SIFS is shorter in time than DIFS.

Problem

Answer the following questions regarding multimedia networking.

a) If a new network were to be designed and built to support multimedia networking, what are the “four

pillars” necessary (to use the terminology of Kurose and Ross) or the four “QoS principles” (to use the

terminology used in class)?

4 pts total – 1 pt for each item The pillars are 1) packet classification, 2) isolation of flows, 3) high network utilization, and 4) call admission.

b) What is (or was) ATM? Explain in one of two sentences.

3 pts total – 1 pt for each underlined item ATM is (was) Asynchronous Transfer Mode which is a virtual circuit cell-based network. ATM supported multiple traffic classes and was intended to be a universal network to carry voice, video, and data.

c) What is (or was) RSVP? Explain in one of two sentences.

3 pts total – 1 pt for each underlined item RSVP is a resource reservation set-up protocol for IP networks intend to support IntServ. RSVP is used by a host to request specific qualities (say, delay, loss, and throughput) from the network for particular application flows.

Problem

Answer the following questions regarding network management.

a) What are the five areas of network management as identified by ISO.

4 pts total – 1 pt for each item Performance, fault, configuration, accounting, and security.

b) What is SNMP and how does it work? Identify the major components of a network being managed using

SNMP.

4 pts total – 1 pt for each underlined item SNMP is Simple Network Management Protocol. SNMP is a request-response protocol between a manager and an agent (with an associated MIB or data base of management variables) in a remote device being managed. The key commands are GET (a variable), SET (a settable variable), and TRAP (device sends a message when a given variable hits a threshold).

c) What is MRTG? Explain in one of two sentences. What is an example of MRTG usage?

2 pts total – 1 pt for each underlined item

MRTG is Multi-Router Traffic Grapher and is an SNMP-based application that can GET and graph selected SNMP variables on a periodic basis. One example is to get bytes in and out counter values from routers and plot traffic utilization in and outbound on a company network. MRTG freely available (i.e., open source).

Extra Credit

How could the project experience have been improved (but, keeping the idea of the class developing a standard

and then implementing it)? Give one or two specific feasible ideas. Also, carefully describe what you mean by

“improved”. A feasible idle is one that you would have taken advantage of – that is, something you would have

done (and also would not have been overbearing for the instructor and/or TA to implement).

10 pts total – Ideas that are not feasible or are trivial/silly should lose points. Various answers are possible.

  1. // Copy the four-byte client IP address into an IP address structure
  2. memcpy(&client_ip_addr, &client_addr.sin_addr.s_addr, 2);
  3. // Print an informational message that accept completed
  4. printf("Accept completed (IP address of client = %s port = %d) \n",
  5. inet_ntoa(client_ip_addr), client_addr.sin_port);
  6. // Send to the client using the connect socket
  7. strcpy(out_buf, "This is a message from SERVER to CLIENT");
  8. retcode = send(connect_s, out_buf, strlen(out_buf), 0);
  9. if (retcode < 0)
  10. {
  11. printf("*** ERROR - send() failed \n");
  12. exit(-1);
  13. }
  14. // Receive from the client using the connect socket
  15. retcode = recv(connect_s, in_buf, (sizeof(in_buf) + 1), 0);
  16. if (retcode < 0)
  17. {
  18. printf("*** ERROR - recv() failed \n");
  19. exit(-1);
  20. }
  21. printf("Received from client: %s \n", in_buf);
  22. // Close the welcome and connect sockets
  23. retcode = closesocket(welcome_s);
  24. if (retcode < 0)
  25. {
  26. printf("*** ERROR - closesocket() failed \n");
  27. exit(-1);
  28. }
  29. }