Re: Static route IPv4 via FE80::2/64 and interface issue

2024-02-15 Thread Saklak, Marcin via Bird-users
Hi,

It would be nice to have such possibility like in ip tool.
Thanks, Ondrej, your tip was incredibly helpful in solving the issue.

Thanks,
Marcin

On 14/02/2024, 17:39, "Ondrej Zajicek" mailto:santi...@crfreenet.org>> wrote:


On Wed, Feb 14, 2024 at 10:05:59AM +, Saklak, Marcin via Bird-users wrote:
> Hello Bird Users,
> 
> I have an issue with adding static route and interfaces. I use two different 
> platform one has interface names like eth-1_1_32 and second eth-1\1\64.
> First one works as I would expect.
> 
> route 192.168.1.5/32 via fe80::2 % "eth-1\1\64";
> bird> configure
> 
> Reading configuration from /mnt/storage/config/bird.conf
> 
> /mnt/storage/config/bird.conf:29:51 syntax error, unexpected TEXT
> 
> for:
> route 192.168.1.5/32 via "fe80::2%eth-1\1\64";
> no error and no entries in linux
> I did also tests with
> route 192.168.1.5/32 via "fe80::2%eth-1\\\1\\\64";
> route 192.168.1.5/32 via "fe80::2%eth-1\\1\\64";
> 
> route 192.168.1.5/32 via fe80::2 % ’eth-1\\\1\\\64’;
> route 192.168.1.5/32 via fe80::2 % ’eth-1\\1\\64’;
> 
> without any success
> 
> Is it possible to make it work on both cases or there is some other way to 
> configure such static route?


Hi


Looking now at the lexer and grammar rules, it is:


Quoted symbols (e.g. 'abc') can contain alphanumeric, '_', '-', '.' and ':'.


Doublequoted strings (e.g. "abc") can contain everything except '"',
as there is no quoting. It would be just "eth-1\1\64"


Unfortunately, for static route with link-local IPv6 address, the grammar
requires symbol not string, so one could just write something like fe80::1%eth0.


Therefore, it is not possible to use such interface name here directly.


You could do it indirectly, by defining it as a direct route and setting
nexthop in filter:


route 2001:db8:10::/48 via "eth-1\1\64" { gw = fe80::2; };




I think that we should accept more sane syntax for static routes with
link-local next hops, like one used by 'ip' command from iproute2,
i.e.:


route 2001:db8:10::/48 via fe80::1 dev "eth0";


-- 
Elen sila lumenn' omentielvo


Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org 
)
"To err is human -- to blame it on a computer is even more so."






Re: Static route IPv4 via FE80::2/64 and interface issue

2024-02-14 Thread Ondrej Zajicek
On Wed, Feb 14, 2024 at 10:05:59AM +, Saklak, Marcin via Bird-users wrote:
> Hello Bird Users,
> 
> I have an issue with adding static route and interfaces. I use two different 
> platform one has interface names like eth-1_1_32 and second eth-1\1\64.
> First one works as I would expect.
> 
> route 192.168.1.5/32 via fe80::2 % "eth-1\1\64";
> bird> configure
> 
> Reading configuration from /mnt/storage/config/bird.conf
> 
> /mnt/storage/config/bird.conf:29:51 syntax error, unexpected TEXT
> 
> for:
> route 192.168.1.5/32 via "fe80::2%eth-1\1\64";
> no error and no entries in linux
> I did also tests with
> route 192.168.1.5/32 via "fe80::2%eth-1\\\1\\\64";
> route 192.168.1.5/32 via "fe80::2%eth-1\\1\\64";
> 
> route 192.168.1.5/32 via fe80::2 % ’eth-1\\\1\\\64’;
> route 192.168.1.5/32 via fe80::2 % ’eth-1\\1\\64’;
> 
> without any success
> 
> Is it possible to make it work on both cases or there is some other way to 
> configure such static route?

Hi

Looking now at the lexer and grammar rules, it is:

Quoted symbols (e.g. 'abc') can contain alphanumeric, '_', '-', '.' and ':'.

Doublequoted strings (e.g. "abc") can contain everything except '"',
as there is no quoting. It would be just "eth-1\1\64"

Unfortunately, for static route with link-local IPv6 address, the grammar
requires symbol not string, so one could just write something like fe80::1%eth0.

Therefore, it is not possible to use such interface name here directly.

You could do it indirectly, by defining it as a direct route and setting
nexthop in filter:

route 2001:db8:10::/48 via "eth-1\1\64" { gw = fe80::2; };


I think that we should accept more sane syntax for static routes with
link-local next hops, like one used by 'ip' command from iproute2,
i.e.:

route 2001:db8:10::/48 via fe80::1 dev "eth0";

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
"To err is human -- to blame it on a computer is even more so."



Re: Static route IPv4 via FE80::2/64 and interface issue

2024-02-14 Thread Douglas Fischer
I'm just guessing here...

But it looks like some CNI for Kubernetes with some adapted way of renaming
the IFs.

Em qua., 14 de fev. de 2024 às 13:11, 
escreveu:

> 👋
>
> Which platform uses backslash in the interface name?
>
> Have you tried to rename the interface or add an interface alias? (using
> systemd or ude rules) to avoid the backslash in the interface name.
>
> On Wed, 14 Feb 2024, 11.11 Saklak, Marcin via Bird-users, <
> bird-users@network.cz> wrote:
>
>> Hello Bird Users,
>>
>>
>> I have an issue with adding static route and interfaces. I use two
>> different platform one has interface names like eth-1_1_32 and second
>> eth-1\1\64.
>> First one works as I would expect.
>>
>> First platform:
>> ifconfig eth-1_1_32
>>
>> eth-1_1_32: flags=4163  mtu 1500
>>
>>
>> bird.conf:
>>  route 192.168.1.5/32 via fe80::2 % 'eth-1_1_32';
>>
>> ip r
>>
>> 192.168.1.5 via inet6 fe80::2 dev eth-1_1_32 proto bird metric 32
>>
>> but second platform with interfaces in eth-1\1\64 style didn’t work
>> ifconfig eth-1\\1\\64
>>
>> eth-1\1\64: flags=4163  mtu 1500
>>
>> I’ve got an error message for  route 192.168.1.5/32 via fe80::2 %
>> 'eth-1\1\64';
>> birdc
>>
>> BIRD 2.13 ready.
>>
>> bird> configure
>>
>> Reading configuration from /mnt/storage/config/bird.conf
>>
>> /mnt/storage/config/bird.conf:29:45 Invalid character in apostrophed
>> symbol
>>
>> for:
>> route 192.168.1.5/32 via fe80::2 % "eth-1\1\64";
>> bird> configure
>>
>> Reading configuration from /mnt/storage/config/bird.conf
>>
>> /mnt/storage/config/bird.conf:29:51 syntax error, unexpected TEXT
>>
>>
>>
>> for:
>> route 192.168.1.5/32 via "fe80::2%eth-1\1\64";
>> no error and no entries in linux
>> I did also tests with
>> route 192.168.1.5/32 via "fe80::2%eth-1\\\1\\\64";
>> route 192.168.1.5/32 via "fe80::2%eth-1\\1\\64";
>>
>> route 192.168.1.5/32 via fe80::2 % ’eth-1\\\1\\\64’;
>> route 192.168.1.5/32 via fe80::2 % ’eth-1\\1\\64’;
>>
>> without any success
>>
>> Is it possible to make it work on both cases or there is some other way
>> to configure such static route?
>>
>>
>>
>> Thanks,
>> Marcin
>>
>>

-- 
Douglas Fernando Fischer
Engº de Controle e Automação


Re: Static route IPv4 via FE80::2/64 and interface issue

2024-02-14 Thread netravnen+birdlist
👋

Which platform uses backslash in the interface name?

Have you tried to rename the interface or add an interface alias? (using
systemd or ude rules) to avoid the backslash in the interface name.

