Top Banner
Prof. Chintan patel [email protected] MEFGI , Rajkot
161

Unit 4 mac layer

Dec 18, 2014

Download

Education

Chintan Patel

Computer network: medium access control sub layer : Something about ALOHA,CSMA, COLLISION FREE protocol....Adaptive tree protocol, ETHERNET,WDMA, Internet working device....
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Unit 4 mac layer

Prof. Chintan patel

[email protected]

MEFGI , Rajkot

Page 2: Unit 4 mac layer

Upper sub layer – responsible for data link control

•Called LLC – for flow and error control

Lower sub layer - responsible for resolving access the shared media

•Called MAC – for multiple access resolution

Page 3: Unit 4 mac layer

• In any broadcast n/w , Key issue is how to determine who gets to usethe channel when there is competition.

• Example :Difference between meeting in Conference call andconference hall.

• When node or stations are connected and use a common link , calleda multipoint or broadcast link, We need medium access protocol tocoordinate that link.

• Protocol used to determine who goes next on a multi access channelbelong to sub layer of the data link layer called the MAC(Mediumaccess control) sub layer.

Important for LAN connection

Page 4: Unit 4 mac layer

• Static channel allocation in LANs and MANs.

FDM (Frequency division multiplexing) :

If there are n users , bandwidth is divided into N-Equal sized portions, Each user will get one portion

Page 5: Unit 4 mac layer

• If small and constant number of users is there ,than FDM is simpleand efficient allocation.

• If number of user is varying traffic is more.

• If spectrum is cut into N regions and fewer than N users areinterested than waste of frequency and if more than N users areinterested than permission will be denied because of lack offrequency.

• TIME DIVISION MULTIPLEXING : Same problem , if allocated timeslot will be not used by user than waste of time , even though anotheruser is waiting.

Page 6: Unit 4 mac layer

• Assume interarrival and service time distributions are exponential:

• N = number of stations = 10

• C = capacity of the channel in bits per second = 10,000 bits/sec

• 1 / x = mean bits / frame = 1,000 bits

• x C = service rate of the channel in frames / second = 10 frames /sec

• Y = total rate at which frames arrive = 5 frames /sec

• T = mean delay = 1 / ( xC - y) = 1 / (10 - 5) = 0.2 secs

• Now suppose we could subdivide channel using FDM or TDM

• xC / N = new capacity of each subchannel = 1 frame / sec

• y / N = arrival rate of each station = 0.5 frames / sec

• T = 1 / ( x C / N - y/N) = N / ( x C - y) = 10 / (10 - 5) = 2 secs

Page 7: Unit 4 mac layer

• Five Key Assumption :

1 : Station model :

N independent station or terminals are there , which will be blockedand do nothing until frame has successfully transmitted.

2 : Single channel Assumption :

Single channel is available , All station can transmit and receive on it.

Based on protocol , priority is decided.

3 : Collision Assumption :

If two frames are simultaneously transmitted , they overlap in time andresulting signal is garbled. Its called as Collision.

Collision can be detected by all station.

4 a: Continuous time :

Frame transmission can be start at any time. There is no masterclock dividing time into discrete network.

Page 8: Unit 4 mac layer

• 4b : Slotted time :

Time is divided into slots , frame transmission always begins at start ofslots. A slot may contain 0 , 1 or more frames.

Frame may be transmitted at distinct clock ticks.

• 5a : Carrier sense :

stations can tell if the channel is in use before trying to use it. If thechannel is sensed busy, no station will attempt to use it until it becomesideal.

• 5b : No carrier sense :

Station can not sense before using it. Only later they determine weathertransmission is success or not.

Not possible to determine , if channel is in use

• Only one channel , no external communication can possible.

Page 9: Unit 4 mac layer

• Approaches to controlling channel access

Contention: Just start transmitting (Collision susceptible)

Token passing: Can't transmit until you receive token (Collision free)

Reservation: Make a prior reservation (Collision free)

Hybrid: Contention based reservation systems.

Page 10: Unit 4 mac layer

Taxonomy of multiple-access protocols discussed in this chapter

Page 11: Unit 4 mac layer

• Also called as contention

• No station is superior to another station and none is assigned control overanother.

No scheduled time for a station to transmit. Transmission is randomamong the stations so its called random method.

No rules specify which station will transmit next. Station will competewith each other. That’s why called as contention.

If more than one station tries to send , there is an access conflict –collision – and the frames will be either dropped or destroyed.

• ALOHA : Uses Multiple Access method .

• CSMA/ CD : Carrier sense multiple access / collision detection

• CSMA / CA : Carrier sense multiple access / Collision avoidance

Page 12: Unit 4 mac layer

• Developed by students of university of Hawaii.

• 1 : Pure ALOHA

• 2 : Slotted ALOHA

• Differs based on time is divided into discrete slots into which allframes must fit.

• Pure ALOHA does not require global time synchronization , Butslotted ALOHA requires it.

• When a station sends a data , another station may attempt to do so atthe same time, Data form two station collide and become garbled

Page 13: Unit 4 mac layer

• Simple but elegant protocol

• “Each station send a frame whenever it has a frame to send. However , sincethere is only one channel to share, There is the possibility of collisionbetween frames from different stations. If the message collides with anothertransmission, try resending later”.

Page 14: Unit 4 mac layer

• NOTE :

• Contention occurs whenever two or more stations compete for the right to transmit on a single medium. Somehow, one eventually gains the right to transmit. “Contention is for stations.”

• Congestion : When flow of data is more from sender side.

• A collision is the result of two devices on the same network attempting to transmit data at the same time. The network detects the "collision" of the two transmitted packets and uses method (such as CSMA/CD) of allowing devices to "take turns“ using the signal carrier line. ”collision is for packet or frame”.

Page 15: Unit 4 mac layer

• Total 8 frames by 4 station on shared medium. Some frames are collidebecause multiple frames are in contention for the shared channel.

• Only two frames survive : frame from station 1 , frame 1.1 and frame 3.2from station 3.

• “If one bit of a frame coexist with one bit of another frame , there is acollision and both will be destroyed”.

• Pure ALOHA protocol totally relies on ack. From the receiver , when a stationsends a frame , it expects the receiver to send ack. If ack. Does not arriveafter time out , station assumes that either frame is lost or ack. Is lost. Andresend it.

• Collision involves two or more stations , if all station try to resend at thesame time , Frame will collide again. Pure ALOHA dictates that when thetime-out period passes, Each station waits a random amount of time beforeresending its frame. This time is called as back-off time TB

Page 16: Unit 4 mac layer

• Pure ALOHA has second method to prevent congesting the channel withretransmission. After a maximum number of retransmission attempts Kmax.

A station must give up and try later.

Figure : Procedure for pure ALOHA protocol

Page 17: Unit 4 mac layer

• Station on a wireless ALOHA n/w are a maximum of 600 km apart. If we assume that signals propagate at 3 * 108 m/s . Find Tp.

• Tp = maximum propagation time.

• Find TB for different values of K.

• If k = 0

• If k = 1

• If k = 2

Page 18: Unit 4 mac layer

• Lets find length of time , the vulnerable time, in which there is possibility ofcollision , We assume that station send fixed-length frames with each frametaking Tfr s to send.

• Figure shows vulnerable time for A.

Page 19: Unit 4 mac layer

• Pure ALOHA vulnerable time = 2 * Tfr.

• Example : a pure aloha n/w transmits 200 bits frames on a shared channel of200 Kbps . What is requirement to make this frame collision free.

• Throughput : Let G is total no. of frames generated by system during oneframe transmission .

• Average no. of successful transmission for pure ALOHA , S = G * e-2G

• Smax = 0.184 if G = ½ , means if one half frame is generated during one frametransmission time then 18.4 % of these frames reach their destinationsuccessfully.

• Example : 200 bit frames on shared channel of 200 kbps , findthroughput if system produces 1000 frames per second.

Page 20: Unit 4 mac layer

• In slotted ALOHA , we divide the time slot into slots of Tfr s and forcethe station to send only at the beginning of the time slot.

Page 21: Unit 4 mac layer

• Because a station is allowed to send only at the beginning of thesynchronization time slot, if station misses the moment , it must waituntil new time slot started.

• But if two station start the sending at the same timeslot….Collision?????

• Slotted ALOHA vulnerable time = Tfr

• Throughput = G * e-G .

• Maximum throughput Smax = 0.328 when G = 1.

• Vulnerable time = transmission time. So if a station generatesonly one frame in this time , the frame will reach its destinationsuccessfully

Page 22: Unit 4 mac layer

Vulnerable time for slotted ALOHA protocol

Page 23: Unit 4 mac layer

• A slotted ALOHA n/w transmits 200 bit frames using a shared channel with a 200 kbps B/W. Find throughput if the system produces

• a : 1000 frames per second

• b : 500 frames per second

Page 24: Unit 4 mac layer

• 1980 : Frequencies for mobile n/w became available.

• 1985 : ALOHA random access technique used in wi-fi as well as Mobile n/w.

• 1980 : used in 1G mobile system for signaling and control purpose.

• 1980s, the European standardization group GSM greatly expanded the use ofALOHA channels for access to radio channels in mobile telephony.

• In addition SMS message texting was implemented in 2G mobilephones.

• In the early 2000s additional ALOHA channels were added to 2.5G and3G mobile phones with the widespread introduction of GPRS.

• Slotted ALOHA is used in low-data-rate satellitecommunications networks by military forces, in subscriber-based satellitecommunications networks, mobile telephony call setup, set-top boxcommunications and in the contactless RFID technologies.

• Link for RFID: http://en.wikipedia.org/wiki/RFID

• Link for GSM : http://en.wikipedia.org/wiki/GSM

Page 25: Unit 4 mac layer

• To minimize the chance of collision , increase the performance , the CSMA method wasdeveloped.

• Chance of collision can be reduced if a station senses the medium before trying to useit. CSMA principle “Sense before transmission ” or “ Listen before talk”.

• ETHERNET uses CSMA as a Access control Method

