]> git.ipfire.org Git - thirdparty/bird.git/blame - filter/test.conf2
Implements 'allow local as' option.
[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;
21# learn; # Learn all routes from the kernel
22# scan time 10; # Scan kernel tables every 10 seconds
23}
24
25protocol static {
26# disabled;
27
28 import filter { print "ahoj";
29 print source;
30 if source = RTS_STATIC then {
31 print "It is from static";
32 }
33 print from;
34 from = 1.2.3.4;
35 print from;
36 print scope;
37 scope = SCOPE_HOST;
38 print scope;
1895e81e
PM
39 if !(scope ~ [ SCOPE_HOST, SCOPE_SITE ]) then {
40 print "Failed in test";
41 quitbird;
42 }
24e1e200
PM
43
44 preference = 15;
45 print preference;
46 preference = 29;
47 print preference;
48 rip_metric = 1;
49 print rip_metric;
50 rip_metric = rip_metric + 5;
51 print rip_metric;
52 bgp_community = - empty - ;
53 print "nazdar";
54 bgp_community = add(bgp_community, (1,2));
55 print "cau";
56 bgp_community = add(bgp_community, (2,3));
57 bgp_community.add((4,5));
58 print "community = ", bgp_community;
59 bgp_community.delete((2,3));
60 print "community = ", bgp_community;
61 bgp_community.empty;
62 print "community = ", bgp_community;
63 print "done";
24e1e200
PM
64 };
65
66 route 0.0.0.0/0 via 195.113.31.113;
67 route 62.168.0.0/25 reject;
68 route 1.2.3.4/32 via 195.113.31.124;
69# route 10.0.0.0/8 reject;
70# route 10.1.1.0:255.255.255.0 via 62.168.0.3;
71# route 10.1.2.0:255.255.255.0 via 62.168.0.3;
72# route 10.1.3.0:255.255.255.0 via 62.168.0.4;
73# route 10.2.0.0/24 via "arc0";
74 export all;
75}