Direct Link Networks. Hardware building blocks Nodes –like desktop workstations, PC’s, switches, routers, and so on Links –physical media such as twisted.

Slides:



Advertisements
Similar presentations
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Advertisements

Lecture 3, 1Spring 2003, COM1337/3501CCN: Direct Link Networks Direct Link Networks Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie,
Chapter 2: Direct Link Networks (continued) Slide Set 5.
Reliability & Channel Coding
Spring 2002CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
CSCI 4550/8556 Computer Networks Comer, Chapter 7: Packets, Frames, And Error Detection.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Fundamentals of Computer Networks ECE 478/578 Lecture #3: Encoding and Framing Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
The Data Link Layer Chapter 3. Position of the data-link layer.
EE 122: Error detection and reliable transmission Ion Stoica September 16, 2002.
1 Computer Networks Local Area Networks. 2 A LAN is a network: –provides Connectivity of computers, mainframes, storage devices, etc. –spans limited geographical.
1 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Mediation Direct Link Networks.
Spring 2002CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
Spring 2004 EE4272 Direct Link Networks (I) Hardware Building Blocks (nodes & links) 5 Issues before Exchanging Packets  Encoding  Framing  Error Detection.
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
Spring 2003CS 4611 Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
CS 164: Slide Set 3: Chapter 2 Direct Link Networks.
Spring 2003CS 4611 Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)
Data Link Layer IS250 Spring 2010
18-Aug-154/598N: Computer Networks Overview Direct link networks –Error detection - Section 2.4 –Reliable transmission - Section 2.5.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 5 - Encoding and Data Link Basics.
Packet Transmission (Part III) Local Area Networks (LANs)
CSE331: Introduction to Networks and Security Lecture 3 Fall 2002.
Network Technologies Chapter 2. Approaches to Network Communication Connection-Oriented –Circuit-switched –A dedicated connection (circuit) is formed.
14-Oct-15Computer Networks1 Reliable Transmission.
CSS CSS432 Point-to-Point Links Textbook Ch2.1.2 – 2.5 Professor: Munehiro Fukuda.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Advanced Computer Networks Chapter 2: Direct Link Networks.
Lecture 6: Framing and Error Detection-Data Link Layer Functions
27-Oct-15Computer Networks1 Outline Chapter 2: Direct Link Networks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 Other LANs Token Rings Wireless –Wireless LAN (802.11, WiFi) –Broadband Wireless (802.16) –Bluetooth.
Fall 2000Datacom 11 Outline Hardware Building Blocks Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links.
1 CHAPTER 2 HARDWARE BUILDING BLOCK ENCODING FRAMING ERROR DETECTION.
Link Layer Dr. Mozafar Bag-Mohammadi Ilam University.
Computer Networks Lecture 2: Data Link Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University Revised Autumn 2015 by S.
Spring 2001CS 5851 Outline Building Blocks Shannon’s Theorem Encoding 11. Physical Layer.
Mozafar Bag-Mohammadi University of Ilam
9-Jan-164/598N: Computer Networks Overview Performance metrics - Section 1.5 Direct link networks –Hardware building blocks - Section 2.1 –Encoding - Section.
Transport Layer: Sliding Window Reliability
1 Ethernet History –developed by Xerox PARC in mid-1970s –roots in Aloha packet-radio network –standardized by Xerox, DEC, and Intel in 1978 –similar to.
1 Shared Access Networks: Token ring, Wireless Sections 2.7 & 2.8.
1 Hardware Building Blocks Five Issues –Encoding –Framing –Error Detection –Reliable delivery –Access Media Direct Link Networks.
1 Link Layer 3 Mozafar Bag-Mohammadi University of Ilam.
1 Direct Link Networks: Reliable Transmission Sections 2.5.
Univ. of TehranIntroduction to Computer Network1 An Introduction to Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr.
COMPUTER NETWORKS Lecture-8 Husnain Sherazi. Review Lecture 7  Shared Communication Channel  Locality of Reference Principle  LAN Topologies – Star.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
1 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
CS 457 – Lecture 3 Link Layer Protocols Fall 2011.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
CS380 Int. to Comp. Networks Data Link Networks - Part II1 Reliable Transmission How to fix corrupted frames. –Error correcting codes too expensive –Should.
Reliable Transmission
Getting Connected (Chapter 2 Part 1)
Data Link Networks Hardware Building Blocks Nodes & Links CS380
The University of Adelaide, School of Computer Science
Getting Connected (Chapter 2 Part 3)
Advanced Computer Networks
Medium Access Control (MAC) Sub-layer
Getting Connected (Chapter 2 Part 3)
Reliable transmission
Point-to-Point Links Outline Encoding Framing Error Detection
Fundamentals of Computer Networks
Hardware Building Blocks
Mozafar Bag-Mohammadi University of Ilam
Dr. Mozafar Bag-Mohammadi Ilam University
Error detection: Outline
EECS 122: EE122: Error Detection and Reliable Transmission
Presentation transcript:

Direct Link Networks

Hardware building blocks Nodes –like desktop workstations, PC’s, switches, routers, and so on Links –physical media such as twisted pair wire, coax cable, optical fiber, space, and so on.

Nodes Connects to network via a network adaptor Fast processor, slow and finite memory

Links Physical Media Conducted media –twisted pair wire –coax cable –optical fiber Radiated media –radio waves –microwaves –infrared beams

Electromagnetic Spectrum

Typical Link Bandwidths Sometimes you install your own Sometimes leased from the phone company

Terminology DS1 stands for data signaling 1, also called T-1 STS-1: STS stands for synchronous transport signal POTS: Plain old telephone system ISDN: Integrated digital service network DSL: Digital subscriber line CATV: Cable TV

Last-Mile Links Connecting home PC’s or networks to Internet

ADSL Service Service is provided over the existing telephone line (18,000-9,000 feet) 1.554─8.448 Mbps 16─640 Kbps Local loop Central office Subscriber premises

VDSL Service Supports very high data rate STS-N over fiber VDSL at ─55.2 Mbps over 1000 ─4500 feet of copper Central office Subscriber premises Neighbourhood optical network unit

Wireless Links Well tested technology Use radio waves and microwaves Rapidly growing Supported with satellite constellations to cover the entire earth AMPS based on analog technology is giving way to digital cellular PCS and GSM AMPS – Advanced Mobile Phone System PCS – Personal Communication Services GSM – Global System for Mobile Communication

Shannon’s Theorem Can be used to determine the data rate at which a modem can be expected to transmit binary data. It is given by the formula C = Blog 2 (1 + S/N) where C is the achievable channel capacity, B is the bandwidth of the line, S is the average signal power and N is the average noise power. The signal-to-noise ratio is usually expressed in decibels, related as follows: db = 10 ×log 10 (S/N)

Outline Encoding Framing Error Detection Sliding Window Algorithm Point-to-Point Links

Questions How bits can be transmitted from one node to the other? Who transmits bits and in which form? Note: The network adaptor contains a signaling component that actually encodes bits into signals at the sending node and decodes signals into bits at the receiving node.

Encoding

Signals propagate over a physical medium –modulate electromagnetic waves –e.g., vary voltage Signals travel over a link between two signalling components, and bits flow between network adaptors

Encoding (contd..) Encode binary data onto signals –e.g., 0 as low signal and 1 as high signal –known as Non-Return to zero (NRZ)

Problem: Consecutive 1s or 0s The problem of consecutive 1s or 0s leads to a situation called baseline wander Receiver keeps an average of the signal When signal is lower than average it is treated as a 0, otherwise treated as a 1 Unable to recover the clock (Clock recovery problem)

Alternative Encodings Non-return to Zero Inverted (NRZI) –make a transition from current signal to encode a one; stay at current signal to encode a zero –solves the problem of consecutive ones Manchester –transmit XOR of the NRZ encoded data and the clock –only 50% efficient. (bit rate is half the baud rate) –0 is encoded as a low-to-high transition and 1 encoded as a high-to-low transition

Alternative Encodings (contd..) 4B/5B (Refer to Table 2.4 4B/5B encoding) –every 4 bits of data encoded in a 5-bit code –5-bit codes selected to have no more than one leading 0 and no more than two trailing 0s –thus, never get more than three consecutive 0s –resulting 5-bit codes are transmitted using NRZI –achieves 80% efficiency

Encodings (contd..)

Framing

A frame is a sequence of bits Exchanged between adaptors Break sequence of bits into a frame Typically implemented by network adaptor

Question How does the receiving network adaptor know where a frame begins and ends?

