how to control the metric of routes created by frr?
Dear fellows, I have trouble finding the particular way of increasing the metric of routes created by frr as a result of the running OSPF. My network is built as follows: The virtual backbone is zerotier 10.243/16. Edge routers are connected to it. Also my laptop is connected to the zerotier backbone (via LTE modem) and runs FRR. Routers run Mikrotik RouterOS and I use OSPF to propagate the routes to 192.168 networks to my Laptop1. 10.243/16: router1 -------- router2 ------- Laptop1 | | | | | | | | 192.168.201/24 192.168.210/24 Everything works fine until I connect my laptop to one of the 192.168 networks via Wifi. 10.243/16: router1 -------- router2 ------- Laptop1 | | | | | | | | | | | | 192.168.201/24 192.168.210/24-----+ By default the metric of the route of the connected Wifi adapter is 600, while the routes that are created by frr have a metric of 20. anton@PF16W6Y2 ~ $ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default router 0.0.0.0 UG 600 0 0 wlan0 10.0.85.2 0.0.0.0 255.255.255.255 UH 0 0 0 outline-tun0 10.243.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ztzlge64hc 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 192.168.201.0 PERV1CAP1.vpn 255.255.255.0 UG 20 0 0 ztzlge64hc 192.168.210.0 0.0.0.0 255.255.255.0 U 600 0 0 wlan0 192.168.210.0 SOV1.vpn 255.255.255.0 UG 20 0 0 ztzlge64hc So when I start to pour a lot of data from my laptop to one of the directly connected servers at 192.168.210/24, the traffic goes to zerotier interface first, then to router2 and decrypted there and only after that reaches the server. The CPU util of the router2 jumps to 100% and the speed goes down. Is there a way to increase the metric of routes via ztzlge64hc interface that are created by frr? Zerotier client doesn't offer to configure the metric of its interface and sets it to 0 always. There is a 5-year old feature request to them for this... The frr config I have is trivial: ! frr version 10.1.1-gentoo frr defaults traditional hostname PF16W6Y2 log file /var/log/frr/ospfd.log log syslog informational no ipv6 forwarding service integrated-vtysh-config ! interface ztzlge64hc ip ospf area 10.243.0.0 10.243.169.159 ip ospf cost 1500 exit ! router ospf ospf router-id 10.243.169.159 log-adjacency-changes exit ! end As you can see I tried to increase the cost of the ztzlge64hc interface and it is correctly reflected in the OSPF routes: PF16W6Y2# show ip ospf route ============ OSPF network routing table ============ N 10.243.0.0/16 [1500] area: 10.243.0.0 directly attached to ztzlge64hc N 192.168.201.0/24 [1501] area: 10.243.0.0 via 10.243.130.110, ztzlge64hc N 192.168.210.0/24 [2500] area: 10.243.0.0 via 10.243.86.42, ztzlge64hc ============ OSPF router routing table ============= R 192.168.201.2 [1500] area: 10.243.0.0, ASBR via 10.243.130.110, ztzlge64hc ============ OSPF external routing table =========== It doesn't affect the kernel route metrics however... Thanks for pointing me to the right direction.
participants (1)
-
Anton Gubar'kov