04-06-2023 09:48 PM
Configure ospf Area 0 on all routers. and make the end to end connectivity. R5 to R2 is our Lease line link ********************************** Set the traffic like this ********************************************** when you do the traceroute from R1 to R2 Loopback Address 147.147.11.98 , it should be travel through R1 to R4 to R5 to R2 and when you do traceroute from R5 to R2 router It travels through R5 to R4 to R1 to R3 ro R2
Solved! Go to Solution.
04-07-2023 05:18 AM - edited 04-07-2023 05:19 AM
That´s because the cost is not the only criteria. In your case, the path through S1/1 has 1 router while path through Se1/0 has 2 routers. It prefers the shortest path. That´s where the name comes OSPF Open Shortest Path First
04-07-2023 12:11 AM - edited 04-07-2023 12:12 AM
Hi
Enable ospf is pretty simple. Just run the command in all router
confor t
router ospf 1
network X.x.x.x X.x.x.x
Then, to influence the traffic flow, use link cost.
Router#conf t Router(config)#int gi0/0/0 Router(config-if)#ip ospf cost <1-65535>
Or bandwidth
Router#conf t Router(config)#int gi0/0/0 Router(config-if)#bandwidth <1-10000000>
If you want the packet to go to from R1 to R4, make the link between R1 and R4 more interesting by increasing the bandwidth or decreasing the cost.
04-07-2023 04:22 AM
can u describe more please R1 s1/1 has 64 cost
i have set s1/0 to 60 cost
still when i am pinging 147.147.11.98 From R1 ..it is travelling from s1/1
04-07-2023 05:18 AM - edited 04-07-2023 05:19 AM
That´s because the cost is not the only criteria. In your case, the path through S1/1 has 1 router while path through Se1/0 has 2 routers. It prefers the shortest path. That´s where the name comes OSPF Open Shortest Path First
04-10-2023 02:08 AM
Please tell is this correct according to the requirements mentioned???? if not please provide me the proper command for the topology
ROUTER R1 R1(config)#int s1/0 R1(config-if)#ip add 131.131.34.163 255.255.255.240 R1(config-if)#no shut R1(config-if)#exit R1(config)#int s1/1 R1(config-if)#ip add 131.131.34.82 255.255.255.240 R1(config-if)#no shut R1(config-if)#exit R1(config)#router ospf 131 R1(config-router)#network 131.131.34.163 0.0.0.15 area 0 R1(config-router)#network 131.131.34.82 0.0.0.15 area 0 R1(config-router)#exit R1(config)#int s1/0 R1(config-if)#ip ospf route 45 R1(config-if)#exit --------------------------------------------------------------- ROUTER R2 R2(config)#int s1/0 R2(config-if)#ip add 131.131.34.139 255.255.255.240 R2(config-if)#no shut R2(config-if)#exit R2(config-if)#exit R2(config)# R2(config)#int s1/1 R2(config-if)#ip add 131.131.34.124 255.255.255.240 R2(config-if)#no shut R2(config-if)#exit R2(config)#int loopback 2 R2(config-if)#ip add 147.147.11.98 255.255.255.252 R2(config-if)# R2(config-if)#no shut R2(config-if)#exit R2(config)# R2(config)#router ospf 131 R2(config-router)#network 131.131.34.139 0.0.0.15 area 0 R2(config-router)#network 131.131.34.124 0.0.0.15 area 0 R2(config-router)#network 147.147.11.98 0.0.0.3 area 0 R2(config-router)#exit -------------------------------------------------------------- ROUTER R3 R3(config)#int s1/1 R3(config-if)#ip add 131.131.34.126 255.255.255.240 R3(config-if)#no shut R3(config-if)#exit R3(config)#int s1/2 R3(config-if)#ip add 131.131.34.83 255.255.255.240 R3(config-if)#no shut R3(config-if)#exit R3(config)#router ospf 131 R3(config-router)#network 131.131.34.126 0.0.0.15 area 0 R3(config-router)#network 131.131.34.83 0.0.0.15 area 0 R3(config-router)#exit ------------------------------------------------------------------------------------------- ROUTER R4 R4(config)#int s1/0 R4(config-if)#ip add 131.131.34.168 255.255.255.240 R4(config-if)#no shut R4(config-if)#exit R4(config)#int s1/1 R4(config-if)#ip add 131.131.34.151 255.255.255.240 R4(config-if)#no shut R4(config-if)#exit R4(config)#router ospf 131 R4(config-router)#network 131.131.34.168 0.0.0.15 area 0 R4(config-router)#network 131.131.34.151 0.0.0.15 area 0 R4(config-router)#exit R4(config)#int s1/1 R4(config-if)#ip ospf cost 45 R4(config-if)#exit -------------------------------------------------------------------------------------- ROUTER R5 R5(config)#int s1/0 R5(config-if)#ip add 131.131.34.138 255.255.255.240 R5(config-if)#no shut R5(config-if)#exit R5(config)#int s1/1 R5(config-if)#ip add 131.131.34.153 255.255.255.240 R5(config-if)#no shut R5(config-if)#exit R5(config)#router ospf 131 R5(config-router)#network 131.131.34.138 0.0.0.15 area 0 R5(config-router)#network 131.131.34.153 0.0.0.15 area 0 R5(config-router)#exit R5(config)#int s1/0 R5(config-if)#ip ospf cost 20 R5(config-if)#exit -------------------------------------------------
04-10-2023 02:10 AM
please check with the given requirements is this correct ?>> if not please modify commands and reply me
ROUTER R1 R1(config)#int s1/0 R1(config-if)#ip add 131.131.34.163 255.255.255.240 R1(config-if)#no shut R1(config-if)#exit R1(config)#int s1/1 R1(config-if)#ip add 131.131.34.82 255.255.255.240 R1(config-if)#no shut R1(config-if)#exit R1(config)#router ospf 131 R1(config-router)#network 131.131.34.163 0.0.0.15 area 0 R1(config-router)#network 131.131.34.82 0.0.0.15 area 0 R1(config-router)#exit R1(config)#int s1/0 R1(config-if)#ip ospf route 45 R1(config-if)#exit --------------------------------------------------------------- ROUTER R2 R2(config)#int s1/0 R2(config-if)#ip add 131.131.34.139 255.255.255.240 R2(config-if)#no shut R2(config-if)#exit R2(config-if)#exit R2(config)# R2(config)#int s1/1 R2(config-if)#ip add 131.131.34.124 255.255.255.240 R2(config-if)#no shut R2(config-if)#exit R2(config)#int loopback 2 R2(config-if)#ip add 147.147.11.98 255.255.255.252 R2(config-if)# R2(config-if)#no shut R2(config-if)#exit R2(config)# R2(config)#router ospf 131 R2(config-router)#network 131.131.34.139 0.0.0.15 area 0 R2(config-router)#network 131.131.34.124 0.0.0.15 area 0 R2(config-router)#network 147.147.11.98 0.0.0.3 area 0 R2(config-router)#exit -------------------------------------------------------------- ROUTER R3 R3(config)#int s1/1 R3(config-if)#ip add 131.131.34.126 255.255.255.240 R3(config-if)#no shut R3(config-if)#exit R3(config)#int s1/2 R3(config-if)#ip add 131.131.34.83 255.255.255.240 R3(config-if)#no shut R3(config-if)#exit R3(config)#router ospf 131 R3(config-router)#network 131.131.34.126 0.0.0.15 area 0 R3(config-router)#network 131.131.34.83 0.0.0.15 area 0 R3(config-router)#exit ------------------------------------------------------------------------------------------- ROUTER R4 R4(config)#int s1/0 R4(config-if)#ip add 131.131.34.168 255.255.255.240 R4(config-if)#no shut R4(config-if)#exit R4(config)#int s1/1 R4(config-if)#ip add 131.131.34.151 255.255.255.240 R4(config-if)#no shut R4(config-if)#exit R4(config)#router ospf 131 R4(config-router)#network 131.131.34.168 0.0.0.15 area 0 R4(config-router)#network 131.131.34.151 0.0.0.15 area 0 R4(config-router)#exit R4(config)#int s1/1 R4(config-if)#ip ospf cost 45 R4(config-if)#exit -------------------------------------------------------------------------------------- ROUTER R5 R5(config)#int s1/0 R5(config-if)#ip add 131.131.34.138 255.255.255.240 R5(config-if)#no shut R5(config-if)#exit R5(config)#int s1/1 R5(config-if)#ip add 131.131.34.153 255.255.255.240 R5(config-if)#no shut R5(config-if)#exit R5(config)#router ospf 131 R5(config-router)#network 131.131.34.138 0.0.0.15 area 0 R5(config-router)#network 131.131.34.153 0.0.0.15 area 0 R5(config-router)#exit R5(config)#int s1/0 R5(config-if)#ip ospf cost 20 R5(config-if)#exit -------------------------------------------------
04-10-2023 06:09 AM
why I use cost 5 ??
cost 5 is biggest than sum of other path (cost1 +1 +1 +1)
this make R5 prefer the path with low cost via R4 to R1 instead of direct path to R1 (high cost = 5)
note:- as I mention before please remember in real network using cost in both side of link to prevent the asymmetric routing
04-07-2023 05:23 AM - edited 04-07-2023 05:28 AM
when you see lab and need to run it, it lab not real network, why you use subnet can conflict with each other !!
75% of lab failure is subnet misconfig.
instead use simple
10.0.0.0/20.0.0.0/30.0.0.0/40.0.0.0/50.0.0.0
you must deal with subnet dont worry if you input different subnet it not make lab failed.
return to your Q,
did you config Cost in one side ???
this traceroute behave is happened as I think when
R1-link-R2
you config cost of link in R1 and not config it in R2 (default)
this explain some time this behave of traceroute.
for me I always prefer config cost in both router, because it in real network can lead to asymmetric routing
04-07-2023 07:57 AM
Assuming your networks and OSPF are correctly configured, OSPF path selection is somewhat simple.
Starting from any router, obtain the OSPF interface cost from every interface you can exit/egress to get to destination; sum the total. If there are multiple paths to reach destination, compare the sums between paths. Path with lowest cost will be used. Paths with same costs will be used side-by-side.
If you want to insure one path is used rather than another, adjust one of more interface costs along path to change the overall sum of costs such that your preferred path, or paths, is used.
BTW, Cisco by default, auto calculates OSPF interface cost diving interface's bandwidth into 100 Mbps. E.g. 100 Mbps reference bandwidth divided by 100 Mbps interface bandwidth = cost 1. 100 Mbps reference bandwidth divided by 10 Mbps interface bandwidth = cost 10. 100 Mbps reference bandwidth divided by 1 Gbps interface bandwidth = .1, but cost cannot be less than 1, so cost will also be 1. I.e. with reference bandwidth 100 Mbps, anything faster will be considered, for cost, same as 100 Mbps.
Reference bandwidth can be changed (often set to "fastest" bandwidth expected in topology), OSPF interface cost can also be manually set (which, BTW, is the only option with some other network vendors - also BTW, some other network vendors use a different auto reference cost).
Also BTW, if all router's OSPF interface costs are equal, effectively, OSPF would be like RIP's sum of hop counts.
10-14-2024 10:27 PM
Dude can you please share me the solution
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide