lab1

advertisement
CS 356 Lab 1
Router Configuration and Routing
Cisco 2600 Router
Configuration
Static Routing
Dynamic Routing
In this lab you will learn:
PartA
PartB
PartC
Explore!
Time: 2 hrs
50 min
30 min
40 min
Components used in this lab:
2 computers with Microsoft Windows 2000
1 Cisco Systems Catalyst 2900 Series Switch
1 Cisco 2600 Router
Required Reading
1. Study this handout.
2. RIP (Textbook pp. 238 – 240)
Part A: Cisco Router Configuration
Time: 50 min
Introduction
Cisco routers are powered by the Cisco Internetwork Operating System (IOS) that
allows the routers to be configured to perform specific tasks. Before you start the
configuration of a Cisco Router, you must understand the two EXEC modes available on
a router: user EXEC mode and privileged EXEC mode. User mode allows you to
perform basic trouble shooting tests, telnet to remote hosts, and list router system
information. You know that the router is in this mode if the prompt is the router name
followed by the ‘greater than’ sign: RouterName>. Privileged mode, sometimes called
“enable mode”, allows for full router configuration and advanced troubleshooting.
“RouterName#” is an example of the privileged mode prompt. If you log into a router via
a console or telnet connection, you enter user mode. Privileged mode requires that you
issue the enable command.
Before you actually configure a Cisco router, you must understand the two main
configuration modes: global configuration mode and interface configuration mode.
You use global configuration mode to configure router settings that affect overall router
operations. This is accomplished by the command configure after you are in the
privileged mode. If you wish to configure a particular interface, you must use interface
configuration mode. To enter this mode, you need to be in the global configuration mode.
You then enter the interface command followed by the name and number of the interface
you wish to enter. If the router is in global configuration mode, the prompt will be
1
RouterName (config) # while in interface configuration mode it will be
RouterName(config-if)#.
In this lab for each group of 3 students, there will be one designated router, one
switch, two PCs running Windows, and several Ethernet cables. It is the goal of this lab
to accustom you to the basic set up of a router. Most of the tasks require only one person
typing; let one person do the typing for one section and let the other two do the typing for
the next sections in turn.
You will configure the router to obtain the topology in the following diagram.
Hyper
Terminal
PC1
PC2
GroupA
LAN A
SwitchA
Router A
WAN
Router B
GroupB
LAN B
SwitchB
PC3
PC4
Hyper
Terminal
Lab Setup
1. One PC per group will be connected through the serial port to the router. One end
of the Ethernet cable will be plugged into the console port of the router and the
other end will be connected to the COM1 port of the PC.
2. Each group has a switch and router along with Ethernet cables (one for
connecting the PC to the switch, one for connecting the switch to the router, and a
crossover cable common to both groups for connecting the two routers together)
Task 1 – Use the program HyperTerminal to log on to the router
2
1. Verify that the router is turned off.
2. Launch HyperTerminal at Start, Programs, Accessories, Communication,
HyperTerminal. You will now need to configure HyperTerminal so that it
communicates with the router out of COM1.
3. Type router for the Connection Description Name.
4. In the Connect To window the fourth field is titled "Connect Using:" Scroll down
to select COM1, and then click OK.
5. Confirm and change if necessary the following settings in the COM1 Properties
window that pops up.
Bits Per Second:
9600
Data Bits:
8
Parity:
None
Stop Bits:
1
Flow Control:
Xon/Xoff
6. Click OK. At the bottom left of the window, it should say "Connected" with a
running count of the time for which the connection has been active.
7. Turn on the router. Observe the boot-up procedure displayed in HyperTerminal.
This lists information about the hardware, as well as the initial configuration. We
will modify this configuration. (Explore!)
8. Note that there are two Ethernet interfaces at the back of the router. These
interfaces should already each be currently assigned an IP address. You can see
this by executing the command show interfaces.
You can type the ? command at any time to receive context sensitive help.
Task 2 – Reset router configuration
Because we are unsure of the validity of the current configuration of the router, we
need to erase it and configure it by ourselves. To erase the current configuration, we must
be in Privileged Mode.
9. Type enable to enter Privileged Mode.
10. Type the password given on the chalkboard and press enter when prompt. The
prompt should now end with #.
11. Type erase startup-config to clear the current configuration that resides on the
router. (Note: Wait, it takes some time)
12. Confirm that you wish to erase nvram file system and wait till it completes
13. Type reload and confirm. This reboots the router and allows the changes to take
effect. (Note: Wait, this also takes some time)
14. Type no if asked to save changes.
Task 3 – Configure the router
3
Once the router has finished booting up, you will be in the System Configuration
Dialog.
15. Type yes to enter.
16. Type no to skip the basic management setup.
17. Type yes to see the current interface summary.
18. Type in the name of your group for the host name. (GroupA or GroupB)
19. Type in the password given on the chalkboard for the enable secret.
20. Type in the same password for the enable password. It will tell you not to use the
same password, but it is okay, just type it in again.
21. Type in the same password for the virtual terminal password.
22. Type no to configuring the SNMP Network Management.
23. Type yes to configure IP.
24. Type no to IGRP and RIP routing, and bridging and configuring Async lines.
25. Type yes to configure the FastEthernet 0/0 interface.
26. Type yes to use the RJ-45 connector.
27. Type yes to full duplex mode.
28. Type yes to configure IP on the interface.
29. Use the following IP addresses for the two interfaces of each router to answer the
next prompts.
Interface Names
FastEthernet 0/0
FastEthernet 0/1
Router A
192.168.0.1
192.168.100.1
Router B
192.168.50.1
192.168.100.2
Subnet Mask
255.255.255.0
255.255.255.0
30. Similarly configure the FastEthernet 0/1 interface.
31. Press Enter to save the newly created configuration. (do it yourself)
32. Type show interfaces.
33. Verify that the IP addresses were correctly assigned. (do it yourself)
34. Connect the host machines to the switch and connect the switch to the
FastEthernet 0/0 interface of the router using Ethernet cables.
35. Setup the host machines to have the required IP addresses as below and the
correct gateway as below. (do it yourself. Hint: Use ‘network properties’ in
Windows)
36. From your host, ping the other host on your network. (refer post lab 3)
Group A
Computer1
Computer2
IP Address
192.168.0.2
192.168.0.3
Subnet Mask
255.255.255.0
255.255.255.0
Gateway
192.168.0.1
192.168.0.1
Group B
Computer1
Computer2
IP Address
192.168.50.2
192.168.50.3
Subnet Mask
255.255.255.0
255.255.255.0
Gateway
192.168.50.1
192.168.50.1
4
One of the nice things about the Cisco IOS is the ability to query for command
syntax. For example if you don’t know what arguments are accepted for the show
command, type show ? and a list of possible arguments is displayed. (Explore!)
Part B: Static Routing
Time: 30 min
The remaining part of this lab is to connect the two routers of Group A and Group B
together so that machines in Group A and machines in Group B can communicate with
each other. The remainder of router configuration will be done via the Ethernet interface
of each host.
1. Use the other PC that is not running HyperTerminal to telnet to the router
interface that is connected to your switch. (do it yourself)
2. Type the password given on the board when prompted.
We will now set up a static routing table in each of the two routers. The idea is for the
table to indicate that the other group's network can be reached via the 0/1 interfaces of
both routers. To create a static entry in the routing table of the router, you must be in
Configuration Mode.
3. Enter privileged mode and type config terminal. (do it yourself)
4. Using the command ip route to set up the static routing table. (do it yourself)
The three values that this command takes are: 1. destination network/subnet number,
2. its subnet mask, and 3. the IP address of the next hop that can reach the destination
network. How would each group set up an entry in the routing table in its router so
that machines in Group A can access machines in Group B and vice versa?
5. By pinging a host from a host of the other group, verify that the static routing
table has been created, and hosts from both groups should be able to communicate
with each other.
6. To view the routing table, type show ip route. (Post Lab 1) (Does this command
work in the mode that you are in? find that out by typing ‘show ?’. If the
command is not available, change the mode.)
7. Gain information about the topology of our network: Type tracert on a host
within your group's network; record the information that is returned. Now execute
a tracert command on a host in the other group.
Exercise1: list the entries in the routing table.
Exercise2: record the output of the trace routes.
5
Part C: Dynamic Routing using RIP
Time: 40 min
Task 1 – Set up RIP
1. Delete all routing table entries using no ip routing followed by ip routing.
2. Type router ? to see what routing update protocols are supported by this IOS.
3. Use the command router rip to select RIP as the routing update protocol. (do it
yourself) Then, specify each of the network interfaces to which the router is
directly connected. As an example, if a router has interfaces connected to the
networks 172.198.20.0 and 192.89.7.0. The following configuration shows how to
set up a RIP process in the router.
router rip
network 172.198.20.0
network 192.89.7.0
4. Change modes if necessary.
5. Ping the other group.
Task 2 – Observe RIP
6. See it happen! Use the console port of the router to view the routing tables being
sent and received with: debug ip rip (do it yourself)
7. Don’t forget to do this command when you are done: undebug all
(Explore! How fast does RIP detect if a link goes down? How does RIP compare with the
other routing protocols available on this router?)
Exercise 4: Record the new routing table.
Exercise 5: Record how RIP sets up the routing table. (Step 5 above)
6
Post Lab (To be submitted in class on Tue, March 5)
1. Explain the entries in the static routing table obtained from Exercise1.
2. Explain the path obtained in Exercise2.
3. How was host1 able to ping host2 without configuring the routing table in Part A
step 36?
4. What strategy would you use to set up an access list? (Would you use the more
specific rules on top or the more general rules in the beginning?)
5. Explain what you recorded in Exercise 5.
6. Here is a list of commands you have used. Write a sentence about each.
enable
reload
show interfaces
ip route
config terminal
router rip
show running-config
show ip interfaces
7. List the things that you learned through this lab and list what you learned through
exploration.
7
Download