<div dir="ltr">Hi Team,<div><br></div><div>I am using linux kernel 4.14 and trying to bind 2 vrfs to the same BGP instance.</div><div><br></div><div>The BGP session is established. But the second VRF binding over-writes the first VRF binding. </div><div><br></div><div><div>Do bird support this 2 vrf binding to the same BGP instance ?</div></div><div><br></div><div>R1</div><div>======</div><div>ipv4 table T_VRF_RED;<br>ipv4 table T_VRF_BLUE;<br><br>function oro_set_bgp_local_as() {<br>        bgp_path.prepend(100);<br>        return true;<br>}<br>function redistribute_proto()<br>{<br>        if ((source = RTS_BGP)) then {<br>                return true;<br>        }<br>        if (net=<a href="http://0.0.0.0/0">0.0.0.0/0</a>) then { return false;}<br>        if ((source = RTS_DEVICE)) then {<br>                 return false;<br>        }<br>        if (source = RTS_STATIC) then {<br>                if(net=<a href="http://0.0.0.0/0">0.0.0.0/0</a>) then { return false;}<br>                if (ifname = "lo") then {<br>                        return false;<br>                } else {<br>                        return false;<br>                }<br>        }<br>        if ((source = RTS_CFGSET)) then {<br>                 return false;<br>        }<br>        if ((source = RTS_IAPVPN)) then {<br>                 return false;<br>        }<br>        if ((source = RTS_OAP)) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF_IA) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF_EXT1) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF_EXT2) then {<br>                 return false;<br>        }<br>        if ((source = RTS_OSPF) || (source = RTS_OSPF_IA) || (source = RTS_OSPF_EXT1) || (source = RTS_OSPF_EXT2)) then {<br>                 return false;<br>        }<br>        return false;<br>}<br>protocol kernel K_VRF_RED {<br>        vrf "red";<br>        kernel table 100;<br>        scan time 20;<br><br>        ipv4 {<br>                table T_VRF_RED;<br>                import all;<br>                export all;<br>        };<br>}<br>protocol kernel K_VRF_BLUE {<br>        vrf "blue";<br>        kernel table 200;<br>        scan time 20;<br><br>        ipv4 {<br>                table T_VRF_BLUE;<br>                import all;<br>                export all;<br>        };<br>}<br>protocol direct C_VRF_RED {<br>        vrf "red";<br>        ipv4 { table T_VRF_RED; };<br><br>}<br>protocol direct C_VRF_BLUE {<br>        vrf "blue";<br>        ipv4 { table T_VRF_BLUE; };<br><br>}<br><br>protocol static S_VRF_RED {<br>        vrf "red";<br>        ipv4 { table T_VRF_RED; };<br><br>        route <a href="http://10.10.1.0/24">10.10.1.0/24</a> blackhole;<br>}<br>protocol static S_VRF_BLUE {<br>        vrf "blue";<br>        ipv4 { table T_VRF_BLUE; };<br><br>        route <a href="http://10.10.1.0/24">10.10.1.0/24</a> blackhole;<br>}<br>protocol bgp B_VRF_RED {<br>        vrf "red";<br>        vrf "blue";<br>        router id 10.16.44.216;<br>        local 50.0.12.1 as 100;<br>        neighbor 50.0.12.2  as 100;<br>        enable as4 on;<br>        hold time 90;<br>        keepalive time 30;<br>        direct;<br>        # regular IPv4 unicast (1/1)<br>        ipv4 {<br>                table T_VRF_RED;<br>                table T_VRF_BLUE;<br>                import all;<br>                export all;<br>        };<br>}<br></div><div>R2</div><div>======<br><div>ipv4 table T_VRF_RED;<br>ipv4 table T_VRF_BLUE;<br><br>function oro_set_bgp_local_as() {<br>        bgp_path.prepend(100);<br>        return true;<br>}<br>function redistribute_proto()<br>{<br>        if ((source = RTS_BGP)) then {<br>                return true;<br>        }<br>        if (net=<a href="http://0.0.0.0/0">0.0.0.0/0</a>) then { return false;}<br>        if ((source = RTS_DEVICE)) then {<br>                 return false;<br>        }<br>        if (source = RTS_STATIC) then {<br>                if(net=<a href="http://0.0.0.0/0">0.0.0.0/0</a>) then { return false;}<br>                if (ifname = "lo") then {<br>                        return false;<br>                } else {<br>                        return false;<br>                }<br>        }<br>        if ((source = RTS_CFGSET)) then {<br>                 return false;<br>        }<br>        if ((source = RTS_IAPVPN)) then {<br>                 return false;<br>        }<br>        if ((source = RTS_OAP)) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF_IA) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF_EXT1) then {<br>                 return false;<br>        }<br>        if (source = RTS_OSPF_EXT2) then {<br>                 return false;<br>        }<br>        if ((source = RTS_OSPF) || (source = RTS_OSPF_IA) || (source = RTS_OSPF_EXT1) || (source = RTS_OSPF_EXT2)) then {<br>                 return false;<br>        }<br>        return false;<br>}<br>protocol kernel K_VRF_RED {<br>        vrf "red";<br>        kernel table 100;<br>        scan time 20;<br><br>        ipv4 {<br>                table T_VRF_RED;<br>                import all;<br>                export all;<br>        };<br>}<br>protocol kernel K_VRF_BLUE {<br>        vrf "blue";<br>        kernel table 200;<br>        scan time 20;<br><br>        ipv4 {<br>                table T_VRF_BLUE;<br>                import all;<br>                export all;<br>        };<br>}<br>protocol direct C_VRF_RED {<br>        vrf "red";<br>        ipv4 { table T_VRF_RED; };<br>}<br>protocol direct C_VRF_BLUE {<br>        vrf "blue";<br>        ipv4 { table T_VRF_BLUE; };<br>}<br>protocol static S_VRF_RED {<br>        vrf "red";<br>        ipv4 { table T_VRF_RED; };<br><br>        route <a href="http://10.10.1.0/24">10.10.1.0/24</a> blackhole;<br>}<br>protocol static S_VRF_BLUE {<br>        vrf "blue";<br>        ipv4 { table T_VRF_BLUE; };<br><br>        route <a href="http://10.10.1.0/24">10.10.1.0/24</a> blackhole;<br>}<br>protocol bgp B_VRF_RED {<br>        vrf "red";<br>        vrf "blue";<br>        router id 10.16.44.217;<br>        local 50.0.12.2 as 100;<br>        neighbor 50.0.12.1  as 100;<br>        enable as4 on;<br>        hold time 90;<br>        keepalive time 30;<br>        direct;<br>        # regular IPv4 unicast (1/1)<br>        ipv4 {<br>                table T_VRF_RED;<br>                table T_VRF_BLUE;<br>                import all;<br>                export all;<br>        };<br>}<br></div><div><br></div><div><br></div><div>Thanks,</div><div>Ramanathan</div></div></div>