Statistics
| Branch: | Revision:

iof-bird-daemon / doc / bird.conf.example @ 6cf72d7a

History | View | Annotate | Download (6.08 KB)

1 906b0170 Martin Mares
/*
2
 *	This is an example configuration file.
3
 */
4
5 8aecbf16 Martin Mares
# Yes, even shell-like comments work...
6 906b0170 Martin Mares
7 8aecbf16 Martin Mares
# Configure logging
8
#log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
9
#log stderr all;
10 a0c37b45 Martin Mares
#log "tmp" all;
11
12 8aecbf16 Martin Mares
# Override router ID
13 9491f9f5 Ondrej Zajicek
#router id 198.51.100.1;
14 c74c0e3c Martin Mares
15 8aecbf16 Martin Mares
# You can define your own symbols...
16 0efd6462 Ondrej Filip
#define xyzzy = (120+10);
17
#define '1a-a1' = (30+40);
18 0b62c3a7 Martin Mares
19 8aecbf16 Martin Mares
# Define a route filter...
20 d759c1a6 Ondrej Zajicek
#filter test_filter {
21
#	if net ~ 10.0.0.0/16 then accept;
22
#	else reject;
23
#}
24 8aecbf16 Martin Mares
25 529c4149 Martin Mares
#filter sink { reject; }
26
#filter okay { accept; }
27
28 48ec367a Ondrej Filip
#include "filters.conf";
29
30 8aecbf16 Martin Mares
# Define another routing table
31 0e02abfd Martin Mares
#table testable;
32
33 8aecbf16 Martin Mares
# Turn on global debugging of all protocols
34
#debug protocols all;
35 50d8424a Martin Mares
36 8aecbf16 Martin Mares
# The direct protocol automatically generates device routes to
37
# all network interfaces. Can exist in as many instances as you wish
38
# if you want to populate multiple routing tables with device routes.
39 d759c1a6 Ondrej Zajicek
#protocol direct {
40 8aecbf16 Martin Mares
#	interface "-eth*", "*";	# Restrict network interfaces it works with
41 d759c1a6 Ondrej Zajicek
#}
42 980ffedb Martin Mares
43 8aecbf16 Martin Mares
# This pseudo-protocol performs synchronization between BIRD's routing
44
# tables and the kernel. If your kernel supports multiple routing tables
45
# (as Linux 2.2.x does), you can run multiple instances of the kernel
46
# protocol and synchronize different kernel tables with different BIRD tables.
47 980ffedb Martin Mares
protocol kernel {
48 8aecbf16 Martin Mares
#	learn;			# Learn all alien routes from the kernel
49 7f400d1c Martin Mares
	persist;		# Don't remove routes on bird shutdown
50
	scan time 20;		# Scan kernel routing table every 20 seconds
51 5056c559 Martin Mares
#	import none;		# Default is import all
52
	export all;		# Default is export none
53 7de45ba4 Martin Mares
#	kernel table 5;		# Kernel table to synchronize with (default: main)
54 980ffedb Martin Mares
}
55 a1bf6440 Martin Mares
56 8aecbf16 Martin Mares
# This pseudo-protocol watches all interface up/down events.
57 7e5f5ffd Martin Mares
protocol device {
58 7f400d1c Martin Mares
	scan time 10;		# Scan interfaces every 10 seconds
59 7e5f5ffd Martin Mares
}
60
61 8aecbf16 Martin Mares
# Static routes (again, there can be multiple instances, so that you
62
# can disable/enable various groups of static routes on the fly).
63 a1bf6440 Martin Mares
protocol static {
64 8aecbf16 Martin Mares
#	disabled;		# Disable by default
65
#	table testable;		# Connect to a non-default table
66
#	preference 1000;	# Default preference of routes
67
#	debug { states, routes, filters, interfaces, events, packets };
68
#	debug all;
69 9491f9f5 Ondrej Zajicek
#	route 0.0.0.0/0 via 198.51.100.13;
70 80a9cadc Ondrej Zajicek
#	route 198.51.100.0/25 unreachable;
71
#	route 10.0.0.0/8 unreachable;
72 9491f9f5 Ondrej Zajicek
#	route 10.1.1.0:255.255.255.0 via 198.51.100.3;
73
#	route 10.1.2.0:255.255.255.0 via 198.51.100.3;
74
#	route 10.1.3.0:255.255.255.0 via 198.51.100.4;
75 7f400d1c Martin Mares
#	route 10.2.0.0/24 via "arc0";
76 a1bf6440 Martin Mares
}
77 9c11ec9e Martin Mares
78 8aecbf16 Martin Mares
# Pipe protocol connects two routing tables... Beware of loops.
79 9c11ec9e Martin Mares
#protocol pipe {
80
#	peer table testable;
81 8aecbf16 Martin Mares
# Define what routes do we export to this protocol / import from it.
82
#	import all;		# default is all
83
#	export all;		# default is none
84
#	import none;		# If you wish to disable imports
85
#	import filter test_filter;		# Use named filter
86
#	import where source = RTS_DEVICE;	# Use explicit filter
87
#}
88
89
# RIP aka Rest In Pieces...
90
#protocol rip MyRIP {	# You can also use an explicit name
91
#	preference xyzzy;
92
#	debug all;
93
#	port 1520;
94
#	period 7;
95
#	infinity 16;
96 f3b33928 Pavel Machek
#	garbage time 60;
97 8aecbf16 Martin Mares
#	interface "*" { mode broadcast; };
98
#	honor neighbor;		# To whom do we agree to send the routing table
99
#	honor always;
100
#	honor never;
101 a6806653 Ondrej Filip
#	passwords {
102
#		password "nazdar";
103
#	};
104 8aecbf16 Martin Mares
#	authentication none;
105
#	import filter { print "importing"; accept; };
106
#	export filter { print "exporting"; accept; };
107
#}
108
109 ab698fc5 Ondrej Filip
#protocol ospf MyOSPF {
110 3b16080c Ondrej Filip
#       tick 2;
111 ab698fc5 Ondrej Filip
#	rfc1583compat yes;
112
#	area 0.0.0.0 {
113
#		stub no;
114
#		interface "eth*" {
115
#			hello 9;
116
#			retransmit 6;
117
#			cost 10;
118 73089070 Ondrej Filip
#			transmit delay 5;
119 ab698fc5 Ondrej Filip
#			dead count 5;
120
#			wait 50;
121
#			type broadcast;
122 c1824c4d Ondrej Filip
#			authentication simple;
123
#			password "pass";
124 ab698fc5 Ondrej Filip
#		};
125 7d68e18b Ondrej Filip
#		interface "arc0" {
126 94c42054 Ondrej Filip
#			rx buffer large;
127 7d68e18b Ondrej Filip
#			type nonbroadcast;
128 e7e2878b Ondrej Filip
#			poll 14;
129 d8c7d9e8 Ondrej Filip
#			dead 75;
130 7d68e18b Ondrej Filip
#			neighbors {
131 e7e2878b Ondrej Filip
#				10.1.1.2 eligible;
132 7d68e18b Ondrej Filip
#				10.1.1.4;
133
#			};
134 e7e2878b Ondrej Filip
#			strict nonbroadcast yes;
135 7d68e18b Ondrej Filip
#		};
136 0d3effcf Ondrej Filip
#		interface "xxx0" {
137
#                       passwords {
138
#				password "abc" {
139
#					id 1;
140
#					generate to "22-04-2003 11:00:06";
141
#					accept to "17-01-2004 12:01:05";
142
#				};
143
#				password "def" {
144
#					id 2;
145
#					generate from "22-04-2003 11:00:07";
146
#					accept from "17-01-2003 12:01:05";
147
#				};
148 a6806653 Ondrej Filip
#			};
149 0d3effcf Ondrej Filip
#                       authentication cryptographic;
150
#		};
151 ab698fc5 Ondrej Filip
#	};
152
#	area 20 {
153
#		stub 1;
154
#		interface "ppp1" {
155
#			hello 8;
156 c1824c4d Ondrej Filip
#			authentication none;
157 ab698fc5 Ondrej Filip
#		};
158 3b16080c Ondrej Filip
#               interface "fr*";
159
#               virtual link 192.168.0.1 {
160
#                       password "sdsdffsdfg";
161
#                       authentication cryptographic;
162
#               };
163 ab698fc5 Ondrej Filip
#	};
164
#}
165
		
166
167 8aecbf16 Martin Mares
#protocol bgp {
168
#	disabled;
169 a6806653 Ondrej Filip
#	description "My BGP uplink";
170 8aecbf16 Martin Mares
#	local as 65000;
171 9491f9f5 Ondrej Zajicek
#	neighbor 198.51.100.130 as 64496;
172 489c308a Ondrej Zajicek
#	multihop;
173 8aecbf16 Martin Mares
#	hold time 240;
174
#	startup hold time 240;
175
#	connect retry time 120;
176
#	keepalive time 80;	# defaults to hold time / 3
177
#	start delay time 5;	# How long do we wait before initial connect
178
#	error wait time 60, 300;# Minimum and maximum time we wait after an error (when consecutive
179
#				# errors occur, we increase the delay exponentially ...
180
#	error forget time 300;	# ... until this timeout expires)
181
#	disable after error;	# Disable the protocol automatically when an error occurs
182
#	next hop self;		# Disable next hop processing and always advertise our local address as nexthop
183
#	path metric 1;		# Prefer routes with shorter paths (like Cisco does)
184
#	default bgp_med 0;	# MED value we use for comparison when none is defined
185
#	default bgp_local_pref 0;	# The same for local preference
186 9491f9f5 Ondrej Zajicek
#	source address 198.51.100.14;	# What local address we use for the TCP connection
187 a6806653 Ondrej Filip
#	password "secret";	# Password used for MD5 authentication
188 1adc17b4 Ondrej Zajicek
#	rr client;		# I am a route reflector and the neighor is my client
189 a6806653 Ondrej Filip
#	rr cluster id 1.0.0.1;	# Use this value for cluster id instead of my router id 
190 8aecbf16 Martin Mares
#	export where source=RTS_STATIC;
191
#	export filter {
192
#		if source = RTS_STATIC then {
193 a6806653 Ondrej Filip
#			bgp_community = -empty-; bgp_community = add(bgp_community,(65000,5678));
194
#			bgp_origin = 0;
195 8aecbf16 Martin Mares
#			bgp_community = -empty-; bgp_community.add((65000,5678));
196 9491f9f5 Ondrej Zajicek
#			if (65000,64501) ~ bgp_community then
197 a6806653 Ondrej Filip
#				bgp_community.add((0, 1));
198 ad586334 Ondrej Zajicek
#			if bgp_path ~ [= 65000 =] then
199 8aecbf16 Martin Mares
#				bgp_path.prepend(65000);
200
#			accept;
201
#		}
202
#		reject;
203
#	};
204 9c11ec9e Martin Mares
#}
205 a7f23f58 Ondrej Zajicek
# 
206
# Template usage example
207
#template bgp rr_client {
208
#	disabled;
209
#	local as 65000;
210
#	multihop;
211
#	rr client;
212
#	rr cluster id 1.0.0.1;
213
#}
214
#
215
#protocol bgp rr_abcd from rr_client {
216
#	neighbor 10.1.4.7 as 65000;
217
#}