{
    "id": "0386f4ab-d645-43db-9682-9fac45ea34a5",
    "name": "IOS CLI Basics",
    "slug": "ios-cli-basics",
    "status": "published",
    "lab_type": "pta",
    "is_sample": false,
    "duration_in_seconds": 1800,
    "metadata": {
        "courses": [
            "b032ef42-9faf-487d-97d2-5e9a4ba6fd26"
        ],
        "pta_sdn": "286",
        "pta_namespace": "my.ine",
        "learning_paths": [],
        "has_published_parent": true
    },
    "session": null,
    "company": "a491bc32-c056-4946-9169-cc053387bada",
    "created": "2022-08-02T15:34:25.338566Z",
    "modified": "2023-10-03T18:56:46.736187Z",
    "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": "![description](https://assets.ine.com/content/labs/networking-labs/Task1-1/diagram.png)\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-1/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.",
    "description_html": "<p><img alt=\"description\" src=\"https://assets.ine.com/content/labs/networking-labs/Task1-1/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-1/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>",
    "tasks": "**Task: Initial Configuration**\n\n1. Login to all three switches (right-click on the switch within the topology diagram and select the \"Console\" option) and change from \"User EXEC\" mode into \"Privileged EXEC\" mode.\n\n2. Configure a unique hostname on each switch. You may use whatever hostname you wish.\n   \n3. Login to Switch-1 and shutdown interfaces GigabitEthernet1/0 through 1/2.\n\n4. Configure IP addresses on all switch management interfaces as follows:\n    - Sw1 : 10.1.1.1/24 (i.e. 10.1.1.1 255.255.255.0)\n    - Sw2 : 10.1.1.2/24 (i.e. 10.1.1.2 255.255.255.0)\n    - Sw3 : 10.1.1.3/24 (i.e. 10.1.1.3 255.255.255.0)\n\n5. Configure a default-gateway of 10.1.1.10 on all switches. No device actually exists in your topology with this IP address but you should know how to configure the command.\n\n6. Configure Sw1 as a telnet server (i.e. capable of responding to incoming Telnet requests on any of its VTY lines) using the password cisco.\n\n7. Configure an enable password of \"cisco\" on Sw1 and then save all of your configuration changes from its Running-Config file to its Starting-Config file.\n\n8. Login to Switch-2 and from User EXEC mode (or Privileged EXEC mode...it doesn't matter) you should be able to telnet to Sw1.",
    "tasks_html": "<p><strong>Task: Initial Configuration</strong></p>\n<ol>\n<li>\n<p>Login to all three switches (right-click on the switch within the topology diagram and select the \"Console\" option) and change from \"User EXEC\" mode into \"Privileged EXEC\" mode.</p>\n</li>\n<li>\n<p>Configure a unique hostname on each switch. You may use whatever hostname you wish.</p>\n</li>\n<li>\n<p>Login to Switch-1 and shutdown interfaces GigabitEthernet1/0 through 1/2.</p>\n</li>\n<li>\n<p>Configure IP addresses on all switch management interfaces as follows:</p>\n<ul>\n<li>Sw1 : 10.1.1.1/24 (i.e. 10.1.1.1 255.255.255.0)</li>\n<li>Sw2 : 10.1.1.2/24 (i.e. 10.1.1.2 255.255.255.0)</li>\n<li>Sw3 : 10.1.1.3/24 (i.e. 10.1.1.3 255.255.255.0)</li>\n</ul>\n</li>\n<li>\n<p>Configure a default-gateway of 10.1.1.10 on all switches. No device actually exists in your topology with this IP address but you should know how to configure the command.</p>\n</li>\n<li>\n<p>Configure Sw1 as a telnet server (i.e. capable of responding to incoming Telnet requests on any of its VTY lines) using the password cisco.</p>\n</li>\n<li>\n<p>Configure an enable password of \"cisco\" on Sw1 and then save all of your configuration changes from its Running-Config file to its Starting-Config file.</p>\n</li>\n<li>\n<p>Login to Switch-2 and from User EXEC mode (or Privileged EXEC mode...it doesn't matter) you should be able to telnet to Sw1.</p>\n</li>\n</ol>",
    "published_date": "2017-09-05T18:00:00Z",
    "solutions": "**Solutions:**\n\n1. To move from User EXEC to Privileged EXEC mode one issues the \"**enable**\" command:\n\n    <pre><code>\n    Switch>\n    Switch>enable\n    Switch#\n    </pre></code>\n\n\n2. To configure a unique hostname within a switch (or router) one must first enter \"Global Configuration Mode\" by typing \"configure terminal\" (or \"conf t\") and then entering the command, \"hostname\" followed by a space and then your descriptive name for the device. When you are finished entering configuration commands you leave Global Configuration Mode by entering the \"end\" command.\n   \n    <pre><code>\n    Switch#configure terminal\n    Switch(config)#hostname Switch-1\n    Switch(config)#end\n    </pre></code>\n\n\n3. One can apply configuration commands to individual interfaces on a switch or a range of interfaces. In this step it would have been easiest to implement the \"interface range\" command to allow you to shutdown multiple interfaces at once as follows:\n\n    <pre><code>\n    Switch-1#configure terminal\n    Switch-1(config)#interface range GigabitEthernet1/0 - 2\n    Switch-1(config-if-range)#shutdown\n    Switch-1(config-if-range)#end\n    </pre></code>\n\n4. By default, Cisco switches have VLAN 1 as their management VLAN. We can assign an IP address in the VLAN 1 interface, which can be used to access that particular switch via remote access tools such as Telnet, SSH, etc.\n\nHistorically, early Cisco switches were only Layer-2 devices, which (just like a laptop or PC) needed to be configured with a default-gateway using the \"ip default-gateway\" command to make them accessible from different networks. Unlike a Layer 3 device, a Layer-2 switch cannot route the packets because it only works based on the destination mac address. In today's modern networks most switches are \"Multilayer Switches\" which means that (like routers) they can run routing protocols and route packets.  But for this introductory lab, we'll treat these three switches as if they did not have that capability and were Layer-2 only.\n\n\n```\nSw1:\nenable\n!\nconfigure terminal\n!\ninterface vlan 1\n ip address 10.1.1.1 255.255.255.0\n no shutdown\n end\n \n```\n\n```\nSw2:\nenable\n!\nconfigure terminal\n!\ninterface vlan 1\n ip address 10.1.1.2 255.255.255.0\n no shutdown\n end\n \n```\n\n```\nSw3:\nenble\n!\nconfigure terminal\n!\ninterface vlan 1\n ip address 10.1.1.3 255.255.255.0\n no shutdown\n end\n \n```\n\n5. To configure a default-gateway in each switch follow this pattern:\n\n    <pre><code>\n    Sw1:\n    enable\n    !\n    configure terminal\n    !\n    ip default-gateway 10.1.1.10\n    end    \n    </pre></code>\n\n6. Now configure Sw1 as the telnet server. Notice the command below of \"**transport input telnet**\".  Some IOS devices default to allowing incoming sessions of both Telnet and SSH. Other IOS devices have a default behavior of not allowing any kind of incoming session.  Because you may not know (from device to device) what its default behavior is, this particular command explicitly tells the device to listen to, and respond to, incoming Telnet requests. \n\n    <pre><code>\n    <b>Sw1:</b>\n     enable\n    !\n    configure terminal\n    !\n    line vty 0 4\n     transport input telnet\n     password cisco\n    !\n    enable password cisco\n    </pre></code>\n\n7. To configure an Enable password (which will display in cleartext in the output of your configuration file) and then save your configuration changes do the following:\n\n    <pre><code>\n    <b>Sw1:</b>\n     enable\n    !\n    configure terminal\n    !\n    enable password cisco\n    end\n\n    <b>copy running-config startup-config</b>\n    (One could also use the command, \"<b>write mem</b>\")\n\n    </pre></code>\n\n\n**Verification**\n\nInitially, we can check for the IP addressing and reachability information between all the switches in this topology. When it is successful, we can check for the telnet session to Sw1 from Sw2 (and even Sw3 if you wish). We can use some kind of output modifier to get clean output, as shown here.\n\n<pre><code>\nSw1#show ip interface brief | exclude unassigned\nInterface              IP-Address      OK? Method Status                Protocol\n<b>Vlan1                  10.1.1.1        YES manual up                    up</b>\n\nSw1#ping 10.1.1.2\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:\n<b>.!!!!</b>\nSuccess rate is 80 percent (4/5), round-trip min/avg/max = 1/2/8 ms\n\nSw1#ping 10.1.1.3\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:\n<b>.!!!!</b>\nSuccess rate is 80 percent (4/5), round-trip min/avg/max = 1/3/9 ms\n\n\nSw2#show ip interface brief | exclude unassigned\nInterface              IP-Address      OK? Method Status                Protocol\n<b>Vlan1                  10.1.1.2        YES manual up                    up </b>     \n\nSw2#ping 10.1.1.1\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:\n<b>!!!!!</b>\nSuccess rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms\n\nSw2#ping 10.1.1.3\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:\n<b>.!!!!</b>\nSuccess rate is 80 percent (4/5), round-trip min/avg/max = 1/3/4 ms\n\n\nSw3#show ip interface brief | exclude unassigned\nInterface              IP-Address      OK? Method Status                Protocol\n<b>Vlan1                  10.1.1.3        YES manual up                    up</b>\n\nSw3#ping 10.1.1.1\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:\n<b>!!!!!</b>\nSuccess rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms\n\nSw3#ping 10.1.1.2\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:\n<b>!!!!!</b>\nSuccess rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms\n\n</pre></code>\n\n\nTo validate Telnet simply **login to Switch-2** and issue the command, \"**Telnet 10.1.1.1**\". This will cause Switch-2 to initiate a TCP session with Switch-1 using a destination TCP port of 23 (for Telnet). Because you enabled the Telnet protocol on Switch-1 you should be prompted for a password (which is \"cisco\"). Type in that password and the device prompt should now validate that you are within Switch-1's IOS CLI.",
    "solutions_html": "<p><strong>Solutions:</strong></p>\n<ol>\n<li>\n<p>To move from User EXEC to Privileged EXEC mode one issues the \"<strong>enable</strong>\" command:</p>\n<p><pre><code>\nSwitch&gt;\nSwitch&gt;enable\nSwitch#\n</pre></code></p>\n</li>\n<li>\n<p>To configure a unique hostname within a switch (or router) one must first enter \"Global Configuration Mode\" by typing \"configure terminal\" (or \"conf t\") and then entering the command, \"hostname\" followed by a space and then your descriptive name for the device. When you are finished entering configuration commands you leave Global Configuration Mode by entering the \"end\" command.</p>\n<p><pre><code>\nSwitch#configure terminal\nSwitch(config)#hostname Switch-1\nSwitch(config)#end\n</pre></code></p>\n</li>\n<li>\n<p>One can apply configuration commands to individual interfaces on a switch or a range of interfaces. In this step it would have been easiest to implement the \"interface range\" command to allow you to shutdown multiple interfaces at once as follows:</p>\n<p><pre><code>\nSwitch-1#configure terminal\nSwitch-1(config)#interface range GigabitEthernet1/0 - 2\nSwitch-1(config-if-range)#shutdown\nSwitch-1(config-if-range)#end\n</pre></code></p>\n</li>\n<li>\n<p>By default, Cisco switches have VLAN 1 as their management VLAN. We can assign an IP address in the VLAN 1 interface, which can be used to access that particular switch via remote access tools such as Telnet, SSH, etc.</p>\n</li>\n</ol>\n<p>Historically, early Cisco switches were only Layer-2 devices, which (just like a laptop or PC) needed to be configured with a default-gateway using the \"ip default-gateway\" command to make them accessible from different networks. Unlike a Layer 3 device, a Layer-2 switch cannot route the packets because it only works based on the destination mac address. In today's modern networks most switches are \"Multilayer Switches\" which means that (like routers) they can run routing protocols and route packets.  But for this introductory lab, we'll treat these three switches as if they did not have that capability and were Layer-2 only.</p>\n<pre class=\"codehilite\"><code>Sw1:\nenable\n!\nconfigure terminal\n!\ninterface vlan 1\n ip address 10.1.1.1 255.255.255.0\n no shutdown\n end\n</code></pre>\n\n<pre class=\"codehilite\"><code>Sw2:\nenable\n!\nconfigure terminal\n!\ninterface vlan 1\n ip address 10.1.1.2 255.255.255.0\n no shutdown\n end\n</code></pre>\n\n<pre class=\"codehilite\"><code>Sw3:\nenble\n!\nconfigure terminal\n!\ninterface vlan 1\n ip address 10.1.1.3 255.255.255.0\n no shutdown\n end\n</code></pre>\n\n<ol>\n<li>\n<p>To configure a default-gateway in each switch follow this pattern:</p>\n<p><pre><code>\nSw1:\nenable\n!\nconfigure terminal\n!\nip default-gateway 10.1.1.10\nend  <br />\n</pre></code></p>\n</li>\n<li>\n<p>Now configure Sw1 as the telnet server. Notice the command below of \"<strong>transport input telnet</strong>\".  Some IOS devices default to allowing incoming sessions of both Telnet and SSH. Other IOS devices have a default behavior of not allowing any kind of incoming session.  Because you may not know (from device to device) what its default behavior is, this particular command explicitly tells the device to listen to, and respond to, incoming Telnet requests. </p>\n<p><pre><code>\n<b>Sw1:</b>\n enable\n!\nconfigure terminal\n!\nline vty 0 4\n transport input telnet\n password cisco\n!\nenable password cisco\n</pre></code></p>\n</li>\n<li>\n<p>To configure an Enable password (which will display in cleartext in the output of your configuration file) and then save your configuration changes do the following:</p>\n<p><pre><code>\n<b>Sw1:</b>\n enable\n!\nconfigure terminal\n!\nenable password cisco\nend</p>\n<p><b>copy running-config startup-config</b>\n(One could also use the command, \"<b>write mem</b>\")</p>\n<p></pre></code></p>\n</li>\n</ol>\n<p><strong>Verification</strong></p>\n<p>Initially, we can check for the IP addressing and reachability information between all the switches in this topology. When it is successful, we can check for the telnet session to Sw1 from Sw2 (and even Sw3 if you wish). We can use some kind of output modifier to get clean output, as shown here.</p>\n<pre><code>\nSw1#show ip interface brief | exclude unassigned\nInterface              IP-Address      OK? Method Status                Protocol\n<b>Vlan1                  10.1.1.1        YES manual up                    up</b>\n\nSw1#ping 10.1.1.2\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:\n<b>.!!!!</b>\nSuccess rate is 80 percent (4/5), round-trip min/avg/max = 1/2/8 ms\n\nSw1#ping 10.1.1.3\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:\n<b>.!!!!</b>\nSuccess rate is 80 percent (4/5), round-trip min/avg/max = 1/3/9 ms\n\n\nSw2#show ip interface brief | exclude unassigned\nInterface              IP-Address      OK? Method Status                Protocol\n<b>Vlan1                  10.1.1.2        YES manual up                    up </b>     \n\nSw2#ping 10.1.1.1\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:\n<b>!!!!!</b>\nSuccess rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms\n\nSw2#ping 10.1.1.3\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.3, timeout is 2 seconds:\n<b>.!!!!</b>\nSuccess rate is 80 percent (4/5), round-trip min/avg/max = 1/3/4 ms\n\n\nSw3#show ip interface brief | exclude unassigned\nInterface              IP-Address      OK? Method Status                Protocol\n<b>Vlan1                  10.1.1.3        YES manual up                    up</b>\n\nSw3#ping 10.1.1.1\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:\n<b>!!!!!</b>\nSuccess rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms\n\nSw3#ping 10.1.1.2\n\nType escape sequence to abort.\nSending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:\n<b>!!!!!</b>\nSuccess rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms\n\n</pre>\n\n<p></code></p>\n<p>To validate Telnet simply <strong>login to Switch-2</strong> and issue the command, \"<strong>Telnet 10.1.1.1</strong>\". This will cause Switch-2 to initiate a TCP session with Switch-1 using a destination TCP port of 23 (for Telnet). Because you enabled the Telnet protocol on Switch-1 you should be prompted for a password (which is \"cisco\"). Type in that password and the device prompt should now validate that you are within Switch-1's IOS CLI.</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
}