Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|improve this question

2 Answers 2

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:

Check serverfault.com

And the answer to your question would be no. Unique addresses only!

share|improve this answer

So I've been reading about CIDR.

If I am not mistaken it is possible to assign the same two IP addresses to two machines provided they have different prefix lengths (different subnets).

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 1.2.3.4

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:

  1. Networks not connected to the internet. No conflict with the networks on the Internet is possible. Assign whatever you want. (Though you will run into problems is you later do decide to connect to the Internet). To avoid problems with this we have reserved a few networks (see RFC 1918) which should never be routed to the real Internet.
  2. A kludge called NAT. This basically translates an external address to one or more internal addresses. Combine that with not routing the internal IPs to the Internet and you can work around a few problems if you do not have sufficient assigned IPs for all your computers. Note that this is an ugly hack and it does break several protocols (such as FTP). It really should only be used in emergencies.

I was wondering if such assignments are(/were) ever implemented in the "public" internet (so public IP range).

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.

Two networks and a host

In this picture I have two different networks with different length prefixes.
Somewhere between a computer (the 'some computer on the right) and the destination are a lot of routers. I left most of those in the little clouds but I explicitly drew one.

Now say that this computer has a packet with destination 1.2.3.7. What should the router do? Both destinations are valid. Fail to reach one of them? Send the data to both destinations (needlessly using bandwidth and possibly leaking information)?

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.

share|improve this answer
    
Good explanation! –  xstnc Sep 24 '13 at 11:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.