 So the topic, or the course, Introduction to Data Communications, we need to, like we tried to explain yesterday, we need to cover the basics of how we communicate between computers. And hopefully by the end of the course we'll understand a little bit more about how the internet works and other communication systems, not just the internet, mobile phones, telephone networks, have been around for a long time. So different communication systems and how they work. Today in this topic I want to just give a very short introduction to different aspects of data communications and introduce what do we mean by data communications and also networks. So what is data communications? What does it mean or can we define it? Well, communicate. When we communicate we are sharing information. When I'm lecturing you the idea is that I have some information and I want you to have that information as well. So by me talking I'm communicating that information to you, hopefully. So we have information we want to share amongst multiple entities. Entities may be people or computers in general. We can have local sharing face to face so when you talk to someone, like in this room we have local sharing information where we, using usually audio, we talk to someone. But more so we'd like to allow remote sharing. So sharing information where you're not within talking distance but outside of talking distance and still want to share information. So communications is about sharing information. What information? What different types of information may we want to share? There are many different types but the common ones will see text when it comes to computers at least. Text, that is text files, characters, numbers, images, pictures, photos, audio. So when someone talks or there's music being played we want to share that or exchange that between two different locations. And video, common types of information or common types of data which contain information. Video is a form of data that contains information which may be a movie or a screencast or something that we want to watch that we get some information from. So there are different types of data. Communications is about sharing information. The information is usually represented as data. There are different types. We'll see some as we go through the course. So data communications is exchanging data between two or more devices over some transmission medium. So this is a little bit more formal definition. Still, sharing information, exchanging information, what type of information? Well, data, text, numbers, audio, video. Between two devices, one person to another, one computer to another or two or more. One computer sends to many computers at once. Similar to this lecture. There's one person sending and many people receiving. So it's not just one to one. Via some transmission medium, that is the thing that separates or connects the two entities communicating. So when I'm talking to you, I'm sending some information to your ears and the thing between my mouth and your ears is the transmission medium. And in this case it's air. We're sending wirelessly in this case. But we'll see some other examples of transmission mediums. So that's a simple definition of data communications. Data communications is quite complex. We need to cover it in this topic and then even more details in future subjects next semester. We can't cover it all in a single lecture or even a single course. But to try and understand data communications, we can think of it from a simplistic view. So here's a model of a communication system that we'll commonly use. We can talk about five different blocks in some communication system. And the first two are part of what's called the source system and the last two are part of the destination system. So the source wants to get information to the destination in this case. So we want to get information from here to here. The source system, we think if we start with some information that we want to communicate to someone else, the source creates that data. So in terms of a computer, let's say the source creates an image. The image contains the information we want to share, creates an image file, a JPEG for example. That's the input data that we have to send to the destination. Then we have a block called the transmitter which takes that data that we want to send, the image in our example, and sends it via our transmission medium or more generally a transmission system. So we need to talk about what do we mean by a signal. We'll see some examples in a moment. But we take some data and we transmit that data as some form of signal across a transmission system. The transmission system delivers that signal to the other endpoint, to the destination. And the destination therefore receives some signal. The receiver is the block that takes that receive signal and converts it back to data. And then the destination consumes that data. If it's an image, the data is an image, then the destination maybe presents it on the screen for the user to look at the image. So a very simple view of a communication system. We've got something that generates the data, the source, the transmitter takes that data and converts it into a signal that can be sent across some medium. The transmission system delivers that signal or the information to the other side and we receive a signal, receiver converts it back to data and we get the received information. Together the source and transmitter often go in the one device. They don't have to be but often they're in the one device so we can group them as the source system and the destination system and then the transmission system. What's an example of data? Well, going back, I hope. So here's an example of data. Let's say the data, the easiest thing I think most of us can think of is binary data. So a JPEG as an image which is just a sequence of zeros and ones representing some photo or a movie for example. So that's the data, that maybe the input data and that should be the output data that's received. If we send an image from source to destination, they should receive that image. But what about a signal? What's an example of a signal? What types of signals do we have? How do we send, so imagine this is one computer, this is the destination computer, how do we get information from source to destination across some cable or even without a cable. Well, generally we send what's called an electromagnetic signal. So electromagnetic signal, I never remember all the physics that's not so important but contains is some signal that contains an electric field and a magnetic field together and often is represented as some waveform, like some sinusoid. It's more complex than that. But think of say if we have a electrical wire connecting two computers together we can send an electrical signal across that wire where we generate the electricity here at the transmitter. It's sent onto the wire and it's received some electrical signal is received here at the receiver which then converts that electrical signal back to data. That's the idea here. We're going to spend a couple of topics studying the signals in detail. I have some pictures, some from old lecture notes, some just from the web just to make it right. Here's a simple view of a signal, an analog signal where over time the amplitude of that signal if we think of an electrical signal varies. Nothing exciting there. From a perspective of a base electromagnetic signal this is trying to capture that a signal really contains an electrical field, the blue component and a magnetic field at the same time, the red component. But often if you just focus on the blue component we represent a simple signal as a sine wave, as a sinusoid. Can we come up with a little bit more realistic or complex signal as this is someone's recorded the signal from a Wi-Fi transmission. So a laptop is transmitted to an access point and they've had an extra device to record the signal. It's hard to see and visualise signals. It's hard to see electricity or radio waves but you can get devices that capture that. It may be hard to see here but it's the top parts capturing the signal with respect to the different frequency components inside that signal. So there are frequencies here and the signal contains strong, a high strength, high amplitude for some frequencies and low amplitude for other frequencies. And the other part, it's very hard to see on the screen, the other part here is how the signal's amplitude is changing over time. For some time the signal is strong at this frequency where it's red and then at some time later it changes to this different frequency and change and is strong here. The next, not the next topic, the one after that we will discuss what are these characteristics of signals, this thing of frequency, amplitude and other characteristics of signals. So this will start to make sense. So we have some information we want to communicate to a destination. In a simple model we represent that information as data. The transmitter converts that to some signal which is transmitted across the transmission system. It's received, the received signal is converted back to data and then we've got our received information. That just describes those steps. Here's a couple of examples of that model, a little bit more realistic. Well, here's a case where we have two computers. For example, my two laptops, the grey laptop and the blue laptop, we want to connect them together for example, direct via a LAN cable. I think some of you may have done this so just different ways to connect two computers direct together. You plug the LAN cable into one and this and into the other and we have what we see in this case. Where we plug the LAN cable into the socket there is part of the transmitter and in a LAN or on a computer it's called a network interface card or a LAN card, a NIC. So we can think the network interface card on the source computer is the transmitter part of the device and on the destination computer is the receiver device and the computer itself, computer A is the source system. It contains the source and the transmitter. Computer B contains the receiver and the destination. So the old style LAN cards that you, in the past you would insert into your desktop computer and now they're built into computers. But think of these as the transmitter and receiver devices. Actually, they are transceivers in that each device can both transmit and receive at the same time. So you plug them into your computers and connect. Whereas the computer generates the data so that acts as the source. So that's a very simple case of a communication system. We can transfer data from computer A to computer B and in the opposite direction as well in practice. And this is an example of where the transmitter and receiver are built into the source systems, source computers. And the transmission system is very simple. It's just a single link or a cable. Another example. Anyone use dial-up internet before? Okay, you remember the sound when you connect, that strange quacking sound. The dial-up modem. So here's a picture of a simple view of such dial-up internet. The reason I chose this is it's closer to our transmission system. If we use the current, say, ADSL internet, the picture's more complex. But the way that it worked, you had your computer and often you had a modem. Either a separate device or maybe more recently you had one built into the computer as a similar device like this but the telephone cable plugged into it. That was your modem. And the modem had a telephone line going into your socket in the wall at home. And that went across the telephone network. So I represent the telephone network owned by TOT or someone else as this cloud. And sometimes you could dial into a server which basically gives you access to that computer. The server's just another computer which also has a modem. So a similar system and you dial in to the server and you get access to that server and maybe that server also provides you access out to the internet as well. So here's an example of a transmission or a communication system. We could think of this block as the source system. The source computer and the transmitter is the modem. The telephone network, which is quite complex, it may cover the entire world. In Thailand this may be in the US. The telephone network is the transmission system. And the destination system is this server plus the receiving modem in this case. So this is a little bit more complex example of a communication system. Source, transmitter, transmission system, receiver, destination is the server. The transmission system is not just one cable. In this case the transmission system is very simple. It's just a cable. In this case it's multiple cables going to telephone exchanges across the world. So a transmission system we don't just mean a single link or a cable. And more generally internet access. You have your computer, some web server, computer B. They both have their own transmitters and receivers. And then we have the transmission system as the internet. Which again is a very complex communication system in itself. It's not just a single link between your computer and the Facebook web server. There are many components inside here. But we can view that as a source, has a transmitter, the internet is the transmission system and the computer B is the receiver and the destination system, or the destination. Just as an aside, in this case when I connect my two computers together directly, they would have the transmitters and receivers would use the same technology. If I plug them in here, the transmitter and receiver are both LAN cards. To be able to talk to each other they need to use the same technology. Same protocol or standard. On the internet, does computer A and computer B need to both use the same transmitter and receiver device? The same technology. If computer A is your laptop and computer B is the Facebook web server somewhere in the internet, computer A you may be using your LAN card. Computer B could be using something completely different. Because it's the role of the internet to sort that out. To make sure that it doesn't matter what you're using here, inside here, inside this cloud, it converts it to the right format eventually to be received by computer B. So when we get to how the internet works, we'll see the main advantage is it allows people with computers using different technologies to communicate with each other. Whereas say inside a LAN, inside our office or your home, all of the computers need to use the same LAN technology. Whereas across the internet you can use different technologies. So what's inside the cloud there? What's in here? Although we can represent it as a transmission system, it's much more complex than that. Here's a general model that tries to capture all of those example cases. We can think of it as if we have our source and destination. In fact the source sends to some other computing device, which then sends on to a next computing device and so on. There may be many in between here until this last one sends on to the destination. So we have these intermediate systems in general in a communications network so that the source doesn't have to have a link directly to the destination. The source just has to have a link to the first intermediate system, which then has a link to the next one so long as we can find a path to the destination, if we're using the right technologies, we can communicate from source to destination. You see this captures our three examples. This is the simple case where there are no intermediate systems, the source directly connected to destination. That's very simple but not very convenient in most places because you need to be close to each other. In this case, the computer really communicates with the intermediate system, the modem, which communicates with another intermediate system, the telephone exchange run by your ISP, which actually usually goes to other telephone exchanges and then towards the destination system. Similarly in the internet, your computer sends to some other device in our SIT network, my laptop sends to this wireless access point on the wall, an intermediate system, which then sends on to another device and till it reaches the destination computer. So we'll sometimes capture it and draw it like this. Source generates data, intermediate systems receive signal from the previous system, A receives from the source and then transmits it to the next system and so on. The link or the connections between a source and the next intermediate system between two devices is called a link. Let's refer to this as a link. From source to destination, we have a network. So we have one or more links in this case and that forms a network. So we're distinguished between a link and a network. Link communications and network communications. A network we communicate across one or more links. Any questions, any problems at the moment? Very simple concepts at the moment. So this topic we need to look at, well how do we actually communicate across a link, say from source to intermediate system A, how do we get data across this link, across this cable, or maybe there's no cable, it's wireless communications. How do we transmit a signal across there? And if we can communicate across a link okay, still we have problems if I can communicate across one link, how do I get data across a set of links? Across a network. So we're distinguished between link communications and network communications. Link communications, we'll focus on, we have some input data. We have a transmitter that converts that data to a signal. The signal is transmitted, sent across a link. The receiver receives some signal and then converts it back to data. Bits for example if we're using binary data. Some of the challenges here. Well how do we convert the information into transmittable signals? Transmittable signals are electromagnetic signals, say electrical signals in most cases. How do we do that conversion? What are the characteristics of those signals? You've heard of things like frequencies, maybe bandwidth, but other characteristics that we'll care about for those signals to make sure that we get good performance. The transmission media is the link here. What media do we use? What physical device or what media do we use? So two options. Wired or wireless? Wired is we have some cable, wireless we have no cable. So there's the first choice. And with wired transmission media, well there are different materials we can use. If we're sending an electrical signal from transmitter to a receiver we need to send that across some conducting material. Copper is a common one. So you get copper, if you look inside, make sure I have one somewhere. If you look inside these LAN cables you'll see that it's just pairs of copper wires in there. So the copper is used as a conductor to carry the electrical signal. But there are other materials that can be used. For example, if we send light we can use some glass or plastic fibres and we get optical fibre communications. If we use wireless we don't have a cable. So we need to send some radio signals from transmitter to a receiver. What are the characteristics of those signals and which media to choose? We have a topic on data transmission which we'll talk about the first and maybe in the second one. We have a topic on transmission media which we'll cover this question. Then the next thing is we have data, for example, bits. And we want to convert that into a signal, some form of electricity. Say a sine wave. How do we convert it? How do we use a signal to represent that data? And a common way is to think of a sine wave. One way you could say generate a signal which has a high level when we want to send a bit one and maybe a low level, the trough, when we want to send a bit zero. And just alternate the level of the signal that we transmit depending upon the bits that we want to transmit. But there are other ways than that and we'll look at how can we encode the data as signals. Unfortunately in life nothing's perfect and what commonly happens is when we transmit a signal, the received signal is different from what is transmitted. And as a result we may get errors. That is we receive a signal which is not an accurate representation of the transmitted signal and the data that we receive is therefore in error. How do we deal with those errors? And maybe we'll get time to deal with the case. This is a simple case. We have one source, one destination, two entities. In the signal we can have more than two. We could have a single source sending at the same time to many destinations like I am in this lecture. Single source, many destinations. How do we deal with that? How do we make sure that works well? If we can do all those things and in fact there are a few more that we won't get to cover but if we can answer these questions then we can do the basics of communications across a single link for one to another. Then the next challenge is, well, when we have multiple links, how do we deal with that? If I can send across a single link, how does this intermediate system send across to the next one? How do they know which intermediate system to send to? Why did I, my source, send a system A, then the system B, then on this path? Why not choose a different path? So we'll look at some questions of how to select which intermediate systems to send by. It's called routing. What happens if I send data? It gets to A, it gets to B but B fails. It's a computing device and for a short time it runs out of memory and it loses the data. The data doesn't get to the destination because it was lost here. How does my source deal with that? We'll see in many cases if I send data and it doesn't get to the destination, that's not very effective. And of course as we move up, how do we create applications that you as programmers can create such that you don't have to deal with all of these details? So you can write a new web browser and not care about the signals being sent, how these intermediate systems are selected and how to deal with these errors. As a programmer you don't want to care about all of those details. So we'll look at how that's achieved. That's our course. The first few topics are on link communications and the remaining topics after midterm are on network communications. Try to answer most of those questions. Just to finish this topic and we'll start the next one in a moment, this one. Some words I've already mentioned that may be new to you. What have we mentioned? We've talked about signals. Data is communicated across links by sending signals. We'll cover those types of signals in more detail soon. What else have we mentioned? Down the bottom yesterday I think we mentioned addresses. We talked about domain names, URLs, IP addresses. There are other types of addresses. So we use addresses to identify who we want to communicate with. It's very easy in this case. Addresses are not so important because there's only one other person that A can send data to. It only has a link to B so whenever it sends something it will definitely go to B. But in general my computer wants to send to another computer on the internet. I need to know the address of the destination. So addresses are important. What else have we mentioned? Protocols are a set of rules. A protocol is a set of rules that the devices use to communicate. The computing devices communicate by sending information to each other. But they are dumb computers. All they can do is follow what's programmed into them. So a protocol defines exactly what the computer should do to make sure that the two entities can communicate. For example, my computer may be programmed to say if I receive a message of this type from another computer then I take this action of sending back a response. What action it must take and how it responds to receiving a message is defined by a protocol. So a protocol defines the rules. We'll mention many protocols through the course. Standards are usually documents that companies, organizations have agreed upon or have selected protocols that they agree to use. What's an example? Wi-Fi. Anyone know the official name of the standard for Wi-Fi? IEEE 802.11. IEEE 802.11 is the name. IEEE is the name of a standards organization. 802.11 is just the number given to that particular standard. IEEE creates standards for electrical and computer systems. So there are many standards. But 802.11 is one of the standards for how one Wi-Fi device can communicate with another. If my laptop, I buy a new laptop tomorrow and it doesn't implement the 802.11 standard, if it doesn't implement it, then it will not be able to communicate with devices which do. All the devices which are manufactured that want to use Wi-Fi must follow the standard. And therefore I can buy a laptop. As long as I know it follows the standard, I don't care who manufactured the wireless device. We don't care about the manufacturer if it follows the standard. We'll see and come across many standards in the course. What else? Packets, headers, layers. Maybe just mention packets. We haven't mentioned it before. I want to send a video, a large video, 10 gigabytes from this laptop to this laptop. Just transfer it across a cable. Most protocols are designed such that we don't send it all at once. We don't take that 10 gigabytes and try and transmit it all at once. We divide that 10 gigabytes into smaller chunks and send a chunk one at a time. Why? Why would we do that? In case the connection is corrupt. If there are problems, then it's better to send small chunks and have to fix only those small chunks. You may have heard of the saying, don't put all of your eggs in one basket. You're walking around with, you have to take 100 eggs home. You put them all in one basket and you drop the basket and all of your eggs are broken. So what do you do? You take two baskets and you put 50 eggs in one and 50 in the other. You walk home. If you drop one, you only lose 50 eggs. The same concept here. We want to transfer 10 gigabytes of data from one computer to another. If we send it all as one package all at once and something goes wrong in the communications, we drop that message in the network or in the transmission system, then what do we do? Well, we lose all of that data and generally what we'll do is we'll have to resend all 10 gigabytes to make sure that the destination receives it. But if we break it into many smaller packets, say 10,000 different packets, and send all of them, if we lose one packet then we only have to retransmit that one. It's much more efficient in the case that we have errors. But there are some problems. What about my basket of eggs? What's the problem of having two baskets instead of one? Slower? Well, what way? Why did it affect me? I put my eggs, let's say I got someone else to put the eggs in the basket. What's the problem of me carrying two baskets instead of one? It's heavier. The same number of eggs, but now I have to carry a second basket. The basket itself has some weight, so I have to carry slightly more. So we say there's some overhead in splitting it up. The same name applies in packets and the way that we do data communications. We break our data into smaller chunks. Those smaller chunks are commonly referred to as packets. But there are other names like messages. We'll see datagrams, frames, packages, some people call them. But I'll try and refer to them as packets. The problem is that when we break them into smaller packets, that's good if we lose some. We only have to resend those individual packets. But it's bad because each packet normally has some small overhead. And the more packets we have, or the smaller the packets, the larger the overhead in total. So it's a trade-off there. The overhead is often referred to as a header. We take the data and attach some extra information ahead of. We'll come back to that. We'll see that in more detail in some later topics and see this trade-off between errors, overheads. That's a later topic. Layers we will not try and mention now. We'll move on. Questions? Any problems? Network socket. You mean the physical socket or the programming socket? So you may hear of sockets in two contexts. Sometimes we talk about an electrical socket where we plug something into. So sometimes you may hear this where I plug the cable into as being a socket. That's just the mechanical interface where we plug our cable into. The other context that... So there are many different types. Same as there are many different types of electrical sockets, different countries. There are many different types of sockets that we plug our cables into. They are defined in standards. So if I want to use a wired LAN, there's a standard called Ethernet or IEEE 802.3 that defines the exact pin ordering that we use in this socket. The other place you may hear sockets, I know all of you are excellent programmers, you start to program internet applications and you want to create your own web browser, your own instant messaging client or some application that communicates across the internet. Sockets are an API that allow you as the programmer to send data across the internet without worrying about all of these details. So let's say the red entity here is an application. Your application, you're writing the source code for it. You as a programmer don't want to have to worry about which intermediate systems your data go through, what are the signals being sent, how to deal with errors. So what most systems do today is that you write your code in Java, C, Python, whatever and it provides an API that says really create a connection to this destination, send data. Sockets is the name of that API that's commonly used. So that's where you'll hear mainly about sockets, the physical interface or the programming interface. We won't say much more about the physical interface, the programming interface you may see in some other courses. We've covered it a little bit in the lab in some years if we have time. Other questions before we move on to the next set of lectures.