CNE Tutorial 06 - General Router Conf and Static Routing Conf Updated
CNE Tutorial 06 - General Router Conf and Static Routing Conf Updated
This tutorial introduces the first basic step to configure a Cisco Router. You will practice router
configuration with Packet Tracer, a software which has powerful simulation, visualization, authoring,
assessment, and collaboration capabilities.
1. Use a console cable to connect a router (Console port) with a PC (RS 232 port) like the description
above.
For routers, Cisco provides a minimal configuration that requires you to give input before the devices
can perform their functions. The router has a console port that is used to access the device from a
directly attached terminal or PC with a terminal emulator.
2. Click on the PC, go to Desktop tab, choose Terminal. When you are asked to continue with
configuration dialog, type N or no then press Enter.
Router>
Router>enable
Router#
4. Use these privileged mode commands that work with configuration files:
- Go to the global configuration mode to modify the running configuration manually from the terminal:
configure terminal
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Router(config)#hostname FIT-HANU
FIT-HANU(config)#
FIT-HANU(config)#line console 0
FIT-HANU(config-line)#password yourpassword
FIT-HANU(config-line)#exit
FIT-HANU(config)#
FIT-HANU(config)#line vty 0 4
FIT-HANU(config-line)#password yourpassword
FIT-HANU(config-line)#exit
FIT-HANU(config)#
FIT-HANU(config)#interface fa0/0
FIT-HANU(config-if)#ip address 192.168.100.254 255.255.255.0
FIT-HANU(config-if)#no shutdown
• configure terminal – modify the running configuration manually from the terminal.
• copy running-config startup-config – copy the running configuration to the startup configuration.
• copy startup-config running-config – copy the startup configuration to the running configuration.
• copy tftp running-config – load a configuration file stored on a Trivial File Transfer Protocol (TFTP) server into the
running configuration.
There are actually two important configuration files on any router. There is the configuration file that
describes the current running state of the router, which is called the running-config. Then, there is the
configuration file that the router uses to boot, which is called the startup-config. Only the startup-config
is stored in NVRAM so any time you make changes to the router configuration, you must save the
changes to memory because if you do not they will be lost if there is a system reload or power
outage by simply copying the running-config onto the startup-config file.
- Draw a network like this example: Connect router with two switches, then each switch can be
connected with one or more PCs. Remember to use straight-through cable.
Configure PC1:
IP Address: 192.168.100.1
Subnet Mask: 255.255.255.0
GW: 192.168.100.254
Configure PC2:
IP Address: 192.168.100.2
Subnet Mask: 255.255.255.0
GW: 192.168.100.254
Configure PC3:
IP Address: 192.168.200.1
Subnet Mask: 255.255.255.0
GW: 192.168.200.254
Configure PC4:
IP Address: 192.168.200.2
Subnet Mask: 255.255.255.0
GW: 192.168.200.254
- From the terminal, try pinging PC1, PC2, PC3, PC4.
FIT-HANU#ping 192.168.100.1
FIT-HANU#ping 192.168.100.2
Don’t worry if the success rate at the first time you ping is only 80 percent. When you try pinging the
second time, the success rate will be 100 percent.
- From the command line of one PC you can also try pinging the Router and the other PCs.
Note: If you don’t know how to configure the devices, please do the tutorial in week 10 again.
After being successfully configured, all the red lights will turn to green. At this situation, PC0 and
Router0 are successfully connected to Switch0. They can ping each other. Laptop0 and Router1 are
successfully connected to Switch1. They can ping each other too. However we cannot ping from PC0 to
Laptop0 as network B is still invisible to Router0 and network A is still invisible to Router1. To make it
possible, we have to ‘teach’ the two routers, using the syntax:
ip route <ip address of the routed network> <its subnet> <ip of the next hope>
Router>
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fa0/1
Router(config-if)#ip address 10.0.0.1 255.255.255.0
Router(config-if)#exit
Router(config)#ip route 192.168.200.0 255.255.255.0 10.0.0.2
Similarly we have to teach the Router1 the route of network A which connects PC0 and Router0:
ip route 192.168.100.0 255.255.255.0 10.0.0.1
Router>
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface fa0/1
Router(config-if)#ip address 10.0.0.2 255.255.255.0
Router(config-if)#exit
Router(config)#ip route 192.168.100.0 255.255.255.0 10.0.0.1
To check how router remembers the routed network, we exit to privilege mode and type
show ip route
Now that the two routers have known how to reach devices of the routed networks, we can ping from
PC0 to Laptop0 and vice versa. Click on the PC icon, choose Desktop tab and choose Command Prompt
tool.