Lab 4A: Configuration of Interfaces of a Router
Use the network topology and IP addressing scheme shown below to complete this task.
Device Interface number IP address Subnet mask Default gateway
PC0 Fa0 [Link] [Link] [Link]
PC1 Fa0 [Link] [Link] [Link]
Router0 Fa0/0 [Link] [Link] -
Router0 Fa1/0 [Link] [Link] -
Router1 Fa0/0 [Link] [Link] -
Router1 Fa1/0 [Link] [Link] -
Activities:
1. Create the network topology shown above. Use a generic router.
2. Configure IP addresses for each pc.
3. Configure IP address for the interfaces of each router and enable them
4. Verify the interface configuration of the routers
5. Check the connectivity between the pcs and router interfaces. Which interfaces can the pcs reach? Why?
6. Save the configuration
First create the topology as shown in the diagram and configure the correct IP address, subnet mask and default
gateway for each computer.
Configuration on Router0
Router>
Router>en
Router#conf t
Router(config)#hostname Router0
Router0(config)#int fa 0/0
Router0(config-if)#ip address [Link] [Link]
Router0(config-if)#no shut
Router0(config-if)#exit
Router0(config)#int fa 1/0
Router0(config-if)#ip add [Link] [Link]
Router0(config-if)#no shut
Router0(config-if)#exit
Router0(config)#exit
Router0#
Configuration on Router1
Router>
Router>en
Router#conf t
Router(config)#hostname Router1
Router1(config)#int fa 1/0
Router1(config-if)#ip add [Link] [Link]
Router1(config-if)#no shut
Router1(config-if)#
Router1(config-if)#int fa 0/0
Router1(config-if)#ip add [Link] [Link]
Router1(config-if)#no shut
Router1(config-if)#exit
Router1(config)#exit
Router1#exit
Verify the interface configurations
On Router0
Router0#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 [Link] YES manual up up
FastEthernet1/0 [Link] YES manual up up
Serial2/0 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down
Route0r#
From the output of Router0, it can easily be seen that both interfaces are working and assigned correct IP
addresses. Similarly, you can verify the this information using other verification commands like sh run.
On Router1
Router1#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 [Link] YES manual up up
FastEthernet1/0 [Link] YES manual up up
Serial2/0 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
FastEthernet4/0 unassigned YES unset administratively down down
FastEthernet5/0 unassigned YES unset administratively down down
Router1#
Use ping to verify the connectivity between devices. Since, we haven’t yet configured any routing service on the
routers, connectivity is not complete.
Use Router0#copy running-config startup-config
and
Router1#copy running-config startup-config
commands on each router to save your configuration.
Lab 4B: Configuration of Routing Protocols-- Static routing protocol
Use the network topology and IP address information shown below to configure static routing protocol.
Device Interface number IP address Subnet mask Default gateway
PC1 Fa0 [Link] [Link] [Link]
PC2 Fa0 [Link] [Link] [Link]
R1 Fa0/0 [Link] [Link] -
R1 Fa1/0 [Link] [Link] -
R2 Fa0/0 [Link] [Link] -
R2 Fa1/0 [Link] [Link] -
Activity:
5. Create the network topology shown above (use generic routers)
6. Assign the IP addresses shown to the interfaces of the routers and the hosts. The default gateways of the
PCs are the IP addresses of the directly connected interfaces of the respective routers.
7. verify your configuration. Which interfaces can pc1, pc2 can ping? How about R1 and R2?
8. Configure static routes on R1 and R2
9. verify the configuration and ping the devices each other
N.B: The interfaces of a router are shutdown by default and we need to enable them before we use them.
Interface configuration of R1:
Assign ip address to the interfaces and enabling them.
Router>enable
Router#conf t
Router(config)#hostname R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address [Link] [Link]
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int fastEthernet 1/0
R1(config-if)#ip address [Link] [Link]
R1(config-if)#no shutdown
Interface configuration of R2:
Router>enable
Router#conf t
Router(config)#hostname R2
R2(config)#int fa 1/0
R2(config-if)#ip add [Link] [Link]
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int fa 0/0
R2(config-if)#ip add [Link] [Link]
R2(config-if)#no shutdown
Then assign IP address of [Link] and subnet mask of [Link] with default gateway of [Link] for
PC1. Assign IP address of [Link] and subnet mask of [Link] with default gateway of [Link] for
PC2.
Verify your configuration.
To verify use show commands on the routers. Use ping for testing connectivity.
For example:
R1#sh ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 [Link] YES manual up up
FastEthernet1/0 [Link] YES manual up up
For example, use ping [Link], to check connectivity to fa0/0 interface of R1.
At this point PC1 and PC2 cannot communicate. Try ping [Link] being from PC1. There is no reply!
Before we configure routing protocol, let us verify the content of the routing table of the routers. Use show ip
route command.
R2#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
----some text left----------
Gateway of last resort is not set
C [Link]/24 is directly connected, FastEthernet1/0
C [Link]/24 is directly connected, FastEthernet0/0
R2#
Since we haven’t configured a routing protocol only the directly connected networks reside in routing table of R2.
From this R2 only knows networks [Link] and [Link]. network [Link] is not known by R2. On R1
only 192.1681.0 and [Link] are also displayed. When we configure static routing, we tell the routes or
networks that the routers do not know. That is we add network [Link] for R1 and network [Link] for
router R2. To configure static routing use ip route [destination_network] [mask] [next-hop_address or
exitinterface] command. The next-hop address is the IP address of the next router.
Configuration of static routing on R1:
R1(config)#ip route [Link] [Link] [Link]
Configuration of static routing on R2:
R2(config)#ip route [Link] [Link] [Link]
Now we have added the networks that each router does not know. Now verify the routing table of the routers
and ping the PCs each other.
R1(config)#exit
R1#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
===some text left=====
Gateway of last resort is not set
C [Link]/24 is directly connected, FastEthernet0/0
C [Link]/24 is directly connected, FastEthernet1/0
S [Link]/24 [1/0] via [Link]
R1#
And for R2,
R2#sh ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
---some text left-----
Gateway of last resort is not set
S [Link]/24 [1/0] via [Link]
C [Link]/24 is directly connected, FastEthernet1/0
C [Link]/24 is directly connected, FastEthernet0/0
R2#
Now ping PC2 from PC1. You should get replies now! That means routing protocol is configured successfully.
PC>ping [Link]
Pinging [Link] with 32 bytes of data:
Reply from [Link]: bytes=32 time=1ms TTL=126
Reply from [Link]: bytes=32 time=0ms TTL=126
Reply from [Link]: bytes=32 time=0ms TTL=126
Reply from [Link]: bytes=32 time=1ms TTL=126
Ping statistics for [Link]:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms