<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Well .. I feel embarrassed now. The issue was a missing "kernel
table xxxx;" in the kernel protocol.</p>
<p>-N<br>
</p>
<div class="moz-cite-prefix">On 9/28/23 15:29, Nigel Kukard via
Bird-users wrote:<br>
</div>
<blockquote type="cite"
cite="mid:09061d37-6e11-46b6-b731-8890720d9001@LBSD.net">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Hi there,</p>
<p>I'm wondering if someone could point out what I'm doing wrong
here? all my routes are being added to the system main table and
not my VRF.<br>
</p>
<p>I could swear I had this working 100% (I took my config and
added vrf "vrf0" to each protocol), i then regenerated my config
file using my software, rebooted and its not worked since. I
can't seem to find what I broke.<br>
</p>
<p>Here is my interfaces... the t0p0 and t0p1 are ip6gretap's,
dummy0 is just a loopback dummy interface. All are slave to
vrf0. lgtm.<br>
</p>
<p><font face="monospace">4: dummy0:
<BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue
master vrf0 state UNKNOWN mode DEFAULT group default qlen 1000<br>
link/ether fe:dc:20:04:15:27 brd ff:ff:ff:ff:ff:ff<br>
5: vrf0: <NOARP,MASTER,UP,LOWER_UP> mtu 65575 qdisc
noqueue state UP mode DEFAULT group default qlen 1000<br>
link/ether 8a:8e:21:3d:c4:c9 brd ff:ff:ff:ff:ff:ff<br>
<br>
8: t0p0@e0p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1430
qdisc fq_codel master vrf0 state UNKNOWN mode DEFAULT group
default qlen 1000<br>
link/ether b2:da:ee:78:04:1f brd ff:ff:ff:ff:ff:ff<br>
9: t0p1@e0p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1430
qdisc fq_codel master vrf0 state UNKNOWN mode DEFAULT group
default qlen 1000<br>
link/ether fa:61:19:72:65:d8 brd ff:ff:ff:ff:ff:ff</font><br>
</p>
<p><span style="font-family:monospace"></span>the output from ip
rule is this... lgtm.<br>
</p>
<p><font face="monospace">1000: from all lookup [l3mdev-table]<br>
</font></p>
<p>The routes within the VRF look like this, lgtm ... <font
face="monospace">ip route show vrf vrf0</font></p>
<p><span style="font-family:monospace">X/30 dev t0p0 proto kernel
scope link src A<br>
Y/30 dev t0p1 proto kernel scope link src B<br>
Z/27 dev dummy0 proto kernel scope link src C<br>
</span></p>
<p>My main routing table looks like this... lgtm, I don't even
have the interfaces or anything configured for them in the main
table outside the VRF.<br>
</p>
<p><font face="monospace">default via 169.254.1.1 dev e0p0 proto
static metric 1000<br>
169.254.1.1 dev e0p0 proto kernel scope link src D metric 256</font><br>
</p>
<p><span style="font-family:monospace">E dev e0p0 proto kernel
metric 256 pref medium<br>
F via fe80::1 dev e0p0 proto static metric 300 pref medium<br>
G via fe80::1 dev e0p0 proto static metric 300 pref medium<br>
fe80::/64 dev e0p0 proto kernel metric 256 pref medium<br>
default via fe80::1 dev e0p0 proto static metric 1000 pref
medium<br>
</span></p>
<p>My bird config is below ... I made sure to add vrf "vrf0" to
all protocols. I searched the mailing list and I can't see what
I did wrong here.</p>
<p>OSPF comes up fine, I can ping inside the VRF fine, but all my
routes are being added to the main system table.<br>
</p>
<p>I cut out the filters, they're not doing anything interesting.
Despite BGP being mentioned in the config below, I don't have it
configured atm.</p>
<font face="monospace"># Kernel Table<br>
ipv4 table t_kernel4;<br>
ipv6 table t_kernel6;<br>
<br>
# Direct Tables:<br>
ipv4 table t_direct4;<br>
ipv6 table t_direct6;<br>
<br>
# OSPF Tables<br>
ipv4 table t_ospf4;<br>
ipv6 table t_ospf6;<br>
<br>
...<br>
<br>
protocol kernel kernel4 {<br>
vrf "vrf0";<br>
description "Kernel protocol for IPv4";<br>
<br>
<br>
metric 600; # Set the BIRD metric to be used when creating
kernel routes to fall in line with our OS<br>
learn; # Learn routes from the kernel<br>
persist; # Dont remove routes on BIRD shutdown<br>
merge paths on; # Merge similar BGP paths into a multi-hop<br>
<br>
ipv4 {<br>
table t_kernel4;<br>
<br>
export all;<br>
import all;<br>
};<br>
};<br>
<br>
protocol kernel kernel6 {<br>
vrf "vrf0";<br>
description "Kernel protocol for IPv6";<br>
<br>
<br>
metric 600; # Set the BIRD metric to be used when creating
kernel routes to fall in line with our OS<br>
learn; # Learn routes from the kernel<br>
persist; # Dont remove routes on BIRD shutdown<br>
merge paths on; # Merge similar BGP paths into a multi-hop<br>
<br>
ipv6 {<br>
table t_kernel6;<br>
<br>
export all;<br>
import all;<br>
};<br>
};<br>
<br>
protocol pipe p_master4_to_kernel4 {<br>
vrf "vrf0";<br>
description "Pipe from master4 to t_kernel4";<br>
<br>
<br>
table master4;<br>
peer table t_kernel4;<br>
<br>
export filter f_master4_kernel4_export;<br>
import filter f_master4_kernel4_import;<br>
};<br>
<br>
protocol pipe p_master6_to_kernel6 {<br>
vrf "vrf0";<br>
description "Pipe from master6 to t_kernel6";<br>
<br>
<br>
table master6;<br>
peer table t_kernel6;<br>
<br>
export filter f_master6_kernel6_export;<br>
import filter f_master6_kernel6_import;<br>
};<br>
<br>
protocol device {<br>
vrf "vrf0";<br>
description "Device protocol";<br>
<br>
<br>
scan time 10;<br>
};<br>
<br>
protocol direct direct4 {<br>
vrf "vrf0";<br>
description "Direct protocol for IPv4";<br>
<br>
<br>
ipv4 {<br>
table t_direct4;<br>
<br>
export none;<br>
import all;<br>
};<br>
};<br>
<br>
protocol direct direct6 {<br>
vrf "vrf0";<br>
description "Direct protocol for IPv6";<br>
<br>
<br>
ipv6 {<br>
table t_direct6;<br>
<br>
export none;<br>
import all;<br>
};<br>
};<br>
<br>
protocol pipe p_master4_to_direct4 {<br>
vrf "vrf0";<br>
description "Pipe from master4 to t_direct4";<br>
<br>
<br>
table master4;<br>
peer table t_direct4;<br>
<br>
export none;<br>
import all;<br>
};<br>
<br>
protocol pipe p_master6_to_direct6 {<br>
vrf "vrf0";<br>
description "Pipe from master6 to t_direct6";<br>
<br>
<br>
table master6;<br>
peer table t_direct6;<br>
<br>
export none;<br>
import all;<br>
};<br>
<br>
protocol ospf v2 ospf4 {<br>
vrf "vrf0";<br>
description "OSPF protocol for IPv4";<br>
<br>
<br>
ipv4 {<br>
table t_ospf4;<br>
<br>
export filter f_ospf_export;<br>
import filter f_ospf_import;<br>
<br>
};<br>
<br>
area 0 {<br>
interface "dummy0" {<br>
cost 10;<br>
ecmp weight 1;<br>
stub;<br>
};<br>
interface "t0p0" {<br>
cost 1000;<br>
ecmp weight 1;<br>
};<br>
interface "t0p1" {<br>
cost 1000;<br>
ecmp weight 1;<br>
};<br>
};<br>
};<br>
<br>
protocol ospf v3 ospf6 {<br>
vrf "vrf0";<br>
description "OSPF protocol for IPv6";<br>
<br>
<br>
ipv6 {<br>
table t_ospf6;<br>
<br>
export filter f_ospf_export;<br>
import filter f_ospf_import;<br>
<br>
};<br>
<br>
area 0 {<br>
interface "dummy0" {<br>
cost 10;<br>
ecmp weight 1;<br>
stub;<br>
};<br>
interface "t0p0" {<br>
cost 1000;<br>
ecmp weight 1;<br>
};<br>
interface "t0p1" {<br>
cost 1000;<br>
ecmp weight 1;<br>
};<br>
};<br>
};<br>
<br>
protocol pipe p_ospf4_to_master4 {<br>
vrf "vrf0";<br>
description "Pipe from t_ospf4 to master4";<br>
<br>
<br>
table t_ospf4;<br>
peer table master4;<br>
<br>
export filter f_ospf_master_export;<br>
import filter f_ospf_master_import;<br>
};<br>
<br>
protocol pipe p_ospf6_to_master6 {<br>
vrf "vrf0";<br>
description "Pipe from t_ospf6 to master6";<br>
<br>
<br>
table t_ospf6;<br>
peer table master6;<br>
<br>
export filter f_ospf_master_export;<br>
import filter f_ospf_master_import;<br>
};</font><br>
<p><br>
</p>
<p>Kind Regards<br>
Nigel<span style="font-family:monospace"><br>
</span></p>
<p><span style="font-family:monospace"><br>
</span></p>
<p><span style="font-family:monospace"><br>
</span></p>
<p><span style="font-family:monospace"><br>
</span></p>
<p><span style="font-family:monospace"></span><span
style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;"><br>
</span></span></p>
<p><span style="font-family:monospace"><br>
</span></p>
<p><span style="font-family:monospace"><br>
</span></p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</blockquote>
</body>
</html>