Incorrect manual next hop attribute

Jordan Grigorov (Neterra NMT) jgrigorov at neterra.net
Thu Feb 7 10:48:38 CET 2013


To be more specific we would like to receive a route from subinterface 
eth1.10 and announce it to subinterface eth1.192 with next hop 
192.168.0.50.
We modify the next hop using the following function. AS65065 is the 
exact peer that we would like to alter the nexthop of received prefixes.

function bgp_in(int peeras)

prefix set martians;

{
     if peeras = 65065 then
     {
         bgp_next_hop = 192.168.0.50;
         return true;
     }

     if is_nexthop_false() then return false;

     martians = [ 169.254.0.0/16+, 172.16.0.0/12+, 
224.0.0.0/4+,240.0.0.0/4+, 0.0.0.0/32-, 0.0.0.0/0{25,32},0.0.0.0/0{0,7} ];

     if net.ip = 0.0.0.0 then return false;
     if (net.len < 8) || (net.len > 24) then return false;

     return true;
}




More information about the Bird-users mailing list