]> git.ipfire.org Git - thirdparty/bird.git/blame - filter/test.conf2
Merge master into int-new
[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";
46 quitbird;
47 }
24e1e200 48
9b0a0ba9
OZ
49 preference = 15;
50 print preference;
51 preference = 29;
52 print preference;
53 rip_metric = 1;
54 print rip_metric;
55 rip_metric = rip_metric + 5;
56 print rip_metric;
57
58#
59# TODO: uncomment this part after finishing BGP integration version
60#
61# bgp_community = -empty-;
62# print "hi";
63# bgp_community = add(bgp_community, (1,2));
64# print "hello";
65# bgp_community = add(bgp_community, (2,3));
66# bgp_community.add((4,5));
67# print "community = ", bgp_community;
68# bgp_community.delete((2,3));
69# print "community = ", bgp_community;
70# bgp_community.empty;
71# print "community = ", bgp_community;
72# print "done";
73 };
74 };
24e1e200
PM
75 route 0.0.0.0/0 via 195.113.31.113;
76 route 62.168.0.0/25 reject;
77 route 1.2.3.4/32 via 195.113.31.124;
9b0a0ba9
OZ
78 route 10.0.0.0/8 reject;
79 route 10.1.1.0:255.255.255.0 via 62.168.0.3;
80 route 10.1.2.0:255.255.255.0 via 62.168.0.3;
81 route 10.1.3.0:255.255.255.0 via 62.168.0.4;
82 route 10.2.0.0/24 via "arc0";
24e1e200 83}