3 Router Configuration - Cisco Networking Academy

advertisement
Router Configuration Lab: Default Route
172.16.0.0
172.17.0.0
172.18.0.0
Step 1: Cabling
1. Connect a console cable from the Router’s console port to a com port on the PC
2. Connect a straight-through cable from the PC’s 2nd NIC to a port on the hub
3. Connect a straight-through cable from the hub to the Router’s E0 LAN port
4. Connect a Serial Cable from the Serial 0 port on R1 to the Serial 0 port on R 2 (The
DCE end of the cable should be on R1 )
5. Disconnect your MAIN NIC from the C jack for this lab. Don’t forget to reconnect
it when done!!
Step 2: Configure host computer IP settings.
a. Make sure that the host computers are connected according to the topology diagram.
b. Configure the hosts with static IP addresses using the following settings.
H1 attached to the Hub1:
IP address: 172.16.0.2
Subnet mask: 255.255.0.0
Default gateway: 172.16.0.1
H2 attached to Hub 2:
IP address: 172.18.0.2
Subnet mask: 255.255.0.0
Default gateway: 172.18.0.1
Step 3: Start a Hyperterminal Session
a) Start HyperTerminal on the PC (Start > Programs > Cisco)
b) Select a COM port that matches the port where the RJ-45-to-DB-9 connector is
connected to the PC. The COM port is usually COM1 or COM2.
c) Configure the terminal emulation parameters as follows:
a. 9600 baud
b. 8 data bits
c. no parity
d. 1 stop bit
e. no flow control and no parity
d) Save the session settings in the D Drive and name it Router
Step 2: Login to the Router in user EXEC mode
a. Hit enter to get started
b. Type Cisco if you are prompted for a password
Step 3: Enter privileged EXEC mode
 Router>enable
a. If prompted for a password, enter the password class
Step 4: ERASE the current configuration and RELOAD the Router
a. Router# erase start
b. Router# reload
Step 5: Log back into the Router and re-enter privileged mode
a.
Router>enable
b.
The Router will try to enter SETUP mode because there is no
configuration – type NO or N and then Yes to terminate auto-install
Step 6 Enter global configuration mode
 Router#configure terminal (or config t)
Note: global configuration mode is used to make configuration changes to the Router
Step 7 Configure a hostname for the Router
 Router(config)#hostname R1
OR
 Router(config)#hostname R2
Step 8 Configure the Banners - complete on R1 and R2
 Router (config)# banner motd #Unauthorized use prohibited#
 Router (config)# banner login #Welcome to R1 (or R2)#
Step 9 Configure the enable secret password
 Router (config)#enable secret class
Step 10 Configure the Console Password
a. Configure the console password on the Router and exit from line console mode
Router (config)#line console 0
Router (config-line)#password cisco
(or pass cisco)
Router (config-line)#login
Router (config-line)#exit
Router (config)#
Step 11 Configure the Telnet Sessions Password
a. Configure the password on the virtual terminal lines and exit line mode:
Router (config)#line vty 0 4
Router (config-line)#password cisco
(or pass cisco)
Router (config-line)#login
Router (config-line)#exit
Router (config)#
Step 12 Configure the Serial 0 interface. This is the interface that connects the
Routers together.
From global configuration mode, configure serial interface Serial 0 on the Router
R1(config)#interface serial 0
(or int s0)
R1(config-if)#ip address 172.17.0.1 255.255.0.0
R1(config-if)#clock rate 56000
R1(config-if)#description WAN Link to R2
R1(config-if)#no shutdown
OR
R2(config)#interface serial 0
(or int s0)
R2 (config-if)#ip address 172.17.0.2 255.255.0.0
R2(config-if)#description WAN Link to R1
R2 (config-if)#no shutdown
Note: The 2 Router interfaces are on the same network, and must have a separate
network number .Only one side of the connection will have a clockrate: set the clockrate
only on the R1 router. The command no shutdown turns on the interface. Shutdown is
when the interface is off.
Step 14 Configure the Ethernet interface. This is the interface connecting to your
LAN.
R1(config)#interface Ethernet 0
(or int E0)
R1(config-if)#ip address 172.16.0.1 255.255.0.0
R1(config-if)#Description R1 LAN Default Gateway
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
OR
R2(config)#interface Ethernet 0
(or int E0)
R2 (config-if)#ip address 172.18.0.1 255.255.0.0
R2(config-if)#Description R2 LAN Default Gateway
R2 (config-if)#no shutdown
R2 (config-if)#exit
R2 (config)#
Step 15 Configure a default route on each router. In order for the routers to talk to
each other, they must know how to reach all of the networks connected to each router. A
default route will tell each router to send all packets that are not destined for its own LAN
to the S0 interface of the other router.
R1(config)#ip route 0.0.0.0 0.0.0.0 172.17.0.2
OR
R2(config)# ip route 0.0.0.0 0.0.0.0 172.17.0.1
Step 16 Configure the IP host table for the network
a. Create a name for each Router in the network. Enter that name along with the IP
addresses of each of the router’s interfaces. Although the name does not have to
match the configured hostname of the Router, that would be the normal
procedure.
 R1(config)#ip host R2 172.17.0.2 172.18.0.1
