 We've almost covered the main techniques to get data across a link at least data as signals The data transmission topic we spoke about the characteristics of signals Transmission media we spoke about the the things between the transmitter and receiver wired media wireless media and Then the previous topic signal encoding techniques. We spoke in a bit more detail about how to convert the data into signals We're going to cover a few other techniques that we need especially for digital data This is a picture from one of our first lectures Focusing on link communications. There's a transmitter Wants to send data to a receiver across one link. That's what we're dealing with at the moment We transmit a signal that carries the data. We already know how to convert information into signals We know the characteristics of signals bandwidth frequency. We know about data rate So we know some things or answers to these questions We know some different types of transmission media and We now know how to encode data as signals. We've seen several cases of shift keying AM FM Manchester encoding and so on All of these techniques that we've looked at are really dealing with signals and we group them Into dealing with the physical signals. We say they are a part of the physical layer in terms of communications the techniques we've looked at up until now About getting signals across the link the physical signals But there are a few other things that we need to do to still communicate across the link which is not so much about signals but Sometimes we need to make sure that when we send data across the link The the receiver is who we intended it to be We'd like to know who's at the other end of the link when you transmit from your phone To the access point up in the corner of this lecture room Think of that as a link a wireless link When you transmit that data You want it to go to that particular access point If you look around the campus, there are many such access points in different rooms and different floors So one way to ensure that the data will go to that one access point is when you send it Indicate the address of that access point so think that every device has an address and When you send your data you say the destination of this data is this particular address So we need to have some form of addressing To know and identify who is at the other end point of the link Does anyone know the types of addresses we use commonly? Maybe you connect to the SIT wireless LAN. What address does your mobile phone or device get? anyone seen such addresses What? 10 points something points something points something an IP address So you may have seen these ten dot ten dot one dot two or three type of addresses Some have somewhere show up. That's called an IP address That's one type of address we use it's for the internet communications There are others as well that you probably haven't seen as common, but your device has I Can look at the configuration of my wireless LAN interface on My laptop so the the wireless LAN device on my laptop. Let's look at some details It has an internet address 10 dot 10 dot 100 dot two one three So that's one form of address and After the mid-term will return to IP addresses what they mean It actually has another address this strange Random-looking sequence of numbers and letters. This is what we call the hardware address or a Mac address It's actually in hexadecimal. So there are 12 hexadecimal digits. That is the address given to my Wi-Fi device and Similar that access point has a similar but different address same 12 hex digits but different values So when I want to send data to that access point I Need to know its address and When I send data, I don't just send the data. I Send the data plus the address of the access point. So when I send it if Your phone receives it or your tablet receives it They will know to ignore that data They'll see the destination address is not me the destination is someone else So anyone else who receives that message will ignore it. So we'll use destination addresses to identify Who's the intended? recipient That's just an example of a type of address We will not go too much into The types of addresses in this topic, but we'll see we'll come back to them I think towards the end of the course and look at IP addresses and and Mac addresses Another problem with our link We've seen transmission impairments attenuation and noise may result in me sending a sequence of bits 1 1 0 0 But because of noise the receiver receives 1 1 1 0 We send 4 bits we receive 4 bits, but the receiver gets one of those bits wrong. We say that's a bit error How do we deal with that? We can't just accept that in most cases. We need to deal with it. How do you suggest we deal with that? If the receiver did realize as there's an error, what should it do any suggestions of how to fix errors? If someone sends you something and you don't understand, what do you do? Ask them to to say it again or send again and that's a common technique in data communications If I send data to a receiver and the receiver detects there are errors He doesn't understand all of it one common technique is for the receiver to send back a special message saying please send me again I didn't get it correctly the first time Retransmit we call that so we'll spend some time looking at the ways of which retransmissions work But there are some other ways as well to deal with errors and there are a few other issues for Communicating effectively across a link the ones which deal with signals will call as part of the physical layer These are the issues and the solutions will group and call as part of the data link layer We don't care about the signals. We care about other aspects of the the getting data across the link Don't worry too much about why we call them layers at the moment But just be aware that when we talk about data communications The different techniques that we use will split into groups and so far will distinguish between physical layer and data link layer Everything up until now mainly has been about the physical layer This topic and beyond and the next one are about the data link layer how to get data across the link Irrespective of the signaling types We'll return to those layers and the discussion of layers in a later topic from now on. Let's focus on digital data Okay, we want to send bits across the link Even if we have analog data, we know how to convert it to digital data So if we have analog voice We can convert it to digital and send the the bits so we'll focus on digital data communications Some things that we have to find solutions for how to deal with errors we've mentioned one way to do that we send some data to the Destination if the destination recognizes there's an error it sends back a special message saying please send again Okay, so that's one way to deal with errors Let's consider that scheme. I want to send a 10 gigabyte file from my computer to the destination I send that 10 gigabyte file The destination gets it. It took five five hours to send very subtle link five hours to get there and Then the destination looks and sees of those 10 gigabytes one bit is wrong. There's one bit in error So the destination sends back a response to me saying, sorry Though there's an error there. Please send again So I spent another five hours sending that 10 gigabyte file So this is using this retransmission to deal with errors, but what's wrong with that approach? By sending all 10 gigabytes at once even if there's just one small error the retransmission Requires us to retransmit the entire 10 gigabytes again. So Split it into smaller chunks and send one at a time Okay So we commonly don't just send the data as is in one big transfer We split the data into smaller pieces Instead of 10 gigabytes. Maybe we send small chunks of a thousand bytes each We send What 10 million? chunks of a thousand bytes each and The receiver realizes of those 10 million that it received one has an error So it sends back a message to the source saying please retransmit that one 1,000 byte chunk again. I only need to send a thousand bytes the second time not 10 gigabytes the second time So that's one reason why we will split data up There are some other reasons as well. That's common that we will divide data into smaller pieces We have ways to deal with errors. We'll talk about them and Some other issues maybe at the end of this topic about flow control How to deal with the fact that some devices may be better than others faster than others? So the techniques that we'll talk about in this and even the next topic a Part of what we say is the data link layer. We're not talking about signals anymore We're talking about protocols to communicate and efficiently deliver data So we said we need to split data up into smaller pieces. We'll call those pieces frames So the approach for doing that Framing it's common for communication protocols to split data into smaller pieces and Send those pieces one at a time What is a communications protocol? A communications protocol defines the rules that the transmitter and receiver must follow to communicate We have a communication protocol that we follow when you introduce yourself to someone When you introduce yourself to someone you have a set of rules Maybe you'll have a different set of rules whether they are older than you or younger than you the way that you greet them Say hello or introduce yourself. There are some rules that we follow They're not so strict for humans to follow We're smart enough to be able to Adjust and deal with different rules, but the same thing with computers when two devices want to communicate They both need to follow the same set of rules Otherwise, they'll get out of sync and we will not be able to communicate so a protocol defines those rules and Can you tell me that abbreviation of three protocols that you know of The acronyms three protocols give me one again, I UDP, okay TCP Anything else web browsing users HTTP the P in all of those means protocol Hypertext transfer protocol the rules for transferring web pages TCP the transmission control protocol the rules for transmitting data across the internet IP the internet protocol the rules for Getting data and finding a path through the internet and there are many other protocols Which may or may not have P in their name So through the rest of this course, we'll see more examples of such protocols Why group into smaller pieces? We saw one example if you need to retransmit Retransmitting just a small piece is much better than retransmitting everything There are a few other examples we may see What are the names of these pieces? Let's call them frames Sometimes they'll be called other things like packets or messages who will try to refer to them at this stage as frames Before the midterm in a couple of weeks if you look on the website, there's a lesson That's not assessed but talks in more detail about packets Do that and you'll get a better score in the midterm Let's look at what do we mean by a frame? What what is the format of a frame? Coming back to addresses. I want to send a message to the access point I said that I should include the destination address So I don't send just data To the access point I send a frame that contains the data and the address of who I want it to go to the destination address we say and Another thing I'll commonly include if I send that frame to the access point Usually the access point wants to respond at some stage Who does it respond to? Well in the frame that I sent to it I'll specify the destination address and the source address my address So when the access point gets that frame It knows the frame was intended for it. It is the destination And it knows if it needs to send a response it sends it to me because that frame contains my source address So when we send frames, we don't just send the data. We send some other information as well Two examples address source and destination addresses So In general a frame can be divided into three parts There's the actual data we want to send We'll commonly call that the payload That's the thing that we want to get to the the the destination But there's some other information that helps in supporting the operation of the protocol like the addresses And that other information is also is either included in front of the data So we call it the header Or it's included behind the data at the end. So we call it the trailer So in general a frame may be made up of a header Some real data the payload followed by a trailer Different protocols will define what the structure of the frame is They don't have to be all the same. In fact, they don't even have to have all three parts We may have a frame that has header plus payload no trailer Or header plus payload plus trailer That may be the case Or just header no payload That seems strange sometimes. Why would I send something with no data? Come back to our retransmission scheme Source sends some data To the destination destination realizes there's an error This destination sends back a short message no data header only saying there's an error. Please send again So sometimes we'll send messages which contain no real data. They just contain what we say header Some information to help the protocol work It's a little bit abstract at the moment But we will see many examples of header payload and trailer Through the rest of the course Why have a header or trailer will treat them as the same? They carry information that's needed to to communicate effectively between the two endpoints We can talk about the header having a set of fields Different information split into fields where each field has a value Let's go to an example and look at a particular frame format and just illustrate some of those fields What I've done beforehand is I From my laptop I accessed the website And I recorded the actual frames which were sent and received by my laptop So I can look into them in detail and I'm just going to show you one particular frame It was sent from a web server to my laptop And we'll just use it just to illustrate the example of the frame format A lot of the details here are not important. We'll just focus on a couple of things Can we zoom in? We're at the maximum zoom We zoomed in a bit Don't worry too much about the details here. This is some software called Wireshark that shows us A particular frame that was in this case received by my laptop And in this case it was the sixth frame in some sequence So if we look at the software, there's actually one two three four five as well and there's some after six I've just grabbed one frame This software tells me that frame is 569 bytes long The frame has that length and the frame in general is made up of So the the frame is 569 bytes long We can split it into different parts It can have a header The actual data the payload and then a trailer In this specific case the frame has a header This part The payload is these four parts which we'll not look into in depth yet There's no trailer in this example. It was just header and payload Let's look at the header This frame was sent when I had a wired LAN cable plugged into my laptop So the protocol being used is got the name ethernet That's what's the name of when we use wired LAN So the header in this case contains three fields The header contained the address of the destination device It was actually coming from the web server to my laptop. So my computer was the destination My laptop was the destination Actually, I may have been on my desktop when I done this the source is who sent it So the address of the sender And the third field is just some indicator of what's inside this frame What's the type of data? And in this case the type of data it's called ip or the internet protocol The purpose of showing you this is that To highlight that this Frame has a header and payload and the header has three fields And the fields are destination, source and type The destination is If you look closely, it's six bytes long It's a six byte address The source is also six bytes and if you check the details you find the type field is two bytes The header is 14 bytes long The rest of the information All of this is actually the data from this frame's perspective. The the remaining 555 bytes is is payload It's a little bit more complex because the payload is in fact using another protocol which has a header and data So the payload of our ethernet frame is an ip Frame or packet which has its own header fields the version The source address Here we recognize an ip address the destination address and some other things like Time to live and so on We'll not worry about the details of the fields to be aware that a frame may have a header with different field values in it And the fields are defined by the people who create that protocol and They're usually defined in advanced and fixed The actual data inside here It was a web page coming from the the server to my computer. Okay, so that's the actual data inside the htdp message This was a wide land frame had three fields Just briefly if we look at wireless land wi-fi Here's a wireless land frame. It's 425 bytes If we focus on the header It has a few more fields. It has the type of frame Some frame control field which we'll not try to explain has some addresses Has a sequence number That's another thing that we'll commonly see If I want to send a thousand frames from my computer to the destination it's very useful if I indicate which order they go in So I'll attach inside the header a sequence number like sequence number one two three This is frame with sequence number 115 The next one would be 116 and so on So that's another field that we may commonly see Different protocols have different structures of their frames So we've only covered that in general. Some of the example things that may be included in the header are listed here addresses The length of the frame sequence numbers the version of the protocol we're using and some other things But these will become clearer when we see some more precise examples When we look at actual protocols For the last 20 or so minutes today I want to talk about some ways in which we measure the performance of protocols or links or networks How do you measure the performance of your internet access? What would you use? The speed what the speed of what? Some measure of the the the rate at which the data is transferred. What's a practical thing that you may have done? Where do you see that? bandwidth we'll use to return Refer to signals, but sometimes it's referred in in other ways Maybe you download a file. What do you care about? You download a large file from a website 10 gigabytes What do you care about in terms of performance? The time it takes to download Okay, so that's one thing you'd you'd like to care about the time it takes to get the entire file And one measure of that as it's downloading sometimes you'll see it in your browser It will show the the speed at which it's downloading How many bits per second or megabits per second? It's downloading it We'll call that throughput If we have our 10 megabit 10 gigabyte file and it takes Our five hours to download Then the throughput can be calculated as the the number of bytes downloaded divided by the time it takes There's some relationship with data rate, but not not the same What's another measure of performance we care about when maybe browsing the internet? Response time You click on a link to view a web page from that time when you click on the link Until the time when the web page is displayed We'd like it to be short Sometimes we call that the response time the time from when you click on the link it triggers your computer to send a message to the web server And then the web server to respond with a web page How long does it take we care about? And this is related to delay How long does it take to get the message from your computer to the server? What's the delay so some measure in seconds? throughput and delay and another measure of delay is we say response time are two things that we care about But there are some other performance metrics that we care about as well. So let's go through them That is different ways to measure the performance of a communication system We can use them to measure the performance of a real system or predict the performance of a system We may design and build so we know in advance how well it will work Sometimes we'll talk about different statistics average the minimum maximum and so on We've seen metrics already We've already talked about data rate bandwidth s and r Let's see a few more In fact one that we've seen already Data rate we know We define data rate as the rate at which the data is delivered From one point to another across a link usually And sometimes it's called bit rate Sometimes we talk about capacity of a link or some other terms Measured in bits per second So my LAN card May have a data rate of say 100 megabits per second Usually it's a characteristic of the transmitter and receiver You buy the device it has that data rate It doesn't change In some cases it may change What's the data rate when I access the Wireless LAN access point in the back of the room How fast can I transfer data to the access point anyone want to guess? Let's look at the wireless configuration then and it may tell me the data rate is usually the part of the The spec of the device and this software just shows me some of the current Characteristics of my wireless LAN device Shows me that it's called bit rate in this software the data rate is two megabits per second So think of the link the wireless link between my laptop and the access point I can send at two million bits per second With Wi-Fi actually changes If you start sending data depending upon the signal strength it may Change It's now up to 5.5 megabits per second. I'm sending some data So it depends upon different characteristics as what the current data rate is But it'll be from a set of possible values I think These access points go up to a maximum of 54 megabits per second That will be the highest I can get maybe the signal is not so good. So it's dropped down to 5.5 megabits per second So that's data rate We've seen before Normally, it's a characteristic of the link or the devices at the endpoint of that link. What about delay? Quite simply the time it takes to get some data from one point to another some other names latency Delay we normally mean from one point to another response time or round trip time One point to another and then back To get there and back We measure it's a measure of time. So seconds Simple examples first. I send an email at 10 a.m. Today It got to the destination computer at 10.03 the delay of that email was three minutes That's just the time difference between send and receive or I'm starting a timer at time 1.4 seconds. I click on a link on the web browser And at 2.6 seconds I see the web page is fully displayed So here we can say the response time The time from when I clicked on the link my computer sent a request to the web browser To sorry to the web server the web server sends a response back It took 1.2 seconds as an example anyone played games online What's an important performance metric with playing online games? Ping ping time Okay, the ping well ping actually is an application for testing the performance Ping is a ping is an application. You can run it on your computer. You can run it on windows If you open a command prompt you can run ping And what it does is it sends a test message to some destination That destination sends back a response and ping reports the response time or it calls the round trip time For example, I want to ping the ict web server Ping is a program that will trigger my computer to send a message to the ict web server Let's hope it works sometimes s it blocks ping We'll see Yes, it's working I'll do it again and you'll see what's happening What's happening every one second My computer sends a special message to the ict web server When that web server gets it or the computer gets it it sends back a response And whenever I get a response this program prints a line on the screen And the last column shows me the time from when I Sent the request until I got the response the ping time or more precisely the round trip time So it just keeps going this software every one second sends a message gets a message back The protocol being used is called icmp This is a abbreviation here That's not important. Just note that the times in the order of what 20 to 50 milliseconds About it varies I send a message. I got a response back in 39.8 milliseconds Then I sent a message again. I got a response back in 13.1 milliseconds and then 49.5 milliseconds First thing to notice The order is about tens of milliseconds ict server is On the third floor of this building So the message is going up to the access point in the corner following some wires and down to the third floor Is taking tens of milliseconds It's going via multiple other devices The other thing to notice is that the delay varies Significantly in some places it goes up to 105 milliseconds So it's not fixed Even though if it's going along the same path, we get a different delay So in the next lecture, we'll come back to delay and talk about Why do we get a particular delay? Why why is it 27 milliseconds? Why is it 105 milliseconds? So we'll return to delay in the next lecture And then Ping shows us the average delay 41 milliseconds on average We've got two or three more metrics to finish Not so hard Error rate What fraction of our data arrives in error? Or doesn't get delivered to the destination For example, I send an email to 100 students to the entire class Five students don't receive the email something went wrong So we can say the error rate is 0.05 5 out of 100 or 5% So error rate there are no units. It's a ratio Ratio between the errors to the total number Or I send a thousand bits across a link And I measure for every 1000 bits sent 23 bits Arrive at the destination, but they are wrong For example, they were sent as a zero, but the destination thinks they are a one So 23 of every 1000 bits is in error So we can say there's a bit error rate of 23 out of 1000 0.023 or 2.3% of the bits received are in error So this is another metric that we'll see in some Communication systems. What is the bit error rate or what is the frame error rate? What fraction of messages Do we have problems with? Of course, we'd like it to be low sometimes we'll if we know what it is we can measure other performance metrics overhead We said with our frames we send payload the actual data But we may also have a header and trailer some other stuff We refer to that other stuff as overhead with respect to our payload The amount of additional data needed to successfully deliver the real data That's overhead The last one's a simple example I send a frame here. I write a packet, but I send a frame that contains a thousand bytes of data A thousand bytes of payload That's the real thing I want to deliver But the protocol forces me to attach a 25 byte header at the front and a 24 25 byte trailer at the end The total overhead is 50 bytes So we'd like to keep the overhead small But we need some overhead in some cases to support the protocol operation So that's just a measure of how many extra bits or bytes do we need to send to get the data there throughput You download a file I download a 12 megabyte file It takes me 16 seconds If you see a two here, then you're reading it wrong. This is 16 not 26 change that Okay, so it takes 16 seconds Why 16 because I made it If it takes 16 seconds, what's the throughput? Well 12 megabytes every 16 seconds 12 megabytes divided by 16 seconds Turns out to be six megabits per second So I just had a typo there. It should be 16 I'll show you why We have 12 million bytes Let's convert to bits 96 million bits were transferred. How long did it take if it takes 16 seconds? So we divide by the time Six million bits per second. So we say The throughput in that case is six megabits per second Now this may not be the same as data rate The time it takes me to download that file may depend upon the data rate, but it may depend upon other factors as well This is The throughput is the measure the rate at which we Deliver the real data to the destination one last example the one at the bottom My wi-fi link has a data rate of 54 megabits megabits per second I send frames Every frame contains 500 bytes of data or payload And 200 bytes of overhead Maybe header Let's write that down This will be an example to finish today We have my mobile phone and the access point And a wireless link and the data rate of that wireless link is 54 megabits per second Everything we send will send at that rate And a frame has 500 bytes of Data or payload Plus 200 bytes of header Or overhead Total frame size is 700 bytes How long does it take to transmit that frame? Well, we need to send 700 bytes And we send at a rate of 54 million bits per second If we know the amount And if we know the rate at which we send we can work out how much time it takes 700 bytes At 54 million bits per second gives us the amount of time it takes we can calculate the time to transmit that 700 bytes Divided by 54 million bits per second Gives us some time in seconds I'll convert to bits times by eight 5600 bits a cent at the speed Of 54 million bits per second That's the number of seconds it takes to transmit Same as if you have to drive 700 kilometers and the speed you drive at is 100 kilometers per hour Then it takes you seven hours to get there The distance divided by the rate here. We have the size divided by the rate That's the number of seconds It's about 104 Microseconds 103.7 microseconds So to transmit my frame it takes 104 microseconds But the question says or the example says that We transmit a frame And then we spend 20 microseconds not sending anything It's like we have a pause do nothing and then send the next frame That's a common characteristic of wireless protocols So visually we can think we transmit a frame It's going to take 104 microseconds Then we spend 20 microseconds doing nothing if we think of the transmitter Then we transmit another frame Same size Takes 104 microseconds And then the rule of the protocol Do nothing for 20 microseconds And keep doing that And so on So the question is what is the throughput What is the rate at which we receive real data? Well, how long? What's the time frame we're dealing with? If From the receiver's perspective Every 124 microseconds It receives one frame In the next 124 microseconds it receives one frame And then in the next 124 it receives one frame So we can say We're receiving One frame per 124 microseconds The 104 for the transmission time and the 20 for the waiting But how much real data do we receive? One frame Contains 500 bytes of real data of payload The 200 bytes leftover are overhead throughput counts the payload only So we can say we receive 500 bytes Of payload Per 124 microseconds Therefore the throughput we receive 500 bytes Every 124 microseconds 500 times 8 convert to bits. Let's use the same And Divide it by 124 microseconds. Sorry If we divide by micro the answer will be in mega Micro is 10 to the power of minus 6 if you divide by 10 to the power of minus 6 the answer is 10 to the power of 6 The multiplier mega. So the answer is 32.3 Megabits per second My wi-fi link allowed me to send at 54 megabits per second But only some of what I send is real data only 500 out of the 700 bytes and Sometimes I don't send anything The the rules were for 20 microseconds. I couldn't send If we look in total we see that on average I can send 32.3 million bits per second of real data That's my throughput every second I could send 32.3 million bits of payload So that's the measure of the actual user Throughput how efficient are we in using the link? my link Has a data rate of 54 megabits per second But I'm only using it To achieve 32.3 megabits per second of throughput So if you think I buy a link for this speed by only use this amount So we can say that's a measure of efficiency how efficient we are in using it if you do the calculation. It's about 0.6 About 60 efficient That's the final performance metric that we wanted to introduce You buy a link for 54 megabits per second or that's the the maximum speed you only use 32.3 out of that 54 We can say we're about 60 efficient in using that link for actual payload transfer