Networks can be divided into two categories 1. point-point channels 2. Broadcast Channels MAC Layer deals with broadcast channels. The data link layer divided into two sub-layes 1. MAC. 2. LAC/Data link Layer. MAC is the Bottom Sub-layer. LAC is the upper Sub-layer. LAC deals with point-point channels. p p MAC deals with broadcast channels. In any broadcast network, the key issue is how to determine who gets use the channel when there is a competition for it. For Ex: Conference call between more than two people. JPR COMPUTER NETWORKS Medium Access Control Sub Layer It is very clear that when one of them stops speaking, two or more will start speaking at once, leading chos. In a face-face meeting chos are avoided by externally. But in system, when only a single channel is available, determing who should get next is much harder who should get next is much harder. Many protocols are developed to solve the problem. Broadcast channels are sometimes referred to as multi access channels or r andom access channels. The protocols used to determine who goes next on a multiaccess channel belong to a data link layer sub-layer called MAC sub-layer. The MAC sub layer is important for LANs The MAC sub-layer is important for LANs. In general WAN is point-point, except satellite networks. Multiaccess channels & LAN are closely related, so MAC deals with LAN. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Static Channel Allocation in LAN & WAN Let us assume single channel for multiple competing users. It using FDM. If there N users, the bandwidth divided into N equal portions, each i i user using one portion. When number of users is large and continuously varying or traffic is bursty FDM exist with some problems. 1. If fewer than N users using the large bandwidth is wasted. 2. If more than N user try to access, for some other permission is denied due to lack of bandwidth. D il bili f l b d id h h 3. Due to availability of less bandwidth, some user even they wont sent or receive any thing. static channel allocation methods are not efficient for bursty traffic. Dynamic channel allocation is more efficient for bursty traffic. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Dynami c Channel Allocati on i n LAN & WAN Before going to discuss about dynamic channel allocation, five key assumptions are described below 1. Stati on Model A i h N i d d i A system with N independent stations. A station can be any device cable of send or receive or both. Each with a program or user that generate frames for transmission. Stations are also called terminals. The probability of a frame being generated in interval of length t i is t. Where is constant. Once a frame has been generated, the station is blocked and does nothing until the frame successfully transmitted. JPR COMPUTER NETWORKS 2 Medium Access Control Sub Layer 2. Si ngle Channel Assumpti on A single channel is available for all communication. All stations can transmit and receive on it only. 3. Colli si on Assumpti on If two frames are transmitted simultaneously, the overlap in time and the resulting signal is garbled. This event is called collision. All stations can detect collisions and collided frames must be retransmit. 4a. Conti nues Ti me Frame Transmission begin at any instant of time. There is no matter clock dividing time into discrete intervals. 4b.Slotted Ti me Time is divided into discrete intervals. The frame transmission begin at the start of the slot. JPR COMPUTER NETWORKS Medium Access Control Sub Layer A slot contains o, 1, or more frames. A slot can be idle, a successful transmission, or a collision. 5a. Car r i er Sense A station can tell if the channel in use before trying to use it. If the channel is sensed as busy, no station will attempt to use it until it goes idle. 5b. No Car r i er Sense A station cant sense before trying to use it. They just go ahead and transmit. Later they will check whether the transmission was successful or not. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Multi ple Access Pr otocols Access Control defines When a station can access the medium. What to do when the medium is busy. How to determine if the transmission is a success or failure How to determine if the transmission is a success or failure. What should be done if there is an access conflict. ALOHA Pr otocol ALOHA, the earliest random access method. It was developed at the university of hawaii in early 1970. It was designed for radio(wireless) LAN, but it support any shared media. There is a possibility of collision in this mechanism. There are two types of ALOHA. Pur e ALOHA The original ALOHA protocol is pure ALOHA. JPR COMPUTER NETWORKS Medium Access Control Sub Layer The idea is that each station sends frame whenever it has frame to send. There is only one channel to share, there is the possibility of collision. The following diagram shows the pure ALOHA with 4 stations The following diagram shows the pure ALOHA with 4 stations. JPR COMPUTER NETWORKS 3 Medium Access Control Sub Layer Some of these frames collide because of multiple frames are in the contention for the shared channel. To determine collided, damaged or lost fames pure ALOHA relies on ACK from the receiver. If the ACK is does not arrive after time out period the station If the ACK is does not arrive after time-out period, the station assumes frames lost or damage and then retransmit. Suppose more than two stations try to resent at the same time again collision is occurred. Instead of resent immediately, a station wait random amount of time and then resent. The random amount of time for minimizing collisions we will call The random amount of time for minimizing collisions, we will call this back-off time T B. Pure ALOHA resent several number of times(K max ) and try later for retransmission. The following flowchart shows the functionality of pure ALOHA. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Pure ALOHA Flowchart. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Limitation of pure ALOHA 1. There is no rule when the station can sent a frame. 2. Slotted ALOHA was invented to improve the efficiency of pure ALOHA. Sl d ALOHA Slotted ALOHA Time is divided into slots and force the station to send only at the beginning of the slot. If station misses this moment, it wait until the beginning of the next time slot. There is still the possibility of collision, if two stations try to send at the same time slot at the same time slot. The following diagram shows the collision in slotted ALOHA. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Collision in slotted ALOHA JPR COMPUTER NETWORKS 4 Medium Access Control Sub Layer Car r i er Sense Multi ple Access(CSMA) To minimize the collision and improve the efficiency, the CSMA method was developed. In this mechanism, a station sense the medium before trying to use it it. CSMA requires that each station first listen the medium before sending the frame. CSMA based on the principle sense before transmission or listen before talk. CSMA can reduce the possibility of collision, but it can not eliminate it eliminate it. Propagation delay may still result in collisions. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Per si stence Str ategy It defines procedures for a station that senses a busy medium. Nonper si stent : A station that has a frame to send sense the line. If the line is idle it send immediately If the line is idle, it send immediately. It the line is not idle, it wait random amount of time again sense the carrier. It minimize the collisions, but two or more stations wait same amount of time there is chance of collision. Per si stent: station sends a frame after sensing the line 1-persistent station sends immediately p-persistent station sends with probability p if it finds the line idle based on a random number. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Flow diagram for persistent methods. JPR COMPUTER NETWORKS Medium Access Control Sub Layer The CSMA does not specify the collision during transmission. CSMA/CD handle the collision. Car r i er Sense Multi ple Access wi th Colli si on Detecti on(CSMA/ CD). Station sends a frame, then monitors the medium to see if the transmission was successful. If a collision is detected, jamming signal is transmitted and exponential backoff method is used to determine when to resend. There is also a collision possibility in CSM/CD algorithm. The following diagram shows the collision in CSMA/CD. JPR COMPUTER NETWORKS 5 Medium Access Control Sub Layer Flow Graph of CSMA/CD JPR COMPUTER NETWORKS Medium Access Control Sub Layer Car r i er Sense Multi ple Access wi th Colli si on Avoi dance(CSMA/ CA) It is used in wireless LANs. To need collision avoidance on wireless LANs, because they can not detect collisions detect collisions. Collisions are avoided through three strategies 1. Interframe space 2. Contention window 3. ACK. 1. Interframe Space For avoiding the collisions, when the idle channel is found, the station does not send immediately, it will wait a period of time called the i nter far mespace(I FS). The IFS time allow the inline frame (transmitting frame) to reach the destination. JPR COMPUTER NETWORKS Medium Access Control Sub Layer 2. Contention Window If after IFS, channel is idle, it will further wait time equal to the contention time. The contention window is an amount of time divided into slots. Th b f l i i d h di b k ff The number of slots in a window changes according to back-off strategy. If the station finds the channel busy, it does not restart the timer of the contention window, but it stops the timer and restart it when the channel becomes idle. 3. Acknowledgement With all these precautions still there is a possibility of collision With all these precautions, still there is a possibility of collision occurred during transmission or corrupted during transmission. CSMA/CA uses positive ACK & time-outs for efficient transmission. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Flow diagram of CSMA/CA JPR COMPUTER NETWORKS 6 Medium Access Control Sub Layer MAC Addr ess A Media Access Control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. MAC addresses are most often assigned by the manufacturer of a MAC addresses are most often assigned by the manufacturer of a network interface card (NIC) and are stored in its hardware. It may also be known as an Ethernet hardware address (EHA), hardware address or physical address. MAC addresses are formed according to the rules of one of three numbering name spaces managed by the Institute of Electrical and Electronics Engineers (IEEE): MAC-48, EUI-48, and EUI-64. g ( ) 4 , 4 , 4 The standard (IEEE 802) format for MAC-48 addresses is in human-friendly form is six groups of two hexadecimal digits, separated by hyphens (-) or colons (:), in transmission order, e.g. 01-23-45-67-89-ab or 01:23:45:67:89:ab. JPR COMPUTER NETWORKS Medium Access Control Sub Layer For Ex: MAC address: like Social Security Number IP address: like postal address MAC flat address => portability can move LAN card from one LAN to another IP hierarchical address NOT portable depends on network to which one attaches The original IEEE 802 MAC address comes from the original xerox Ethernet addressing scheme. This 48-bit address space contains potentially 2 48 or p p y 281,474,976,710,656 possible MAC addresses. Addresses can either be universally administered addresses or locally administered addresses JPR COMPUTER NETWORKS Medium Access Control Sub Layer Universally administered and locally administered addresses are distinguished by setting the second least significant bit of the most significant byte of the address. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered address is locally administered. In the example address 06-00-00-00-00-01 the most significant byte is 06 (hex), the binary form of which is 00000110, where the second least significant bit is 1. Therefore, it is a locally administered address. the MAC address can be either unicast or multicast. If the least significant bit of the most significant octet of an address g g is set to 0 (zero), the frame is meant to reach only one receiving NIC, This type of transmission is called unicast. JPR COMPUTER NETWORKS Medium Access Control Sub Layer If the least significant bit of the most significant address octet is set to 1, the frame will still be sent only once. however, NICs will choose to accept it based on different criteria than a matching MAC address, This is called multicast addressing. MAC address structure MAC address structure JPR COMPUTER NETWORKS 7 Medium Access Control Sub Layer I EEE802.X Local Area Network (LAN) network connecting devices in a limited geographic area, usually privately owned and limited to a single office, building, or campus Four typical architectures used: yp Ethernet, Token Bus, Token Ring, and Fiber Distributed Data Interface (FDDI) Ethernet most dominant protocol. Each protocol is based on HDLC. IEEE 802.x standard specifying functions of the physical layer and data link layer (as well as some functions in the network layer) in LAN LAN. 802 define project was started in the year 198o of 2 nd month. X defines various protocols related to LAN. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Data link layer is further subdivided into two sublayers: Logical Link Control (LLC/LAC). Medium Access Control (MAC). Pr oj ect 802 and OSI Model JPR COMPUTER NETWORKS Medium Access Control Sub Layer Various protocols corresponds to MAC are Data Link Layer Sublayers Logical Link Control (LLC) upper layer Non-architecture specific dl l i l dd i l i f i d d Handles logical addressing, control information and data Medium Access Control (MAC) lower layer Proprietary to specific LAN product (e.g. Ethernet, Token Ring, Token Bus, etc.) Resolves contention for the medium, provides synchronization, flow control, physical addressing, and error control specifications JPR COMPUTER NETWORKS Medium Access Control Sub Layer Ether net (I EEE802.3) Ethernet is dominating protocol on LAN. The name Ethernet refers cabling and other specifications. Carrier Sense Multiple Access with Collision Detection (CSMA/CD) i d di ffi i i i lli i d i i is used to coordinate traffic, minimize collisions, and maximize number of frames delivered successfully. EthernetFrameFormat It Consists of seven fields No mechanism for acknowledging received frames and also considered an unreliable medium. JPR COMPUTER NETWORKS 8 Medium Access Control Sub Layer Preamble seven bytes of alternating 0s and 1s to notify receiver of incoming frame and to provide synchronization. Start frame delimiter (SFD) one byte signaling the beginning of the frame. Destination address (DA) six bytes containing the physical Destination address (DA) six bytes containing the physical address of the next destination; if packet must reach another LAN, this field contains the physical address of the router; upon reaching the target network, field then contains the physical address of the destination device. Source address (SA) six byte field containing physical address of last station to forward packet, sending station or most recent router Length/type two bytes indicating number of bytes in coming PDU; if fixed length, can indicate type Data 46 to 1500 bytes CRC CRC-32 error detection information JPR COMPUTER NETWORKS Medium Access Control Sub Layer EthernetFrameLength Requiresaminimumlengthof512bits(64bytes)toallowfor correctoperationofCSMA/CD Minimumpayloadlength46bytes Maximumlengthissetto12,144bits(1518bytes) Maximumpayloadlength1500bytes JPR COMPUTER NETWORKS Medium Access Control Sub Layer Ether net Addr essi ng Each station on the network must have a unique physical address Provided by a six-byte physical address encoded on the network interface card (NIC). N ll i i h d i l i Normally written in hexadecimal notation. MAC address are Unicast, Multicast, and Broadcast Addressing Unicast belonging to just one station Multicast defines a group of addresses Broadcast recipients are all stations on network Ethernet uses Manchester Encoding for signaling. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Ether net I mplementati on All Ethernet LANs are configured as logical buses. Physical implementation may be star or bus. Protocol broadcasts frame to every station but is read only by i hi h i i dd d station to which it is addressed. Categor i es of tr adi ti onal/ standar d Ether net There are four different standard ethernets. Name Cable Max.Seg Nodes/ seg advantages 10base5 Thick coax 500m 100 Original cable, long distance JPR COMPUTER NETWORKS 5 5 g , g 10base2 Thin coax 185m 30 No hub needed 10base-T Twisted Pair 100m 1024 Cheapest system 10base-F Fiber Optic 200m 1024 Best between buildings 9 Medium Access Control Sub Layer First number indicates data rate in Mbps. Last number indicates maximum cable length or type. Baseband digitalsignalsusingManchesterencoding. 10base5 popularly called thi ck ether net or thi cknet 10base2 is called thin ethernet or thinnet. 10Base5 - Thi cknet A rigid coaxial cable (RG-8) approx. 0.4 in. thick used in the original Ethernet networks Bus topology LAN using base signaling with a maximum segment distance of 500 meters JPR COMPUTER NETWORKS Medium Access Control Sub Layer Thi cknet Char acter i sti cs Supports transmission rates up to 10 Mbps in Baseband mode Less expensive than fiber-optic cable, but more expensive than other types of coax Wide diameter and excellent shielding make it more resistant to Wide diameter and excellent shielding make it more resistant to noise than other types of wiring Physical connectors and cables include coaxial cable, NIC cards, transceivers, and attachment unit interface (AUI) cables 10Base5 Connector s Transceiver intermediary device; also called a medium attachment unit (MAU) Performs CSMA/CD function; may contain small buffer Attachment Unit Interface (AUI) also called a transceiver cable 15-wire cable which performs physical layer interface functions between station and transceiver Plugs into NIC and transceiver JPR COMPUTER NETWORKS Medium Access Control Sub Layer Transceiver tap allows connection to a line at any point. 10Base5Topology JPR COMPUTER NETWORKS Medium Access Control Sub Layer 10Base2 Thi nnet Cable diameter is approximately 0.64 cm (RG-58). More flexible and easier to handle and install than Thicknet. 2 represents a maximum segment length of 185m (~200m). Less expensive than Thicknet and fiber-optic cable; more expensive than Twisted Pair wiring. More resistant to noise than Twisted Pair; not as resistant as Thicknet. Major advantages are its very low cost and relative ease of use. JPR COMPUTER NETWORKS 10 Medium Access Control Sub Layer Thi nnet Characteri sti cs Shorter range (185 meters) and smaller capacity. Bus topology LAN. Connectors and cables include: NICs, thin coaxial cable, and BNC- T connectors. Transceiver is moved into NIC; tap replaced by connector splicing directly into the cable, eliminating need for AUI cables. BNC-T connector T-shaped device with 3 ports: one for the NIC and one each for input/output ends of cable. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Thi nNet Cabli ng & Connectors JPR COMPUTER NETWORKS Medium Access Control Sub Layer 10Base-T: Twi sted Pai r Ethernet Third implementation is 10base-T. easiest to install and reconfigure. Star topology LAN using UTP cable and no need of AUI. Supports data rage of 10 Mbps with a max hub to station length of 100 meters Transceiver operations are carried out in an intelligent hub. NIC reads destination address of frame and only opens if it matches that address. JPR COMPUTER NETWORKS Medium Access Control Sub Layer 10Base-T JPR COMPUTER NETWORKS 11 Medium Access Control Sub Layer 10Base-F: Fi ber Li nk Ether net Uses star topology to connect stations to a hub External transceiver called a fiber-optic MAU connects processing device to fiber-optic cables via a 15-wire transceiver JPR COMPUTER NETWORKS Medium Access Control Sub Layer Other ether nets 1. Bridged Ethernet. 2. Switched ethernet. 3. Full-Duplex ethernet. 4. Fast ethernet 5. Gigabit thernet. 6. Ten-Gigabit ethernet. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Wi r eless LAN I EEE define the specifications for the wirelessLAN, called IEEE 802.11. It covers the Physical Layer & Data Link Layer. A hi Ar chi tectur e wirelessLANdefines two kinds of stations 1. Basic Service Set (BSS). 2. Extended Service Set(ESS). BSS Basic service set (BSS) stationary or mobile wireless stations and l b i k i (AP) a central base station known as an access point (AP). AP is option and BSS without an AP is an ad hoc architecture. BSS with an AP is referred to as infrastructure network. BSS with out AP is a stand-alone n/w and can not send data to other BSSs. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Basic service Sets(BSS) ESS Extended service set (ESS) two or more BSSs with APs connected through a distribution system (wired LAN) in an infrastructure network. ESS uses two types of stations mobile & stationary. The mobile stations are stations inside BSS. The stationary stations are AP stations that are part of wired LAN. JPR COMPUTER NETWORKS 12 Medium Access Control Sub Layer The stations are connected with in BSS without using AP, but across BSS via two APs. The ESS architecture are JPR COMPUTER NETWORKS Medium Access Control Sub Layer Stati on Types IEE802.11 defines three types of stations based on their mobility in WirelessLAN 1. No-tr ansi ti on mobi li ty either stationary or moving only inside a BSS inside a BSS. 2. BSS-tr ansi ti on mobi li ty can move from one BSS to another, but confined inside one ESS. 3. ESS-tr ansi ti on mobi li ty can move from one ESS to another. Physi cal Layer i n WLAN There are six specifications in WLAN. Th f ll i di h h i l l i l t ti The following diagram shows physical layer implementations JPR COMPUTER NETWORKS Medium Access Control Sub Layer FHSS Frequency-hopping spread spectrum in a 2.4 GHz band. Carrier sends on one frequency for short duration then hops to another frequency for same duration, hops again to another for t f ti d same amount of time and so on Spreading adds security since only sender and receiver agree on sequence of allocated bands. The following shows the order of data flow JPR COMPUTER NETWORKS Medium Access Control Sub Layer Contention is handled by MAC sublayer since all stations use the same subbands. Pseudorandom number generator selects the hopping sequence. Modulation is FSK resulting in a data rate of 1 or 2 Mbps. DSSS DSSS Direct sequence spread spectrum in a 2.4 GHz band. Each bit is replaced by a sequence of bits called a chip code, implemented at the physical layer. Sender splits each byte of data into several parts and sends them concurrently on different frequencies . Modulation is PSK, BPSK, or QPSK; data rate is 1 or 2 Mbps. , , Q ; p JPR COMPUTER NETWORKS 13 Medium Access Control Sub Layer 802.11a OFDM Orthogonal frequency-division multiplexing using a 5-GHz band. Same as FDM except all subbands are used by only one source i i at a given time. Security increased by assigning sub-bands randomly. UsesPSKandQAM,yieldingdataratesof18Mbps(PSK)and54Mbps(QAM) 802.11b HR-DSSS High-rate DSSS using a 2.4 GHz band Similar to DSSS except for encoding method Uses complementary code keying (CCK), encoding 4 or 8 bits to one CCK symbol Defines four data rates: 1, 2, 5.5, and 11 Mbps Modulation techniques are BPSK and QPSK JPR COMPUTER NETWORKS Medium Access Control Sub Layer 802.11g OFDM Uses OFDM with 2.4 GHz band. Achieves a 54-Mbps data rate. It defines forward error correction. Works with same 802.11b equipment. MAC sub-layer IEEE820.11 MAC layer is divided into two sub-layer. 1. Distributed Coordination Function(DCF). 2. Point Coordination Function(PCF). JPR COMPUTER NETWORKS Medium Access Control Sub Layer DCF DCF uses CSMA/CA. It deals with frame exchange time line in WLAN. 1. Before sending a frame , the station sense the channel for status. 2. The channel uses a persistence strategy with a back-off limit. 3. After the station is found to be idle, it wail it for a period of time called the distributed interframe space( DIFS). 4. The station sends a control frame called the request to send(RTS). 5. The receiver, after receiving the RTS wait a period of time called short interframe space(SIFS) and the sends a control frame called h l d(CTS) the clear to send(CTS). 6. The station send data after waiting an amount of time equal to SIFS. 7. The receiving station after SIFS, send ACK to show that the frame has been received. JPR COMPUTER NETWORKS Medium Access Control Sub Layer The following diagram shows the data flow in WLAN. JPR COMPUTER NETWORKS 14 Medium Access Control Sub Layer PCF Is an optional layer in WLAN. It is implemented on top of DCF and is for time sensitivity transmission. PCF h li d i f lli h d PCF has a centralized, contention-free polling method. wireless transmission is very noisy, corrupted frames need to transmit. The WLAN divide the large frames into small fragments and it is more efficient to handle small frames than large one. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Frame Format The MAC layer frame consists of 9 fields Fr ame Contr ol It is two byte filed and defines type of frame & some control y yp information. The purpose of each sub-filed explained below. JPR COMPUTER NETWORKS Medium Access Control Sub Layer The FC subfileds are JPR COMPUTER NETWORKS Medium Access Control Sub Layer D: In all the frames this filed defines duration of the frame. But in control frame, this field defines ID of the frame. Addr esses There are 4 address filed each of 6-byte long. The meaning of each filed depends on direction of data flow. Sequence Contr ol: It define sequence number of frames used in flow control. Fr ame Body This filed contains data in between 0 to 2312 bytes. 3 y It contains information based on the type of the frame. FCS: It is 4 byte filed. It uses CRC-32 for error detection. JPR COMPUTER NETWORKS 15 Medium Access Control Sub Layer Types of Fr ames A wireless LAN defines three types of frames and are management, control & data frames. For Ex: control frames for accessing the channel & ack. Th l f i d ifi d b d & b fi ld The control frames are indentified based on type & sub-type fields in FC filed. Type value o1 indicates control frame. The different control frames are JPR COMPUTER NETWORKS Medium Access Control Sub Layer Addr essi ng Mechani sm Addressing mechanism specifies 4 cases. The cases are defined by using two flag fields ToDS & FromDS in FC. E h fi ld b i h d l i f diff Each field can be either 0 or 1 and resulting four different cases. Case 1: 0 0 In this case ToDS is 0 and FromDS is 0. This means the frame is not going to DS & frame is not coming from DS. The frame is going from station to another station in side BSS. Address1 contains destination address. Address2 contains source address. Address3 contains BSS-ID. Addrees4 not in use. JPR COMPUTER NETWORKS Medium Access Control Sub Layer The following diagram shows the communication of case1. Case 2: 0 1 In this case ToDS is 0 and From DS is 1. The frame is coming from DS, it means frame is going to station and coming from an AP. Address1 destination station address. Address2 sending AP address. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Address3 source station address. Addess4 not in use. Following diagram shows the data flow in case2. Case 3: 1 0 In this case ToDS is 1 and From DS is 0. The frame is going to DS, it means frame is coming from station and going to an AP. Address1 Receiving AP address. Address2 source station address. JPR COMPUTER NETWORKS 16 Medium Access Control Sub Layer Address3 destination station address. Addess4 not in use. Following diagram shows the data flow in case3. Case4: 11 4 In this case ToDS is 1 and From DS is 1. The frame is going from one AP to another AP. Address1 destination AP address. Address2 source AP address. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Address3 destination station address. Addess4 source station address. Following diagram shows the data flow in case4. JPR COMPUTER NETWORKS Medium Access Control Sub Layer The following table shows the address in each case. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Br i dges LAN may need to cover more distance than the media can handle effectively. Number of stations may be too great for efficient frame delivery f h k or management of the network. An internetwork or internet is two or more networks connected for exchanging resources. Common devices used: repeaters, bridges, routers and gateways. Connecti ng Devi ces Five types: Repeaters Hubs Bridges Two- and three-layer switches Gateway JPR COMPUTER NETWORKS 17 Medium Access Control Sub Layer Connecting devices operate in different layers Note : gateway operate in all five layers of the internet model. g y p y JPR COMPUTER NETWORKS Medium Access Control Sub Layer Br i dge functi ons Operate in both physical and data link layers. Used to divide a network into smaller segments. May also relay frames between separate LANs. Keeps traffic from each segment separate and useful for controlling congestion and provides isolation, as well as security. Checks address of frame and only forwards to segment to which address belongs. The following diagram shows the bridge functionality g g g y JPR COMPUTER NETWORKS Medium Access Control Sub Layer Br i dge JPR COMPUTER NETWORKS Medium Access Control Sub Layer The bridge can transmit the frame across the network. The bridge has a table used in filtering. A bridge does not change the MAC address, it means MAC address transport across the bridge. JPR COMPUTER NETWORKS 18 Medium Access Control Sub Layer Types of br i dges 1. Tr anspar ent br i dges. 2. Sour ce r outi ng br i dges. Tr anspar ent br i dges In this network stations are completely unaware of the bridges existence. If the bridge is added or deleted completely transparent to the stations. A N/W with transparent bridges must meet three criteria 1. Frames must forward from one station to another. 2. The table is automatically made by learning frame movements in the network. 3. Loops in the system must be prevented. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Lear ni ng Br i dges or dynami c constr ucti on of Br i dge Table To construct dynamic table, we need bridge that gradually learns from frame movements. To do this, bridge inspects both the destination & sources addresses addresses. The destination address for the forwarding decision. The source address for adding entries in the table. The learning process explained with the following example. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Loop Pr oblem Transparent bridges work fine as long as there are no redundant bridges in the system. Redundant bridges means more than one bridge between pair of LANs. Redundant bridges are standby bridges for handling bridge failures. The following diagrams shows creation of loop in a system with two LANs. For Ex: A System exits with two bridges & Two LANs For Ex: A System exits with two bridges & Two LANs. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Station A sends a frame to station D, both the bridges are empty , both of them forward frame & update its tables. Now two copies of frame on LAN2. JPR COMPUTER NETWORKS 19 Medium Access Control Sub Layer Now the two copies of frame on LAN1 and both the copies flood the network. This process continues and so on and form a loop. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Spanni ng Tree Spanning Tree is graph with no loops. To construct n/w as a graph with bridges are vertices & LANs are edges. From the graph construct minimum spanning tree. Redundant bridges may be installed to provide reliability. To prevent infinite looping of packets between bridges, a spanning tree algorithm is used to identify any redundant paths. Path with lowest cost will be identified and used as the Path with lowest cost will be identified and used as the primary route that communications will be routed through; in the event of blocking or bridge failure, secondary routes may be used. JPR COMPUTER NETWORKS Medium Access Control Sub Layer Sour ce Routi ng Br i dges The presence of bridges in a system are aware of stations. The source routing bridges are eliminate the loops. Sender of packet defines bridges and routes that packet should take before reach the destination. Complete path of bridge IDs and destination address is defined within the frame. Bridge routing table is not used. JPR COMPUTER NETWORKS