how to do IPv6 address assignment (eBGP --> iBGP --> home/lan)

Nico Schottelius nico.schottelius at ungleich.ch
Mon Nov 29 08:33:57 CET 2021


Good morning Nicolas,

IP assignment is handled differently to IP routing. You can use the
"radv" protocol
(https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.11) for
assignment.

Best regards,

Nico

Nicolas Embriz <nbari at tequila.io> writes:

> Hi, I manage to configure, establish a session and announce my prefix with this configuration:
>
> ---
> log "/var/log/bird.log" all;
> router id <ipv4>;
> define MYAS = 1234;
>
> protocol device {
>     scan time 10;
> }
>
> protocol direct {
>     ipv6;
>     interface "dummy*";
> }
>
> # templates
> template bgp uplink {
>    local as MYAS;
>    ipv6 {
>       import all;
>       export filter {
>         if net = <ipv6::/44> then accept;
>         reject;
>       };
>    };
>    graceful restart on;
> }
>
> protocol bgp SBv6 from uplink {
>    neighbor <ipv6> a as 12345;
>    source address <myipvy>;
> }
> ---
>
> For testing I added to eth0 an IPv6 address alias belonging to my  /44 segment, I was available to ping and so far all good, but now something that I am struggling with (probably something very basic) is how to
> do IP address assignment to my network from the router?
>
> This router is a VM but I would like to know how I could use a /64 subnet and  assign  IP's to my home network.
>
> Probably I am following the wrong approach, but I wanted to give a try creating an internal router (iBGP) and announce only the /64 subnet, I am using wireguard to connect the VM's but can't find a way to ping
> any IP I assign in this VM, something like this
>
> (internet)
>     |
>     |
> ( VM eBGP/44 ) <--- Wireguard ---> (VM iBGP/64) <----> HOME/LAN (/64)
>
>  this is my config:
>
> log "/var/log/bird.log" all;
> router id <ipv4>;
> define MYAS = 1234;
>
> protocol device {
>         scan time 10;
> }
>
> protocol direct {
>         ipv6;
>         interface "dummy*";
> }
>
> template bgp iAS {
>         local as MYAS;
>         ipv6 {
>                 import all;
>                 export filter {
>                         if net = <ipv6::/64> then accept;
>                         reject;
>                 };
>         };
>         graceful restart on;
> }
>
> protocol bgp iBGP from iAS {
>         debug all;
>         neighbor <peer wireguard ipv6>%wg0 as MYAS;
>         direct;
>         source address <wireguard ipv6>;
> }
>
> The session gets established but only from the eBGP I can ping the iBGP but not the other way around or from other hosts.
>
> Probably I may be over-complicating things, and I could do everything from the main router but is that the case, still wondering how can I then start to assign IPv6's address to my home network? should I
> configure something like radvd so that my devices can claim an IPv6?
>
> I am doing this just for learning purposes, so if there is a better way or practice to follow let me know.
>
> regards.


--
Sustainable and modern Infrastructures by ungleich.ch


More information about the Bird-users mailing list