Cnange next-hop

Jordan Grigorov (Neterra NMT) jgrigorov at neterra.net
Fri Apr 4 17:35:52 CEST 2014


Hello,

Please try:

if (net.len = 32 && bgp_community ~ [ (31210,*) ] && bgp_community ~ [ (0,666) ] ) then {
	bgp_next_hop = 193.25.181.253;
	return true;
}



Best Regards,


On 04.4.2014 г. 18:19, Alexander Shikov wrote:
> Hi,
>
> continuing the implemetation of blackhole in our IXP, I've faced with problem of
> changing next-hop for the route.
>
> Construction looks like
>
> if (net.len = 32 && bgp_community ~ [ (31210,*) ] && bgp_community ~ [ (0,666) ] ) then {
> 	gw = 193.25.181.253;
> 	return true;
> }
>
> results in :
>
> bird> show route for 95.67.13.2/32 all
> 95.67.13.2/32      via 193.25.181.253 on bge0 [COSMONOVA2 2014-04-04 17:59:19 from 193.25.180.133] * (50) [AS34867i]
>          Type: BGP unicast univ
>          BGP.origin: IGP
>          BGP.as_path: 34867
>          BGP.next_hop: 193.25.180.133
>          BGP.local_pref: 100
>          BGP.community: (0,666) (31210,31210)
>
>
> And when this route is announced to other peer, next-hop remains unchanged:
>
> Peerings.inet.0: 16708 destinations, 50556 routes (16627 active, 0 holddown, 88 hidden)
> + = Active Route, - = Last Active, * = Both
>
> 95.67.13.2/32      *[BGP/170] 00:12:14, localpref 100, from 193.25.180.255
>                        AS path: 34867 I
>                      > to 193.25.180.133 via xe-1/0/0.777
>
> As far as I understand from User's Guide, gw is an read-write attribute,
> so why it didn't change next-hop?
>
> Thanks in advance!
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20140404/c27bd49c/attachment-0001.html>


More information about the Bird-users mailing list