-
Notifications
You must be signed in to change notification settings - Fork 4
/
sys-original.config
237 lines (217 loc) · 9.17 KB
/
sys-original.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
[
{linc,
[
%% Following setting enables or disables OF-Config subsystem which consists
%% of three applications: ssh, enetconf and of_config.
%% Allowed values: 'enabled' | 'disabled'
{of_config, enabled},
%% Following setting enables or disables spawning a new process for each
%% packet to be routed. If it's set to false a new process will be spawned,
%% if it's set to true (or not defined) it will stay in the parent process
{sync_routing, true},
%% Configure ports available to the switch when using the
%% userspace backend according to your system setup.
%% * Under Linux all TAP interfaces must be set up beforehand
%% as persistent.
%% * Under MacOSX TAP interfaces are created during node
%% startup (which requires setting an ip parameter).
%% Remember to set 'rate' option when you plan to assign queues
%% to the given port.
{capable_switch_ports,
[
%% Examples:
%% - regular hardware interface with queues disabled
%% {port, 1, [{interface, "eth0"}]},
%% - regular hardware interface and port rate when queues enabled
%% {port, 2, [{interface, "eth0"}, {port_rate, {100, kbps}}]},
%% - hardware interface with explicit type and queues disabled
%% {port, 3, [{interface, "net0"}, {type, eth}]},
%% - regular tap interface with queues disabled
%% {port, 4, [{interface, "tap0"}]},
%% - tap interface under MacOSX with dynamically assigned IP
%% {port, 5, [{interface, "tap1"}, {ip, "10.0.0.1"}]},
%% - tap interface with explicit type and queues disabled
%% {port, 6, [{interface, "net1"}, {type, tap}]}
%% - emulated optical interface without queues (the interface name
%% has no meaning
%% {port, 7, [{interface, "opt1"}, {type, optical}]}
]},
{capable_switch_queues,
[
%% Examples:
%% {queue, 1, [{min_rate, 100}, {max_rate, 100}]},
%% {queue, 2, [{min_rate, 100}, {max_rate, 100}]}
]},
%% Configuration of emulated optical links that connect emulated optical
%% ports. Each element of the list has format:
%% {{LOGICAL_SWITCH_A, PORT_A}, {LOGICAL_SWITCH_B, PORT_B}}
%% {optical_links, [{{1,2}, {2,1}}, {{2,2},{3,1}}]},
%% Configuration of the logical switches.
{logical_switches,
[
{switch, 0,
[
%% Configuration of switch backend implementation used by ofs_logic
%% process.
%% By default an Erlang userspace 1.3.2 implementation is selected.
%% Allowed values: 'linc_us3' | 'linc_us4' | 'linc_us4_oe' | 'linc_us5'
{backend, linc_us4},
%% Configuration of the controllers switch will connect to. Ideally
%% this list should be empty and assignement should be handled by an
%% OF-Config client.
%% Default OFP controller port is 6653.
{controllers,
[
%% {"Switch0-DefaultController", "localhost", 6653, tcp}
%% To establish auxiliary connections to the controller specify them
%% in the list of additional options. For example to start 2 tcp and one
%% tls auxiliary connections provide config as follows:
%% {"Switch0-DefaultController", "localhost", 6653, tcp,
%% [{auxiliary_connections, [{tcp, 2}, {tls, 1}]}]
%% }
]},
%% Enable or disable accepting connections from OFP controllers.
%% The switch may optionally accept TCP connections from OFP controllers
%% trying to connect to it.
%% Allowed values: 'disabled' | '{BIND_ADDRESS, LISTENING_PORT, tcp}'
%% Example:
%% {controllers_listener, {"127.0.0.1", 6653, tcp}}
{controllers_listener, disabled},
%% Enable or disable queues subsystem. Queue configuration is not part
%% of the OpenFlow specification and as such should be considered
%% EXPERIMENTAL. This feature is disabled by default.
%% Allowed values: 'enabled' | 'disabled'
{queues_status, disabled},
%% The datapath_id uniquely identifies a datapath. The lower
%% 48 bits are intended for the switch MAC address, while
%% the top 16 bits are up to the implementer.
{datapath_id, "00:00:00:00:00:00:00:01"},
%% To assign a port to a logical switch two requirements has to be met:
%% a. the port has to be defined in the `capable_switch_ports`,
%% b. the port has to be listed in the `ports` for the logical switch.
%%
%% Note that logical switch port numbers do not have to be the same
%% as capable switch port numbers. If the `port_no` option is not
%% provided it defaults to capable switch port number.
%%
%% If `port_name` option is not provided it defaults to
%% `Port{LOGICAL_SWITCH_PORT_NO}` or `Port{CAPABLE_SWITCH_PORT_NO}`
%% if logical port number is not provided.
%%
%% If queues are enabled, assign them to ports.
%% Remember to set appropriate port rates in `capable_switch_ports`.
%% Queue configuration is not part of the OpenFlow specification
%% and as such should be considered EXPERIMENTAL.
{ports, [
%% Examples:
%% - port without queues:
%% {port, 1, [{queues, []}]},
%% - port with two queues:
%% {port, 2, [{queues, [1, 2]}]},
%% - port with explicit number and name
%% {port, 3, [{queues, []},
%% {port_no, 11},
%% {port_name, "Banshee"}]}
%% NOTE: The third element of the port tuple can be
%% either a {queues, _} tuple or a list of options. It
%% is recommended to use a list of options.
]}
]}
%% Capable Switch context allows you to start multiple Logical Switches
%% inside one instance of LINC.
%% , {switch, 1,
%% [
%% {backend, linc_us3},
%% {controllers, []},
%% {ports, []},
%% {queues_status, disabled},
%% ]}
]}
%% TLS configuration. Put your switch certificate and private RSA key here.
%% Values should be base64 encoded, DER encoded strings.
%% , {certificate, ""},
%% {rsa_private_key, ""}
]},
{epcap,
%% epcap is a LINC dependency that reads packets from the eth interfaces (not
%% tap interfaces). It's a wrapper for pcap.
[
%% Setting this option to true will enable logging in libpcap. The log
%% messages will be printed to:
%% a. rel/linc/log/erlang.log.N file when started as daemon (more
%% information here: http://www.erlang.org/doc/man/run_erl.html under
%% "Notes concerning the log files"),
%% b. the application console when started in console mode.
{verbose, false},
%% This options sets interval of printing pcap statistics. The value is in
%% seconds.
%% NOTE: This option will have effect ONLY if verbose is set to true.
{stats_interval, 10}
%% This option allows manipulating internal buffer size of pcap. By
%% increasing this buffer dropping packet can be mitigated. The value is in
%% bytes.
%% , {buffer_size, 73400320}
]},
{of_protocol,
[
%% This flag allows to disable splitting messages into multipart
%% messages.
%% {no_multipart, true}
]},
{enetconf,
[
{capabilities, [{base, {1, 0}},
{base, {1, 1}},
{startup, {1, 0}},
{'writable-running', {1, 0}}]},
{callback_module, linc_ofconfig},
{sshd_ip, any},
{sshd_port, 1830},
{sshd_user_passwords,
[
{"linc", "linc"}
]}
]},
{lager,
[{colored, true},
{handlers,
[{lager_console_backend, info},
%% To enable 'debug' logs on the console change 'info' to 'debug'.
%% However that will produce big amount of logs from dependencies.
%% To filter them out and display only 'debug' messages from LINC
%% application, change the above 'lager_console_backend' into the
%% one presented below. Note that all the 'debug' logs can be for
%% example redirected to a file by setting appropriate log level
%% in the 'lager_file_backend'.
%% {lager_console_backend,
%% [debug,
%% {lager_default_formatter,
%% [{linc,
%% [time, " [", severity, "] ", message, "\n"],
%% [""]}]
%% }]
%% },
{lager_file_backend, [{file, "log/error.log"}, {level, error},
{size, 10485760}, {date, "$D0"},{count, 5}]},
{lager_file_backend, [{file, "log/console.log"}, {level, info},
{size, 10485760}, {date, "$D0"},{count, 5}]}
]}
]},
{sasl,
[
{sasl_error_logger, {file, "log/sasl-error.log"}},
{errlog_type, error},
{error_logger_mf_dir, "log/sasl"}, % Log directory
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
{error_logger_mf_maxfiles, 5} % 5 files max
]},
{sync,
%% Sync is a developer utility that reloads changed beam files into the VM
%% without the need to restart it. It is started when the Makefile's dev
%% target is invoked to start the development environment.
[
%% By default only the procket module is excluded from the scan process
%% as it does not support reloading.
{excluded_modules, [procket]}
]}
].