IP Address Assignment: Can Two PCs Share Same IP?

  • Thread starter magneeto
  • Start date
  • Tags
    Assignment
In summary: IP addresses or 4.3 billion. In summary, two devices with the same IP address on the same subnet will have problems. You can solve this by using a Network Address Translation router.
  • #1
magneeto
6
0
can we assign the same ip address to two different PC's ? if so then how does it work when sending or receiving packets?
 
Computer science news on Phys.org
  • #2
You can do anything you like :) doesn't mean it will work.

If you have 2 devices with the same IP address on the same subnet, you will have problems, if you use IP as your communcation protocol.

For a start your ARP tables (MAC-IP table) will have 2 entries for the same IP address pointing to different MAC addresses. I have never sniffed the wire with this senario, but I would believe that you will get 50% of the packets going to one device and 50% to the other. This is assuming you are not using a layer 2 device with an ARP gaurd or something similar to stop the arp table being posioned.

Any traffic you send out of your subnet will return to your subnet, but probably won't get to your end device.

1 scenario I know where you can have the "Same" ip address on 2 different devices within the same subent is over a PPP link between two PPP devices and you are using IP unnumbered. Another perhaps would be if you are using Multicasts exclusivley and your multicast addresses are different.
 
  • #3
But, you can share one "real" ip address amongst several computers (to share, say, a dsl connection) if you have a Network Address Translation router to assign "fake" ip addresses to all computers on your local network. All cable/dsl routers are NAT routers.
 
  • #4
You arent "sharing" an IP address on the same subnet, you are translating an IP address from one class to another, or if you are using VLSM, (variable length subnet masking) you translate from one subnet to another.
There is no "fake" ip address, typically NAT is used to translate from public IP address that are routable on the 'net to private IP address that are not routable on the 'net. Maybe this is what you mean.

What you just described is actually called PAT, Port address translation or NAT overload. PAT is a subset of NAT that uses random high port numbers within a Table to map traffic flows between the public IP address and the private ip address.

It is not correct to say that the system shares an IP address, because it doesnt, it has its own IP address. Rather the router translates and tracks traffic flows from the "internal" Systems to 1 IP address on the outside, to avoid a flaw in IPv4, naminly the amount of IP address you can have ie 2^32
 
Last edited:

1. What is an IP address?

An IP address is a unique numerical identifier assigned to every device connected to a network, which allows it to communicate with other devices on the network.

2. Can two PCs have the same IP address?

No, two devices cannot have the same IP address on the same network. Each device must have a unique IP address for proper communication.

3. What happens if two PCs share the same IP address?

If two devices on the same network share the same IP address, it will lead to conflicts and disruption of network communication. This can result in network errors and connectivity issues.

4. Can two PCs share the same IP address if they are on different networks?

Yes, it is possible for two devices to have the same IP address if they are on different networks. This is because the IP address is only unique within a specific network.

5. How are IP addresses assigned to devices?

IP addresses are assigned either manually by a network administrator or automatically through a Dynamic Host Configuration Protocol (DHCP) server. The DHCP server assigns IP addresses from a pool of available addresses to each device connected to the network.

Similar threads

  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
4
Views
1K
  • Computing and Technology
Replies
10
Views
2K
Replies
13
Views
1K
  • Computing and Technology
Replies
14
Views
1K
  • Computing and Technology
Replies
1
Views
2K
Replies
16
Views
3K
  • Programming and Computer Science
Replies
7
Views
331
Replies
2
Views
747
  • Computing and Technology
Replies
3
Views
911
Back
Top