Practical No 4 Ip Static Routing

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Practical No.

4
Aim: Static Route Configuration
Theory :
Static Route
1.Static routing method is most trusted by a router.
2.Static routing is not really a routing protocol.
3.Static routes do not dynamically adapt to network changes, are not particularly scalable, and
require manual updating to reflect changes.
Static routing has the following advantages
1. There is no bandwidth usage between routers, which means you could possibly save
money on WAN links.
2. There is no overhead on the router CPU, which means you could possibly buy a cheaper
router than you would use if you were using dynamic routing.
3. It adds security because the administrator can choose to allow routing access to certain networks
only.
Static routing has the following disadvantages
1. Static routes don’t dynamically adapt to network change.
2. If a network is added to the internetwork, the administrator has to add a route to it on all routers
—by hand.
3. It’s not feasible in large networks because maintaining it would be a full-time job in itself.
4. With static routing, as your network grows, it can be difficult just keep adding static routes makes
sure everybody can still get everything.
5. The administrator must really understand the internetwork and how each router is
connected in order to configure routes correctly.

There are two different styles to configure an “ip route” command:


1. Using a next hop IP address
2. Using an outgoing interface

Configure Static Route on Cisco Routers with following information:


Network: 172.16.0.0/16, 192.168.0.0/24, 10.0.0.0/8
Gateway Address: 172.16.0.1/16, 192.168.0.1/24, 10.0.0.1/8

TAKE PRINTOUT OF NEXT SNAPS OF CODING AND OUTPUT


Putting three IP addresses, subnet mask and default gateway to three PCs.

Click PC1/ Desktop/IP Configuration /Static


Click Click Configure Router R1 PC2/ Desktop/IP Configuration /Static
Click PC2/ Desktop/IP Configuration /Static

Click PC3/ Desktop/IP Configuration /StaticClick Configure Router R1 PC2/ Desktop/IP


Configuration /Static PC3/ Desktop/IP Configuration /Static
Configure Router R2

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa 0/1
R1(config-if)#ip address 172.16.0.1 255.255.0.0
R1(config-if)#no shut
R1(config-if)#int fa 1/0
R1(config-if)#ip address 192.168.0.1 255.255.255.0
R1(config-if)#no shut
R1(config)#int fa 0/0
R1(config-if)#ip address 100.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Click
Click
Configure Router R2

Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int fa 0/0
R2(config-if)#ip address 100.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config)#int fa 0/1
R2(config-if)#ip address 10.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#

Configure Static Route to router R1


Go to config mode, type ip route command, the subnet number, followed by the mask, and next hop
ip address.
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 10.0.0.0 255.0.0.0 100.0.0.2
R1(config)#^Z
See routing table of router R1
R1#show ip route
Gateway of last resort is not set
S 10.0.0.0/8 [1/0] via 100.0.0.2
100.0.0.0/30 is subnetted, 1 subnets
C 100.0.0.0 is directly connected, FastEthernet0/0
C 172.16.0.0/16 is directly connected, FastEthernet0/1
C 192.168.0.0/24 is directly connected, FastEthernet1/0
R1#
Note a static route added to the routing table. The character S means static route. It references
10.0.0.0 subnet and it says to get there via100.0.0.2. via means that the next hop router’s IP address.
Now check IP connectivity
Click PC-1/ Desktop/Command Prompt
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>

However PC-1 can’t ping PC-3 right now, the ping fails. See routing table of router R2
R2#show ip route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
100.0.0.0/30 is subnetted, 1 subnets
C 100.0.0.0 is directly connected, FastEthernet0/0
R2#
The output confirms that R2 does not have route to reach subnet 172.16.0.2/16, 192.168.0.2/24 or
PC-1, PC-2. As a result, if PC-1 tries to ping PC-3 or PC-3 tries to ping PC-1 right now, the ping will fail.
So, we have to add a routing protocol(in this case, static route) that points PC-3’s subnet namely
10.0.0.0/8. In this way we will tell R1 how to forward packet to 10.0.0.0/8 subnet. The packet arrives
at R2, R2 has a directly connected route PC-3’s subnet.
Configure Static Route to router R2
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip route 172.16.0.0 255.255.0.0 100.0.0.1
R2(config)#ip route 192.168.0.0 255.255.255.0 100.0.0.1
R2(config)#^Z
R2#
Now,see routing table of router R2
R2#show ip route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
100.0.0.0/30 is subnetted, 1 subnets
C 100.0.0.0 is directly connected, FastEthernet0/0
S 172.16.0.0/16 [1/0] via 100.0.0.1
S 192.168.0.0/24 [1/0] via 100.0.0.1
R2#
Now check IP connectivity Click PC-1/ Desktop/Command Prompt
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=13ms TTL=126
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=20ms TTL=126
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 12ms, Maximum = 20ms, Average = 14ms
PC>

We can reach 10.0.0.0 network.

Click PC-2/ Desktop/Command Prompt


PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=12ms
TTL=126 Reply from 10.0.0.2: bytes=32
time=14ms TTL=126 Reply from 10.0.0.2:
bytes=32 time=24ms TTL=126 Reply from
10.0.0.2: bytes=32 time=11ms TTL=126

Ping statistics for 10.0.0.2:


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

We can reach 10.0.0.0 network.

Click PC-3/ Desktop/Command Prompt


PC>ping 172.16.0.2
Pinging 172.16.0.2 with 32 bytes of data:
Reply from 172.16.0.2: bytes=32 time=10ms
TTL=126 Reply from 172.16.0.2: bytes=32
time=11ms TTL=126 Reply from 172.16.0.2:
bytes=32 time=12ms TTL=126 Reply from
172.16.0.2: bytes=32 time=16ms TTL=126
Ping statistics for 172.16.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 16ms, Average = 12ms
PC>

We can reach 172.16.0.0 network.

PC>ping 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.2: bytes=32 time=12ms TTL=126
Reply from 192.168.0.2: bytes=32 time=11ms TTL=126
Reply from 192.168.0.2: bytes=32 time=22ms TTL=126
Reply from 192.168.0.2: bytes=32 time=10ms TTL=126
Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 22ms, Average = 13ms
PC>

We can reach 192.168.0.0 network.

Conclusion:
Draw table of marks obtained.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy