Alright branch offices are site to site VPN connections...but you're right internal users do not see that nore care about it as their traffic just goes through it. Thus the mappings for remote sites works fine.

The ones having problems are using Netmobility Netmotion clients on their computers. Virtual adapter gives them the VPN address 172.16.x.x they also have an internal ip address of 192.168.x.x. Main office is also split based on floor on the 3rd octet. So 9th floor is 192.168.9.x and 10th floor is 192.168.10.x and so on....the branch offices are also unique identified by the 3rd octet. So they would have something like 192.168.72.x etc..

Sometimes the users are in the field sometimes they are in the office. The VPN on their workstations is always connected as they do not have permission to bypass it. VPN addresses are assigned by DHCP/Address pool in the subnet 172.16.x.x. This allows them to connect anywhere...whether it be on our network or from their hotel room/aircard. Problem is this:

$subnet=VAL(SUBSTR(@IPAddress0,9,3))

If the 172.16.x.x address gives out the same 3rd octet as one of the internal addresses it will use the mapping for 192.168.Y.x where Y is the same as the 172.16.X.x. Is there possibly a way for it to bypass looking at the Virtual Adapter and just look at the local area connection address?

Let me know if I need to clairfy I suck with words...Thanks again!

P.S. I'll look up on the parsing I'm not really sure where to start with that