From the course: Networking Foundations: IP Addressing

The IP address and its purpose

From the course: Networking Foundations: IP Addressing

Start my 1-month free trial

The IP address and its purpose

- [Instructor] Your modern computing device uses many addresses to be able to properly communicate on the network to other devices and services. But certainly one of the most important addresses is the internet protocol or IP address. You have an IP address or many IP addresses on your modern computer and this IP address will also come with a subnet mask. It'll also be associated with other very important IP addresses like the default gateway IP address and the DNS IP address. As we'll see later in the course, the IP address in subnet mask on your system define a lot. They define what network you're located on and they also define what is your particular host identification number. A nice common analogy that works well is to compare this to your street address and your house number. The street address is like the network and your house number is like the host identifier. Or an IP address can easily be compared to a US telephone number. In the United States system, there's one component that's called an area code and then there's the phone number. The area code would convey the network in our example. So the subnet mask tells us what portion of the IP address is our street address and the subnet mask also indicates what portion of the IP address identifies our house number to use of course, the house and the street name and house number analogy from earlier. In order to make this as practical as possible, let's demonstrate how easy it is to find your IP address, your subnet mask and your default gateway address. Don't stress out if you don't know what each of these components is. That's a big part of this course. You will leave this course with a rich understanding of these various IP addresses and their functions. Let's take the two most popular desktop operating systems in the world, Microsoft Windows and the Apple macOS. And let's determine how to learn the relevant IP address information using both the graphical user interface and the command line interface on each of these two different operating systems. And just to really drive the point home, we'll also look at this information on an iPhone. So let's begin on the Mac. And if we go into system preferences, there is this network athlete right here. And if you struggle to find it by scanning with your eyes like I do, then you can go to the Search Remember. Let's click here, and if we go into the graphical user interface here, it's really pretty cool you can see the different options that I would have for making network connections and you can see I'm currently connected via WiFi Now notice right here is this advanced button. So if I click Advanced, it's going to show me the advanced properties for that connection. In this case, it's WiFi. These are different networks around me that I could potentially connect to. This is the TCP IP settings that we're interested in. And notice that we are using something called DHCP to get the IP address onto this system. And the IPV4 address that I have currently received is 172.20.6.50. So when speaking to another network engineer I would simply go, "yeah, my IPV4 address is 172.20.6.50 and I would just use those dramatic pauses to indicate the decimal values that are in each of those octets later on. Notice the sub-debt mass 255 255 240, and then zero, and then the router which is the default gateway of 172.20.0.1. So all that information that we might need regarding the IPV4 addressing for this client is right here inside the graphical user interface, thanks to the network app in the advanced properties of in my case, the WiFi connection we can see our IPV4 address, the sub-net mask that goes without address and the default gateway. Now I must admit when I need my IP address information quickly on the Mac, I would not go into system preferences and use the graphical user interface. Instead I would bring up a terminal window and I would simply type ifconfig and we hit Enter and we can see the IP address information for all of the interfaces on our device all of the network interfaces. So if I highlight this one right here we can see the en0 interface is the interface that is going to be associated with the wireless card on this laptop. And look at this, the inet address is 172.20.6.50, We'll get that right there. There's the address and the net mask is presented to us here in hexadecimal format. You can see the broadcast for the network we're on is 172.20.15.255. Also interesting here is that when you first look at the output, there's this loop back zero right here. This is a internal virtual interface and it's for testing purposes. So if we ever just want to like quickly go in and test that our own IP is functioning properly, we can ping our internal loop back address at 127.0.0.1. I would love to see you see the official count of the number of ways we can find our IP address on a windows system and the graphical user interface. There would be lots of ways that you could do this. Here you can see we're going very old school and if you go to the network and sharing center, here we can see there's our connection. And if I go to change adapter settings, we can see my WiFi adapter right here and if we go into the Properties of that WiFi adapter, there is the IP version for setting here. And if we look at the properties of that, we can see that we're set to obtain our IP address automatically and get our DNS information automatically from a DHCP server. And we'll be covering that a detail later on. But the question here is, what is our IP address? We're still not seeing that. So if I just right click and go to Status, we're getting closer. Here we can see the information about the WiFi connection, and if we go to the details here, there we have it. We can see the IP address and subnet mask as well as the DHCP server address, and the DNS servers and the default gateway and all those important IP address information components. for a long time, even folks that are non-technical like my father, he has looked at his smartphone and he's realized that his smartphone is really a computer in his pocket. And sure enough, just like one of our Mac systems or our windows systems, our iPhone or Android phone or whatever kind of phone that we're using is going to have an IP address. So here you can see me once I enter the settings, I'm going to go ahead and select the option for my WiFi connection. And when I go into that WiFi connection, notice that there is an eye icon that's where you're getting more information. If I select that eye icon, I'm going to go into the information about this WiFi connection and look at that underneath the IPV4 address section you can see that, we are configured on this iPhone to receive our IP address information from a DHCP server automatically, and that I've gotten the IP address of 192 168 040 with a 255 255 255 255 mask and a default gateway at 192 168 0 1.

Contents