Ubuntu Static Routes

Jason Kopacko jason at kopacko.com
Fri Apr 7 18:09:21 CEST 2017


Hello all,
I am new here, so please forgive me if this has been asked before.

I am setting up BIRD to handle RTBH and here is my config for reading in
local static routes and identifying route info:

filter ROUTE_INFO {
  gw = LOCAL_GW;
  print "******************************";
  if source ~ [ RTS_STATIC ] then {
    print "** [SOURCE] STATIC Route: ",net;
  }
  if source ~ [ RTS_INHERIT ] then {
    print "** [SOURCE] INHERIT Route: ",net;
  }
  if source ~ [ RTS_DEVICE ] then {
    print "** [SOURCE] DEVICE Route: ",net;
  }
  if source ~ [ RTS_STATIC_DEVICE ] then {
    print "** [SOURCE] STATIC_DEVICE Route: ",net;
  }
  if source ~ [ RTS_REDIRECT ] then {
    print "** [SOURCE] REDIRECT Route: ",net;
  }
  if source ~ [ RTS_BGP ] then {
    print "** [SOURCE] BGP Route: ",net;
  }
  if source ~ [ RTS_PIPE ] then {
    print "** [SOURCE] PIPE Route: ",net;
  }
  print "******************************";
  if dest ~ [ RTD_ROUTER ] then {
    print "** [DESTINATION] Neighbor Route: ",net;
  }
  if dest ~ [ RTD_DEVICE ] then {
    print "** [DESTINATION] Directly Connected Route: ",net;
  }
  if dest ~ [ RTD_MULTIPATH ] then {
    print "** [DESTINATION] Multipath Route: ",net;
  }
  if dest ~ [ RTD_BLACKHOLE ] then {
    print "** [DESTINATION] Blackhole Route: ",net;
  }
  if dest ~ [ RTD_UNREACHABLE ] then {
    print "** [DESTINATION] Unreachable Route: ",net;
  }
  if dest ~ [ RTD_PROHIBIT ] then {
    print "** [DESTINATION] Prohibited Route: ",net;
  }
  print "******************************";
  if scope ~ [ SCOPE_HOST ] then {
    print "** [SCOPE] Host Route: ",net;
  }
  if scope ~ [ SCOPE_LINK ] then {
    print "** [SCOPE] Link Route: ",net;
  }
  if scope ~ [ SCOPE_SITE ] then {
    print "** [SCOPE] Site Route: ",net;
  }
  if scope ~ [ SCOPE_ORGANIZATION ] then {
    print "** [SCOPE] Organization Route: ",net;
  }
  if scope ~ [ SCOPE_UNIVERSE ] then {
    print "** [SCOPE] Universe Route: ",net;
  }
  print "******************************";
  if cast ~ [ RTC_UNICAST ] then {
    print "** [TYPE] Unicast Route: ",net;
  }
  if cast ~ [ RTC_BROADCAST ] then {
    print "** [TYPE] Broadcast Route: ",net;
  }
  if cast ~ [ RTC_MULTICAST ] then {
    print "** [TYPE] Multicast Route: ",net;
  }
  if cast ~ [ RTC_ANYCAST ] then {
    print "** [TYPE] Anycast Route: ",net;
  }
}

protocol kernel {
  description "Kernel Blackholes";
  scan time 10;
  table BH;
  kernel table 120;
  learn;
  import filter ROUTE_INFO;
  export all;
}

I found that when I add a route:

-- sudo ip route add blackhole x.x.x.x/32 table 120

In my logs on the BIRD server,  I see this in my logs:

2017-04-07 12:00:45 <INFO> ******************************
2017-04-07 12:00:45 <INFO> ** [SOURCE] INHERIT Route: x.x.x.x/32
2017-04-07 12:00:45 <INFO> ******************************
2017-04-07 12:00:45 <INFO> ** [DESTINATION] Neighbor Route: x.x.x.x/32
2017-04-07 12:00:45 <INFO> ******************************
2017-04-07 12:00:45 <INFO> ** [SCOPE] Universe Route: x.x.x.x/32
2017-04-07 12:00:45 <INFO> ******************************
2017-04-07 12:00:45 <INFO> ** [TYPE] Unicast Route: x.x.x.x/32
2017-04-07 12:00:45 <INFO> ******************************

Shouldn't this be showing up as some sort of static or device route?

Also, shouldn't the destination be a blackhole route?

If these are attributes I need to be changing, I can do that, I just
figured they were being identified correctly.

Sent from my Verizon Wireless 4G LTE Droid Turbo 2.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170407/8fb374ee/attachment.html>


More information about the Bird-users mailing list