Skip to content

Commit 23cc1b0

Browse files
committed
merge IPv4 and IPv6 filters
1 parent ef7b4af commit 23cc1b0

9 files changed

+11
-843
lines changed

bird.ber.ns2.grapheneos.org.conf

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,55 +9,7 @@ function no_advertise(int asn) {
99
bgp_large_community.add((34307, 0, asn)); # NL-IX
1010
}
1111

12-
filter grapheneos_ipv4_filter {
13-
# Misaka.io: prepend 1x to Arelion
14-
bgp_ext_community.add((rt, 65001, 1299));
15-
# Arelion: set localpref to 50 beyond the connected region
16-
bgp_community.add((1299, 10050));
17-
# Arelion: prepend 2x to all peers in North America
18-
bgp_community.add((1299, 5002));
19-
# Arelion: prepend 2x to all peers in Asia & Pacific
20-
bgp_community.add((1299, 7002));
21-
22-
# Misaka.io: prepend 1x to Lumen
23-
bgp_ext_community.add((rt, 65001, 3356));
24-
# Lumen: set BGP Local Pref to 70 (less than peer routes)
25-
bgp_community.add((3356, 70));
26-
27-
# Misaka.io: do not advertise to HE
28-
bgp_ext_community.add((rt, 65009, 6939));
29-
# Misaka.io: prepend 1x to HE
30-
bgp_ext_community.add((rt, 65001, 6939));
31-
32-
# Misaka.io: do not advertise to RETN
33-
bgp_ext_community.add((rt, 65009, 9002));
34-
35-
# Misaka.io: prepend 1x to BCIX
36-
bgp_ext_community.add((rt, 65001, 16374));
37-
38-
# Misaka.io: do not advertise to Google
39-
bgp_ext_community.add((rt, 65009, 15169));
40-
41-
# Misaka.io: prepend 1x to NL-IX
42-
bgp_ext_community.add((rt, 65001, 34307));
43-
# Misaka.io: remove default NL-IX communities
44-
bgp_community.add((917, 49789));
45-
# NL-IX: do not advertise to United Kingdom
46-
bgp_community.add((34307, 65154));
47-
48-
no_advertise(6939); # HE
49-
no_advertise(9498); # Bharti
50-
no_advertise(24482); # SG.GS
51-
no_advertise(57463); # NetIX
52-
no_advertise(58453); # China Mobile International
53-
no_advertise(58715); # Earth Telecommunication
54-
no_advertise(137409); # GSL
55-
no_advertise(139901); # Startrek Telecom
56-
57-
accept;
58-
};
59-
60-
filter grapheneos_ipv6_filter {
12+
filter grapheneos_filter {
6113
# Misaka.io: prepend 1x to Arelion
6214
bgp_ext_community.add((rt, 65001, 1299));
6315
# Arelion: set localpref to 50 beyond the connected region

bird.bom.ns1.grapheneos.org.conf

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -9,95 +9,7 @@ function no_advertise(int asn) {
99
bgp_large_community.add((59200, 0, asn)); # DE-CIX BOM
1010
}
1111

12-
filter grapheneos_ipv4_filter {
13-
# Cogent: set customer route local preference to 70 (below peers)
14-
bgp_community.add((174, 70));
15-
# Cogent: set localpref to 10 upon entering AF Region from other regions of the Cogent backbone
16-
bgp_community.add((174, 932));
17-
# Cogent: set localpref to 10 upon entering AU Region from other regions of the Cogent backbone
18-
bgp_community.add((174, 942));
19-
# Cogent: set localpref to 10 upon entering SA Region from other regions of the Cogent backbone
20-
bgp_community.add((174, 952));
21-
# Cogent: set localpref to 10 upon entering NA Region from other regions of the Cogent backbone
22-
bgp_community.add((174, 972));
23-
# Cogent: set localpref to 10 upon entering EU Region from other regions of the Cogent backbone
24-
bgp_community.add((174, 982));
25-
26-
# Arelion: set localpref to 50 beyond the connected region
27-
bgp_community.add((1299, 10050));
28-
# Arelion: prepend 2x to all peers in Europe
29-
bgp_community.add((1299, 2002));
30-
# Arelion: prepend 2x to all peers in North America
31-
bgp_community.add((1299, 5002));
32-
33-
# NTT: set localpref to 50 beyond the connected region
34-
bgp_community.add((2914, 436));
35-
# NTT: prepend 2x to all customers in North America
36-
bgp_community.add((2914, 4012));
37-
# NTT: prepend 2x to all peers in North America
38-
bgp_community.add((2914, 4022));
39-
# NTT: prepend 2x to all customers in Europe
40-
bgp_community.add((2914, 4212));
41-
# NTT: prepend 2x to all peers in Europe
42-
bgp_community.add((2914, 4222));
43-
# NTT: prepend 2x to all customers in South America
44-
bgp_community.add((2914, 4612));
45-
# NTT: prepend 2x to all peers in South America
46-
bgp_community.add((2914, 4622));
47-
48-
# GTT: set localpref way below peers in configured regions
49-
bgp_community.add((3257, 1960));
50-
# GTT: set localpref in Europe
51-
bgp_community.add((3257, 2010));
52-
# GTT: set localpref in Africa
53-
bgp_community.add((3257, 2012));
54-
# GTT: set localpref in South America
55-
bgp_community.add((3257, 2013));
56-
# GTT: set localpref in North America
57-
bgp_community.add((3257, 2014));
58-
# GTT: prepend 2x
59-
bgp_community.add((3257, 2292));
60-
# GTT: prepend 2x in Europe
61-
bgp_community.add((3257, 2492));
62-
# GTT: prepend 2x in Africa
63-
bgp_community.add((3257, 2692));
64-
# GTT: prepend 2x in South America
65-
bgp_community.add((3257, 2892));
66-
# GTT: prepend 2x in North America
67-
bgp_community.add((3257, 2992));
68-
69-
# Lumen: set BGP Local Pref to 70 (less than peer routes)
70-
bgp_community.add((3356, 70));
71-
72-
# PCCW: set localpref to 60 beyond the connected region
73-
bgp_community.add((3491, 51912));
74-
# PCCW: prepend 2x to all peers in North America
75-
bgp_community.add((3491, 50102));
76-
# PCCW: prepend 2x to all peers in Europe
77-
bgp_community.add((3491, 50302));
78-
# PCCW: prepend 2x to all peers in Africa
79-
bgp_community.add((3491, 50502));
80-
# PCCW: prepend 2x to all peers in Australia
81-
bgp_community.add((3491, 50702));
82-
83-
# Vultr: do not advertise to Telstra Global
84-
bgp_large_community.add((20473, 6000, 4637));
85-
86-
# Vultr: do not advertise to TATA Communications
87-
bgp_large_community.add((20473, 6000, 4755));
88-
89-
# Sparkle (Seabone): set localpref to 50 (backup route)
90-
bgp_community.add((6762, 1050));
91-
92-
# Bharti: don't export to international peers
93-
bgp_community.add((9498, 55));
94-
95-
no_advertise(57463); # NetIX
96-
97-
accept;
98-
};
99-
100-
filter grapheneos_ipv6_filter {
12+
filter grapheneos_filter {
10113
# Cogent: set customer route local preference to 70 (below peers)
10214
bgp_community.add((174, 70));
10315
# Cogent: set localpref to 10 upon entering AF Region from other regions of the Cogent backbone

bird.iad.ns2.grapheneos.org.conf

Lines changed: 1 addition & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -8,154 +8,7 @@ function no_advertise(int asn) {
88
bgp_large_community.add((24115, 0, asn)); # Equinix
99
}
1010

11-
filter grapheneos_ipv4_filter {
12-
# Cogent: set localpref to 10 upon entering AF Region from other regions of the Cogent backbone
13-
bgp_community.add((174, 932));
14-
# Cogent: set localpref to 10 upon entering AU Region from other regions of the Cogent backbone
15-
bgp_community.add((174, 942));
16-
# Cogent: set localpref to 10 upon entering SA Region from other regions of the Cogent backbone
17-
bgp_community.add((174, 952));
18-
# Cogent: set localpref to 10 upon entering AP Region from other regions of the Cogent backbone
19-
bgp_community.add((174, 962));
20-
# Cogent: set localpref to 10 upon entering EU Region from other regions of the Cogent backbone
21-
bgp_community.add((174, 982));
22-
23-
# Arelion: set localpref to 50 beyond the connected region
24-
bgp_community.add((1299, 10050));
25-
# Arelion: prepend 2x to all peers in Europe
26-
bgp_community.add((1299, 2002));
27-
# Arelion: prepend 2x to all peers in Asia & Pacific
28-
bgp_community.add((1299, 7002));
29-
30-
# NTT: set localpref to 96 (customer fallback)
31-
bgp_community.add((2914, 450));
32-
# NTT: set localpref to 50 beyond the connected region
33-
bgp_community.add((2914, 436));
34-
# NTT: prepend 2x to all customers in Europe
35-
bgp_community.add((2914, 4212));
36-
# NTT: prepend 2x to all peers in Europe
37-
bgp_community.add((2914, 4222));
38-
# NTT: prepend 2x to all customers in Asia
39-
bgp_community.add((2914, 4412));
40-
# NTT: prepend 2x to all peers in Asia
41-
bgp_community.add((2914, 4422));
42-
# NTT: prepend 2x to all customers in South America
43-
bgp_community.add((2914, 4612));
44-
# NTT: prepend 2x to all peers in South America
45-
bgp_community.add((2914, 4622));
46-
47-
# GTT: set localpref way below peers in configured regions
48-
bgp_community.add((3257, 1960));
49-
# GTT: set localpref in Europe
50-
bgp_community.add((3257, 2010));
51-
# GTT: set localpref in Asia
52-
bgp_community.add((3257, 2011));
53-
# GTT: set localpref in Africa
54-
bgp_community.add((3257, 2012));
55-
# GTT: set localpref in South America
56-
bgp_community.add((3257, 2013));
57-
# GTT: prepend 2x in Europe
58-
bgp_community.add((3257, 2492));
59-
# GTT: prepend 2x in Asia
60-
bgp_community.add((3257, 2592));
61-
# GTT: prepend 2x in Africa
62-
bgp_community.add((3257, 2692));
63-
# GTT: prepend 2x in South America
64-
bgp_community.add((3257, 2892));
65-
66-
# Lumen: set BGP Local Pref to 70 (less than peer routes)
67-
bgp_community.add((3356, 70));
68-
69-
# PCCW: set localpref to 60 beyond the connected region
70-
bgp_community.add((3491, 51912));
71-
# PCCW: prepend 2x to all peers in Europe
72-
bgp_community.add((3491, 50302));
73-
# PCCW: prepend 2x to all peers in Asia
74-
bgp_community.add((3491, 50402));
75-
# PCCW: prepend 2x to all peers in Africa
76-
bgp_community.add((3491, 50502));
77-
# PCCW: prepend 2x to all peers in Australia
78-
bgp_community.add((3491, 50702));
79-
80-
# Comcast: do not advertise to Orange
81-
bgp_community.add((65100, 5511));
82-
83-
# Comcast: do not advertise to TATA
84-
bgp_community.add((65100, 6453));
85-
86-
# Sparkle (Seabone): set localpref to 50 (backup route)
87-
bgp_community.add((6762, 1050));
88-
89-
# Misaka.io: do not advertise to HE
90-
bgp_ext_community.add((rt, 65009, 6939));
91-
# Misaka.io: prepend 1x to HE
92-
bgp_ext_community.add((rt, 65001, 6939));
93-
94-
# Misaka.io: do not advertise to Google
95-
bgp_ext_community.add((rt, 65009, 15169));
96-
97-
# Misaka.io: prepend 1x to Equinix
98-
bgp_ext_community.add((rt, 65001, 24115));
99-
# Equinix: advertise to all peers
100-
bgp_large_community.add((24115, 1, 24115));
101-
102-
# Core-Backbone: do not advertise to Europe
103-
bgp_community.add((33891, 41000));
104-
# Core-Backbone: do not advertise to Asia
105-
bgp_community.add((33891, 41020));
106-
# Core-Backbone: do not advertise on PNI with Bharti
107-
bgp_community.add((33891, 2230));
108-
# Core-Backbone: do not advertise on IXP
109-
bgp_community.add((33891, 4000));
110-
bgp_community.add((33891, 5000));
111-
bgp_community.add((33891, 6000));
112-
bgp_community.add((33891, 7000));
113-
bgp_community.add((33891, 8000));
114-
bgp_community.add((33891, 9000));
115-
bgp_community.add((33891, 10000));
116-
bgp_community.add((33891, 11000));
117-
bgp_community.add((33891, 12000));
118-
bgp_community.add((33891, 13000));
119-
bgp_community.add((33891, 14000));
120-
bgp_community.add((33891, 15000));
121-
bgp_community.add((33891, 16000));
122-
bgp_community.add((33891, 17000));
123-
bgp_community.add((33891, 18000));
124-
bgp_community.add((33891, 19000));
125-
bgp_community.add((33891, 20000));
126-
bgp_community.add((33891, 21000));
127-
bgp_community.add((33891, 22000));
128-
bgp_community.add((33891, 23000));
129-
bgp_community.add((33891, 24000));
130-
bgp_community.add((33891, 25000));
131-
bgp_community.add((33891, 26000));
132-
bgp_community.add((33891, 27000));
133-
bgp_community.add((33891, 28000));
134-
bgp_community.add((33891, 29000));
135-
136-
# CDN77: do not advertise to backbone
137-
bgp_community.add((60068, 60010));
138-
139-
# Misaka.io: do not advertise to GSL via Hyonix (Krixe)
140-
bgp_ext_community.add((rt, 65009, 931));
141-
# Misaka.io: remove Misaka from path to Krixe GSL transit
142-
#bgp_community.add((931, 47005));
143-
# GSL: export prefix to all external ports (legacy quirk required in Ashburn)
144-
#bgp_community.add((65500, 10000));
145-
146-
no_advertise(6939); # HE
147-
no_advertise(9498); # Bharti
148-
no_advertise(24482); # SG.GS
149-
no_advertise(57463); # NetIX
150-
no_advertise(58453); # China Mobile International
151-
no_advertise(58715); # Earth Telecommunication
152-
no_advertise(137409); # GSL
153-
no_advertise(139901); # Startrek Telecom
154-
155-
accept;
156-
};
157-
158-
filter grapheneos_ipv6_filter {
11+
filter grapheneos_filter {
15912
# Cogent: set localpref to 10 upon entering AF Region from other regions of the Cogent backbone
16013
bgp_community.add((174, 932));
16114
# Cogent: set localpref to 10 upon entering AU Region from other regions of the Cogent backbone

0 commit comments

Comments
 (0)