Cisco Router Basic Network Configuration
Cisco Router Basic Network Configuration
A good practice method for the CCNA exam (Cisco Certified Networking Associate) if you have the Cisco study tool Packet
Tracer is to download some practice labs that cover the CCNA objectives. A list of download links to 19 of these labs is
about half way down this page. For documentation about basic router configuration from Cisco, visit their page. For details
from Cisco on configuring Telnet, Console and AUX passwords, click here.
This first lab (1-1) covers basic Cisco router network configuration. I will walk you through all of the commands to
accomplish each objective of this lab. Before we get started, I will explain how to configure routers in the Packet Tracer lab
environment.
The way this lab has been setup resembles how you would configure a router in actuality. You must use the PC to open a
terminal (console) session to the router in order to configure it via the command line interface (CLI).
When the lab launches, click on “PC-PT Console Terminal”. This is the PC that has a console (light blue) cable connected to
the router that will be configured.
Click the “PC-PT Console Terminal” device.
Press the “enter” key to begin. Your prompt will show the router name followed by a greater than sign. This means that you
are in the User EXEC command mode.
Press the “enter” key to begin.
Type “enable” to enter the Privileged EXEC command mode and press “enter”. Remember that pressing the enter key will
tell the router to execute the command you have typed. The router name is now followed by a pound (#) symbol to show
this.
The router name is followed by a pound (#) symbol in Privileged EXEC command mode.
The command mode we must be in to change the name of the router is called Global configuration command mode and is
entered by typing “configure terminal”. This can also be done by entering “config t”. The router name is now followed by
the word “config” in parenthesis followed by the pound (#) symbol.
HINT: When typing commands in the CLI you can press the “tab” key to auto complete the command. This will save you
lots off typing although it is not always necessary to have each word in a command completely spelled out.
HINT: Use the question mark (?) when not sure about the syntax or availability of commands. It will show you which of all
the available commands are for the command mode you are in. You can use it after typing a few letters of a word or after
one or two words of a command.
Global configuration command mode and is entered by typing “configure terminal”.
We are now prepared to enter the commands to complete the lab. Below are the lab’s scenario and instructions:
Once in the global configuration mode, type “hostname” followed by a space and the new router name which is “RanetA”.
After pressing enter you will see the prompt change from “Router(config)#” to “RanetA(config)#”.
After pressing enter you will see the prompt change from “Router(config)#” to “RanetA(config)#”.
This password will be required to enter privileged EXEC command mode. In global configuration mode enter “enable secret
ranetenablepass”.
In global configuration mode enter “enable secret ranetenablepass”.
This password will deter unauthorized access to the router via the console connection. While in global configuration mode
enter
“line con 0
password ranetenablepass
login
end”.
You will then be dropped down into the privileged EXEC command mode after entering the “end” command. “Exit can also
be used instead of “end”.
4. Set telnet password to be “ranettelnetpass”
“The VTY lines are the Virtual Terminal lines of the router, used solely to control inbound Telnet connections. They are
virtual, in the sense that they are a function of software – there is no hardware associated with them. They appear in the
configuration as line vty 0 4” (cisco.com). To set the Telnet password type:
“line vty 0 4
password ranettelnetpass
exit”.
Note: The “exit” command will drop you down into the global configuration command mode.
5. Set IP address of interface Fastethernet 0/0 to be the first address of network 10.0.0.0/30
The first useable IP address of the 10.0.0.0/30 network is 10.0.0.1. A /30 network means the subnet mask is
255.255.255.252. To accomplish this objective we must enter the interface configuration command mode for fast ethernet
port 0/0 and set the interface’s IP address as well as its subnet mask. The “exit” command will drop us back into the global
configuration command mode. While in global configuration command mode type
We will follow the same instructions as step 5 to configure fast ethernet port 0/1. A /26 network means the subnet mask is
255.255.255.128.
In order for a port to be turned on or activated, the “no shutdown” command must be entered for each interface.
You should see status updates in the CLI that both configured interfaces are “up”.
You should see status updates in the CLI that both configured interfaces are “up”.
Now that you have completed the configuration of the router, test your work.
To test connectivity between routers Ranet A and Ranet B we will execute a ping command. While in privileged EXEC
mode of router Ranet A enter
“ping 10.0.0.2”.
If things are correct, you should have an 80-100% ICMP success rate (see screenshot).
If things are correct, you should have an 80-100% ICMP success rate.
2. Telnet from Ranet PC to Ranet A by using IP address 192.168.0.254 and telnet password as above.
To telnet from Ranet PC, open the Ranet PC desktop and click the command prompt.
To telnet from Ranet PC, open the Ranet PC desktop and click the command prompt.
“telnet 192.168.0.254
ranettelnetpass”.
In the command prompt type “telnet 192.168.0.254 ranettelnetpass”.
If you see RanetA>, congratulations! You have reached the user EXEC command mode of the Ranet A router.
The list of commands below are an example of how you can type all the router commands into a plain text file and paste it
into the router CLI. Be sure to order them correctly and remember which command mode you are in.
enable
configure terminal
hostname RanetA
enable secret ranetenablepass
line con 0
password ranetenablepass
login
end
configure terminal
ranetenablepass
configure terminal
line vty 0 4
password ranettelnetpass
exit
interface fastethernet 0/0
ip address 10.0.0.1 255.255.255.252
exit
interface fastethernet 0/1
ip address 192.168.0.254 255.255.255.192
exit
interface fastethernet 0/0
no shutdown
exit
interface fastethernet 0/1
no shutdown
exit
exit
exit
Cisco Router IPv4 Addressing
(CCNA Lab 1-2)
Posted on July 29, 2013 by Alex — No Comments ↓
This lab will help us better understand configuring a router’s serial and fast ethernet interfaces. This builds upon what was
covered in CCNA Lab 1-1. The scenario for this lab is as follows:
You are the network administrator at Ranet, and have to config the router “Ranet-BR” via Console Terminal as below:
1. enable interface Se 0/0/0 and set IP address /Subnet Mask so that it can connect with router “Ranter-HQ” at
192.168.0.254/30
2. enable interface Se 0/1/0 and set IP address /Subnet Mask so that it can connect with router “Ranter-BR1-1” at
192.168.0.30/30
3. The Headquaters has given IP address range 192.168.0.0/27 for the network behind our router, then you have to:
3.1 enable interface Fa 0/0 and set IP address/Subnet Mask to be the last IP of this subnet that has 10 host as members.
3.2 enable interface Fa0/1 and set IP address/Subnet Mask to be the last IP of this subnet that has 5 host as members.
3.3 Set IP address/Subnet Mark of Host1 in each LAN to be the first IP of its own subnet, and set IP of gateway also
If the configuration is correct, Host1 in each subnet will be able to ping Ranet Server at 192.168.0.33.
CCNA lab 1-2 network topology.
1. enable interface Se 0/0/0 and set IP address /Subnet Mask so that it can connect with router “Ranter-HQ” at
192.168.0.254/30
After consoling into router Ranet-BR enter the global configuration command mode.
Ranet-BR>enable
Ranet-BR#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ranet-BR(config)#
Enter the interface configuration command mode for serial interface 0/0/0 and set the IP address to 192.168.0.253
255.255.255.252 (this is the only other useable IP address in that subnet).
Ranet-BR(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
2. enable interface Se 0/1/0 and set IP address /Subnet Mask so that it can connect with router “Ranter-BR1-1” at
192.168.0.30/30interface fastethernet 0/0
ip address 192.168.0.14 255.255.255.240
no shutdown
Ranet-BR(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1/0, changed state to up
3. The Headquaters has given IP address range 192.168.0.0/27 for the network behind our router, then you have to:
3.1 enable interface Fa 0/0 and set IP address/Subnet Mask to be the last IP of this subnet that has 10 host as
members.
3.2 enable interface Fa0/1 and set IP address/Subnet Mask to be the last IP of this subnet that has 5 host as members.
Ranet-BR(config-if)#exit
3.3 Set IP address/Subnet Mark of Host1 in each LAN to be the first IP of its own subnet, and set IP of gateway also.
On each Host1, open the desktop tab and click IP configuration and enter the appropriate settings.
Set the IP address of Host1 on LAN1 as 192.168.0.1, subnet mask as 255.255.255.240 and default gateway as 192.168.0.14.
Set the IP address of Host1 on LAN2 as 192.168.0.17, subnet mask as 255.255.255.248 and default gateway as 192.168.0.22.
If the configuration is correct, Host1 in each subnet will be able to ping Ranet Server at 192.168.0.33.
Execute a ping command from Host1 on each LAN. Ping 192.the Ranet Server at 168.0.33 to test network connectivity.
Ping the Ranet Server from Host1 on LAN1.
Ping the Ranet Server from Host1 on LAN2.
If you get replies from your pings than you did it! Great job completing this lab.
Router Simulator Supported
Commands
List of Router Commands
access-list <list-num> {permit Only standard access list of the format given is
1
| deny} <source-ip-address> supported.
access-list <100-199>
{permit/deny} protocol source-
addr [source-mask] [operator
2 Global command for extended access-lists
operand] destination-addr
[destination-mask] [operator
operand]
access-list <list-num>
3 {permit/deny} protocol <source-
addr> any operator operand
access-list <list-num>
4 {permit/deny} protocol <source-
addr> any
access-list <list-num>
{permit/deny} protocol host
5
<source-addr> <dest-
addr><dest-mask>
access-list <list-num>
6
{permit/deny} protocol any any
access-list <list-
num>{permit/deny} protocol
7
any host <dest-addr> operator
operand
8 access-list <list-num>
{permit/deny} protocol host
<source-addr> any operator
operand
access-list <list-num>
{permit/deny} protocol <source-
9
addr> <source-wmask> host
<dest-addr>
12 cdp advertise-v2
13 cdp enable
14 cdp run
17 clear arp-cache
20 configure terminal
25 copy running-config tftp: Running configuration file is copied to TFTP server
26 copy tftp: running-config Copies configuration file from TFTP server to new router
27 copy tftp: startup-config Copies configuration file from TFTP server to new router
28 debug ip packet
29 disable
30 disconnect
31 disconnect <TELNET_ID>
35 enable
38 erase startup-config
39 encapsulation dot1q <vlan id> Command for router in interface configuration mode.
42 end
exec-timeout <minutes>
43 seconds is optional.
[seconds]
44 frame-relay lmi-type <lmi_type> LMI type is specific to the entire interface,not to a VC.
frame-relay map<protocol-
45 It configures the manual resolution of PVC's.
name> <ip-address> <dlci_num>
frame-relay map<protocol-
46 name> <ip-address> <dlci_num>
broadcast
frame-relay map<protocol-
47 name> <ip-address> <dlci_num>
broadcast cisco
frame-relay map<protocol-
48 name> <ip-address> <dlci_num>
broadcast ietf
frame-relay map<protocol-
49 name> <ip-address> <dlci_num>
cisco
frame-relay map<protocol-
50 name> <ip-address> <dlci_num>
ietf
51 hostname <host-name>
52 interface ethernet 0
interface fa <Slot-
54
number>/<Port-number>
interface fa <Slot-
56 number>/<Port-
number>.<Subint-number>
58 interface serial 0
59 ip access-group <named ACL> Interface sub command to enable named access-list
60 ip access-group <num> in
64 ip default-network <ip-address>
65 ip domain-lookup
66 ip name-server<ip-address>
ip route<ip-address> <ip-
76
address> <ip-address>
79 ip routing
80 ipx routing
91
ip cef Enables CEF on the cisco router
new
92 keepalive <seconds>
93 line aux
94 line console 0
95 line vty
96 logging synchronous
97 login
98 logout
103 no ip address
104 no ip routing
no frame map<protocol-name>
107 <ip-address> <dlci_num>
broadcast
no frame map<protocol-name>
108
<ip-address> <dlci_num> cisco
no frame map<protocol-name>
109
<ip-address> <dlci_num> ietf
110 no ip domain-lookup
117 no shutdown
125
ping mpls ipv4 <address> Used to test MPLS connectivity
new
126 reload
131 shutdown
show frame-relay pvc Shows all the frame relay PVC's terminated and their
139
<dlci_num> statistics at a specified router
168 show ipv6 route Displays routes in the IPV6 routing table.
170 service dhcp Enables and disables the DHCP server feature on router
171 show ip dhcp binding To view the addresses assigned to clients on dhcp server
172
show mpls interface To verify that the interfaces are configured to use LDP.
new
173 show mpls forwarding-table shows MPLS forwarding table information
new
174 Shows that the LDP session between routers was
show mpls ldp neighbor
successfully established
new
188 no auto-summary
3 configure terminal
4 cdp advertise-v2
9 cdp run
10 duplex <duplex-type>
11 description <phrase>
12 disable
13 enable
14 erase startup-config
17 end
18 hostname <name>
interface fastethernet <0-0>/<0- Depends on the switch type. For module 0, port 1 the
19
24> command is interface fastethernet 0/1
20 ip default-gateway <ip-address>
24 ip name-server <ip-address>
26 line vty 0 15
27 line console 0
28 login
29 logout
31 no ip address
32
no spanning-tree vlan <vlan-id> Disables STP on a specified VLAN.
new
36 password <password>
37 reload
38 show interfaces
39 show history
43
show spanning-tree summary Displays summary of port states.
new
48 show startup-config
49 show flash
50 show running-config
54
spanning-tree vlan <vlan-id> Enables STP on a specified VLAN
new
60 spanning-tree port-priority
Configures port priority on a specified interface.
new <port_priority>
63 switchport mode access Access mode of the switch is set to access
64 switchport mode trunk Access mode of the switch is set to trunk
switchport port-security
67
violation <violat_mode>
vlan <vlan_num> name VLAN numbers can range 1-1000, VLAN name can be
70
<vlan_name> upto 32 characters
Place the switch in VTP client mode. But it does not store
71 vtp client
VLAN information in non-volatile memory.
72 vlan database
76 vtp pruning