2

I have a network topology according the picture below. The first computer is conected to computer 2 through network adapter with IP 10.44.12.112. I need comunicate with the computer 1 with PLC, but the IP 10.44.12.215 can not ping the IP 10.44.12.150. I have tryed add the route manually, enabled on the IPEnableRouter regedit, but the computer 1 still not communicating with one PLC. The computer 2 communicate both devices, computer and PLC 1. How can I solve this problem without a router? Thank you so much, Haroldo

Computer 1- ESXi          Computer 2- Windows 7                     PLC
| 10.44.12.216  |  ------   | 10.44.12.112  | ------------- | 10.44.12.150  |
|255.255.255.0  |           | 255.255.255.0 |               | 255.255.255.0 |
| 10.44.12.111  |           |  10.44.12.111 |

                            | 10.44.12.111  |
                            | 255.255.255.0 |
2
  • You have what I assume is a typo: your text mentions "215" but your diagram shows "216". Oct 22, 2014 at 17:06
  • Sorry, I'm wrong. The correct is 216 as shown on diagram.
    – Backhar
    Oct 23, 2014 at 18:46

2 Answers 2

1

The network is configured wrong: since all 3 devices are logically in the same subnet 10.44.12.0/24, computer 1 won't consider any routing when trying to access PLC. It simply puts the data with destination PLC to the cable, which will be ignored by PC2.

You can

  1. use a ethernet switch to connect all 3 devices, or
  2. change the subnet between PC2 and PLC to another IP addresses such as 10.44.13.x and set the routes manually.
2
  • I will try the option 2. I have no switch and I need of PC 2 communicating with PC 1 and PLC. Can I use the IP 10.44.12.111 as gateway?
    – Backhar
    Oct 23, 2014 at 18:49
  • Use 10.44.12.111 as Gateway on PC1. Enter the IP of PC2 on network 2 as Gateway for PLC. Oct 23, 2014 at 19:01
1

I have exactly this topology, including the PLC. Normally I have computers 1 and 2 connected to a physical router with different subnets involved. I then turn computer 2 into a software router and manually add a route to the computer 2<->PLC subnet on computer 1. But this does work fine all on the same subnet without a physical router. You need to:

  1. Turn computer 2 into a router via the IPEnableRouter setting
  2. Set computer 2-nic1 as the gateway for the NIC on computer 1
  3. Fix the route Windows creates on computer 1
  4. Add a reciprocal route to computer 1 on computer 2

Two things that may have been tripping you up are that win7's firewall by default blocks ICMP packets, and you have to restart after applying the IPEnableRouter setting. So you may think you have no connectivity once you configured everything correctly. Add an exception for ICMPv4 echo reply packets to get ping replies. Restart to apply the IPEnableRouter setting.

NIC configuration

     Computer 1- win7             Computer 2- win7 nic1
ip   |192.168.100.5| ---x-over--- |192.168.100.6|
mask |255.255.255.0|              |255.255.255.0|
gate |192.168.100.6|              |             |

                                  Computer 2- win7 nic2         PLC (w/internal switch)
                             ip   |192.168.100.1| ------------- |192.168.100.2|
                             mask |255.255.255.0|               |255.255.255.0|
                             gate |             |               |             |

1. Turn computer 2 into a router via the IPEnableRouter setting

Edit the registry of computer 2, setting the following value:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter (DWORD) = 1

Make sure you reboot. This tripped me up for a while when I first set this up.

2. Set computer 2-nic1 as the gateway for the NIC on computer 1

I used the interface's IPv4 GUI config page to do this.

3. Fix the route Windows creates on computer 1

Windows will automatically set these routes when you configure the nic as documented in my topology.

Network Destination    Netmask         Gateway     Interface     Metric
192.168.100.0    255.255.255.0         On-link     192.168.100.5    276
192.168.100.5  255.255.255.255         On-link     192.168.100.5    276

On the surface, that seems like those should suffice. But that 192.168.100.0 route needs to specify 192.168.100.6 as the gateway. If computer 1 only has 1 nic, you can change it like this:

route change 192.168.100.0 mask 255.255.255.0 192.168.100.6

If computer 1 has more than 1 nic you need to specify the correct interface. Use arp -a to get the interface ID (in my case, 0xb):

route change 192.168.100.0 mask 255.255.255.0 192.168.100.5 if 0xb

Resulting computer 1 routes:

Network Destination    Netmask         Gateway     Interface     Metric
192.168.100.0    255.255.255.0    192.168.100.6    192.168.100.5     21
192.168.100.5  255.255.255.255         On-link     192.168.100.5    276

4. Add a reciprocal route to computer 1 on computer 2

route add 192.168.100.5 mask 255.255.255.255 192.168.100.6

Computer 2 resulting routes:

Network Destination    Netmask         Gateway     Interface     Metric
192.168.100.0  255.255.255.0           On-link     192.168.100.1    276
192.168.100.0  255.255.255.0           On-link     192.168.100.6    276
192.168.100.1  255.255.255.255         On-link     192.168.100.1    276
192.168.100.5  255.255.255.255         On-link     192.168.100.6     21
192.168.100.6  255.255.255.255         On-link     192.168.100.6    276

With this configuration, all 3 devices can communicate with eachother. I will reiterate that you need to unblock ICMP echo reply packets in win7 firewall to see pings. Note that these routes are not persistent following reboots, but you can look up the additional commands to do that.

1
  • Sorry I didn't translate my configuration to yours. I have never played with network configuration with ESXi so step 3 will obviously be different for your scenario.
    – noobish
    Dec 20, 2014 at 2:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .