Ramblings

Introspective narcissism since the 2000s.

User Tools

Site Tools


ip_address

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ip_address [2026/11/10 16:49] – ultracomfyip_address [2026/11/17 15:56] (current) – ultracomfy
Line 1: Line 1:
 <WRAP column 18% right> <WRAP column 18% right>
-{{page>Templates:Science}}+{{page>Templates:Technology}}
 </WRAP> </WRAP>
  
Line 6: Line 6:
 <WRAP centeralign>Information Technology/Networking/\\ <WRAP centeralign>Information Technology/Networking/\\
 <fs xx-large>IP Address</fs></WRAP> <fs xx-large>IP Address</fs></WRAP>
 +
 +<WRAP center round info 60%>
 +While IP addresses aren't necessarily connected to the internet, much of what you are about to read might make more sense to you if you read about the internet first. See: [[:internet|Internet (>click<)]].
 +</WRAP>
 +
  
 An IP (Internet Protocol) address is a numerical identifier assigned to a network interface, allowing it to be identified and communicate with other devices over an IP network. An IP (Internet Protocol) address is a numerical identifier assigned to a network interface, allowing it to be identified and communicate with other devices over an IP network.
Line 36: Line 41:
  
 ====== IP Assignment ====== ====== IP Assignment ======
-The IP address a DHCP server assigns to a device isn't (entirely) random. For home networks, three different reserved address spaces exist that routers may use to assign IP addresses. These begin with ''10.0.0.0'', ''172.16.0.0'' and ''192.168.0.0''. For example, my network at home is administered by a FritzBox router. Most FritzBoxes come out of the factory configured to use the ''192.168.xxx.xxx'' space to assign to connecting devices. In my case, the FritzBox assigns itself the address ''192.168.172.1'' and then counts upward: If I now logged onto that router's WLAN with my phone, the FritzBox will assign my phone the address ''192.168.172.2''. Any subsequent devices registering on the network will get the lowest available IP that isn't currently assigned (ie. if I power on my PC now it will be assigned .3, and so on). These assignments, however, are only //leased// and a connected device needs to refresh a lease((ie. Check in with the router/DHCP server and request a lease extension.)) every once in a while if it wants to keep it.+The IP address a DHCP server assigns to a device isn't (entirely) random. For example, my network at home is administered by a FritzBox router. Most FritzBoxes come out of the factory configured to assign themselves the address ''192.168.172.1'' and then to count upward: If I now logged onto that router's WLAN with my phone, the FritzBox will assign my phone the address ''192.168.172.2''. Any subsequent devices registering on the network will get the lowest available IP that isn't currently assigned (ie. if I power on my PC now it will be assigned .3, and so on). These assignments, however, are only //leased// and a connected device needs to refresh a lease((ie. Check in with the router/DHCP server and request a lease extension.)) every once in a while if it wants to keep it.
  
-The reason IP addresses are leased is for the sake of recycling. If every device got a new IP address every time it logged on, the router/DHCP server would eventually run out of IP addresses it can assign. Imagine we continue the example from above: My router is .1, my phone is .2 and my PC is .3. Now imagine I leave the house with my phone and I'm gone for so long that my phone's lease expires. The router can then //reclaim// the leased IP and assign it to new devices logging on. So, if for example my roommate was to log on her phone after mine disconnected, her phone could get .2 even though that was previously assigned to my phone. It was able to recycle .2 and use it for my roommate's phone instead of using up another IP address (.4). Leasing and recycling let the router use less IP addresses while serving the same number of devices. Only if I now came back into the house with my phone, and it tried to log onto the WLAN, the router would see that both .2 and .3 are now in use and will give my phone .4.+The reason IP addresses are leased is for the sake of recycling. If every device got a new IP address every time it logged on, the router/DHCP server would eventually run out of IP addresses it can assign. By tying addresses to a lease, an IP address is in use only for as long as it is actively used and can be re-assigned if and when the lease runs out.
  
 <WRAP box> <WRAP box>
Line 53: Line 58:
 ++++ Advanced Reading: Private Address Ranges | ++++ Advanced Reading: Private Address Ranges |
  
-The range of addresses a router can assign is limited. Routers are given ranges (see Table below) in which they can assign addresses. For example, in the 192.168.0.0/16 range, the router can freely decide over the last two blocks, ie. it can assign anything between 192.168.0.0 and 192.168.255.255. The ranges are as follows:+There are multiple ranges that have been specifically reserved for use in local networks. For example, in the 192.168.0.0/16 range, the router can freely decide over the last two blocks, ie. it can assign anything between 192.168.0.0 and 192.168.255.255. The ranges are as follows:
  
 ^ Range           ^ Start        ^ End              ^ ^ Range           ^ Start        ^ End              ^
Line 67: Line 72:
 What you just learned is what is called a "private address". Private addresses are addresses used inside a local network, like your home network. The idea here is that there can be multiple networks with addresses starting with 192.168.xxx.xxx. For example, if you bought your own FritzBox, that FritzBox would assign IP's in 192.168.172.xxx as well. On a global scale, 192.168.172.1 (for example) could potentially point to millions of devices because there's millions of FritzBoxes in operation using these addresses privately. You can think of it like numbering your rooms. You could go into all houses in the world and number the rooms, "Room 1", "Room 2", "Room 3", etc.. What you just learned is what is called a "private address". Private addresses are addresses used inside a local network, like your home network. The idea here is that there can be multiple networks with addresses starting with 192.168.xxx.xxx. For example, if you bought your own FritzBox, that FritzBox would assign IP's in 192.168.172.xxx as well. On a global scale, 192.168.172.1 (for example) could potentially point to millions of devices because there's millions of FritzBoxes in operation using these addresses privately. You can think of it like numbering your rooms. You could go into all houses in the world and number the rooms, "Room 1", "Room 2", "Room 3", etc..
  