• Carrier sense multiple access (CSMA) is a probabilistic media accesscontrol (MAC) protocol in which a node verifies the absence ofother traffic before transmitting on a shared transmission medium, such as anelectrical bus, or a band of the electromagnetic spectrum.

• Carrier sense means that a transmitter uses feedback from a receiver to determinewhether another transmission is in progress before initiating a transmission. That is,it tries to detect the presence of a carrier wave from another station before attemptingto transmit. If a carrier is sensed, the station waits for the transmission in progress tofinish before initiating its own transmission.

Page 26: Unit 4 mac layer
Page 27: Unit 4 mac layer

• t1 , station B senses the medium and finds it ideal, so it sends aframe . At time t2 (t2 > t1), station C senses the channel and finds itideal because the first bit of B have not reached station C. so station Calso sends a frame . Two signal collide and both are destroyed

• The probability of collision still exist because of propagation delay ;when a station sends a frame , it still takes a time for the first bit toreach every station and for every station to sense it.

• So station may sense the medium ideal only because first bit sent byanother station is not received.

• Vulnerable Time = Propagation Time(Tp)

Page 28: Unit 4 mac layer

• Vulnerable time : A time needed for a signal to propagate from oneend of medium to another end.

• When a station sends a frame , and any other station tries to send aframe during this time, A collision will result but if the first bit of theframe reaches the end of the medium , every station will have heardthe bit, so they will send later.

• Station A send a frame at t1 , reach to D at t1 + Tp

Page 29: Unit 4 mac layer
Page 30: Unit 4 mac layer
Page 31: Unit 4 mac layer
Page 32: Unit 4 mac layer
Page 33: Unit 4 mac layer

• What should a station do if channel is busy ??

• What should a station do if channel is ideal ??

• 3 Methods :

1 persistence method.

Non persistence method.

P persistence method.

Page 34: Unit 4 mac layer

1-Persistent CSMA•In this method, station that wants to transmit data continuously sense

the Channel to check whether the channel is idle or busy.

•If the channel is busy , the station waits until it becomes idle.

•When the station detects an idle channel, it immediately transmits

the frame with probability 1. Hence it is called 1-persistent CSMA.

•This method has the highest chance of collision because two or

more station may find channel to be idle at the same time and

transmit their frames.

•When the collision occurs, the stations wait a random amount of

time and start all over again.

Page 35: Unit 4 mac layer

Drawback of 1-persistent

•The propagation delay time greatly affects this protocol. Let us suppose,

just after the station 1 begins its transmission, station 2 also become

ready to send its data and sense the channel. If the station 1 signal has not

yet reached station 2, station 2 will sense the channel to be idle and will

begin its transmission. This will result in collision.

Page 36: Unit 4 mac layer

Non –persistent CSMA

•A station that has a frame to send senses the channel.

•If the channel is idle, it send immediately.

•If the channel is busy, it waits a random amount of time

and then senses the channel again.

•In non-persistent CSMA the station does not continuously

sense the channel for purpose of capturing it when it

defects the end of precious transmission .

Advantages of non-persistent

•It reduces the chances of collision because the stations wait a

random amount of time. It is unlikely that two or more stations

Will wait for same amount of time and will retransmit at the

same time.

Page 37: Unit 4 mac layer

Disadvantages of non-persistent

•It reduces the efficiency of network because the channel

remains idle when there may be station with frames to send.

This is due to the fact that the stations wait a random amount

of time after the collision.

Page 38: Unit 4 mac layer

p-persistent CSMA

•This method is used when channel has time slots such that the time slot

duration is equal to or greater than the maximum propagation delay time.

•Whenever a station becomes ready to send the channel.

•If channel is busy, station waits until next slot.

•If the channel is idle, it transmits with a probability p.

•With the probability q=1-p, the station then waits for the beginning of the

next time slot.

•If the next slot is also idle, it either transmits or wait again with probabilities p and q.

•This process is repeated till either frame has been transmitted or another station has

begun transmitting.

•In case of the transmission by another station, the station act as though a collision has

occurred and it waits a random amount of time and starts again.

Page 39: Unit 4 mac layer

Advantages of p-persistent

•it reduce the chances of collision and improve the efficiency of the network.

Page 40: Unit 4 mac layer
Page 41: Unit 4 mac layer

• CSMA/CD is Carrier Sense Multiple Access / Collision Detection :

- Carrier Sense – the ability of a network card to sense or detect

communication on the network

- Multiple Access – states that in that network there are multiple stations that

could access the network at the same time

- Collision Detection – the method needed for detecting a collision

• Carrier Sense Multiple Access/Collision Detect (CSMA/CD) is the protocol for

carrier transmission access in Ethernet networks.

• Carrier-sense multiple access with collision detection describes how the

Ethernet protocol regulates communication among nodes

• On Ethernet, any station can send a frame at any time. Each station senses whether

the medium is idle and therefore available for use. If it is, the station begins to transmit

its first frame. If another station also tries to transmit at the same time, a collision

occurs and the frames are discarded and then a jamming signal is sent throughout the

