Layer 2 Technologies At layer 2 we create and transmit frames over communications channels Format of frames and layer 2 transmission protocols are dependent on technology and topology There are two major classes of networks Wide Area Networks (WAN) Local Area Networks (LAN) Each class may use a variety of topologies
Layer 2 Technologies Point-to-Point A station is directly connected to another Often used in WANs Each station may connect to all other stations (fully meshed) Or, one station may connect to only a subset of stations in a network For large networks, fully meshed networks are rare due to cabling complexity and costs May be wired or wireless
Layer 2 Technologies Shared Channels Stations share a communications channel Most often used in LANs May require some form of addressing May allow transmitting to ‘many’ or ‘all’ stations Full broadcast Multicast – group of stations How does a station get its ‘fair’ share? How does a station gain ‘permission’ to transmit? Must implement Media Access Control May also be wired or wireless
Layer 2 Topologies Topology is a connection strategy May be influenced by the medium Dictates in part the path a frame will take Many general topologies have been implemented. Both for LANs and WANs
LAN/WAN Topologies StarRing
LAN/WAN Topology BusTree
LAN/WAN Topologies Full MeshPartial Mesh
Locality of Reference Computers are most often organized in groups and locally interconnected as LANs Computers often communicate with computers that are close by or ‘local’. Examples are computers communicating with departmental servers As a result, most traffic is ‘local’ and never leaves the LAN Thus, networks are organized in groups, or LANs. LANs of any topology can then be interconnected to form larger networks
Interconnected LANs Bridge
Interconnected LANs Bridge
LAN Standards Managed by an IEEE committee – called the 802 committee Many subgroups within the 802 committee Logical Link (inactive) 802.3Ethernet and variants 802.4Token Bus 802.5Token Ring 802.6Metropolitan Area Networks (inactive) …… Wireless LANs (WiFi) (a,b,g,e,I,n) ……… Broadband wireless (WiMAX)
Network Architectures We will discuss two major layer two network architectures. LAN Ethernet and IEEE Wireless LANS and IEEE WAN Point to Point Protocols (HDLC)
Broadcast Networks Consider N users on a shared channel User transmits when a frame is ready to send Other users also transmit at will If frames from 2 users ‘overlap’ we have a collision Collisions yield damaged frames Users can ‘hear’ own transmission and therefore can detect collisions
Broadcast Networks Summary Transmit at will Listen for own frame Retransmit if collision Collisions are wasted bandwidth On average, if we have a shared broadcast channel what throughput can we expect?
Aloha Network Early broadcast network developed at University of Hawaii – 1970 Designed to interconnect 7 campuses of the U of H on 4 islands Used radio broadcasts Central Computing Center served as hub Campuses communicated through this center over shared radio frequencies
Aloha Network Computing Center Campus ACampus B 413 MHz 407 MHz Channels 9600 bps Frame 704 bits What is maximum channel utilization ?
t = time to transmit frame vulnerable t0t0 t 0 + tt 0 + 2t t t 0 + 3t
Aloha Throughput Let time to transmit a packet to be 1 unit Let S = Average number of packets per packet time 0 < S < 1 Let G = retransmissions + new packets (S) G ≥ S It is assumed that G and S follow Poisson Distribution
Aloha Throughput Based on this we can show G S.5 at G =.5 S =.5(e -1 ) = 1/(2e) S = approx.18
Aloha This is called Pure Aloha – stations transmitted at will This was later modified that required stations to only transmit at predefined times – driven by a central clock Now we need no collision for 1 packet time rather than 2 In this case the utilization improved to or S = 1/e =.36 This is called Slotted Aloha
Aloha
Carrier Sense Multiple Access We can improve on Aloha if we listen before transmitting A family of protocols called Carrier Sense Multiple Access (CSMA) has evolved All involved some form of listen before speak Variations of when to speak if no transmissions (carrier) heard
CSMA Non Persistent Listen on channel If free, transmit If busy, wait random time – repeat If collision, wait random time – repeat Persistent (also called 1-persistent) Listen on channel If free, transmit If busy, continue to listen until free – transmit If collision, wait random time - repeat
CSMA p – Persistent Compromise Listen on channel If free, transmit with probability p and delay 1 unit time with probability 1-p If channel busy wait until free, repeat
CSMA