Learning links and routes