<div dir="ltr">Hi Ondrej,<div><br></div><div>Thanks for your response. L3VPN feature is cool and thank you for your valuable addition.</div><div><br></div><div>Please let me know how to set an empty export route target in l3vpn.</div><div><br></div><div>I tried the options below and I got syntax error.</div><div>export target [(rt, , )];<br></div><div>export target [()];<br></div><div>export target [ ];<br></div><div>export target [(rt)]<br></div><div><br></div><div>When I tried with "export target [(rt, 0, 0)];", route target with 0:0 was advertised.</div><div><br></div><div>Thanks,</div><div>Ramanathan</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 13 Jun 2023 at 19:28, Ondrej Zajicek <<a href="mailto:santiago@crfreenet.org" target="_blank">santiago@crfreenet.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jun 13, 2023 at 10:47:08AM +0530, Ramanathan Selvamani wrote:<br>
> Hi Team,<br>
> <br>
> I configured l3vpn in BIRD and I was able to see the routes are learnt and<br>
> advertised based on RT.<br>
> <br>
> All the routes in this VRF are advertised with RT (1:11) to neighbors.<br>
<br>
Hi<br>
<br>
I am glad you tried this MPLS L3VPN branch, i would be interested in<br>
your experiences and suggestions with it.<br>
<br>
<br>
> I have a use case in which I want to apply different RT for different<br>
> routes belonging to the same VRF.<br>
> <br>
> For example,<br>
> I have the following prefixes in this VRF "vrf2".<br>
> <a href="http://101.1.1.0/24" rel="noreferrer" target="_blank">101.1.1.0/24</a><br>
> <a href="http://103.1.1.0/24" rel="noreferrer" target="_blank">103.1.1.0/24</a><br>
> <a href="http://105.1.1.0/24" rel="noreferrer" target="_blank">105.1.1.0/24</a><br>
> <br>
> I would like to add different "export route target" as below for routes<br>
> belong to same VRF<br>
> <a href="http://101.1.1.0/24" rel="noreferrer" target="_blank">101.1.1.0/24</a> : export RT 1:11<br>
> <a href="http://103.1.1.0/24" rel="noreferrer" target="_blank">103.1.1.0/24</a> : export RT 1:20<br>
> <a href="http://105.1.1.0/24" rel="noreferrer" target="_blank">105.1.1.0/24</a> : export RT 1:30<br>
<br>
Currently, the implicit export RT processing works by removing all RT<br>
communitines and then adding ones specified in the export target<br>
option.<br>
<br>
If you want to set individual route targets, you could just keep the<br>
export target set empty and add individual communities ex-post in vpn4<br>
channel import filter (VRF export direction first passes through ipvX<br>
channel export filter, then internal processing, then vpnX channel import<br>
filter), with something like:<br>
<br>
case (net) {<br>
1:11 <a href="http://101.1.1.0/24" rel="noreferrer" target="_blank">101.1.1.0/24</a>: bgp_ext_community.add((rt, 1, 11));<br>
1:11 <a href="http://103.1.1.0/24" rel="noreferrer" target="_blank">103.1.1.0/24</a>: bgp_ext_community.add((rt, 1, 20));<br>
1:11 <a href="http://105.1.1.0/24" rel="noreferrer" target="_blank">105.1.1.0/24</a>: bgp_ext_community.add((rt, 1, 30));<br>
}<br>
<br>
(note that in vpnX import filter the route is already converted to VPNv4 NLRI, so 'net'<br>
is RD + prefix.<br>
<br>
<br>
There is an alternative approach, which is not yet implemented, but there<br>
should be an option with EC set that instead of appriori removing all<br>
existing RTs during export, it should keep a defined subset (say [(rt, 1,<br>
10..40)]), and then these RTs could be passed from original IP routes<br>
from VRF.<br>
<br>
-- <br>
Elen sila lumenn' omentielvo<br>
<br>
Ondrej 'Santiago' Zajicek (email: <a href="mailto:santiago@crfreenet.org" target="_blank">santiago@crfreenet.org</a>)<br>
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, <a href="http://wwwkeys.pgp.net" rel="noreferrer" target="_blank">wwwkeys.pgp.net</a>)<br>
"To err is human -- to blame it on a computer is even more so."<br>
</blockquote></div>