cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1418
Views
6
Helpful
20
Replies

How to configure STP in Cisco?

abbas64
Level 1
Level 1

Hi,

I am configuring a small network with one router (also a DHCP server), 5 switches. All switches are connected to each other Gigabitethernet.

I have configured VLANs on the switches and configured DHCP pools on the router. I have also configured one router to act as root switch or root bridge using following command:

Root switch does not have any VLANs configured. Other switches have VLAN configured with IP addresses assigned.

spanning-tree vlan 1 root primary

The problem is I can't ping any computer or a switch from another switch. All switches are directly connected to each other, but I still can't ping.

I have attached an image of my network topology.

I am using 2960 switches.

20 Replies 20

Ok, I have marked the additions in bold.

All client switches need their GigabitEthernet0/1 ports configured like this.

"Show running-config" from core switch:

Switch#show running-config

Building configuration...

Current configuration : 529 bytes

!

version 12.1

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Switch

!

!

!

spanning-tree mode pvst

spanning-tree vlan 1,5,10,15,20,25,30 priority 24576

!

interface GigabitEthernet0/1

!

interface GigabitEthernet1/1

!

interface GigabitEthernet2/1

--> switchport mode trunk

--> switchport nonegotiate

!

interface GigabitEthernet3/1

--> switchport mode trunk

--> switchport nonegotiate

!

interface GigabitEthernet4/1

--> switchport mode trunk

--> switchport nonegotiate

!

interface GigabitEthernet5/1

--> switchport mode trunk

--> switchport nonegotiate

!

interface Vlan1

no ip address

shutdown

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

----------------------------------------------------------------------------------

"show running-config" from client switch:

Switch#show running-config

Building configuration...

Current configuration : 1618 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname Switch

!

!

!

!

!

spanning-tree mode pvst

!

interface FastEthernet0/1

switchport access vlan 10

!

interface FastEthernet0/2

switchport access vlan 15

!

interface FastEthernet0/3

switchport access vlan 20

!

interface FastEthernet0/4

switchport access vlan 25

!

interface FastEthernet0/5

switchport access vlan 30

!

interface FastEthernet0/6

switchport access vlan 5

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

switchport mode trunk

!

interface GigabitEthernet0/1

--> switchport mode trunk

--> switchport nonegotiate

!

interface GigabitEthernet0/2

switchport mode trunk

!

interface Vlan1

no ip address

shutdown

!

interface Vlan5

ip address 195.165.85.33 255.255.255.224

!

interface Vlan10

ip address 195.165.85.65 255.255.255.224

!

interface Vlan15

ip address 195.165.85.97 255.255.255.224

!

interface Vlan20

ip address 195.165.85.129 255.255.255.224

!

interface Vlan25

ip address 195.165.85.161 255.255.255.224

!

interface Vlan30

ip address 195.165.85.193 255.255.255.224

!

!

!

!

line con 0

!

line vty 0 4

login

line vty 5 15

login

!

!

end

I have tried what you said, but I am still where I was. Anyways thanks a lot for helping me. I guess I will do more research on the internet until I get my network to work. Thanks

Hello,

I was looking at your cdp output again: are ALL 5 switches 2960 switches ? The thing is, the 2960 does not support IP routing. That means you will not be able to communicate between different VLANs. You need something called 'router on a stick', which basically means you connect a layer 3 device such as a router or a layer 3 capable switch to you core switch through a trunk, and that layer 3 device does the inter VLAN routing.

In order to at least ping the switches, use VLAN 1 and assign IP addresses from the same subnet to the VLAN 1 interfaces on the switches.

You are right. All switches are 2960-24TT. If I use router on a stick scenario I would have to configure VLANs on the root switch and from what I understand I can't have VLANs and trunking configured on same interfaces.  

You are right, you would configure the VLANs in the VLAN database on the core switch. You then connect one of the core switch ports to one of the router ports. The port that is connected to the router indeed does not belong to a VLAN, since it is a trunk port.

Check the link below for a sample setup and configuration:

https://learningnetwork.cisco.com/docs/DOC-23481

ahmedshoaib
Level 4
Level 4

Hi;

Can you share the model of switches which you are using on your network?

Idealy all the SVI should be either create on Core Switch (if you have L3 supported switch) or configure on Router.

In the output you shared which shows your client have SVI, which is not recommended solution. 

Thanks & Best regards;

Review Cisco Networking products for a $25 gift card