Enable IP and default gateway on Network Switches

Network Switches require IP addresses to enable remote management and configuration. If IP address is not configured IP address, the network administrator can’t easily connect to the device for remote management. The remote management software and protocols, for example, Telnet, TeraTerm, SSH, HTTP, or HTTPS also required IP address for connectivity.

A network switch does not have a dedicated interface to which IP address can be assigned. Therefore, the IP address is assigned and configured on a virtual interface called a switched virtual interface also known as SVI. We can also assign a default gateway to network switches. The default gateway should be the IP address of the router interface. For example, the default gateway for switch0 is 192.168.0.1 and the 192.168.1.1 for swithc1.

We are going to assign the first available IP to the switch0 from the network 192.168.0.0/24 and also the for switch1 I am going to assign the first available IP address 192.168.1.0/24 network,

Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface Vlan1
Switch(config-if)#ip address 192.168.0.2 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip default-gateway 192.168.0.1
Switch(config)#

Do this for switch1 also and assign IP address 192.168.1.2 and the default gateway 192.168.1.2.

Please follow and like us: