1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
log "bird.log" all;
protocol device {}
protocol static {
ipv6;
route 2001:db8:0::/48 unreachable { bgp_path.prepend(65432); bgp_path.prepend(4200000000); };
route 2001:db8:1::/48 unreachable;
route 2001:db8:2::/48 unreachable;
route 2001:db8:3::/48 unreachable;
route 2001:db8:4::/48 unreachable;
route 2001:db8:5::/48 unreachable;
route 2001:db8:6::/48 unreachable;
route 2001:db8:7::/48 unreachable;
route 2001:db8:8::/48 unreachable;
route 2001:db8:9::/48 unreachable;
route 2001:db8:a::/48 unreachable;
route 2001:db8:b::/48 unreachable;
route 2001:db8:c::/48 unreachable;
route 2001:db8:d::/48 unreachable;
route 2001:db8:e::/48 unreachable;
route 2001:db8:f::/48 unreachable;
}
protocol static {
ipv6 {
import filter {
bgp_med = 1;
bgp_community = -empty-.add((65533,1)).add((65500,0xe));
accept;
};
};
route 2001:db8:1::/48 unreachable;
route 2001:db8:3::/48 unreachable;
route 2001:db8:5::/48 unreachable;
route 2001:db8:7::/48 unreachable;
route 2001:db8:9::/48 unreachable;
route 2001:db8:b::/48 unreachable;
route 2001:db8:d::/48 unreachable;
route 2001:db8:f::/48 unreachable;
}
protocol static {
ipv6 {
import filter {
bgp_med = 2;
bgp_community = -empty-.add((65533,2)).add((65500,0xd));
accept;
};
};
route 2001:db8:2::/48 unreachable;
route 2001:db8:3::/48 unreachable;
route 2001:db8:6::/48 unreachable;
route 2001:db8:7::/48 unreachable;
route 2001:db8:a::/48 unreachable;
route 2001:db8:b::/48 unreachable;
route 2001:db8:e::/48 unreachable;
route 2001:db8:f::/48 unreachable;
}
protocol static {
ipv6 {
import filter {
bgp_med = 4;
bgp_community = -empty-.add((65533,4)).add((65500,0xb));
accept;
};
};
route 2001:db8:4::/48 unreachable;
route 2001:db8:5::/48 unreachable;
route 2001:db8:6::/48 unreachable;
route 2001:db8:7::/48 unreachable;
route 2001:db8:c::/48 unreachable;
route 2001:db8:d::/48 unreachable;
route 2001:db8:e::/48 unreachable;
route 2001:db8:f::/48 unreachable;
}
protocol static {
ipv6 {
import filter {
bgp_med = 8;
bgp_community = -empty-.add((65533,8)).add((65500,0x7));
accept;
};
};
route 2001:db8:8::/48 unreachable;
route 2001:db8:9::/48 unreachable;
route 2001:db8:a::/48 unreachable;
route 2001:db8:b::/48 unreachable;
route 2001:db8:c::/48 unreachable;
route 2001:db8:d::/48 unreachable;
route 2001:db8:e::/48 unreachable;
route 2001:db8:f::/48 unreachable;
}
ipv6 table agr_result;
protocol aggregator {
table master6;
peer table agr_result;
export all;
aggregate on net,(defined(bgp_med));
merge by {
print "Merging all these: ", routes;
bgp_med = 0;
for route r in routes do {
if ! defined(r.bgp_med) then { unset(bgp_med); accept; }
print r, " bgp_med: ", r.bgp_med;
bgp_med = bgp_med + r.bgp_med;
bgp_community = bgp_community.add(r.bgp_community);
}
accept;
};
}
|