Random fields on a network