ip_address
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ip_address [2026/11/09 13:10] – ultracomfy | ip_address [2026/11/17 15:56] (current) – ultracomfy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| <WRAP column 18% right> | <WRAP column 18% right> | ||
| - | {{page> | + | {{page> |
| </ | </ | ||
| Line 6: | Line 6: | ||
| <WRAP centeralign> | <WRAP centeralign> | ||
| <fs xx-large> | <fs xx-large> | ||
| + | |||
| + | <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: [[: | ||
| + | </ | ||
| + | |||
| 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. | ||
| - | Any device that wants to communicate with other devices over an IP network (such as LAN, WLAN or even WAN) needs an appropriately configured IP address. IP addresses | + | Any device that wants to communicate with other devices over an IP network (such as LAN, WLAN or even WAN) needs an appropriately configured IP address. |
| + | |||
| + | IP addresses are used by other devices | ||
| ====== Fundamentals ====== | ====== Fundamentals ====== | ||
| Line 15: | Line 22: | ||
| <fs xx-large>'' | <fs xx-large>'' | ||
| - | This is a standard IPv4 address: A set of four numbers, each between 0 and 255((Creating a range of 256 total possible values, if you include 0 as a number; ie. 1 - 255 is 255 possible values, plus 0 is another possible value, so 256.)), | + | In fact, this is the IP address that the domain ultracomfy.net resolves to. A very nice example of a standard IPv4 address: A set of four numbers, each between 0 and 255((Creating a range of 256 total possible values, if you include 0 as a number; ie. 1 - 255 is 255 possible values, plus 0 is another possible value, so 256.)), |
| - | The reason this is so is because of math. As you may know, computers in the 21st century work with ones and zeroes. This is the binary system and individual ones and zeroes are called " | + | The reason this is so is because of math. As you may know, computers in the 21st century work with ones and zeroes. This is the binary system and individual ones and zeroes are called |
| '' | '' | ||
| - | An IPv4 address is a set of 32 bits, divided into four groups of bits called octets in networking | + | This is the binary notation (as opposed to the dot-decimal notation we're used to seeing) that shows us what an IP address |
| - | ===== IPv4 and IPv6 ===== | + | <WRAP box> |
| - | Before I move on, I need to touch on IPv4 and IPv6. As you may notice, there are a lot of internet-capable | + | ++++ Advanced Reading: |
| + | Most communication between electronic devices uses IP to facilitate communication. Telephone had a different system but even they are switching to VoIP now. This means that a lot of IP devices will need an IP address | ||
| - | Well, it wasn' | + | It turns out that it wasn' |
| <fs xx-large>'' | <fs xx-large>'' | ||
| - | It's beautiful, isn't it! Yeah, we all know it's not beautiful, but such is the reality of our times((See [[: | + | It's beautiful, isn't it! Yeah... we all know it's not beautiful, but unfortunately that is the reality of our times((See [[: |
| + | IPv4 has four groups | ||
| + | ++++ | ||
| + | </ | ||
| ====== 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 '' | + | 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. |
| - | The reason IP addresses are leased is for the sake of recyling. Imagine we continue the example from above: My router is .1, my phone is .2 and my PC logs is .3. Now imagine I leave the house and the lease expires in the meantime. The router | + | 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. |
| - | Furthermore, | + | <WRAP box> |
| + | ++++ Advanced Reading: Static DHCP Assignment | | ||
| + | Furthermore, | ||
| - | On my network, .1 is the router, .2 is my main computer, .3 is my old computer and .4 is my phone. These addresses are reserved and not given out to any other device. So if I open Command Prompt on my main PC, type in '' | + | On my network, .1 is the router, .2 is my main computer, .3 is my old computer and .4 is my phone. These addresses are reserved and not given out to any other device. So, if I open Command Prompt on my main PC, type in '' |
| - | Anyone else logging on my WLAN will receive an address from 192.168.172.5 or up. Their device will never get any one of the earlier addresses. Again, configurations can differ, and a router might actually be set up to hand out IPs randomly instead of incrementally, | + | Anyone else logging on my WLAN will receive an address from 192.168.172.5 or up. Their device will never get any one of the earlier addresses. Again, configurations can differ, and a router might actually be set up to hand out IPs randomly instead of incrementally, |
| + | ++++ | ||
| + | </ | ||
| + | |||
| + | <WRAP box> | ||
| + | ++++ Advanced Reading: Private Address Ranges | | ||
| - | The range of addresses a router can assign is limited. Routers | + | There are multiple |
| ^ Range ^ Start ^ End ^ | ^ Range ^ Start ^ End ^ | ||
| Line 47: | Line 65: | ||
| | 192.168.0.0/ | | 192.168.0.0/ | ||
| - | As established, | + | As established, |
| + | ++++ | ||
| + | </ | ||
| ===== Private Addresses ===== | ===== Private Addresses ===== | ||
| - | What you just learned is what is called a " | + | What you just learned is what is called a " |
| - | 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 " | + | 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 " |
| - | For this reason, if you tried to '' | + | For this reason, if you tried to '' |
| ===== Public Addresses ===== | ===== Public Addresses ===== | ||
| As established, | As established, | ||
| - | In the case of your home network, your modem (often | + | In the case of your home network, your modem (often built into your router) is assigned its own IP address. |
| + | |||
| + | <WRAP box> | ||
| + | ++++ Advanced Reading: Modems and Routers | | ||
| + | While I will be using the term router to refer to the device you will in fact most likely be thinking of, routers and modems are not the same. Modern devices sold as " | ||
| + | |||
| + | A router, fundamentally, | ||
| + | |||
| + | The modem is the device that actually connects you to the internet. Back in the day, routers and modems were separate machines and you would plug the modem into the wall, and then plug your router in front of it. Modern " | ||
| + | ++++ | ||
| + | </ | ||
| + | |||
| + | Whereas devices on your home network turn to your router for IP assignment, your router is connected to the internet and will turn to your Internet Service Provider (ISP) for IP assignment itself. This gives the router **two** effective IP addresses: One used inside the network, locally (the Private IP address), and one address the router uses when talking to the internet (called the Public IP address). While I am writing this website, my **public** IP address is '' | ||
| <WRAP round box 60%> | <WRAP round box 60%> | ||
| Source IP: 192.168.172.4\\ | Source IP: 192.168.172.4\\ | ||
| Destination: | Destination: | ||
| + | Message Content: Ping!\\ | ||
| </ | </ | ||
| - | Basically, "this is me, and this is where I want to go". The router itself will now pass this information to its gateway using its public IP address. Remember that the modem will use the public IP address to send data towards the internet: | + | Basically, "this is me, and this is where I want to go". The router itself will now pass this information to its gateway using its public IP address. Remember that the router |
| <WRAP round box 60%> | <WRAP round box 60%> | ||
| Source IP: 176.5.60.56\\ | Source IP: 176.5.60.56\\ | ||
| Destination IP: 217.154.217.127\\ | Destination IP: 217.154.217.127\\ | ||
| + | Message Content: Ping!\\ | ||
| </ | </ | ||
| - | Note how devices on the internet don't even see 192.168.172.4. The modem specified 176.5.60.56 as the Source IP, even though originally the source IP was the phone' | + | Note how devices on the internet don't even see 192.168.172.4. The router |
| - | Anyway, when ultracomfy.net (217.154.217.127) | + | ==== Advisory ==== |
| + | <WRAP center round important 60%> | ||
| + | This is the reason why your IP address is not super sensitive information. I hand out my public IP Address for free here on this website because: | ||
| + | |||
| + | 1) My router has leased this IP from my Internet Service Provider, and this lease will eventually run out. At that point it may get a new IP. Depending on your ISP, literally just restarting the router gets you a new IP lease, changing your IP immediately. By the time you read this it has already changed. | ||
| + | |||
| + | 2) My public IP, even if it is current, points towards my router, not the end device I'm using. If you tried to mess with anything on my phone (which sits behind the router), you'd need to breach the router AND then infiltrate my phone somehow. As it stands, my public IP only helps you get to my router, no further. | ||
| + | |||
| + | 3) A public IP address //does// give an attacker an approximate geographical information about your location (except in exceptions). That's how Google knows where you are (coarsely) | ||
| + | |||
| + | 4) Just being exposed to the internet isn't unnormal. Your router is exposed to the internet all the time, as well as every other router on the world used in the same manner as yours. Similarly, internet servers like webservers (such as this website!) go out of their way to be exposed to the internet and even broadcast their IP address publicly for anyone to see. It's about the configuration of your firewall and the service you're providing (HTTP/S in the case of this server, among others) as well as being up to date. If you leave your network configurations mostly alone and stay up to date then you'll be just fine, like the other billions of devices exposed to the internet. | ||
| + | </ | ||
| + | |||
| + | When ultracomfy.net (still 217.154.217.127, remember that you connect to devices with their IP) receives the data, it will take note of the Source IP (176.5.60.56) for later. That' | ||
| <WRAP round box 60%> | <WRAP round box 60%> | ||
| Source IP: 217.154.217.127\\ | Source IP: 217.154.217.127\\ | ||
| Destination IP: 176.5.60.56\\ | Destination IP: 176.5.60.56\\ | ||
| + | Message Content: Pong!\\ | ||
| </ | </ | ||
| - | Once the response reaches your modem, your modem needs to know which of the devices in the home network actually first contacted ultracomfy.net. This process is called Network Address Translation and it's the process | + | When it arrives at my router, |
| <WRAP round box 60%> | <WRAP round box 60%> | ||
| From: 192.168.172.1\\ | From: 192.168.172.1\\ | ||
| To: 192.168.172.4\\ | To: 192.168.172.4\\ | ||
| + | Message Content: Pong!\\ | ||
| </ | </ | ||
| + | This is the end of the journey. My router sent ultracomfy.net' | ||
| + | |||
| + | ====== Network Address Translation ====== | ||
| + | Network Address Translation (NAT) is the process of mediating between public addresses and private addresses. Your router dispatches information with its own public address, and responses from servers (like 217.154.217.127) will be sent back to your router' | ||
| + | |||
| + | You can think of it as Room 3 sending a letter to, say, Company HQ. Room 3 gives its message to the mailman and the mailman replaces the envelope' | ||
| + | |||
| + | <WRAP box> | ||
| + | ++++ Advanced Reading: CGNAT | | ||
| + | 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 " | ||
| + | |||
| + | This is called " | ||
| + | ++++ | ||
| + | </ | ||
| + | |||
| + | ====== DNS ====== | ||
| + | Numbers are hard to memorize. For example, ultracomfy.net is served to you by a server in Karlsruhe that has the IP '' | ||
| + | |||
| + | In the case of ultracomfy.net, | ||
| + | |||
| + | The reason we use DNS is because, for one, domain names are easier to remember, but also because, as discussed, IP addresses change. The IP address(es) under which to reach google.com have changed many a times over the years, but the domain google.com has never changed. | ||
| + | |||
| + | ====== What We've Learned ====== | ||
| + | To sum it all up, we have learned that IP addresses are numbers given to network-capable devices by devices higher up in the chain to enable communication between them. These numbers are handed out temporarily and become invalid after some time unless renewed. This concept is known as " | ||
ip_address.1794229811.txt.gz · Last modified: by ultracomfy
