Hi,
We are running a small network with two ISPs as primary and secondary. The secondary one remains idle most of the time.
We wish to route only the youtube traffic on the second one. For this mangle rule was created and an address list of you tube is formed.
However, I am not able to figure out on how to forcibly route the traffic for the address list on ISP2.
Please suggest.
You only need a policy based route if you wanted only a subset of your LAN devices to use the second circuit, otherwise just use static routes for youtube.
The googlevideo.com domain is kind of tricky since it changes depending on content. And since it’s on https, an L7 rule most likely won’t work.
If you use Mikrotik’s DNS server, you can write a script that will check the DNS cache for all entries containing googlevideo.com and add the resolved IPs to the youtube address-list.
Then you add a mangle rule to mark-routing on packets destined to those domains (ips).
OP did say that he has an address list for YouTube as his basis for the policy routing.
Since the stated goal is a destination-based policy, I recommend using routes (which are destination-centric by their very nature) instead of packet marking.
it’s much easier to understand
it’s much more efficient in the router
Although the ability to leverage the dns-based address list feature certainly has advantages
it’s more flexible - it moves dynamically with DNS
You could use the “youtube” connection marks for other things like QoS
Me, I’d just look up Google’s IP blocks and route those. Who cares if Google Docs and GMail go the same way too? This is just a traffic engineering exercise and if a little extra Googleness comes in on ISP2 along with the videos, so be it. Google’s IPv4 blocks are going to be fairly stable, given that the RIRs don’t have any more addresses to hand out to organizations, and certainly not in the block sizes that Google consumes.