Determine shared ip from table instead of flag

Partially-implements blueprint better-support-for-multiple-networks

Change-Id: Id7c6620704fef504d23cb42c5218251fa9e2dba7
Merge "Determine shared ip from table instead of flag"