0

I am trying to learn more about BGP / IPv6, this is my goal:

enter image description here

Currently, for testing, I have a VM from a provider that gives me an /44 network

This is the current configuration on that VM:

router id <IP of VM>;

define OWNASN = 1234;

protocol device {
    scan time 10;
}

protocol direct {
    ipv6;
    interface "dummy*";
}

# templates
template bgp AS1234v6 {
   local as OWNASN;
   ipv6 {
      import all;
      export filter {
        if net = 2a0e:87c0:620::/44 then accept;
        reject;
      };
   };
   graceful restart on;
}

protocol bgp VM1 from AS1234v6 {
   neighbor <ipv6 of provider> as 1111;
   source address <ipv6 of VM>;
}

protocol bgp VM2 from AS1234v6 {
   description "test delegation";
   neighbor <public IP ov VM2> as OWNASN;
   source address <ipv6 of VM>;
}

If in that VM I add an alias to the main interface, something like:

ip -6 addr add 2a0e:87c0:620::1/64 dev eth0

I then can ping from any host to that address, so far all good, but now I would like to have 3 subnets:

  • 2a0e:87c0:620:1::/64
  • 2a0e:87c0:620:2::/64
  • 2a0e:87c0:620:3::/64

For testing and keeping things easy, I am replacing the tunnel and pfsense from the picture above with another VM.

In that VM I installed also bird2 and I am using this configuration:

router id <public IP of VM>;

protocol device {
        scan time 10;
}

protocol direct {
        disabled;
}

protocol static my_routes {
        ipv6;
        route 2a0e:87c0:620:1::/64 reject;
}

filter export_my_routes {
        if proto = "my_routes" then {
                accept;
        }
        reject;
}

protocol bgp uplink0 {
        local as 1234;
        neighbor <public IP of VM1> as 1234;
        source address <public IPv6>;
        ipv6 {
                import all;
                export filter export_my_routes;
        };
        graceful restart on;
}

With this I manage to establish a session:

$ birdc s p
BIRD 2.0.8 ready.
Name       Proto      Table      State  Since         Info
device1    Device     ---        up     19:13:19.082
direct1    Direct     ---        down   19:13:19.082
my_routes  Static     master6    up     19:13:19.082
uplink0    BGP        ---        up     19:13:22.095  Established

But if I add an alias on this new VM, I can't ping to it, I get this error:

From 2001:1900:5:4::189 icmp_seq=356 Time exceeded: Hop limit

And on the main VM (the one from the provider) I see now in the logs:

Invalid NEXT_HOP attribute

Therefore need some help on how to advertise the networks from the internal router to the external one besides how to configure then the subnets in each device so that they could be routed? wondering what gateway to use? probably fe80::1%vtnet0 ?

nbari
  • 548
  • 1
  • 8
  • 25

0 Answers0