network in order to notify all stations of the collision. Each station then waits for a

random period of time and retries. If another collision occurs, the time intervals from

which the random waiting time is selected are increased step by step. This is known as

exponential back off. The stations retry until successful transmission of the frame.

Page 42: Unit 4 mac layer
Page 43: Unit 4 mac layer

Collision and abortion in CSMA/CD

Page 44: Unit 4 mac layer

MINIMUM FRAME SIZE IN CSMA/CD PROTOCOL IS

1. Round Trip time = transmission time

2. 2 * propagation time = size of packet/bandwidth

3. Size of frame = (2 * propagation time) * bandwidth

EXAMPLE : A network using CSMA/CD has a bandwidth of 10 Mbps. If the

maximum propagation time (including the delays in the devices and ignoring the

time needed to send a jamming signal, as we see later) is 25.6 μs, what is the

minimum size of the frame?

Ans : ? Bits or ? bytes

Page 45: Unit 4 mac layer

• The jam signal is a signal that carries a 32-bit OR 48 bit binary pattern sent

by a data station to inform the other stations that they must not transmit.

•Transmit – The stations (nodes) sends the frames to other stations (nodes)

• Carrier Sense – The stations (nodes) listen to the medium if it is idle for

transmission

• Back off – After collision occurs, a jam signal is sent to notify all stations of

the collision. After the jam signal is sent, the stations (nodes) wait for a

random period of time called Back off period

• The flow chart for CSMA/CD protocol is :

Page 46: Unit 4 mac layer
Page 47: Unit 4 mac layer
Page 48: Unit 4 mac layer
Page 49: Unit 4 mac layer
Page 50: Unit 4 mac layer

1.A node wants to send a packet over a wireless LAN. What

will CSMA/CD protocol do if the channel is idle?

Answers:

a) Sense the channel and sends the packet immediately if

it is idle

b) Sense the channel and sends the packet if it is still idle

after a random period of time after the jam signal is

sent

c) both a and b

d) either a or b

Page 51: Unit 4 mac layer

2. A node wants to send a packet over a wireless LAN. What

will CSMA/CD protocol do if the channel is busy?

Answers:

a) waits until the channel is idle and sends the packet

immediately

b) waits until the channel is idle and sends the packet if it is

idle even after the jam signal is sent

c) both a and b

d) either a or b

Page 52: Unit 4 mac layer

3. What is the jam signal sent for?

Answers:

a) To stop transmission for a random back off time

b) To avoid further collision

c) To inform all other nodes that there is a collision

d) All the above

Page 53: Unit 4 mac layer

4. What is purpose of CSMA/CD protocol in wireless LAN?

Answers:

a) Create different size of packets

b) Detect collision of packets

c) Avoid collision of packets

d) All the above

Page 54: Unit 4 mac layer
Page 55: Unit 4 mac layer
Page 56: Unit 4 mac layer

• In CSMA/CD , station receives 1 signal when there is no collision. And receives 2 signal when there is a collision.

• To distinguish this 2 signal energy should be different. In wired network repeater will amplify the energy between sender and receiver.

• In collision detected energy will be nearly double

Page 57: Unit 4 mac layer

• In wireless , Much of the sent energy will be lost during transmission. Received signal will have very less energy. Even though if collision occur , it will not add more energy.

• So its not useful for detection.

• For Wireless network CSMA/CA , protocol was established.

Page 58: Unit 4 mac layer

Inter Frame Space - In CSMA/CA, the IFS can also be used to define the priority of a

station or a frame.

Contention window- In CSMA/CA, if the station finds the channel busy,

it does not restart the timer of the contention window;

it stops the timer and restarts it when the channel becomes idle.

Acknowledgment- Positive acknowledgment and time out timer guarantee receiver has

received the frame

Page 59: Unit 4 mac layer
Page 60: Unit 4 mac layer

• Reservation

• Polling

• Token Ring

Page 61: Unit 4 mac layer

• What is meaning of “Reservation”.

• What is meaning of “Interpol”?

• What is meaning of polling ?

Page 62: Unit 4 mac layer

• Pure ALOHA, slotted ALOHA, CSMA andCSMA/CD are contention based protocols

try. If collide, retry.

No guarantee of performance.

What happens if the network load is high?

• Collision free protocols:

pay constant overhead to achieve performanceguarantee

Good when network load is high

Page 63: Unit 4 mac layer

• Controlled access , the station consult with another to find which station has the right to send.

• Assume that , N Stations with 0 to N-1 sequence no. and Propagation delay is near by negligible.

• 1: Reservation

• 2 : Pooling

• 3 : Token Ring

Page 64: Unit 4 mac layer

• Each contention period consists of exactly N slots.

• Station can transmit frame during its own time slot only.

• Since every one agree , who goes next , there will never be anycollision.

• If station becomes ready just after its bit slot has passed by, it is outof luck and must remain silent until every station had a chance andthe bit map has come around again.

• Protocols like this, In which the desire to transmit is broadcast beforethe actual transmission are called reservation protocol.

Page 65: Unit 4 mac layer

“ Station j may announce that it has a frame to send by inserting a 1 bit into

slot j. After all N slots have passed by, each station has complete knowledge

of which station wish to transmit ”

Page 66: Unit 4 mac layer
Page 67: Unit 4 mac layer

• Problem with simple bit map protocol is 1 bit overhead. If thousands of stations are there than???

• Each station sends the address bits in some order(from highest order bit to the lowest order bit).

• The bits in each position from different stationsare ORed.

Page 68: Unit 4 mac layer
Page 69: Unit 4 mac layer

• Works with topology in which one device is designated as a primary station(Master) and other devices are secondary stations(slaves).

• 2 functions :

1 : Select : Used whenever master or primary device has something to send.

2 : poll : Used by primary device when its ready to receive data. Ask(poll) each station ,if it has any thing to send.

Page 70: Unit 4 mac layer
Page 71: Unit 4 mac layer

• Predecessor : Station which is logically beforethe station in Ring.

• Successor : Station which is logically after the station in Ring.

• Token : A special packet , which circulates in Ring.

Possession of Token gives right to station of accessing Link and sending Data.

Page 72: Unit 4 mac layer
Page 73: Unit 4 mac layer
Page 74: Unit 4 mac layer

• Contention for CSMA

• Collision free protocol

• Low load : Contention is good.

• High load : Collision free protocol is good for increasing efficiency.

• Limited contention protocol : Combination of good properties of contentionand collision free protocol.

• “ Uses contention at low load to provide good channel efficiency , Usescollision free protocol in high load to provide good channel efficiency. ”

Page 75: Unit 4 mac layer

• Collision based protocols (ALOHA,CSMA/CD) aregood when the network load is low.

• Collision free protocols (bit map, binaryCountdown) are good when load is high.

• How about combining their advantages -- limitedcontention protocols.

Behave like the ALOHA scheme under light load

Behave like the bitmap scheme under heavy load.

Page 76: Unit 4 mac layer

• Trick: partition the group of station and limit the contention for each slot.

• Under light load, every one can try for each slot like aloha

• Under heavy load, only a small group can try for each slot

• how do we do it treat stations as the leaf of a binary tree.

first slot (after successful transmission), all stations (under the root node) can try to get the slot.

if no conflict, fine.

if conflict, only nodes under a subtree get to try for the next one. (depth first search)

Page 77: Unit 4 mac layer
Page 78: Unit 4 mac layer

• Sixteen stations, numbered 1 through 16, arecontending for the use of a shared channel

• By using the adaptive tree walk protocol. If all thestations whose addresses are prime numbers suddenlybecome ready at once,

• how many bit slots are needed to resolve thecontention?

Page 79: Unit 4 mac layer

• Stations 2, 3, 5, 7, 11, and 13 want to send. Eleven slots are needed, with the contents of each slot being as follows: slot 1: 2, 3, 5, 7, 11, 13 slot 2: 2, 3, 5, 7 slot 3: 2, 3 slot 4: 2 slot 5: 3 slot 6: 5, 7 slot 7: 5 slot 8: 7 slot 9: 11, 13

slot 10: 11 slot 11: 13

Page 80: Unit 4 mac layer

Wavelength division multiple access

• Approach:

Divide channel into sub channels (FDM,…)

Allocate them as needed

• 2 channels/station

Narrow: used by other stations to signal the station:

Wide: used by station to output data frames

Page 81: Unit 4 mac layer
Page 82: Unit 4 mac layer

Wavelength division multiple access

• 2 transmitters & 2 receivers for each station:

Fixed-wavelength receiver for its own control channel

Tunable transmitter for sending on other control channels

Fixed wavelength transmitter for its own data channel

Tunable receiver for other data channels

• Support for 3 traffic classes:

Constant data rate connection oriented traffic

Variable data rate connection oriented traffic

Datagram traffic

Page 83: Unit 4 mac layer

Wavelength division multiple access

• Scenario for variable data rate connection from A to B:

A: tunes on data channel of B

A: waits for status slot & selects free slot on control channel of B (e.g. slot 4)

A: sends on control channel of B, slot 4: connection request

B: announces assignment of slot 4 to A in status slot of its data channel

IF A and C both tunes on B at same time ????

A wants to send data:

A: sends control message to B , Ex : “Please watch my next data output slot 3, There is a data frame for you. ”

B: Gets control message , B: tunes on data channel of A

B: accepts data on slot 3, Sends ACK based on higher level protocol.

IF A and C both tunes on B at same time ????

Page 85: Unit 4 mac layer
Page 86: Unit 4 mac layer

• 1985 , Project 802 started by IEEE

To set the standards for intercommunication

Page 87: Unit 4 mac layer
Page 88: Unit 4 mac layer

• LLC provides one single data link protocol for IEEE LAN.

• Purpose of LLC is to provide flow control and Error control for the upper layer.

• Defines different access method for different LAN

• Example : For ETHERNET LAN : CSMA/CD

• For TOKEN RING : Token passing method

Page 89: Unit 4 mac layer
Page 90: Unit 4 mac layer

