You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After changing version of FRR from FRR 8.4.2 to FRR 10.1.1, the problem with creating VRFs and adding the default route showed up. It is related to the data redistribution from kernel process. This issue still occurs on the latest FRR version.
Sometimes the RTM_NEWROUTE would be processed by FRR before RTM_NEWLINK which will lead to adding the route to the default VRF, because the RTM_NEWLINK has not been processed yet and the destination VRF is not existing which we believe is the reason for this bug. The default route is advertised via the BGP session.
NOTE:
In this issue it is also attached possiblesolution for this issue (Additional context paragraph)
This problem does not occur for every iteration.
For this purpose I am using a script to automatize this process.
This script and necessary config files are all attached to this issue.
NOTE - I couldn't upload .conf file extensions, so instead I changed every dot to dash (. to -) and added .txt extension.
Properly named files and description: repro_v2.sh (repro_v2-sh.txt)- script to add kernell routes, and handle config reloades. frr.conf_no_vrf (frr-conf_no_vrf.txt) - startup config with some BGP configuration frr.conf_with_vrf (frr-conf_with_vrf.txt)- FRR config which is used in every iteration to create proper bgp vrf config frr.conf_with_vrf_org (frr-conf_with_vrf_org.txt) - used to reset the previous config file, so the reproduction script can be run again without problems.
Typical number of iterations to reproduce is usually around 50-150 but this number can be different.
ip link add vrfv$VRF_NUM type vrf table $VRF_NUM
ip r add blackhole default metric 4278198272 table $VRF_NUM
ip -6 r add blackhole default metric 4278198272 table $VRF_NUM
ip link add brv$VRF_NUM type bridge
ip link set brv$VRF_NUM master vrfv$VRF_NUM
ip link add vxlan$VRF_NUM type vxlan id $VRF_NUM dstport 4789
ip link set vxlan$VRF_NUM master brv$VRF_NUM
ip link set vrfv$VRF_NUM up
ip link set brv$VRF_NUM up
ip link set vxlan$VRF_NUM up
Add router bgp vrf configuration for a specific vrf which is currently added in kernel along with its config for kernel routes redistribution. Example config file eg. frr.conf_with_vrf ( file frr.conf_with_vrf_org is attached, so the script will start again iteration for the org
Reload FRR with updated config eg /usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf_with_vrf
This is not obligatory to reproduce the bug itself, but will add the router bgp 4250100001 vrf vrfvXXXXX config to the FRR, which will give us some more context about how infulent this BUG can be.
Verify if the bug showed up by running vtysh -c "show ip route vrf vrfv$VRF_NUM 0.0.0.0". If the default route does not exists there for vrfv$VRF_NUM the bug has been successfully reproduced.
If not reproduced, try re-adding VRF nd routes again. Script for automatization this process along with configs is attached.
Expected behavior
Expected output for vtysh -c "show ip route vrf vrfv$VRF_NUM 0.0.0.0 json" :
New default route record won't be visible in default VRF: vtysh -c 'show bgp ipv4 unicast 0.0.0.0/0', and should be seen in here: vtysh -c "show bgp vrf vrfv2980049 ipv4 unicast 0.0.0.0".
IPv4, specific VRF:
root@h1001:/# vtysh -c "show bgp vrf vrfv2980049 ipv4 unicast 0.0.0.0"
BGP routing table entry for 0.0.0.0/0, version 1
Paths: (1 available, best #1, vrf vrfv2980049)
Not advertised to any peer
Local
0.0.0.0(h1001 from 0.0.0.0 (10.40.0.1)
Origin incomplete, metric 8192, aigp-metric 8192, weight 32768, valid, sourced, bestpath-from-AS Local, best (First path received)
Last update: Thu Feb 6 07:08:07 2025
IPv4, default VRF:
root@h1001:/# vtysh -c "show bgp ipv4 unicast 0.0.0.0"
% Network not in table
IPv6, specific VRF:
root@h1001:/# vtysh -c "show bgp vrf vrfv2980049 ipv6 unicast ::/0"
BGP routing table entry for ::/0, version 1
Paths: (1 available, best #1, vrf vrfv2980049)
Not advertised to any peer
Local
::(h1001) from :: (10.40.0.1)
Origin incomplete, metric 8192, aigp-metric 8192, weight 32768, valid, sourced, bestpath-from-AS Local, best (First path received)
Last update: Thu Feb 6 07:08:07 2025
IPv6, default VRF:
root@h1001:/# vtysh -c "show bgp ipv6 unicast ::/0"
% Network not in table
Actual behavior
After some reproduction iterations, the bug will show up, and the route will be added to the default VRF instead of the specific one.
Unwanted output (BUG) for vtysh -c "show ip route vrf vrfv$VRF_NUM 0.0.0.0 json":
Description
After changing version of FRR from FRR 8.4.2 to FRR 10.1.1, the problem with creating VRFs and adding the default route showed up. It is related to the data redistribution from kernel process. This issue still occurs on the latest FRR version.
Sometimes the
RTM_NEWROUTE
would be processed by FRR beforeRTM_NEWLINK
which will lead to adding the route to the default VRF, because theRTM_NEWLINK
has not been processed yet and the destination VRF is not existing which we believe is the reason for this bug. The default route is advertised via the BGP session.NOTE:
In this issue it is also attached possiblesolution for this issue (Additional context paragraph)
Version
How to reproduce
This problem does not occur for every iteration.
For this purpose I am using a script to automatize this process.
This script and necessary config files are all attached to this issue.
NOTE - I couldn't upload
.conf
file extensions, so instead I changed every dot to dash (.
to-
) and added.txt
extension.Properly named files and description:
repro_v2.sh
(repro_v2-sh.txt)- script to add kernell routes, and handle config reloades.frr.conf_no_vrf
(frr-conf_no_vrf.txt) - startup config with some BGP configurationfrr.conf_with_vrf
(frr-conf_with_vrf.txt)- FRR config which is used in every iteration to create proper bgp vrf configfrr.conf_with_vrf_org
(frr-conf_with_vrf_org.txt) - used to reset the previous config file, so the reproduction script can be run again without problems.Typical number of iterations to reproduce is usually around 50-150 but this number can be different.
Startup config:
router bgp vrf
configuration for a specific vrf which is currently added in kernel along with its config for kernel routes redistribution. Example config file eg.frr.conf_with_vrf
( filefrr.conf_with_vrf_org
is attached, so the script will start again iteration for the orgReload FRR with updated config eg
/usr/lib/frr/frr-reload.py --reload /etc/frr/frr.conf_with_vrf
This is not obligatory to reproduce the bug itself, but will add the
router bgp 4250100001 vrf vrfvXXXXX
config to the FRR, which will give us some more context about how infulent this BUG can be.Verify if the bug showed up by running
vtysh -c "show ip route vrf vrfv$VRF_NUM 0.0.0.0"
. If the default route does not exists there forvrfv$VRF_NUM
the bug has been successfully reproduced.If not reproduced, try re-adding VRF nd routes again. Script for automatization this process along with configs is attached.
Expected behavior
Expected output for
vtysh -c "show ip route vrf vrfv$VRF_NUM 0.0.0.0 json"
:New default route record won't be visible in default VRF:
vtysh -c 'show bgp ipv4 unicast 0.0.0.0/0'
, and should be seen in here:vtysh -c "show bgp vrf vrfv2980049 ipv4 unicast 0.0.0.0"
.IPv4, specific VRF:
IPv4, default VRF:
IPv6, specific VRF:
IPv6, default VRF:
Actual behavior
After some reproduction iterations, the bug will show up, and the route will be added to the default VRF instead of the specific one.
Unwanted output (BUG) for
vtysh -c "show ip route vrf vrfv$VRF_NUM 0.0.0.0 json"
:New default route record presented for
vtysh -c 'show bgp ipv4 unicast 0.0.0.0/0'
, and the default route is now missing in Linux.IPv4, specific VRF: (missing route)
IPv4, default VRF: (unwanted route from specific VRF present)
IPv6, specific VRF:
IPv6, default VRF:
Additional context
As far as I know, this issue could be reproduced only for IPv4 addresses.
!!! Potential code fragment which can fix this problem is added as patch in attached files. -
vrf_rt_installation.patch
vrf_rt_installaton.patch
Note that this only fixes the default route override, and it does not fix the entire problem.
FRR logs if bug is present:
(First line indicates what we want to AVOID)
Checklist
The text was updated successfully, but these errors were encountered: