PAN ID best practices

We want to configure our devices and gateways with a custom PAN ID, so that devices connect to our gateways only. However, in some installations we may have gateways that are within radio range of each other and devices. This would suggest the gateways should have different PAN IDs. How do we reconcile these seemingly conflicting requirements?