Nothing Special   »   [go: up one dir, main page]

Lab 4 - Static Routing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5
At a glance
Powered by AI
The key steps to configure a network with two routers including interface configuration, IP address assignment, and static routing.

The network topology is created using generic routers. Interface configurations on each router include assigning IP addresses and enabling the interfaces.

IP addresses are assigned to each interface of the routers and hosts based on the addressing scheme. Default gateways are also configured for the hosts.

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 172.16.1.10 255.255.255.0 172.16.1.1
PC1 Fa0 172.16.3.10 255.255.255.0 172.16.3.1
Router0 Fa0/0 172.16.1.1 255.255.255.0 -
Router0 Fa1/0 172.16.2.1 255.255.255.0 -
Router1 Fa0/0 172.16.2.2 255.255.255.0 -
Router1 Fa1/0 172.16.3.1 255.255.255.0 -
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 172.16.1.1 255.255.255.0
Router0(config-if)#no shut
Router0(config-if)#exit
Router0(config)#int fa 1/0
Router0(config-if)#ip add 172.16.2.1 255.255.255.0
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 172.16.2.2 255.255.255.0
Router1(config-if)#no shut
Router1(config-if)#
Router1(config-if)#int fa 0/0
Router1(config-if)#ip add 172.16.3.1 255.255.255.0
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 172.16.1.1 YES manual up up
FastEthernet1/0 172.16.2.1 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 172.16.3.1 YES manual up up
FastEthernet1/0 172.16.2.2 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 192.168.1.10 255.255.255.0 192.168.1.1
PC2 Fa0 192.168.3.10 255.255.255.0 192.168.3.1
R1 Fa0/0 192.168.1.1 255.255.255.0 -
R1 Fa1/0 192.168.2.1 255.255.255.0 -
R2 Fa0/0 192.168.2.2 255.255.255.0 -
R2 Fa1/0 192.168.3.1 255.255.255.0 -
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 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int fastEthernet 1/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
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 192.168.2.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int fa 0/0
R2(config-if)#ip add 192.168.3.1 255.255.255.0
R2(config-if)#no shutdown
Then assign IP address of 192.168.1.10 and subnet mask of 255.255.255.0 with default gateway of 192.168.1.1 for
PC1. Assign IP address of 192.168.3.10 and subnet mask of 255.255.255.0 with default gateway of 192.168.3.1 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 192.168.1.1 YES manual up up
FastEthernet1/0 192.168.2.1 YES manual up up
For example, use ping 192.168.1.1, to check connectivity to fa0/0 interface of R1.
At this point PC1 and PC2 cannot communicate. Try ping 192.168.3.10 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 192.168.2.0/24 is directly connected, FastEthernet1/0
C 192.168.3.0/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 192.168.2.0 and 192.168.3.0. network 192.168.1.0 is not known by R2. On R1
only 192.1681.0 and 192.168.2.0 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 192.168.3.0 for R1 and network 192.168.1.0 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 192.168.3.0 255.255.255.0 192.168.2.2
Configuration of static routing on R2:
R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
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 192.168.1.0/24 is directly connected, FastEthernet0/0
C 192.168.2.0/24 is directly connected, FastEthernet1/0
S 192.168.3.0/24 [1/0] via 192.168.2.2
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 192.168.1.0/24 [1/0] via 192.168.2.1
C 192.168.2.0/24 is directly connected, FastEthernet1/0
C 192.168.3.0/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 192.168.3.10
Pinging 192.168.3.10 with 32 bytes of data:
Reply from 192.168.3.10: bytes=32 time=1ms TTL=126
Reply from 192.168.3.10: bytes=32 time=0ms TTL=126
Reply from 192.168.3.10: bytes=32 time=0ms TTL=126
Reply from 192.168.3.10: bytes=32 time=1ms TTL=126

Ping statistics for 192.168.3.10:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

You might also like