0% found this document useful (0 votes)
314 views

Practical 3 Static

Static routing was configured between two routers, R1 and R2, to allow connectivity between three subnets: 172.16.0.0/16, 192.168.0.0/24, and 10.0.0.0/8. On R1, static routes were added for the 10.0.0.0/8 subnet pointing to R2. On R2, static routes were added for the 172.16.0.0/16 and 192.168.0.0/24 subnets pointing to R1. This allowed hosts on all subnets to ping each other, demonstrating IP connectivity across the network using static routing.

Uploaded by

Srinivas Cherku
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
314 views

Practical 3 Static

Static routing was configured between two routers, R1 and R2, to allow connectivity between three subnets: 172.16.0.0/16, 192.168.0.0/24, and 10.0.0.0/8. On R1, static routes were added for the 10.0.0.0/8 subnet pointing to R2. On R2, static routes were added for the 172.16.0.0/16 and 192.168.0.0/24 subnets pointing to R1. This allowed hosts on all subnets to ping each other, demonstrating IP connectivity across the network using static routing.

Uploaded by

Srinivas Cherku
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Practical No.

3
Q3) Configure IP static routing.

Static Route Configuration


 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 to just keep
adding static routes and make 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

Syntax:
ip route [destination_network] [mask] [next_hop_address or exit_interface]
[administrative_distance][permanent]
We can break the above syntax:
ip route [destination_network] [mask] [next_hop_address] 
ip route [destination_network] [mask] [exit_interface/next_hop_address] 
network - the destination network
mask - is the subnet mask for that network
address - IP address of the next hop router
interface - the interface the traffic is to leave by
distance - (optional) the administrative distance of the route

Example: 1
Router(config)#ip route 10.0.0.0 255.0.0.0 131.108.3.4 110

10.0.0.0 is the destination network/remote destination network/final destination.


255.0.0.0 is the subnet mask for that network and 131.108.3.4 is the next hop ip.
110 is the administrative distance.
The AD is the trustworthiness of a route, where 0 is best and 255 is worst.
The default administrative distance of static route is 1.

Example: 2

Router0(config)#ip route 10.10.3.0 255.255.255.0 10.10.0.3(using next hop ip)


Router0(config)#ip route 10.10.3.0 255.255.255.0 fa0/1(using exit interface)

We can use the exit interface instead of next hop ip address. Functionally, next
hop ip and exit interface work exactly the same. But, it is preferred to
use next_hop_ip_address for troubleshoot easier way.

There is a golden rule of routing:


If the router cannot find the route, it will drop the packet and send an ICMP "Destination
Unreachable" message to the original sender.
The only way a router knows about a route (destination network) is one of 3 ways:
1.It is directly connected to that network
2.It learns about the remote (not directly connected) route from another router - it does this by
both routers speaking the same routing protocol.
3.An administrator MANUALLY enters a static route in the router.
The problem with #3 is that you have to enter EVERY route on EVERY router. This very
quickly becomes tedious and is prone to error.
Static routing is a good choice IF the following are true:
1.You only have a few routers.

2.You have NO redundant paths (routes).

3.You don't want the routers to use up precious bandwidth by using routing protocols.
___________________________________________________________________________
PRINT-OUT
___________________________________________________________________________

Static Route Lab with Packet Tracer


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

Putting three IP addresses, subnet mask and default gateway to three PCs.
Click PC1/ Desktop/IP Configuration /Static

Click PC2/ Desktop/IP Configuration /Static

Click PC3/ Desktop/IP Configuration /Static


Configure Router R1

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)#

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.

You might also like