Computer Networks 3
Computer Networks 3
CS F303
Ashutosh Bhatia
Department of Computer Science and Information Systems
BITS Pilani Birla Institute of Technology and Science
Pilani|Dubai|Goa|Hyderabad Pilani Campus, Pilani
Data-Link Layer
• Frame-by-Frame next-hop delivery
– Frame: Block of data exchanged at link layer
• Uses services of PHY layer (which delivers bits) to
deliver frames
• Repetition code
– 0 -> 000; 1 -> 111
– m=1, k=2; n=3
– Hamming distance is 3, code rate is 1/3
• Can detect up to 2 errors and correct up to 1 error
• Error Detection
• Reliable Transfer (retransmissions)
• Error Correction
–E.g. Reed-Solomon codes, Convolution codes,
–Turbo codes
• T: 11001011000
?
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Outline
• How to interconnect nodes? Network Topology
• How to mediate access among the nodes? Media Access
Control (MAC)
– Categorize and discuss some popular MAC protocols
• Overview, merits and demerits
• Specify:
– How to detect collisions?
– How to recover from collisions?
• Disadvantages:
– High load leads to too many collisions and wastage of
resources
• Throughput S = G * Ps
– Ps: probability that a frame is successful i.e. did not suffer
collision
• Determine Ps
– Under what conditions will a frame not suffer collision?
• Which of the following protocols does better in terms of channel utilization at high loads?
– Slotted aloha
– 1 persistent
– Non persistent
– 0.5 persistent
Ans. 25
• The propogation delay is 2 * 10^3/2*10^8 = 10us. RTT = 20us.
Bits that can be sent during 20us = 200 bits = 25 bytes.
Hence we need a frame size of at least 25 bytes.
Obtaining IP Addresses
Ashutosh Bhatia
Department of Computer Science and Information Systems
BITS Pilani Birla Institute of Technology and Science
Pilani|Dubai|Goa|Hyderabad Pilani Campus, Pilani
Problem Statement
• A feature of ARP
– Host H has an entry in its ARP cache for IP address X
– It receives an ARP request from IP address X for some
address Y
– Even though H does not reply to the ARP request, it updates
its ARP cache with X’s hardware address (contained in the
ARP Req)
– “Latest” hardware address is maintained
• After detecting that the primary server has failed, the backup
server
– Issues a gratuitous ARP request, with the primary server’s IP address and
its own hardware address
– Causes all machines to update their ARP cache entries, so that the
backup’s hardware address is noted