Routing Questions
From MikroTik Wiki
Question: How does /ip route check-gateway work?
- Answer
- check-gateway sends pings every 10 seconds. if two successive pings fail, the gateway is considered dead.
Question: I have one /24 network advertised to two BGP peers using "/routing bgp networks" facility. How do I advertise a higher path cost to one of the peers?
- Answer
- You have to change the way you are redistributing your network. In most cases the network is connected directly to your router, so it's enough to set BGP instance to redistribute directly connected routes:
/routing bgp instance set default redistribute-connected=yes
- To filter out all other connected networks except the needed one, create a routing filter for the BGP instance,
/routing filter add invert-match=yes prefix=10.0.0.0/24 action=discard name=InstanceOutFilter
- then set filter "InstanceOutFilter" as the out-filter for "default" BGP instance.
/routing bgp instance set default out-filter=InstanceOutFilter
- To communicate a lower preference value (higher path cost) to one of the peers, you have to prepend your AS number multiple times to the BGP AS_PATH attribute
/routing filter add prefix=10.0.0.0/24 set-bgp-prepend=4 name=Peer1OutFilter /routing bgp peer set Peer1 out-filter=Peer1OutFilter