Tutorial 1 - Answer

advertisement
TUTORIAL 1 – LINK LAYER
1. Name 3 error-detection strategies employed by link layer.
A: Parity checks, checksumming and CRC.
2. Suppose the information portion of a packet contains ten bytes consisting of the
8-bit unsigned binary representation of the integers 0 through 9. Compute the
Internet checksum for this data.
A: To compute the Internet checksum, we add up the values at 16-bit
quantities:
00000000 00000001
00000010 00000011
00000100 00000101
00000110 00000111
00001000 00001001
----------------------------00010100 00011001
The one's complement of the sum is 11101011 11100110.
3. Consider the generator, G = 1001, and suppose that D has the value
11000110010. What is the value of R?
A: 111
Bit pattern for G is 4 (r+1), thus, r = 3 and R will have r bit pattern.
To find R => D/G = (11000110010 000)/1001. The remainder from this
division operation is R.
* 3 bit “000” is added to D in order to find R.
4. Suppose two nodes start to transmit at the same time a packet of length, L, over
a broadcast channel of rate, R. Denote the propagation delay between the two
nodes as dprop. Will there be a collision if dprop > L/R? Why or why not?
A: No collision, since the other node is able to finish transmission before
new packet arrives.
Otherwise if dprop < L/R, there will be a collision. Before one node finishes
transmitting, it will start receiving the packet from the other node.
5. Why does collision occur in CSMA, if all nodes perform carrier sensing before
transmission?
A: When a node transmits a frame, the node has to wait for the frame to
propagate. Because of this propagation latency, collisions cannot be
detected immediately by the nodes.
6. Suppose nodes A, B, and C each attach to the same broadcast LAN (through
their adapters). If A sends thousands of IP datagrams to B with each
encapsulating frame addressed to the MAC address of B, will C’s adapter
process these frames? If so, will C’s adapter pass the IP datagrams in these
frames to the network layer C? How would your answers change if A sends
frames with the MAC broadcast address?
A: C’s adapter will process the frames, but the adapter will not pass the
datagrams up the protocol stack. If the LAN broadcast address is used,
then C’s adapter will both process the frames and pass the datagrams up
the protocol stack.
7. Consider two subnets which are interconnected by a router. The router has two
ARP modules, each with its own ARP table. Is it possible that the same MAC
address appears in both tables? Explain.
A: No it is not possible. Each LAN has its own distinct set of adapters
attached to it, with each adapter having a unique LAN address.
8. Consider a broadcast channel with N nodes and a transmission rate of R bps.
Suppose the broadcast channel uses polling for multiple access. Suppose the
amount of time from when a node completes transmission until the subsequent
node is permitted to transmit (polling delay) is d poll. Suppose that within a polling
round, a given node is allowed to transmit at most Q bits. What is the maximum
throughput of the broadcast channel?
A: The length of a polling round is
N (Q / R  d poll ) .
The number of bits transmitted in a polling round is NQ . The maximum
throughput therefore is
NQ
R

d poll R
N (Q / R  d poll )
1
Q
9. Retransmission of lost data can be done at the link, transport, and application
layers. What are the pros and cons of doing it at each layer?
A:
Link layer:
+ Link layer retransmissions avoid having to retransmit over the entire
path. Transport and application layer retransmissions must be sent over
the entire path, thus incurring higher latency and wasting bandwidth.
+ Link layer retransmissions can hide non-congestion losses from higher
layer protocols.
For example, wireless link layer retransmissions can prevent error losses
from being misinterpreted by TCP as congestion losses.
- End host to end host retransmissions are still necessary. A packet can be
lost can after being successfully received at a router (due to congestion or
errors). A route flap can send packets on a path that causes their TTL to
expire before arriving at the destination. Some routers may not implement
link layer retransmissions.
- Link layer retransmissions add some complexity and overhead.
- A packet may be retransmitted at multiple layers simultaneously. For
example, a packet may be delayed before reaching a wireless link. The link
layer protocol retransmits the packet, but the sender has already timed out
and retransmits the packet. The link layer’s retransmission is superfluous.
Transport layer:
+ Transport layer retransmissions avoid having to reimplement
retransmission functionality in applications. Many applications can use the
same transport protocol implemented in a library or in the operating
system, reducing bugs, implementation time, etc.
Application layer:
+ Some applications can tolerate loss better than the increased delay of
retransmissions. An example is an interactive audio or video application.
Download