In human societies, people's willingness to compete and strive for better social status, as well as being envious of those perceived in some way superior, lead to social structures that are intrinsically hierarchical. Here, we propose an agent-based, network model to mimic the ranking behaviour of individuals and its possible repercussions in human society. The main ingredient of the model is the assumption that the relevant feature of social interactions is each individual's keenness to maximize his or her status relative to others. The social networks produced by the model are homophilous and assortative, as frequently observed in human communities, and most of the network properties seem quite independent of its size. However, we see that for a small number of agents the resulting network consists of disjoint weakly connected communities, while being highly assortative and homophilic. On the other hand, larger networks turn out to be more cohesive with larger communities but less homophilic.We find that the reason for these changes is that larger network size allows agents to use new strategies for maximizing their social status, allowing for more diverse links between them.