3

I have a situation where I need to communicate via telnet to multiple devices that have the same IP address. The context is that I am writing a "final test" of devices in a manufacturing facility. These devices go out to the customer with some default IP address and I would like to NOT change this, even temporarily, for this final test.

I'd like to know if/how this is possible to do with one host machine and preferably one router or managed-switch.

I am not super familiar with managed switches or routers. However, I know that routers support NAT (network address translation) and I know that some routers are very configurable. So would it be possible to have a setup like the following:

  • A bunch of devices plugged into the ports of a router, each with the same IP address.

  • Configuration of NAT on the router to map each of those physical ports to a unique IP on the LAN.

  • The application that interacts with the devices telnets to the unique LAN IP's.

If this is possible then what would be the right vocabulary to describe a router with those features?

  • 3
    You can't; you can do it one at a time but if multiple devices have the same address you have no control over which device will receive the packet – Ramhound Feb 25 '14 at 11:24
  • @Ramhound, If I were to do it one at a time, does there exist a switch that would allow me to programmatically "disable" specific physical ports? – Angelo Feb 25 '14 at 11:27
  • @Angelo if you mean disabling ports at the switch, then yes, but you need managed switch then. It costs more than a bunch of NICs though. – LogicDaemon Feb 25 '14 at 20:24
  • @LogicDaemon, thanks, I've modified my question to try to make my problem a little more clear. Disabling ports, on second thought, would be too much of an obstacle if I can get it work some other way. – Angelo Feb 25 '14 at 22:13
  • The only way would be static APR address. However, Telnet is a TCP/IP application. So setting a device's or devices' MAC to a "fake" IP on a managing system via static APR will not work. – SgtOJ Feb 26 '14 at 0:01
5

You could do this with a multiport router that supports NAT but it would take alot of time to configure properly and a router with alot of ports gets expensive.

You could put each port in the switch in a different vlan and then add virtual vlan interfaces on the router. Then you could ping each device from the router specifying the virtual vlan interface as the source. Still alot of work.

  • Thanks, that sounds promising, I will look into it and then accept your answer. Some amount of configuration work and expense is not a problem. In my application that would be preferable to what is done now-- manually swapping ethernet cables. Are you suggesting two separate solutions? – Angelo Feb 27 '14 at 2:28
  • Actually not so much work if you enable VLAN on the port to the host from the switch, configure all other ports as untagged, and add VLAN devices on the host side (easy to do in e.g. Linux) and add a few iptables rules. – dirkt Sep 24 '17 at 13:35
3

If you weren't set on the 'one router' requirement, several small SOHO-grade routers could be configured all with the same LAN-side settings, to which you'd attach your equipment to be tested, one to each router. The WAN side could then be addressed either on its own private network, or your office LAN's network. Port forwarding could be easily set up on each small router, that if addressed in a mnemonic fashion, you would access device #1 by telnetting to A.B.C.101; device #2 A.B.C.102, ... DNS could even be set up to further simplify the testing environment.

Each small router would only have to be configured once. Each device to be tested can be left connected for as long as required, and no devices need have their configuration changed throughout the test, ensuring that the test environment is stable, and minimal time is spent debugging network issues.

2

The same IP address can't be used on the same network. It will be flash the IP conflict message for each device where you configure the conflicted IP address

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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