Routing
ip default-gateway <ip>
Set the gateway on a non-routing device (L2 switch, endpoint).
Works on: SwitchMode: config
Run this command live
Don't just read it — type ip default-gateway <ip> in a real network simulator in your browser and watch it take effect. No install, no account needed to start.
Frequently asked
What does the "ip default-gateway <ip>" command do?
Set the gateway on a non-routing device (L2 switch, endpoint).