06-26-2023 10:08 AM
Hi I have a 2960 switch, i need to set ip my 2 interface with 2 different gateway For example: Gig 1/0/23 10.10.10.10/24 default gateway : 10.10.10.1 Gig 1/0/24 20.20.20.20/24 default gateway 20.20.20.1 How can i set default gateway for each interface? Thanks
06-26-2023 10:21 AM
default gateway for SW or GW for PC connect to SW?
06-26-2023 01:45 PM - edited 06-26-2023 01:47 PM
Hello @danny62,
Could you please more elaborate?
IP default-gateway is for the switch, not interfaces. And it can be only one.
The "ip default-gateway" command is indeed used to set the default gateway for the entire switch, not for individual interfaces. On Cisco Catalyst switches, the "ip default-gateway" command is used when the switch itself needs to reach networks outside of its directly connected networks.
07-01-2023 05:53 PM
2 interface with 2 different gateway ? not possible for L2 switch; you need L3 switch with vlan and SVI where SVI performs as default gateway, plus at least 1 host per vlan so that SVI stays up;
Regards, ML
**Please Rate All Helpful Responses **
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide