Fundamentals of Routesetting