unit-iv computer net works

Upload: krishna-sagar

Post on 03-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Unit-IV computer net works

    1/19

  • 8/11/2019 Unit-IV computer net works

    2/19

    2

    Medium Access Control Sub Layer2 . Si n g l e Ch a n n el A s sum p t i o n

    A single channel is available for all communication.

    All stations can transmit and receive on it only.

    3 . Co l l i si o n A ssum p t i o n

    If two frames are transmitted simultaneously, the overlap in timeand the resulting signal is garbled.

    This event is called collision.

    All stations can detect collisions and collided frames must beretransmit.

    4 a . Con t i n ues T im e Frame Transmission begin at any instant of time.

    There is no matter clock dividing time into discrete intervals.

    4b .Sl o t t e d T im e

    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 . Ca r r i e r Sen se

    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 ituntil it goes idle.

    5b . No Ca r r i e r Sen se

    A station cant sense before trying to use it.

    They just go ahead and transmit.

    Later they will check whether the transmission was successful ornot.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerM u l t i p l e Ac ce ss P r o t o c o l s

    Access Control defines

    When a station can access the medium.

    What to do when the medium is busy.

    .

    What should be done if there is an access conflict.

    A LOHA P r o t o co l

    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 sharedmedia.

    There is a possibility of collision in this mechanism.

    There are two types of ALOHA.

    P u r e A LOHA

    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 ofcollision.

    .

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    3/19

    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 relieson ACK from the receiver.

    - ,assumes frames lost or damage and then retransmit.

    Suppose more than two stations try to resent at the same timeagain collision is occurred.

    Instead of resent immediately, a station wait random amount oftime and then resent.

    ,this back-off time TB.

    Pure ALOHA resent several number of times(Kmax) and try later forretransmission.

    The following flowchart shows the functionality of pure ALOHA.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub

    LayerPure 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 pureALOHA.

    S l ot t e d A LOH A

    Time is divided into slots and force the station to send only at thebeginning of the slot.

    If station misses this moment, it wait until the beginning of thenext time slot.

    There is still the possibility of collision, if two stations try to send.

    The following diagram shows the collision in slotted ALOHA.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerCollision in slotted ALOHA

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    4/19

    4

    Medium Access Control Sub LayerCa r r i e r Sen se M u l t i p l e Ac ces s(CSM A )

    To minimize the collision and improve the efficiency, the CSMAmethod was developed.

    In this mechanism, a station sense the medium before trying to use.

    CSMA requires that each station first listen the medium beforesending the frame.

    CSMA based on the principle sense before transmission or listenbefore talk.

    CSMA can reduce the possibility of collision, but it can not.

    Propagation delay may still result in collisions.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerPers i s t ence S t r a tegy

    It defines procedures for a station that senses a busy medium.

    Non p e r s i st e n t :

    A station that has a frame to send sense the line.

    , .

    It the line is not idle, it wait random amount of time again sensethe carrier.

    It minimize the collisions, but two or more stations wait sameamount of time there is chance of collision.

    Pers i s t en t :

    station sends a frame after sensing the line 1-persistent station sends immediately

    p-persistent station sends with probabilityp if it finds the lineidle 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.

    Ca r r i e r Sens e Mu l t i p l e Ac c es s w i t h Co l l i si o n De t e ct i o n ( CSMA / CD ) .

    Station sends a frame, then monitors the medium to see if thetransmission was successful.

    If a collision is detected, jamming signal is transmitted and exponentialbackoff 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

  • 8/11/2019 Unit-IV computer net works

    5/19

    5

    Medium Access Control Sub Layer Flow Graph of CSMA/CD

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerCa r r i e r Sen se M u l t i p l e Ac ce ss w i t h Co l l i s i o n

    A v o i d a n c e( CSM A /CA )

    It is used in wireless LANs.

    To need collision avoidance on wireless LANs, because they can not.

    Collisions are avoided through three strategies

    1. Interframespace

    2. Contention window

    3. ACK.

    1. InterframeSpace For avoiding the collisions, when the idle channel is found, the

    station does not send immediately, it will wait a period of timecalled the i n t e r f a r m e s p a ce( I F S) .

    The IFS time allow the inline frame (transmitting frame) to reachthe destination.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer2. Contention Window

    If after IFS, channel is idle, it will further wait time equal to thecontention time.

    The contention window is an amount of time divided into slots.

    e num er o s ots n a w n ow c anges accor ng to ac -ostrategy.

    If the station finds the channel busy, it does not restart the timerof the contention window, but it stops the timer and restart it

    when the channel becomes idle.

    3. Acknowledgement

    ,occurred during transmission or corrupted during transmission.

    CSMA/CA uses positive ACK & time-outs for efficienttransmission.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer Flow diagram of CSMA/CA

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    6/19

  • 8/11/2019 Unit-IV computer net works

    7/19

  • 8/11/2019 Unit-IV computer net works

    8/19

    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 ofthe frame.

    address of the next destination; if packet must reach another LAN,this field contains the physical address of the router; upon reachingthe target network, field then contains the physical address of thedestination device.

    Source address (SA) six byte field containing physical address of

    last station to forward packet, sending station or most recentrouter

    Length/type two bytes indicating number of bytes in comingPDU; if fixed length, can indicate type

    Data 46 to 1500 bytes

    CRC CRC-32 error detection informationJPR COMPUTER NETWORKS

    Medium Access Control Sub Layer Ethernet

    Frame

    Length

    Requiresaminimumlengthof512bits(64bytes) toallowfor

    correct

    operation

    of

    CSMA/CD

    Minimumpayloadlength46bytes

    Maximumlengthissetto12,144bits(1518bytes)

    Maximumpayloadlength1500bytes

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer E t he r n e t Add r e ss i n g

    Each station on the network must have a unique physical address

    Provided by a six-byte physical address encoded on the networkinterface card (NIC).

    orma y wr tten n exa ec ma notat on.

    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 LayerE t h e r n e t Im p l em en t a t i o n

    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 bystat on to w c t s a resse .

    Ca t eg o r i e s o f t r a d i t i o n a l / st a n d a r d E t h e r n e t

    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

    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

  • 8/11/2019 Unit-IV computer net works

    9/19

  • 8/11/2019 Unit-IV computer net works

    10/19

    10

    Medium Access Control Sub Layer

    Th i n n et Ch a r a c t er i s t i 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 splicingdirectly into the cable, eliminating need for AUI cables.

    BNC-T connector T-shaped device with 3 ports: one for the NICand one each for input/output ends of cable.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer Th i nNe t Cab l i n g & Connec t o r s

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer

    10Ba se- T : Tw i s t ed Pa i r E t h e r n e t

    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 stationlength of 100 meters

    Transceiver operations are carried out in an intelligent hub.

    NIC reads destination address of frame and only opens if itmatches that address.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer

    10Base-T

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    11/19

    11

    Medium Access Control Sub Layer10B ase-F : Fi b e r L i n k E t h e r n e t

    Uses star topology to connect stations to a hub

    External transceiver called a fiber-optic MAU connects processingdevice to fiber-optic cables via a 15-wire transceiver

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerOthe r e t h er n e t s

    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 LayerW i r e l es s LAN

    I E EE define the specifications for the wirelessLAN, called IEEE802.11.

    It covers the Physical Layer & Data Link Layer.

    A r c h i t e c t u r e

    wirelessLAN defines two kinds of stations

    1. Basic Service Set (BSS).

    2. Extended Service Set(ESS).

    BSS

    Basic service set (BSS) stationary or mobile wireless stations anda centra ase stat on nown as an access po nt .

    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 toother 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 infrastructurenetwork.

    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 wiredLAN.

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    12/19

    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 LayerS t a t i o n Type s

    IEE802.11 defines three types of stations based on their mobility inWirelessLAN

    1. N o -t r a n si t i on m o bi l i ty either stationary or moving only.

    2 . B SS- t r a n si t i o n m o b i li t y can move from one BSS to another,but confined inside one ESS.

    3 . E SS- t r a n si t i o n m o b i li t y can move from one ESS to another.

    P h y si ca l L a y e r i n W L AN

    There are six specifications in WLAN.

    e o ow ng agram s ows p ys ca ayer mp ementat ons

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerFHSS

    Frequency-hopping spread spectrum in a 2.4 GHz band.

    Carrier sends on one frequency for short duration then hops toanother frequency for same duration, hops again to another forsame amoun o me an so on

    Spreading adds security since only sender and receiver agree onsequence 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

    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 themconcurrently on different frequencies .

    Modulation is PSK BPSK or QPSK data rate is 1 or 2 Mb s.

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    13/19

    13

    Medium Access Control Sub Layer80 2 .11a OFD M

    Orthogonal frequency-division multiplexing using a 5-GHzband.

    Same as FDM except all subbands are used by only one sourceat a g ven t me.

    Security increased by assigning sub-bands randomly.

    UsesPSKandQAM,yieldingdataratesof18Mbps(PSK)and54Mbps(QAM)

    80 2 .11b H R-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 Layer80 2 .11g OFD M

    Uses OFDM with 2.4 GHz band.

    Achieves a 54-Mbps data rate.

    It defines forward error correction.

    Works with same 802.11b equipment.

    M AC sub - l a y e r

    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 LayerD CF

    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 timecalled 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 calledshort interframe space(SIFS) and the sends a control frame calledt e c ear to sen .

    6. The station send data after waiting an amount of time equal toSIFS.

    7. The receiving station after SIFS, send ACK to show that the framehas been received.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer The following diagram shows the data flow in WLAN.

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    14/19

    14

    Medium Access Control Sub LayerPCF

    Is an optional layer in WLAN.

    It is implemented on top of DCF and is for time sensitivitytransmission.

    as a centra ze , content on- ree po ng met o .

    wireless transmission is very noisy, corrupted frames need totransmit.

    The WLAN divide the large frames into small fragments and it ismore efficient to handle small frames than large one.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerF r ame Fo rm a t

    The MAC layer frame consists of 9 fields

    F r am e Con t r o l

    It is two b te filed and defines t e of frame & some controlinformation.

    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 LayerD:

    In all the frames this filed defines duration of the frame.

    But in control frame, this field defines ID of the frame.

    Ad d r esses

    There are 4 address filed each of 6-byte long.

    The meaning of each filed depends on direction of data flow.

    Sequence Con t r o l :

    It define sequence number of frames used in flow control.

    F r am e B o d y

    This filed contains data in between 0 to 2312 b tes.

    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

  • 8/11/2019 Unit-IV computer net works

    15/19

    15

    Medium Access Control Sub LayerTyp e s o f F r am es

    A wireless LAN defines three types of frames and are management,control & data frames.

    For Ex: control frames for accessing the channel & ack.

    e contro rames are n ent e ase on type su -type e sin FC filed.

    Type value o1 indicates control frame.

    The different control frames are

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerAdd r e ss i n g Mechan i sm

    Addressing mechanism specifies 4 cases.

    The cases are defined by using two flag fields ToDS & FromDS inFC.

    ac e can e e t er 0 or 1 an resu t ng our erent 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 comingfrom 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 stationand 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 stationand going to an AP.

    Address1 Receiving AP address.

    Address2 source station address.

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    16/19

    16

    Medium Access Control Sub Layer

    Address3 destination station address.

    Addess4 not in use.

    Following diagram shows the data flow in case3.

    Case4: 11 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 LayerB r i d g e s

    LAN may need to cover more distance than the media canhandle effectively.

    Number of stations may be too great for efficient frame deliveryor management o t e networ .

    An internetwork or internetis two or more networks connectedfor exchanging resources.

    Common devices used: repeaters, bridges, routers and gateways.

    Connec t i n g Dev i c es

    Five types:

    Repeaters

    Hubs

    Bridges

    Two- and three-layer switches

    GatewayJPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    17/19

    17

    Medium Access Control Sub Layer

    Connecting devices operate in different layers

    Note : atewa o erate in all five la ers of the internet model.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerB r i d g e fu n c t i o n s

    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 forcontrolling congestion and provides isolation, as well assecurity.

    Checks address of frame and only forwards to segment to whichaddress belongs.

    The following diagram shows the bridge functionality

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerB r i d g e

    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 addresstransport across the bridge.

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    18/19

    18

    Medium Access Control Sub LayerTyp e s o f b r i d g e s

    1. T r a n s pa r e n t b r i d g es.

    2 . So u r c e r o u t i n g b r i d g es.

    T r a n sp a r e n t b r i d g es

    In this network stations are completely unaware of the bridgesexistence.

    If the bridge is added or deleted completely transparent to thestations.

    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 inthe network.

    3. Loops in the system must be prevented.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub LayerL e a r n i n g B r i d g es o r d y n am i c co n s t r u c t i o n o f B r i d g e Ta b l e

    To construct dynamic table, we need bridge that gradually learnsfrom frame movements.

    To do this, bridge inspects both the destination & sources.

    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

    L o o p P r o b l em

    Transparent bridges work fine as long as there are noredundant bridges in the system.

    Redundant bridges means more than one bridge between pairof LANs.

    Redundant bridges are standby bridges for handling bridgefailures.

    The following diagrams shows creation of loop in a systemwith two LANs.

    .

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer

    Station A sends a frame to station D, both the bridges areempty , both of them forward frame & update its tables.

    Now two copies of frame on LAN2.

    JPR COMPUTER NETWORKS

  • 8/11/2019 Unit-IV computer net works

    19/19

    19

    Medium Access Control Sub Layer

    Now the two copies of frame on LAN1 and both the copies flood thenetwork.

    This process continues and so on and form a loop.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer

    Sp a n n i n g T r ee

    Spanning Tree is graph with no loops.

    To construct n/w as a graph with bridges are vertices & LANsare edges.

    From the graph construct minimum spanning tree.

    Redundant bridges may be installed to provide reliability.

    To prevent infinite looping of packets between bridges, aspanning tree algorithm is used to identify any redundantpaths.

    primary route that communications will be routed through;in the event of blocking or bridge failure, secondary routesmay be used.

    JPR COMPUTER NETWORKS

    Medium Access Control Sub Layer Sou r c e Rou t i n g B r i d g e s

    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 shouldtake before reach the destination.

    Complete path of bridge IDs and destination address is definedwithin the frame.

    Bridge routing table is not used.

    JPR COMPUTER NETWORKS