Software Configuration Guide, Cisco IOS Release 15.2(2)E (Catalyst 2960, 2960-S, 2960-SF and 2960-Plus Switches) -Assigning the Switch IP Address and Default Gateway. In a Cisco switch, the default gateway is typically configured using the ip default-gateway command. Why Configure a Default Gateway? Configuring a default gateway on a Cisco switch is necessary.
Use the ip default-gateway command to defines a default gateway (default route). The ip default-gateway command adds the default route with metric of 4 for the gateway connected on an In-Band interface and 2 for the gateway connected on OOB. Use the no ip default-gateway ip-address command to delete one default gateway. Use the no ip default.. The question is: "Which command set the default gateway to 192.168.12.1 on a Cisco switch" that's mean an L2 switch otherwise it would say L3 Switch. Anyways, people already answered that question, only ip default-gateway x.x.x.x is the only good answer for setting up a Default Gateway.