Basic Router & Switch IOS configuration commands - CCNA beginner

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in the second week of the Cisco introduction to networks course the students get to console into a switch and a router and put in just the basic configurations so I have a list here of the basic configurations from week two and I'll put these commands in the description at the bottom of the video let's go over a few right here so when you first log into the router you're presented with a prompt that looks like this and that's called user exact mode if you want to exit out you can type in exit and hit enter and you'll exit out of the router the first command that I want to mention is the question mark it'll give you a list of all of the commands that are available in that mode so right here I have a console connection to the router and I'm in user exec mode I put in a question mark and I get a whole page of commands that are available in user exec mode I can press the spacebar for the next page and the next page so those are the commands that are available in that mode the next command is the enable command the enable command takes me to privileged exec mode so now I'm in privileged exec mode in privileged exec mode I put in the question mark and I get a different set of commands that are available for this mode and as you get deeper into the router and go to the higher levels of configuration there are more commands available to you look how many commands were available in privileged exec mode so for privileged exec mode if I want to go back to user exec mode i type in disabled or i can exit out of the router completely if I type in the exit command and press Enter so now we've covered those two and I'm in a mistake here I'll change that so notice how the prompt changes from the greater than sign and user exec mode to the hash when you're in privileged exec mode all right the next command that we're going to cover is configure terminal configure terminal will take you to global config mode global config mode is where you do most of the configurations on the router once you get into global config mode you put in a question mark to see all the commands that are available you can exit back to privileged exec mode or type in the end command and hit return to go back to privileged privileged exec mode or put in control C or control Z so let's do that right here I'll type in configure terminal and I'm put into global config mode if I put in a control C I'm brought back to privileged exec mode if I type in exit I'm out of the router all right we'll go back in an able privileged exec mode configure terminal notice if I type configure and then put another question mark I see what commands are available with when the first command is configure so there's configure confirm configure memory configure Network configure and then there's configure terminal if I put in a command halfway let's see I type t t erm and put a question mark it'll tell me what the rest of the command is or what what commands are available that start with T erm all right now I'm in global config mode now from here in global config mode once again I can put in a question mark to get a list of commands that are available in this higher level of configuration and I can also go to a higher level of or a different level of global config if I put in line vty 0 to 15 I go into config dash line mode it's here that we can configure virtual terminal connections for telnet and ssh or we could put in line console 0 and putting configurations 2 on the console port on for consoling into the router so two options here let's take a look at them so back in the router here I'll put in line vty 0 space 15 and now I have access to 15 virtual terminal line notice the prompt turns from config to config - line if I type in line console 0 I'm now still in config - line mode but I'm ready to configure the console 0 which is my serial connection port alright let's go to another one another sub global configuration mode is interface configuration mode for that you type in interface then the type of interface in this case it'll be interface Gigabit Ethernet and if you have a 4321 router you're going to be putting in interface 0 / 0 / 0 if you have an older router like I have 1941 it's just 0/0 so we could put that in and go in there and then run a bunch of commands let's just check it out I'll put in interface GI and then use tab completion or let's see here GI g what one more gigabit well actually that's not working so I'm trying to do tab completion to complete the command but since I'm in config - line mode it's not tab completing the command because it doesn't see this option this is not an option in config - line mode so let's try that again but this time I'll type exit go back to global config mode and then put an interface GI GA and hit tab and the command is auto completed alright so then I'll put zero zero slash zero enter and now I'm in config - if' mode ready to configure my interface so the other thing I wanted to tell you that's pretty important is the show command so I'm going down here now in my commands that you need to know for week 2 and here we are in privileged exec mode configure terminal to get to global config next thing I'll say is the show commands there are lots of show commands that will show you information static information about how the router is configured or what's enabled so to to put in those commands we put in first I'll need to go back to privileged exec mode with the control C and I'll put in show and then a space and a question mark and then these are all the show commands that will show me information about the router okay now the probably the most important one to know about notice all of these show commands there's quite a few but in control see whoo all right probably the most important one to know about is show running - config and I could just do show run for short because there's command shortening I can tab to finish the command or I can just type the abbreviation here show run and then hit enter and it autocompletes the command for me so tab completion is something you'll see in Linux and UNIX and even in Windows and the command line but command shortening not so much so that's pretty awesome that you can do that so once I do a show run or show running - config this is the default configuration that loads when the router loads it has some of the default commands or some of the things that are automatically enabled for instance the host name is router what else licensing information the interfaces this is important to know as you can see this router has a gigabit interface with no IP address and the interface is shutdown interface Gigabit Ethernet 0/0 notice the other gigabit interface is also no IP address and shutdown by default then I have serial interfaces which I've added to the router with a serial card those are shut down there's an HTTP server that's not running because of the no in front of it a web interface and my line console 0 which has no configurations and the line vty is here 0 to 4 and the other lines are 5 to 15 this means that multiple users could tell net or SSH into the router at the same time so these are the basic configurations so right here under privileged exec mode we have the show show running config you can also save the configuration but by doing a copy running-config to startup config this copies your configuration which is running in RAM to the startup config file which is in NVRAM other things that you can do in privileged exec mode is you could ping another host on the network you could run a traceroute to a host on the network you could secure shell into a host or telnet into a host there's also debug commands if you want to see all of the debug commands that are available you just put debug space and a question mark the difference between the show commands and the debug commands is that the debug commands are running in real time another one that you want to know is how to set the clock and how to restart the router so these basic commands are covered in week 2 if we go and type configure terminal and go into global config mode we need to know how in week 2 to set the hostname of the router setup a banner message of the day and then put your message between delimiter x' of your choice in this case i've used double quotes the enable password will we'll put a password on your ability to type enable and get into privileged exec mode in this case if i type enable password class then the word class will be the password to get to privileged exec mode this password will not be encrypted if I put an able secret class it will be encrypted let's take a look at that right now I'll go in here I'll go into global config mode and I'll type an able password class and then I'll type an able secret class but I have to change the password one two three four five so this is two different passwords to get two privileged exec mode the enable secret will take priority over the enable password so the enable secret class one two three four five so I'll do that and now if we look exit at the running configuration you can see right here in the running configuration with a show running - config the enable secret has been hashed with an md5 hash signified by this five the enable password is class which is in plain text now what happens when you do that it means that well if i do a control c and i type exit i'm brought out of the router if i want to go back to privileged exec mode i type enable and I'm asked for a password let's see if I can type in class class doesn't work because the enable secret took priority over the enable password so class 1 2 3 4 5 and I'm in the other thing that you can do is put in global configuration mode the command service password - encryption which will put a basic type 7 password encryption on all basic clear text passwords on the router the other thing you can do in global config mode is go to the virtual terminal lines which we already talked about the console and go into the interface Gigabit Ethernet 0/0 this these two commands take you into config dash line mode and this command takes into config - AF mode into interface configuration mode so all of these commands are needed in week two let's take a look and enter a few of them here so what if we do go into line vty 0 to 15 or into our console line we can put in a password into the router let's say password space Cisco where the password is Cisco we can also enable login so that although since there's a password but also enable the login prompt so your prompt to login and in the line vty 0 to 15 we can set the transport input to all telnet SSH or none if we want to set up a remote access into the router using telnet or SSH so to give you an example of that I'll go here I'll put in compte which is short for configure terminal and then line vty 0 space 15 I'll put in the password Cisco and then login if I want to make sure that telnet is available on this router I can say transport input telnet or transport input all and that would work for telnet and ssh if i want to put a password on line console 0 I'll say line console 0 even though you can't see the difference I'm now in line console 0 so now also I'll use up arrow command history put in password Cisco and login now if i do a control c and then exit i'm out of the router I press ENTER and I'm prompted for that global password I'll put in the password Cisco obviously you're not going to use simple passwords like Cisco in class you're going to use more complex passwords but this is just basic entry level configurations just getting used to the router and the switch for setting up our interface and getting gigabit ethernet zero to come up we put in the command interface Gigabit Ethernet 0 size 0 / 0 or we can abbreviate it to interface G 0 / 0 / 0 in my case since I have a 19:41 router it'll be just G 0 / 0 I'll then put in this IP address and subnet mask and then use the no shutdown command to turn on the interface so let's give that a try enable class is the password oh no it's not class 1 2 3 4 5 there we go comp T command shortening to get to global configuration mode int G 0 / 0 abbreviate the command interface Gigabit Ethernet 0/0 to just int G 0 / 0 and then put in the IP address I'll put in the IP address 192.168.1.1 and then the no shutdown command to bring the interface up so the interface is now up I'll need to it change state to down because I don't have the Ethernet cable plugged into my laptop and plugged into the router I have the ethernet cable just the other end one ends into the router and the other end is just dangling so that's why it's down okay so now if we go back here to well before I do that at the router a couple of other commands let's just test them out hostname r1 banner motd no unauthorized access allowed which will show up when we connect to the router and putty will get then we try to login we'll get the banner message warning us that no unauthorized access no logging into the router if you're not allowed to maybe you'll be prosecuted for that the other thing here we can also put in the service password - encryption command to encrypt the non hashed passwords with a type 7 hash and some of these other commands that you're supposed to learn in week one well I won't do those right now to talk about the switch commands notice the switch commands everything is the same here except on the switch there is not a gigabit 0/0 interface routers have interfaces switches have switch ports so if you want to put an IP address on the switch so you could let's say remote into it the command is interface vlan1 and then you put the IP address so once again on a switch the IP address goes on interface vlan1 which is also known as a switched virtual interface it's a virtual interface where all of the switch ports if they're in VLAN one you could plug into the switch and you could ping or reach the switch let's say remote into the switch through any switch port that's in VLAN one and that's if the IP address is in VLAN one all of these other commands are the same pretty much these basic commands on the switch so we'll go down here notice the only difference here interface vlan1 we go into interface configuration mode we put in our IP address and then the no shutdown command right here and then the other thing you could do is you could exit back to global config mode and give the switch a default gateway because the switch will need a default gateway to reach remote networks that are not or networks that are not on its own local network so if you want to remote into the switch some other helpful commands that you'll need and week to know IP domain lookup is very useful you you can put it in the router or switch in global configuration mode and it prevents miss type commands from being translated by DNS and oftentimes we don't have the router online we don't have dns configured so if you miss type of command it thinks you're trying to translate translate that name to IP address and then it is kind of waits and waits and waits the other command that's useful is putting in the logging synchronous command so that logs logging information that goes to the console sometimes it interrupts your command right in the middle of when you're typing a command if you put in the logging synchronous command in the line vty or the line console 0 it will help that why you're typing the command it won't send that output to the screen at the same time anyway I'll put all of these basic commands in the video description and now you have just kind of a rough introduction to some basic command entry on a cisco router
Info
Channel: danscourses
Views: 51,971
Rating: undefined out of 5
Keywords: IOS, router, commands, switch, configuration, CCNA, beginner, basic, cli, Cisco, danscourses
Id: -YV9Y_YIDcI
Channel Id: undefined
Length: 20min 54sec (1254 seconds)
Published: Sat Oct 12 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.