We propose a model to analyze the decisions taken by an Autonomous System (AS) when joining the Internet. We first define a realistic model for the interconnection costs incurred and then we use this cost model to perform a game theoretic analysis of the decisions related to the creation of new links in the Internet. The proposed model doesn't fall into the standard category of routing games, hence we devise new tools to solve it by exploiting peculiar properties of our game. We prove analytically the existence of multiple equilibria for specific cases, and provide an algorithm to compute the stable ones. The analysis of the model's outcome highlights the existence of a Price of Anarchy (PoA) and a Price of Stability (PoS), originated by the non-cooperative behavior of the ASes, which optimize their cost function in a selfish and decentralized manner. We further observe the presence of competition between the facilities providing either transit or peering connectivity, caused by the cost differences between these two interconnection strategies.