340 likes | 566 Views
Shared Access Networks: Token ring , Wireless. Sections 2.7 & 2.8. Token Rings: Overview. Examples 16Mbps IEEE 802.5 (based on earlier 4Mbps IBM ring) 100Mbps Fiber Distributed Data Interface (FDDI). Host. Host. Host. Host. Host. Host. Relay. Relay. From Previous Host. To Next Host.
E N D
Shared Access Networks: Token ring , Wireless Sections 2.7 & 2.8
Token Rings: Overview • Examples • 16Mbps IEEE 802.5 (based on earlier 4Mbps IBM ring) • 100Mbps Fiber Distributed Data Interface (FDDI)
Host Host Host Host Host Host Relay Relay From Previous Host To Next Host From Previous Host To Next Host From Previous MSAU To Next MSAU Relay closed-host>>> bypassed Relay open >>>> host active Token Ring: Topology and Components • Relay • Single Relay • Multistation Access Units
Token Ring Media Access Control • Frames flow in one direction • a node receives frames from upstream neighbor and forwards them to downstream neighbor • ring is viewed as a single shared medium • A distributed algorithm controls when each node is allowed to transmit • all nodes see all frames • special bit pattern (token) rotates around ring • When a node with a frame to transmit sees the token • takes token off ring • inserts its frame into ring
Token Ring MAC (cont) • Each node along the way forwards frame • Destination node saves a copy and forwards frame onto next node • When frame makes its way back, sender strips its frame off ring & reinserts token • Nodes are serviced in round-robin (assuming all have frames with same priority)
Token Ring MAC: Priority Support • Token contains 3-bit priority field • Every frame is assigned a priority by its sender • frame header contains 3-bit priority and 3-bit reservation fields • Device can only seize token if its frame’s priority >= token’s priority • Priority of token changes over time due to the use of the reservation bits in frame header
Token Ring MAC Priority Support:Station X wants to send a priority n frame • X sees a data frame going past by and the reservation bits have not already been set to a value higher than n • X sets the reservation bits of the data frame to n • X records the priority of this frame PT (= current priority of token, which is now held by sending node) • Station currently holding the token elevate tokens priority to n when the station releases the token
Station X wants to send a priority n frame (cont.) • Station X seizes the token & transmits its frame (with priority n) • Station X lowers token priority to the old value, PT, when it releases the token
Token Release • Immediate release • Used in FDDI • Token follows frame immediately • Delayed release • Used in IEEE 802.5 • Token sent after frame returns to sender
Early Release Token Release Delayed Release
Token Ring 802.5 Frame Format • Start delimiter • Access control : Includes frame priority & reservation priority bits (pp.127, 128) • Frame control : a demux key that identifies the higher-layer protocol. • Addresses: 48 bits interpreted in exactly the same way as on an Ethernet • 32-bit CRC • Frame status byte: includes the A bit (set when receiver sees the frame) and C bit (set when receiver copy the frame). A & C bits used for reliable delivery (p.128)
802.5 Reliable Delivery of Frames: Use of the A and C bits • Sender sets A & C to 0 • When the receiver sees the frame, it sets the A bit • When receiver copies the frame into its adaptor it sets the C bit • If the sending station sees the frame come back with the A bit still 0, it knows that the intended recipient is not functioning or absent • If the A bit is set but not the C bit, this implies that for some reason (e.g., lack of buffer space) the destination could not accept the frame. • Thus, the frame is retransmitted later if A or C is still 0
Token Ring Maintenance : 802.5 Monitor • A monitor is elected using defined procedures when the ring is connected or on failure of current monitor (p. 129) Functions of the Monitor • Inserts a new token • when initializing ring (no token exists at t= 0) • bit error corrupts token pattern • node holding token crashes • monitor watches passing token and sets a timer (=NumStations x Token Holding Time, THT + Ring Latency); • timer expires, monitor creates a replacement token
Token Ring Maintenance (cont.) Functions of the Monitor • Drains corrupted (CRC errors or invalid formats) & orphaned frames (“parent” died)
Frame (NOT access) Control Fiber Distributed Data Interface, FDDI: Physical Properties • At most 500 stations (compared with 250 stations for 802.5 Token Ring) • Maximum 2 km between pair of stations • Network limited to total of 200 km of fiber • Dual ring ;hence the total cable connecting all stations is limited to 100 km • Used 4B/5B encoding • Standard defined for different media, including • fiber, coax and twisted pair (total distance varies)
FDDI • Dual ring configuration • Self-healing • Normal flow in green direction • Can detect and recover from one failure
Timed Token Algorithm (FDDI) • Token Holding Time (THT) • upper limit on how long a station can hold the token • 10 ms default value in 802.5 • Each station is responsible for ensuring that the transmission time for its packet will not exceed THT • Token Rotation Time (TRT) • how long it takes the token to traverse the ring • TRT<= ActiveNodes x THT + RingLatency • ActiveNodes: no. of nodes with data to transmit • RingLatency: token circulation time when no one has data to transmit • Target Token Rotation Time (TTRT) • agreed-upon upper bound on TRT
Algorithm (FDDI, cont I) • Each node measures TRT between successive tokens • if measured-TRT > TTRT: token is late so don’t send • if measured-TRT < TTRT: token is early so OK to hold token for {TTRT – (measured-TRT)} (i.e. transmit for this duration)
Algorithm (FDDI, cont II) • Two classes of traffic • A node can always send synchronous data when receiving a token • synchronous traffic (delay sensitive) : e.g. voice or video • A node can send asynchronous data only if token is early • asynchronous traffic: file transfer (application interested in throughput rather than delay) • Total synchronous data sent during one token rotation is bounded by TTRT
Algorithm (cont) • Worse case: a single rotation of token to take as long as 2xTTRT • nodes with asynchronous traffic first use up one TTRT • then the nodes with synchronous data consume another TTRT worth of time • it is possible for the measured TRT at any given node to be as much as 2 x TTRT. • Not possible to have back-to-back rotations that take 2 x TTRT • if synchronous traffic has already consumed one TTRT (in the first rotation) • then nodes with asynchronous traffic will not send any data (token late) in the second rotation • only synchronous traffic possible in the second rotation
FDDI Token Maintenance Goal: Ensure a valid token is always in circulation • All nodes monitor the ring to be sure that token has not been lost • should periodically see valid transmission (frame or token) • Maximum time gap between transmissions = ring latency + transmission time of max frame < = 2.5ms (on a maximally sized ring)
FDDI Token Maintenance (cont. I) set timer at 2.5ms • valid transmission received >>> reset timer to 2.5 ms • timer fires >>> send claim frame containing the node’s bid for the TTRT: token rotation time that the node needs so that the applications running on the node can meet their timing constraints
FDDI Maintenance (cont II) Generating a token (when lost) & agreeing on TTRT • A node can send a claim frame whenever it suspects a failure or when it first joins the network. • claim frame includes the node’s TTRT bid
FDDI Maintenance (cont III) • When a node receives “claim frame”, it updates the bid and forward • “update the bid” means changing the value of the proposed TTRT in the claim frame if it is larger than this node’s bid for TTRT • If a node’s claim frame makes it all the way around the ring: • Node’s bid was the lowest • Everyone knows the TTRT • Node inserts new token
Token Ring Shielded twisted pair 4, 16 Mbps No reliability specified Differential Manchester Priority and Reservation bits FDDI Optical Fiber 100 Mbps Reliability specified (dual ring) 4B/5B encoding Timed Token Rotation Time Differences : 802.5and FDDI
Wireless LANs: Wi-Fi • IEEE 802.11 (Wi-Fi) • Bandwidth: up to 54 Mbps (802.11a; 802.11g) • 802.11 Physical layer protocol • Spread spectrum radio • run in the 2.4-GHz frequency band of the electromagnetic spectrum
Spread Spectrum Idea • spread signal over wider frequency band than required • minimize the impact of interference from other devices • originally designed for military use • “other devices” were attempting to jam the signal
Spread Spectrum via Frequency Hopping • Frequency Hopping: • Transmit over random sequence of frequencies • Sender and receiver share… • pseudorandom number generator • Seed • Signal look like noise to a receiver that does not know pseudorandom sequence • 802.11 uses 79 1MHz-wide frequency bands
a 4-bit chipping sequence 4-bit chipping code Direct Sequence • Each bit in the frame is represented by multiple bits in the transmitted signal • For each bit, send XOR of that bit and n random bits (generated by pseudorandom number generator known to both sender the receiver) • Transmitted values, called n-bit chipping code, spread signal across a frequency band n times wider than frame would have required • 802.11 defines an 11-bit chipping code
Collisions “Avoidance”:Hidden nodes problem • A & C are hidden with respect to each other: • A and C want to communicate with B and so they each send it a frame • A and C are unaware of each other since their signals do not carry that far • two frames collide with each other at B • neither A nor C is aware of this collision
Collisions “Avoidance”:Exposed nodes problem C is exposed to B B is sending to A C is aware of this communication a mistake for C to conclude that it cannot transmit to D because it can hear B’s transmission C transmitting to D will not interfere with A’s ability to receive from B
Multiple Access with CollisionAvoidance(MACA) • Sender transmits RequestToSend (RTS) “control” frame • Receiver replies with ClearToSend (CTS) “control” frame • Neighbors… • see CTS: keep quiet ( henceAvoid Collision) • see RTS but not CTS: ok to transmit • Receiver sends ACK after successfully receiving a frame • neighbors silent until see ACK • silent from CTS until ACK • Collisions • collisions detection not supported • two or more nodes detect an idle link, try to transmit an RTS frame at the same time >> RTS frames will collide • collision is known when senders don’t receive CTS • senders wait random times before trying again • wait time of a node defined by exponential backoff
Supporting Mobility • ad hocnetwork • set of directly reachable nodes may change over time • 802.11 defines additional structure on a set of nodes • access points (AP): connected by a “distribution system” • each mobile node associates with an AP
Mobility (cont) • Scanning (selecting an AP) • node sends Probe frame • all AP’s w/in reach reply with ProbeResponse frame • node selects one AP; sends it AssociateRequest frame • AP replies with AssociationResponse frame • new AP informs old AP via the distribution system • When ? • Active scanning performed by mobile node when • joining the network • moving in the network • becomes unhappy with its current AP • Passive scanning: AP periodically sends Beacon frame • Advertises capabilities of AP (including supported transmission rates)