On 07/20/2013 12:43 PM, Chris Fabien wrote:
> I have a bench setup running based on the Mikrotik Wiki example, it's
> running and working, but I'm stuck on the part where I assign
> cost/distance/priority or whatever the term is to make it decide one
> link over another. I'm not really grasping how that works.
In ospf, the path cost determines where a packet is routed. Take this
simple example:
-- R2 --
| |
R1 - - R4 ->Target
| |
-- R3 --
If, on the R1<->R2 interface, you add cost and all other settings are
left at default then the traffic at R1 destined for the networks beyond
R2/R3 would prefer the path that includes R3, since the cost is higher
going through R2 interface. Note that this cost is calculated on the
OUTGOING interface, so this example assumes you have one interface for
R2 and one for R3. Additionally, because the outgoing path is the one
where cost is calculated, the return traffic would consider both the R2
and R3 path to be equal. The essence of path cost is this:
higher cost = less preferred path
To calculate the path cost (from R1), the router would look at the cost
of the interface: R1-R2, R2-R4 and compare it to R1-R3, R3,R4 path.
Distance is the metric that the kernel uses to determine which learned
route to use. You can google the "default route distance" to see the
full chart. Connected routes are distance 0; Static routes default at
distance 1 and ospf learned routes are distance 110. What this means is
that a route learned by ospf will be used ONLY if there is no other
shorter distance route installed. In RouterOS, you can change the
distance for static routes, so that you can use them as "backup" in case
OSPF fails.
The OSPF priority parameter is only used to determine which router in a
segment becomes the DR, BDR or just another router. You can google
"ospf designated router election" to see exactly how this happens.
> I want to be able to assign priority to the links so that it won't
> always take the least # of hops path, we have a redundant link between
> two main towers which is an old nanobridge link and want to reserve it
> as the backup link.
You are probably looking for cost instead of priority. Just for the
record, this is one of the things we cover in my classes. There is one
lab that we do that covers all of these things in great detail.
--
Butch Evans
702-537-0979
Network Support and Engineering
http://store.wispgear.net/
http://www.butchevans.com/
_______________________________________________
Wireless mailing list
[email protected]
http://lists.wispa.org/mailman/listinfo/wireless