Statistics
| Branch: | Revision:

iof-bird / bird-2.0.1 / filter / test.conf2 @ 6b3f1a54

History | View | Annotate | Download (1.67 KB)

1
/*
2
 *	This is an example configuration file.
3
 */
4

    
5
# Yet another comment
6

    
7
router id 62.168.0.1;
8

    
9
define xyzzy = (120+10);
10

    
11
protocol device {
12
#	disabled;
13
#	interface "eth*", "ppp*";
14
}
15

    
16
protocol direct {
17
}
18

    
19
protocol kernel {
20
	disabled;
21
	ipv4;			# Must be specified at least one channel
22
#	learn;			# Learn all routes from the kernel
23
#	scan time 10;		# Scan kernel tables every 10 seconds
24
}
25

    
26
protocol static {
27
#	disabled;
28

    
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
			}
48

    
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
	};
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;
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";
83
}