Route-map help needed


#1

Hi Guys,

I have my scenario mentioned below which is working absolutely fine with DMVPN & OSPF. However I am stuck at default route and I am seeking help in at route-map.
On hub I advertised set protocols ospf default-information originate always but I beleive whoever participated in OSPF area have started sending packet to Hub, this is not what I wanted.

I would like to achieve only for spoke1 default route should be HUB else SR2 should use local internet and I guess that would be possible with route map? Can someone please help me?

[attachment=174]

And my config from HUB and Spoke attached below


#2

On SR2, just add a default route pointing to it’s own gateway. This route has better AD than OSPF (=110).

To make it dynamic, you need some scripting glue on SR2:
add static /32 route to its ISP DNS server, using its own WAN link
In script test if that host is pingable. (make sure ping won’t flow the MPLS way)
If it’s pingable alter the vyos config from script: set the default route to AD < 110
If it isn’t pingable alter the vyos config from script: set the default route to AD > 110
Schedule the script.