 A protocol, a set of rules for two or more entities to communicate with each other, so they follow those rules so that effectively they both speak the same language, they can understand each other. For communication systems we don't use just one protocol, we use a set of protocols and we organize them in a way such that we can think of them as layered, one on top of each other. So we have one protocol which we say is part of the physical layer that has the role of sending signals across links, electrical signals, radio signals, and then another protocol that uses that physical layer protocol to do some extra tasks. And then another protocol, a network layer to do additional tasks and so on such that when we combine all these protocols we can achieve what we want to do when we want to communicate across a network or across the internet. So very broad coverage of protocol architectures last week. Another classification of these five layers is that we say the bottom two layers, data link and physical, their responsibility together is about getting data across one link. I connect my laptop to that PC via a single cable. The physical and data link layer protocols have responsibility of getting the data across that link. They don't care about the next link, for example if there's a link onto another device, we just focus or the scope is one link for those protocols. But of course in large communication systems to communicate from one entity to another we may have multiple links. We go via intermediate devices and we get a network and it's the role of the network layer protocol to get the data across a set of links, across a network. And the main network layer protocol in the TCP IP architecture is called IP or the internet protocol. There are some other supporting protocols as well, but IP is the core of the internet. It's the most important part. The top two layers are about getting data between really applications. So the application on my computer for web browsing, that is Firefox web browser, needs to get data to some web server in the US and data comes back. Then the application layer protocols are specific to applications like one is for web browsing, one is for file transfer, another for email. But some of those protocols have common requirements and therefore they'll use a single transport protocol. They'll all use or many will use the same one. So these two layers are more about getting data between the end user computers, between laptop and server. Not so much about getting data between intermediate devices like wireless access points, routers, switches from the end devices. So that's a rough overview of what we covered last week or at least we got to last week. We gave this example with two end computers, a source host and a destination host. Let's say a PC in the laptop, but connected via two links and one intermediate device, this intermediate computing device here called a router. So one link to the router and then another link from the router to the destination. So it's a very simple network, a network with two links. Maybe the important thing to note here is that not all devices need to implement all layers. As you see here, normally the end hosts, PCs, laptops, the end user computers implement all five layers. Because they are running applications and they need the support of application and transport layer. Intermediate devices, depending upon where they are in the network, may not implement all five layers. In this example, the router implements physical data link layer and network layer. It doesn't care about what application is being used between the hosts. When I send from my laptop wirelessly to this access point, and you can see it has a cable going up to another device and out into the internet. This access point, an intermediate device, doesn't care about whether I'm web browsing, sending an email, instant message, whatever. It doesn't know anything about the application. It's just getting data received on one link and sending it across the next link until it gets to the destination. Through the course we'll see some names and what is a router, what is a switch, what is an access point. There's a few more things that we want to talk about with protocol architectures. A protocol set of rules for entities to follow, to communicate, implemented in hardware and software. I'll show some examples soon for the implementation. A standard is an important thing. A standard is an agreed upon set of rules or an agreed upon protocol, normally agreed by multiple companies or organizations. Some organizations either get together or people get together and they agree. When we implement the communications or wireless communications for laptops, let's all use this one protocol. To ensure everyone uses it and uses it correctly and implements it correctly, they create a standard. If everyone follows that same standard, then my laptop will be able to communicate with a laptop from a different manufacturer. Standards are documents that describe a set of protocols or rules to use and are usually created by some organization, whether it's government organization or a commercial entity. From last week, some of the old devices we can have a look at. Here's an old LAN card that normally you plug into your PC, into a PCI slot I guess, and nowadays on the motherboard, you don't have to buy a separate LAN card. Here's a switch and they both have those sockets so that you connect a LAN cable from this one into this one and they communicate with each other. Don't worry about what the switch does at the moment. This one's made by PCI, made in China. This is made by or the chip is made by Compex, in fact made in Singapore. Different companies made them. They're made by different companies, but they can still talk to each other. The reason why is that they both implement the same standard for communications. In fact, the standard usually has it, they have a name. This one would be generally called Ethernet or IEEE 802.3 is the standard that this one implements and that this one implements. When I go and buy a device, so long as it implements the same standard, it will be able to communicate with any of these two. This use of standards allows or helps create an open market and a competitive market in that a consumer or a business, when they want to buy products, they don't have to buy a product from a particular manufacturer. They just need to buy a product from a manufacturer that implements that standard that everyone else uses. Or you have choice of who do you buy your products from and there becomes competition in the market. So you've seen standards, not just in communications, you see them in many other aspects of ICT and other fields. Another thing standards allow us is to allow to communicate across borders. For example, there's a worldwide standard for telephone numbers. That is, we have a sequence of numbers to represent some telephone. In different countries, there may be a different length of the numbers, but they still follow some structure. So telephone numbers for normal telephones have some follow some standard. And in fact, the telephones that we use, think of your mobile phone, they implement one or several standards. So old telephones, mobile phones use GSM. GSM referred to the name of a standard. And everyone who had a phone that implemented that standard could call, in theory could call someone else who has a phone using that GSM technology and the standard behind it. Nowadays, we have 3G and fourth generation technologies. And if your phone implements the same standard as other phones, and the same standard used in the network, then you should be able to use it in any country. So it allows interoperability between devices and networks in different nations, in different countries. We're not going to spend too much time about standards in this course, but let's just mention some of the organizations that create them, because you'll see them throughout this course, and you've probably seen some of them, or most of them already, or heard of their names. So this is a list of five main organizations that create standards relevant for us, relevant for data communications and computer network. First one, the International Organization for Standardization, ISO. So an organization with representatives from every or most countries in the world, usually say from some government agencies in each country, get together, and agree upon ways to do things, not just communications, but many different things. Procedures for management, for quality control, communications, electrical standards, standards for building, standards for how to manufacture different devices, so not just about communications. You may have seen on signs ISO 9001, it's about a standard for quality control in how to manage an organization. ISO creates standards also for communications. We won't see too many examples. Maybe the main one that comes up is we're looking at the TCPIP protocol architecture. It has five layers. There's another old one that we mentioned last week, which is called the OSI protocol architecture, a seven layer architecture. ISO created the OSI model. Another one which focuses mainly on or just on telecommunications. So think of landline telephone systems connecting the normal home telephone network across countries, mobile phones. ITU, the International Telecommunication Union, standardizes the technologies that we use for telecoms, for mobile phones, for internet in some cases and for home landline telephones. So they create standards. IEEE, this is an organization that is made up mainly of engineers, electrical, electronic engineers from universities and from companies. And they've created a large organization that does many things, but in terms of standards, they create standards for products, electronics, radio, electrical engineering, including communications. So that's one you would have seen or possibly seen in product literature, manuals for devices. Anyone tell me the name or the number for an IEEE standard? Use it every day. What's an IEEE standard that you may know of? Any idea? You may have seen it. You may even seen it on your mobile device, on your tablet, on your phone. It usually comes with a different name, but the real name. Anyone use Wi-Fi before? OK, Wi-Fi is think of this as a marketing name or a brand name. The general technology is called a wireless LAN, a local area network, but we connect wirelessly. So when you connect to the SIT wireless network, you're connecting to a wireless LAN. We often call it by its marketing name Wi-Fi. What is the standard used for Wi-Fi or wireless LAN? Well, it was created by IEEE, the organization, and they gave it a number, 802.11. That's just the number of the standard. You can look up and find the document, or in fact, a set of documents that describe how does my laptop send to that access point? What signals does it send? What type of data does it send? So IEEE 802.11 is a standard. Wi-Fi is just think of that as the marketing or the brand name. So this is the technical name. When you use wired LAN, you plug the cable in, also created by IEEE. They create many standards regarding local area networks. And the number is 802.3. In fact, there are many 802s, up to 20-something. Some of you may have heard of Wi-Max. That's an IEEE standard. Wi-Max, and there are other wireless and wired protocols created by this organization, or standardized by this organization called IEEE. And they create other things, not just communications. This one, I think it's correct. Remember yesterday, anyone know what that is? The common name or the brand name for that? You may not use it so much as an alternative for USB. Maybe connect video cameras. Apple Mac had them for a while, Firewire. So in the past, that was a standard for connecting devices together via cables. Again, standardized by IEEE. And there are hundreds, if not thousands, of different standards in electrical, radio, and electronic engineering. Another one. So the next one, the fourth one, creates standards mainly about Internet and the protocols used in the Internet. The Internet Engineering Task Force, IETF. So the IETF is responsible for things like TCP, IP, UDP, originally HTTP, and many of the other protocols. Do we list some up here? Many of these protocols here, in the top three layers, standardized by the IETF, some of them. They have hundreds, if not... Hundreds of protocols described. I'll not try to list them all. All of these, standardized by IETF, all of these above. So they create protocols for Internet communications. Last one, where do we get to? The World Wide Web Consortium, W3C, develops web-based standards. Think of languages we used in web applications. HTML, all the variants, XHTML, HTML5, XML. And the many things that are used for web applications created by W3C. So they're the main five that are related to data communications and networking. Be aware of them, so when you're reading something and you see IEEE something, then you know, this is an organization that creates standards. You may not remember what these numbers mean, but you know this is some standard for data communications. There are others, so there are others. Sometimes companies get together to create forums and create standards. And the other aspect is there's usually government agencies that also standardize how we use communications inside a country usually. A good example is in Thailand is how we use the different wireless or radio frequencies for communications. When we use wireless communications, we send some signal through the air, some radio signal. At a particular frequency or range of frequencies. And we'll cover it more in transmission media, but there's only a certain range of frequencies that we're allowed to use. Who sets that range of frequencies? Anyone know in Thailand, the name of the organization, that manages the different frequencies that we can use for AM and FM radio, for wireless LAN, for 3G mobile communications. Who's the organization that controls those frequencies? You would have heard of them at least in the news if you follow the news for the last maybe two years, especially related to 3G. There were some options for 3G licenses where the government wanted to auction off access to frequencies and the companies like AIS, True and so on wanted to license those frequencies, pay some money to use them for 3G communications. The organization, the government organization is NBTC, the National Broadcasting and Telecommunications Commission. They are an agency that says, who can use what frequencies? Of course, in fact, they form from two agencies that come together, one the broadcasting, one telecommunications and they were joined together one or two years ago. So if you want to start your own AM radio station in Thailand, you need to get a license from them to use a particular set of frequencies. And each country usually has a similar organization that controls or regulates the frequencies available and other communications systems. Enough about standards, that was very quick and we won't see much more about them. What we want to do today is, the rest of today is cover most of these two topics about addresses. When we want to communicate with another entity, we normally need to know who that other entity is. So we give it an address. And in fact, we're going to skip, well, we're going to switch between these two a little bit. We'll go through some concepts from both and then we'll go through an example that demonstrates those concepts. And tomorrow we'll start on the last part about performance. So I'm going to skip through some slides and come back as needed. This just shows some more example protocols, not many more than what we saw on a previous slide. And it only shows for the network layer back from this side. You can make your own notes. This is the network layer, the middle layer. This is the transport layer and above we think of the application layer. So it's just some example protocols at those three layers. It doesn't show the data link or physical layer at the bottom. The important thing is that in the network layer, the main protocol is IP. Everything is based around the internet protocol. There are some supporting ones, but the main one is IP. Everything uses that. There are a few more at the transport layer and there's many more at the application layer. So just some quick examples. What do we go through? Sorry, this one. Before we go back to some of those addressing slides. Where are all these protocols in our computer? Where are they implemented? This shows the rough categories of where the five different layers are implemented in a device. You can think of the physical layer protocols and data link layer, which are about getting data across a link. The implementation of these protocols is normally in the hardware. What we call a network interface card. In some piece of hardware that connects our device, our computer, to the network. Did I pass them around last time? I can't remember. If not, have a look. It's an old network interface cards. So this is what I call a network interface card. You plug the cable in here and it gives us the computer and interface to some network. Of course nowadays they're not separate cards, they're just small chips on board or motherboard. So in a PC or most computer devices. We've got some more. These are the wireless access points but also have, if you look at the back, some sockets for wired access and some antennas provide wireless access. Not very exciting, but just to, again, it has the five sockets and here in this case, this has some chips to implement the network interface. So some of the hardware implements the physical layer protocol and the data link layer protocols. And a wireless USB device. Again, inside here, if you open it up and I'm not going to, don't open it up. There's some hardware in there that implement the wireless LAN, physical layer and data link layer protocols. Not much to see, I'm sure you've seen them before. It's not always a clean cut in that some parts that may be in the operating system but roughly we can think of these two as the network interface card. The next two layers, network and transport, are usually implemented in your OS in your operating system. If you go and look at the source code for your Linux operating system, you'll find some C source code in there that implements IP and TCP and other protocols in these two layers. So think of the transport and network layers part of the OS. Windows implements IP and TCP, so does the Mac OS and so does iOS on your iPhone and so on. So any device with internet access, normally the OS implements these layers. Application layer by applications. You find the source code for Firefox and you see some code that implements HTTP. So that's the rough separation of where would you find the hardware and software for those protocols. I go through this entire topic reasonably quick because we wanna move into the details in the next topic as soon as possible to give you some more concrete examples. We're mainly looking at concepts at the moment. Let's go back. Don't take these home with you. You could take these that are only worth, they're not worth anything. This is addresses. We wanna introduce the concept of the different types of addresses and then we'll give some examples to finish off this lecture today. Now, imagine our computers in a network. Each computer has a network interface card. Interface to a network. So we attach, our computer attaches to a network using the network interface card or generally a network interface. Each device, each network interface normally has an address on that network. We give it an address so that when we want to communicate with some other device, we can use that address to say which other device we wanna communicate with. And the name of the address that the network interface gets is one of them is called the hardware address because usually it's associated with a piece of hardware, the LAN card, for example. Maybe it's a physical, another name is a physical address, a data link address or a MAC address, but we'll use a hardware address and see that in some examples. So I take my wireless router here. I've got four sockets. There are five here. I wanna use just four sockets in the back. I plug a cable in here into the laptop, another cable into this PC and maybe two more into other computers, other laptops. So we can think we have four end user devices, a laptop and three PCs, for example, connected to this intermediate device. Each of those four computers have a network interface card and they all have an address associated with that network interface card. And what's what we call a hardware address. So my laptop has a hardware address, so does this PC because if I send data, then normally I need to indicate which of the other computers needs to receive that data. How do I do that? I set a destination address and I say, okay, my message needs to go to this destination. My message may go to here and then this one looks at the destination and then sends it to the correct computer. So we use addresses to identify where the data is gonna go to. Let's try and draw a picture to illustrate the role of addresses, starting with a simple example. I'm gonna try and draw my pictures on the screen. My drawing skills are still developing, so you will draw it much neater than I draw, okay? Let's start. We have some computers that might, well, let's draw four computers, we'll need them eventually. And let's start, we're gonna connect those two computers together in one small network, in a LAN, for example, and the other two computers in a separate network, completely separate to start with. And then we'll see what happens if you wanna join them. So they could be connected, these two computers via a cable, just directly together. And the other two maybe wireless or a different technology. And often we draw a network, instead of drawing the cables, especially when there are many computers, have to draw many lines, we draw a cloud. Let's see, something like this. Some cloud, and we say that this one connects to the cloud, so does this one. And same for the other network. That's just a concept, the cloud, a concept to say that these two are connected by some cables or some wireless connections, there may be some intermediate devices in here. The cloud's just used to represent that, in fact, we don't care about the details of how they're connected, we're just saying that they are connected somehow, okay? Inside here maybe just, it may be just one cable, or it may be tens of different devices in a very complex connection here. The cloud just means some connection. We won't worry about the details at this stage. And let's say they use different technologies. So if we treat these as two local area networks, wireless LANs, this could be using IEEE 802.11 for wireless LAN, or maybe it's using 802.3 for wired LAN or ethernet. And this one may be using something different, Bluetooth, for example, or some other old LAN technology, Token Ring or many other old technologies. So they're different technologies, different devices. Let's draw one more computer, just to say on this one. There can be many more, and it's connected. So focusing on the bottom LAN, these three computers, they're all attached to the same small network, the same LAN, to communicate with each other, they must all use the same protocol, at least the same physical layer and data link layer protocol, okay? Because think of them, they're all directly connected to each other. If you're in the same LAN here, you use the same protocol, because if this one uses a different protocol to this one, at the physical layer at least, then they will not be able to communicate. So let's assume that they use the same physical and data link layer protocols for these three computers. These two use the same as each other, but let's assume that they're different from over here. If this computer wants to send to this one, because there are two options for where the data can be delivered, we'll use some addressing scheme to say that, okay, let's give each computer an address, and when I want to send a message to one computer, I will say this message is destined to a particular address. And let's choose an addressing scheme and to keep it simple. In reality, it's more complex. To keep it simple, I'll say, the addresses are these ones, let's give them letters. Sorry, and A, B, and C. Three computers, they've got addresses A, B, and C. We'd call these, these are the hardware addresses. The addresses associated with the LAN card or the network interface card in each of those computers, a hardware address. The scheme I'm using for these computers is a lowercase letter in purple. Let's say that's part of the protocol. The address must be a lowercase letter. In reality, the addresses are structured much longer and may not just be letters, but for simplicity in this example. And similar in this other LAN, those two computers have addresses, hardware addresses, but using a different scheme or a different format are incompatible with the purple ones. Let's make them uppercase letters, B and C. This case, that one, that's a uppercase green C and B. They are the hardware addresses for these two computers. They can talk to each other, they have the same address format, but they cannot talk to these three because they're on a different network and use, importantly, a different address format. The other reason they can't talk to these three is because there's no connection yet. We'll connect them in a moment. So in different LANs and also wide-area networks across the globe, different technologies are used. In SIT, we use 802.11 wireless LAN. In some other university may use something completely different, not compatible with ours. It's up to the choice of who builds that network. So there are many different technologies with different address formats across the world. In the internet, what we want to do is allow any computer, no matter what technology they use in the LAN, allow any computer to communicate with any other computer. So two things we need at least for that. We need to physically connect the networks. So let's connect them. Let's put in another device, a special device in the middle that connects these two. So we've got a physical connection, some cables that connect. This special device in the middle has the role of getting data from this network to this one. Even with this connection, we have a problem in that if uppercase B wants to send a data to this computer, it doesn't understand the address format of this computer. It knows nothing about these lowercase addresses. It implements only this protocol with the green uppercase addresses. So what we do in the internet is, in fact, for all the computers that we want to allow to communicate, we give them a second address, a network address or a logical address, where the second address all follows a common format. Let's give them a second address and then explain. So each computer now has what we call a hardware address, the one shown, and we give them a second address. Let's just give them numbers. And I've used a different address format here. Now, if this computer wants to send a here, it says, okay, the destination is computer 3, not computer lowercase a, but computer 3. It would send the data to this intermediate device, which would then deliver it to computer 3. The hardware addresses are used locally on this network. To communicate from this computer to here, it goes from C to B. Similar from this device to here goes to computer A. But across different networks, we use a logical or a network address. The numbers in this simplistic example. What are these common addresses in the real world? We'll come back to that picture. We have two types of addresses now. Every network interface normally has a hardware address, which is specific to the local network it's on. But to connect to the internet, those network interfaces may also have a second address called a logical address, maybe easier an IP address in real life. In the internet, the logical addresses are internet protocol addresses, an IP address. IP addresses and hardware addresses are not letters and numbers like I drew on the example. They're in fact long sequences of bits. We'll see some examples shortly. So in most cases in the internet, our devices have two addresses, hardware address. But since across the world, there are many different technologies to allow them to communicate, we also have a second address, an IP address. The numbers in this simple example. To communicate across the internet to another computer on the internet, that other one needs an IP address. It normally will also have a hardware address. To demonstrate these concepts of addresses and a few more addresses, I've got some examples to go through. What are we going to do? We have about 30 minutes remaining. Do you want to break or we keep going? Option one is that we stop now for our normal break and then start again and go for another 30 minutes, maybe 35 minutes. Option two is we just keep going now and finish by 3 p.m. and then finish for the day. Option one, stop, have a break, hands up. Option two, keep going now. Anyone know hands up? Option three, go to 4 p.m. No, okay, let's keep going. We'll see if we can finish. We should finish by 3 p.m. There's no option four, stop. That's all right. Because the CS section we've had election they're a bit ahead of here, so we need to catch up with them. So, summarise so far on addresses. In the internet, normally each network interface has two addresses. It has a hardware address that identifies that piece of hardware on the computer and a second, sometimes optionally second address that identifies that interface in the entire internet called an IP address. So we'll see two types of addresses. It turns out we don't always have to have an IP address. Most devices have a hardware address. Only when we say we're connected to the internet do we get an IP address. Two types of addresses are common. What's the IP address of your phone? Don't know. Do you know how to find it? Okay. All right. Simple one then. What's the IP address of the web server that you access for this course? I call it the ICT server. When you access and do the quiz, what's the IP address? I see someone's getting close. 10.10. Others are blank faces. What's the domain name of the ICT server? ICT.sit.tu.acd.th, okay? Most people can remember the domain name. Not many people can remember the IP address. They are the same. They identify the same computer in the network. That is, our computers really on the internet are identified by IP addresses. The ICT server has an IP address. My laptop, when I access the internet, has an IP address. All computers have an IP address when they're accessing the internet. But some of those computers, when we need to remember their name or how to contact them, they have a third address, a domain name. It's not listed here, but an example, a domain name. Google.com or ICT.sit.tu, so on. So what are we now? Computers have IP addresses and some computers have what we say is human-friendly addresses, domain names. I call them human-friendly because us humans can remember them. We can write them down easier. IP addresses are what's actually used to communicate between computers, but for us humans to not have to remember IP addresses, we use domain names. And there's a mapping that is a domain name maps to some IP address in the simple terms. That is, some domain name and some IP address can represent the same computer. So normally in the internet, all computers have an IP address. Some of them may also have a domain name as a simpler name. So that's a third type of address. Hardware address, IP address, domain names or user-friendly addresses. And related to them are some specific applications like some email address, some user at a domain name, where the domain name actually corresponds to an IP address. So we see different types of addresses not just IP and hardware. And another type we'll just mention here and cover in a later topic, port numbers. Hardware addresses identify a network interface on a particular or on a specific network. IP addresses identify a network interface on the internet. Port numbers identify applications on a computer because on my computer I can run many applications at the same time. Web browser, email client, instant messaging, web server all on the same computer. To identify them we use another type of address called a port number. In simple terms, port numbers identify applications or software processes representing applications. So far four types of addresses hardware, IP port numbers and the user friendly addresses like domain names. I want to show an example that illustrates all these addresses, or most of them and also some protocols. The example is going to be web browsing. But just before we go through the example let's just say, well what is web browsing? You know, you web browse all the time but what type of messages do we send when we're web browsing? What are the entities involved? Web browsing uses a protocol called the hypertext transfer protocol HTTP. There are two entities involved normally. A web browser running on one computer an application called a web browser and on another computer an application called a web server. So this diagram is showing this is one computer we're going to see the messages sent between these two computers when we're web browsing. First what happens is the user opens their web browser they type in a URL in the address bar type in a URL maybe click on a link but let's say we type in a URL and we press enter. That's step one. When we press enter on our web browser after typing in that URL the web browser goes to work using HTTP sorry that we've started early but we'll catch up with you later because we had a class cancel before but there's plenty of chances to catch up don't worry. There may be a few other students as well that missed out on this early start but I'll deal with them separately. What does our web browser do? Using HTTP it sends a message to the web server so my web browser on my laptop maybe the web server in the US sends a message saying I want to get this web page that's the meaning of the message where the web page is identified in the URL in this example I say the web page is in the test directory it's called index.html just as an example we send a message from web browser to server saying I want to get this page when the web server receives this request the web server looks checks do I have this page on my hard drive does this page exist if so is this web browser allowed to access if so then the web server looks at this file on its hard drive reads it in and sends back a response the response gives some status message saying everything is okay don't worry about the details here just go through the general concept of we send back a response saying your request was okay I have the web page and the server takes the contents of this requested page and puts it in the response in this case some HTML you've all seen some HTML sends this in a message back from the server to the browser the browser receives this response the browser reads the contents of the message and uses that to display something on the screen for example the title of the page and the browser his test and some contents whatever is on that web page the very basics of HTTP browser sends a request to the server for a page the server sends back the web page that they requested let's now look at an example you can see some addresses and web browsing work on in real life first let's look at some address details of my computer I run a Linux operating system you know in Windows you can look at your network connections in the control panel or wherever you look at network connections and you can look and find the properties of your LAN or your wireless LAN so I'm going to do that on my computer there are different ways to do it on the command line I have here a program called IFconfig IFconfig shows me the configuration of my different network interfaces IF is sure for interfaces so to configure my interfaces so it shows me a summary of my I3 available network interfaces just fix this screen can we see everything yeah I have 3 network interfaces currently on my laptop available one's called EDH0 one's called LO and the third one's called WLAN0 you should better guess what 2 of them represent the bottom one what is that my wireless LAN interface on my laptop and the network interfaces it has it doesn't have one of these cards it's got a smaller chip on the motherboard and a socket for my wired LAN which is called Ethernet there's an EDH interface which I know means the wired LAN interface I also have wireless LAN in the laptop so the name of that given by my operating system is WLAN0 and Ethernet is EDH0 my wired LAN interface some statistics and details my wireless LAN interface we'll look at the details in a moment what's the third one local host, local loopback or LO here it's a very special one it's not a real network interface it's a virtual one it's only used if I want to send something to myself it doesn't make much sense for what we're dealing with just for testing purposes so for now ignore the middle one we won't even try to explain it yet imagine there's just two interfaces my wired LAN Ethernet and my wireless LAN my laptop has Bluetooth but I've turned it off so we don't see anything about Bluetooth here and normally we will not currently or before I connected to the SIT wireless LAN for internet access let's look first at the details of my WLAN interface just some of the information this is the hardware address for my wireless LAN interface hardware address here that's fixed for my wireless LAN chip inside my laptop this address is not letters, lowercase or uppercase letters it's in fact a sequence of hexadecimal numbers 12 hexadecimal digits they look random in fact there's some structure in them but it's an address that identifies my wireless LAN interface on my laptop we can see my wired LAN interface has a similar structure address hardware address different value but same structure in fact wired and wireless LAN use the same type of address 12 hexadecimal digits how many bits back to the wireless LAN 12 hexadecimal digits ignore the colon here just 12 hexadecimal digits how many bits remember hexadecimal hexadecimal how many bits in one hexadecimal digit what do we need alright you're too advanced one hexadecimal digit we can have 16 possible values from 0 up to f where f in decimal is 15 how many bits do we need to represent 16 possible values 4 with 4 bits from 0 0 0 0 that is 0 in decimal up to 1 1 1 1 which is 15 in decimal to represent 1 hexadecimal digit we need 4 bits for binary digits so this is 12 hexadecimal digits if we convert it to binary it's in fact 48 bits when our computers communicate they in fact using binary for everything they send it's just that this software and it's very common instead of writing 48 bits here it's very hard to write and remember 48 bits they convert it to hexadecimal it's just a convenient way for humans to write down addresses it's actually a 48 bit number but we write it usually with hexadecimal digits most all wireless LAN and LAN cards have a hardware address and in most cases they are unique globally unique the hardware address of this device was programmed into it when the manufacturer made it and in this device made by the same company has a different hardware address and it's different from my wireless LAN made by a different company and different from my wired LAN so in theory all wireless and wired LAN devices have unique addresses in practice there are some exceptions but for now they are unique so both of my interfaces have a hardware address my wireless LAN interface has also an internet an iNet address or an IP address 10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10.10 really binary values, IP addresses use decimal in this structure of four decimal numbers separated by dots called dotted decimal notation. It's actually again, a binary value. It's 32 bits. We're not going to explain how to convert between this 10.10.10.10.1.2.17 to binary. We'll do that in a later topic. Although it looks like decimal numbers here, that's just to make it easier for us to look at, it's actually a 32-bit binary address. There are some other addresses which are also IP addresses which are associated or connected with this main one. This is the main one here. In the internet protocol there are two main versions available, IP version 4 and IP version 6. IP version 6 is the new one. It's not as common as IP version 4 at the moment, most of us use IPv4. My computer also has an IPv6, an INET6 address, this long one here. We will not cover the structure of this, it's actually 128 bits long, but in hexadecimal. IPv4, 32 bits, IPv6, 128 bit addresses. In a course next semester you'll cover IPv6 in details. So the main thing to take away at the moment, hardware address, IP address. My ethernet interface has a hardware address but no IP address. I'm not currently connected to the internet via my wired LAN, I don't have a cable plugged in. In practice we only get an IP address when we need one on demand. So my wireless LAN has one, if I turn off my wireless LAN it will eventually disappear. If I plug in a LAN cable I may get an IP address up here as well. The rest are some statistics and information about the network interface. Not important at this stage. Okay, let's browse the web and I want to give a demo. I'm going to open, where do we go? First I need to start some software. What I'm going to do is visit a website. And I want to record everything that happens when I visit that website. Specifically when I visit a website my computer sends messages out and it receives some messages. Those messages we often call packets. It sends packets and receives packets. I want to see what packets my computer sends and receives. So for this demo I'm going to start some other software that will record everything that I send and receive. It's called some packet capture software. The name is Wireshark. Let's start. When I start this Wireshark software it's going to record everything that my computer sends and receives. And then we'll be able to look at the details. We'll start it in a moment. Just so I can delete the cache. Let's set things up. What I'm going to do, I've typed in a URL which indicates I'm using the protocol HTTP. I'm going to access some domain called sandylands.info. And specifically I want to access a file called IT1 in the test directory, IT1.html. I'm going to press enter in a moment which will trigger my browser to send a request to this web server identified by sandylands.info. And request this web page. And hopefully the web page will come back and be displayed on the browser. Before I do that I want to tell this Wireshark software to record everything that I send and receive. Let's do that. Let's capture everything I send and receive. Everything I send and receive over the wireless LAN interface. You don't have to know the details of this software at the moment. And it's capturing. It looks a bit strange at the moment. But we see many things changing colour. We'll come back to that. My computer is always sending packets out and receiving packets in. And this is listing them here. So we're going to have a look at the moment. My computer does things in the background like the operating system does updates, instant messaging does updates and so on. We'll come back to that. Now, I'm going to visit this web page, press enter. It connected to the server and the server was sent back a web page saying test IT1 is the title and something on the page here. Now let's go back to the capture and see the packets which went out. So I have to stop this. There are hundreds, thousands, 2,000 packets captured then. My computer sent and received 2,000 packets during that one minute or so when I captured. I want to look at just some of them, the ones that were sent directly by my computer. First, let's go back. Let's record. What's my IP address? My IP address is 10.10.102.17. That's my computer. Who did I send to? Anyone know? What IP address did my computer send to when I accessed the web server? Or what other address? Sandylands.info. That is, that's the domain name. This is the address that identifies my laptop in the internet. The address that identifies the web server, well, I typed in the domain name sandylands.info, but what IP address? Well, we can check in fact. There's a mapping that tells us for some domain name, what is its IP address and we can look up this mapping and say if I have the domain name sandylands.info, this program NSLookup tells us the name sandylands.info actually has the IP address 106.187.46.22 so my computer 1010 and I'll write it down before I forget, 1010 102 .17, my laptop sent to the server which has IP address 106.187.46.22 sandylands.info is just a human friendly name for 106.187.46.22 It's something I can remember. I can't remember the IP address Now let's see what we sent between those two There are 2,000 packets here. I want just five or six so I need to filter out it's filter You'll see the details of this software maybe in an assignment in a lab next semester, but that's just quickly goes through in the next 10 minutes Everything sent to 106.187.46.22 I'm creating a filter that says show me all the packets with IP address equal to that of my server and at least them here. Now let's explain what we see This software shows us all the messages sent and received by my computer and at the top these green and black ones Each row represents one message or one packet. We can see Sorry, you cannot see it's 39 here the time at which this packet was recorded From when I recorded the first packet at time zero This packet was recorded 39 seconds later from when I started Not so important for this demo What's important is that these two columns show me for this packet the source computer was 1010.217 my laptop The destination computer was 106.187.46.22 so This information is in fact recorded in the messages sent So this software sees this information. It sees that one computer sent to another one Info gives us a summary of what's inside this message We won't look at them all. We'll see the first one here is sent by my laptop to the server Second one is from the server back to my laptop We see the source and destination are reversed This one we may recognize something especially in the info field Who sent it? The highlighted orange one who sent that who sent the orange highlighted packet laptop sent it to the server easy and Note the info field says get slash test slash IT1.html. This is the request from my browser going to the server That's this message Okay This is my browser It's the HTTP request going from browser to the server Can anyone see the response? We know with HTTP we send a request to the server The server sends back a response. Hopefully with the web page Can anyone see the response? What does the response say in the info field? Is this the response? No Here's the response. All right. You may not have you The only way we can identify at this stage is that it has this 200 ok saying It's coming from the server 106 Going to my laptop it's coming back and We saw briefly before what HTTP does is we send a request to the server the server sends back If everything's okay, it sends back a an okay message and it should include the web page in that response So these are the two main messages in this exchange There are others that happen also if I just look at those two to finish up when I select a message in this second Part of the the interface here it shows the details of that one selected message So this one message from my laptop to server here are the details of that message or that packet It gives me some information that it says well what protocols were used for this message HTTP was used. We know this is part of web browsing. We expect it to be a HTTP message HTTP is part of the application layer What's the next layer? going down Application at the top. What's the next layer? transport, okay In this software think of it upside down This represents the application layer protocol HTTP Then The name of the transport layer protocol is shown here TCP and The network layer protocol you see it's in birth here is IP and then the data link layer And that's all it shows is ethernet or a land protocol. So if we drew our stack application transport network data link physical The actual protocol is used in this one packet at the application layer HTTP At the transport layer. So we're going up there TCP network layer IP is used and In fact, this software only captures a little bit about the bottom two layers and it simply calls it ethernet in this case the actual signals which are sent are not recorded. It's just the information from the operating system So it gives us a little bit of a summary about what protocols were used in this one message From a layered perspective. It gives us the addresses For the those protocols in particular a source and destination When I sent the Message, what was the source hardware address and destination hardware address they listed here What was the source IP address? 10 10 1 0 2 17 destination IP address We mentioned that there's another type of address called a port number and they are listed here So this software will tell us information about who was communicating with who and in fact we can expand and see many more details This is the response message Going from server to laptop. We see the same protocols HTTP TCP IP ethernet this response Also contains the web page I'll expand this this packet Sent from server to my laptop when my computer recorded it it sees the actual HTML Which was sent from the server? using HTTP using web browser protocol so this is the exact HTML which is Shown on my web browser. I can check I can view the page source and see You can check that this web page is in fact carried in that one packet that one message from server to Server to laptop There's a lot of information here and especially the first time you see this this capture using wireshark There's a lot of information. It's very hard to take in so we will not try and go through all the any more details here Main point is we've seen an example with web browsing and I've seen two important messages one from Laptop to server and the second one this one is the response coming back in HTTP we send a request for a web page the server sends back that web page The contents of the page the file in the response message Also shown Each pro or many of the protocols use different types of addresses Usually a source and destination address Who did it come from who is it going to? We see port numbers IP addresses and hardware addresses When we look at those individual protocols later, we'll see the roles of those addresses and The exact structure of them port number 80 for example You may have seen is a common is commonly used for web service every web server uses port 80 Other is a random number for my web browser Questions I'm going to stop there for this this part. It's a lot of information for today Any questions You've got one hour for questions easy No, what's hard? What is hard try and pick up some main concepts from each lecture Today we've talked about We've introduced different types of IP address of addresses hardware IP addresses briefly with mentioned port numbers and User-friendly addresses like domain names so different types of addresses were used We've seen web browsing a very simple example of web browsing. What does it involve HTTP? We send a request for a web page server sends back the web page very simple protocol What else have we seen today? Seen some standard organizations IEEE ISO IETF and others and There's some common standards And we've seen finally in this example. Well Here is an example of the actual protocols in use From a lab perspective HTTP TCP IP ethernet We don't see the physical layer But an example of most of the protocols If you go through and look at the two thousand other packets You'll see many other protocols in use not just this for you'll see others in use Let's stop there for today What we've got remaining Mainly on the performance will do that tomorrow morning. Okay, we'll try and finish this topic tomorrow morning