If you've run across this page, chances are you're looking for a way to set the default gateway on a Cisco SG300 family switch. When the switch is in layer 2 (L2) mode, it's a piece of cake. Administration -> Interface and there it is, right in front of you. (Basically...)
When the switch is set to Layer 3 (L3) however, the entire Administrative Interface option disappears completely and moves down to the IP Configuration section. That's because L3 deals with IPs, L2 deals with MACs, each port / vlan can have it's own IP yadda yadda. Point is, there is no clear Las Vegas lights flashing, in your face, obvious sign for where to add a Default Gateway. If you're a networking guru used to Ciscos catalyst switches, it's probably a no-brainer, but for the small business piddly folks like me, I was clueless. I won't go into detail as to why I needed a default gateway because 99% of people who have these switches, probably won't ever need to set a default gateway, but just in case you do, it's quite simple: "Set it in the IP Configuration -> IPv4 Routes section".
I searched for an answer to this question, but never found it. I ended up stumbling across it on my own and decided to share my findings.
1) Click IP Configuration
2) Click IPv4 Routes
3) Click the Add button
Inside the dialog popup for adding a new route, add the following settings:
Destination IP Prefix:
Next Hop Router IP Address: (Your default gateway IP address. For example:)
Metric: (This is defaulted to 1, leave it)
And that's it!
When you look at the IPv4 Static Routing Table:
|Destination IP Prefix||Prefix Length||Route Type||Next Hop Router IP Address||Route Owner||Metric||Administrative Distance||Outgoing Interface|
Notice the Route Type is set to "Default". This represents the default route to the default gateway.
Interestingly, if you use Telnet or SSH instead of the web interface, there is a command to specifically set the "default-gateway". When you use this command, it simply sets up the route as shown above.
Pretty simple once you know where and how to set it!