We were talking DOT numbers but you list CDL in your post so I really do not understand your question. But here goes.
Farmers are only exempt from CDL rules within 150 miles of their farm and some times if that 150 miles crosses a state line this exemption is withdrawn. This exemption is allowed to the state at its desresion by federal law. In other words it is up to the state if farmers are exempt. Every state I know of allows this exemption.
The feds also allow this exemption to others like fire and police to name two.
A DOT number.
Every comercial truck over 10,000 lbs needs one. Farmers are NOT exempt as a whole.
Now with that said some states do not require a DOT # for intrastate use. Farmers or any one else that moves intrastate only does not need the number.
Some states do require a DOT # for intrastate use. The ones marked in green.
Some of these green states exempt farmers from the rule intrastate. Iowa is one of them.
All interstate use needs a DOT # farmer or not.