• Developed by Xerox in palo Alto research center in 1976

• 10 Mbps

Frame Format :

Page 91: Unit 4 mac layer

• Preamble : Contains 56 bit or 7 byte of alternating 0s and 1s that alerts thereceiving system to the coming frame and enable it to synchronize its inputtiming.

• SFD(Start Frame Delimiter) : pattern : 10101011 (1 byte) , Signalsbeginning of frame and it warns receiving signal for synchronization.

Last 2 bit 11 : It indicates the receiver that Next field is destinationAddress.

• Destination Address : 6 byte, containing _______________Address of the destination station.

• Source Address : 6 byte containing ____________ Address ofsource station

Page 92: Unit 4 mac layer

• Length or Type :

Length of the data field ( Number of bytes in data)

ETHERNET uses this field as a type field upper layer protocol using the MAC Frame.

• Data : Minimum Length 46 bytes and Maximum length is 1500 bytes.

• CRC : For Error Detection

Page 93: Unit 4 mac layer
Page 94: Unit 4 mac layer

• Total Header and Trailer : 18 bytes

• Total Data part : 46 bytes (64 bytes -18 bytes)

• If packet is less than 46 bytes , Padding isrequired.

• Maximum length : 1518 bytes with header andtrailer . Else 1500 bytes of data.

Maximum length helps to reduce the size of buffer

Prevents station from monopolizing the sharedmedium

Page 95: Unit 4 mac layer

• Each station on Ethernet network has its own NIC (Network interface card) which provides physical addressof 6 bytes, In Ethernet address is written in HexadecimalFormat with colon between.

Page 96: Unit 4 mac layer

• Unicast , Multicast , Broadcast Address :

S.A. is always unicast address.

Destination address can be any.

• How to distinguish unicast and multicast address??

If LSB of 1st byte in D.A is 0 its Unicast and if 1 its Multicast

Page 97: Unit 4 mac layer

• Define Types of address :

• ( A ) 7B : 12 : 10 : 21 : 30 : 1C

• (B) 4A : 30 : 10 : 21 : 10 : 1A

• (C) FF : FF : FF : FF : FF : FF

• (D) 47 : 20 : 1B : 2E : 08 : EE

Page 98: Unit 4 mac layer

• Standard Ethernet uses 1-persistant CSMA/CD

• Slot time : Roundtrip time + time required to send Jam sequence

• Slot time in Ethernet is defines based on bits , its time required to transmit 512 bits. Actual time slot depends on Data rate . For 10Mbps Ethernet , its 51.2 micro second

Page 99: Unit 4 mac layer

• 1 : Assume that sender sends minimum size

frame of 512 bits.

Sender must be aware of collision before it sends entireframe.

• 2 : Assume size of frame is > 512 bits and < 1518 bytes.

If sender sends 1st 512 bits and collision not occurred meanscollision will never occur because CSMA /CD protocol is used andsignal will reach at end of N/W before one half of time slot.

Collision can only occur during 1st half of Slot time , if its not occurduring that time means medium belongs to sender.

(ONLY Valid if CSMA / CD protocol)

Page 100: Unit 4 mac layer

• Slot time and Maximum N/W length :

• Maximum length of N/w : Collision domain

• Maximum length : propagation speed * (Slot time/2)

• Most of transmission media, Propagation speed = 2* 108 m/s.

• For standard Ethernet Maximum length is 2500.

Page 101: Unit 4 mac layer
Page 102: Unit 4 mac layer

• Ratio of the Time used by a station to send data to the time the mediumis occupied by this station.

• Efficiency = 1 / (1 + 6.4 * a)

• a = Propagation delay / transmission delay = no. of frames that can befit into medium.

• If value of a decrease , efficiency increase.

• Example : transmission rate = 10 Mbps , length of medium = 2500 m ,size of frame = 512 bits , propagation speed = 2 * 10^8 m/s . Calculateefficiency .

Page 103: Unit 4 mac layer
Page 104: Unit 4 mac layer
Page 105: Unit 4 mac layer

• Called as a 10 Base 5 , thick Ethernet , or Thicknet.

• First Ethernet to use bus topology with an external transceiver connected via thick coaxial cable.

• Transceiver : Responsible for transmission , receiving , Detecting collision.

Connected with station via transceiver cable.

• If cable size of more than 500 m , connected via Repeater.

Page 106: Unit 4 mac layer
Page 107: Unit 4 mac layer

• Called as 10 Base 2 , Think Ethernet , cheapernet

• Also uses bus topology, cable is much thinner andmore flexible.

• Transceiver is normally part of the networkinterface card, which is installed inside thestation.

• More cost effective than 10 Base 5.

• Thin cable is very flexible so installation is easy.

Page 108: Unit 4 mac layer
Page 109: Unit 4 mac layer

• Called as 10 Base T, twisted pair Ethernet.

• Uses physical star topology.

• Connected to hub via two pairs of twisted pair cable.

• Two pair means two path ( One for sending other for receiving ) between station and hub.

• Maximum length of twisted pair cable is 100 m here, to minimize the attenuation

Page 110: Unit 4 mac layer

• Most common type.

• Uses star topology to connect via hub.

Page 111: Unit 4 mac layer
Page 112: Unit 4 mac layer

• Bridged Ethernet : Division of LAN by bridge.

• Bridge : (1) Raise the bandwidth

(2) Separate collision domain

Page 113: Unit 4 mac layer

• Bridge divides network into two or more network , Bandwidth wise each n/w is independent.

Page 114: Unit 4 mac layer

• Collision domain becomes smaller, prob. of collision reduced

• Without bridge 12 station contend to use the medium , with

bridge 3 stations.

Page 115: Unit 4 mac layer

• Instead of 2 to 4 n/w , why not have N(number of station)n/w ??

• A layer-2 switch is an N port bridge with additionalsophistication that allows faster handling of packets

Page 116: Unit 4 mac layer

• Main limitation of 10 base 5 or 10 base 2 is that communication is Halfduplex.

• Full duplex mode increases the capacity of each domain from 10 to 20 Mbps.

• 2 links : For transmit and receive.

• No need of CSMA/CD : Each link is point to point dedicated path betweenstation and Switch.

Page 117: Unit 4 mac layer

• Fast Ethernet was designed to compete with LAN protocols such as

FDDI or Fiber Channel. IEEE created Fast Ethernet under the

name 802.3u. Fast Ethernet is backward-compatible with Standard

Ethernet, but it can transmit data 10 times faster at a rate of 100

Mbps.

• Goals of fast Ethernet :

Upgrade data rate up to 100 Mbps

Make compatible with standard Ethernet

Keep the same 48 bit address

Keep the same frame format

Page 118: Unit 4 mac layer

• CSMA/CD depends on transmission rate , The minimum frame size ,and Maximum n/w length.

• If frame size is minimum and N/W length is maximum thanCollision will occur but Collision detection probability will bereduced.

• Example : If minimum frame size is 512 bits and transmitted 10times faster than collision must be detected 10 times soonerwhich means than maximum length of N/w should be 10 timesshorter.

Page 119: Unit 4 mac layer

• (1 ) Make the maximum size of N/W 250 meter

instead of 2500 meters in standard Ethernet.

• (2) Use Link layer switch , with buffer to store frames and a fullduplex connect to each host to make the transmission mediumprivate for host.

Link layer switch receives a frame from source host and stores itin buffer .

Full duplex : Destination station can also send data at a same time.

Page 120: Unit 4 mac layer

• To allow incompatible devices to connect to one another.

Device with 10 Mbps can communicate with device with 100 Mbps.

• To allow one device to have multiple capabilities

• To allows a station to check a hub’s capabilities.

Page 121: Unit 4 mac layer
Page 122: Unit 4 mac layer
Page 123: Unit 4 mac layer
Page 124: Unit 4 mac layer

• Uses two pair of twisted pair cable.

Category 5 UTP Or STP

• MLT 3 Encoding system

• 125 Mbps data rate.

Page 125: Unit 4 mac layer

• Uses two pairs of fiber optics cable.

• Uses NRZ-I encoding system.

• Uses 4B/5B encoder for bit synchronization.

• Bit rate 100 Mbps to 125 Mbps.

Page 126: Unit 4 mac layer

• Uses category 3 or 4 UTP with 4 pairs.

• Maximum length is 100m

• 8B/6T encoding

Page 127: Unit 4 mac layer

• STANDARD 802.3z.

• Goals:

Upgrade data rate 1 Gbps.

Make compatible with standard or fast Ethernet.

Uses 48bit address.

Uses same frame format.

To support auto negotiation as defined in fast ethernet.

Page 128: Unit 4 mac layer

• Two distinct approaches for medium access.

Half duplex.

Full duplex.

• Traditional.

• Carrier Extension.

• Frame Bursting.

• Topology

Point-to-point.

Star topology.

Tree topology

Page 129: Unit 4 mac layer

• Full-Duplex Mode :

Separate N/W connected by switch.

No collision.

• Half-Duplex Mode :

Connected through Hub

Uses CSMA/CD Approach.

Page 130: Unit 4 mac layer
Page 131: Unit 4 mac layer
Page 132: Unit 4 mac layer
Page 133: Unit 4 mac layer
Page 134: Unit 4 mac layer
Page 135: Unit 4 mac layer

Internetworking Devices

• Internetworking devices are products used to connect networks.

• As computer network grows in size and complexity, so do the

internetworking devices used to connect them.

Broadly, following are the Internetworking devices:

• Repeaters

• Hubs

• Bridges

• Switches

• Routers

• Gateways

Page 136: Unit 4 mac layer

• Networking devices are used to construct networks.

• Example: A local area Network (LAN) may need to cover more

distance that its media can handle effectively. In this case, you

can use a repeater to regenerate the signal.

Page 137: Unit 4 mac layer

• Internetworking devices are used to connect networks.

• Example: If you want to link a LAN into an internet, you

need an internetworking device as a router or a gateway.

• An internet is an interconnection of individual networks.

Page 138: Unit 4 mac layer

