Computer Networks Chapter 2 – Data Link Layer Issues CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 1
LAN Properties • Shared medium • High data rate • Low delay • Low error rate • Native broadcast support • Limited physical extent (a few kms) • Limited number of stations (100’s) • STAs are peers • Local management (not under PTT regulation) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 2
Medium Access • Access allocation so that – One STA at a time accesses medium – Each STA gets a fair share – Delays are reasonable – Overhead and waste are minimized • Approaches – Tokens – Contention CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 3
Token-based Approaches • Token Ring – STAs linked (simplex) to two neighbors – Token circulates physical ring – Add STA by insertion into ring • Token Bus – STAs attached to bus – Token circulates logical ring – Add STA to bus and insert into logical ring CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 4
Contention Approaches • ALOHA – Can’t sense medium, so just talk! • CSMA – Listen before talk • CSMA/CD – Add collision detection (need sensitive PCS) • CSMA/CA – Use collision avoidance (when VCS used) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 5
IEEE 802 • 802.1 – common issues – Addressing, management, bridging, security • 802.2 – LLC – Type 1 – best effort / Type 2 - reliable • 802.3 – CSMA/CD LAN – From Xerox Ethernet • 802.4 – Token Bus • 802.5 – Token Ring • 802.11 – Wireless LAN • 802.16 – Wimax • Note – FDDI standardized by ANSI CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 6
Names, Addresses, Routes • Name – what – Location-independent identifier – May be human-friendly or not • Address – where – Independent of source location, but will change if destination moves • Route – how to get there – Depends on both source and destination CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 7
LAN Addresses • LANs are broadcast medium – need both – Source address (for return messages) – Destination address (to filter) • IEEE 802 addresses – 16 and 48 bits (also 60 for 802.6 DQDB) • 48 bit addresses managed by IEEE – Pay to get 2 24 address block, Vendor Code (OUI) – G/L bit is 0 if global, 1 if locally managed OUI 2 nd Octet 3 rd Octet 4 th Octet 5 th Octet 6 th Octet 0 G/L bit G/I bit (group/individual) (global/local) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 8
Multicast Addresses • Service Discovery – Solicitation (client mcast to Z-Servers address) – Advertisement (Z-Servers mcast to Z-Client addr) • Why Multicast (group) addresses? – Reduce interrupt handling by hosts – Hardware filter • Why G/I bit? – Allow filtering by hash buckets in HW – SW filters all hits in relevant hash buckets CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 9
Broadcast • The all 1’s address (0xffffffffffff) is bcast • Means that all STAs must receive • Really, though, only those implementing the protocol used in the broadcast packet have to… • Broadcast address interrupts everyone anyway CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 10
Multiplexing Field • Multiple higher layer protocols • Format and data alone cannot distinguish • Multiplexing field selects which one – Protocol type in Ethernet – DSAP and SSAP in IEEE 802 • Service Access Point (SAP) Structure – G/L and G/I bits also, hence 6 bits – All 1’s = all SAPs (!!!) – Others assigned by IEEE – too few! • SNAP (Subnetwork Access Protocol) – When DSAP = SSAP = 0xaa – extra protocol type field (5 octets) – 3 OUI octets, 3 vendor-assigned octets CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 11
Bit Order • Bit order is order in which bits are put onto the medium • Not standard ( � ) – LSB first canonical and for most LANs – MSB first for 802.5, FDDI • Bridges must convert – Shuffle bit order within octets • Impact on ARP and higher layer protocols CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 12
LLC • 802.2 LLC has two significant types – Type 1 – datagrams (best effort) – Type 2 – reliable (connection oriented) • Type 1 Control – 1 octet – UI – unnumbered info (datagram) – XID – Exchange ID (command/response) • ID of transmitter • LLC types supported – Test – (Cmd/Rsp) – Rsp echo data in Cmd CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 13
LLC Type 2 • Control is 1 or 2 octets, per type • 2-octet control fields contain 7-bit seq #s – I = Information (data) – SN plus ACK SN – RR = Receive Ready (ACK) – ACK SN – RNR = Rcv Not Ready (Busy) – ACK SN – REJ = Reject – ACK SN CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 14
LLC Type 2 • Control is 1 or 2 octets, per type • 1-octet control field types – SABME = Set Asynchronous Balanced Mode Extended (start connection) – DISC = Disconnect (end connection) – DM = Disconnected Mode (confirm DISC) – FRMR = Frame Reject (receipt of invalid pkt) – UA = Unnumbered ACK (for DISC/SABME) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 15
802.3 Issues • CSMA/CD Start Tx – Listen before talk End Tx Start Tx – Detect collisions Start Rx Detect Collision – Binary exponential backoff End Tx • Minimum frame length End Rx – So all STAs detect collision – Slot time = 2 τ (512 bits at 2.5km and 10Mbps) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 16
802.5 Issues • Each packet traverses every station in physical ring • Each STA has transceiver buffer with special HW to recognize token, addresses • Two bits at end of each frame for ACK: – A bit (address recognized) – C bit (frame copied) • Each STA may modify bits • Sender sees A/C bits when frame returns CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 17
802.5 Issues • A/C Bits on return: – A=0: Address not recognized (give up) – A=1, C=0: Address recognized, but STA busy (try again) – A=1, C=1: Address recognized and frame copied (success!) • What does a bridge do with these? – Clear both? – Leave unmodified – Set A and C if bridge forwards – Clear A and set C if bridge forwards • A/C used for other purposes: – Ring order (bcast frame with A bit clear indicates predecessor) • Only 31 functional addresses for multicast – Mapping – Oversubscription CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 18
Packet Bursts • Station processing rate may be slower than the LAN data rate • While OK on average, packets may be sent in a burst • Early packets received, later ones lost • Problem if naïve protocol retransmits whole burst every time CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 19
Why Bridges? • Limit number of stations in LAN – Packet lengths – Delay • Size limitations – 802.3 collision detection • Traffic – Capacity is shared • Simple, high performance, allow limited location transparency (keep IP address) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 20
Point-to-Point Links flag address control data checksum flag HDLC format • Flag – Special pattern to delimit frames • In HDLC, 01111110 • In DDCMP, DLE-SOF & DLE-EOF – Bit-stuffing/character-stuffing for data transparency • In HDLC, 011111… -> 0111110… on Transmit • In DDCMP, … DLE … -> … DLE DLE … on Transmit • Addressing – Needed if multiple stations on medium – Traditionally assume master/slave • Control – Like LLC Type 2 • Checksum – 16 bit CRC CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 21
Point-to-Point Links flag Addr=0xff Ctl=0x03 protocol data checksum flag PPP format • Multiplexing – Protocol field in PPP (16 bits – see RFC 1700) • Service – If links not reliable, need reliable transfer per hop (HDLC, DDCMP, LLC Type 1) • What is probability of success for k hops with FER P? • What is cost per attempt for k hops with FER P? • What is overall cost for success for k hops with FER P? – If links reliable, then datagram service OK (PPP, LLC Type 2) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 22
Link Reliability Issues End-to-end Success Rate 1.2 1 P=0.001 Prob(Success) 0.8 P=0.005 P=0.01 0.6 P=0.05 0.4 P=0.1 P=0.5 0.2 0 1 3 5 7 9 11 13 15 17 19 Path Length (Hops) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 23
Link Reliability Issues Expected Cost per Attempt 25 20 P=0.001 E(Cost/attempt) P=0.005 15 P=0.01 P=0.05 10 P=0.1 P=0.5 5 0 1 3 5 7 9 11 13 15 17 19 Path Length (hops) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 24
Link Reliability Issues Expected Number of Attempts/Success 9 8 E(Attempts/success) 7 P=0.001 6 P=0.005 5 P=0.01 4 P=0.05 3 P=0.1 2 1 0 1 3 5 7 9 11 13 15 17 19 Path Length (hops) CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 25
Recommend
More recommend