CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 1
Computer Networks Chapter 2 Data Link Layer Issues CEN 5501C - - - PowerPoint PPT Presentation
Computer Networks Chapter 2 Data Link Layer Issues CEN 5501C - - - PowerPoint PPT Presentation
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
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 2
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 3
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 4
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 5
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 6
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 7
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 8
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 224 address block, Vendor Code (OUI) – G/L bit is 0 if global, 1 if locally managed
2nd Octet 4th Octet G/I bit (group/individual) G/L bit (global/local) OUI 3rd Octet 5th Octet 6th Octet
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 9
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 10
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 11
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 12
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 13
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 14
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 15
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 16
802.3 Issues
- CSMA/CD
– Listen before talk – Detect collisions – Binary exponential backoff
- Minimum frame length
– So all STAs detect collision – Slot time = 2τ (512 bits at 2.5km and 10Mbps)
Start Tx Start Tx Detect Collision End Tx End Tx Start Rx End Rx
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 17
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 18
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 19
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 20
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 21
Point-to-Point Links
- 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
flag address control data flag checksum HDLC format
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 22
Point-to-Point Links
- 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)
flag Addr=0xff Ctl=0x03 data flag checksum protocol PPP format
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 23
Link Reliability Issues
End-to-end Success Rate
0.2 0.4 0.6 0.8 1 1.2 1 3 5 7 9 11 13 15 17 19 Path Length (Hops) Prob(Success) P=0.001 P=0.005 P=0.01 P=0.05 P=0.1 P=0.5
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 24
Link Reliability Issues
Expected Cost per Attempt
5 10 15 20 25 1 3 5 7 9 11 13 15 17 19 Path Length (hops) E(Cost/attempt) P=0.001 P=0.005 P=0.01 P=0.05 P=0.1 P=0.5
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 25
Link Reliability Issues
Expected Number of Attempts/Success
1 2 3 4 5 6 7 8 9 1 3 5 7 9 11 13 15 17 19 Path Length (hops) E(Attempts/success) P=0.001 P=0.005 P=0.01 P=0.05 P=0.1
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 26
Link Reliability Issues
Expected Cost per Success
10 20 30 40 50 60 70 80 1 3 5 7 9 11 13 15 17 19 Path Length (hops) E(Cost/success) P=0.001 P=0.005 P=0.01 P=0.05 P=0.01
CEN 5501C - Computer Networks - Spring 2007 - UF/CISE - Newman 27
Per Hop vs. End-to-End BEC
Pkt Sent Pkt Sent Pkt Recv Pkt Recv ACK Recv ACK Recv Per Hop End-to-End