Use the following procedure to create OSPF hosts routes to specify which hosts are directly attached to the router, and the metrics that must be advertised for them.
Install the Advanced License.
Enable IP routing globally on the switch.
Assign an IP address to the VLAN that you want to enable with OSPF.
Routing is automatically enabled on the VLAN when you assign an IP address to it.