Approaches Sentinel-based, bit-oriented –delineate frame with special pattern: –e.g., HDLC, SDLC, PPP –problem: special pattern appears in the payload –solution: bit stuffing sender: insert 0 after five consecutive 1s receiver: delete 0 that follows five consecutive 1s

Approaches (contd..) Sentinel approach, byte oriented –BISYNC –Problem: ETX character might appear in the data portion of the frame –Solution: Escape the ETX character with a DLE character in BISYNC; escape the DLE character with a DLE character. –Control characters DLE - Data Link Escape character SOH - Start of Header character SYN - Synchronization character ETX - End of Text character STX - Start of Text character

Terminology HDLC - High-Level Data Link Control protocol SDLC - Synchronous Data Link Control protocol DDCMP - Digital Data Communication Message Protocol BISYNC - Binary Synchronous Communication PPP - Point-to-Point Protocol

Approaches (contd..) Counter-based –include payload length in header –e.g., DDCMP –problem: count field corrupted –solution: catch when CRC fails –CRC stands for Cyclic Redundancy Check

HDLC HDLC denotes both the beginning and end of a frame with the distinguished bit sequence The sender inserts a 0 before the transmitting the next bit if it sees five consecutive 1s in the body of the message On the receiver side, should five consecutive 1s arrive, the receiver makes its decision based on the next bit it sees. If the next bit is a 0, it must have been stuffed, and the receiver removes it. If the next bit is a 1, then two things are possible, if it sees a 0, then it is the end of frame marker, if it sees a 1, then there must have been an error and the whole frame is discarded

Approaches (contd..) Clock-based –each frame is 125  s long –e.g., SONET: Synchronous Optical Network –STS-n (STS-1 = Mbps)

Approaches (contd..) Each STS-1 frame has nine rows Each row contains 90 bytes, the first 3 bytes of each are overhead The first two bytes of the frame contain a special bit pattern that enables the receiver to determine where the frame begins Receiver looks for the special bit pattern at every 810 bytes, since each frame is 9 × 90 = 810 bytes long. STS-48: 48 × = Mbps

Error Detection

Bits can change on their way to destination mainly due to noise Known as errors How can you detect whether a packet is in error or not? Sender calculates some code or checksum on the content of a packet and includes it in the packet Receiver makes use of the code or checksum to verify the integrity of the packet

Two-Dimensional Parity Add one extra bit to a 7-bit code to balance the number of 1s in the byte to either odd or even count. Add a bit position across each of the bytes contained the frame, which results in an extra parity byte.

Internet Checksum Algorithm Not used at the link level Used at the transport level for an end-to-end protocol Basic idea –Consider data as a sequence of 16-bit integers –Add them together using 16-bit ones complement arithmetic –Finally take the ones complement of the result to obtain the checksum –Transmit data and checksum together –Receiver performs the same calculation on the received data and compares the result with the received checksum

