Hello Jack,
What type switch are you referring to? Can you provide us more information regarding your query so we can research further?
An example of that will be the 3750 and 3560 family of switches which include OSPF feature with the IP Services license. The IOS license is perpetual and does not need to be renewed.
Best Regards,
Wilson
Cisco Virtual Engineering