Default Gateway Configuration & Cisco Layer 2 Switch IP Address

Rashmi Bhardwaj | Blog,Config & Troubleshoot

Layer 2 Switch is an indispensable part of Network setup in LAN environments. Configuration of Switch is little different from that of Router or firewall where the interfaces are Layer 3 ports and IP address needs to be assigned to the physical ports.

Contrary to Router/Firewall configuration, Layer 2 Switch has ports configured as Layer 2 which can’t be given an IP address, instead SVI (Switched Virtual Interface) needs to be assigned an IP address. Switch is assigned IP address to manage it via Telnet or SSH services.

Layer 2 switch and default gateway

Configuration of the Layer 2 Switch where a management IP address will be given to VLAN 1 and Cisco Switch Default Gateway configured –

Switch(config)# interface vlan 1Note – Vlan 1 is the native vlan and also management VLAN.Switch(config-if)# ip address no shutSwitch(config-if)# exit

Once VLAN 1 is configured with IP address, we configure the switch with default Gateway (in this case Router) IP address.


Switch(config)# ip default-gateway


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart