Skip to content

Instantly share code, notes, and snippets.

@nasirhafeez
Last active August 8, 2021 10:29
Show Gist options
  • Save nasirhafeez/50bf2ae4417dce2609f833a2caf5d209 to your computer and use it in GitHub Desktop.
Save nasirhafeez/50bf2ae4417dce2609f833a2caf5d209 to your computer and use it in GitHub Desktop.

BIRD eBGP Example

BIRD version 2.0.8

An example configuration file /etc/bird/bird.conf where an eBGP adjacency is formed. All incoming routes are being rejected and one subnet is being advertised. The remaining defaults haven't been changed.

protocol static {
        ipv4;
        route 58.65.175.0/24 blackhole;
}

filter IMPORT_REJECT
{
      reject;
}

protocol bgp uplink1 {
      description "eBGP R1";
      local 192.168.59.130 as 200;
      neighbor 192.168.59.129 as 100;
      hold time 90;

      ipv4 {
              import filter IMPORT_REJECT;
              export where source ~ [ RTS_STATIC ];
      };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment