So, now that we understand the ideas behind subnetting and IP addresses we can dig even further to explain just two, two main notions that have developed. they're both, they're both pretty simple and elegant but they're very important and very, very, very fundamental to the way the Internet operates today. the first one is DHCP. host typically don't have fixed IP addresses, right? So, you don't have a static IP address that'll never change. Every time you connect to the Internet, you are assigned a different IP address. And you only can keep, you only keep that IP address for a certain amount of time, unless you renew it, right? And the Dynamic Host Configuration Protocol, or DHCP. Now you know why we abbreviate everything because we don't want to say, walk around saying things like Dynamic Host Configuration Protocol all the time. DHCP server keeps track of which addresses are unused, right. So, it keeps like a library, or a database, of which addresses it can assign that are currently unused, right? And the DHCP server is typically in your local network somewhere, that's assigning the IP addresses. this the idea how it works. there's some database that the DHCP server takes, is, is monitoring, right? So, if your, when your device comes on the Internet and it says okay, I want a, an IP address because I want to connect to the Internet. The DHCP server will send this and it will say okay here's an address that's that you can take 192.168.0.22. And then you'd, you would have to say yes, I accept that address and then you will be assigned this address so once you accept that. And then the, the database will basically take this address out of there for the time being. but after some finite lease time which could be any given amount of duration, just some amount of time. The address is either going to be renewed, in which case you would say yes, I'm still using this address, or it's returned to the database. So, if you don't respond or you've disconnected from the Internet and it, it's not your, it's, the DHCP isn't receiving a response from this address anymore it'll return this address to the database. And same thing goes with all the other devices that are in your local network. And that's how it keeps track of which addresses are out and which addresses aren't being used. So, the second idea is called NAT. and this is another one, and the, the main idea behind NAT is that addresses in your local network may be different actually from addresses that you're seeing in, in the public Internet. Alright, so we just, we just saw how how you get an IP address. then NAT is basically to say well, your IP address from your, viewed from your local colleagues, or your local devices that are local to you might be different from what other people outside of you see. And so, this is, this is, the idea this is the Network Address Translation, NAT stands for Network Address Translation. So, and NAT rather, does this. And basically it translates back and forth, it translate from public to private. And this is the idea here, right? So, for the rest of the Internet, right? So, suppose you have three devices and maybe this is in your home, right? you, all your devices, all of the devices may actually be on one public address, right? So, all of these devices in your house may return and say okay when, when someone's trying to address you, they may all be addressing 125, 125.35.48.166. Then once it gets to the NAT router, the NAT router has some extra information that it can use basically to say okay, I know where this needs to go. I know which host it needs to go to. And you actually use something beyond the IP address, a little beyond our scope here, but you use port numbers, right? So, each of you are running a different web browser and using different port numbers for each of your sessions. So, then the NAT will look and see, okay which port number it was destined for, and then that's how it determines which host to go to. So, everyone's addressing you again based upon this public address, and then the NAT will be able to convert it back to this private address, which will then allow it to do the local networking. so, the example of this is your home router, right? so your home router, if you've ever seen before, your, your devices may be 10.0.25.1, 10.0.25.2, 10.0.25.3, and the router might just be 10.0.25.0. So, for, you may see it like that. But really, when everyone's addressing you outside, they're just addressing your general IP address, your public address of 125.35.48.166. And, the way to really think of this a good analogy is a mail sorter in a large company. so, you know like, if you have a mail sorter somewhere. basically, what happens is, when someone addresses you, right? they're going to write, basically, and say, okay, well, this is going to go to Bob Smith in this company, right? so then, the, the, the mail service will take it to the company, right? And then a mail sorter would actually put it into Bob Smith's mailbox. So, so, the NAT acts as this sorter. And putting it in the mailbox, then it'll look more specifically and have more information that it needs to determine exactly which mailbox it goes into or, for instance, which desk to deliver it to. because it would get really tedious if all the mail was delivered directly to someone's desk. every time the mail truck came It would go to every person's desk and deliver it one at a time.