Symptom
A device on one virtual network can reach everything on its own network and its own gateway but not a device on another; a new virtual network was added and nothing reaches it; a workstation cannot reach a controller on the control network; the failure appeared after a switch or firewall change.
The short answer
Cannot Ping Across VLANs
Traffic between two virtual networks has to be routed, and routing needs four things to line up: each device must have a correct address and mask for its own network, each must have a default gateway that is the router interface on its own network, the router must have interfaces on both networks and be permitted to forward between them, and every switch link along the way must carry both virtual networks where they are needed. Failure at any one of them produces the same symptom, a ping that goes nowhere, and the checks are done in that order from the device outward. Ping the gateway from each side first; the side that cannot reach its own gateway is the side with the problem.
Key points
- Ping the default gateway from each side first; the side that cannot reach its gateway has the local problem.
- A wrong mask makes a device think a remote address is local, so it never sends to the gateway.
- A virtual network must exist on the router, be permitted on every trunk in the path, and be assigned to the access ports.
- A firewall between the networks needs a rule for each direction and each protocol, and pings are often blocked by design.
- A controller with no default gateway answers only its own network, no matter how good the rest is.
Possible causes and what to check
| Possible cause | What to check |
|---|---|
| No default gateway on the device | The device pings its own network and nothing else; the gateway field is blank or wrong. Common on controllers and instruments configured by hand. |
| Wrong subnet mask | A mask too wide makes the target look local, so the device sends an address resolution request instead of using the gateway. Compare the mask with the network design. |
| Virtual network not on the trunk | Devices on the same virtual network on different switches cannot see each other either; the trunk allowed list omits it. Add it on both ends of every trunk in the path. |
| Virtual network not created or no router interface | The router has no interface on that network so nothing can enter or leave it. Create the interface with the gateway address the devices expect. |
| Routing disabled or no route back | The router forwards one way but the return path has no route: a second router, a device using a different gateway, an asymmetric path. Trace both directions. |
| Firewall or access list blocking | The gateway pings from both sides but the crossing fails; the firewall log shows a deny. Write the rule for the protocol and direction, and remember that ping may be blocked by policy while the protocol is allowed. |
| Access port on the wrong virtual network | The device is on a port assigned to a different network than its address; it may reach nothing at all. Check the port assignment. |
| Duplicate address on the gateway | A device configured with the gateway address by mistake; the router intermittently loses. Check the address table for two hardware addresses claiming the gateway. |
| Host firewall on the target | A workstation or server that drops pings and unsolicited connections from other networks; the crossing works to devices without one. |
The test sequence
- 1
Own address
On each device, confirm the address, mask, and gateway against the network schedule. Half of these cases end here.
- 2
Own gateway
Ping the default gateway from each device. A device that cannot reach its own gateway has a local problem: the port, the virtual network assignment, the address, or the gateway interface itself.
- 3
Far gateway
Ping the far virtual network gateway interface from each device. This crosses the router without involving the far device; if it fails, the router or a filter between the networks is the problem.
- 4
Far device
Ping the far device. If the far gateway answered and the device does not, the device has no gateway or a wrong mask, a host firewall, or a port on the wrong network.
- 5
The protocol
Ping proves reachability, not that the protocol is allowed. Test the actual connection and read the firewall log for a deny.
- 6
Both directions
A path can work one way: the reply may take a different route or be filtered. Repeat from the far side.
| Result | Points at |
|---|---|
| Cannot ping own gateway | Address, mask, port assignment, or the gateway interface is down |
| Own gateway yes, far gateway no | Router not forwarding, the far network missing on the router, or an access list |
| Far gateway yes, far device no | The far device: no gateway, wrong mask, host firewall, or wrong port |
| Works one direction only | Asymmetric routing, a filter on the return path, or a device with a different gateway |
| Same virtual network across switches fails too | The trunk does not carry the virtual network |
| Works for ping, not for the protocol | The firewall rule or the device application |
The mask problem
A device decides whether to send to the gateway by comparing the target address with its own using the mask. A device on 192.168.10.20 with a mask of 255.255.0.0 believes that 192.168.20.5 is on its own network, sends an address resolution request for it, gets no answer, and reports the target unreachable without ever trying the router. The device is wrong, the network is fine, and the mask is the fix. The same device with the mask corrected sends to the gateway and the ping crosses.
Security boundaries
On a segmented plant network, the crossing between the control network and anything else passes through a firewall on purpose, and the firewall permits only the traffic that was designed to cross. A ping that fails between zones may be doing exactly what the design intends. Before opening anything, read the zone and conduit design for what should cross, and write the rule for that protocol, that direction, and those hosts, rather than permitting ping and everything else. The firewall log shows the drop and the rule that caused it.
- Rules are written per protocol and direction; a poll from the historian to the controller is one rule, and the reply is handled by the state table.
- Ping is a diagnostic; permit it between specific management hosts and the zones if the design allows, and use the firewall log otherwise.
- A rule that is too broad to name its hosts is a segmentation failure waiting for an audit.
Frequently asked questions
- Both gateways ping from both sides, but the two devices cannot reach each other.
- Each device has a working local path and the router forwards. The remaining candidates are the far device configuration, a host firewall, and a rule that filters device-to-device traffic while permitting router interfaces. Test the protocol and read the firewall log.
- Do I need a router if I have a layer three switch?
- A layer three switch is the router in most plant networks; it has a virtual interface per network and forwards between them, subject to any access lists. The checks are the same: the interface exists, is up, has the gateway address, and forwarding is enabled.
- The ping works from the switch but not from my laptop on the same network.
- The switch is testing from its own interface, which may be on the far network. The laptop has a different address, mask, or gateway, or a host firewall. Compare the laptop configuration with a device that works.
- Can I just put everything on one virtual network?
- Not on a segmented plant network, and not without a reason. Segmentation is the security control that keeps a compromised workstation off the controllers. The crossing is designed and permitted for the traffic that needs it; making the boundary disappear is not a fix.
Related topics
- How to Configure VLANs on a Control NetworkTurn a zone plan into switch configuration: a VLAN per zone with its own subnet, access ports for devices, tagged trunks between switches, a native VLAN that carries nothing, a separate management VLAN, and routing between VLANs only through the firewall.
- How to Assign IP Addresses on a Control NetworkBuild an addressing plan before the first device is configured: one subnet per zone and site, a fixed block layout so an address says what the device is, static addresses on everything that controls a process, and a schedule that is kept current.
- VLAN SegmentationUsing VLANs to build the zones of a control network on shared switches: what a VLAN separates and what it does not, the zone-to-VLAN mapping, trunks and the native VLAN, routing only through a firewall, and where separate hardware begins.
- Zones and ConduitsThe IEC 62443 way to segment a control system: grouping assets into zones with a shared security level, inventorying every conduit between them, and turning the drawing into firewall rules. With a worked water utility example.
- Duplicate IP AddressTwo devices claiming one address: a controller that answers sometimes, a workstation that reports a conflict, a ping returning from two hardware addresses. Where duplicates come from, finding both in the switch address table, and the discipline that stops it.
- Network SchedulesThe tables behind the network drawings: the address schedule of every device, the switch port schedule of every port, the VLAN table, and the conduit list of what the firewalls permit. How they are built, kept as the single source of truth, and protected.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.