-Each house would have its own Room 1's and Room 2's and so on, so if you now sent a letter with the destination "Room 3", the mailman would have absolutely no clue where they're meant to go because there are billions of "Room 3"'s in the world. Of course, if you had a mail system inside your own house and sent mail to room 3 using that, that's when this system becomes useful, and it's exactly what Private Addresses are used for. They have nothing to do with the internet and are used solely by devices on a particular network (like my WLAN) to communicate to other devices on the same or interconnected networks (but not the internet). In that case it is completely irrelevant that there are other networks out there in the world with similar Private Addresses, because that's not who you're talking to anyway.+Each house would have its own Room 1's and Room 2's and so on. Think of all the different offices in which the room number 501 might exist. So if you now sent a letter with the destination "Room 503", the mailman would have absolutely no clue where they're meant to go because there are billions of "Room 503"'s in the world. Of course, if you had a mail system inside your //own// office space and sent mail to room 503 using that, that's when this system becomes useful, and it's exactly what Private Addresses are used for. My router //is// the mail system inside your own office. Theses addresses, 192.168.172.1 and so on, are used by my router at home exlusively to speak to devices inside my home, not to the outside.
  
 For this reason, if you tried to ''ping 192.168.172.2'' from your own computer, you would not be reaching my personal computer in my particular home network. If your router assigns 192.168.xxx.xxx then a device on your network might be assigned ''192.168.172.2'' and you will be reaching that device, not mine, even if they have the same IP address. **It is crucial to understand that IP addresses do not uniquely identify a //device// because the IP address assigned to a device can change and the same private IP addresses may and in most cases are used in other local networks.**  For this reason, if you tried to ''ping 192.168.172.2'' from your own computer, you would not be reaching my personal computer in my particular home network. If your router assigns 192.168.xxx.xxx then a device on your network might be assigned ''192.168.172.2'' and you will be reaching that device, not mine, even if they have the same IP address. **It is crucial to understand that IP addresses do not uniquely identify a //device// because the IP address assigned to a device can change and the same private IP addresses may and in most cases are used in other local networks.** 
Line 144: Line 149:
 Internet Service Providers and other carriers on the way themselves have limited ranges to hand out IP addresses. If your ISP has been allocated 100000 IPv4 addresses but you have 150000 customers, you will quickly exhaust your available addresses. So, in the same way that home networks can use NAT to independently use the same IP addresses (ie. my computer can have 192.168.172.2 in my local network and your computer can have 192.168.172.2 in your network without them conflicting with each other), your carrier might employ NAT at their level to reuse IP addresses "locally" without them conflicting with each other. Internet Service Providers and other carriers on the way themselves have limited ranges to hand out IP addresses. If your ISP has been allocated 100000 IPv4 addresses but you have 150000 customers, you will quickly exhaust your available addresses. So, in the same way that home networks can use NAT to independently use the same IP addresses (ie. my computer can have 192.168.172.2 in my local network and your computer can have 192.168.172.2 in your network without them conflicting with each other), your carrier might employ NAT at their level to reuse IP addresses "locally" without them conflicting with each other.
  
-This is called "Carrier Grade Network Address Translation", ie. NAT at the carrier level, ie. CGNAT. CGNAT is the best friend of anyone who's ever tried to do something cool with their internet devices at home (like hosting a web or gameserver) because it, in all likelihood, did not work((I have personal, painful experience)). Exactly why it doesn't work is related to the P part in NAPT, which I'd prefer to avoid for now... but if you really have to know: CGNAT, like NAPT, introduces port mappings (ie. the port determines where the carrier will send them to) so that you, at home, can no longer meaningfully use incoming ports. Your carrier already uses the ports for their own purposes and if you tried to set up a service that requires a particular port (like the aforementioned web- or gameserver), the incoming traffic will end up in the carrier's port mapping and 1) be dropped entirely or 2) routed to the wrong IP address (ie. not you).+This is called "Carrier Grade Network Address Translation", ie. NAT at the carrier level, ie. CGNAT. CGNAT is the best friend of anyone who's ever tried to do something cool with their internet devices at home (like hosting a web or gameserver) because it, in all likelihood, did not work((I have personal, painful experience)). Exactly why it doesn't work is related to the P part in NAPT, which I'd prefer to avoid for now... but if you really have to know: CGNAT, like NAPT, introduces port mappings (ie. the port determines where the carrier will send them to) so that you, at home, can no longer meaningfully use incoming ports. Your carrier already uses the ports for their own purposes and if you tried to set up a service that requires a particular port (like the aforementioned web- or gameserver), the incoming traffic will end up in the carrier's port mapping and 1) be dropped entirely or 2) routed to the wrong IP address (ie. not you). Exceptions exist, and methods for workarounds exist too, but not all carriers cooperate (most don't).
 ++++ ++++
 </WRAP> </WRAP>
ip_address.1794329379.txt.gz · Last modified: by ultracomfy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki