Building topology in communications networks