Networking and the Internet, from First Principles