Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ip address assignment!

  1. Feb 22, 2006 #1
    can we assign the same ip address to two different PC's ? if so then how does it work when sending or receiving packets?
     
  2. jcsd
  3. Feb 22, 2006 #2
    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.
     
  4. Feb 23, 2006 #3

    russ_watters

    User Avatar

    Staff: Mentor

    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.
     
  5. Feb 23, 2006 #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: Feb 23, 2006
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Ip address assignment!
  1. Ip address tracing (Replies: 11)

  2. IP address (Replies: 4)

  3. Ports on IP addresses (Replies: 5)

Loading...