bird.conf.example 6.18 KB
Newer Older
Martin Mareš's avatar
Martin Mareš committed
1
/*
2 3
 *	This is an example configuration file
 *	(for version 1.x.x, obsolete)
Martin Mareš's avatar
Martin Mareš committed
4 5
 */

Martin Mareš's avatar
Martin Mareš committed
6
# Yes, even shell-like comments work...
Martin Mareš's avatar
Martin Mareš committed
7

Martin Mareš's avatar
Martin Mareš committed
8 9 10
# Configure logging
#log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
#log stderr all;
11 12
#log "tmp" all;

Martin Mareš's avatar
Martin Mareš committed
13
# Override router ID
14
#router id 198.51.100.1;
15

Martin Mareš's avatar
Martin Mareš committed
16
# You can define your own symbols...
17 18
#define xyzzy = (120+10);
#define '1a-a1' = (30+40);
19

Martin Mareš's avatar
Martin Mareš committed
20
# Define a route filter...
Ondřej Zajíček's avatar
Ondřej Zajíček committed
21 22 23 24
#filter test_filter {
#	if net ~ 10.0.0.0/16 then accept;
#	else reject;
#}
Martin Mareš's avatar
Martin Mareš committed
25

26 27 28
#filter sink { reject; }
#filter okay { accept; }

29 30
#include "filters.conf";

Martin Mareš's avatar
Martin Mareš committed
31
# Define another routing table
32 33
#table testable;

Martin Mareš's avatar
Martin Mareš committed
34 35
# Turn on global debugging of all protocols
#debug protocols all;
36

37 38 39 40
# Turn on internal watchdog
#watchdog warning 5 s;
#watchdog timeout 30 s;

Martin Mareš's avatar
Martin Mareš committed
41 42 43
# The direct protocol automatically generates device routes to
# all network interfaces. Can exist in as many instances as you wish
# if you want to populate multiple routing tables with device routes.
Ondřej Zajíček's avatar
Ondřej Zajíček committed
44
#protocol direct {
Martin Mareš's avatar
Martin Mareš committed
45
#	interface "-eth*", "*";	# Restrict network interfaces it works with
Ondřej Zajíček's avatar
Ondřej Zajíček committed
46
#}
47

Martin Mareš's avatar
Martin Mareš committed
48 49 50 51
# This pseudo-protocol performs synchronization between BIRD's routing
# tables and the kernel. If your kernel supports multiple routing tables
# (as Linux 2.2.x does), you can run multiple instances of the kernel
# protocol and synchronize different kernel tables with different BIRD tables.
52
protocol kernel {
Martin Mareš's avatar
Martin Mareš committed
53
#	learn;			# Learn all alien routes from the kernel
54 55
	persist;		# Don't remove routes on bird shutdown
	scan time 20;		# Scan kernel routing table every 20 seconds
56 57
#	import none;		# Default is import all
	export all;		# Default is export none
58
#	kernel table 5;		# Kernel table to synchronize with (default: main)
59
}
60

Martin Mareš's avatar
Martin Mareš committed
61
# This pseudo-protocol watches all interface up/down events.
62
protocol device {
63
	scan time 10;		# Scan interfaces every 10 seconds
64 65
}

Martin Mareš's avatar
Martin Mareš committed
66 67
# Static routes (again, there can be multiple instances, so that you
# can disable/enable various groups of static routes on the fly).
68
protocol static {
Martin Mareš's avatar
Martin Mareš committed
69 70 71 72 73
#	disabled;		# Disable by default
#	table testable;		# Connect to a non-default table
#	preference 1000;	# Default preference of routes
#	debug { states, routes, filters, interfaces, events, packets };
#	debug all;
74
#	route 0.0.0.0/0 via 198.51.100.13;
75 76
#	route 198.51.100.0/25 unreachable;
#	route 10.0.0.0/8 unreachable;
77 78 79
#	route 10.1.1.0:255.255.255.0 via 198.51.100.3;
#	route 10.1.2.0:255.255.255.0 via 198.51.100.3;
#	route 10.1.3.0:255.255.255.0 via 198.51.100.4;
80
#	route 10.2.0.0/24 via "arc0";
81
}
82

Martin Mareš's avatar
Martin Mareš committed
83
# Pipe protocol connects two routing tables... Beware of loops.
84 85
#protocol pipe {
#	peer table testable;
Martin Mareš's avatar
Martin Mareš committed
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
# Define what routes do we export to this protocol / import from it.
#	import all;		# default is all
#	export all;		# default is none
#	import none;		# If you wish to disable imports
#	import filter test_filter;		# Use named filter
#	import where source = RTS_DEVICE;	# Use explicit filter
#}

# RIP aka Rest In Pieces...
#protocol rip MyRIP {	# You can also use an explicit name
#	preference xyzzy;
#	debug all;
#	port 1520;
#	period 7;
#	infinity 16;
101
#	garbage time 60;
Martin Mareš's avatar
Martin Mareš committed
102 103 104 105
#	interface "*" { mode broadcast; };
#	honor neighbor;		# To whom do we agree to send the routing table
#	honor always;
#	honor never;
106 107 108
#	passwords {
#		password "nazdar";
#	};
Martin Mareš's avatar
Martin Mareš committed
109 110 111 112 113
#	authentication none;
#	import filter { print "importing"; accept; };
#	export filter { print "exporting"; accept; };
#}

114
#protocol ospf MyOSPF {
115
#       tick 2;
116 117 118 119 120 121 122
#	rfc1583compat yes;
#	area 0.0.0.0 {
#		stub no;
#		interface "eth*" {
#			hello 9;
#			retransmit 6;
#			cost 10;
Ondřej Filip's avatar
Typo.  
Ondřej Filip committed
123
#			transmit delay 5;
124 125 126
#			dead count 5;
#			wait 50;
#			type broadcast;
Ondřej Filip's avatar
Ondřej Filip committed
127 128
#			authentication simple;
#			password "pass";
129
#		};
Ondřej Filip's avatar
Ondřej Filip committed
130
#		interface "arc0" {
131
#			rx buffer large;
Ondřej Filip's avatar
Ondřej Filip committed
132
#			type nonbroadcast;
Ondřej Filip's avatar
Ondřej Filip committed
133
#			poll 14;
134
#			dead 75;
Ondřej Filip's avatar
Ondřej Filip committed
135
#			neighbors {
Ondřej Filip's avatar
Ondřej Filip committed
136
#				10.1.1.2 eligible;
Ondřej Filip's avatar
Ondřej Filip committed
137 138
#				10.1.1.4;
#			};
Ondřej Filip's avatar
Ondřej Filip committed
139
#			strict nonbroadcast yes;
Ondřej Filip's avatar
Ondřej Filip committed
140
#		};
141 142 143 144 145 146 147 148 149 150 151 152
#		interface "xxx0" {
#                       passwords {
#				password "abc" {
#					id 1;
#					generate to "22-04-2003 11:00:06";
#					accept to "17-01-2004 12:01:05";
#				};
#				password "def" {
#					id 2;
#					generate from "22-04-2003 11:00:07";
#					accept from "17-01-2003 12:01:05";
#				};
153
#			};
154 155
#                       authentication cryptographic;
#		};
156 157 158 159 160
#	};
#	area 20 {
#		stub 1;
#		interface "ppp1" {
#			hello 8;
Ondřej Filip's avatar
Ondřej Filip committed
161
#			authentication none;
162
#		};
163 164 165 166 167
#               interface "fr*";
#               virtual link 192.168.0.1 {
#                       password "sdsdffsdfg";
#                       authentication cryptographic;
#               };
168 169
#	};
#}
170

171

Martin Mareš's avatar
Martin Mareš committed
172 173
#protocol bgp {
#	disabled;
174
#	description "My BGP uplink";
Martin Mareš's avatar
Martin Mareš committed
175
#	local as 65000;
176
#	neighbor 198.51.100.130 as 64496;
Ondřej Zajíček's avatar
Ondřej Zajíček committed
177
#	multihop;
Martin Mareš's avatar
Martin Mareš committed
178 179 180 181 182 183 184 185 186 187 188 189 190
#	hold time 240;
#	startup hold time 240;
#	connect retry time 120;
#	keepalive time 80;	# defaults to hold time / 3
#	start delay time 5;	# How long do we wait before initial connect
#	error wait time 60, 300;# Minimum and maximum time we wait after an error (when consecutive
#				# errors occur, we increase the delay exponentially ...
#	error forget time 300;	# ... until this timeout expires)
#	disable after error;	# Disable the protocol automatically when an error occurs
#	next hop self;		# Disable next hop processing and always advertise our local address as nexthop
#	path metric 1;		# Prefer routes with shorter paths (like Cisco does)
#	default bgp_med 0;	# MED value we use for comparison when none is defined
#	default bgp_local_pref 0;	# The same for local preference
191
#	source address 198.51.100.14;	# What local address we use for the TCP connection
192
#	password "secret";	# Password used for MD5 authentication
193
#	rr client;		# I am a route reflector and the neighor is my client
194
#	rr cluster id 1.0.0.1;	# Use this value for cluster id instead of my router id
Martin Mareš's avatar
Martin Mareš committed
195 196 197
#	export where source=RTS_STATIC;
#	export filter {
#		if source = RTS_STATIC then {
198 199
#			bgp_community = -empty-; bgp_community = add(bgp_community,(65000,5678));
#			bgp_origin = 0;
Martin Mareš's avatar
Martin Mareš committed
200
#			bgp_community = -empty-; bgp_community.add((65000,5678));
201
#			if (65000,64501) ~ bgp_community then
202
#				bgp_community.add((0, 1));
203
#			if bgp_path ~ [= 65000 =] then
Martin Mareš's avatar
Martin Mareš committed
204 205 206 207 208
#				bgp_path.prepend(65000);
#			accept;
#		}
#		reject;
#	};
209
#}
210
#
211 212 213 214 215 216 217 218 219 220 221 222
# Template usage example
#template bgp rr_client {
#	disabled;
#	local as 65000;
#	multihop;
#	rr client;
#	rr cluster id 1.0.0.1;
#}
#
#protocol bgp rr_abcd from rr_client {
#	neighbor 10.1.4.7 as 65000;
#}