… | |
… | |
127 | .\} |
127 | .\} |
128 | .rm #[ #] #H #V #F C |
128 | .rm #[ #] #H #V #F C |
129 | .\" ======================================================================== |
129 | .\" ======================================================================== |
130 | .\" |
130 | .\" |
131 | .IX Title "VPED.CONF 5" |
131 | .IX Title "VPED.CONF 5" |
132 | .TH VPED.CONF 5 "2003-03-23" "0.1" "Virtual Private Ethernet" |
132 | .TH VPED.CONF 5 "2003-03-24" "0.1" "Virtual Private Ethernet" |
133 | .SH "NAME" |
133 | .SH "NAME" |
134 | vped.conf \- vpe daemon configuration file |
134 | vped.conf \- vpe daemon configuration file |
135 | .SH "SYNOPSIS" |
135 | .SH "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
137 | .Vb 3 |
137 | .Vb 3 |
… | |
… | |
166 | The only exception to the above is the \*(L"on\*(R" directive that can prefix any |
166 | The only exception to the above is the \*(L"on\*(R" directive that can prefix any |
167 | \&\f(CW\*(C`name = value\*(C'\fR setting and will only \*(L"execute\*(R" it on the named node, or |
167 | \&\f(CW\*(C`name = value\*(C'\fR setting and will only \*(L"execute\*(R" it on the named node, or |
168 | (if the nodename starts with \*(L"!\*(R") on all nodes except the named one. |
168 | (if the nodename starts with \*(L"!\*(R") on all nodes except the named one. |
169 | .PP |
169 | .PP |
170 | .Vb 3 |
170 | .Vb 3 |
171 | \& name = value |
171 | \& name = value |
172 | \& on branch1 loglevel = noise |
172 | \& on branch1 loglevel = noise |
173 | \& on !branch2 connect = ondemand |
173 | \& on !branch2 connect = ondemand |
174 | .Ve |
174 | .Ve |
175 | .PP |
175 | .PP |
176 | All settings are executed \*(L"in order\*(R", that is, later settings of the same |
176 | All settings are executed \*(L"in order\*(R", that is, later settings of the same |
177 | variable overwrite earlier ones. |
177 | variable overwrite earlier ones. |
178 | .SH "ANATOMY OF A CONFIG FILE" |
178 | .SH "ANATOMY OF A CONFIG FILE" |
… | |
… | |
269 | .IX Item "MAC=fe:fd:80:00:00:01" |
269 | .IX Item "MAC=fe:fd:80:00:00:01" |
270 | The \s-1MAC\s0 address to set the interface to. The script *must* set the |
270 | The \s-1MAC\s0 address to set the interface to. The script *must* set the |
271 | interface \s-1MAC\s0 to this value. On GNU/Linux you will most likely use this: |
271 | interface \s-1MAC\s0 to this value. On GNU/Linux you will most likely use this: |
272 | .Sp |
272 | .Sp |
273 | .Vb 1 |
273 | .Vb 1 |
274 | \& ip link set $IFNAME address $MAC mtu $MTU up |
274 | \& ip link set $IFNAME address $MAC mtu $MTU up |
275 | .Ve |
275 | .Ve |
276 | .IP "NODENAME=branch1" 4 |
276 | .IP "NODENAME=branch1" 4 |
277 | .IX Item "NODENAME=branch1" |
277 | .IX Item "NODENAME=branch1" |
278 | The nickname of the current node, as passed to the vped daemon. |
278 | The nickname of the current node, as passed to the vped daemon. |
279 | .IP "NODEID=1" 4 |
279 | .IP "NODEID=1" 4 |
… | |
… | |
284 | .RS 4 |
284 | .RS 4 |
285 | .Sp |
285 | .Sp |
286 | Here is a simple if-up script: |
286 | Here is a simple if-up script: |
287 | .Sp |
287 | .Sp |
288 | .Vb 5 |
288 | .Vb 5 |
289 | \& #!/bin/sh |
289 | \& #!/bin/sh |
290 | \& ip link set $IFNAME address $MAC mtu $MTU up |
290 | \& ip link set $IFNAME address $MAC mtu $MTU up |
291 | \& [ $NODENAME = branch1 ] && ip addr add 10.0.0.1 dev $IFNAME |
291 | \& [ $NODENAME = branch1 ] && ip addr add 10.0.0.1 dev $IFNAME |
292 | \& [ $NODENAME = branch2 ] && ip addr add 10.1.0.1 dev $IFNAME |
292 | \& [ $NODENAME = branch2 ] && ip addr add 10.1.0.1 dev $IFNAME |
293 | \& ip route add 10.0.0.0/8 dev $IFNAME |
293 | \& ip route add 10.0.0.0/8 dev $IFNAME |
294 | .Ve |
294 | .Ve |
295 | .Sp |
295 | .Sp |
296 | More complicated examples (using routing to reduce arp traffic) can be |
296 | More complicated examples (using routing to reduce arp traffic) can be |
297 | found in the etc/ subdirectory of the distribution. |
297 | found in the etc/ subdirectory of the distribution. |
298 | .RE |
298 | .RE |
… | |
… | |
325 | .Sp |
325 | .Sp |
326 | Here is a nontrivial example that uses nsupdate to update the name => ip |
326 | Here is a nontrivial example that uses nsupdate to update the name => ip |
327 | mapping in some dns zone: |
327 | mapping in some dns zone: |
328 | .Sp |
328 | .Sp |
329 | .Vb 6 |
329 | .Vb 6 |
330 | \& #!/bin/sh |
330 | \& #!/bin/sh |
331 | \& { |
331 | \& { |
332 | \& echo update delete $DESTNODE.lowttl.example.net. a |
332 | \& echo update delete $DESTNODE.lowttl.example.net. a |
333 | \& echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP |
333 | \& echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP |
334 | \& echo |
334 | \& echo |
335 | \& } | nsupdate -d -k $CONFBASE:key.example.net. |
335 | \& } | nsupdate -d -k $CONFBASE:key.example.net. |
336 | .Ve |
336 | .Ve |
337 | .RE |
337 | .RE |
338 | .IP "node-down = relative-or-absolute-path" 4 |
338 | .IP "node-down = relative-or-absolute-path" 4 |
339 | .IX Item "node-down = relative-or-absolute-path" |
339 | .IX Item "node-down = relative-or-absolute-path" |
340 | Same as \f(CW\*(C`node\-up\*(C'\fR, but gets called whenever a connection is lost. |
340 | Same as \f(CW\*(C`node\-up\*(C'\fR, but gets called whenever a connection is lost. |