OR

R2(config)#ip host R1 172.16.0.1 172.17.0.1
Step 17: Configure other parameters for using the CLI
a) Configure password encryption
 Router(config)#service password-encryption
b) Turn off console messages
 Router (config)#logging synchronous
c) Turn off DNS lookup for commands
 Router (config)#no ip domain-lookup
Step 18 Save the configuration
a. Exit out of configuration mode
 Router #exit
b. Save the running configuration to the startup configuration at the privileged
EXEC mode:
Router #copy running-config startup-config
(or copy run start)
Step 19 Show the active configuration file: Use the tables at the start of the lab to check
the configuration you created. Check all IP addresses, subnet masks, passwords, routing
protocols, network numbers, and host names.
 Router #show running-config
(or show run)
Step 20 Check to see that your interfaces are up and running
a. Check the Interface status
 Router # show interfaces
(or show int)
b. Each interface should be shown separately, with a status line that tells you if that
interface is up and running. The interface that connects the 2 R1s will only be up
if both ends are configured properly. You should see:
“Serial 0 is up, Line Protocol is up”
c. If you get a message that Serial 0 or Serial 1 is down, check the cable – this is a
layer 1 issue
d. If you get a message that Line protocol is down, check the clockrate, IP address
and subnet mask on the interface – this is a layer 2 issue
Step 21 Testing your Network with Ping
a) Ping your own router by using it’s hostname
 R1# ping R1
 R2# ping R2
b) Ping the host on your LAN
 R1# ping 172.16.0.2

c)
R2# ping 172.18.0.2
Test the network - Ping the IP address of each of the interfaces on your
neighbor’s router
a. R1# ping 172.17.0.2
b. R1# ping 172.18.0.1
c. R2# ping 172.17.0.1
d. R2# ping 172.16.0.1
d) Ping your neighbor’s router, by using its hostname
e. R1#ping R2
f. R2#ping R1
Note: Ping tests the physical connections between the LAN and WAN, and tests IP
addressing. Pinging a R1’s hostname tests the DNS host table entries you configured.
Step 22 Test the upper layer protocols, and routing protocols of your network, with
Telnet
a. Telnet to your neighbor’s Router: If you are successful, you should see a message
that says press enter to start, and then be prompted for a password.
 R1# telnet R2

R2# telnet R1
b. Use some show commands to look around in your neighbor’s R1.
c. Exit out of their R1 by typing exit
Note: If you can NOT telnet to your neighbor’s Router, it is because the routing protocols
and network numbers might not be configured properly, or the host names might not be
configured properly.
Step 23 Save a Backup Copy of your Configuration to a Text File:
Capture the configuration file to a Text File - Use HyperTerminal to capture all the text
displayed on the Show Run screen to a text file.
a. In HyperTerminal click on Transfer/ Capture Text
b. Use the name of the R1 or R2 for the filename and use .txt for the extension –
make sure you put it somewhere accessible
c. Click on the Start button to start capturing text.
d. Enter the show run command. Press the space bar when the "- More -“ prompt
appears.
e. Stop capturing the configuration file – select Transfer > Capture text > Stop
f. Clean-Up the text file: The captured text file will have information not required
for configuring a Router. For example, the "- More -" prompts are not required.
g. Open NotePad and remove the lines in the config file that show:
Show running-config
Building configuration
Current configuration:
More –
h. Remove any Lines that appear after the word "End"
i. At the end of each of the interface sections add the command : No Shutdown
Download