Limitation on stubnet prefixes
Hello, Is there a limit on the number of stubnet prefixes that we can configure? I have configured 50000 stubnets but my router receives only 1084 routes. protocol ospf v2 { area 0 { interface "virbr1"; include "/home/acunha/routes.txt"; }; } acunha@staging:~$ more /home/acunha/routes.txt stubnet 1.0.0.0/24; stubnet 1.0.1.0/24; stubnet 1.0.2.0/24; stubnet 1.0.3.0/24; stubnet 1.0.4.0/24; stubnet 1.0.5.0/24; stubnet 1.0.6.0/24; stubnet 1.0.7.0/24; stubnet 1.0.8.0/24; stubnet 1.0.9.0/24; stubnet 1.0.10.0/24; .... If I configure the routes as static and redistribute in OSPF, it works fine. I have tested with both 1.6 and 2.0 and the behavior is the same Thanks Andre
On Fri, Jul 26, 2019 at 10:49:31AM +0200, Andre Cunha wrote:
Hello,
Is there a limit on the number of stubnet prefixes that we can configure? I have configured 50000 stubnets but my router receives only 1084 routes.
Hello Yes, stubnet prefixes are announced as a part of the Router-LSA, with 12 B per prefix. With 16bit Router-LSA length, the limit is about 5400 Router-LSA entries (including other entries than just stubnets). But note that having such large Router-LSA may cause many problems, including OSPF packet fragmentation, so i would generally suggest to not have larger Router-LSA than MTU, i.e. not more than ~100 entries. This length limit is not enforced in BIRD, if you configure more stubnets, the Router-LSA with length modulo 64k is generated, which may be invalid. I should add some check and warning there. External routers are announced as separate External-LSAs, so there is no such limit for them. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
Thanks Ondrej, that makes sense. Is there a way to add routes on the fly then, instead of putting them all in the config file? Or any other suggestion on how I could generate 50000 type-1 LSA. Regards Andre On 26/07/2019, 12:32, "Ondrej Zajicek" <santiago@crfreenet.org> wrote: On Fri, Jul 26, 2019 at 10:49:31AM +0200, Andre Cunha wrote: > Hello, > > Is there a limit on the number of stubnet prefixes that we can configure? I have configured 50000 stubnets but my router receives only 1084 routes. Hello Yes, stubnet prefixes are announced as a part of the Router-LSA, with 12 B per prefix. With 16bit Router-LSA length, the limit is about 5400 Router-LSA entries (including other entries than just stubnets). But note that having such large Router-LSA may cause many problems, including OSPF packet fragmentation, so i would generally suggest to not have larger Router-LSA than MTU, i.e. not more than ~100 entries. This length limit is not enforced in BIRD, if you configure more stubnets, the Router-LSA with length modulo 64k is generated, which may be invalid. I should add some check and warning there. External routers are announced as separate External-LSAs, so there is no such limit for them. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
On Fri, Jul 26, 2019 at 03:32:04PM +0200, Andre Cunha wrote:
Thanks Ondrej, that makes sense. Is there a way to add routes on the fly then, instead of putting them all in the config file? Or any other suggestion on how I could generate 50000 type-1 LSA.
You can just add add them as static routes in the config file and use reconfigure to add/remove on the fly, or you could learn them from an auxiliary kernel table using kernel protocol (and add them on the fly to the kernel routing table using ip command). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
participants (2)
-
Andre Cunha -
Ondrej Zajicek