Prefix to blackhole

Ondrej Zajicek santiago at crfreenet.org
Mon Feb 27 22:11:59 CET 2012


On Mon, Feb 27, 2012 at 04:58:01PM +0100, fredrik danerklint wrote:
> Hi!
>
> I want to be able to set a router prefix via bgp to blackhole.
>
> What I have is this:
>
> if ((my_as, 666) ~ bgp_community) then {
> print "blackhole '", net, "' from AS", bgp_path.last, " via AS",  
> bgp_path.first, " [", proto, "]";
> #        set nexthop blackhole;
> #       bgp_next_hop blackhole;
>  bgp_community.delete((my_as, 666 ));
>  return false;
> }
>
> but either set nexthop or bgp_next_hop works.
>
> Is this possible in bird?

You could use bgp_next_hop = 1.2.3.4; for setting a nexthop IP, but this
cannot be used to change a 'class' of nexthop (router, device,
multipath, kinds of blackhole). A 'class' is in property named 'dest',
which can contain values RTD_ROUTER, RTD_DEVICE, RTD_BLACKHOLE, ... , 
but this is currently read-only, so it cannot be changed.

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at 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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20120227/ba4f70d2/attachment-0001.asc>


More information about the Bird-users mailing list