Basic Router Config
Basic Router Config
The first step in configuring a Cisco router is to access the device. This can be
done using a variety of methods, including Telnet, SSH, and the Cisco
Configuration Professional (CCP) tool. The most common method is to use Telnet
or SSH to access the router's command-line interface (CLI). To do this, you will
need to know the IP address of the router and have a Telnet or SSH client
installed on your computer.
To access a Cisco router using Telnet, open a command prompt and enter the
following command;
telnet IP_ADDRESS
For example, to access a router with the IP address of 192.168.1.1, you would
enter the following command;
telnet 192.168.1.1
To access a Cisco router using SSH, open a command prompt and enter the
following command;
ssh USERNAME@IP_ADDRESS
For example, to access a router with the IP address of 192.168.1.1 using the
username "admin", you would enter the following command;
Once you have accessed the router, you will be prompted to enter a username
and password. If you are using Telnet, the default username is "admin" and the
default password is "password". If you are using SSH, the default username and
password are both "admin".
1
Basic Router Configuration Commands
Once you have accessed the router, you can start configuring the device.
The following are some of the most commonly used Cisco router basic commands
for configuring the device −
enable − This command is used to enter enable mode, which gives you
access to all of the router's configuration commands.
configure terminal − This command is used to enter global configuration
mode, which allows you to make changes to the router's global
configuration.
interface interface_name − This command is used to enter interface
configuration mode, which allows you to make changes to a specific
interface on the router.
hostname hostname − This command is used to set the hostname of the
router.
enable secret password – This command Specifies an encrypted password
to prevent unauthorized access to the router.
ip address IP_ADDRESS SUBNET_MASK − This command is used to
configure the IP address and subnet mask of an interface.
no shutdown − This command is used to enable an interface that has been
previously shut down.
exit − This command is used to exit the current configuration mode and
return to the previous mode.
end − This command is used to exit configuration mode and return to
privileged mode.
2
For example;
1. To set the hostname of a router to "Router1", you would enter the following
commands
enable
configure terminal
hostname Victoria1
end
2. To set the enable secret, you would enter the following command
enable
configure terminal
end
enable
configure terminal
interface FastEthernet0/0
no shutdown
3
Basic Router Troubleshooting Commands
show ip route − This command is used to display the routing table of the
router, which shows the paths that packets take to reach their destination.
For example;
show running-config
show interfaces
4
3. To test the connectivity between a router and an IP address of
192.168.1.100, you would enter the following command;
ping 192.168.1.100
4. To trace the path that packets take to reach an IP address of 8.8.8.8, you
would enter the following command;
traceroute 8.8.8.8
5. To enable debugging for routing on a router, you would enter the following
command;
debug ip routing
5
Cisco 800M Series ISR Software Configuration Guide
To configure the global parameters for your router, follow these steps.
SUMMARY STEPS
1. configure terminal
2. hostname name
4. no ip domain-lookup
DETAILED STEPS
Command Purpose
Step configure terminal Enters global configuration mode, when using the console
1 port.
Example:
Router> enable
Router(config)# no ip domain-
6
lookup
You can connect WAN interfaces either by using straight polarity connectors or reversed polarity
connectors.
Straight Polarity: If Mag-jack RJ45 connector has a dot or digit marked on front housing, it can be
used with any type of cables.
Reversed Polarity: If Mag-jack RJ45 connector has no dots or digit marked on front housing, it
can be used with coupler and short cable (Cat5E UTP cable) to connect other devices which
doesn’t support auto polarity correction.
To configure Gigabit Ethernet (GE) WAN interfaces, follow these steps, beginning in global configuration
mode.
SUMMARY STEPS
1. configure terminal
4. no shutdown
5. exit
DETAILED STEPS
Command Purpose
Step interface gigabitethernet slot/port Enters the configuration mode for a Gigabit Ethernet
2 interface on the router.
Example:
Note GigabitEthernet WAN Interfaces are 0/8 and 0/9
Router(config)# interface for Cisco C841M-8X ISR and 0/4 to 0/5 for Cisco
gigabitethernet 0/8 C841M-4X
7
Step ip address ip-address mask Sets the IP address and subnet mask for the specified
3 GE interface.
Example:
Router(config-if)# ip
address 192.168.12.2
255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
The loopback interface acts as a placeholder for the static IP address and provides default routing
information.
To configure a loopback interface, follow these steps, beginning in global configuration mode.
SUMMARY STEPS
1. configure terminal
4. exit
DETAILED STEPS
Command Purpose
8
Rou
Step interface type number Enters configuration mode for the loopback interface.
2
Example:
Step ip address ip-address mask Sets the IP address and subnet mask for the loopback
3 interface.
Example:
Router(config-if)# ip address
10.108.1.1 255.255.255.0
Router(config-if)# exit
To configure parameters to control access to the router, perform the following steps.
SUMMARY STEPS
1. configure terminal
3. password password
4. login
7. password password
8. login
9. end
9
10
DETAILED STEPS
Command Purpose
Step line [ aux | console | tty | vty ] line- Enters line configuration mode, and specifies the
2 number type of line.
Example:
Step password password Specifies a unique password for the console terminal
3 line.
Example:
Router(config)# password
5dr4Hepw3
Router(config-line)# login
Step exec-timeout minutes [ seconds ] Sets the interval that the EXEC command interpreter
5 waits until user input is detected. The default is 10
Example: minutes. You can also optionally add seconds to the
Router(config-line)# exec-timeout 5 interval value.
30
Step line [ aux | console | tty | vty ] line- Specifies a virtual terminal for remote console
6 number access.
Example:
Router(config-line)# password
11
aldf2ad1
Router(config-line)# login
Router(config-line)# endRouter#
To manually configure Gigabit Ethernet (GE) LAN interfaces, follow these steps, beginning in global
configuration mode.
SUMMARY STEPS
1. configure terminal
4. no shutdown
5. exit
DETAILED STEPS
Command Purpose
Step interface gigabitethernet slot/port Enters the configuration mode for a Gigabit Ethernet
2 interface on the router.
Example:
Note GigabitEthernet LAN Interfaces are 0/0 to 0/7
Router(config)# interface for Cisco C841M-8X ISR and 0/0 to 0/3 for Cisco
gigabitethernet 0/1
12
C841M-4X ISR.
Step ip address ip-address mask Sets the IP address and subnet mask for the specified
3 GE interface.
Example:
Router(config-if)# ip
address 192.168.12.2
255.255.255.0
Router(config-if)# no shutdown
Router(config-if)# exit
13