You are on page 1of 27

Local Area Networks

Dr. Ramana
I.I.T Rajasthan

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

1 / 27

Outline of the Lectures
1

Introduction
LAN Topologies
Frame Transmissions on Various Topologies

2

LAN Protocol Architechure
Logical Link Control - IEEE 802.2
Medium Access Control - MAC
Contention based MAC
Frame Formats - IEEE 802.3 and Ethernet-II
Token based MAC
LAN Devices
Spanning Tree Algorithm
Shared vs Switched Ethernets

Dr. Ramana ( I.I.T Rajasthan )

Local Area Networks

2 / 27

wireless. Ramana ( I.I.optical fiber. Medium access control . reservation. Size is restricted to few kilometers.bus.round-robin.Introduction Introduction LAN consists of a shared transmission medium and a set of hardware and software devices for interfacing devices to the medium.tree. Owned by a single organization.star. Used mainly for carrying data traffic.twistedpair.coax. Data rates are higher and ranges from 100 Mbps to 10 Gbps. contention Dr. Key elements: Topology . Transmission medium .T Rajasthan ) Local Area Networks 3 / 27 .ring. A medium access mechanism is needed to allow an orderly access to the shared medium.

I.Introduction Layer 3 switch 1 Gbps WAN Router 1 Gbps Layer 3 switch 1 Gbps Layer 2 switch 1 Gbps Layer 2 switch Layer 2 switch 10/100 Mbps 10/100 Mbps 11 Mbps Laptop with wireless connection Typical Premises Network Configuration Dr. Ramana ( I.T Rajasthan ) Local Area Networks 4 / 27 .

Ramana ( I. Switch.T Rajasthan ) Local Area Networks 5 / 27 .I. or Repeater Headend (b) Tree (d) Star LAN Topologies Dr.Tap Flow of data Introduction LAN Topologies Terminating resistance Repeater (a) Bus (c) Ring Central Hub.

Introduction Frame Transmissions on Various Topologies A A B C C transmits frame addressed to A A A B C Frame is not addressed to B. Ramana ( I.T Rajasthan ) Local Area Networks 6 / 27 .I. B ignores it A A B C A copies frame as it goes by Frame Transmission on a Bus LAN Dr.

Introduction Frame Transmissions on Various Topologies C A B (a) C transmits frame addressed to A A C B A A (b) Frame is not addressed to B. Ramana ( I. B ignores it C B (c) A copies frame as it goes by A A C B A (d) C absorbs returning frame A Frame Transmission on a Ring LAN Dr.T Rajasthan ) Local Area Networks 7 / 27 .I.

medium access control OSI Reference Model Application Presentation Session Transport Network Data Link Physical Medium IEEE 802 Reference Model Upper Layer Protocols LLC Service Access Point (LSAP) ( ) ( ) ( ) Logical Link Control Medium Access Control Physical Scope of IEEE 802 Standards Medium IEEE 802 Protocol Layers Compared to OSI Model Dr. Ramana ( I.LAN Protocol Architechure Sublayers of Data Link Layer LLC .I.T Rajasthan ) Local Area Networks 8 / 27 .framing.provide an interface to higher layers and perform flow and error contol MAC . frame transmission and reception.

T Rajasthan ) Local Area Networks 9 / 27 . Ramana ( I.LAN Protocol Architechure Application Layer Application data TCP header TCP Layer IP header IP Layer LLC header LLC Layer MAC header MAC trailer MAC Layer TCP segment IP datagram LLC protocol data unit MAC frame LAN Protocols in Context Dr.I.

Acknowledged connectionless no connection setup.Connection mode logical connection will be setup between the two users uses Asynchronous balanced mode of operations and other modes are not supported flow and error control are provided via S-frames would be useful when no reliability is provided at higher layers Type 3 . Ramana ( I.LAN Protocol Architechure Logical Link Control . would be useful when each transmission to be received by multiple stations Dr. 1-bit sequence number is used. no flow and error controls Delivery of data is not guaranteed (higher layers may take care of the reliability of data) Uses unnumbered frame to transfer the users data Type 2 .2 LLC Details .T Rajasthan ) Local Area Networks 10 / 27 .I.IEEE 802.IEEE 802.Unacknowledged connectionless Simple service. but each transmitted frame is acked to guard against lost frames.2 Derived from HDLC and provides 3 types of services to the users Type 1 .

MAC MAC . synchronous TDM. and Error detection Medium access mechanisms could be either centralized or distributed and synchronous or asynchronous Synchronous: FDM. interface to physical layer.LAN Protocol Architechure Medium Access Control . Distributed access control Advantages of centralized control Easier to provide centralized control with priorities. Contention Centralized vs.T Rajasthan ) Local Area Networks 11 / 27 . etc.I. Sending/receiving frames. Individual node logic is simple Avoids problem of group coordination Disadvantages Less reliable May become bottleneck and reduce efficiency Overheads may be higher if propagation delay is high Dr.Overview Governs access to the shared medium Inaddtion. Ramana ( I. but not well used Asynchronous: Round Robin. Frame synchronization. Reservation.

LAN Protocol Architechure Medium Access Control . Ramana ( I. Dr. Either a central controller polls a node to permit to go. in turn. retransmission after random timeout is attempted.T Rajasthan ) Local Area Networks 12 / 27 .MAC (Cont. If “collision” occurs.) Access Control Mechanisms Round-Robin Each node. Contention (Random Access) No control on who tries. is given opportunity to transmit. Simple but overhead may be high if traffic is high Reservation Partition channel so each node gets a slice of the bandwidth Node wishing to transmit makes “reservations” for time slots in advance. “Token” is passed. or nodes can coordinate among themselves. Central or distributed.I.

I. Slotted Aloha. CD .LAN Protocol Architechure Contention based MAC Contention based MAC . Example: Aloha. No control is exercised to determine whose turn it is. 1 persistent. CSMA/CD. CSMA/CA CSMA-Carrier Sense Multiple Access. Ramana ( I. CSMA.Overview All the nodes contend for the medium.Collision Avoidance Dr. Simple to implment and suitable for bursty traffic in low and moderate traffic volumes. non-persistent CSMA.Collision Detection. p-persistent. CA .T Rajasthan ) Local Area Networks 13 / 27 . Performance may collapse under heavy loads.

back off P-Persistent: •Transmit as soon as channel goes idle with probability P •Otherwise. Ramana ( I. back off CSMA Persistence and Backoff Dr. delay one time slot and repeat process •If collision.LAN Protocol Architechure Contention based MAC Variants of CSMA Constant or variable delay Nonpersistent: •Transmit if idle •If busy. wait random time and repeat process •If collision.T Rajasthan ) Local Area Networks 14 / 27 . back off Channel Busy time Ready 1-Persistent: •Transmit as soon as channel goes idle •If collision.I.

LAN Protocol Architechure Contention based MAC CSMA/CD A B C D TIME t0 A's transmission C's transmission Signal on bus TIME t1 A's transmission C's transmission Signal on bus TIME t2 A's transmission C's transmission Signal on bus TIME t3 A's transmission C's transmission Signal on bus CSMA/CD Operation Dr.I.T Rajasthan ) Local Area Networks 15 / 27 . Ramana ( I.

attempts++.I. attempts == 16 Dr. wait(b). Ramana ( I.T Rajasthan ) Local Area Networks 16 / 27 .LAN Protocol Architechure Contention based MAC CSMA/CD Flow chart Packet? Sense Carrier No Send Detect Collision Yes Discard Packet attempts < 16 Jam channel b=CalcBackoff().

T Rajasthan ) Local Area Networks 17 / 27 .LAN Protocol Architechure Contention based MAC Binary Exponential Backoff (BEB) Algorithm Adaptors detect collision based on voltage differences Up on detecting collision. BEB-Algorithm for a frame under transmission. from a contention window (cw) = {0. proceed with the next frame trasnmission Dr. min(2C -1. called JAM signal and execute BEB algorithm. where slotlength = 51.I. F 1 2 Increment number of collisions experience from frame F as C ←C+1 If C < 16 1 2 3 Derive a random number K . Ramana ( I.1023)}. which is number of timeslots. all transmitting nodes send a high voltage signal.2µs Else 1 Discard frame F and reset C ← 0. Defer the transmission of F by time T = K × slotlength.

which is minimum frame duration or transmission time. It is equal to the transmission time of 64-byte frame at date rate 10Mbps.2µs. delay introduced by each repeater (3 µs) LAN Length (L) = 500 x 5 = 2500 meters Round Trip Distance = 5000 meters 5000 Total propagation time (tprop ) = 2×10 8 = 25µs Delay added by each repeater (trep ) = 3µs x 2 (Bi-Direction) x 4 Repeaters = 24µs Round Trip Time (RTT) = tprop + trep = 25 + 24 = 49µs. It is a function of datarate (10 Mbps). So the slottime @ 10 Mbps data rate is 51.I.LAN Protocol Architechure Contention based MAC On Slot Time Slotlength = 51.T Rajasthan ) Local Area Networks 18 / 27 . length of each segment (500 meters). Dr. number of LAN segments (5). The nearest frame size (in power of 2) which corresponds to this minimum frame transmission time is 64 bytes. Ramana ( I.2µs.

3 padding bytes are inserted to ensure at least a 64-byte frame. Intel.0x0806 • Data (Ethernet): After physical-layer and link-layer processing is complete. IP – 0x0800. Dr.I. ARP .2 Header and Data FCS 2 46 – 1500 4 Type Data FCS a) IEEE 802. While in IEEE 802.3 delimiter byte ends with two consecutive 1 bits. Xerox) consortium Note: Field sizes are given in Bytes • Preamble: Alternating pattern of ones and zeros tells receiving stations that a frame is coming (Ethernet or IEEE 802. • Length (IEEE 802. • Start-of-Frame (SOF): The IEEE 802.3 frame 8 Preamble 6 6 Destination Source Address Address b) Ethernet – II frame – proposed by DIX (Digital. Although Ethernet-II does not specify any padding (in contrast to IEEE 802. multicast (group).IEEE 802. which serve to synchronize the frame reception portions of all stations on the LAN. the data contained in the frame is sent to an upper-layer protocol.3 and Ethernet-II IEEE 802. or broadcast (all nodes). SOF is explicitly specified in Ethernet.3 and Ethernet-II Frame Format 7 1 S Preamble O 6 Destination Address F 6 Source Address 2 46 – 1500 4 Length 802. Ethernet frame includes an additional byte that is the equivalent of the Start-of-Frame field specified in the IEEE 802.3 frame. • Type (Ethernet): The type specifies the upper-layer protocol to receive the data after Ethernet processing is completed. which is identified in the Type field. Ramana ( I.LAN Protocol Architechure Frame Formats . Ex. • Destination and Source Addresses: (MAC or Hardware address) Source address is always a unicast (single-node) address and destination address can be unicast. Ethernet expects at least 46 bytes of data.3).3): The length indicates the number of bytes of data that follows this field.T Rajasthan ) Local Area Networks 19 / 27 .3).

