Cisco Switch IPv4 SSH Layer3 – How to Assign a Static IP to a Cisco Layer 3 Switch for SSH Connection

ciscoipv4layer3sshswitch

The steps of this manual have been executed in order to configure SSH.

Once SSH has been configured, how to access the switch from a computer using SSH?

The following steps have been executed in order to assign an IP to a switch and subsequently connect to it.

An IP has been assigned to a Cisco Layer3 switch.

interface FastEthernet0
 ip address 20.40.60.80 255.255.255.0
!

A computer (20.40.60.81/24) is connected to Gi0/1

interface GigabitEthernet0/1
!

However, neither from the switch to the computer nor vice versa a ping is successful.

Best Answer

interface FastEthernet0
  switchport
  switchport mode access
  switchport access vlan 1
!
interface GigabitEthernet0/1
  switchport
  switchport mode access
  switchport access vlan 1
!
interface vlan 1
  ip address 20.40.60.80 255.255.255.0
!

This should be the bare minimum configuration to get your scenario working, at least some IP connectivity.

The reason it is not working right now is because those two interfaces are in separate broadcast domains, isolating one Ethernet data-link from another. The above configuration assigns the IP address to the SVI in VLAN 1 and places both ports into VLAN 1.

Also, the default configuration applied to Ethernet interfaces would work as well...

!
default interface FastEthernet0
default interface GigabitEthernet0/1
!