{
    "id": "7bc912a8-c873-4ec7-aee9-23550790542d",
    "name": "Manipulating Rapid-PVST",
    "slug": "manipulating-rapid-pvst",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "601e6ec7-4f81-443d-ad77-37efe9a587cf"
        ],
        "pta_sdn": "293",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2022-08-02T15:59:08.600213Z",
    "modified": "2024-05-17T14:46:09.337767Z",
    "is_beta": false,
    "lab_objectives": [],
    "main_learning_area": "e73fd5a8-2ead-4159-9a25-38b50ad4ab20",
    "learning_areas": [
        {
            "id": "e73fd5a8-2ead-4159-9a25-38b50ad4ab20",
            "name": "Networking",
            "slug": "networking"
        }
    ],
    "categories": [],
    "tags": [],
    "difficulty": null,
    "is_web_access": false,
    "is_lab_experience": false,
    "is_featured": false,
    "cve": null,
    "severity": null,
    "year": null,
    "external_url": "",
    "solution_video": null,
    "explanation_video": null,
    "description": "This lab enhances Spanning-Tree Protocol (STP) by modifying port priority and costs. It assists in configuring switches for optimal root port selection and verifies the effectiveness of the adjustments.",
    "description_html": "",
    "tasks": "![description](https://assets.ine.com/content/labs/networking-labs/Task1-8/diagram.png)\n\n\n**Helpful Hints about INE\u2019s virtual lab environment:**\n\n- Save your configuration changes frequently in the event that you get locked out of a device or lose connectivity\n- If you are suddenly logged out of the GNS3 lab environment and log back in again, you may see the prompt, \u201cAnother GNS3 instance is running, continue? (Y/N)\u201d.  Select \u201cYes\u201d\n- If you ever lose console access to one (or more) of your devices you will need to reboot the Ubuntu Virtual Machine that is hosting your GNS3 lab environment.  To do this,\n    - Minimize your GNS3 window\n    - Open the \u201cTerminal\u201d app within the Ubuntu device\n\n    ![description](https://assets.ine.com/content/labs/networking-labs/Task1-8/terminal.png)\n\n    - Type \u201creboot\u201d within the Terminal window\n    - Wait 20-30 seconds and then click the \u201cReconnect\u201d option to log back in.\n\n\n**Task: Optimizing Spanning-Tree**\n\n1. View the output of \"**show interfaces status**\" on all three switches.\n    - Compare the output against the links shown in the topology diagram.\n    - If any of your inter-switch links are down, enable them.\n    - Verify that all inter-switch links are operating as VLAN Trunks (802.1q or ISL doesn't matter) and that VLAN-1 is allowed on all trunks.\n    - Links connecting to routers don't matter in this task.\n\n2. Configure Sw2 as the STP Root Bridge for VLAN-1.\n        - You must accomplish this task by manually reducing the STP Bridge-Priority value to something less than 8000.\n\n3. Modify some configurable value in your topology so that Sw1 elects Gig1/1 as its root port for VLAN-1.\n   - You are not allowed to modify any STP port cost values for this step.\n\n4. Modify some configurable value in your topology so that Sw3 elects Gig3/2 as its root port for VLAN-1.",
    "tasks_html": "<p><img alt=\"description\" src=\"https://assets.ine.com/content/labs/networking-labs/Task1-8/diagram.png\" /></p>\n<p><strong>Helpful Hints about INE\u2019s virtual lab environment:</strong></p>\n<ul>\n<li>Save your configuration changes frequently in the event that you get locked out of a device or lose connectivity</li>\n<li>If you are suddenly logged out of the GNS3 lab environment and log back in again, you may see the prompt, \u201cAnother GNS3 instance is running, continue? (Y/N)\u201d.  Select \u201cYes\u201d</li>\n<li>\n<p>If you ever lose console access to one (or more) of your devices you will need to reboot the Ubuntu Virtual Machine that is hosting your GNS3 lab environment.  To do this,</p>\n<ul>\n<li>Minimize your GNS3 window</li>\n<li>Open the \u201cTerminal\u201d app within the Ubuntu device</li>\n</ul>\n<p><img alt=\"description\" src=\"https://assets.ine.com/content/labs/networking-labs/Task1-8/terminal.png\" /></p>\n<ul>\n<li>Type \u201creboot\u201d within the Terminal window</li>\n<li>Wait 20-30 seconds and then click the \u201cReconnect\u201d option to log back in.</li>\n</ul>\n</li>\n</ul>\n<p><strong>Task: Optimizing Spanning-Tree</strong></p>\n<ol>\n<li>\n<p>View the output of \"<strong>show interfaces status</strong>\" on all three switches.</p>\n<ul>\n<li>Compare the output against the links shown in the topology diagram.</li>\n<li>If any of your inter-switch links are down, enable them.</li>\n<li>Verify that all inter-switch links are operating as VLAN Trunks (802.1q or ISL doesn't matter) and that VLAN-1 is allowed on all trunks.</li>\n<li>Links connecting to routers don't matter in this task.</li>\n</ul>\n</li>\n<li>\n<p>Configure Sw2 as the STP Root Bridge for VLAN-1.\n        - You must accomplish this task by manually reducing the STP Bridge-Priority value to something less than 8000.</p>\n</li>\n<li>\n<p>Modify some configurable value in your topology so that Sw1 elects Gig1/1 as its root port for VLAN-1.</p>\n</li>\n<li>\n<p>You are not allowed to modify any STP port cost values for this step.</p>\n</li>\n<li>\n<p>Modify some configurable value in your topology so that Sw3 elects Gig3/2 as its root port for VLAN-1.</p>\n</li>\n</ol>",
    "published_date": "2019-10-15T18:00:00Z",
    "solutions": "**Solutions:**\n\nIn this task, we are asked to configure port priority and STP port costs to change the default root port elections. Port priority is always configured on Designated Ports to influence directly-connected downstream neighbors. STP cost can be modified on the local switch to influence the desired root port election but sometimes must also be modified on other, upstream switches that sit between you and the STP Root Bridge.\n\nUntil we configure things like port priority and cost, the STP gives preference to the lowest port priority among the uplinks that are connected to the same upstream bridge (assuming all STP costs are equal). If there are multiple upstream bridges, the STP will elect the root port based on the lower bridge identifier among the upstream bridges.\n\nLet's configure the switches according to the task requirements. This solution assumes that the prerequisites (stated in Task step-1) have been completed.\n\nBelow we ensure that Sw2 is the Root Bridge for VLAN-1:\n\n```\n    Sw2#conf t\n    Enter configuration commands, one per line.  End with CNTL/Z.\n    Sw2(config)#spanning-tree vlan 1 priority 4096\n    Sw2(config)#end\n    Sw2#\n    *Jul 27 21:13:12.890: %SYS-5-CONFIG_I: Configured from console by console\n    Sw2#show spanning-tree vlan 1\n    VLAN0001\n      Spanning tree enabled protocol rstp\n      Root ID    Priority    4097\n                 Address     0ce1.3ae3.0000\n                 This bridge is the root\n                 Hello Time   2 sec  Max Age 20 sec  Forward     Delay 15 sec\n```\n\nLet's focus on Sw1 first.  At present, it has three equal-cost paths to reach the STP Root (Gig1/0, 1/1 and 1/2). Because of this, it will look at the BPDUs it is receiving on each of these ports and compare the Port-ID values in those incoming BPDUs. All of those BPDUs will contain the same Port-Priority values (of 128) which can be seen in the output of \"***show spanning-tree vlan 1***\" on Switch-2 (the switch that is transmitting the BPDUs received by Sw1).\n\nHowever Sw2's interface Gig1/0 has the lowest overall sending Port-ID when we compare the total of its Port-Priority along with its Port-ID value (128.5 is lower than 128.6 or 128.7):\n\n![description](https://assets.ine.com/content/labs/networking-labs/Task1-8/port-id.png)\n\nBecause of this, Sw1 will naturally select interface Gig1/0 as its Root Port.\n\nBecause we are informed we are not allowed to change STP portcost values for this step, the only other option available is to go to the upstream switch (Switch-2) and reduce the STP Port-priority value for Gig1/1.  This will cause the downstream switch (Sw1) to select Gig1/1 as its STP Root Port and thus meet our objective:\n\n\nChanging the STP Port-Priority value for Gig1/1 on Switch-2. **Remember that Port-Priority values must be in increments of 16**:\n\n<pre><code>\n    <b>Sw2</b>#conf t\n    Enter configuration commands, one per line.  End with CNTL/Z.\n    Sw2(config)#interface gig1/1\n    Sw2(config-if)#<b>spanning-tree vlan 1 port-priority 112</b>\n    Sw2(config-if)#end\n\n</pre></code>\n\nVerifying that Sw1 is now using Gig1/1 as its new STP Root Port:\n\n<pre><code>\n    <b>Sw1#show spanning-tree vlan 1 root</b>\n\n                                            Root    Hello Max Fwd\n    Vlan                   Root ID          Cost    Time  Age Dly      <b>Root Port</b>\n    ---------------- -------------------- --------- ----- --- ---  -----    -------\n    VLAN0001          4097 0ce1.3ae3.0000         4    2   20  15      <b>Gi1/1</b>           \n    Sw1#\n\n</pre></code>\n\nFor our final task (ensuring that Sw3 uses Gig3/2 as its STP Root Port) we must modify STP port cost values so that the ENTIRE PATH from Sw3:GiG3/2 through Sw1 to Sw2 is a lower cumulative value than its current Root Port.\n\nWe can see below that Sw3 is currently selecting Gig2/0 as its STP Root Port with a total cost of \"**4**\":\n\n<pre><code>\n    <b>Sw3#show spanning-tree vlan 1 root</b>\n\n                                            <b>Root</b>    Hello Max Fwd\n    Vlan                   Root ID          <b>Cost</b>    Time  Age     Dly  <b>Root Port</b>\n    ---------------- -------------------- --------- ----- --- ---  -----    -------\n    VLAN0001          4097 0ce1.3ae3.0000         <b>4</b>    2   20      15  <b>Gi2/0</b>           \n    Sw3#\n</pre></code>\n\nSo we must make Sw3 believe that the total, aggregate cost to reach Sw2 (the STP Root) via Gig3/2 is lower than 4. There are a couple of ways we could accomplish this. If we wish to limit our configuration to only Sw3 these are the steps we must follow:\n   - We must raise/increase the costs of ports 2/0, 2/1 and 2/2 sufficiently that Sw3 will never choose these ports as its STP Root Port for VLAN-1\n   - We must lower the cost of port 3/2 to something lower than the current costs on 3/0 and 3/1\n\n<pre><code>\n    Sw3#conf t\n    Enter configuration commands, one per line.  End with CNTL/Z.\n    Sw3(config)#<b>interface range gig 2/0 - 2</b>\n    Sw3(config-if-range)#<b>spanning-tree vlan 1 cost 55</b>\n    Sw3(config-if-range)#exit\n    Sw3(config)#<b>int gig 3/2</b>\n    Sw3(config-if)#<b>spanning-tree vlan 1 cost 1</b>\n    Sw3(config-if)#end\n    Sw3#\n\n</pre></code>\n\nNote that in this configuration the portcost value of \"55\" that was assigned to ports 2/0 - 2 was just a random number that was selected. It could have been anything as long as it was larger than the total cost value of your preferred path through Gig3/2.\n\n**Validation**\n\n<pre><code>\n    Sw3#<b>show spanning-tree vlan 1 root</b>\n\n                                            <b>Root</b>    Hello Max Fwd\n    Vlan                   Root ID          <b>Cost</b>    Time  Age     Dly  <b>Root Port</b>\n    ---------------- -------------------- --------- ----- --- ---  -----    -------\n    VLAN0001          4097 0ce1.3ae3.0000         <b>5</b>    2   20      15  <b>Gi3/2</b>           \n    Sw3#\n\n</pre></code>",
    "solutions_html": "<p><strong>Solutions:</strong></p>\n<p>In this task, we are asked to configure port priority and STP port costs to change the default root port elections. Port priority is always configured on Designated Ports to influence directly-connected downstream neighbors. STP cost can be modified on the local switch to influence the desired root port election but sometimes must also be modified on other, upstream switches that sit between you and the STP Root Bridge.</p>\n<p>Until we configure things like port priority and cost, the STP gives preference to the lowest port priority among the uplinks that are connected to the same upstream bridge (assuming all STP costs are equal). If there are multiple upstream bridges, the STP will elect the root port based on the lower bridge identifier among the upstream bridges.</p>\n<p>Let's configure the switches according to the task requirements. This solution assumes that the prerequisites (stated in Task step-1) have been completed.</p>\n<p>Below we ensure that Sw2 is the Root Bridge for VLAN-1:</p>\n<pre class=\"codehilite\"><code>    Sw2#conf t\n    Enter configuration commands, one per line.  End with CNTL/Z.\n    Sw2(config)#spanning-tree vlan 1 priority 4096\n    Sw2(config)#end\n    Sw2#\n    *Jul 27 21:13:12.890: %SYS-5-CONFIG_I: Configured from console by console\n    Sw2#show spanning-tree vlan 1\n    VLAN0001\n      Spanning tree enabled protocol rstp\n      Root ID    Priority    4097\n                 Address     0ce1.3ae3.0000\n                 This bridge is the root\n                 Hello Time   2 sec  Max Age 20 sec  Forward     Delay 15 sec</code></pre>\n\n<p>Let's focus on Sw1 first.  At present, it has three equal-cost paths to reach the STP Root (Gig1/0, 1/1 and 1/2). Because of this, it will look at the BPDUs it is receiving on each of these ports and compare the Port-ID values in those incoming BPDUs. All of those BPDUs will contain the same Port-Priority values (of 128) which can be seen in the output of \"<strong><em>show spanning-tree vlan 1</em></strong>\" on Switch-2 (the switch that is transmitting the BPDUs received by Sw1).</p>\n<p>However Sw2's interface Gig1/0 has the lowest overall sending Port-ID when we compare the total of its Port-Priority along with its Port-ID value (128.5 is lower than 128.6 or 128.7):</p>\n<p><img alt=\"description\" src=\"https://assets.ine.com/content/labs/networking-labs/Task1-8/port-id.png\" /></p>\n<p>Because of this, Sw1 will naturally select interface Gig1/0 as its Root Port.</p>\n<p>Because we are informed we are not allowed to change STP portcost values for this step, the only other option available is to go to the upstream switch (Switch-2) and reduce the STP Port-priority value for Gig1/1.  This will cause the downstream switch (Sw1) to select Gig1/1 as its STP Root Port and thus meet our objective:</p>\n<p>Changing the STP Port-Priority value for Gig1/1 on Switch-2. <strong>Remember that Port-Priority values must be in increments of 16</strong>:</p>\n<pre><code>\n    <b>Sw2</b>#conf t\n    Enter configuration commands, one per line.  End with CNTL/Z.\n    Sw2(config)#interface gig1/1\n    Sw2(config-if)#<b>spanning-tree vlan 1 port-priority 112</b>\n    Sw2(config-if)#end\n\n</pre>\n\n<p></code></p>\n<p>Verifying that Sw1 is now using Gig1/1 as its new STP Root Port:</p>\n<pre><code>\n    <b>Sw1#show spanning-tree vlan 1 root</b>\n\n                                            Root    Hello Max Fwd\n    Vlan                   Root ID          Cost    Time  Age Dly      <b>Root Port</b>\n    ---------------- -------------------- --------- ----- --- ---  -----    -------\n    VLAN0001          4097 0ce1.3ae3.0000         4    2   20  15      <b>Gi1/1</b>           \n    Sw1#\n\n</pre>\n\n<p></code></p>\n<p>For our final task (ensuring that Sw3 uses Gig3/2 as its STP Root Port) we must modify STP port cost values so that the ENTIRE PATH from Sw3:GiG3/2 through Sw1 to Sw2 is a lower cumulative value than its current Root Port.</p>\n<p>We can see below that Sw3 is currently selecting Gig2/0 as its STP Root Port with a total cost of \"<strong>4</strong>\":</p>\n<pre><code>\n    <b>Sw3#show spanning-tree vlan 1 root</b>\n\n                                            <b>Root</b>    Hello Max Fwd\n    Vlan                   Root ID          <b>Cost</b>    Time  Age     Dly  <b>Root Port</b>\n    ---------------- -------------------- --------- ----- --- ---  -----    -------\n    VLAN0001          4097 0ce1.3ae3.0000         <b>4</b>    2   20      15  <b>Gi2/0</b>           \n    Sw3#\n</pre>\n\n<p></code></p>\n<p>So we must make Sw3 believe that the total, aggregate cost to reach Sw2 (the STP Root) via Gig3/2 is lower than 4. There are a couple of ways we could accomplish this. If we wish to limit our configuration to only Sw3 these are the steps we must follow:\n   - We must raise/increase the costs of ports 2/0, 2/1 and 2/2 sufficiently that Sw3 will never choose these ports as its STP Root Port for VLAN-1\n   - We must lower the cost of port 3/2 to something lower than the current costs on 3/0 and 3/1</p>\n<pre><code>\n    Sw3#conf t\n    Enter configuration commands, one per line.  End with CNTL/Z.\n    Sw3(config)#<b>interface range gig 2/0 - 2</b>\n    Sw3(config-if-range)#<b>spanning-tree vlan 1 cost 55</b>\n    Sw3(config-if-range)#exit\n    Sw3(config)#<b>int gig 3/2</b>\n    Sw3(config-if)#<b>spanning-tree vlan 1 cost 1</b>\n    Sw3(config-if)#end\n    Sw3#\n\n</pre>\n\n<p></code></p>\n<p>Note that in this configuration the portcost value of \"55\" that was assigned to ports 2/0 - 2 was just a random number that was selected. It could have been anything as long as it was larger than the total cost value of your preferred path through Gig3/2.</p>\n<p><strong>Validation</strong></p>\n<pre><code>\n    Sw3#<b>show spanning-tree vlan 1 root</b>\n\n                                            <b>Root</b>    Hello Max Fwd\n    Vlan                   Root ID          <b>Cost</b>    Time  Age     Dly  <b>Root Port</b>\n    ---------------- -------------------- --------- ----- --- ---  -----    -------\n    VLAN0001          4097 0ce1.3ae3.0000         <b>5</b>    2   20      15  <b>Gi3/2</b>           \n    Sw3#\n\n</pre>\n\n<p></code></p>",
    "flags": [],
    "min_points_to_pass": null,
    "access_type": "default",
    "user_status": "unstarted",
    "user_lab_status": null,
    "user_status_modified": null,
    "user_flags": [],
    "global_running_session": null
}