This is reason #1 to not use Perspective for fixed-location HMIs. The code you are trying to run (in Perspective) actually runs in the gateway, which won't have any insight into the client's route tables.
Vision can do this, and can interrogate more reliable unique info, like local MAC addresses.