 So, we want to move from links to networks instead of sending across just one link between a pair of devices. What if I want to send from my computer here to the Facebook web server in the U.S.? Of course I don't have a link to it. So the only way to reach some web server in another country is to send via a set of links. And we say a network is made up by combining a set of links together. So move on to networking. A lot of communications problems, there are many communication problems to solve to make our applications work well. How do we solve complex problems? Anyone written any software? What do you do when you write software? Do you write all your code in one file, in one big sequential function or object? Some of you do, probably, but what should you do? Different files, different objects or different functions, I'm not a very good programmer, but so you break things up into smaller chunks and you say you write a function to do this task and you write another function to do a different task and then you combine those functions together to do the more complex, complete task. So this concept is called divide and conquer. We've got a large problem, we divide it up into smaller components and conquer those smaller components one at a time. We do the same in communications. We divide and conquer, but in communications instead of talking about functions, we talk about concepts and we divide the tasks for communication into layers. So the name we give them is layers and the idea is that some tasks for communicating between computers are assigned to one layer and other tasks to another layer and so on and the way to communicate is to, you combine those tasks by layering them on top of each other. So we get some form of stack of layers. So we'll just introduce those concepts and look at a real example of layering and we sometimes call the way that we form layers a protocol architecture, so let's get onto that. Here's one of our old pictures about an example of communicating across the link. Some of the things you know so far from this course is how to get data across the link. You know different ways to convert the data into signals, so you know that we need to transmit signals and there are different ways to convert that data into signals to be transmitted, different types of signals, different types of links, wired wireless. Those tasks of getting bits or our data as a signal across a link we allocate to the physical layer. It's about dealing with the physical signals, actual signals that go between the computers. So the name given to those tasks is the physical layer. There are many tasks in there. Another thing that we need to do to be able to communicate between two computers across a link, what we saw in the previous topic, not multiplexing, but the one before was even if we can send some data across a link, sometimes we'll have errors. So we have some protocols to tell the source to resend or we have some other protocol to tell the source to slow down, flow control. So this and some other tasks of getting the data efficiently across the link are referred as the data link layer. Still about the link, but focusing not on signals but on the data. So there are different tasks involved and commonly it's separated into the physical layer, getting signals across a link, data link layer, making sure that data across the link is delivered correctly. So we've seen some of those tasks already. But now what if we move to a network? And this is our old picture of a network. We have a source that wants to communicate with this destination and we now have a set of links, a link from our source to some intermediate device. Some device who's not there to create data, it's not there to receive data, it's there to help me getting data from source to destination, say to forward the data on. So we have a link here. We know how to communicate across a link. We've got techniques at the data link layer and physical layer to do that. And similar across the next link and the subsequent links, we can communicate across individual links, but there are a few other problems to deal with. How these intermediate systems behave when they receive data is one of them. How they send it on to the next one. How do they do that is one problem. We'll see that in the next topic. Another problem which is a bit more obvious to you, but maybe not from this picture. Let me find a different picture. This is from, not so important, it's from the next topic so you have it there, but this is a picture of a simple network. So there are some computing devices and some intermediate systems, these green boxes. And some links between them. A wants to send data to F, where does it send it? A sends to where? A sends to four and then someone said seven, why not five? Why not one? Right, so you see there are multiple paths from source through to destination via these intermediate systems. So the question becomes, which path do we use? So now in a network, even though we have a set of links, we have this problem of choosing the path from source to destination. And I think you know of some algorithms to find the shortest path, Dijkstra and so on, and it's used in the internet or in communication systems. We would call it routing to find a route from source to destination. And that's not the next topic, it's the topic after that, the ways to do that. Many different ways. Shortest number of hops or links, maybe some links are cheaper to use than others. So choose the path which has the lowest financial cost. Or some links have a higher data rate than others. So choose the path where we get faster data transfer. That's the problem of routing and that's one problem that we need to deal with to communicate from source to destination via intermediate systems. And we'll classify that problem of finding the path as part of the network layer. The network layer involves tasks to allow us to get data across a network. Not just one link, but across many links. Finding the path and then how do these nodes send it on. We'll see that in the next topic. So let's say we know how to do that. We can find a path, what's left? How does the source communicate with that destination? Say the source is running a web browser. In a web server. Well we usually need some other things to help us communicate efficiently as well. Not just finding a path. What if I found a path, I send my data, it gives to A, it gives to B. B is just a computing device and luckily it has an error. The data gives to B and B loses it. What do we, what should we do? Who should we send? We should resend because many applications will not work if the data doesn't get to the destination correctly. We should resend, but resending across the link may not help. Because really the failure is not across the link but at the computer inside the device. So what we'll often do is say in the same way as the error control we saw, okay, the destination didn't receive it, there's no act coming back. So the source computer resends, sends it again and hopefully it gets there the second time otherwise it keeps resending. So we need such retransmission scheme from the source through to the destination. We looked at it across links but the same is applied across a network from source computer to destination computer. And your computers do that today using something called TCP. And that is not really related to the network layer. We often consider that that's to support applications. Not all applications need that. Web browsing does, email does, but some say video streaming, voice calls do not need retransmissions. So we say that there are some other tasks which are just needed on the source and destination to help transport the data from source to destination. The other things we need is, for example, with HTTP, we need to specify the format of the messages, the format of the web pages so that our applications can communicate on source and destination. So there are a number of tasks that we need to get the network to communicate at the network layer plus some other tasks need especially the source and destination so that our applications can communicate. So one way to think of that, so we divide these tasks into layers. So the concept divide and conquer because communications is complex, we separate all those tasks, we separate them up and group them corresponding to the types of things they need to do. And the idea is then for each layer of tasks, we design and implement a protocol that will solve that problem. And then we select one to use. It makes design and implementation easy or easier than having one big piece of software or hardware that does everything. It makes upgrading easy. Again, you need to upgrade some link here. Then you just change the physical or data link layer, but you don't have to change anything that happens on the source or destination. So the end computers don't need to change just across that link we can upgrade. Maybe give a new version of the technology. We can select implementations from different vendors, different companies and mix and match, which makes it better for consumers. As long as those layers are standard, that is they have a standard interface between them. The problem being we often have many overheads. We send from one layer to another it introduces some overhead of processing and also of data and the designs may be suboptimal. Let's look at how we can split the communication tasks into layers. And we can talk about a layered architecture, how we combine our components in some layered manner. So far we've said there are tasks involved with link communications, how to get data across the link. We've already called them the physical layer and the data link layer. There are tasks involved with network communications, how to get data across the set of links, like finding a path. And there's some tasks involved with supporting applications, making sure web browsing works well, making sure our file downloads work efficiently. So I'll group that as application support. Note that support for applications is only needed on these end devices, the source and destination. My intermediate device doesn't care whether I'm using web browsing, file download, email. It's just the source and destination that cares about that. This is a general view of these division of tasks. Some people have come up with standards that say, how we exactly divide the tasks up. And they give names to layers and actual protocols for layers. Others have sort of formed over time, some views of what are the layers that should be used in the internet. So a standard we'll see in the next slide is called OSI. And then we'll see the example that we use in our course and we use every day as an internet five layered model. Let's go through two examples. First one, who's heard of ISO? ISO, standards organization. They create standards in many things, with weights and measurements, with management systems, communication systems, many systems. So it's a standards organization. And in the 70s, they created standards for network communications. So many devices can communicate. And they call to open systems interconnection. ISO, this is a spelling mistake, I get confused. This is OSI, not ISO. ISO, OSI. And they come up with a specific architecture saying for communications, you should divide into seven different layers. And they define the set of tasks which correspond to each layer. And actually they develop protocols for each layer. So you could go and buy products, they implemented the protocols at the different layers. That was developed in the 70s. Around the same time, other people were working on different models for communications. So there were some people working on building what became the internet. IBM had their own approach. So in those days, before the internet, different companies were developing their own way to communicate. Apple had Apple Talk, Novel had some different layered model. OSI was an international one. But it turned out that another thing happening started in the US and expanded was they used some protocols called TCPIP. TCP and IP and they became more popular. People use that for different reasons. And the ISO OSI model became less popular and is no longer used today, maybe except for very, very old systems. But the concepts and the way that they define layers is still taught and it's still used to describe systems. So it's useful to know what the layers are. And it's useful to be aware that there is this common seven-layer OSI model. But today, and we'll see in the next slides, with the internet, we can view the layered model slightly differently. But what were the layers? Here they are. Which is layer one? What's the first layer? We start at the bottom. So sometimes we refer to the layers by numbers. So layer one is the physical layer, layer two data link, layer seven application layer. They're the names of the layers. And I've tried to just summarize, sorry. I've tried to summarize what roughly the tasks are for each of the layers. Physical layer is about, they specify the interface between the device and the network. So the signals which are transmitted, the transmit power, all those electrical characteristics for electrical signals. So what we've studied about sending bits as signals corresponds to the physical layer. Data link layer, like we've said, flow control, error control across a link. So those two are related to getting data across a link. Network layer, getting data across a set of links, finding a path, for example. There are many other things there, but that's the main purpose. Then the next four are really about making applications work well. And they split it into four different parts. Transport is about getting data reliably across the network. Source to destination. Any questions on the session layer? How's this session going? The session layer is about some applications before you transfer data, you make some agreement. We're going to transfer this amount of data in this manner. So we establish a session. For example, a voice call. Using voice over IP, you call someone when they pick up. There's some answer message and then you transfer data. So we can think of that as a session. So the session layer was about how to manage sessions between applications. Presentation layer was about converting data between different formats. One computer creates an image in this format, but the destination computer wants it in a different format, so the presentation layer had the role of converting, also encryption. Application layer is about specific things that some applications need. For example, the format of emails, the format of webpages. How file downloads work. That's related to the application layer. So that's the rough description of the tasks involved in those seven layers. I will not test you about OSI seven layer model. It's nice to know the names of them. You may see it in other places. I will test you about these ones though. This is the one we will use. So what happened is that around the same time, some other people were building networks using different approaches. And in the US, there was a research network. The Advanced Research Projects Agency, APA, started to connect a few universities together. So a few universities wanted to share their large computers. So they created a network called APAnet. And they designed two very important protocols for this. This was in the 70s or late 60s. TCP and IP. And they designed them and some other things and they created a network between universities and some government organizations in the US. And eventually connected to other organizations in other countries. And it grew and it become what we know as the internet. So the internet today was built upon these networks using TCP and IP. So we often refer to it as the TCP slash IP protocol suite or protocol architecture or TCP IP layered model. It's got different names. Or simply just the internet protocol architecture. Internet or TCP IP, we really mean the same thing in this instance. In this case there wasn't any organization creating a standard saying this is the layers. In OSI some people got together, created a standard saying these are the seven layers, this is what they should do. In the internet it was more ad hoc. People just did it. So there was no official document saying this is how it works or this is the protocol architecture. But generally it was divided into five layers. Some people have a different view of four layers. And some people name the layers differently. But for this course we're going to define the TCP IP five layer protocol architecture as these five layers. And you see it's very similar to OSI but we cut out two layers. Physical layer, data length layer same as before getting data across the link. Network layer, getting the data across the network. Routing for example. Then to support applications there's a transport layer which is making our data delivered reliably across the network. And all the rest is grouped into the application layer. There's no presentation or session layer. There's no standard definitions so the names change. That is you may see another textbook or someone in right on a web page with different names. We will use these but be aware that sometimes you'll see slightly different names. And sometimes there's some overlap. So it's not clear cut and where the layers are separated. But it's very useful to think of all communications from this model of deal with signals at the physical layer. Deal with getting data across the link at the data link layer. Deal with getting it across a network, a set of links at the network layer. Making applications, allowing applications to transfer data efficiently across the network. The transport layer. For example, email, web browsing, file downloads, secure logins, database applications. They all need reliability. That is if we send data across the internet and it's lost somewhere all of those applications need it to be retransmitted. So instead of having the application handle that retransmission it's offloaded to the transport layer. That does the retransmission for all the applications that wanted. So in fact, TCP is the protocol used at the transport layer that handles retransmissions. It doesn't matter what application you're using. TCP will do the retransmissions for you. Which means if you create your own application and your own communication protocol between applications, you don't have to worry about retransmissions. You just let TCP do it for you. Let's just finish with a few examples and a little bit more terminology. I'll just jump back, sorry, in this one. Remember, not all devices need to implement all layers. The intermediate devices don't need support for applications. So in our five-layer model, generally they don't worry about the transport or application layer. And in fact, some devices don't worry about the network layer. For example, a modem or some amplifier or repeater is not concerned with the networking aspect. It's just concerned with improving the link communications. So not all devices implement all layers. We can talk about layers from layer one, starting the physical layer at the bottom up to layer five at the top. And sometimes we talk about devices with respect to the layer that they operate at. So a router, like a, well, this is a bad example, but a router you may have at home for your internet access. You may have Wi-Fi, ADSL, a wireless router, for example. We can sometimes think as a layer three device, because it implements the physical layer, data link layer and the network layer up to layer three. This Wi-Fi access point only deals with the physical layer and data link layer. It's a little bit different. It doesn't need to do any networking aspects. We'll see that when we look at LANs. And we call it a layer two device, because it implements up until layer two. A modem or an amplifier or repeater is usually just dealing with, say, amplifying physical signals. So we think of it as a layer one device. A host is the source or destination which implements all five layers. My laptop, your mobile phone is a host. A web server. Where are they implemented? So from a host perspective, there are protocols used for each layer. Maybe we'll jump back to where after we see examples of protocols. For example, application layer includes HTTP, FTP, secure shell, many protocols that specific applications use. You access a database remotely. There's a protocol for doing that. You send an SMS or you send an instant message. There's a protocol for doing that and many different protocols. So they are application layer protocols. There are many. At the transport layer, there are not so many. And there are two main ones, TCP and UDP. TCP deals with several things. One of them is reliability. Your application sends data, TCP makes sure that the destination receives the data. If it gets lost somewhere in between, TCP will try and fix it for you. That means your application doesn't have to deal with it. You let TCP deal with that. At the network layer, the core protocol and what makes up the internet is called IP. Which stands for? What's IP stands for? The internet protocol. The core protocol of the internet in its name is the internet protocol. And we'll study that in a bit of depth. So essentially every computer that is attached to the internet uses IP. It may not use TCP or UDP or it may select different ones here. It may not use HTTP, but the main thing in common is IP. At the data link layer and physical layer, there are many different technologies. Ethernet for wired LANs, wireless LANs, there's SDH, PDH, many many that I cannot list here. Technologies really that implement the data link layer and physical layer. So that's some examples of the protocols. Where are they implemented? If you think of your laptop, your home PC or even your mobile phone to some extent. A rough separation is that application layer protocols are implemented in applications. In user processes. In your web browser. In your voice application. Skype, whatever application you're using for communications usually implements an application layer protocol. Like HTTP is implemented in Firefox. Your messaging application. Facebook Messenger or whatever secure chat, tech secure, they implement the protocols for sending instant messages. So that's at the application. The transport layer and the network layer. Network layer, primarily IP plus some other supporting protocols. Transport layer, TCP and some others are usually in your OS. So if you look in the source code of your OS, you'll find some files which have the code for TCP and IP and others. And that's common across most systems. The data link layer and physical layer, how to send signals. How to retransmit across the link are often associated with your LAN card. In a computer or in general your network interface card. Whether it's a Wi-Fi chip, a LAN card, your GSM module. But the hardware part is usually implementing the physical and data link layer. There's some overlap but that's a rough separation. And in fact the example of TCP-IP operation is not relevant here. So that finishes this topic. You should in summary definitely remember those five layers of our TCP-IP five-layer model. And start over time to remember what tasks are allocated to each of those five layers. Over the remaining lectures we'll continue moving on about networking, aspects of networking. And then we'll finish with some more examples of how IP works, the network layer. And a little bit about transport and application. So we've really done with these two, we've got a little bit more. But we need the rest of the time about network based communications. And that will start tomorrow.