Internet Checksum Algorithm View message as a sequence of 16-bit integers; sum using 16-bit ones-complement arithmetic; take ones-complement of the result. u_short cksum(u_short *buf, int count) { register u_long sum = 0; while (count--) { sum += *buf++; if (sum & 0xFFFF0000) { /* carry occurred, so wrap around */ sum &= 0xFFFF; sum++; } return ~(sum & 0xFFFF); }

Comments on Internet Checksum Works well for a few redundant bits in a packet (only 16 bits) Not as good as CRC for error detection Simple Can be implemented easily in software Provides the last line of defense in an end-to-end protocol

Cyclic Redundancy Check (CRC) Add k bits of redundant data to an n-bit message –want k << n –e.g., k = 32 and n = 12,000 (1500 bytes) Represent n-bit message as n-1 degree polynomial –e.g., MSG= as M(x) = x 7 + x 4 + x 3 + x 1 Let k be the degree of some divisor polynomial –e.g., C(x) = x 3 + x –bit pattern is 1101

CRC (contd..) Transmit polynomial P(x) (MSG and k bits) that is evenly divisible by C(x) –shift left k bits, i.e., M(x)x k = T(x) –subtract remainder of T(x) / C(x) from T(x) Note: arithmetic is done on modulo 2 basis Receiver polynomial P(x) + E(x) E(x) = 0 implies no errors Divide (P(x) + E(x)) by C(x); remainder zero if: –E(x) was zero (no error), or –E(x) is exactly divisible by C(x)

Sender –Multiply M(x) by x k ; for our example, we get x 10 + x 7 + x 6 + x 4 ( ) –Divide result by C(x) (1101); Remainder is 101 –Send = , since this must be exactly divisible by C(x) CRC (contd..)

Receiver –Receives the bit-stream (in case of no error) –Divides by 1101 –Checks whether the remainder is 000 –Declares the frame is in error if remainder is not 000 CRC (contd..)

Selecting C(x) All single-bit errors, as long as the x k and x 0 terms have non-zero coefficients. All double-bit errors, as long as C(x) contains a factor with at least three terms Any odd number of errors, as long as C(x) contains the factor (x + 1) Any ‘burst’ error (i.e., sequence of consecutive error bits) for which the length of the burst is less than k bits. Most burst errors of larger than k bits can also be detected

Common polynomials for C(x) CRC CRC-8 CRC-10 CRC-12 CRC-16 CRC-CCITT CRC-32 C(x) x 8 +x 2 +x 1 +1 x 10 +x 9 +x 5 +x 4 +x 1 +1 x 12 +x 11 +x 3 +x 2 +x 1 +1 x 16 +x 15 +x 2 +1 x 16 +x 12 +x 5 +1 x 32 +x 26 +x 23 +x 22 +x 16 +x 12 +x 11 +x 10 +x 8 +x 7 +x 5 +x 4 +x 2 +x+1

Comments on CRC Ethernet and networks use CRC-32 HDLC uses CRC-CCITT ATM uses CRC-8, CRC-10, and CRC-32 Easily implemented in hardware using a shift register and XOR gates

Reliable Transmission

Problem How can we achieve reliability in data communications over unreliable links that can introduce random errors? Answer: –Use some combination of two mechanisms: acknowledgements (ACK) and timeouts –Known as automatic repeat request (ARQ)

Acknowledgements & Timeouts Cases: a) ACK is received before timeout b) Frame is lost c) ACK is lost d) Timeout fires too soon

Stop-and-Wait The simplest ARQ scheme Sender –Transmit a frame –Wait for ACK before transmitting the next frame –If ACK arrives on time, send the next frame; otherwise send the original frame Receiver –Check the frame received –If no error, send ACK; otherwise discard the frame

Stop-and-Wait (contd..) Problem: –Retransmission of frames can cause duplication at the receiver. Solution – Frame Sequence numbers –Sender: Include a sequence number for each frame transmitted –Receiver: Check the sequence number field for possible duplication 1-bit sequence number field is needed for Stop- and-Wait protocol.

Stop-and-Wait (contd..) Problem: keeping the pipe full Example –1.5Mbps link x 45ms RTT = 67.5Kb (8KB) –Implies a max sending rate of: (1KB /45ms) –1KB frames implies 1/8th link utilization SenderReceiver

Sliding Window Allow multiple outstanding (un-ACKed) frames Upper bound on un-ACKed frames, called window

SW: Sender Assign sequence number to each frame ( SeqNum ) Maintain three state variables: –send window size ( SWS ), number of frames –SeqNum of last acknowledgment received ( LAR) –SeqNum of last frame sent ( LFS ) Maintain invariant: LFS - LAR <= SWS Advance LAR when ACK arrives Buffer up to SWS frames < SWS LARLFS ■ ■ ■ ─

SW: Receiver Maintain three state variables –receive window size ( RWS ), number of frames –largest acceptable ( SeqNum ) frame ( LAF ) –SeqNum of last frame received ( LFR ) Maintain invariant: LAF - LFR <= RWS Frame with some SeqNum arrives: –if LFR < SeqNum < = LAF accept –if SeqNum LAF discarded Send cumulative ACKs RWS LFRLAF ■ ■ ■ < ─

Cumulative ACK Receiver does not send an ACK for every frame it receives, instead it sends an ACK for the last frame, provided that it has received all other preceding frames including the last one correctly Upon receiving the ACK, the sender knows that the receiver has received all frames up to the last sequence numbered one correctly and hence advances its window

Sequence Number Space Sequence numbers wrap around, because SeqNum field is finite Problem: Different frames but with the same sequence number can arrive and confuse the receiver (from two consecutive sequence sets), called frame incarnation problem Solution: Sequence number space must be larger than number of outstanding frames. Question: What would the appropriate size of the sequence number space?

