0% found this document useful (0 votes)
258 views

Basic Cisco IOS Commands

Uploaded by

Riyaz Admin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
258 views

Basic Cisco IOS Commands

Uploaded by

Riyaz Admin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Welcome to

PM Networking
Cisco IOS
IOS Basics PM Networking
1. Getting familiar with the modes:
Router>
Switch>
This is User mode. It will allow you to view the state of the router,but will not allow you to modify its configuration.

Router>enable
Router#
If you give the enable command in user mode notice the prompt changes and you move to the privilege mode. This mode allows
administrator to modify some of the configuration of the router or switch.

Router>disable
Router>
If you give the disable command in privilege mode, notice the prompt changes and you move back to the user mode.

Router#configure terminal
Router(config)#
If you give configure terminal command in privilege mode you move into global configuration mode. This mode is used commonly for
configuring most of the configurations on router or to go further into other configuration modes like interface configuration mode.
Router(config)#exit
Router#
If you want to move back to privilege mode use the command as shown.

2. Basic Configuration of Router :


If the router do not have a saved configuration,
After several lines of information on the screen you should eventually see:

Would you like to enter the initial configuration dialog? [yes/no]: n

• Always answer “n” for no.


• We will never be using setup mode.
• If you accidentally press “y” and enter Setup Mode, press and hold down the control key and press C (CTRL-C).
• Wait a few seconds, and then press Enter.
On some routers you may see the following message.

Would you like to terminate autoinstall? [yes/no]: y


<There will be several lines of output>
Router>
PM Networking
3. Configure a hostname on the router :

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#

4. Configure Banner on the router :

R1(config)#banner motd @
Enter TEXT message. End with the character '@'.
NOTICE
THIS IS A PRIVATE NETWORK. DON'T PROCEED FURTHER IF YOU ARE NOT AUTHORISED TO.

PM Networking
5. Saving the configuration on a router :

R1#copy running-config startup-config


Destination filename [startup-config]?
Building configuration...
[OK]
R1#

6. Enable Config. password on a Router :

R1(config)#enable password cisco


R1(config)#end
%SYS-5-CONFIG_I: Configured from console by console
R1#disable
R1>en
Password:
R1#

PM Networking
7. Enable Secret password on a Router :

R1(config)#enable secret cisco123

Verification shown below

R1#show running-config
Building configuration...
Current configuration : 627 bytes
hostname R1
enable password cisco
enable secret 5 $1$mERr$5.a6P4JqbNiMX01usIfka/

PM Networking
8. Configure Console password :

Console password will be asked whenever someone is trying to access the router through
console port.

R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit

The first command here moves you into line configuration mode for console port. Then we set
cisco as the password. The login command here enables password checking or you can say that
it tells the router to ask for password when someone is trying to access through console port.
Now again this password is also shown as clear text if someone checks the running-config. So to encrypt all of our
clear text passwords we can use the below mentioned command to encrypt all of our passwords that are shown in
clear text like console password, enable password. To verify this you can use show run after this command.

R1(config)#service password-encryption
PM Networking
9. Configure IP on a router :
You can configure IP on some interface of a router. Here first we move in to the interface
configuration mode for the interface fastethernet 0/0 using the first command. There we
specify the IP address we want to assign to interface followed by the subnet mask we
intend to use.

R1(config)#interface fastEthernet 0/0


R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Now by default the interface is administratively down or in other words the interface has a command
shutdown under interface configuration. To remove any command from a router we can add no in front of
that command. So we turn on the interface by no shutdown. Router can be seen displaying a log message
that it was successful in bringing the interface up.
PM Networking
10. Configure Telnet on a router :

R1(config)#line vty 0 4
#Telnet 192.168.10.2
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#

First we move into the line configuration mode for virtual terminal line. Here ‘0 4’ means we are configuring the
router for 0 to 4 i.e. a total of five concurrent telnet sessions. A total of 5 people can telnet this router at the
same time. Now we configure the password as cisco for telnet and just like we enabled password checking for
console using the login command, we are enabling password checking for telnet. There are these 3 sub portions
of telnet config which should be configured on to the router before you can access it through-
1. An interface with IP
2. Enable password or Enable secret
3. Vty config(which we just did)
PM Networking
11. Configure Secure Shell (SSH) on a router :

Command on PC Command on Router

PC#ssh -L ccna 192.168.10.2 R1(config)#ip domain name cisco


Password: 123 R1(config)#Username ccna password 123
R1> R1(config-line)#line VTY 0 4
R1>enable R1(config-line)#password 123
Paaword: cisco R1(config-line)#login local
R1#Config t R1(config-line)#transport input ssh
R1(config)# R1(config-line)#exit
R1(config)#enable password cisco
R1(config)#crypto key generate rsa
Now we can configured Router from PC.

PM Networking
11. Configure Telnet on Layer-2 Switch :

Telnet To enable telnet on Switch, First we


need to configured IP address to the
PC Switch interface of vlan on the Switch.

IP Configuration on the Switch by Console Cable :

PM Networking
10.0.0.1 10.0.0.2

Command on Switch
Command on PC Switch>enable
pc>telnet 10.0.0.2 Switch#config t
password: cisco Switch(config)#interface vlan 1
Switch> Switch(config-if)#no shutdown
Switch>enable Switch(config-if)#ip address 10.0.0.1 255.0.0.0
password: 123 Switch(config-if)#exi
Switch#config t Switch(config)# line vty 0 4
Switch(config)# Switch(config-line)#password cisco
Switch(config-line)#login
Switch(config-line#)exit
Now you can configure Switch(config)#enable password 123
Switch(config)#exit
Switch from PC.

PM Networking
12. Configure DHCP on a Router :
Command on Router

Router(config)interface fastethernet 0/0


Router(config-if)ip address 192.168.10.1 255.255.255.0
192.168.10.1 f0/0 Router(config-if)exit
Router(config)#ip dhcp pool ccna
Router(dhcp-config)network 192.168.10.0 255.255.255.0
Router(dhcp-config)default-router 192.168.10.1
Router(dhcp-config)exit
Router(config)#exi
f0/0 f0/0 f0/0 Router#write

Command on PC1
PC1(config)#interface fastethernet 0/0
PC1(config-if)#no shutdown
PC1(config-if)#ip address dhcp

PM Networking
13. Configure DHCP Server in your LAN Network :

192.168.10.100 Step #1:- we need to assign ip


address to DHCP Server manually.

DHCP Server

PM Networking
Step #2:- Enable DHCP Service on Server.
192.168.10.100

DHCP Server

Step #3:- Create pool and assign poolname.

Step #4:- Provides Default-Gateway, DNS server ip address, Start ip address and
subnet mask.
PM Networking
DHCP Server configuration is done.

Step #5:- Client will request for ip address to DHCP Server and
DHCP Server will offer IP address.
192.168.10.100

ip 192.168.10.2
D.G 192.168.10.100 DHCP Server

PM Networking
14. Configure DHCP Relay-agent : Command on R1
Router(config)interface fastethernet 0/0
Router(config-if)ip address 192.168.10.1 255.255.255.0
192.168.10.1/24 192.168.20.1/24
Router(config-if)#no shutdown
Router(config-if)#ip helper-address 192.168.20.2
Router(config-if)exit
Router(config)#int f0/1
Router(config-if)#ip address 192.168.20.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#

192.168.20.2/24
D.G- 192.468.20.1

IP Configuration on
DHCP Server.

PM Networking
Enable DHCP Service on Server
192.168.10.1/24 192.168.20.1/24

192.168.20.2/24
D.G- 192.468.20.1

Client got the ip address from


DHCP Server. PM Networking
14. Static Routing Configuration : PM Networking
/30
30 /30 /30 0.6
.1/ .2 .5 .1
0 0 0 68
8.1 8.1 8.1 2.1
16 .16 .16 19
2. 2 2
19 19 19

10.10.10.0/24
20.10.10.0/24 30.10.10.0/24

IP : 10.10.10.1/24 IP : 20.10.10.1/24 IP : 30.10.10.1/24


D.G :10.10.10.100 D.G :20.10.10.100 D.G :30.10.10.100
Command on R1 Command on R2
Router(config)interface fastethernet 0/0 Router(config)interface fastethernet 0/0
Router(config-if)ip address 10.10.10.100 255.255.255.0 Router(config-if)ip address 192.168.10.2 255.255.255.252
Router(config-if)#no shutdown Router(config-if)#no shutdown
Router(config-if)exit Router(config-if)exit
Router(config)#int f0/1 Router(config)#int f1/0
Router(config-if)#ip address 192.168.10.1 255.255.255.252 Router(config-if)#ip address 20.10.10.100 255.255.255.0
Router(config-if)#no shutdown Router(config-if)#no shutdown
Router(config-if)#exit Router(config-if)#exit
Router(config)#ip route 20.10.10.0 255.255.255.0 fast0/1 192.168.10.2 Rouer(config)#int f0/1
Router(config)#ip route 30.10.10.0 255.255.255.0 fast0/1 192.168.10.2 Rouer(config-if)#ip address 192.168.10.5 255.255.255.252
Rouer(config-if)#no shitdown
Rouer(config-if)#exit
Router(config)#ip route 10.10.10 255.255.255.0 fast0/0 192.168.10.1
Router(config)#ip route 30.10.10.0 255.255.255.0 fast 0/1 192.168.10.6

Command on R3
Router(config)interface fastethernet 0/0
Router(config-if)ip address 192.168.10.6 255.255.255.252
Router(config-if)#no shutdown
Router(config-if)exit
Router(config)#int f0/1
Router(config-if)#ip address 30.10.10.10 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#ip route 20.10.10.0 255.255.255.0 fast0/0 192.168.10.5
Router(config)#ip route 30.10.10.0 255.255.255.0 fast0/0 192.168.10.5
PM Networking

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy