  Measuring similarity between IP addresses is an important task in the daily
operations of any enterprise network. Applications that depend on an IP
similarity measure include measuring correlation between security alerts,
building baselines for behavioral modelling, debugging network failures and
tracking persistent attacks. However, IPs do not have a natural similarity
measure by definition. Deep Learning architectures are a promising solution
here since they are able to learn numerical representations for IPs directly
from data, allowing various distance measures to be applied on the calculated
representations. Current works have utilized Natural Language Processing (NLP)
techniques for learning IP embeddings. However, these approaches have no proper
way to handle out-of-vocabulary (OOV) IPs not seen during training. In this
paper, we propose a novel approach for IP embedding using an adapted graph
neural network (GNN) architecture. This approach has the advantages of working
on the raw data, scalability and, most importantly, induction, i.e. the ability
to measure similarity between previously unseen IPs. Using data from an
enterprise network, our approach is able to identify similarities between local
DNS servers and root DNS servers even though some of these machines are never
encountered during the training phase.
