Skip to content

Instantly share code, notes, and snippets.

@tuna2134
Last active October 22, 2024 16:11
Show Gist options
  • Save tuna2134/719611f1fae2577365864e81af16c5e8 to your computer and use it in GitHub Desktop.
Save tuna2134/719611f1fae2577365864e81af16c5e8 to your computer and use it in GitHub Desktop.
router id 172.16.70.1;
log syslog { info, remote, warning, error, auth, fatal, bug };
log stderr all;
debug protocols {events, states, interfaces};
graceful restart wait 15;
protocol kernel {
ipv4 {
import none;
export all;
};
learn;
scan time 10;
}
protocol static {
ipv4;
route 172.16.70.0/24 blackhole;
}
protocol direct {
ipv4;
interface "eth0";
}
protocol device {
scan time 100;
}
protocol bgp bgp1 {
local as 65001;
neighbor 10.1.0.1 as 65002;
ipv4 {
next hop self;
import all;
export filter {
if net ~ [172.16.70.0/24] then accept;
if source = RTS_BGP then accept;
reject;
};
};
}

BIRD2

BIRD2を利用したBGPルーターのサンプル

パラメータ

name description
172.16.70.1 ルーターのIP
172.16.70.0/24 広報するIP
65001 自分ASN
10.1.0.1 境界IP
65002 相手のASN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment