Data Link Layer-Ethernet
Hello, we will continue our discussion on Computer Networks and Internet Protocols andlast couple of lecture, we were talking about data link layer as we know that as a layer 2in the OSI stack also in TCP/IP stack also it is in the layer 2 in some of the TCP/IP stack,if we put physical layer and data link layer together nevertheless it is a in a layer 2devices right.So, we have also discussed that the switches or layer 2 switches has this property is thatit can open up packets up to layer 2 and take a call based on the things right and also inthe layer 2, we understand that it is a it divides the collision (Refer Time: 01:02) domain,but still work in the same broadcast domain and another point that any routing protocol.Once the route is specified when the routing path is found out by this routing protocolthen, this then when the packets moves up to hop to hop, it need to resolve the nextlocation or the next hop destination by resolving the IP to this layer 2 address or MACaddress right and also we have seen that there are 2 predominant, we can sub layer or wecan divide into sub layer 1 is the LLC, which takes care of the connectivity with theupper layer or the negotiation with the layer and another major part is this MAC mediumaccess control, which basically takes care of the connectivity with the media and there isa unique addressing of MAC address some also known as hardware address also knownas network address which comes with the network interface card.So, today what we will be discussing is one of the predominant protocol in the layer 2,which is more or less omnipresent across the across the all networks in the world that isthe predominant protocol of Ethernet right. So, initially we may talk about this someother that allow a protocol or 1 or 2 slides, then we will go to the Ethernet basic features.
(Refer Slide Time: 02:41)
So, what we are talking about shared network address right. So, that means, sharednetwork access assume multiple nodes on the same physical link right, it can be bus,ring, wireless structure, whatever so, but we on a physical link there are several networkstransmission sent by one node is received by all others nodes right no intermediateswitches are required. So, that is within that what we say reach of all the nodes andreceived by all the nodes as we are telling that is in the same broadcast domain. So,method of moderating the access is the, is through the MAC protocols and whichprimary look as the fairness and the performance.So, it is fair to all nodes and it able to utilize this is means band width in a appropriateway and also we know that it should be somewhat simple to implement otherwise puttingonto devices with low resources etcetera we cannot put resource hungry (Refer Time:03:36) and those type of things.
(Refer Slide Time: 03:38)
Now, if you look at the random access MAC protocol, when node has packet to sendtransmit at full channel rate R. No a priori coordination among the nodes. So, wheneverthe; it needs to send, it sends on a full rate right, no coordination things. So, randomlyaccess the channel two or more transmitting nodes if there are there are the same timethere may be a possibility of collision.Once the collision is there should be a mechanism should come up and if there should bea retransmission or whatever some action needs to be taken. So, random access MACprotocol specifies how to detect collision. So, there should be a way to detect collisionand how to recover from collision right may be via one of the popular thing is thatdelayed retransmissions. So, (Refer Time: 04:28) retransmission after sometimes.So, and examples of random access MAC protocols one that from long back like sixtiesor in early seventies is Aloha. There is a variant of these of slotted Aloha and this days,what we look at is CSMA or CSMA/CD right or rather we have more things on thethings nevertheless what we see is the Ethernet is predominately (Refer Time: 04:59)predominantly ruling the whole networking and it is sees on CSMA/CD.
(Refer Slide Time: 05:08)
So, Aloha basic approach is the first random MAC developed for radio basedcommunication in Hawaii in 1970 all right early, I means late sixties and early seventies19 seventy. So, basic idea when you are ready transmit; so, there is no question oflooking at the channel Aloha, whether it is busy or somebody is using receiver sends aacknowledgement for data detect and collision by timing out of timing out of technology.So, if you do not receive the acknowledgement in time. So, there is collision or there is aloss of the packet, recover from the collision is by trying to trying after random delay.So, too short large number of collision if it is too long underutilized channel. So, theseare the basic over all philosophy of the thing.
(Refer Slide Time: 05:56)
And if you look at the network Aloha network developed by Norm Abramson atuniversity of Hawaii to use with packet radio network. Any station can send data at anytime receiver sends an acknowledgement same thing, if there is a collision sender willresend the data after a random back-off all right. So, utilization; that means, how muchchannel is utilized fraction of transmitted frames avoiding collision for N nodes, it ispretty bad correct or pretty low. So, maximum utilization is 18 percent right. So, it is ifyou if you will at some point of time, you try to look at the calculations or roughcalculations to see that. So, it is around 18 percent whereas, slotted Aloha dividingtransmit time into windows help so, maximum utilization. So, if we in the case of certainAloha the utilization time increases little bit to 36 percent, but better than Aloha. So, thiswas the first card thing, but we need to remember it is there in 1970 right late sixties1970. So, those type of reason (Refer Time: 07:08) was there and what we see that ourpresent day thing, what we came up later on is based on this basic philosophy.
(Refer Slide Time: 07:18)
So, in case of slotted Aloha time is divided into equal size slots that is packetstransmission time right. So, slots node without packet transmit at beginning of next slotright. So, the node, which want to sends with packets in nodes to have the packets to besend and beginning of the next slots. So, it is on the slots it transmits; if collisionretransmit packet in future slot with probability p until successful. So, it is it is not likethat any time transmission it is on the on the slotted. So, there are it is divided in to slotand whenever the things comes it node transmit on that particular slot.(Refer Slide Time: 08:05)
So, in case of pure Aloha, un-slotted Aloha: simpler, no synchronization. So, when welook at the pure Aloha, there is no synchronization; that means, no slotting or type ofthings packets needs transmission send without awaiting for the beginning of slot oranything like that once, it goes it goes on the things. So, collision probability; obviously,increases much packets sent at t0, you see at this in this figure collide with other packetssend in t0 minus 1 t0 plus 1 right. So, it can collide with the other packets at sending atother time interval also right. So, there is a in case of pure Aloha it is once ready send ittype of things, if there is a collision wait for some time and retransmit.(Refer Slide Time: 09:01)
Now, we come to that our Ethernet. So, this is the very first hand-drawn figure ofEthernet sketch of Metcalfe. So, the first practical local area network built at XeroxPARC in 1970’s right in 70’s, dominant LAN technology, it is cheap kept with a speedrace 10, 100, 1000 mbps. So, 10 Mbps, 100 Mbps and 1 gbps Ethernet and started in1970s, there is a, this is a very popular picture, you will find in several books and otherseveral resources internet resources and type of things. So, this was the initial sketch ofthe thing, the query interfacing a particular stage interface controller a transreceiverconnecting or tapping to the that backbone of the ether and there can be several otherdevices, which is connecting to the things. So, there is a there are terminator andanybody can means, any of the device can connect to this particular backbone of theether right. So, that was the philosophy and make a big change because, now you have ashared media on a on a single bus or ether.
(Refer Slide Time: 10:27)
So, one issue with the Ethernet MAC is the carrier sense. So, basic idea is the listen tothe wire before you transmit right, whether somebody is there avoid collision with activetransmission right. So, avoid collision with active transmission, if there is things.So, why what was not in Aloha, the primarily Aloha is a packet switch network. So, inwireless relevant contention at the receiver is not on at the sender right. So, at thereceiver end; so, there can be a problem of hidden terminal in this case, where the oneterminals are hidden or it can be exposed terminal, this both terminals are exposed andget the things. So, there can be a hidden terminal problem or exposed terminal problemand it may not be feasible to have all those, you can listen and before transmit.
(Refer Slide Time: 11:24)
So, multiple access method; so, when what there are approaches, one is the fixedassignment like partition channel into each node gets a slice of the bandwidth. So, I thechannel is partitions. So, it has it node has his own partition essentially some sort of acircuit switch, thus inefficient like if you if you are not transmitting then also it is the slotis allotted and type of things.So, it is a inefficient. TDMA, FDMA, CDMA all used wireless and cellularenvironments are examples of this type of fixed assignments, there is contention basednodes contends equally for the bandwidth and recover from the collision. So, this whereour, this Aloha or Ethernet is based on and this is the thing. So, everybody contend forthe channel and look for the means and whence it is free transmit, if there is a collisionthere is a process of recovering from the collision or retransmission of the data in to thechannel. Token based or reservation based is another thing that is the take turns using thechannels and that is that token ring is one of the example in previous lecture, we havediscussed that, when the node which holds the token has the right to transmit, the or takecharge of the channel type of thing. So, our main intention or main goal of the thing islook at the contention based or things. So, like which is the Ethernet.
(Refer Slide Time: 13:11)
So, coming back to Ethernet; so, background is something developed on Bob Metcalfeon and others in Xerox PARC in mid seventies, roots in Aloha packet radio network thatis primarily standardized by Xerox DEC and Intel in 1978 and LAN standards defineMAC and physical layer connectivity right.So, there are several standard we have already seen that is 802 dot 3 is the CSMA/CDEthernet that standard originally, it was 2 Mbps then we have that 10 mbps IEEE 208 dot3 u is the 100 mbps Ethernet IEEE 802 dot 3 z is the one gbps of 1000 mbps Ethernetright and the basic protocol is CSMA/CD Ethernet that media access and control MACpolicy CS we as you know that CS is the carrier sense send only if, thus medium in idle.So, it sense, the carrier and see that whether the idle MA is the multiple access. So,carrier sense multiple access with collision detection stop sending immediately of if thecollision is detection send a jam signal. So, that the other participating nodes understand,there is a collision and then go for a retransmission of the things.So, that is the basic philosophy of this slotted Aloha, it is not sorry that is the CSMA/CDsorry that, CSMA/CD that is what we use in this Ethernet and this is the again the picturecomes back the same picture.
(Refer Slide Time: 14:59)
(Refer Slide Time: 15:06)
So, the Ethernet technologies that initial thing was the 10 base 2, 10 was that 10 mbps 2is around less than 200 meters cable length is permissible. So, thin coaxial cable in a bustopology, it was there. Repeater used to connect multiple segments of such stablerepeater repeats bits, it is here on the interface to the one other. So, it is a physicalrepeater is a physical layer phenomena layer 1 phenomena, which primarily increase thesignal strength or in others terms, we can say it increases the (Refer Time: 15:43) signalto noise ratio.
So, it is amplifies the signal. So, if you if the permitted length is 200 meters effectivelyaround 180 meters. So, after that you require a repeater to increase the 6 signal strength.So, that it goes on the on the rest of the on the again, another segment of 180 meters or200 meters right. So, and as we know that we are that that popular hub, which is alsolayer 1 device is primarily a multi port repeater. So, if it is hub is typically 4 port, 8 port,16 port hub, but they have the same collision and broadcast domain. So, the effectivebandwidth is pretty low. So, this worst case it is divided by the number of ports it ishaving right. So, that is the basic thing.So, what we see that there is a cable here and these are all tapped right. So, thin coaxialbus repeater used to connect the multiple segment and there is a cable. So, there arenode, there are several nodes, which are tapped into the thing. So, there are these are alltee connectors right, some of you might have seen, there are tee connectors right, wherethis cables are connected and this things are there. So, transmit packet travels in bothdirections. So, this, the tee connector and then we are the terminator at the end and thereare adapter at the things. So, this adapter basically connects this machine or the node. So,that is the interface between these, this is the network adapter, which connects the thingsright.
Data Link Layer: Ethernet- Part 2
So, then it came that 100 10 oblique 100 mbps rate with twisted pair. So, initially if yousee it is 10 base 2, this is 10 base T and 10 base 100 base T.
So, T stands for twisted pair hubs connected by twisted pair facilitate star topology typeof things. So, there is a hub sorry, there is a hub and there are these are the differentconnections and again hub connectivity etcetera, the effective bandwidth goes ondecreasing, but we can have a star type of topology right.So, um. So, this is the structure by which that 10 base 2. So here, again 10 stands for thembps and T is the twisted pair typical length of twisted pair is around not more than 100meters another effective width is less, then 100 meter around 89 meters up to which thisjust twisted pair is can run.(Refer Slide Time: 18:39)
Will come to this physical layer, physical layer consideration letter, but has to have acontinuity of 802 dot 3 physical layer configurations specified in 3 parts either data indata rate 10, 100, 1000 signaling rate, whether is a baseband or broadband signal,baseband is the digital signaling, broadband is analog signaling and this cabling right,there are difference specification 5 for thick coax coaxial cable, F for fiber optic, S forshort wave laser through multimode channel L, for long wave laser to single modechannel and so and so forth all right and already, we have seen 2 and T what this standsfor.
(Refer Slide Time: 19:25)
So, Ethernet is defined by a broadcast protocol, any signal can be received by all host.So, it is a same broadcast domain switched enable individual host to communicates.So, that the collision domains is fragmented or divided and network layer packets aretransmitted over and Ethernet by encapsulating by encapsulating so that means, that thisis our typical frame format, where we have a preamble of 64 bit destination address, 48bit source address, 48 bit there is a type field of 16 bit, this is the body of the messageand there is a 32 bits CRC check right. So, this a typical size of Ethernet, typical formatof Ethernet a Ethernet frame.
(Refer Slide Time: 20:32)
So, when we have a switch network there are several features or advantages right.Switches forward and filter frames based on the LAN addresses or MAC addresses orhardware address or network addresses whatever it is.So, based on that switches forward and filter the frames. It is not a bus or a routeralthough, simple forwarding tables are maintained. So, a switches has a layer 2 switch,what we are talking about layer 2 switch has a table and based on that. So, if I have a 8port switch then it is forwards packets based on the based on the data it is received, basedon the destination input. So, in other sense the collisions are collision domains aredivided or we are avoiding this collisions in this in when, we connected in the switch. So,it is very scalable like unlike hub, where the it is in the same broadcast and collisiondomain here, it is different collision domain very scalable of sense for many interfaces,full duplex operation send received frames simultaneously right. So, it can as a fullduplex operation.So, that I do not have those type of collision scenario. So, connect 2 or more segments bycopying data frames between them right. So, I can even connect 2 or more segments withthe switch right, switches only copy packets when needed key difference from therepeaters right. So, repeaters is primarily only signal enhancing or amplification of thesignal. So, that it is transmitted, where as switch divides the collision domain. So, youcan have different collision domain and that is why, the effective bandwidth is much
higher than here and not only that scalability is there, you can connect cascade switch ina much better way than then hub or repeaters, higher link bandwidth, collisions arecompletely avoided.So, you have a higher as you have talking about higher a link bandwidth or betterutilization bandwidth, much greater aggregate bandwidth, separate segments can send atonce. So that, I can have when, we aggregate the all these bandwidth then we have amuch better aggregate bandwidth, when we have a separate segment connected over theswitch.(Refer Slide Time: 22:54)
Now coming to the Ethernet frames: so preamble is a sequence of 7 bytes and each set to10101010. So, just to remind here; so, we have a this preamble of this used tosynchronize receiver before actual data is transmitted and address is a unique 48 bitunique a unicast address assigned to each adapter right. So, of the form of x x though y xx colon x x colon x x and this form. So, we have a; so, 1,2,3,4 5. So, we have a total 48 6into 8 that is a 1 early 1 is missing. So, it should be 1, 2, 3, 4, 5, 6, 6 into 8.So, I have a 48 byte a 48 bit unicast address for each adaptor, each manufacture gets it isown address range so; that means, whatever adapter is manufacture is adapter ormanufacture has a unique addresses; that means, ideally or whatever interface card, weare connecting with this our network has this separate addressing. So, all networkinterfaces or adapter across the world are unique though, there are issues of cloning of
this adapter etcetera, we are not again as I am send earlier also we are not going to thethose challenges complicacies, but we this is the basic philosophy right. So, broad in caseof a broadcast all 1, in case of multicast first bit is 1 right. So, this is the way we look atit type field is a demultiplexing key used to determine, which level of protocol the frameshould be delivered to right.So, this is a which signifies that at which level of which higher level protocol, theseparticular frame will be delivered to, body can contained up to 1500 bytes like thepayload can be after up to 40 1500 bytes and finally, we have a CRC of 32 bit.(Refer Slide Time: 25:34)
Now, in Aloha decisions to transmit are made without paying attention to what the othernodes might be doing right so; that means, you have once you are ready you transmit.Ethernet uses CSMA/CD listens to line before during sending the data right if line is idleno carrier is sensed right send packet immediately. Upper bound size is 1500 bytes musthave 9.6 micro second between the back to back frames right. So, if the line is busycarrier sensed; that means, carrier is senses somebody is someone is transmitting waituntil the transmit packet wait a wait until idle and transmit packet immediately, this isalso known as one persistent sending. So, wait until the it is the is the idle and transmitpacket immediately without looking at it, if collision detected stop sending and send jamsignal try later again right.(Refer Slide Time: 26:38)
So, this is the basic philosophy. These some form we have seen earlier also that basicstate diagram of CSMA/CD. So, the packet sense carrier if it is send if it is send yes thenthe jam signal calculate the back-off time wait for b and go on keep attempt is less than16 again carrier sense equal to 16 discard packet and go on like this right. So, this is thisis the way it goes on, if packet is there it is sense and type of thing. So, you sense thecarrier and then go on transmitting the things right. So, this is the way to go on workingon the thing right. So, first of all, if I want to send the packet sense the carrier if thecarrier is free send it, if there is a collision, if detected then wait for send jam signal waitfor a back-off time, if attempt is less than 16 go and again the sense the carrier if attemptis equal to 16 then discard the packet.So, collisions are caused when 2 adapter transmit at the same time right, adapter sensecollision based on the voltage differences. So, they voltage based on the voltagedifferences it sense that whether, is a collision or not.
(Refer Slide Time: 28:03)
Both found line to be idle right, in this case AB both found that line to be idle at that timeboth had been waiting for a busy line to become idle and then they transmit A transmit attime 0, message almost there at time T B starts collision right. So, this is this is the waycollision can happened and there should be a retransmitted, how can we be sure that Aknows about the collision?(Refer Slide Time: 28:43)
So, one way is that either that voltage difference and sort of things or if it is knows aboutthe collision takes place, there must be a mechanism to insure retransmission on collisionright A’s message reaches B at time T. B’s message reaches time A at time 2T right.So, so, A must wait till transmitting still B transmitting at time 2 T. So, after typicallymax time of 2 T comes to know whether, there is a collision or not. So, 802 dot 3 specifymax value of 2T to be 51.2 micro second, these relates to a maximum distance of 1500meters between the hosts right, if we consider that speed the speed of way whentransmission. So, it is around 1500 meters between the hosts considering that cableetcetera, where you cannot get that whatever, in the vacuum also around 60 percent ofthe speed, you will be achieving. So, at 10 mbps it takes 0.1 micro second to transmit 1bit. So, 512 bits that is 64 bytes takes 51.2 micro second to send right.So, Ethernet frame must be at least 64 byte long, 54 byte header 46, yeah sorry 14 byteheader 46 byte data and 4 byte CRC. So, there is the basic thing, if padding is used if thatdata is less than 46 byte correct. So, we have this thumb rule calculation. So, 8023sspecify that the 2T to be 51.2 microsecond, this relates to 1500 meter between the hosts,if 10 mbps takes 0.1 microsecond to transmit 1 bit. So, at 10 mbps, it takes 0.1microsecond to transmit 1 bit. So, 512 or 64 byte takes 51.2 microsecond to send right.So, Ethernet frame must be at the 64 byte long, 14 byte headers, 46 byte data and 4 byteCRC. So, if it is less than your data is less than 46 byte then padding should be use. So,sending jam signal after collision is detected to ensure all hosts collisions are see thecollision. So, it is a 48 bit signal, which is a jam signal is send.
(Refer Slide Time: 31:26)
(Refer Slide Time: 31:30)
So, this is the collision detection after time 2T and then we have a exponential back-off,if collision is detected delay and try again delay time is selected based on the binaryexponential back-off. First time choose K from 0, 1 and delay equal to K into 51.2microsecond. Second time choose K from this side 0, 1, 2, 3, K into so and so forth andnth time choose from 0 to 2 to the power n minus 1. So, know the maximum value ofallowable K is 1023 to give up after several tries usually 16 once, the trial is 16 gives athen report a error to the host, if delay is not random, then there is a chance that thesource would retransmit in the lock step.
So, why not a choose small set of set for K, this fine it works fine, if the number of hostare less. So, if you have a less number of host there is small k will work fine, if thenumber of host are pretty large then these there will be a chance of more collision. So,this is the basic philosophy of our basic Ethernet, which uses CSMA/CD primarily andso, what we will what we have seen that that it is a carrier sense and detection and thenretransmission after a back-off time, what it is doing. There are some base line what wesay, arithmetic which tells are that what should be the size of the things, will continueour discussion in the next lecture with the Ethernet and other variation of this or on thedata link layer. So, let us conclude our discussion for this particular lecture, and we willcontinue in the subsequent lecture.Thank you.