{
    "id": "2a6cb43b-fdee-445a-995d-d8180728c4ac",
    "name": "VLANs & Trunking",
    "slug": "vlans-trunking",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "efd8a55d-28c5-4fcd-8b42-cfdafb1f085f",
            "1b71fa54-7972-495a-99b1-3c523b4c5ba7"
        ],
        "pta_sdn": "287",
        "collections": [],
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2022-08-02T15:38:13.201469Z",
    "modified": "2024-05-17T14:46:02.555825Z",
    "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 teaches how to set up VLANs and trunking on switches. VLANs are created on switches, with certain ports assigned to each VLAN. Trunk ports use 802.1q. Checking is done to make sure everything is set up correctly and hosts in different VLANs can communicate.",
    "description_html": "<p>This lab teaches how to set up VLANs and trunking on switches. VLANs are created on switches, with certain ports assigned to each VLAN. Trunk ports use 802.1q. Checking is done to make sure everything is set up correctly and hosts in different VLANs can communicate.</p>",
    "tasks": "![description](https://assets.ine.com/content/labs/networking-labs/Task1-2/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-2/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: VLANs & Trunking**\n\n\n1. Configure VLAN 100 and VLAN 200 on all switches.\n2. Configure any names for the VLANs.\n3. Associate VLANs on the ports as follows:\n    - Sw1's Gi0/1 in VLAN 100\n    - Sw2's Gi0/1 in VLAN 100\n    - Sw2's Gi0/0 in VLAN 200\n    - Sw3's Gi0/3 in VLAN 200\n4. Configure trunk ports as specified below:\n    - Gi1/0 connecting Sw1 to Sw2\n    - Gi3/0 connecting Sw1 to Sw3\n    - Configure these trunks to use 802.1q tagging\n5. Configure IP addresses on the hosts as follows:\n    - VLAN 100: 100.1.1.0/24\n    - VLAN 200: 200.1.1.0/24",
    "tasks_html": "<p><img alt=\"description\" src=\"https://assets.ine.com/content/labs/networking-labs/Task1-2/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-2/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: VLANs &amp; Trunking</strong></p>\n<ol>\n<li>Configure VLAN 100 and VLAN 200 on all switches.</li>\n<li>Configure any names for the VLANs.</li>\n<li>Associate VLANs on the ports as follows:<ul>\n<li>Sw1's Gi0/1 in VLAN 100</li>\n<li>Sw2's Gi0/1 in VLAN 100</li>\n<li>Sw2's Gi0/0 in VLAN 200</li>\n<li>Sw3's Gi0/3 in VLAN 200</li>\n</ul>\n</li>\n<li>Configure trunk ports as specified below:<ul>\n<li>Gi1/0 connecting Sw1 to Sw2</li>\n<li>Gi3/0 connecting Sw1 to Sw3</li>\n<li>Configure these trunks to use 802.1q tagging</li>\n</ul>\n</li>\n<li>Configure IP addresses on the hosts as follows:<ul>\n<li>VLAN 100: 100.1.1.0/24</li>\n<li>VLAN 200: 200.1.1.0/24</li>\n</ul>\n</li>\n</ol>",
    "published_date": "2019-12-05T22:08:07Z",
    "solutions": "**Solutions:**\n\nIn this task, we are asked to configure VLAN 100, VLAN 200, and trunking on all the switches. We have four routers connected with three switches, which must be assigned in a particular VLAN. After VLAN configuration, we must configure trunk interfaces because we have multiple VLANs to pass through the switches. In trunking, there are two encapsulation types: ISL [Inter Switch Link] and IEEE802.1Q [dot1q]. ISL is the Cisco proprietary encapsulation method; it adds 30 bytes of extra overhead in the L2 frame, which usually is not preferred by Cisco switches. By default, 802.1q is enabled on the Cisco IOS switches. Optionally, we can change it to ISL by using the switchport trunk enacpsulation isl command. In this lab, we are not using ISL since it's not supported by most of the platforms in recent days.\n\nLet's configure VLAN 100 and 200 on all the switches.\n\n```\n    Sw1,Sw2 & Sw3:\n    vlan 100\n    name IT\n    exit\n    !\n    vlan 200\n    name Sales\n    exit\n```\n\nWhen configured, assign those VLANs in the particular ports as required by the task.\n\n<pre><code>\n    <b>Sw1:</b>\n    interface Gi0/1\n     switchport mode access\n     switchport access vlan 100\n\n    <b>Sw2:</b>\n    interface Gi0/1\n     switchport mode access\n     switchport access vlan 100\n    !\n    inter Gi0/0\n     switchport mode access\n     switchport access vlan 200\n\n    <b>Sw3:</b>\n    interface Gi0/3\n     switchport mode access\n     switchport access vlan 200\n </pre></code>\n\n Now configure trunk and encapsulation types between switches. One thing we need to keep in mind is that the \"switchport trunk encapsulation dot1q\" command might not be supported by all the platforms if a platform only supports 802.1q trunking (with no ISL support).\n\n<pre><code>\n    <b>Sw1:</b>\n    interface Gi1/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n    !\n    interface Gi3/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n\n    <b>Sw2:</b>\n    interface Gi1/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n\n    <b>Sw3:</b>\n    interface Gi3/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n</pre></code>\n\n\nThe next step is to configure IP addresses on the host routers that correspond to the particular VLAN. When configured, we should have reachability between the devices that fall into the same VLAN ID.\n\n<pre><code>\n    R1:\n    interface Gi0/0\n     ip address 100.1.1.1 255.255.255.0\n     no shutdown\n\n    R2:\n    interface Gi0/1\n     ip address 100.1.1.2 255.255.255.0\n     no shutdown\n\n    R3:\n    interface Gi0/1\n     ip address 200.1.1.3 255.255.255.0\n     no shutdown\n\n    R4:\n    interface Gi0/1\n     ip address 200.1.1.4 255.255.255.0\n     no shutdown\n</pre></code>\n\n\n**Verification**\n\nAs per the task requirements, we have configured VLAN 100 and 200 on all the switches and also configured the trunk ports as required. Now we have R1 and R2 assigned to VLAN 100, and R3 and R4 have been assigned to VLAN 200. Before we move on to the reachability test, we must verify which VLANs are created and how they are assigned to the switchports. Verify the VLANs and trunking first.\n\n<pre><code>\n\n    <b>Sw1#show vlan</b>\n\n    VLAN Name                             Status    Ports\n    ---- -------------------------------- --------- -------------------------------\n    1    default                          active    Gi0/0, Gi0/2, Gi0/3, Gi1/1\n                                                    Gi1/2, Gi1/3, Gi2/0, Gi2/1\n                                                    Gi2/2, Gi2/3, Gi3/1, Gi3/2\n                                                    Gi3/3\n    100  IT                               active    Gi0/1\n    200  Sales                            active    \n\n    <b>Sw1#show interfaces trunk</b>\n\n    Port        Mode             Encapsulation  Status        Native vlan\n    Gi1/0       on               802.1q         trunking      1\n    Gi3/0       on               802.1q         trunking      1\n\n    Port        Vlans allowed on trunk\n    Gi1/0       1-4094\n    Gi3/0       1-4094\n\n    Port        Vlans allowed and active in management domain\n    Gi1/0       1,100,200\n    Gi3/0       1,100,200\n\n    Port        Vlans in spanning tree forwarding state and not pruned\n    Gi1/0       1,100,200\n    Gi3/0       1,100,200\n</pre></code>\n\n<pre><code>\n    <b>Sw2#show vlan</b>\n\n    VLAN Name                             Status    Ports\n    ---- -------------------------------- --------- -------------------------------\n    1    default                          active    Gi0/2, Gi0/3, Gi1/1, Gi1/2\n                                                    Gi1/3, Gi2/0, Gi2/1, Gi2/2\n                                                    Gi2/3, Gi3/0, Gi3/1, Gi3/2\n                                                    Gi3/3\n    100  IT                               active    Gi0/1\n    200  Sales                            active    Gi0/0\n\n    <b>Sw2#show interfaces trunk</b>\n\n    Port        Mode             Encapsulation  Status        Native vlan\n    Gi1/0       on               802.1q         trunking      1\n\n    Port        Vlans allowed on trunk\n    Gi1/0       1-4094\n\n    Port        Vlans allowed and active in management domain\n    Gi1/0       1,100,200\n\n    Port        Vlans in spanning tree forwarding state and not pruned\n    Gi1/0       1,100,200\n\n</pre></code>\n\n<pre><code>\n    <b>Sw3#show vlan</b>\n\n    VLAN Name                             Status    Ports\n    ---- -------------------------------- --------- -------------------------------\n    1    default                          active    Gi0/0, Gi0/1, Gi0/2, Gi1/0\n                                                    Gi1/1, Gi1/2, Gi1/3, Gi2/0\n                                                    Gi2/1, Gi2/2, Gi2/3, Gi3/1\n                                                    Gi3/2, Gi3/3\n    100  IT                               active    \n    200  Sales                            active    Gi0/3\n\n    <b>Sw3#show interfaces trunk</b>\n\n    Port        Mode             Encapsulation  Status        Native vlan\n    Gi3/0       on               802.1q         trunking      1\n\n    Port        Vlans allowed on trunk\n    Gi3/0       1-4094\n\n    Port        Vlans allowed and active in management domain\n    Gi3/0       1,100,200\n\n    Port        Vlans in spanning tree forwarding state and not pruned\n    Gi3/0       1,100,200\n\n</pre></code>\n\nIn the above output, we can see that there are two VLANs configured manually, because others are default VLANs built in to the Cisco IOS. By default, VLAN 1 is considered the management VLAN, which can't be removed from the switch. VLAN-IDs from 1002 to 1005 are reserved for the token ring, one of the LAN technologies like Ethernet. It also cannot be removed from the switch. Additionally, when doing show interface trunk, we can see the trunking status and the encapsulation protocol, i.e.802.1q in this case here. By default, Cisco switches have a native VLAN of 1, which is usually considered to be the untagged VLAN, typically used for control plane traffic such as VTP, CDP, STP, BPDUs, etc. that does not need VLAN tagging.\n\nNow we can check for the reachability between R1 and R2, and R3 and R4.\n\n<pre><code>\n    <b>R1#ping 100.1.1.2</b>\n    Type escape sequence to abort.\n    Sending 5, 100-byte ICMP Echos to 100.1.1.2, timeout is 2 seconds:\n    <b>.!!!!</b>\n    Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms\n\n    <b>R3#ping 200.1.1.4</b>\n    Type escape sequence to abort.\n    Sending 5, 100-byte ICMP Echos to 200.1.1.4, timeout is 2 seconds:\n    <b>.!!!!</b>\n    Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/4 ms\n</pre></code>\n\n**NOTE:** The first packet of the initial ping is dropped because of the ARP process when the source host is trying to find the destination host MAC address. Subsequent packets are replied back normally.",
    "solutions_html": "<p><strong>Solutions:</strong></p>\n<p>In this task, we are asked to configure VLAN 100, VLAN 200, and trunking on all the switches. We have four routers connected with three switches, which must be assigned in a particular VLAN. After VLAN configuration, we must configure trunk interfaces because we have multiple VLANs to pass through the switches. In trunking, there are two encapsulation types: ISL [Inter Switch Link] and IEEE802.1Q [dot1q]. ISL is the Cisco proprietary encapsulation method; it adds 30 bytes of extra overhead in the L2 frame, which usually is not preferred by Cisco switches. By default, 802.1q is enabled on the Cisco IOS switches. Optionally, we can change it to ISL by using the switchport trunk enacpsulation isl command. In this lab, we are not using ISL since it's not supported by most of the platforms in recent days.</p>\n<p>Let's configure VLAN 100 and 200 on all the switches.</p>\n<pre class=\"codehilite\"><code>    Sw1,Sw2 &amp; Sw3:\n    vlan 100\n    name IT\n    exit\n    !\n    vlan 200\n    name Sales\n    exit</code></pre>\n\n<p>When configured, assign those VLANs in the particular ports as required by the task.</p>\n<pre><code>\n    <b>Sw1:</b>\n    interface Gi0/1\n     switchport mode access\n     switchport access vlan 100\n\n    <b>Sw2:</b>\n    interface Gi0/1\n     switchport mode access\n     switchport access vlan 100\n    !\n    inter Gi0/0\n     switchport mode access\n     switchport access vlan 200\n\n    <b>Sw3:</b>\n    interface Gi0/3\n     switchport mode access\n     switchport access vlan 200\n </pre>\n\n<p></code></p>\n<p>Now configure trunk and encapsulation types between switches. One thing we need to keep in mind is that the \"switchport trunk encapsulation dot1q\" command might not be supported by all the platforms if a platform only supports 802.1q trunking (with no ISL support).</p>\n<pre><code>\n    <b>Sw1:</b>\n    interface Gi1/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n    !\n    interface Gi3/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n\n    <b>Sw2:</b>\n    interface Gi1/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n\n    <b>Sw3:</b>\n    interface Gi3/0\n     switchport trunk encapsulation dot1q\n     switchport mode trunk\n</pre>\n\n<p></code></p>\n<p>The next step is to configure IP addresses on the host routers that correspond to the particular VLAN. When configured, we should have reachability between the devices that fall into the same VLAN ID.</p>\n<pre><code>\n    R1:\n    interface Gi0/0\n     ip address 100.1.1.1 255.255.255.0\n     no shutdown\n\n    R2:\n    interface Gi0/1\n     ip address 100.1.1.2 255.255.255.0\n     no shutdown\n\n    R3:\n    interface Gi0/1\n     ip address 200.1.1.3 255.255.255.0\n     no shutdown\n\n    R4:\n    interface Gi0/1\n     ip address 200.1.1.4 255.255.255.0\n     no shutdown\n</pre>\n\n<p></code></p>\n<p><strong>Verification</strong></p>\n<p>As per the task requirements, we have configured VLAN 100 and 200 on all the switches and also configured the trunk ports as required. Now we have R1 and R2 assigned to VLAN 100, and R3 and R4 have been assigned to VLAN 200. Before we move on to the reachability test, we must verify which VLANs are created and how they are assigned to the switchports. Verify the VLANs and trunking first.</p>\n<pre><code>\n\n    <b>Sw1#show vlan</b>\n\n    VLAN Name                             Status    Ports\n    ---- -------------------------------- --------- -------------------------------\n    1    default                          active    Gi0/0, Gi0/2, Gi0/3, Gi1/1\n                                                    Gi1/2, Gi1/3, Gi2/0, Gi2/1\n                                                    Gi2/2, Gi2/3, Gi3/1, Gi3/2\n                                                    Gi3/3\n    100  IT                               active    Gi0/1\n    200  Sales                            active    \n\n    <b>Sw1#show interfaces trunk</b>\n\n    Port        Mode             Encapsulation  Status        Native vlan\n    Gi1/0       on               802.1q         trunking      1\n    Gi3/0       on               802.1q         trunking      1\n\n    Port        Vlans allowed on trunk\n    Gi1/0       1-4094\n    Gi3/0       1-4094\n\n    Port        Vlans allowed and active in management domain\n    Gi1/0       1,100,200\n    Gi3/0       1,100,200\n\n    Port        Vlans in spanning tree forwarding state and not pruned\n    Gi1/0       1,100,200\n    Gi3/0       1,100,200\n</pre>\n\n<p></code></p>\n<pre><code>\n    <b>Sw2#show vlan</b>\n\n    VLAN Name                             Status    Ports\n    ---- -------------------------------- --------- -------------------------------\n    1    default                          active    Gi0/2, Gi0/3, Gi1/1, Gi1/2\n                                                    Gi1/3, Gi2/0, Gi2/1, Gi2/2\n                                                    Gi2/3, Gi3/0, Gi3/1, Gi3/2\n                                                    Gi3/3\n    100  IT                               active    Gi0/1\n    200  Sales                            active    Gi0/0\n\n    <b>Sw2#show interfaces trunk</b>\n\n    Port        Mode             Encapsulation  Status        Native vlan\n    Gi1/0       on               802.1q         trunking      1\n\n    Port        Vlans allowed on trunk\n    Gi1/0       1-4094\n\n    Port        Vlans allowed and active in management domain\n    Gi1/0       1,100,200\n\n    Port        Vlans in spanning tree forwarding state and not pruned\n    Gi1/0       1,100,200\n\n</pre>\n\n<p></code></p>\n<pre><code>\n    <b>Sw3#show vlan</b>\n\n    VLAN Name                             Status    Ports\n    ---- -------------------------------- --------- -------------------------------\n    1    default                          active    Gi0/0, Gi0/1, Gi0/2, Gi1/0\n                                                    Gi1/1, Gi1/2, Gi1/3, Gi2/0\n                                                    Gi2/1, Gi2/2, Gi2/3, Gi3/1\n                                                    Gi3/2, Gi3/3\n    100  IT                               active    \n    200  Sales                            active    Gi0/3\n\n    <b>Sw3#show interfaces trunk</b>\n\n    Port        Mode             Encapsulation  Status        Native vlan\n    Gi3/0       on               802.1q         trunking      1\n\n    Port        Vlans allowed on trunk\n    Gi3/0       1-4094\n\n    Port        Vlans allowed and active in management domain\n    Gi3/0       1,100,200\n\n    Port        Vlans in spanning tree forwarding state and not pruned\n    Gi3/0       1,100,200\n\n</pre>\n\n<p></code></p>\n<p>In the above output, we can see that there are two VLANs configured manually, because others are default VLANs built in to the Cisco IOS. By default, VLAN 1 is considered the management VLAN, which can't be removed from the switch. VLAN-IDs from 1002 to 1005 are reserved for the token ring, one of the LAN technologies like Ethernet. It also cannot be removed from the switch. Additionally, when doing show interface trunk, we can see the trunking status and the encapsulation protocol, i.e.802.1q in this case here. By default, Cisco switches have a native VLAN of 1, which is usually considered to be the untagged VLAN, typically used for control plane traffic such as VTP, CDP, STP, BPDUs, etc. that does not need VLAN tagging.</p>\n<p>Now we can check for the reachability between R1 and R2, and R3 and R4.</p>\n<pre><code>\n    <b>R1#ping 100.1.1.2</b>\n    Type escape sequence to abort.\n    Sending 5, 100-byte ICMP Echos to 100.1.1.2, timeout is 2 seconds:\n    <b>.!!!!</b>\n    Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms\n\n    <b>R3#ping 200.1.1.4</b>\n    Type escape sequence to abort.\n    Sending 5, 100-byte ICMP Echos to 200.1.1.4, timeout is 2 seconds:\n    <b>.!!!!</b>\n    Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/4 ms\n</pre>\n\n<p></code></p>\n<p><strong>NOTE:</strong> The first packet of the initial ping is dropped because of the ARP process when the source host is trying to find the destination host MAC address. Subsequent packets are replied back normally.</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
}