Connecting Devices and the OSI Model

Page 139: Unit 4 mac layer

Connecting Devices

Page 140: Unit 4 mac layer

Connecting Devices

Repeaters

Hubs

Bridges

Two-Layer Switches

Page 141: Unit 4 mac layer

Connecting devices

Page 142: Unit 4 mac layer

Repeaters

• A repeater (or regenerator) is an electronic device that operates

on only the physical layer of the OSI model.

• A repeater installed on a link receives the signal before it

becomes too weak or corrupted, regenerates the original pattern,

and puts the refreshed copy back on the link.

Page 143: Unit 4 mac layer

Repeaters

• A repeater does not actually connect two LANS; it connects

two segments of the same LAN.

• A repeater forwards every frame; it has no filtering capability.

Page 144: Unit 4 mac layer

Hubs

• A Hub is a multiport repeater. It is normally used to create

connections between stations in a physical star topology.

Page 145: Unit 4 mac layer

Bridges

• Bridges operate in both the physical and the data link

layers of the OSI model.

Page 146: Unit 4 mac layer

Bridges

• Bridges can divide a large network into smaller segments. They contain

logic that allows them to keep the traffic on each segment separate. When a

frame (or packet) enters a bridge, the bridge not only regenerates the signal

but checks the destination address and forwards the new copy only to the

segment the address belong.

Page 147: Unit 4 mac layer

Bridges

• A bridge operates in both the physical and the data link layers.

• As a physical layer device, it regenerates the signal it receives.

• As a data link layer device, the bridge can check the physical

(MAC) address (source and destination) contained in the

frame.

• A bridge has filtering capability. It can check the destination

address of a frame and decide if the frame should be

forwarded or dropped. If the frame is to be forwarded, the

decision must specify the port.

• A bridge does not change the physical (MAC) addresses in a

frame.

• A bridge has a table used in filtering decisions.

Page 148: Unit 4 mac layer

Bridge

Page 149: Unit 4 mac layer

Types of Bridges

• To select between segments, a bridge must have a look-uptable that contains the physical addresses of every stationconnect to it. The table indicate to which segment eachstation belongs.

Simple Bridge

• The address table must be entered manually, before asimple bridge can be used.

• Whenever a new station is added or removed, the tablemust modified.

• Installation and maintenance of simple bridges are time-consuming and potentially more trouble than the costsavings are worth.

Page 150: Unit 4 mac layer

Types of Bridges

Multiport bridges

A multiport bridge can be used to connect more than two LANs.

Page 151: Unit 4 mac layer

Transparent Bridges

• A transparent, or learning, bridge builds its table of station

addresses on its own as it performs its bridge functions.

• If a transparent bridge is added or removed from the

system, reconfiguration of the stations is unnecessary.

• A transparent bridge must meet following criteria:

1. Frames must be forwarded from one station to another.

2. The forwarding table is automatically made by learning

frame movements in the network.

Page 152: Unit 4 mac layer

Learning Bridge

Page 153: Unit 4 mac layer

Loop Problem

• Transparent bridges work fine as long as there are no

redundant bridges in the system.

• Bridges are normally installed redundantly, which means that

two LANs may be connected by more than one bridge. In this

case, if the bridges are transparent bridges, they may create a

loop, which means a packet may be going round and round,

from one LAN to another and back again to the first LAN.

• To solve the looping problem, the IEEE specification requires

that bridges use the spanning tree algorithm to create a

loopless topology.

Page 154: Unit 4 mac layer
Page 155: Unit 4 mac layer

Spanning Tree

• A spanning tree is a graph in which there is no

loop.

• In a bridged LAN, a loopless topology means a

topology in which each LAN can be reached from

any other LAN through one path only (no loop).

• It is not possible to change the physical topology

of the system, but we can create a logical topology

that overlays the physical one.

Page 156: Unit 4 mac layer

Source Routing

• Another solution to prevent loops in LANs connected by

bridges is source routing.

• In this method, the source of the packet defines the bridges

and the LANs through which the packet should go before

reaching the destination

Page 157: Unit 4 mac layer

Routers

• Routers have access

to network layer

addresses and contain

software that enables

them to determine

which of several

possible paths

between those

addresses is the best

for a particular

transmission.

• Routers operate in the

physical, data link,

and network layers of

the OSI model.

Page 158: Unit 4 mac layer

• Routers relay packets among multiple interconnected

networks. They route packets from one network to any of a

number of potential destination networks on an internet.

Page 159: Unit 4 mac layer

Gateways

• Gateways potentially operate in all seven layers of the OSI

model.

Page 160: Unit 4 mac layer

Gateways

• A gateway is a protocol converter. A router by itself transfers,

accepts, and relays packets only across networks using similar

protocols.

• A gateway can accept a packet formatted for one protocol (e.g.

AppleTalk) and convert it to a packet for another protocol (e.g.

TCP/IP).

Page 161: Unit 4 mac layer

Gateways

• A gateway is generally software installed within a router.

The gateway understands the protocols used by each

network linked into the router and is therefore able to

translate from one to another.