Re: [PATCH] IPv4 over IPv6 nexthop support on FreeBSD
W dniu 17.04.2023 o 16:46, Luiz Amaral pisze: Hello Ondrej, Did you have a chance to check out the patch? I am happy to adjust it if needed. Hello Luiz, have you tried netlink flavour of BIRD ? It requires FreeBSD 13.2, but should work out of the box in such a setup, I have not tested though. Marek Luiz On 20/02/2023 04.33, Ondrej Zajicek wrote: On Sat, Feb 18, 2023 at 03:41:31PM +0100, Luiz Amaral wrote: Hello, While experimenting in FreeBSD 13.1 with IPv4 over IPv6 nexthop routes, I realized that BIRD was unable to read routes from the kernel as well as export routes to the kernel. The support for it was implemented in FreeBSD 13.1 [1]. I have attached a patch that made it work for me on FreeBSD 13.1, both importing and exporting to/from kernel. I believe the patch will still need some work, as from a quick look, OpenBSD still has no support for it. I'm happy to implement any suggested improvements and send a v2 of it. Hello This looks particularly simple. Will check that. [1] https://reviews.freebsd.org/D30398 diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 1f793293..92f8c837 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -314,6 +314,10 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e) if (ipa_is_link_local(gw)) _I0(gw) = 0xfe80 | (i->index & 0x); + if (ipa_is_ip6(gw)) { + af = AF_INET6; + } + sockaddr_fill(&gate, af, gw, NULL, 0); msg.rtm.rtm_flags |= RTF_GATEWAY; msg.rtm.rtm_addrs |= RTA_GATEWAY; @@ -469,7 +473,7 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan) idst = ipa_from_sa(&dst); imask = ipa_from_sa(&mask); - igate = (gate.sa.sa_family == dst.sa.sa_family) ? ipa_from_sa(&gate) : IPA_NONE; + igate = ipa_from_sa(&gate); #ifdef KRT_SHARED_SOCKET if (!scan) -- Marek Zarychta
Re: [PATCH] IPv4 over IPv6 nexthop support on FreeBSD
Hello Ondrej, Did you have a chance to check out the patch? I am happy to adjust it if needed. Luiz On 20/02/2023 04.33, Ondrej Zajicek wrote: On Sat, Feb 18, 2023 at 03:41:31PM +0100, Luiz Amaral wrote: Hello, While experimenting in FreeBSD 13.1 with IPv4 over IPv6 nexthop routes, I realized that BIRD was unable to read routes from the kernel as well as export routes to the kernel. The support for it was implemented in FreeBSD 13.1 [1]. I have attached a patch that made it work for me on FreeBSD 13.1, both importing and exporting to/from kernel. I believe the patch will still need some work, as from a quick look, OpenBSD still has no support for it. I'm happy to implement any suggested improvements and send a v2 of it. Hello This looks particularly simple. Will check that. [1] https://reviews.freebsd.org/D30398 diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 1f793293..92f8c837 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -314,6 +314,10 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e) if (ipa_is_link_local(gw)) _I0(gw) = 0xfe80 | (i->index & 0x); + if (ipa_is_ip6(gw)) { +af = AF_INET6; + } + sockaddr_fill(&gate, af, gw, NULL, 0); msg.rtm.rtm_flags |= RTF_GATEWAY; msg.rtm.rtm_addrs |= RTA_GATEWAY; @@ -469,7 +473,7 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, int scan) idst = ipa_from_sa(&dst); imask = ipa_from_sa(&mask); - igate = (gate.sa.sa_family == dst.sa.sa_family) ? ipa_from_sa(&gate) : IPA_NONE; + igate = ipa_from_sa(&gate); #ifdef KRT_SHARED_SOCKET if (!scan)
Re: BIRD is taking too much time to converge 106362 prefixes from a non-client iBGP neighbor
On Thu, Apr 13, 2023 at 11:47:12PM +0600, saiful...@fiberathome.net wrote: > Hi, > > Thanks for your feedback. The topology is BIRD is connected with total 8 > neighbors (1 is non-client and 7 are in client mode) for my setup. The > non-client neighbor is actually a high end central RR router which advertise > about 106k prefixes to BIRD and with other 7 client, the prefix count is > below 100. > > 1. During that time, I have checked and found that CPU load was normal. > 2. I also checking prefix count using command "show protocols all > " and found prefixes were increasing gradually. Hi If CPU was normal (idle), then it is unlikely an issue with BIRD. Prefixes are processed as they arrive, so they are delayed only if BIRD cannot catch up and use 100% CPU (note that it is single-threaded, so you have to check load on individual CPUs and not aggregate load, like is default in 'top'). Perhaps the other side send prefixes slowly? -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
RE: BIRD is taking too much time to converge 106362 prefixes from a non-client iBGP neighbor
Hi, Can you anyone please help me? Kindly. Thanks & Regards Abu Nasar Md. Saifullah -Original Message- From: saiful...@fiberathome.net Sent: Saturday, April 15, 2023 1:54 AM To: 'Ondrej Zajicek' ; 'bird-users@network.cz' Subject: RE: BIRD is taking too much time to converge 106362 prefixes from a non-client iBGP neighbor Hi, One more information. The prefixes here are actually vpnv4 prefixes. Is there any known slow convergence issue with VPNv4 prefixes for high count like 106K? Thanks & Regards Abu Nasar Md. Saifullah -Original Message- From: saiful...@fiberathome.net Sent: Thursday, April 13, 2023 11:51 PM To: 'Ondrej Zajicek' Cc: 'bird-users@network.cz' Subject: RE: BIRD is taking too much time to converge 106362 prefixes from a non-client iBGP neighbor Hi, Another point is my setup is Ubuntu 22.04.2 LTS with VCPU 16 and RAM 16GB. Thanks & Regards Saifullah Nasar -Original Message- From: saiful...@fiberathome.net Sent: Thursday, April 13, 2023 11:47 PM To: 'Ondrej Zajicek' Cc: 'bird-users@network.cz' Subject: RE: BIRD is taking too much time to converge 106362 prefixes from a non-client iBGP neighbor Hi, Thanks for your feedback. The topology is BIRD is connected with total 8 neighbors (1 is non-client and 7 are in client mode) for my setup. The non-client neighbor is actually a high end central RR router which advertise about 106k prefixes to BIRD and with other 7 client, the prefix count is below 100. 1. During that time, I have checked and found that CPU load was normal. 2. I also checking prefix count using command "show protocols all " and found prefixes were increasing gradually. In think I am missing something to make the prefix learning faster. Pls help me. Thanks & Regards Abu Nasar Md. Saifullah -Original Message- From: Ondrej Zajicek Sent: Thursday, April 13, 2023 8:16 PM To: saiful...@fiberathome.net Cc: bird-users@network.cz Subject: Re: BIRD is taking too much time to converge 106362 prefixes from a non-client iBGP neighbor On Wed, Apr 12, 2023 at 10:19:29PM +0600, saiful...@fiberathome.net wrote: > Dear Concern, > > After installing BIRD, I made iBGP neighbor with 8 routers. From a > non-client neighbor it should receive about 106362 prefixes but I > found it is taking huge time to process and converge the mentioned > prefixes. It took about 35 minutes to process, converge and advertise > prefixes to other neighbors. Is it normal behavior or am I missing > sometime to make faster convergence? Kindly suggest me. Hi That is definitely not a normal behavior. Especially if you have no filters, it should be orders of magnitude faster. You wrote you receive 106k prefixes from the non-client, do you also receive prefixes from clients? Are you sure that BIRD was working full-time (full single core cpu load) during that 35 minutes? If you monitor number of received routes during that time (using 'show route count table vpntab4' or 'show protocols all '), you can see if all these prefixes are already here or if they arrive continuously dyring that time. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." Connecting our future with light