C SC 481.20 Lecture 13: Link Access and Addressing
major resource: Computer Networking (4th Edition),
Kurose and Ross, Addison Wesley, 2008
[ previous
| schedule
| next ]
Multiple (shared) access protocols
- Most LANs are broadcast, so hosts must share the medium
- Three strategies are employed
- channel partitioning (e.g. TDM, FDM)
- random access (allow for and recover from collision)
- turn taking (e.g. token)
- for random access or turn taking, analogy to group conversation works
Channel Partitioning
- Reserve bandwidth slice or time slice
- Frequency Division Multiple Access (FDMA) – a.k.a. FDM, highlighted in course Introduction
- Time Division Multiple Access (TDMA) – a.k.a. TDM, highlighted in course Introduction
- Code Division Multiple Access (CDMA) - each node has unique code to encode bits. If codes
chosen carefully, multiple nodes can transmit simultaneously. Used in military and wireless apps
Random Access
- Station attempts transmission when packet received from network layer
- If two or more transmit at "about the same time", collision occurs
- Stations detect collision and back off a random amount of time before retransmitting
- Why random rather than fixed amount of time?
- ALOHA (pure Aloha)
- Developed at U of Hawaii for satellite transmission
- sender transmits as soon as frame constructed around packet received from network layer
- if two frame transmissions overlap, collision occurs, signal garbled
- sender listens to broadcast, can detect collision
- if collision occurs, wait awhile and retransmit
- "wait awhile" can mean wait random period
- "wait awhile" can be retransmit immediately based on fixed probability else wait
- period of vulnerability is 2 frame lengths, because any overlap of 2 frames causes collision
- peak channel utilization is 1/(2e), about 18%.
- Slotted ALOHA
- Time partitioned into fixed length time slots
- Sender transmits frame at start of next time slot (all have to synch on the time slot)
- Assume fixed frame length
- time slot length "equal to" frame length
- frames either collide completely or not at all
- period of vulnerability is one frame length.
- Peak channel utilization is 1/e, about 37%
- Carrier Sense Multiple Access (CSMA)
- handles variable-length frames
- When ready to transmit, listen to channel
- If channel idle, transmit
- If channel busy, wait random time then try again
- Does not prevent collisions! Why not?
- If collision detected, wait random time and try again
- CSMA with Collision Detection (CSMA/CD)
- If collision detected before frame transmit complete, halt transmission immediately.
- This can increase utilization
- Will cover in more detail in conjunction with Ethernet (IEEE 802.3).
Turn Taking
- Polling protocols
- Master/slave
- Master polls each slave in turn
- If slave has frame to transmit when polled, it transmits
- Collision-free
- Centralized control leaves it vulnerable
- Token-passing protocols
- Token is “potty pass” that circulates on network.
- Sender cannot transmit unless it has possession of token
- Sender must release token at end of frame (or group of frames)
- Collision-free
- Token vulnerable
- Token Ring (IEEE 802.5) is example
Addressing in the Link Layer
- Every network adapter (NIC) has a a link layer address
- Every frame must have link layer address as destination
- Link layer address commonly called MAC address
- MAC = Media Access Control
- We'll focus on Ethernet
- A host can have both IP and MAC address
- Analogy: IP as postal address (can change), MAC as SS# (does not)
- Host may need to work with network layers other than IP
- Promotes independence between layers
MAC addresses
- Every Ethernet adapter has unique 48 bit MAC address
- Assume the MAC address of an adapter is permanent
- Adapter manufacturers purchase chunks of the 48 bit address space from IEEE
- MAC address expressed in hexadecimal, 12 hex digits.
- No hierarchy or partition(e.g. network-host) in address; it is flat
- Broadcast address is FF-FF-FF-FF-FF-FF
Address Resolution Protocol (ARP)
- Necessity
- IP addresses are logical, not physical(to achieve uniformity in heterogeneous internetwork).
- Physical transmission, however, requires physical addresses. There are several methods for transforming (resolving) the IP address into the correct physical address at each hop!
- ARP is Address Resolution Protocol. It occurs in IP network interface layer.
Higher layers use IP addresses exclusively, lower layer uses physical address exclusively.
- Physical address good only within network. When IP packet crosses networks (at router), ARP must be applied by router to get hardware address for next hop (ARP must also be applied by sending host, to get the packet to its first router).
- ARP is IP protocol standard for address resolution via broadcast MAC message exchange on LAN.
Primary use is IP-ethernet resolution. Aspects are:
- Message exchange protocol: Two message types: request and response. Requester broadcasts request; node whose IP address matches request generates response directly to requester (other nodes ignore request after verifying they are not target).
- Message format: same for both ARP requests and ARP responses. Here is IP-ethernet example:
Field | Length In Bytes |
Hardware Address Type | 2 |
Protocol Address Type | 2 |
Hardware Address Length | 1 |
Protocol Address Length | 1 |
Operation (request,response) | 2 |
Sender Hardware Address | 6 |
Sender Protocol Address | 4 |
Target Hardware Address | 6 |
Target Protocol Address | 4 |
Protocol Address Length | 1 |
- Message fits in single frame. Frame-type field in frame header identifies payload as ARP message (ethernet code: hex 806).
- Sender algorithm, given IP address.
- Check internal ARP mapping table. If IP-MAC mapping found there, address is resolved.
- Else broadcast ARP request message with your protocol (IP) and hardware address, and target protocol address.
- When ARP response received, extract target hardware address. Address is resolved. Also put address pair into your ARP table.
- Receiver algorithm.
- Upon receipt of ARP request, see if Target Protocol Address matches yours. If not, ignore.
- Else prepare and transmit ARP response. Requester's hardware address was in request, so that becomes destination address for frame.
- After transmitting ARP response, store requester's protocol-hardware address pair in your ARP table
(request means that it has something to send your application layer,
so you probably will be generating a response soon and will need its address)
- IP Routing across subnets
- (recall that subnet is everything on one router interface)
- Suppose sender A and receiver B are connected via different interfaces to same router R
- IP host A prepares datagram with B's IP address
- A then uses ARP to get router R's (not B's!) MAC address
- Datagram is packed into frame and sent via link protocol to R
- R unpacks frame and its IP protocol switches datagram to output interface for B
- Link layer for the output interface uses ARP to learn B's MAC address
- Datagram is packed into frame and sent via link protocol to B
- RARP : Reverse ARP
- Protocol to handle the reverse translation: ethernet to IP.
- Host uses it to learn its own IP address. When might this be necessary?
- Useful for diskless workstations, or when booting a computer.
- Sends appropriate request frame and receives response from a station that knows.
- Has been for the most part been replaced by DHCP
[ C
SC 481 | Peter
Sanderson | Math Sciences server
| Math Sciences home page
| Otterbein ]
Last updated:
Peter Sanderson (PSanderson@otterbein.edu)