 In this topic, there's two little, there's two parts, there's a review of what we know about the internet. Some of you probably already know it, some of you may not, but it's some information that we may use through the rest of the course. But I think it's not too complex. So the first part is a review of the internet protocol, some of the main concepts and some terminology that we'll use, so you can remember. And then, and the main topic of this is describe some aspects of the real structure of the internet and how, for example, internet service providers connect together, how an ISP connects together, and we'll give you some examples from different companies' perspective of their networks. So first we'll go through the review, and the review will be very quick unless you have questions along the way. It's just some of the terminology that we need to remember for this course. And most of the information in the review is taken from some of my other courses, ITS 323, for example. What is internet working? Well, we've already mentioned in network technologies we can distinguish networks based upon whether they are an access network or a core network. An access network is something that you and I use to connect to a larger network, whereas the core network connects multiple access networks together. So we have the end users that access a larger network via access networks, and they are connected together via other networks referred to as core networks. And we may use different technologies in each of those networks. And the large thing, the one large network, once we connect them all together we refer to as an internet because we internet work many networks or the internet. So different technologies, so I represent a network as a cloud here, but many different technologies can be used within these cloud networks. It could be a wireless LAN access network, a wired LAN access network. The core network may be using ATM, frame relay, a point-to-point wireless link. So we hide the specifics of the technologies, but just drawing a cloud to represent a network. Note, because the networks, the subnetworks may use different technologies, someone on one network using technology A that wants to communicate with someone on another network using a different technology, technology B cannot communicate because they're using different protocols, different standards. But we'd like to be able to allow everyone to communicate with everyone else. So how we achieve that is by having all the, by introducing an internet working protocol that allows us to communicate to anyone else on the larger network, irrespective of the network technology used. And what we use today is called the internet protocol. We use a common network protocol on the end user devices, the hosts, and also some intermediate devices, routers. And that allows us to communicate from someone here who may be using wireless LAN via this core network, maybe using a point-to-point Ymax link. This core network may be using SDH and then something else here. And then eventually a, I don't know, a Bluetooth technology for this access network. Many different technologies along the way, but the hosts and the routers along the way are all using the internet protocol. They all speak the same language across the entire network, and that language is the internet protocol. So IP, the internet protocol, allows us to communicate across different networks that use different technologies. And hence we form the internet or an internet. So an internet is a network made up of other networks. Sometimes we refer to those other networks as subnets or subnetworks. It's a subnetwork of the large network. So a core part, thank you, a core part of the internet, the core part is the internet protocol. A protocol used for sending data using packet switching across a larger network. We will not go through how the internet protocol works. Some of you know, but we don't need to know all the details. I want to mention some of the basics, at least the things that we may need or may come across in other topics. It's a connectionless protocol. What that means, this computer wants to send some data to this computer on the other side of the world. Connectionless means that we simply, when we have data to send, we send it across the network. We do not establish a connection to the endpoint before we send the data. A connection-oriented protocol is something that, before we send our data, we send some special message saying, I want to send data to you. And this one may send back a response saying, yes, you can send data to me. And then they send the data. IP does not do that. IP is a connectionless. So in that we do not establish a connection, we just send our data when we have it. It operates at the network layer. So if we look at a layered stack, it's what's called the third layer, layer three, the network layer. It's a datagram packet switching system. Sorry, wrong way. Packet switching is when we have our data, I have a one megabyte file to send. We break that into smaller chunks, packets, and send those packets one at a time across this network. So I send packet one containing the first part of the file, packet two, and so on. There are different types of packet switching. Sorry, the switching part is I send it to one device, a switch, which then determines where to send it next. To reach over here, a possible path is I send it to this first device. It then determines to send it to here, and then here, and here, and then the destination. There's another path, or there are other paths. It could have went here, here, up to this one, across, down, and so on. And in a larger network, there may be more paths. But in packet switching, we have packets containing some data. And we send them to the first device, which then switches them out to the next device in a path to reach some destination. Again, there's no connection, so we simply send our packets, and each device along the way determines where to send it next, with the intention that it should reach the destination. These devices are called packet switches. But in the Internet, we know them as routers, and we will call them routers. But generally, they're also packet switches. So this is a router or a packet switch. So we send our packet to a router. That determines to send it to the next router, and so on, until the packet reaches the destination. In the Internet protocol, those packets are sometimes we refer to them as either IP packets or IP datagrams. Just a name, but people use both of those names, a packet or a datagram. The IP datagrams are delivered from source to destination. There are no guarantees that it will get to the destination. With IP, the source creates the packet, sends it to the first router, which will try to send it to the next router. If something goes wrong, maybe this one tries to send it here. There's some error in the network. It will get delivered too bad from the perspective of the Internet protocol. This one will not try to resend that packet or datagram. There's no attempt to try and correct such errors. It's a best effort service in that we send. Hopefully it will get to the destination. If not, then from IP's perspective, it doesn't care. If we care about our data getting to the destination, if it's reliable, then we need some other protocol to do that. TCP is the main one we use. But from IP's perspective, when we send a datagram, it may be lost, which means the source sends it, it doesn't arrive at the destination. It's lost somewhere. It may arrive out of order. I've got three datagrams to send. I send datagram one, two, and three. I send first datagram one, then two, then three. It may be that the destination receives datagram two, three, and then one. They may arrive out of order. It's possible. And they may arrive in error. That is, we receive a datagram, some of the bits in there are wrong. They are not what was sent. Multiplexing, I think we do not need to discuss here. Another part of the internet protocol is defining addresses, the addresses that are given to your computer and also to the routers. IP addresses. And another thing that we will not touch upon, unless we need it later, is fragmentation and reassembly, but another part of IP. In terms of a layered stack, a general view of a layered stack is we have five layers, physical layer, data link layer, network, transport, and application. Each of those layers, we may have different protocols. In the internet, a key part is this middle layer, the network layer, and that's where IP sits. If your computer wants to connect to the internet, you need some software in your computer implementing IP. So that's a key part of the internet protocol. Underneath that are the technologies for our different subnets. Frame relay, PDH, ATM, wireless LAN, some of the ones we've talked about in the previous topic. They allow us to connect across some link, to connect across one of these clouds. The internet protocol is what allows us to connect across multiple different networks. Above the internet protocol, we have other protocols to support different purposes, to support specific applications For web browsing, we use HTTP. For email, we use SMTP. And there are many, many other application protocols here. And if we want to make sure our data gets to the destination, I'm downloading a file. I need to receive the exact same file that the server is sending to me. It's no good if the server has a 10 megabyte file. I try to download and I only receive 8 megabytes because there's some errors. IP will not guarantee delivery. To make sure that we can deal with errors, TCP is commonly used. We have a topic on how TCP works later. Maybe this is a key part, some terminology. We have hosts and routers. I'll just keep going back to this one. These are hosts and these are routers. A router connects subnets together. This router, for example, connects two different networks, two different subnetworks together. This one connects two together. Some, so normally a router connects two or more networks together. Maybe using different technologies on each of these networks. Maybe wireless LAN, PDHU. A router connects them together. Whereas hosts are the computers that us end users use to access the network. What's the difference? Normally hosts have one network interface. Or at least only one network interface is used at a time. My laptop. A network interface is the port or the wireless chip that allows me to connect to some network. On my laptop, how many interfaces do you think I have? And what are they? How many interfaces to different network technologies do you think my laptop has? How many networks can I connect to? LAN, so there's one. The wired LAN, when I plug the cable in, we call that a network interface. Wireless LAN is another one. Bluetooth is another one. And that's it, in fact, on my laptop. So my laptop has three network interfaces. Wired LAN, wireless LAN and Bluetooth. I can connect to networks via three different approaches. I have three network interfaces on my host, my laptop, but normally we just use one at a time. Not very often am I downloading from the wired LAN and the wireless LAN at the same time. That's a very rare case. It's possible, but not very common. So in many cases a host, we use one interface at a time. Whereas a router, a router connects at least two other networks together. So a router normally has two interfaces, two or more interfaces in use at the same time. This router has two interfaces. One connecting to this network, let's say a cable plugged in here and another cable plugged in for the second network. And both are in use at the same time. So that's one common difference between a host and a router. A key difference between a host and a router is that a host does not forward datagrams. What do we mean by forward? Forward means you receive a datagram and then send it on to someone else. Okay? Like you forward an email. You forward an email, you receive an email and then you send it to someone else. A host will never forward datagrams. A host is either a source, it creates datagrams, the original source, or a destination, the final destination. It receives and processes datagrams. But it shouldn't receive a datagram and then sends to someone else. That's not the role of a host. That's the role of a router. If a host receives a datagram, if my laptop receives a datagram and the destination of that datagram is not my laptop, then there's been an error. Something's gone wrong. And my laptop will probably discard or report an error. It will not send it on to someone else. Routers do forward datagrams. Routers can act as sources and also can act as destinations, but that's much less common than forwarding. It's mainly used if we want to manage or configure a router. Coming back to our diagram, here's an original source of a datagram. It has some data to send, so it creates a datagram. It's the source, it sends to this router, this router forwards it on to the next router, which forwards it to the next one, the next router, and this final router sends to the destination. That destination receives, processes the data, and then we're done. So the hosts, we've got an original source, a final destination, and routers forward datagrams. The case where a router may be a source or destination is if... where's my wireless access point out there? There's a wireless access point out in the corridor. That could act as a router. I send datagrams to that, and that sends on to the next one. The case when that router may act as a source or destination is if I want to set up that router, use some configure... or perform some configuration of the router. But it's an uncommon case. Much more common simply to forward datagrams. In the internet and the internet protocol, we can distinguish between two different tasks that we need to do to get data from source to destination. We have routing and forwarding. In our example, I want to get a datagram from here to this destination computer. Two steps or two tasks to perform. One is to find a path through the network. Do I send it via this set of routers? Or via some other path? So generally in the internet, there may be multiple paths possible between a pair of hosts. So routing is the process of finding the path through the network. Finding the route. Route and path mean the same thing here. Find the path, find the route. Once we know the path to take, then the other process is forwarding. Which is the process of what I went through. We send a datagram to the first router. This forwards it on to the next router. Which forwards it to the next one and so on. This is the process of forwarding datagrams. In the internet, those processes can be treated separately. That is to find routes or paths through the network, we have some special protocols, routing protocols that do it and set up those paths so that when we want to send data, we simply send data to the router and the router is configured to where to send that datagram. Depending upon the destination address, it knows to send where to next send the datagram. Just send it here or here. When this one receives a datagram, it's configured based upon the IP routing to know whether to send it this direction, this direction or over here. So IP routing is used to tell the routers where do you send data. IP forwarding is the actual sending of the data. For IP routing, for discovering the path, in particular, we'd normally like to get the best path, there are routing protocols available to do that for us. That is, the person who builds the network doesn't have to manually specify the paths. There are protocols that will automatically find the paths for us or try to find the best paths. They are called routing protocols. They normally execute on routers and or hosts to find the best path. And how they work, and this is maybe a little bit too much detail, they store information in what's called routing tables as to what is the best path. A table that says... What's it say? We're going back to here. Let's call this router 1, 2, 3 and 4. A routing table, router 1 here, may generally look like this. A table which has information that identifies the destination. Let's say this is host... Let's call it A. Actually, to reach... So for this router's perspective, to reach host A, the next router is router 2 here. So this is router 1 here. This is router 2. Here's host A. This router may store in its routing table information that says to reach the destination host A, send the datagram to the next node in the path, the next router, r2, router 2. And maybe host B is here. So it may have another entry in its table that says to reach host B, from this router's perspective, send to this router, let's say router 5. Router 1, 2 and 5. And it may have other entries to reach the other destinations. That's a very simplified view of a routing table. And the routers have routing tables as do the hosts. They tell the computer, they tell the device, when I receive a datagram with some destination, who do I send it to next? And the routing tables are created usually by routing protocols that are running in the network. I don't have a more detailed example. Any questions on the very basic concepts of what is a host and a router? What is routing and forwarding? If you know them, we'll... Router is a device that connects subnetworks together. In our diagram, our example, these things are routers. They are connecting one subnet with another subnet. Potentially, those subnets use different technologies. And those routers forward IP datagrams. That's their role. To get the data from source to destination, we forward it through a set of routers. Any other questions? Okay, no problems? A subnet is a general term for any of these networks. So this is a subnet, this is a subnet, this is a subnet. An access network is a network that end users use to connect to a larger network. A core network is a network which end users do not connect to. They carry the traffic from other access networks and other core networks. In general, all of these are subnets. Routers connect subnets together to get this whole network. We can call it an Internet. I think we don't need to see this detail. I don't think it's of any use, at least for this topic. I think the main thing here is the Internet protocol is implemented in both hosts and routers. So your laptop has some software on it which implements IP. A router has some software, or maybe in some parts even hardware that implement IP. So if your host wants to, or your computer wants to attach to the Internet, you need some software that implements IP, the Internet protocol. That's the main point here. We say we send datagrams, IP datagrams. What are they? Well, they are a sequence of bits where some of those bits in the datagram are data and the rest are what we call header. And this is the structure of an IP datagram showing the header information and the data. You don't need to remember all of this. For example, in any exams, if it's ever needed, this is given. Such a diagram is given. But it's useful to know some of the things that are inside here. So when we talk about things like quality of service and video, we may refer to some parts of the header. An IP datagram has a header of normally 20 bytes in length. So how to read this is we read row by row from left to right. So this, if we count bits, this is the first bit, bit zero here, and the 31st bit, actually, if bit zero, bit 31, bit 32 is here. Bit 63 is here. And we keep going in this way. This is how we read this diagram. It's a common way to show the header. So each row here represents 32 bits or four bytes of information, and we have five rows in the header. Normally, that is, the header is 20 bytes of information. There may be some optional header. But that's the simplicity. That's only used when we have special cases. And for now, assume it's not there. We have 20 bytes of header and then some data. And the data is whatever we want to send. Send a file from one host to another. Then that data may be part of the file. It could be all of the file, depends upon the file size. That's the information we want to send. The header is used to support the protocol operation. Importantly, in the header, two fields, two pieces of information that are contained in the header, which are very important. And that's the source address and destination address. It's an address of the computer that created this datagram, the source, and the address of the computer who's supposed to re-receive this datagram, the destination. Coming back to our example network, this host wants to send data to here. When it creates a datagram, it sets the source address to be the address of this computer and it sets the destination address to be the address of this computer. So the source address is the original source address, the original source computer, and the destination is the final destination. So we use that to determine when we send the datagram to the router, for that router to determine where to send to next. The address is not a word or a letter like host A, host B. The address is a 32-bit number. It's an IP address. We see the addresses are 32 bits in length. So in the most common version of the internet protocol, an address is a 32-bit value, a binary value. For now, I think we will not try and explain the other fields. When we need to use the other fields, we'll come back and explain them, and that may be in later topics. For now, I think the main thing we need to know, some of you know them already, but for others the main thing we know is that the IP datagram has some information to support the protocol. In particular, it contains the source address and destination address. There's a limit on how much data can be carried. The total size of the datagram can be no more than 65,535 bytes. So that limits the amount of data in there. If you've got more data to send, a one megabyte file, then you send multiple datagrams. You break that file into smaller chunks and send one at a time. Each has a header of 20 bytes at least. This describes those fields, but again, I will not try and describe them now. The address I said is a 32-bit value. Here are examples of 32-bit values. But we know as humans that remembering 32-bit values is hard and it's hard to write them down, so we convert them into some human-friendly form, a dot-a-decimal notation address, an example... Well, it's four decimal numbers separated by dots. For example, 130.17.41.129, which corresponds to this 32-bit IP address. Your computer always uses the binary value when it sends the datagram. It's just that it presents the dot-a-decimal notation to you, the human user, to make it easier to read. Quickly, the way to convert is with 32-bits, you have four 8-bit values. Each 8-bit value can be converted to a decimal number, and then we separate those four decimal numbers by dots and we get our IP address in dot-a-decimal notation. I cannot think in this course why you need to know that. That is, you do not need to do such conversions. It's nice to know. But remember, IP addresses are 32-bits. We will commonly present them in the dot-a-decimal notation, just for simplicity. I think most of you know already. The other maybe important thing to know about IP addresses is that they are structured in a hierarchical manner. Of those 32-bits, some bits identify the subnet that the computer is attached to, and the remaining bits identify that computer on the subnet. Coming back to our example here, consider these two computers. They both need an IP address. They are on the same subnet. So for the 32-bit address, I will not write it down, whatever it may be, for the 32-bit address for each of these computers, each address is divided into two parts. What we call a network portion and the other part called the host portion. The network portion identifies the network or subnetwork that the computer is attached to, and the host portion identifies that computer inside that subnet. I need to add a few more. As an example, maybe the, for example, the last eight bits represent the host, and let's say the first 24 bits represent the subnet. So there's some split in the IP address where the last eight bits are some split here. The first 24 bits represent the network, and the last eight bits represent the host. What that means is every device attached to the same network here must have the same first 24 bits, the same network portion. On the same network as someone else, you must have the same network portion in your address. And every device on the same subnet must have a unique host portion. So one host may have the value here, the second host would have the same first 24 bits, and then the last eight bits must be different from the other computer, and here's a value that's different. In this case, it's different by just one bit, so computer one, computer two. Same network portion, different host portion. And the other rule is that different subnets in the Internet must have different network portions. So this first 24 bits identify this subnet. Another subnet must have a different set of 24 bits. That's the concept of breaking the address into two parts, a part that identifies our subnet and a second part that identifies the computer inside that subnet. It's not so simple because this split between the network and host portion is not fixed. It's not always 24-8, it's variable. It's defined by some other value called a subnet mass. So there's something else that tells us where the split is. It's not my intention to go through IP addresses in this course. You should have seen them in other courses. I don't think yet we need to know the details, but it's important to know that an IP address identifies a subnet we're on and identifies the computer inside that subnet. How it does that, well, not so important, not yet. I will not ask you questions in the exam to convert between notation, nor about finding the network or host portion, nor about special cases. If we come across special cases in some of our lectures, I'll describe them then, once or twice we know. So our computers, our hosts, and our routers, every interface that's attached to the internet has an IP address allocated. So my laptop has an IP address, a router has an IP address for each interface it uses. So normally a router has two or more IP addresses because a router normally connects two or more subnets together. My laptop normally has just one IP address at a time. For example, my wireless LAN interface, which I'm currently using for internet access on my laptop, my wireless LAN interface, it's got a name WLAN0, the interface configuration tells me that the internet address is 10.10.97.150. That's the IP address of my allocated to my wireless LAN interface on my laptop. You could convert that to a 32-bit value, the real value. It's wrapped around here, it also has a subnet mask associated which tells us for that IP address which bits represent the network portion and which other bits represent the host portion. That's what the subnet mask does. We have a special address that can be used as well which is called a broadcast or a directed broadcast address which can be used to send to everyone on my subnet, send to everyone as opposed to send to one person. So an example of an IP address. My wired LAN interface, ETH0, doesn't have an IP address. This is the configuration of my wireless LAN interface, this is the configuration of my wired LAN, my Ethernet interface. There's no IP address given here because I'm not using that interface for internet access at the moment. If I plug in a LAN cable, it's possible that I will get an IP address for that interface. And most likely my operating system will just use one of those interfaces. It will not send data on both, it will select just one. Most likely it will select the wired LAN interface. It's up to the operating system to do that. We can in theory use both at the same time, but it's very uncommon. The last thing I think is routing. And remember routing is the process of finding a path from source to destination. And the main point here is that there are different protocols available to do that for us that will automatically try and find the best path from source to destination. They find that for us or for the network and they store information in the routing table like I've tried to show in this example. Again, you don't need to know about how the different routing protocols work. Not yet. So that's supposed to be a review of some things that most of you should already know. Any questions before we start the new stuff? The hard stuff. That was the easy stuff. The hardest one today. Only hard in that it's new, I think, to all of you. It's just some examples or some further details about the structure of the Internet today. The Internet, we use the Internet protocol to connect subnets together. How do Internet service providers connect together? That's what we're trying to cover here. Before we do it, maybe we need to go back and give another example of routing. In this small Internet, I tried to give an example of a routing table at one of the routers. Router 1, this one here, stores some information in its routing table that says to reach some host on the Internet, to reach this host, host A, send to router 2. If I want to reach host B, this one, then I should send a router 5 here. From the perspective of this router, if we want to send a summon over here, send a router 5. If we want to send a summon over here, we send a router 2. That information that's put into the routing table is determined from routing protocols. In our small example network, it's quite simple. There are not many options as to where do you send it. This one has just two different options, either to router 5 or router 2. Similarly, this router has one, two, three, four possible other routers it can send to. In the real Internet, which is much larger, which has hundreds of thousands of subnets and billions of hosts, finding routes through the Internet and storing all of them in routing tables is a very complex task because there are many possible paths. If you imagine a much larger network here from one router's perspective, there may be many different paths. And note, if I want to be able to reach any possible destination, in this case, I would need how many possible destinations are there. There's one, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen possible hosts as destinations in this very simple example. So I'd need thirteen different entries in this routing table to reach host A, send to this router, host B, send to this router and so on. In fact, we can simplify that in that instead of storing routes to hosts, we store routes to subnets. Instead of storing to reach host A, where's my pen gone? And unfortunately, I don't have the letters. Let's say this is host A and this is C here. It's neighbor. Instead of storing to reach host A, send to R2 and to reach host C, send to R2 as well, what we can do is say to reach anyone on this subnet, send to R2. So instead of storing routes to hosts, we store routes to subnets. It simplifies the routing table. So we don't need a route for each possible host. Sorry, that one disappears. To reach someone on subnet X, send to R2 and similar for the other entry, to reach someone on subnet Y, send to R5, where this is subnet X and this is subnet Y. So we can generalize and simplify the routing. And there are other ways to simplify the storage of information in routing tables, default routes and so on. Still problems exist. When we have a large internet where we have hundreds of thousands of subnets and routers, we cannot efficiently store all the information about all the other possible subnets in our routing table. And the other problem is that today the best path to reach this subnet may be via router 5, but tomorrow something may change. Maybe this one, this router fails or the network link here has an error in it and we can no longer send in this direction. So maybe tomorrow after something changes, the best path from here to here may be via some other path, via router 5. Things change in the internet over time. Computers fail, the links either fail or the amount of traffic going through them changes. So we need to continually update our routes, continually calculate what is the best route. To do that for all the possible subnets in the internet is very complex and basically considered impossible because there are too many subnets, too many routers and with continual updates it takes too long to calculate the best paths, the best routes. So, and that's where we move into the next topic, how the internet is structured is that we have some containment of the routing inside a particular area and that's referred to as an autonomous system. It's not practical in the internet to have all routers participate in routing protocols. That is, it's not practical for all routers to exchange information to learn about the best paths. There are too many routers and too many subnets to do that. If we tried to do that, then our internet would collapse because there would be too many routers asking other routers what is the best path to reach some destination. And also, routers owned by different organizations may have different ways for choosing the best path. So, one company that owns a set of routers may use one protocol and one set of policies to find out what is the best path from A to B. Another organization may use a different policy or a different protocol. One may choose the best path based upon paths that give us the lowest delay. Another may choose the best path that give us paths with the lowest financial cost. So, organizations may choose their own policies there. So, how the internet actually works is that we divide the internet into different areas, different containment systems called autonomous systems or an autonomous system, an AS. A group of networks and routers which is controlled by a single administrative authority, normally a company, a large organization, is called an autonomous system. In most cases, it's not always the case, some large companies and in many cases internet service providers have a single autonomous system. Where an autonomous system we can think is a collection of subnets and routers owned and administered by that company or organization. An example, TOT is an internet service provider in Thailand. They have a network throughout the country. Their network is one autonomous system. Their network of many different subnets, many different routers, they don't just have one large subnet, they have many different subnets, many in Bangkok, in other cities, between cities, owned by that one organization is considered one autonomous system. It's a part of the internet managed and administered by one company. And the other ISPs in Thailand have their own separate autonomous system, their own separate network. So the routers in the internet are divided into groups based upon the owner of the network. Each autonomous system has an autonomous system number, an AS number. And that is assigned by IANA, which is the Internet Assigned Numbers Authority. It's an organization that manages IP addresses and autonomous system numbers. It either manages itself or it delegates the management to regional organizations. In Asia Pacific, there's called APNIC, the Asia Pacific Network, I guess Network Information Center. In Thailand, there's TAINIC, T-H-N-I-C, the Thailand Network Information Center. So in fact, although IANA is responsible for managing the numbers that people use, it delegates that to an Asia Pacific organization which then delegates into country-level organization. This is taken from a website which I'll go to now, which is the TAI... a website maintained by Nectec in Science Park. Where is it? So Nectec maintain... their network technology lab maintains some statistics about the internet in Thailand. It's best to look in your own time because you can zoom in and find the information, but I'll show you some selected information. So they maintain some statistics about... what have we got? So they maintain some statistics about the AS numbers that have been assigned in Thailand and also addresses... subnet addresses for networks, IPv4 and IPv6. So the number of AS numbers assigned in Thailand is 3,768. And similar, the number of ranges of IP addresses, the version we use today, 17,000, IPv6, which is around but not so common, 1,300. So what's the IP address, the IPv4 address? It's not an individual IP address, it's a subnet address. That is, in our diagram, it's an address for one of those clouds. When I drew the cloud, that gets an address, the network portion. That's assigned by some organization inside Thailand. And there are 17,000 of them assigned currently. And some organizations may have multiple. So we have some IPv4 address assigned for this network. This is a router. And then a different address assigned here. Owned by the same company, that company, this together is called an autonomous system. And they would have one autonomous system number. Connecting the IPv6 to IPv4, we need some special technique to do that. So if there's some other network which uses IPv6, this is an IPv6 network, to connect it to an IPv4 network, we need a router that will support both. And do some translation. It's like two different languages. Although it's still the Internet protocol, the two different versions, they are different, like two different languages. So if you want to send a packet from here to someone here, this device needs the... There are different ways, but one way is to translate that packet from an IPv6 packet to an IPv4 packet and then send it. So it's a little bit more complex in that case. So our computers get IP addresses. All the computers on one subnet have the same network portion. And the network portion assigned to different subnets in Thailand, there are 17,000 different ones. And then some organizations have multiple subnets. As here, there may be multiple subnets owned by the same company. That company may also have an autonomous system number, an AS. And there are 3,768 autonomous system numbers allocated in Thailand. On the website, I think you can see other details. And then you can download an Internet map, and I've downloaded it before, and let's have a look. Again, some of you have seen this, but it's an interesting map, so let's spend some time on it. Everyone can read that. Okay, I'll zoom in in a moment. It's a map of... This is a map of the Internet, the domestic Internet in Thailand. When we zoom in, we'll see there are a set of Internet service providers that provide access to the Internet, to the end users, and they're all connected together. Before I zoom in, we'll see these blue dots around the edge are local Thai-based Internet service providers, ASPs. You'll recognize some of their names when we zoom in. The big red or pink ones in the middle are what's called Internet exchanges. They are... An Internet exchange is where Internet service providers connect together. The lines here are links. We don't necessarily know what technology, but usually some wired link from an Internet service provider, either to another ISP, or most commonly, to an Internet exchange. And how it works is that when you subscribe to an ISP, you connect into that ISP's network via ADSL, via some other technology, and then your data, depending upon the destination, then may be sent to one of the Internet exchanges, and then to another ISP's network, and then to the destination user. That's an example. If you want to send data to someone else in Thailand who's on a different ISP, then your data goes via your local ISP's network to an Internet exchange, and then from that Internet exchange to the other ISP's, the destination ISP's network, and then to the destination user. There are different Internet exchanges operated by different companies inside Thailand. Let's zoom in. So we see these are ISPs, and you recognize some of the names. TOT, TTNT, True Internet, Triple T, and many others. Some are very small ones you may not have heard of. Some are more common Internet service providers. Some may not provide a service, or may not, you as a home user may not be able to subscribe to some of them. They may be just for businesses. Note that all of these ISPs have an AS number. TOT 9737, True 7476, 7470. So each ISP has an autonomous system number because each ISP has its own network. It has its own set of routers and its own set of subnets. So True, for example, has its own network across Thailand. In each of the cities, they have their own routers and subnets. All together, that falls within Autonomous System 7470. So AS7470 refers to all of True's network. And then we see that the ISPs have links into the Internet exchanges operated by CAT, ADC, True, Jasmine, and others. Oh, that's the back one. And we also see the speed of some of those links. G means gigabits per second, M megabits per second. So it's not so easy, but you can follow the lines and you see from TOT, the Internet Service Provider, this red line goes to the CAT Internet Exchange and has a data rate of almost 22 gigabits per second. So there's a link or multiple links between TOT's Office or Network Center and the CAT Internet Exchange. And True, Internet, the different ISP, has a 51.1 gigabit per second into the same Internet Exchange. So I'm a customer of TOT, a customer of True. Let's say True has a... a customer of True has some website that I want to access. If I connect using my ADSL link into TOT's network, I'm a subscriber of their network. So here I am somewhere. I connect into their network using the telephone network and ADSL. Then my data goes through their network, which is represented by this blue circle here, that goes via this cable, potentially this one, to this Internet Exchange which goes to the destination ISP, True Internet, and eventually to the customer, the server there. So that's how to read that diagram. It shows the different ISPs, autonomous system numbers, and also the links that they connect to the Internet Exchange. And you can zoom it or move across and you'll see the different BB, Jasmine, True, Internet Exchange, TOT, and some others. So the large companies operate their own Internet Exchange. But the most popular one for the ISPs is the Cat Internet Exchange. So this is... we see here as an autonomous system number, that represents one autonomous system. So this TOT, ISP, most likely has multiple IP subnets, multiple routers, all operated by the one company, TOT. That's referred to as an autonomous system. And then True has their own autonomous system. They have their own network across Thailand, their own routers, their own cables all connected together, and that's a different autonomous system. And the idea is that in each autonomous system, the company that owns it performs its own routing inside an autonomous system. So to find a path inside an AS, it's up to that company to manage that, to manage the routing protocol, to choose the policies for what is the best path, and to update the routers. But between autonomous systems, from one AS to another, different routing protocols are used. Any questions? We'll see this diagram in another one as we go through this topic, and maybe even later. Any questions on what you see here? What is an autonomous system number? Well, it's a, I think, a 16-bit number that is... maybe it's more than a 16-bit number. A number that's assigned by an authority to different organizations who have their own network. Normally, ISPs. It's more than 16 bits, because this one is larger. Any questions about this diagram? Back to our slides. So now, in the internet, routing is separated into two paths. Routing inside an autonomous system and routing between autonomous systems. Routing inside an ISPs network, one company's network, that is up to the company to decide how to do that. But routing between different autonomous systems, then those companies need to make some agreement, and they usually use a specific protocol. So in general, routing within inside an autonomous system is performed by an interior gateway protocol. Another term for router is gateway. So it's not so common now, but an interior gateway protocol means an interior routing protocol. Interior meaning inside the autonomous system. Routing between autonomous systems is performed by an exterior gateway protocol. Between autonomous systems. IGP, there are many different routing protocols available in use. It's up to the company to choose there whatever they prefer. Some of the routing protocols, the acronyms, RIP, OSPF, ISIS, and others. I don't think we've covered, I haven't covered them in any courses with you. You may not have seen how they work. Some of you may. But there are different routing protocols that can be used inside an autonomous system. True would choose one, or even choose multiple that they would use throughout Thailand. And it's up to them to choose the policies for routing. By policies I mean some simple things like the metric to use. You want to choose the best path from here to Tang Mai to send your data. Well, do you choose it based upon the path which gives us the smallest delay, the path that gives us the highest throughput, the path that gives us the lowest financial cost, or what other metric do you choose? That's up to the organization to choose that metric and that policy. One company may do it different than another company, depending upon their requirements. So an organization inside an AS chooses its own routing protocol and there are many to choose from. But between ASs, there's only really one protocol used. One EGP, it's called the Border Gateway Protocol, BGP. So between each ISP shown here and each internet exchange, note between different autonomous systems from here to here, they need to exchange some information about the paths inside those networks. To do that, they use BGP. So CAT and TOT would use this protocol called BGP, the Border Gateway Protocol, to exchange information about the networks inside their autonomous systems. This diagram tries to show some of those, this hierarchical structure of the internet we now have. The internet's not just made up of subnets connected together. We have some different structure. It's made up of subnets connected together, but in terms of managing the routing in the internet, it's slightly different. We can now think of the internet as made up of autonomous systems connected together. Here's our internet. It's a very small internet, for this example. Multiple autonomous systems connected together, connected together via routers. These routers are called exterior routers or border routers, because they are connecting different autonomous systems together. Then within each autonomous system, like we zoom in on this AS3, there are multiple subnets again connected together via routers, interior routers in this case. AS3 may be made up of eight different subnets all connected together via routers. To find out the best path from someone on network H to someone on network D, a routing protocol is used. The path may be... In fact, that's not the best example, because there's only really one path in network D. But if there were multiple paths to network D, we need to choose which one's best. We use a routing protocol to do that, and it's up to the company that owns this AS to choose that routing protocol, an interior routing protocol or an interior gateway protocol. Many to choose from. But then from AS3 to AS1, AS3 to AS4, BGP is used to exchange information about what's inside here. They use the border gateway protocol here. So we have this hierarchy of... The internet is made up of autonomous systems connected together via border routers. Autonomous systems are made up of multiple subnets connected together via interior routers. And each subnet may have multiple hosts, the end-user computers attached to it. Any questions so far on AS, an autonomous system? I think that's new to most of you. Your quiz, the next quiz, quiz two is about the internet and about this topic, but we haven't covered enough for you to be to answer meaningful questions. You can answer some of the questions, but I remember in the quiz there are some questions which are on topics we haven't yet covered. We'll cover them next week. So in fact, I will not enable the quiz yet. I will enable it next Wednesday. So you do not need to do a quiz this week. What you should do this week is some homework. Try and understand this diagram, find it on the internet, and then there's another one. This is the national network. There's also an international network that shows connections between international internet gateways and international ISPs, ISPs in other countries. Have a look at that, and when you look at it yourself, you can see some of the details and the legend down the bottom. So there are two diagrams. Take a look at them, because next Wednesday we'll continue, and I'll give you an example about autonomous systems, and we'll talk about peering and transit between ISPs. Let's stop there and continue that next week.