Routing Switch IP IPv4 IP-Address – Network Setup for Multiple Devices with the Same IP

ipip addressipv4routingswitch

Because I do not find the correct question that I can ask google, due to the lack of terminology. I'm trying to ask it here. Please have patience.

My Question is similar to the questions asked here and here .

How to connect to devices that have a the same ip address 192.168.1.1.
Clearly this is not possible because a IP address needs to be unique.

Which setup do I need, in order to access multiple devices that have the same id.

The idea that I have so far is to use a managed switch that maps the IP address 192.168.2.n to 192.168.1.1

Image of Routing Overview: Image of Routing Overview

enter image description here

If a setup like the image above suggests could be achived, then could you please guide me to how to set it up.
Also I'm very thankful if you could provide me with the right terminology of what I'm trying to achive.

Like: Connect two Vlan from port 1 to Port2 with a bridge ….

The Author of the post above suggested:
The managed switch is setup so that each port is vlan'd into its own untagged vlan and all of those vlans are tagged on the port connected to the PC.
What does it mean, can you explain further?

Your help is highly appreciated.

PS: What I really trying to achieve is to automate the installment of software on a Linux device that by default comes with a default IP address of 192.168.1.1. Detect the connected device on the network ssh into it and install & configure the software.

Best Answer

Your drawing and idea have some problems:

  • Your router has multiple interfaces in the same network, but that will not work. Routers route between networks, not from a network back to the same network, so router interfaces must be in the different networks.
  • Switches are layer-2 devices, and they are ignorant of layer-3, e.g. IP. Layer-2 can carry any number of layer-3 protocols (IPv4, IPX, IPv6, AppleTalk, etc.) because they do not know or care about layer-3.

The idea of changing IP addresses on packets is NAT (Network Address Translation).

A real problem for you is that on whatever network a PC connected, changing the address on the PC to a different network address will stop the PC from communicating after you change the address.