We faced an issue:
Access switch uplink interface was configured first as port type network, and as soon as we entered port type network and guard root on the Core switch towards the access switch, the vlans got blocked.
Environment
Core switch acting as the STP Root Bridge.
Access switches deployed as a vPC pair.
STP mode: Rapid PVST+
Multiple uplinks between Core and Access layers.
Configuration
Access switch uplinks
LANSWA-101/102
interface po1301
spanning-tree port type network
on Core interfaces towards access
LANCOR-001
interface po1301
spanning-tree port type network
spanning-tree guard root
LANCOR-002
interface po1301
spanning-tree port type network
spanning-tree guard root
Based on the information you shared, I can make some assumptions and come up with a possible cause of the problem. This is just an educated guess, but it may help you in your troubleshooting process.
I believe the VLANs were most likely blocked by Bridge Assurance rather than Root Guard.
When you configure spanning-tree port type network, it enables Bridge Assurance on that link. Bridge Assurance expects both ends of the point-to-point link to be configured as port type network and to continuously exchange BPDUs.
Because the access side was configured first, it temporarily did not receive the expected Bridge Assurance BPDUs from the core, so the VLANs were placed into a Bridge Assurance inconsistent/blocking state.
Root guard would only block the VLANs if the core received a superior BPDU, in which case the port would show as root-inconsistent.
You can use the following commands to examine the cause in more detail:
show spanning-tree inconsistentports
show spanning-tree vlan <vlan-id>
show spanning-tree interface port-channel1301 detail
If the status is BA-inconsistent, Bridge Assurance caused it. If it is root-inconsistent, root guard received superior BPDUs.
When you attempt to reapply the configuration, you should configure spanning-tree port type network consistently on both ends and verify that the core is the STP root for all affected VLANs. Make sense? Let us know how you get along!