I got my own router and I manually set the ip instead of using dhcp which I thought was a cool feature and it worked. When I check it on the internet, it’s not the same ip although ipconfig shows it as the one I manually set.
Why is that? Why don’t the ip addresses correspond? There is a different ip the isp assigns after I manually set it?
You can’t choose your own IP address in a network domain you don’t control. Your ISP is assigned a block of IP addresses by the IANA (Internet Assigned Number Authority) either directly or indirectly by their upstream provider.
When you’re choosing an IP address, what you’re doing is defining your local network. The router, being a device designed to route IP packets between networks, will handle translation, NAT (network address translation), between your network and the upstream network, and then undo the translation on the returning packets.
Be aware that you can’t have whatever IP address you want. There are three blocks you can use in IPv4, 10.x.x.x, 192.168.x.x and 172.16. 0.0 – 172.31. 255.255. If you use any others, it’s likely that someone was assigned that in the internet, and possible some random web site might resolve to what you chose, and you would be unable to reach your intended web site in that case.
Here’s a trick you can use to find out “who” is using an IP address. (It won’t work for all, but for many.)
C:\> nslookup
Default Server: router.asus.com
Address: 192.168.xxxx
# set the type to reverse lookup
> set type=ptr
# enter the IP address to lookup
> 8.8.8.8
Non-authoritative answer:
8.8.8.8.in-addr.arpa name = dns.google # This is the owner
# I just picked a number at random
> 123.11.22.33
Non-authoritative answer:
33.22.11.123.in-addr.arpa name = hn.kd.ny.adsl # This is the owner
Well it’s a forward DNS for a reversed number in a specific format actually… but yes, the net net (sorry for the pun) is that you can lookup a name for a number.
I’m honestly not perfectly sure exactly the whole structure, but there’s a clue in ARIN’s long form name: American Registry for Internet Numbers–it’s for “America”. There are others as well for other parts of the world. (https://www.ipxo.com/blog/what-is-arin/)
A search I did for a specific detail as I was writing the content below turned up this, which you may find useful IBM Documentation
IPv4 is made of four 8-bit unsigned numbers usually referred to as octets. Because they’re 8 bits they can range from 0 to 2^8-1 (or 255 decimal.) 0.0.0.0 is reserved (for kinda obvious reasons, it’s all zero bits) as are actually a whole bunch of others, such as 255.255.255.255 (it’s all one bits.)
There is a fair bit of history here, but I’ll try and briefly cover some. Four 8-bit octets allows you to have in essence 32 bits worth of addresses, which is 2^32 minus all the reserved ones, but is somewhere around 4 billion. In the beginning, it was believed that 4 billion addresses would be way more than enough, so they came up with a way to group them for easier management. (Also realize in the 70’s (Internet Protocol - Wikipedia) when this was being thought out, it was almost inconceivable that you could have enough processing power or RAM to track each address separately or even in small groups.)
Initially they used the first 4 bits (or so) of the first octet to indicate the type of number. (I’ll leave looking these precise (but now mostly deprecated) details up to your interest.) What they did was come up with a few classes of numbers. Classes A, B, and C are most relevant to this history.
Class A addresses are in the form of n.x.x.x where n goes from 1 (because zero was reserved) to 127, i.e. where the high bit is clear. If you were allocated a class A address, you were then in control of 24 bits worth (minus a few reserved) of addresses, 2^24 is a little over 16 million. The reserved for private use 10.x.x.x is a class A address. There are only a little over 100 possible class A address blocks, so they were not given out to just anyone, only to large organizations (IBM had 9 and here are some of the others List of assigned /8 IPv4 address blocks - Wikipedia )
Class B was a 16 bit address, so n.m.x.x where n is in a specific range (the top two bits are 10 I believe) and m can be any octet. This means there are about 64*256 or 16K class B address blocks of roughly 16K addresses each. The reserved private IPs 172.16. 0.0 – 172.31. 255.255 are class B addresses.
Class C is n.m.p.x where n has its high bits as 110 and thus ranges from 192 to 223. m and p are any octet, so there are 32*256*256 or around 2 million class C address blocks which are each of size 254 (0 and 255 being reserved.) The private IP address range 192.168.x.x is a block of 256 class C address blocks.
These days, we’ve actually run out of IPv4 addresses, so they had to switch away from the class based addresses to a new system know as CIDR, the classless inter-domain routing system ( Classless Inter-Domain Routing - Wikipedia ). The basics of this system is that the first n bits of an address are the “network” portion and the remaining 32-n bits are the “host” portion. This is usually represented like this: 10.0.0.0/8 (for a class A that starts with 10) or 172.x.0.0/16 (for a class B that starts with 172.x) or 192.168.1.0/24 (for a class C that starts with 192.168.1). There are other possible breakdowns of addresses, for example, in theory, you could allocate one small network of 4 addresses by doing n.m.p.q/30 (although two of the addresses would be reserved, leaving two for the assignee.)
Yes, IPv4 HAS run out.
IPv6 is 128 bits and so there are 340,282,366,920,938,463,463,374,607,431,768,211,456 possible addresses (minus again some blocks of reserved addresses.) It seems unlikely IPv6 will ever run out of addresses, and in fact the MINIMUM number they will issue to a single customer these days is 64 bits worth, or 18,446,744,073,709,551,616 addresses. That is also the number of those size blocks because that means the 64 bits of the top portion is the network and the 64 bits of the bottom portion is the host. IPv6 addresses are usually represented in 16 bit hex “octets” instead of decimal with colons instead of periods, and with two colons to indicate where a bunch of 0000’s were left out. In your browser you put an IPv6 address inside of square brackets. So a possible IPv6 address in CIDR format might look like aabb::ccdd/64
In nslookupIPv4 addresses are type A and IPv6 is type AAAA.
Just a note on IPv4 addresses running out. If the public IP address you see on your router (the IP address assigned by your ISP connection) is different to the address you see when you go to somewhere like https://www.whatismyip.com then your ISP is using something called Carrier Grade Network Address Translation (CG-NAT) that some ISPs use to conserve IPv4 addresses. It basically means your devices are under two levels of NAT (like having two routers). CG-NAT means you cannot run servers and expose them to the internet (not easily anyway) and some online gaming can be affected.
Odds are likely your new router came with a [potentially dangerous] feature enabled specifically to solve these problems, known as Universal Plug & Play. This allows devices that need firewalls adjusted to work right to request the adjustments from the router automatically.