Files
bird_config/bird/peers/ospf/ospf_ipv4.conf

35 lines
800 B
Plaintext

protocol ospf v3 ospf_ipv4 {
ipv4 {
table ospf4;
import filter {
bgp_large_community.add((UNET_ASN,1,0));
accept;
};
export filter {
if bgp_large_community !~ [(UNET_ASN, 301,0)] then reject;
accept;
};
import limit 1000 action block;
};
area 0 {
interface "pccw1" {
cost 5;
password "114514";
};
};
}
protocol static route_ospf_export_v4 {
route 10.188.3.0/24 reject;
ipv4 {
table ospf4;
import filter {
bgp_large_community.add((UNET_ASN,301,0));# 允许导出至OSPF
bgp_large_community.add((UNET_ASN,3,0));# 不允许导出到内核
accept;
};
export none;
};
}