This paper investigates the structure and composition of the social network formed on the campus of the Faculty of Economics and Business of Diego Portales University, Chile, exposing a series of characteristics that are aligned with similar research in the field of networks. We use a model of social networks formation in order to understand socioeconomic and academic factors that predict the formation of friendship between two students. Specifically, we test empirically our model, using students' administrative information. Of special interest is the impact of the length of stay of the students in the university, with which we refer to the years completed in the degree course, in the probability of establishing friendship ties where being socioeconomically different is a condition. The mechanism behind a result like this is the sense of belongingness that being part of the same institution may induce amongst students. By means of counterfactual simulations we found evidence in favor that passing through the university increases the probability of forming friendship networks, which can mean a kind of social capital, thus reducing socioeconomic segregation from the Chilean school system. Given the importance of this finding, we believe that policies that increase the sense of belongingness such as cultural events, leaderships programs, and community should be implemented on university campuses.