0

I have a private network (no gateway) with a number of devices configured on one subnet (say A.A.A.0/24). I would like to change the IP addresses of all devices on this network to a new subnet (say B.B.B.0/24).

If I change one device's IP address from A.A.A.4 to B.B.B.4, is there a device that I can connect to the network that will listen for packets from A.A.A.3 destined to A.A.A.4 and re-transmit them as source B.B.B.3 and destination B.B.B.4 (and likewise the other way)? Essentially a device that transparently appears as A.A.A.4 but is actually allowing communication with a device B.B.B.4.

This sounds similar to NAT, but isn't?

Thanks in advance!

Jack

2
  • "This sounds similar to NAT, but isn't?" Yes, it is NAT. Network Address Translation replaces either or both the source and destination address in a packet., which is exactly what you are doing. In any case, simple routing will get packets source on one network routed to a different network (no NAT needed, and you want to avoid NAT if at all possible). Simply send traffic from A.A.A.3 to B.B.B.4. You seem to have an X-Y Problem.
    – Ron Maupin
    Aug 1, 2019 at 11:47
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
    – Ron Maupin
    Dec 15, 2019 at 5:51

1 Answer 1

1

Routers route between different IP subnets, even if those exist within the very same L2 segment (router-on-a-stick). There's no need for translation, just forwarding in between is sufficient.

If you did translate without router that would require splitting the L2 segment in order to force all traffic through the (bridging) translator. NAT without routing does exist but there's little use for it.

EDIT With a NAT router you could construct a - rather elaborate - SNAT/DNAT scheme that would translate the IP addresses for "remote" devices (those already migrated for old address devices and those not yet migrated for new address devices). If you actually wanted to be able to move every single device without any loss of connectivity (apart from reboot) you'd need to adjust that scheme while the device is rebooting. I don't think there's a ways to have it adapt automatically unless you whip up some significant code. After all, the scheme would need to "know" whether a device currently responds to A.A.A.x or B.B.B.x. /EDIT

Another strategy is to temporarily use both, new and old, addresses on the devices. Once you've migrated everything you remove the old addresses.

EDIT2 While you're at it: a common problem with renumbering a network is the heavy use of static, locally configured addresses. Consider using centrally controlled DHCP addresses where you could very easily control an adress change in one place. In yet another strategy, you could in-place migrate to DHCP-controlled addresses and then (with a short lease time) change them all at once. /EDIT2

5
  • Hi Zac, Thanks for your reply. The devices (not PCs) can only have one address assigned (otherwise that would have been perfect), and any config changes require a reboot (undesirable until we are ready to perform the full change). Even with a default gateway, the existing unchanged devices are still looking for the updated device at the old address on the same subnet, so the packets would not be forwarded to the gateway anyway. Any other thoughts? - It sounds like the answer to my question might be a no... Thanks again, Jack
    – jcvince92
    Aug 1, 2019 at 7:32
  • Just a thought: Could I attach my laptop to the network with one NIC but set multiple addresses to the one NIC (all the changed addresses) and then run some software which adjusts the source/destination parts of the packets CRCs or whatever and re-transmits?
    – jcvince92
    Aug 1, 2019 at 8:09
  • @jcvince92 Re laptop: that'd be the NAT router I was talking about.
    – Zac67
    Aug 1, 2019 at 8:11
  • Ah yes the NAT router sounds like a possibility. Can I assign multiple addresses to interfaces on a NAT router? So I could configure static NAT for each direction separately, translating the source and destination? Thanks again.
    – jcvince92
    Aug 1, 2019 at 8:20
  • @jcvince92 What a NAT router can or can't do depends on the device. Generally, it's possible.
    – Zac67
    Aug 1, 2019 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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