Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core routers shouldn't need to originate prefixes #4

Open
bswinnerton opened this issue May 9, 2020 · 0 comments
Open

Core routers shouldn't need to originate prefixes #4

bswinnerton opened this issue May 9, 2020 · 0 comments

Comments

@bswinnerton
Copy link
Contributor

Ideally we'd be able to leave out the originations key in the configurations of Core routers:

# The prefixes being originated by this router
originations:
v4:
- '198.51.100.0/24'
v6:
- '2001:db8::/32'

But they are currently powering things like:

define ORIGINATED_PREFIXES_4 = [
<%= config.originations.v4.join(",\n ") %>
];
define ORIGINATED_PREFIXES_6 = [
<%= config.originations.v6.join(",\n ") %>
];
define OUR_INTERNAL_PREFIXES_4 = [
<%= config.originations.v4.map { |p| "#{p}+" }.join(",\n ") %>
];
define OUR_INTERNAL_PREFIXES_6 = [
<%= config.originations.v6.map { |p| "#{p}+" }.join(",\n ") %>
];

Which are later used in:

function is_own_prefix() {
if net.type = NET_IP4 then {
if net ~ ORIGINATED_PREFIXES_4 then {
bgp_large_community.add((OUR_AS, 101, 1));
return true;
}
}
if net.type = NET_IP6 then {
if net ~ ORIGINATED_PREFIXES_6 then {
bgp_large_community.add((OUR_AS, 101, 1));
return true;
}
}
return false;
}

And:

function is_own_internal_prefix() {
if net.type = NET_IP4 then
if net ~ OUR_INTERNAL_PREFIXES_4 then return true;
if net.type = NET_IP6 then
if net ~ OUR_INTERNAL_PREFIXES_6 then return true;
return false;
}

Perhaps we can separate the idea of "originations" from "IPs that are ours". The main goal here being that we are able to filter out any prefixes by customers who peer with core routers that may accidentally announce our own prefixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant