[0:00]In the last video, I told you that each device connected to the Internet has an IP address, and that's how they're able to send packets to each other. But as a user, when you make a request to a website like Netflix.com, this is not an IP address. This is just a domain name. So how does this get connected to the server of Netflix? It's because the requests actually go to a DNS resolver. The DNS resolver has the information that we need, which is the IP address of Netflix. It could look like something like this. And this is what the IP address would look like. And once you have this IP address, you can hit the server, and the server can now send back information to the PC that requested it. So if you look at the IP address more closely, you'll notice that it's formed of these groups of numbers divided or separated by dots. These groups of numbers are called as octates. Now, when you check the IP address of your machine, it'll look very similar to this. And along with the IP address, you'll get something called as a subnet mask and you'll get a default gateway. And the subnet mask would look something like this. It'll be 255.255.255.0. And the default gateway would be 192.168.1.1. What I'm saying is, your IP addresses won't exactly be the same, but they look like this. Now, the relationship between your subnet mask and your IP address is very straightforward. You can map them one is to one, so the number of octates in your IP address would be the same as the one in your subnet mask. So 255 means that this number is locked. 255 also again means this number is locked and this number is locked. Only this is the number which is zero, the last number. And zero means that this can change. So that means this part is treated separately, and this part is treated separately. This is called as the network, the first three octets is called as the network. The last one is called as the host. And we'll talk about this in a little bit more detail now. So I wanted to share something really interesting with you. A few months back, I started running an advanced system design cohort, which is specifically meant for people with industry experience. Who want to break into engineering leadership positions. So if you want to be a director of engineering, VP of engineering, or want a CXO title, you'd want to know a lot more about system design from the application perspective. And just the basics of system design, DSA and coding will not cut it. You will need to understand systems from end to end. You will need to become an expert at architecting systems, understanding how things scale, and how to plan better for bigger, much more scalable products. And this is what we break down in my three-month advanced system design cohort. There are 20 people already in the cohort. Some of them even have 25 years of experience in the industry. So if you think you've hit the limit in your system design learning, and you want to take things to the next level and deeply connect with people who are just like you, people with great industry experience and exposure wanting to move on to the leadership positions, you might want to check out my cohort. The link for the form is in the description of this video. Fill it up, we'll check if you're a good fit, and then we'll set up a call with you and then we'll take things forward. Now, let's get back to the video. So the IP addresses to all of your devices on your network are provided by a router. So the router assigns an IP address to your fridge, to your Apple Watch, to your PC and to your phone. And the IP addresses, they look very similar. They'll look like this. Right? And this will be something like 211, this would be 201, and this could be 38. One thing to notice here is that the first three octets, which is 192.168.1, these three are common for all of your IP addresses. That's because they're on the same network. And that's why we were calling this as the network part of the IP address, the first three digits, the first three octates. The last one is called the host. So the last one is the only one that's changing, as you can see. So that means if there are two devices on the same network, they can communicate very easily because they belong to the same network. And that's determined because the first three octets are the same. And if this PC has to connect to an external device or an external network, then the router or the, which is basically the default gateway, is going to check what's what are the first three octets? If it looks like it's in the same network, then it will just pass it around in the same network. But if it looks different, like, for example, it will be 52.234.91.9, then this means that this network is completely different because the first three octets are very different. They're not in the same network. So the router will send this to the external network. What important thing to note here is that all of the numbers lie between 0 and 255. That means all of the octets, they will never exceed 255, and they'll obviously never go in minus. So IP addresses are always positive, and they do not exceed the value of 255 in each of these octets. Now, there are two types of IP addresses. We have the IPv4 and IPv6. We're slowly shifting towards IPv6 because this is 128 bit. And IPv4 is just 32 bit. This leads to 4 billion total addresses, and you know that by now we have exceeded the number of devices on the internet way more and there are way more devices than 4 billion, right? This is why we need IPv6 because the total number of devices you can get with IPv6 is a lot more. And you actually get 340 trillion different combination of addresses from IPv6. So now that we are clear on how IP addresses work, we can go on to the next part.

IPv4 vs IPv6: What’s the Difference? (System Design for Beginners – Episode 3)
Akhil Sharma
6m 35s1,075 words~6 min read
Auto-Generated
Watch on YouTube
Share
MORE TRANSCRIPTS


