Need assistance building a pattern based model

Here's the scenario: I want to build a pattern based model to relate a Location CI to a Node based on the IP address that's currently related to the Node.

An example would be all nodes in the 192.168.1.* range belong to Data Center A (which would be a created Location CI). I have a Node related to IP address so it needs to add a relationship from the Node to Data Center A.

Any guidance would be greatly appreciated.