Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

how to connect 2 lans with hosts having same ip?

Mar 31, 2016 10:35PM PDT

am in a testing lab in my office with 6 different LANs having 5 PCs each. Lets say A-B-C-D-E.
I want to connect these lans to form a network so that all pcs are on the same network. But the problem is due to some reasons (testing tool we are using) those 5 PCs on each lan should have the same IP address i.e. PC A should have same IP on all LANs say 192.168.1.x and B should have 192.168.1.y on all present LANs and so on...

So can someone help me out with this?

One solution i was thinking was to install a 2nd NIC/LAN card and create a 2nd network to get one PC each from present LANs on a network.

Will this work?

Discussion is locked

- Collapse -
Answer
You can't have 2 hosts
Apr 1, 2016 6:22AM PDT

having the same IP unless you need to manually change one. IP adresses are addressed on a network. If you identify by MAC address since the mac address is unique when the device is manufactured.

- Collapse -
Let me explain that again
Apr 1, 2016 8:07AM PDT

All 5 PC's on a lan have 5 different ips. But these set of 5 ips are being used on all 6 lans. That's the restriction our testing tools posess. That they work only on certain IP address.

And now I want. To connect these 6 land to form a network. Or else atleast 1 PC from each LAN .

- Collapse -
Since it's nonstandard you may not find support but.
Apr 1, 2016 8:11AM PDT

But there is a way. Cheat and change the NETMASK to include all these IPs. Bingo. All are on one LAN.

As that's basic networking I'll pause here.

- Collapse -
(NT) Can you help me with that?
Apr 1, 2016 9:07AM PDT
- Collapse -
I did.
Apr 1, 2016 9:41AM PDT

I noted the netmask to pull different IPs into the LAN. This is basic IP networking so I helped and it's done at that point.

- Collapse -
But..
Apr 1, 2016 9:56AM PDT

I really don't think you understood my problem dude. And am from testing background so not so good with networking. Excuse my stupidity when it comes to networking.

Let me rephrase my situation. We have 6 LANs let's say having 3 PC each called machine1, machine 2 and machine 3 connected via a switch. And the softwares they are using only work with 3 definite IP addresses let's say x,y and z respectively.

So all 6 LANs having these 3 similar PC have exactly same manually configured IP addresses. Now I want to connect these 6 LANs to share files, folders and other test data.
HOW?
because I just can't connect to the same switch or router as that leads to IP conflicts.

None of them are connected to the Internet and we don't need to.

- Collapse -
Then you may have a problem network.
Apr 1, 2016 10:10AM PDT

If you can't solve this with everyday IP network features then you're back to the designer of this thing.

Since these can't be wired to the same LAN then you can't use a networking solution.

Now there is an idea where you install a second network card just for your sharing and put its IP address for that LAN.

-> And don't leave out details. One poor soul was trying to get around license issues like this. They eventually burst out in flames slagging everyone that offered any ideas. But for that scenario you fix it the right way. Get enough licenses for the job.

- Collapse -
here's an idea
Apr 7, 2016 8:20AM PDT

use their MAC instead. And give each MAC the same IP static address on each router. That way, no matter which LAN they are plugged into, they each will still have the same IP address. I'm also assuming this means the routers aren't connected directly to each other.

- Collapse -
it sounds good
May 1, 2016 11:34PM PDT

but can you elaborate a bit? how to implement this?

and will the PCs in different LANs still be able to communicate with each other?

- Collapse -
Let me explain that again
Apr 1, 2016 8:09AM PDT

All 5 PC's on a lan have 5 different ips. But these set of 5 ips are being used on all 6 lans. That's the restriction our testing tools posess. That they work only on certain IP address.

And now I want. To connect these 6 land to form a network. Or else atleast 1 PC from each LAN .

P.s - None of them are connected to the Internet. And they all have manually configured ips.

- Collapse -
Answer
You might try this..
Apr 6, 2016 9:38PM PDT

Not positive it would work, but you can use NAT on a switch or router which allows you to create basically a reset point for the IPs beyond that point. So you have a main router for all lans, then NAT enabled switches for each lan, then you can assign your IPs to each device behind your switch. A topology and adressing might look like this..
Router
192.168.0.1
| |. |
|. | . -> 192.168.0.2 <-(Switch A)
| | ->192.168.0.1
| . -> 192.168.0.3 <- (Switch B)
| -> 192.168.0.1
-> 192.168.0.4 <- (Switch C)
-> 192.168.0.1

So as you can see the entry side of the switches have to have separate IPs from your main router in order to make a connection with it. But at the other side, the network address can be whatever you want your default gateway to be for each subnet. NAT translates any ip addresses going out of the switches to the ip on the side closest to your router. Each device behind the switch needs to have a separate address, but they can have the same address as the IPs on the other switches.

I don't know if this will help you with your testing, but I hope it helps! Happy

- Collapse -
but
May 1, 2016 11:22PM PDT

will the PCs in different lan be able to communicate with each other? If yes, how?

and correct me if am wrong but isn't NAT only supported by Layer 3 devices i.e a router?