So I've been reading about CIDR. If I'm not mistaken it is possible to assign the same two IP addresses to two machines provided they have different prefix lengths (different subnets). I was wondering if such assignments are(/were) ever implemented in the "public" internet (so public IP range).
Well, it's not really possible using the same IP even if it's diffrent subnets. You will experience quite alot of funny things if you try (routing issues ect.).
I see someone over at serverfault.com have posted a nice answer about this here:
And the answer to your question would be no. Unique addresses only!
It depends on how you define an 'IP address' and how you define 'the Internet'.
First lets assume IP v4 (Since a few decades there is also IP v6).
Next let an IP address be a 32bit value, usually split in 4 parts and written as dotted decimals. So the IP 00000001000000100000001100000100 would be written as 184.108.40.206
On the Internet (the public network connecting lots and lots of intranets) this should be unique. It is like a phone number, and every phone has its own number. Part of that is used for routing and part of it to identify the network, but the combination is unique.
Now there are two exceptions:
No. Each address is unique and care is taken when handling out ranges with IPs. Conflicts are carefully avoided.
Edit, I want to add two more thingss. Lets start with a picture.
In this picture I have two different networks with different length prefixes.
Now say that this computer has a packet with destination
Secondly, what if a computer in the upper left cloud want to send something to a computer in the lower left cloud? Possibly with identical numbered (IP) computers in both nets.
Both of these show why the addresses are designed to be unique. You can configure things wrongly, but do expect a lot of problems and possibly a few angry network maintainers.