Hi ! everyone on today we are going to look over how to configure static routing GNS3 lab on packet tracer which is shown screenshot given below topology.
This is a simple syntax of static route:
Configuring interfaces on R0
R0(config)#interface s0/0
R0(config-if)#ip address 12.12.12.1 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#interface loopback0
R0(config-if)#ip address 10.0.0.1 255.0.0.0
R0(config-if)#exit
Configuring interfaces on R1
R0(config)#interface s0/0
R0(config-if)#ip address 12.12.12.2 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#interface loopback0
R0(config-if)#ip address 172.16.0.1 255.255.0.0
R0(config-if)#exit
Now if we check the routing table of R0 & R1 by the command show ip route on both R0 and R1
Verify
R0#show ip route
R1#show ip route
Configuring static route on R0
R0(config)#ip route 172.16.0.0 255.255.0.0 12.12.12.2
Configuring static route on R1
R1(config)#ip route 10.0.0.0 255.0.0.0 12.12.12.1
Notice that static route works one-way. It means we have to add static route to both R0 and R1 so that R0 and R1 can communicate.
This is a simple syntax of static route:
ip route destination-network-address subnet-mask {next-hop-IP-address | exit-interface}> destination-network-address: destination network address of the remote network
> subnet mask: subnet mask of the destination network
> next-hop-IP-address: the IP address of the receiving interface on the next-hop router
> exit-interface: the local interface of this router where the packets will go out
Now we consider a real-world example of static routing. Suppose that your company has 2 branches located in New York and Chicago. As the administrator of the network, you are tasked to connect them so that employees in the two LANs can communicate with each other. After careful consideration you decided to connect them via static route. > subnet mask: subnet mask of the destination network
> next-hop-IP-address: the IP address of the receiving interface on the next-hop router
> exit-interface: the local interface of this router where the packets will go out
Configuring interfaces on R0
R0(config)#interface s0/0
R0(config-if)#ip address 12.12.12.1 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#interface loopback0
R0(config-if)#ip address 10.0.0.1 255.0.0.0
R0(config-if)#exit
Configuring interfaces on R1
R0(config)#interface s0/0
R0(config-if)#ip address 12.12.12.2 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#interface loopback0
R0(config-if)#ip address 172.16.0.1 255.255.0.0
R0(config-if)#exit
Now if we check the routing table of R0 & R1 by the command show ip route on both R0 and R1
Verify
R0#show ip route
R1#show ip route
Configuring static route on R0
R0(config)#ip route 172.16.0.0 255.255.0.0 12.12.12.2
Configuring static route on R1
R1(config)#ip route 10.0.0.0 255.0.0.0 12.12.12.1
Notice that static route works one-way. It means we have to add static route to both R0 and R1 so that R0 and R1 can communicate.
On R0
On R1
Now try to ping each far end network
On R0 ping to check for communication with router R1.
Administrative distance of a static route.
After adding two static routes in R0 & R1 routers, the routing tables of two routers contain these lines:
S 10.0.0.0/8 [1/0] via 12.12.12.1 (on R1)
S 172.16.0.0/16 [1/0] via 12.12.12.2 (on R0)
S 172.16.0.0/16 [1/0] via 12.12.12.2 (on R0)
The “S” letter tells us this is a static route. The networks 10.0.0.0/8 and 172.16.0.0/16 are the destinations of this static route and if the routers want to reach them they must send packets to 12.12.12.1 (on R1) and 12.12.12.2 (on R2). These parameters are straightforward and easy to understand. But what is [1/0]? Well, 1 is the administrative distance (AD) and 0 is the metric of that static route.
The administrative distance is a measure of trustworthiness where lower numbers are considered to be more trustworthy than higher numbers. The route with the lowest administrative distance value is the preferred route that the router selects. Administrative distance is the value from 0 to 255.
Directly connected routes have an administrative distance of 0. Static routes have an administrative distance
of 1 so in the outputs above you will see the administrative distance of both static routes are 1.
of 1 so in the outputs above you will see the administrative distance of both static routes are 1.
The router treats a static route pointing to an interface the same as a connected interface so the its AD is 0. If you configure a static route pointing to an exiting interface (for example: “ip route 172.16.0.0 255.255.0.0 s0/0” on R0) then the AD will not be shown.
Note: For your information, EIGRP has an administrative distance of 90. IGRP has an administrative distance of 100. OSPF has an administrative distance of 110. And RIP has an administrative distance of 120.
Therefore, we have completed our lab session on configure static route in packet tracer version 7.1. For more information you can download our pkt file given below.
No comments:
Post a Comment