is it legal to bike on highways/freeways

i was planning a bike ride across the route 158 in matsumoto to takayama and doing a loop from the route 156 and back, planning to stay at camps along the way.

this might be a stupid question so pardon me, but from various sources i havent been confident on the legality of it all and id hate to get some kind of ticket atop it all.

is biking on those kinds of highways/freeways legal?
(not talking about the toll highways)

edit: routes is more likely the term rather highway/freeways

by Active-Aioli-9808