Ip address assignment!

  • Thread starter magneeto
  • Start date
6
0

Main Question or Discussion Point

can we assign the same ip address to two different PC's ? if so then how does it work when sending or receiving packets?
 

Answers and Replies

210
0
You can do anything you like :) doesnt 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 wont get to your end device.

1 senario 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.
 
russ_watters
Mentor
19,017
5,168
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.
 
210
0
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:

Related Threads for: Ip address assignment!

  • Last Post
Replies
5
Views
878
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
16
Views
2K
  • Last Post
Replies
9
Views
4K
  • Last Post
Replies
10
Views
2K
  • Last Post
Replies
3
Views
2K
Top