0

I set up a network. It contains vlans. I assigned devices ip addresses from different subnets. I have 2 layer 3 switches to communicate them. I assigned switches ip addresses from different subnet. I assigned ip addresses to vlan 1 of switches and i used vlan 1 of layer 3 switches as default gateway for the switches. The default gateway of switches is 172.16.0.30. When i connect to 172.16.0.30 by ssh, i connect to the layer 3 switch which is on left. My question is that: How i can connect other layer 3 swith ? How can i design that network properly ? The ip addresses of layer 3 switches are the same, that's a problem. enter image description here

First Layer 3 Switch:

layer3-1#sh running-config 
Building configuration...

Current configuration : 3936 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname layer3-1
!
!
!
!
!
!
ip routing
!
!
!
!
username cisco password 0 cisco
!
!
!
!
!
!
!
!
!
!
ip ssh version 1
ip domain-name domainswitch
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Port-channel1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface Port-channel2
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface FastEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface FastEthernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/4
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/5
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/6
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/7
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/8
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/9
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/10
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/11
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/12
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/13
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/14
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/15
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/16
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/17
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/18
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/19
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/20
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/21
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/22
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/23
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/24
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 2 mode desirable
!
interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 2 mode desirable
!
interface Vlan1
 ip address 172.16.0.30 255.255.255.224
!
interface Vlan10
 mac-address 000d.bd97.0501
 ip address 172.16.0.94 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan11
 mac-address 000d.bd97.0502
 ip address 172.16.0.126 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan12
 mac-address 000d.bd97.0503
 ip address 172.16.0.190 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan13
 mac-address 000d.bd97.0504
 ip address 172.16.0.158 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan14
 mac-address 000d.bd97.0505
 ip address 172.16.0.62 255.255.255.224
 ip helper-address 172.16.0.161
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
logging trap debugging
logging 172.16.0.164
line con 0
!
line aux 0
!
line vty 0 1
 login local
 transport input ssh
 transport output ssh
line vty 2 4
 login
!
!
!
!
end

Second Layer 3 Switch

layer3-2#sh running-config 
Building configuration...

Current configuration : 4112 bytes
!
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname layer3-2
!
!
!
!
!
!
ip routing
!
!
!
!
username cisco password 0 cisco
!
!
!
!
!
!
!
!
!
!
ip ssh version 1
ip domain-name domainswitch
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface Port-channel1
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface Port-channel2
 switchport trunk encapsulation dot1q
 switchport mode trunk
!
interface FastEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface FastEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 1 mode desirable
!
interface FastEthernet0/3
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/4
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/5
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/6
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/7
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/8
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/9
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/10
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/11
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/12
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/13
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/14
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/15
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/16
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/17
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/18
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/19
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/20
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/21
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/22
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/23
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface FastEthernet0/24
 switchport trunk encapsulation dot1q
 switchport mode trunk
 shutdown
!
interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 2 mode desirable
!
interface GigabitEthernet0/2
 switchport trunk encapsulation dot1q
 switchport mode trunk
 channel-protocol pagp
 channel-group 2 mode desirable
!
interface Vlan1
 ip address 172.16.0.30 255.255.255.224
!
interface Vlan10
 mac-address 0050.0f79.3601
 ip address 172.16.0.94 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan11
 mac-address 0050.0f79.3602
 ip address 172.16.0.126 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan12
 mac-address 0050.0f79.3603
 ip address 172.16.0.190 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan13
 mac-address 0050.0f79.3604
 ip address 172.16.0.158 255.255.255.224
 ip helper-address 172.16.0.161
!
interface Vlan14
 mac-address 0050.0f79.3605
 ip address 172.16.0.62 255.255.255.224
 ip helper-address 172.16.0.161
!
ip classless
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 1
 login local
 transport input ssh
 transport output ssh
line vty 2 4
 login
!
!
!
!
end
5
  • We cannot simply guess what you did wrong. Please edit your question to add the device configurations (as text, using the {} preformatted option). Don't forget to name the ports.
    – Zac67
    Aug 27, 2023 at 9:35
  • As it seems, you‘ve configure SVIs but you haven‘t actually created the VLANs (vlan x).
    – Zac67
    Aug 27, 2023 at 10:35
  • i have created vlans on whole switches on the network
    – shiva13
    Aug 27, 2023 at 10:50
  • Not in the configs you‘ve posted above.
    – Zac67
    Aug 27, 2023 at 11:22
  • i have created, sh configuration command does not show me them
    – shiva13
    Aug 27, 2023 at 17:23

1 Answer 1

2

You have the same IP addresses on both switches. This is an invalid configuration. Each interface needs a unique IP address. If you need one gateway address for your devices, consider using a First Hop Resolution Protocol (FHRP), such as HSRP or VRRP.

2
  • thank you so much
    – shiva13
    Aug 27, 2023 at 17:44
  • @shiva13 Please don't forget accepting a valid answer to your question or it will keep popping up here forever. Please also consider voting for useful answers.
    – Zac67
    Aug 28, 2023 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.