You are on page 1of 4

COSC 328: Lab #8 - Link Layer

July 31st , 2023

Introduction
In this lab, we will do some practice questions on the Link Layer and LANs (layer 2). This lab is intended
to be completed in one lab period.

i
Info: All work must be shown/documented for marks. This lab is due in hard copy and is to be
submitted before the start of class on Tuesday, August 8th , 2023.

!
Warm-up Problems: The authors of the text have provided interactive problems to help you with
understanding the concepts presented in chapter 6. Please take the time to review these problems
before attempting the questions as they will help. These problems are for your own learning and
practice (no marks) but will allow you to review solutions.
(a) Link layer addressing and forwarding
https://gaia.cs.umass.edu/kurose_ross/interactive/link_layer_addressing.php
(b) Two dimensional parity:
https://gaia.cs.umass.edu/kurose_ross/interactive/2d_parity.php

(c) Cyclic Redundancy Check (CRC)


https://gaia.cs.umass.edu/kurose_ross/interactive/CRC.php
(d) Switch Basics
https://gaia.cs.umass.edu/kurose_ross/interactive/learning_switch_basic.php

(e) Random Access Protocols (Aloha)


https://gaia.cs.umass.edu/kurose_ross/interactive/aloha.php
(f) Collisions
https://gaia.cs.umass.edu/kurose_ross/interactive/collisions.php

1 TCP True or False (6 marks)


Answer the following true or false questions on Layer 2.

1
Question 1
(a) The size of the MAC address space is larger than the size of the IPv4 address space.

(b) Assume A, B, and C are all hosts on the same broadcast LAN (ie connected via a hub). A sends a
link layer frame to C. B’s link layer adapter processes the frame from A.
(c) A simpler frame structure allows Gigabit Ethernet to be faster than 10BaseT and 100BaseT Eth-
ernet.
(d) Consider a computer network consisting of several interconnected 10BaseT hubs, but which does
not include any bridges or routers. This network has only one collision domain.
(e) Consider a twisted-pair Ethernet in which all nodes are 50 meters from the hub. The time it
takes for a bit to propagate from hub to node for a 10BaseT Ethernet is ten times longer then for
a 100BaseT Ethernet.

(f) The first 24 bits of the MAC address is known as the prefix and a specific value of the prefix is
assigned to a specific manufacturer.

2 General L2 Knowledge (6 marks)


Complete the following questions from Chapter 6.

Question 2
(a) R. 6 (p. 508) (2 marks)
(b) R. 11 (p. 508) (2 marks)
(c) P. 17 (p. 512) (2 marks)

3 ARP and Hubs and Switches (12 marks)


Consider a network topology which consists of 4 hosts connected to either a hub or a switch. Assume all
ARP tables are empty for each question. Detail all steps (and how many frames are sent for each step) for
full marks.

2
Question 3
(a) If a hub connects the four hosts, how many frames are sent when host A wants to send an IP
packet to host B. Assume A knows B’s IP address. If the same frame is sent over multiple links,
count the frame multiple times. For example, if a host sends a message through the hub (that
has 3 additional hosts connected), the number of frames send is 1 (A → hub) + 3 (as the hub
repeats to all other interfaces (p. 475 in text for clarification)). Thus this count that as 4 frames.
Provide the total number of frames in addition to what is sent for each step. (3 Marks)
(b) Answer the same question assuming a switch is connecting the hosts. Provide the total number
of frames in addition to what is sent for each step. (3 marks)
(c) Assume A Host E connects to the network hub and requests an IP address via DHCP (assume that
a DHCP server is available in the subnet). How many frames are sent before E has its IP address?
Assume we are using a hub. You will need to review the steps of DHCP from ch. 5 (L3). Detail
each set for DHCP in terms of what is sent. (4 marks)

(d) Assume E now has its IP address and wants to send an IP datagram to host B. If the hosts are
connected using a hub, how many frames are sent? (1 mark)
(e) Answer the question above assuming that the hosts are connected with a switch and the switch
has previously seen and remember the MAC address for B (and the link that it is on). (1 mark)

3
4 Ethernet (10 marks)

Question 4
(a) In CSMA/CD after the 6th collision, what is the probability that a node chooses K = 5 (recall
how K grows for CSMA/CD after each collision p.463)? What is the delay in milliseconds for a
100 Mbps LAN for K=5? (2 marks)
(b) Consider a 100 Mbps 100BaseT Ethernet connection. What should the maximum distance be-
tween node and hub be to have an efficiency of 0.50? Assume a frame length of 64 bytes and a
propagation speed of 2 × 108 m/s. (2 marks)

(c) Assume A and B are on a 100 Mbps LAN and the propagation delay between them is 400 bit
times. Assume A starts transmitting a packet and before it is finished B starts transmitting a
packet. Can A finish transmitting before it detects a collision with B? Assume minimum sized
frame is 512 bit times. Support your answer with calculations. (2 marks)
(d) Assume A and B are on a 100 Mbps LAN and the propagation delay between them is 400 bit
times. Assume A and B transmit at the same time, both detect a collision, send a jam signal, and
then backoff by selecting different values of K. Will they conflict again? Assume they are the only
senders and there is just one frame. Support your answer with calculations. (2 marks)
(e) With CSMA/CD, if a collision is heard, both of the senders stop sending data but they will send
a jam signal over the Ethernet. This jam signal indicates to all other devices on the Ethernet
segment that there has been a collision, and they should not send data onto the wire with a
second indication of a collision is the noise created by the collision itself. After sending the jam
signal, each of the senders will wait a random amount of time before beginning the entire process
over. The random time helps to ensure that the two devices don’t transmit simultaneously again.
Consider the case above when both A and B transmit at the same time (assume to be time =
0), detect a collision, and send a 48-bit jam signal. At what time in milliseconds do both nodes
detect the collision, finish sending the jamming signal, and receive the last bit of the jamming
signal. What is the time the channel becomes an idle channel? (2 marks - 0.5 marks each)

!
Submission Details: This lab is due in hard copy, at the start of class on Tuesday, August 8th , 2023.
Late assignments will not be accepted.

You might also like