Programming the ports. The router
has three ports (e0, s0 and s1). One of the most
important things to set on the router is the IP
address of each of the ports. These ports will be
used as gateways out of the network segment to which
they connect to. The interface command (or int for
short) programs each of the interfaces. In the following
example, the three ports on the router are programmed
with the required IP addresses, and subnet masks.
The ports will not automatically come on-line, and
will start in a shutdown mode. Thus the no shutdown
command is used to start them up. They are programmed
with:
1
Go to Priv Exec mode
2
Enter config t command.
3
Enter interface e0 command
to program the ethernet 0 port.
4
Enter ip address 192.5.5.1 255.255.255.0
command.
5
Enter no shutdown command.
6
Enter exit command.
7
Enter interface s0 command
to program the serial 0 port.
8
Enter ip address 205.7.5.1 255.255.255.0
command.
9
Enter no shutdown command.
10
Enter exit command.
11
Enter interface s1 command
to program the serial 1 port.
12
Enter ip address 201.100.11.1 255.255.255.0
command.
13
Enter clock rate 56000
command to set the clock rate of the serial
port to 56kbps.
13
Enter no shutdown command.
14
Enter exit command.
15
Enter show protocols command
to see if the IP addresses have been changed,
and that the ports are now active (that is,
"UP").
Other interface commands include:
keepalive 10- Set the time interval
for the keepalive signal (in this case to 10 seconds).
bandwidth 64- Set the bandwidth
on the port (in this case to 64 kbps).
Ping'ing the ports. The show protocols
command shows if the ports are UP, but the best
way to really test them is to use the ping command.
1
Go to Priv Exec mode
2
Enter ping 192.5.5.1 and
provide that the port is alive.
2
Enter ping 205.7.5.1 and
provide that the port is alive.
2
Enter ping 201.100.11.1
and provide that the port is alive.
7
Enter interface e0 command
to program the serial 0 port.
8
Enter shutdown command.
9
Enter exit command.
7
Enter interface s0 command
to program the serial 0 port.
8
Enter shutdown command.
9
Enter exit command.
7
Enter interface s1 command
to program the serial 0 port.
8
Enter shutdown command.
9
Enter exit command.
2
Enter ping 192.5.5.1 and
provide that the port is not alive.
2
Enter ping 205.7.5.1 and
provide that the port is not alive.
2
Enter ping 201.100.11.1
and provide that the port is not alive.
Setting a routing protocol to RIP. The router will not be able to connect to other
routers unless it runs a routing protocol which
is the same as the other routers. This allows the
routers to determine the best path to a remote device.
In this case the RIP protocol is set-up with the
router rip command, and then each of the networks
in which the router will broadcast its routing table
are defined (using the network command). RIP is
one of the most widely used routing protocols, and
measures the best route by the number of hops that
it takes to get to a destination.
1
Go to Priv Exec mode
2
Enter config t command.
3
Enter router rip command
to define the RIP protocol.
4
Enter network 192.5.5.0
command.
5
Enter network 205.7.5.0
command.
6
Enter network 201.100.11.0 command.
7
Enter exit command.
8
Enter exit command.
9
Enter show running-config
command to see if the networks have been added.
Removing a network. Often it is
not required that the routing table is broadcast
into some of the connected networks, thus to remove
a network:
1
Go to Priv Exec mode
2
Enter config t command.
3
Enter router rip command.
4
Enter no network 205.7.5.0
command.
5
Enter exit command.
6
Enter exit command.
7
Enter show running-config
command to see if the networks have been deleted.
Setting a routing protocol to IGRP. IGRP is an improvement on RIP, and it based on an
AS (Autonomous System) number.
1
Go to Priv Exec mode
2
Enter config t command.
3
Enter router igrp 111
command, where 111 is the AS number.
4
Enter network 192.5.5.0
command.
5
Enter network 205.7.5.0
command.
6
Enter network 201.100.11.0 command.
7
Enter exit command.
8
Enter exit command.
9
Enter show running-config
command to see if the networks have been added.
Setting the name server.
1
Go into the privileged mode
by typing enable.
3
Configure the device using by typing config
t.
4
From the config mode,set the domain-name
is mycomp.com, the name-server to 192.168.0.10,
using:
(config)#
ip domain-name mycomp.com (config)#
ip name-server 192.168.0.10
5
Go back to the user executive
mode with the command exit.
6
Show the main system configuration with
show
running-config.
Setting up host names. Apart from
setting up a name server, it is also possible to
assign names localling in a hosts table. These map
domain names to associated IP addresses.
1
Go into the privileged mode
by typing enable.
3
Configure the device using by typing config
t.
4
From the config mode, set the host names
with:
(config)#
ip host LAB_A 192.5.5.1 205.7.5.1 201.100.11.1 (config)#
ip host LAB_B 201.100.11.2 219.17.100.1 199.6.13.1 (config)#
ip host LAB_C 223.8.151.1 204.204.7.1 (config)#
ip host LAB_D 210.93.105.1 204.204.7.2 (config)#
ip host LAB_E 210.93.105.2
5
Go back to the user executive
mode with the command exit.
6
Show the main system configuration with
show
running-config.