speedometer not working

i have a cx100 tractor and the speedometer is not working what happens is when driving the speedometer goes up to 8 mph ok and then it jumps to 15 mph 20 mph 9mph 30 mph and so on does any know what is wrong r does any know where the speedometer picks up the speed from thank for any help