On Wed, 14 Feb 2024, 11.11 Saklak, Marcin via Bird-users, <
bird-users@network.cz> wrote:

> Hello Bird Users,
>
>
> I have an issue with adding static route and interfaces. I use two
> different platform one has interface names like eth-1_1_32 and second
> eth-1\1\64.
> First one works as I would expect.
>
> First platform:
> ifconfig eth-1_1_32
>
> eth-1_1_32: flags=4163  mtu 1500
>
>
> bird.conf:
>  route 192.168.1.5/32 via fe80::2 % 'eth-1_1_32';
>
> ip r
>
> 192.168.1.5 via inet6 fe80::2 dev eth-1_1_32 proto bird metric 32
>
> but second platform with interfaces in eth-1\1\64 style didn’t work
> ifconfig eth-1\\1\\64
>
> eth-1\1\64: flags=4163  mtu 1500
>
> I’ve got an error message for  route 192.168.1.5/32 via fe80::2 %
> 'eth-1\1\64';
> birdc
>
> BIRD 2.13 ready.
>
> bird> configure
>
> Reading configuration from /mnt/storage/config/bird.conf
>
> /mnt/storage/config/bird.conf:29:45 Invalid character in apostrophed symbol
>
> for:
> route 192.168.1.5/32 via fe80::2 % "eth-1\1\64";
> bird> configure
>
> Reading configuration from /mnt/storage/config/bird.conf
>
> /mnt/storage/config/bird.conf:29:51 syntax error, unexpected TEXT
>
>
>
> for:
> route 192.168.1.5/32 via "fe80::2%eth-1\1\64";
> no error and no entries in linux
> I did also tests with
> route 192.168.1.5/32 via "fe80::2%eth-1\\\1\\\64";
> route 192.168.1.5/32 via "fe80::2%eth-1\\1\\64";
>
> route 192.168.1.5/32 via fe80::2 % ’eth-1\\\1\\\64’;
> route 192.168.1.5/32 via fe80::2 % ’eth-1\\1\\64’;
>
> without any success
>
> Is it possible to make it work on both cases or there is some other way to
> configure such static route?
>
>
>
> Thanks,
> Marcin
>
>


Static route IPv4 via FE80::2/64 and interface issue

2024-02-14 Thread Saklak, Marcin via Bird-users
Hello Bird Users,

I have an issue with adding static route and interfaces. I use two different 
platform one has interface names like eth-1_1_32 and second eth-1\1\64.
First one works as I would expect.

First platform:
ifconfig eth-1_1_32

eth-1_1_32: flags=4163  mtu 1500

bird.conf:
 route 192.168.1.5/32 via fe80::2 % 'eth-1_1_32';

ip r

192.168.1.5 via inet6 fe80::2 dev eth-1_1_32 proto bird metric 32

but second platform with interfaces in eth-1\1\64 style didn’t work
ifconfig eth-1\\1\\64

eth-1\1\64: flags=4163  mtu 1500

I’ve got an error message for  route 192.168.1.5/32 via fe80::2 % 'eth-1\1\64';
birdc

BIRD 2.13 ready.

bird> configure

Reading configuration from /mnt/storage/config/bird.conf

/mnt/storage/config/bird.conf:29:45 Invalid character in apostrophed symbol

for:
route 192.168.1.5/32 via fe80::2 % "eth-1\1\64";
bird> configure

Reading configuration from /mnt/storage/config/bird.conf

/mnt/storage/config/bird.conf:29:51 syntax error, unexpected TEXT

for:
route 192.168.1.5/32 via "fe80::2%eth-1\1\64";
no error and no entries in linux
I did also tests with
route 192.168.1.5/32 via "fe80::2%eth-1\\\1\\\64";
route 192.168.1.5/32 via "fe80::2%eth-1\\1\\64";

route 192.168.1.5/32 via fe80::2 % ’eth-1\\\1\\\64’;
route 192.168.1.5/32 via fe80::2 % ’eth-1\\1\\64’;

without any success

Is it possible to make it work on both cases or there is some other way to 
configure such static route?

Thanks,
Marcin