 Before you can understand what the Internet is, you need to understand what a network is. A computer network is any arrangement where you have multiple computers all connected to each other by some means, such that each computer on the network can send data to any other. In our diagram here, we have a network of several computers, each computer represented as a little white square, and in the terminology of networks, we usually call a computer a host. Quite importantly in the definition of a network is that it is something owned and operated by one entity, one person or one organization. All of the systems on the network, all of the hosts, and the means to connect them are all controlled by one entity. When we take multiple independent networks and connect them together into one larger network, we call that an Internet, not necessarily the Internet, just an Internet. An Internet is effectively a network of networks, and the connection points between the networks are these special hosts called routers. A router is a computer which acts as a connection point between two networks, and the data from one network to the other is passed through those routers. So here in our diagram we're depicting three networks, one green, one red, and one blue, and the circled system here is the router connecting the red and blue networks. The purpose of an Internet is really just the same as a network. We want all of the systems on this Internet to be able to send data to any other. So for example, if I wish to send data from this host on the red network to this host on the green network, then the data can get there by passing through the router which connects the two networks. What we call the Internet is the global worldwide Internet. It's the Internet to which most computers in the world now are connected. You may be wondering how can you get all of these disparate networks, these thousands of networks around the world, to connect to each other and interoperate? Well, the answer is that they use a standard protocol called IP, which stands for Internet Protocol. In the IP protocol, data is sent in packets, meaning it's sent in discrete chunks of about, say, a thousand bytes or maybe more. And just like a letter or package making its way through the mail system, a packet is copied from one router to the next until it reaches its destination. Now of course, when a computer sends a packet, it needs to be able to specify where the packet should go, which computer on the Internet should be the recipient. So for the Internet to work, each system on the Internet needs to have a unique address. And currently, these addresses are 32 bits in size. And because 2 to the 32nd power is something over 4 billion, we have that number of unique addresses available. So currently, at most, we can have a little bit over 4 billion computers all connected to the Internet at once. The way you see these addresses written is a little bit peculiar. 32 bits is 4 bytes. 32 divided by 8 is 4. And an individual byte can be expressed as a number between 0 and 255. So we write these 4 numbers separated by dots, and that's an IP address. So for example, an IP address will look like 233.75.19.198. Notice that all of those numbers are less than 256. Now, as a user, you generally don't have to directly deal with IP addresses, but you'll occasionally see them around. So it's nice to recognize them. In any case, imagine a scenario where you go into the Internet to order something from Amazon.com. Amazon is an online retailer. For such a transaction to take place, there of course has to be communication between your computer and a computer belonging to Amazon. Well, first off, of course, both of you must be connected to the Internet, and what that means is that you pay a local service provider, an Internet service provider, to allow you to connect your computer to their local network, a network which probably spans just your citywide area. Amazon, in turn, must do the same thing. They need to connect to an Internet service provider in their area. And notice in the diagram, when you connect to your Internet service provider, your system becomes a part of that network. Now, if you and Amazon are located somewhere near each other, it may be the case that their Internet service providers network and your Internet service providers network are directly connected to each other. More likely, however, there's some number of other networks in between your network and theirs. And so, for a packet to reach from your computer to Amazon's computer, it has to get copied from router to router until it ends up on Amazon's computer. And note that there isn't necessarily just one path through all the routers to get to the destination. Even in this relatively simple situation in the diagram, there are actually two different paths which the packet can take. The packet might take the shortest route going directly through the green network, or it might first go to the blue network before going to the green network. One of the most interesting aspects of the Internet and the crux of its design is that when you send a packet, the plan for how that packet is going to reach its destination is not worked out ahead of time. Instead, whenever a packet arrives at a router, it's really entirely up to that router to decide where it should go next, and eventually the packet should reach its destination. Now, you may be wondering about all of these networks in between. It doesn't seem to make sense economically. My internet service provider is willing to bear my traffic because I'm paying them money. And similarly, when I send a packet to Amazon, it makes sense that that internet service provider is willing to take that packet because Amazon is paying them money and they want to get that traffic being sent to them. But what about the backbone networks in between? Why are they willing to take the packet from my internet service provider and send it on to Amazon's internet service provider? It's a common misconception that they do it for free or that they are somehow government subsidized. That is not the case. Very simply, when my internet service provider sends a packet through an adjacent backbone network, my service provider pays them money. And really, just like with letters and packages, the general rule is the sender pays. That actually explains why the typical internet connection usually allows you to download data, receive data, faster than you're allowed to upload it, to send it. Because it costs your internet service provider a lot more money when you send data rather than just receive it. Lastly, you should have a rough idea of what this looks like in the physical world. Let's say that you're located somewhere in the Los Angeles area and Amazon is located somewhere around Seattle. Amazon's service provider network and your service provider network they most likely span relatively contained regions, say a radius of five miles or so. The backbone networks typically span much larger regions, like say from state to state. What's depicted here is rather simplified. It's much more likely that for a packet to get from Los Angeles to Seattle, it has to go through several backbone networks rather than just one. So say it's very likely that a packet here would get routed through San Jose and then through Portland before going on to Seattle. If you get cable internet service from your cable company or DSL internet service from your phone company, your setup at home should look something like this. First off, the cable or DSL line that comes out of your wall needs to run into what's called a modem, which is the device which is actually immediately connected to your internet service provider's network. When connected, your modem is the device which is given a unique IP address. Now, using an Ethernet cable, you can directly connect your computer to the modem, but this is generally a bad idea. Instead, what you should do is use an Ethernet cable to connect your modem to another small device called an access router. Confusingly, these access routers are commonly just called routers, but they're really not like routers like we previously discussed. What an access router allows you to do is to share your single internet connection among multiple devices, multiple computers, and maybe other things like, say, your phone or your Xbox and other such things. To connect devices to the access router, you can use Ethernet cable, though almost all access routers these days are also wireless, so if your device supports a wireless connection, you can just use that. Now, even if you just have one device you wish to connect to the internet, you still should use an access router for reasons having to do with security, which we'll talk about in a later unit.