Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.1 Networks and DNS

The Internet is a massive TCP/IP network, and having a fundamental knowledge of how it works is useful. I'll tell you what you need to know.

2.1 Networks and DNS

The Internet is a conglomeration of many technologies that work together. And later in this course, we're going to look at three of those in more detail, HTML, CSS, and JavaScript. These are languages that we use to create webpages, and use them as the front end for our web applications. But before we get into that, let's first dig into some of the more technical aspects of the Internet, starting with, what is the Internet? Well, really, it's just one gigantic network. And I guess it would be more correct to say that it is a network of networks. Well, what do I mean by that? Well, I am sitting in front of a computer in my home, on my own personal network. So I have this computer, and I have a few others and devices, so that they can all talk to one another. And they are protected from any outside interference due to my router, because it has a built-in firewall, and it blocks any time anybody tries to intrude onto my personal network. However, all of my devices need to get out to the Internet for some reason. They need to go to websites, or contact services, or things like that. So in order to do that, they have to go through the router, which is our gateway. They go through the router, and then that traffic is just sent wherever it needs to go. So the router is a piece of equipment that essentially joins one network with another. So really, my personal network is on the Internet. If it didn't actively block people from just intruding, then people would be able to access the computers and devices that I have on my network. Now, in order to get onto a network, you need to have what's called an IP address. It is a unique number that is assigned to each computer and device on a given network. So I have I don't know how many devices, and each one has an IP address, and they are all unique. Otherwise, they would not be able to get onto, first of all, the network and contact the other computers and devices, and they would also would not be able to get out onto the Internet. So I'm going to run a command called ipconfig on Windows, this shows the IP configuration. Now, IP stands for Internet Protocol, and what I want to focus on is this IPv4 address. We have two types of IP addresses, we have IPv4 and IPv6. IPv4 is an older addressing scheme. However, it is still used, especially with internal networks. And then IPv6 is a newer IP scheme that is a lot more complex than IPv4. Now, you can see here that my IP address for this machine is Each of these numbers that are separated by dots are called octets. And if another computer or device on my network wanted to contact this machine, it would do so by sending information to this IP address. And if this machine wants to get out onto the Internet, it has to go through this default gateway, that is my router, and that is Now, up here, you can see IPv6, and you see that there are colons, and then there are hexadecimal values in between the colons. There's actually one, two, three, four, five, six sets of hexadecimal numbers. So it is much more complex, but it also allows for a lot of devices and computers on the network. Right now, the Internet uses IPv6. Although it still uses IPv4, IPv6 is the new standard. So everything on the network has to have an IP address, otherwise you would not be able to access that computer or device. For example, we are going to ping, that is, we are going to send a packet of data to a computer on the Internet. So this is not going to be on my internal network, the IP address is Now, whenever you ping something, you're basically wanting to check if you can access that resource. It could be a computer, it could be a router, it could be some other network appliance. So by sending a ping, we are essentially wondering if something is there. So that packet of data is going to be sent to that IP address. If there is something there, it is going to see that we are pinging it, and it is going to send a response saying, yeah, I'm here. And so it will do that four times, and we see that we have four replies. We also see the amount of time it took for the ping to go from our computer to the computer at this IP address, and then back. So this was 34 milliseconds for the first ping, 40 milliseconds for the second, 36 for the third, and then 38 for the fourth, and that's pretty fast. Now, this actually happens to be a website, but not every IP address that's on the Internet will take you to a website. That just means that there is something at that IP address. It could be listening for people wanting to view a web page, or it could be something more specific. It could be listening as a web service, so that's like a mobile app could send data to an IP address, and the computer at that IP address would be looking for something specific in order to respond to it. But in our case, we're going to go to the browser. We're going to type, and we are going to see that it takes us to So we can type in that IP address and go to Google, and that would work. I mean, obviously, it does work. However, we don't want to have to memorize an IP address. That's something that we just don't want to do, especially with IPv6 addresses. So instead, we have domain names, is a domain name. And that means that there has to be a system that maps a domain name to the IP address. So if we go back to the console, and if we type ping, we're going to see that it goes to the same IP address. But in order to find the IP address for, it had to look up to a gigantic database of domain names and their IP addresses. That's called DNS, it stands for Domain Name System. So whenever you want to go to any website, your computer has to first contact what's called a DNS server. The purpose of this server is to give your computer the IP address for the domain that you are wanting to access, and then your computer can then go to that IP address. So I'm going to go back to my console, and I'm going to run ipconfig again, but I'm going to use the/all option. This is going to list all of the settings for my IP configuration. What I want to focus on is the list of DNS servers. Now, I have several, the first is one on my local network. But then I have two others, and these are supplied by my ISP. And yours would be very similar to this, you probably wouldn't have a DNS on your local network. Well, you might, it just really depends upon how your network is set up. But you would definitely have the DNS servers for your ISP. Those servers will give you the IP address for that domain, and then your computer will go to that IP address. But how is DNS configured, well, that really depends as well. I use a service called DNSimple, because DNS can be a rather complex topic, and DNSimple just makes it easy to do. There are several records for DNS, and we're not going to really go over any of those. But here is a record of type A, and we can see that the name is, and then the IP address is 213.101. 0.180.75. Now, this is one of those IP addresses that will not take us to the actual website. If we go here, we see that we have an error. And the reason is because of how Azure, which is Microsoft's cloud service, handles websites. But if we go to, it's going to look somewhat similar. But this is actually the page for I haven't done anything with this domain, but this is active, and it does work. So for the DNS of my domain, I had to link the domain name to the IP address. And there's a few other things that I had to set up for Azure's service. So that is how our computers get to resources that are out on the Internet. More specifically, they're how they get to the computers that are serving websites. And in the next lesson, we're going to look at web servers and how they work.

Back to the top