Sequence Number Space Let MaxSeqNum is the largest sequence number in the sequence space SWS <= MaxSeqNum-1 is not sufficient –suppose 3-bit SeqNum field (0..7) –SWS=RWS=7 –sender transmit frames 0..6 –arrive successfully, but ACKs lost –receiver expecting 7, 0..5, but sender times out and retransmits 0..6 –Receiver expecting second incarnation of 0..5, but gets the first incarnation of 0..5 SWS <= (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum “slides” between two halves of sequence number space

Three Important Services of SW The sliding window protocol can be used to serve three different roles –Reliable delivery across an unreliable link (core function of the protocol) –Ordered delivery of frames across a link (natural frame order is maintained) –Flow control - the receiver is able to throttle the sender by acknowledging how many frames it has received and how many frames it has room to receive. It prevents overrunning of frames at the receiver

Shared Access Networks Outline Bus (Ethernet) Token ring (FDDI) Wireless (802.11)

Ethernet

Ethernet Overview History –Developed by Xerox PARC in mid-1970s –Roots in Aloha packet-radio network –Standardized by Xerox, DEC, and Intel in 1978 –Similar to IEEE standard Most successful local area networking (LAN) technology Simple and inexpensive way to connect stations on a local area network

Ethernet Technology CSMA/CD - a distributed algorithm for access to medium –carrier sense –multiple access –collision detection Carrier Sense –All the nodes can distinguish between an idle and a busy link Multiple Access –A set of nodes send and receive frames over a shared link Collision Detection –A node can detect by listening whether its transmitted frame has collided with a frame transmitted by another node

Ethernet Bandwidths Bandwidth: 10Mbps, 100Mbps, and 1000Mbps 10Mbps Ethernet for local area networks 100Mbps Ethernet is called Fast Ethernet 1000Mbps Ethernet is called Gigabit Ethernet 100Mbps and 1000Mbps Ethernets are for full- duplex, point-to-point configurations, typically used in switched networks

Media 10Base5 coax cables (thick-net) –10Mbps –used for baseband transmission – limited to 500m for each Ethernet segment 10Base2 coax cable (thin-net) 10BaseT –“T” stands for twisted pair –Category 5 used for networking –limited to 100m in length

Network configuration With 10Base5 Transceiver –transmitter-receiver –attached to the tap –also connected to adapter plugged into a host Adaptor –Runs CSMA/CD algorithm

Network configuration (contd..) Bus topology 500m long for 10Base5 Ethernet coax cable … Can be extended to maximum 2500m using 4 repeaters Repeater is an amplifier that boosts and forwards digital signals

Network configuration (contd..) Extended configuration

Network configuration (contd..) With 10Base 2 –No taps used; instead T-joints are spiced into the cable –Hosts are connected in a daisy-chain With 10BaseT (or 100BaseT) –Hubs (Multiway repeaters) used – Multiple hosts or Ethernet segments are connected to a hub –Connection from a hub to a host or another hub is a point-to-point connection

Network configuration (contd..) Hubs can be used to build networks in many configurations such as stars, trees, etc

Notes Good news: Whether a given Ethernet spans a single segment, a linear sequence of segments connected by repeaters, or multiple segments connected in a star configuration by a hub, data transmitted by any one host on that Ethernet reaches all the other hosts. Bad news: All hosts on the network are competing for access and all are in the collision domain.

Ethernet Frame Format Preamble: a sequence of alternating 0s and 1s, used for synchronization by receiver Type: Packet type field, used for de-multiplexing to many higher-level protocols (Note: Type field is treated as the length field in IEEE standard) Body: Contains data; 1500 bytes maximum; 46 bytes minimum (long enough for collision detection)

Ethernet Addresses Addresse s –unique, 48-bit unicast address assigned to each adaptor –example: 8:0:e4:b1:2 –broadcast: all 1 s –multicast: first bit is 1 Address belongs to the adaptor, not the host Each manufacturer of Ethernet devices is allocated a different prefix An Ethernet adaptor receives all frames but accepts frames addressed to its own address, all broadcast frames, and all multicast frames if instructed to listen An adaptor can be programmed to run in promiscuous mode

Transmit Algorithm If line is idle… –send immediately –upper bound message size of 1500 bytes –must wait 9.6µs between back-to-back frames If line is busy… –wait until idle and transmit immediately –called 1-persistent (special case of p-persistent) Note: All stations (adaptors) including the sender are listening always if any transmission is going on.

Transmit Algorithm (contd..) If collision … –jam for 32 bits, then stop transmitting frame (64 bits preamble + 32 bits jamming sequence = 96 bits) –minimum frame is 64 bytes (14 bytes of header + 46 bytes of data + 4 bytes of CRC) –delay and try again 1st time: 0 or 51.2µs 2nd time: 0, 51.2, 102.4, or µs nth time: k x 51.2us, for randomly selected k=0..2 n - 1 give up after several tries (usually 16) exponential backoff

Collisions (worst-case scenario) A sends a frame at time t A’s frame arrives at B at time t + d B begins transmitting at time t + d and collides with A’s frame B’s 32-bit frame arrives at A at time t + 2d

Notes With a maximally configured Ethernet of 2500m long with 4 repeaters, the round-trip delay has been determined to be 51.2µs. On a 10Mbps Ethernet, 51.2µs corresponds to 512 bits (64 bytes).

Experience with Ethernet An Ethernet works best under lightly loaded condition (Too much load causes too many collisions). Most Ethernets have fewer than 200 hosts (The limit is 1024). Most Ethernets are far shorter than 2500m. Actual RTT on most Ethernets is closer to 5µs than 51.2µs. It is rare to find situations in which any host is continually pumping frames onto the network.

Popularity of Ethernet Extremely easy to administer and maintain No switches that can fail No routing or configuration tables to be kept up- to-date Easy to add a new host to the network Inexpensive (Cable is cheap. Network adaptors are cheap as well.)

Token Ring Networks

Token Ring Overview Examples –IBM: 4Mbps token ring –16Mbps IEEE 802.5/token ring (based on IBM token ring with some differences) –100Mbps Fiber Distributed Data Interface (FDDI)

Physical Properties Electromechanical relays are used to cope with ring failures If a station is healthy, the relay is open (active state, Fig. a) If a station is not healthy or active, the relay is closed (bypass state, Fig. b)

Physical Properties (contd..) MSAU –Multistation Access Unit –several relays packed together –Makes easy to add and remove stations from network –used in IBM Token rings –Not required in IEEE 802.5

IEEE Frame Format Uses Manchester encoding Uses illegal Manchester codes in the start and end delimiters Access control byte includes frame priority and reservation priority Frame control byte identifies higher-layer protocol for de- multiplexing Addresses are 48 bits long Status byte is used for reliable delivery

Token Ring Overview A set of nodes connected in a ring Data always flows in one direction around the ring A token is a special sequence of bits circulating around the ring Each node receives and then forwards the token Each node participates in forwarding a frame to its neighbor in the direction of the flow

Token Ring Overview (contd..) Sender –must capture token before transmitting –transmit frame to its neighbor in the direction of flow –remove frame when it comes back around –transmit one or more frames while holding the token –release token after done transmitting immediate release or early release delayed release Receiver –Receive and save a copy of the frame –Forward the frame to its neighbor in the direction of flow

Token Ring Overview (contd..) Immediate Release (early release): Release token immediately following the transmission of the last frame Delayed Release: Release token after the last transmitted frame has gone around the ring and been removed

Important Notes In contrast with Ethernet, a link from a node to its neighbor can be viewed as a point-to-point link. All nodes, of course, form a closed ring. Unlike Ethernet (where a frame travels freely to all nodes), on a ring, all nodes participates in receiving and forwarding a frame (including the token).

Token Ring Protocol Token Holding Time (THT) –upper limit on how long a station can hold the token Token Rotation Time (TRT) –how long it takes the token to traverse the ring. –TRT <= ActiveNodes x THT + RingLatency Token is 24 bits long Seizing process involves simply modifying 1 bit in the second byte of the token Modified token becomes the preamble for the frame to follow Default token holding time (THT) is 10 ms. Token contains a 3-bit priority field in the control byte- –a device can only seize the token to transmit a packet if the packet’s priority is at least as great as the token’s The protocol provides a form of reliable delivery using 2 bits in the packet trailer status byte (A and C bits, both initially set to 0 by sender; later both set to 1 by receiver if it accepts the packet)

Electing a token ring monitor A station that wants to be a monitor transmits a “claim token” frame If the “claim token” frame circulates back to the sender, meaning it is OK for the sender to become a monitor If some other station tries to become the monitor at the same instant, the tie is broken using some well-defined rule (like “highest address wins”)

Problems Lost Token –no token when initializing ring –bit error corrupts token pattern –node holding token crashes Duplicate Token Corrupted frame –A frame with checksum errors or invalid formats Orphaned frame –A frame was transmitted correctly onto the ring but the parent (sender) died (went down) before it could remove it from the ring

Token Ring Monitor To detect a missing token, the monitor watches for a passing token and maintains a timer equal to the maximum possible token rotation time. ( NumStations × THT) + RingLatency It generates a lost token It removes duplicate token It removes corrupted or orphaned frame For a small ring, the monitor may need to hold some bits of the token in its buffer

Detecting Monitor Failure Problems: What will happen if the monitoring station fails. How is it possible to detect the failure? A healthy monitor periodically announces its presence with a special message In case of monitor failure, there will not be any periodic circulation of such special message Some station on the ring can detect the problem first and try to become the monitor

FDDI Stands for Fiber Distributed Data Interface Similar to and IBM Token Rings Physical medium is optical fiber Consists of two independent rings that transmit data in opposite directions Second ring is only used when primary ring fails Can tolerate a single break in the cable

FDDI Architecture Fig(a) - Dual fiber ring in normal operation Fig(b) - Failure of the primary ring

FDDI SAS - Single attachment stations DAS - Dual attachment stations An optical bypass (like a relay) is used to isolate faulty SAS

Some FDDI parameters A single network can have at most 500 stations Maximum distance 2 km between any pair of stations Network is limited to 200 km of fiber (Actual ring length is 100 km maximum because of dual ring) It is 100-Mbps network

FDDI Frame Format Uses 4B/5B encoding for the entire frame (instead of Manchester) No access control bits Contains one header bit to distinguish synchronous from asynchronous traffic

Timed Token Algorithm Token Holding Time (THT) –upper limit on how long a station can hold the token Token Rotation Time (TRT) –how long it takes the token to traverse the ring. –TRT <= ActiveNodes x THT + RingLatency Target Token Rotation Time (TTRT) –agreed-upon upper bound on TRT 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 send Always allowed to send synchronous data whether the token is early or late, where as for asynchronous data token should be early (for FDDI)

Wireless LANs IEEE Bandwidth: Up to 70 Mbps –Bluetooth > 2.1 Mbps –Wi-Fi > 54 Mbps –WiMax > 70 Mbps Physical Media –Signals propagating through space –spread spectrum radio (2.4GHz) –diffused infrared (10m)

Spread Spectrum Idea –spread signal over wider frequency band than required –originally designed to thwart jamming Frequency Hopping –transmit over random sequence of frequencies –computed algorithmically –sender and receiver share… pseudorandom number generator seed – uses 79 x 1MHz-wide frequency bands

Spread Spectrum (contd..) Direct Sequence –for each bit, send XOR of that bit and n random bits –random sequence known to both sender and receiver –called n-bit chipping code – defines an 11-bit chipping code

Collisions Avoidance Similar to Ethernet Problem: hidden and exposed nodes

Multiple Access with Collision Avoidance (MACA) Sender transmits RequestToSend (RTS) frame Receiver replies with ClearToSend (CTS) frame Neighbors… –see CTS: keep quiet –see RTS but not CTS: ok to transmit as it is not close to the receiver to interfere with it Receive sends ACK when has frame –neighbors silent until see ACK Collisions –no collisions detection (RTS frames of two or more nodes will collide if they transmit at the same time) –known when don’t receive CTS –exponential backoff

Supporting Mobility Case 1: ad hoc net working Case 2: access points (AP) –tethered –each mobile node associates with an AP

Supporting Mobility (contd..) Scanning (selecting an AP) –node sends Probe frame –all AP’s w/in reach reply with ProbeResponse frame –node selects one AP; sends it AssociationRequest frame –AP replies with AssociationResponse frame –new AP informs old AP via tethered network When –active: when join or move –passive: AP periodically sends Beacon frame and the node can change to this AP by sending it an AssociationRequest frame