When a destination network is learned from two different routing protocols,
RIP and OSPF, for example, a router can choose one protocol over another.
The figure below shows the network configuration for the example:
In the figure, the top part of network is running OSPF, the bottom part
of network is running RIP. Gateway 3 (GW-3) learns network 205.226.22.0
from two routing protocols: RIP from bottom network, and OSPF from top
part of network. When other hosts want to go to 205.226.22.0 through GW-3,
GW-3 can select one protocol route, say OSPF route first, to reach the
destination. If that route is broken, then GW-3 will use another available
route to reach destination.
To configure the routing preferences:
This will make the OSPF route the preferred route, If you wanted to
have the RIP route be the preferred route type 40 for OSPF and 10 for RIP.