Professional Documents
Culture Documents
2 - Link Layer and Lans
2 - Link Layer and Lans
1
2. Services provided by the link layer
• framing
• addressing
• medium access or link access
• reliable delivery
• error detection and correction
2
4. Error detection and Error correction techniques
• bit level error detection and correction are implemented in link layer
• common techniques
– parity checks, checksumming methods, cyclic redundancy checks
3
• Parity checks
• The ability of a receiver to both detect and correct errors is known as forward
error correction (FEC)
4
• Cyclic redundancy check codes (Polynomial codes)
5
5. Multiple Access Links and Protocols
6
6. Channel Partitioning Protocols
7
7. Random access protocols
8. Slotted Aloha
• Assumptions
– all frames consists of exactly L bits
– time is divided into slots of size L/R bits
– nodes start to transmit only at the beginning of a slot
– all the nodes are synchronized
– if two or more nodes transmit in a slot, all transmissions fail and the nodes
detect the collision event
• Performance
– advantages: access to complete channel and lack of coordinator
– disadvantages: poor efficiency (ps = 1/e is the maximum efficiency of the
protocol)
8
9. Pure Aloha
• Assumptions
– unslotted, and fully decentralized medium access protocol
– transmit the frame as soon as the frame arrives
– upon collision, retransmit the frame with probability p with a frame trans-
mission waiting time
• Performance
– advantages: immediate access to channel and lack of synchronization
– disadvantages: poor efficiency compared to slotted Aloha protocol
9
10. Carrier Sense Multiple Access (CSMA)
10
11. Taking-turns protocol
11
12. Switched Local Area Networks
• link layer supports frame delivery, reliable communication, security, medium ac-
cess, etc
• switches operate at link layer
12
13. MAC addresses or LAN address or physical address
13
14. Ethernet
14
• Ethernet technologies
– 10BASE-T, 10BASE-2, 100BASE-T, 1000BASE-LX, 10GBASE-T, 40GBASE-
T, etc
– Ethernet specifices the link layer as well as the physical layer (IEEE 802.3
standards)
– physical medium include coaxial cable, copper wire and fiber
– Ethernet was originally over a broadcast medium engaging CSMA/CD
– today’s Ethernet is switched, where nodes are connected to a switch in point-
to-point manner
– distances ranges from 100 meters to 500 meters
– backward compatibility is an important feature leading to the success of
Ethernet (MAC, frame format and handshakes)
– hubs had broadcast channels with CSMA/CD; switches are full duplex point-
to-point links not needing CSMA/CD;
15
• Link layer switches
– switches receive incoming link-layer frames and forwards them onto outgoing
links
– switches are transparent to hosts and routers
– switches use buffers to manage congestion in the LAN
– Functionalities
∗ forwarding
∗ filtering
∗ frames are queued at outgoing link interfaces
∗ actively maintains topology of switched network (to a spanning tree)
∗ functionalities enabled with a switch table and switch architecture
16
• Virtual LANs
– VLAN support permits multiple virtual LANs over a single physical LAN
infrastructure
– VLAN support enables efficient traffic isolation and effective separation of
user groups
17
– VLAN tag (802.1Q frame) and trunking functionality allows extension of
VLAN to more than one switch
18
1 Exercises
1. Why does collision occur in CSMA, if all nodes perform carrier sensing before trans-
mission? (R8)
2. Consider the generator, G = 1001, and suppose that D has the value 11000111010.
(a) What is the value of R? (P5)
(b) Why can it detect any single bit error in data D? (P7)
3. In Section 6.3, we provided an outline of the derivation of the efficiency of slotted
ALOHA. In this problem we’ll complete the derivation. (P8)
(a) Recall that when there are N active nodes, the efficiency of slotted ALOHA is
N p(1 − p)N −1 . Find the value of p that maximizes this expression.
(b) Using the value of p found in (a), find the efficiency of slotted ALOHA by letting
N approach infinity. Hint: (1 − 1/N )N approaches 1/e as N approaches infinity.
4. Consider two nodes, A and B, that use the slotted ALOHA protocol to con- tend for
a channel. Suppose node A has more data to transmit than node B, and node A’s
retransmission probability pA is greater than node B’s retrans- mission probability,
pB. (P10)
(a) Provide a formula for node A’s average throughput. What is the total efficiency
of the protocol with these two nodes?
(b) If pA = 2pB, is node A’s average throughput twice as large as that of node B?
Why or why not? If not, how can you choose pA and pB to make that happen?
(c) In general, suppose there are N nodes, among which node A has retrans- mission
probability 2p and all other nodes have retransmission probability p. Provide
expressions to compute the average throughputs of node A and of any other
node.
5. Suppose four active nodes—nodes A, B, C and D—are competing for access to a
channel using slotted ALOHA. Assume each node has an infinite number of packets
to send. Each node attempts to transmit in each slot with probability p. The first
slot is numbered slot 1, the second slot is numbered slot 2, and so on. (P11)
(a) What is the probability that node A succeeds for the first time in slot 4?
(b) What is the probability that some node (either A, B, C or D) succeeds in slot 5?
(c) What is the probability that the first success occurs in slot 4?
(d) What is the efficiency of this four-node system?
6. Consider a broadcast channel with N nodes and a transmission rate of R bps. Suppose
the broadcast channel uses polling (with an additional polling node) for multiple
access. Suppose the amount of time from when a node completes transmission until
the subsequent node is permitted to transmit (that is, the polling delay) is dpoll.
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? (P13)
19
7. Recall that with the CSMA/CD protocol, the network adapter waits K 512 bit times
after a collision, where K is drawn randomly. For K = 115, how long does the adapter
wait until returning to Step 2 for: (P17)
8. In this problem, we explore the use of small packets for Voice-over-IP appli- cations.
One of the drawbacks of a small packet size is that a large fraction of link bandwidth
is consumed by overhead bytes. To this end, suppose that the packet consists of P
bytes and 5 bytes of header. (P27)
(a) Consider sending a digitally encoded voice source directly. Suppose the source
is encoded at a constant rate of 128 kbps. Assume each packet is entirely filled
before the source sends the packet into the network. The time required to fill
a packet is the packetization delay. In terms of L, determine the packetization
delay in milliseconds.
(b) Packetization delays greater than 20 msec can cause a noticeable and unpleasant
echo. Determine the packetization delay for L = 1,500 bytes (roughly corre-
sponding to a maximum-sized Ethernet packet) and for L = 50 (corresponding
to an ATM packet).
(c) Calculate the store-and-forward delay at a single switch for a link rate of R =
622 Mbps for L = 1,500 bytes, and for L = 50 bytes.
(d) Comment on the advantages of using a small packet size.
2 Reference
1. Chapter 6 (The Link Layer and LANs) of Kurose and Ross, Computer networking: A
top-down approach
20