Ramana ( I.IEEE 802.LAN Protocol Architechure MAC Frame LLC PDU MAC Control Destination MAC Address Frame Formats .3 and Ethernet-II Source MAC Address LLC PDU 1 octet 1 1 or 2 variable DSAP SSAP LLC Control Information I/G DSAP value C/R SSAP value CRC LLC Address Fields I/G = Individual/Group C/R = Command/Response LLC PDU in a Generic MAC Frame Format Dr.T Rajasthan ) Local Area Networks 20 / 27 .I.

LAN Protocol Architechure Token based MAC Token based MAC Dr.I.T Rajasthan ) Local Area Networks 21 / 27 . Ramana ( I.

T Rajasthan ) Local Area Networks 22 / 27 . Ramana ( I.LAN Protocol Architechure LAN Devices Bridges and Switches LAN A Frames with addresses 11 through 20 are accepted and repeated on LAN B • • • Bridge Station 1 Station 2 Station 10 Frames with addresses 1 through 10 are accepted and repeated on LAN A LAN B • • • Station 11 Station 12 Station 20 Bridge Operation Dr.I.

t5. t6 MAC-H LLC-H User Data MAC-T (b) Operation Connection of Dr.) User LLC MAC Physical t1 t8 t2 t3 t7 LAN t4 MAC Physical Physical t5 LAN t6 User LLC MAC Physical (a) Architecture t1. t8 User Data t2. t7 LLC-H User Data t3.I. Ramana ( I. t4.LAN Protocol Architechure LAN Devices (Cont.T Rajasthan ) Two LANs by a Bridge Local Area Networks 23 / 27 .

Spanning Tree Algorithm Station 1 Station 2 Station 3 LAN A Bridge 101 Bridge 107 LAN B Bridge 102 LAN C Bridge 103 LAN D Bridge 104 LAN E Station 4 Bridge 105 LAN F Station 5 Station 6 Bridge 106 LAN G Station 7 Configuration of Bridges and LANs.LAN Protocol Architechure Spanning Tree Algorithm Dealing with Loops . with Alternate Routes Dr.I. Ramana ( I.T Rajasthan ) Local Area Networks 24 / 27 .

I.LAN Protocol Architechure Spanning Tree Algorithm Impact of Loops Station B LAN Y t2 t1 Bridge a LAN X Bridge b t0 t0 Station A Loop of Bridges Dr.T Rajasthan ) Local Area Networks 25 / 27 . Ramana ( I.

Ramana ( I.I.T Rajasthan ) Local Area Networks 26 / 27 .LAN Protocol Architechure Shared vs Switched Ethernets HUB HHUB Two cables (twisted pair or optical fiber) IHUB IHUB Station Transmit Receive Station Station Station Station Two-Level Star Topology Dr.

T Rajasthan ) Local Area Networks 27 / 27 .10 Mbps C D (a) Shared medium bus Total capacity up to 10 Mbps 10 Mbps 10 Mbps 10 Mbps A B 10 Mbps C D (b) Shared medium hub Total capacity N ¥ 10 Mbps 10 Mbps 10 Mbps 10 Mbps A B 10 Mbps C D (c) Layer 2 switch LAN Hubs and Switches Dr. Ramana ( I.I.LAN Protocol Architechure Shared vs Switched Ethernets Hubs vs Switches A B 10 Mbps 10 Mbps 10 Mbps 10 Mbps Shared Bus .