[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bird-users
Subject:    Re: Add random number
From:       Maria Matejka via Bird-users <bird-users () network ! cz>
Date:       2024-02-11 23:59:36
Message-ID: FA171C7B-60F9-42F9-A24F-885A47654C8F () nic ! cz
[Download RAW message or body]

In all cases, I'd appreciate a detailed description of the exact use case we are \
trying to solve. We may then come up with an appropriate solution, a workaround or a \
well-defined feature request.

Thank you for your understanding.
Maria

On 11 February 2024 09:30:50 GMT-05:00, Alexander Zubkov via Bird-users \
<bird-users@network.cz> wrote:
> Maybe not random, but some sorta hash will be useful here? And it
> should not break the invariant mentioned by Maria. But for the hash we
> still need some means to convert IP addresses to integer numbers,
> because including IP into the hash seems to be reasonable.
> 
> On Sun, Feb 11, 2024 at 3:12 PM Max Tulyev <maxtul@netassist.ua> wrote:
> > 
> > In our case no. We use the route reflector, so it should export the random route \
> > to other routers, not just use it by itself. 
> > On Sun, 11 Feb 2024 08:55:02 -0500
> > "Darren O'Connor" <mellow.drifter@gmail.com> wrote:
> > 
> > > Isn't this a problem for multipath/add path to fix?
> > > 
> > > On Sun, Feb 11, 2024, 08:43 Max Tulyev <maxtul@netassist.ua> wrote:
> > > 
> > > > Yes, that's correct. I have same routes come from different routers, and I
> > > > want to spread the traffic between them, but if one router fails - keep it
> > > > working using anothers.
> > > > 
> > > > Okay, is it possible to get the variable as the result of the shell
> > > > script? Like
> > > > 
> > > > localpref = `cat prefpeer`
> > > > 
> > > > On Sun, 11 Feb 2024 18:04:18 +0800
> > > > Brandon Zhi <Brandon@huize.asia> wrote:
> > > > 
> > > > > I think the only usage for random number is for loading balance.
> > > > > 
> > > > > *Brandon Zhi*
> > > > > HUIZE LTD
> > > > > www.huize.asia  <https://huize.asia/>| www.ixp.su | Twitter
> > > > > 
> > > > > This e-mail and any attachments or any reproduction of this e-mail in
> > > > > whatever manner are confidential and for the use of the addressee(s)
> > > > only.
> > > > > HUIZE LTD can't take any liability and guarantee of the text of the email
> > > > > message and virus.
> > > > > 
> > > > > 
> > > > > Maria Matejka via Bird-users <bird-users@network.cz>于2024年2月11日
> > > > 周日06:03写道:
> > > > > 
> > > > > > Hello!
> > > > > > 
> > > > > > No, it's not possible and it makes the filters non-deterministic which
> > > > > > would break a critical invariant in BIRD's internal algorithms.
> > > > > > 
> > > > > > If you better clarify what you are trying to achieve, we may find
> > > > another
> > > > > > way for you to do it, or at least convert it to a viable feature
> > > > request.
> > > > > > 
> > > > > > Thank you for your understanding
> > > > > > Maria
> > > > > > On 2024-02-10 20:56, Max Tulyev wrote:
> > > > > > 
> > > > > > Hi All,
> > > > > > 
> > > > > > is it possible to add a random number to some variable in the filter?
> > > > > > 
> > > > > > For example, like this:
> > > > > > 
> > > > > > filter myfilter
> > > > > > {
> > > > > > if net ~ 192.168.11.0/24 then preference = preference +
> > > > random(10);
> > > > > > 
> > > > > > ...
> > > > > > 
> > > > > > --
> > > > > > Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
> > > > > > 
> > > > > > 
> > > > 
> > > > 
> > 
> 

-- 
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.


[Attachment #3 (text/html)]

<html><head></head><body><div dir="auto">In all cases, I'd appreciate a detailed \
description of the exact use case we are trying to solve. We may then come up with an \
appropriate solution, a workaround or a well-defined feature request.<br><br>Thank \
you for your understanding.<br>Maria</div><br><br><div class="gmail_quote"><div \
dir="auto">On 11 February 2024 09:30:50 GMT-05:00, Alexander Zubkov via Bird-users \
&lt;bird-users@network.cz&gt; wrote:</div><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); \
padding-left: 1ex;"> <pre class="k9mail"><div dir="auto">Maybe not random, but some \
sorta hash will be useful here? And it<br>should not break the invariant mentioned by \
Maria. But for the hash we<br>still need some means to convert IP addresses to \
integer numbers,<br>because including IP into the hash seems to be \
reasonable.<br><br>On Sun, Feb 11, 2024 at 3:12 PM Max Tulyev \
&lt;maxtul@netassist.ua&gt; wrote:<br></div><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: \
1ex;"><div dir="auto"><br> In our case no. We use the route reflector, so it should \
export the random route to other routers, not just use it by itself.<br><br> On Sun, \
11 Feb 2024 08:55:02 -0500<br> "Darren O'Connor" &lt;mellow.drifter@gmail.com&gt; \
wrote:<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; \
border-left: 1px solid #ad7fa8; padding-left: 1ex;"><div dir="auto"> Isn't this a \
problem for multipath/add path to fix?<br><br> On Sun, Feb 11, 2024, 08:43 Max Tulyev \
&lt;maxtul@netassist.ua&gt; wrote:<br><br></div><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: \
1ex;"><div dir="auto"> Yes, that's correct. I have same routes come from different \
routers, and I<br> want to spread the traffic between them, but if one router fails - \
keep it<br> working using anothers.<br><br> Okay, is it possible to get the variable \
as the result of the shell<br> script? Like<br><br> localpref = `cat \
prefpeer`<br><br> On Sun, 11 Feb 2024 18:04:18 +0800<br> Brandon Zhi \
&lt;Brandon@huize.asia&gt; wrote:<br><br></div><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: \
1ex;"><div dir="auto"> I think the only usage for random number is for loading \
balance.<br><br> *Brandon Zhi*<br> HUIZE LTD<br> www.huize.asia  &lt;<a \
href="https://huize.asia/">https://huize.asia/</a>&gt;| www.ixp.su | Twitter<br><br> \
This e-mail and any attachments or any reproduction of this e-mail in<br> whatever \
manner are confidential and for the use of the \
addressee(s)<br></div></blockquote><div dir="auto">only.<br></div><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; \
padding-left: 1ex;"><div dir="auto"> HUIZE LTD can't take any liability and guarantee \
of the text of the email<br> message and virus.<br><br><br> Maria Matejka via \
Bird-users &lt;bird-users@network.cz&gt;于2024年2月11日<br></div></blockquote><div \
dir="auto">周日06:03写道:<br></div><blockquote class="gmail_quote" \
style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: \
1ex;"><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin: 0pt \
0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><div dir="auto"> \
Hello!<br><br> No, it's not possible and it makes the filters non-deterministic \
which<br> would break a critical invariant in BIRD's internal algorithms.<br><br> If \
you better clarify what you are trying to achieve, we may \
find<br></div></blockquote></blockquote><div dir="auto">another<br></div><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; \
padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; \
border-left: 1px solid #e9b96e; padding-left: 1ex;"><div dir="auto">way for you to do \
it, or at least convert it to a viable \
feature<br></div></blockquote></blockquote><div \
dir="auto">request.<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt \
1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; \
padding-left: 1ex;"><div dir="auto"><br> Thank you for your understanding<br> \
Maria<br> On 2024-02-10 20:56, Max Tulyev wrote:<br><br> Hi All,<br><br> is it \
possible to add a random number to some variable in the filter?<br><br> For example, \
like this:<br><br> filter myfilter<br> {<br>     if net ~ 192.168.11.0/24 then \
preference = preference +<br></div></blockquote></blockquote><div \
dir="auto">random(10);<br></div><blockquote class="gmail_quote" style="margin: 0pt \
0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; \
padding-left: 1ex;"><div dir="auto"><br> ...<br><br> --<br> Maria Matejka (she/her) | \
BIRD Team Leader | CZ.NIC, z.s.p.o.<br><br><br></div></blockquote></blockquote><div \
dir="auto"><br><br></div></blockquote></blockquote><div \
dir="auto"><br></div></blockquote><div \
dir="auto"><br></div></pre></blockquote></div><div dir="auto"><div \
class='k9mail-signature'>-- <br>Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, \
z.s.p.o.</div></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic