Is there a noun in English denoting the relation of attending the same school/class?

Is there a noun in English denoting the relation of attending the same school/class? In other words:

Being friends → friendship

Being neighbours → geographical contiguity

Attending the same school → School fellowship?

Attending the same class → Class fellowship?


Classmate

It may seem simple, but I like this option because it can be used both in the context of the same class as well as attending the same school.