Let the graph have n vertices. Degree of these vertices could range between 0 and n-1. If this maximum possible range is considered, all n vertices could have different degrees, however it is not possible that a graph could have two nodes one with degree 0 and the other with degree n-1. Hence degrees would have restricted range and then owing to Pigeon hole principle, there must be at least two vertices with the same degree.