]> git.ipfire.org Git - thirdparty/bird.git/blame - filter/test.conf2
Filter: Remove quitbird command
[thirdparty/bird.git] / filter / test.conf2
CommitLineData
24e1e200
PM
1/*
2 * This is an example configuration file.
3 */
4
5# Yet another comment
6
7router id 62.168.0.1;
8
9define xyzzy = (120+10);
10
11protocol device {
12# disabled;
13# interface "eth*", "ppp*";
14}
15
16protocol direct {
17}
18
19protocol kernel {
20 disabled;
9b0a0ba9 21 ipv4; # Must be specified at least one channel
24e1e200
PM
22# learn; # Learn all routes from the kernel
23# scan time 10; # Scan kernel tables every 10 seconds
24}
25
26protocol static {
27# disabled;
28
9b0a0ba9
OZ
29 ipv4 {
30 export all;
31
32 import filter {
33 print "ahoj";
34 print source;
35 if source = RTS_STATIC then {
36 print "It is from static";
37 }
38 print from;
39 from = 1.2.3.4;
40 print from;
41 print scope;
42 scope = SCOPE_HOST;
43 print scope;
44 if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then {
45 print "Failed in test";
9b0a0ba9 46 }
24e1e200 47
9b0a0ba9
OZ
48 preference = 15;
49 print preference;
50 preference = 29;
51 print preference;
52 rip_metric = 1;
53 print rip_metric;
54 rip_metric = rip_metric + 5;
55 print rip_metric;
56
f2f5a7d9
JMM
57 bgp_community = -empty-;
58 print "hi";
59 bgp_community = add(bgp_community, (1,2));
60 print "hello";
61 bgp_community = add(bgp_community, (2,3));
62 bgp_community.add((4,5));
63 print "community = ", bgp_community;
64 bgp_community.delete((2,3));
65 print "community = ", bgp_community;
66 bgp_community.empty;
67 print "community = ", bgp_community;
68 print "done";
69
70 accept;
9b0a0ba9
OZ
71 };
72 };
24e1e200
PM
73 route 0.0.0.0/0 via 195.113.31.113;
74 route 62.168.0.0/25 reject;
75 route 1.2.3.4/32 via 195.113.31.124;
9b0a0ba9 76 route 10.0.0.0/8 reject;
0575c7db
JMM
77 route 10.1.1.0/24 via 62.168.0.3;
78 route 10.1.2.0/24 via 62.168.0.3;
79 route 10.1.3.0/24 via 62.168.0.4;
9b0a0ba9 80 route 10.2.0.0/24 via "arc0";
24e1e200 81}