Static Routing Configuration – How to Configure Between Two Layer 3 Switches

layer3routingswitchvlan

I have two Cisco layer 3 switches. In switch 1, I created two vlans, 10.10.1.0/24 and 10.10.2.0/24. The connection is shown in the figure.

  • PC 1 and PC 2 have static IP address (10.10.1.5 and 10.10.2.5)
  • switch 2 is connected to switch 1 through vlan 2
  • DHCP pool is not activated in both switch 1 and 2

To let PC 1 and PC 2 communicate with each other (for example, use ping to verify), I should configure static route in switches, right? How to configure this?

enter image description here

Best Answer

Looking at your setup, you don't need any static routing as PC2 is on a network which has it's default gateway on Switch 1. As both networks are terminated on Switch1, Switch 1 knows about both networks, so can route between them. You just need to ensure the default gateway for PC1 is 10.10.1.1 and for PC2, 10.10.2.1. Ensure VLAN 2 is trunked to Switch 2 and PC2 switchport is an access port on VLAN 2. Make sure PC2 can ping its default geteway, then you should be OK