ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/vped.conf.pod
(Generate patch)

Comparing gvpe/doc/vped.conf.pod (file contents):
Revision 1.1 by pcg, Sun Mar 23 14:47:39 2003 UTC vs.
Revision 1.2 by pcg, Mon Mar 24 15:20:24 2003 UTC

28 28
29The only exception to the above is the "on" directive that can prefix any 29The only exception to the above is the "on" directive that can prefix any
30C<name = value> setting and will only "execute" it on the named node, or 30C<name = value> setting and will only "execute" it on the named node, or
31(if the nodename starts with "!") on all nodes except the named one. 31(if the nodename starts with "!") on all nodes except the named one.
32 32
33 name = value 33 name = value
34 on branch1 loglevel = noise 34 on branch1 loglevel = noise
35 on !branch2 connect = ondemand 35 on !branch2 connect = ondemand
36 36
37All settings are executed "in order", that is, later settings of the same 37All settings are executed "in order", that is, later settings of the same
38variable overwrite earlier ones. 38variable overwrite earlier ones.
39 39
40=head1 ANATOMY OF A CONFIG FILE 40=head1 ANATOMY OF A CONFIG FILE
147=item MAC=fe:fd:80:00:00:01 147=item MAC=fe:fd:80:00:00:01
148 148
149The MAC address to set the interface to. The script *must* set the 149The MAC address to set the interface to. The script *must* set the
150interface MAC to this value. On GNU/Linux you will most likely use this: 150interface MAC to this value. On GNU/Linux you will most likely use this:
151 151
152 ip link set $IFNAME address $MAC mtu $MTU up 152 ip link set $IFNAME address $MAC mtu $MTU up
153 153
154=item NODENAME=branch1 154=item NODENAME=branch1
155 155
156The nickname of the current node, as passed to the vped daemon. 156The nickname of the current node, as passed to the vped daemon.
157 157
162 162
163=back 163=back
164 164
165Here is a simple if-up script: 165Here is a simple if-up script:
166 166
167 #!/bin/sh 167 #!/bin/sh
168 ip link set $IFNAME address $MAC mtu $MTU up 168 ip link set $IFNAME address $MAC mtu $MTU up
169 [ $NODENAME = branch1 ] && ip addr add 10.0.0.1 dev $IFNAME 169 [ $NODENAME = branch1 ] && ip addr add 10.0.0.1 dev $IFNAME
170 [ $NODENAME = branch2 ] && ip addr add 10.1.0.1 dev $IFNAME 170 [ $NODENAME = branch2 ] && ip addr add 10.1.0.1 dev $IFNAME
171 ip route add 10.0.0.0/8 dev $IFNAME 171 ip route add 10.0.0.0/8 dev $IFNAME
172 172
173More complicated examples (using routing to reduce arp traffic) can be 173More complicated examples (using routing to reduce arp traffic) can be
174found in the etc/ subdirectory of the distribution. 174found in the etc/ subdirectory of the distribution.
175 175
176=item node-up = relative-or-absolute-path 176=item node-up = relative-or-absolute-path
207=back 207=back
208 208
209Here is a nontrivial example that uses nsupdate to update the name => ip 209Here is a nontrivial example that uses nsupdate to update the name => ip
210mapping in some dns zone: 210mapping in some dns zone:
211 211
212 #!/bin/sh 212 #!/bin/sh
213 { 213 {
214 echo update delete $DESTNODE.lowttl.example.net. a 214 echo update delete $DESTNODE.lowttl.example.net. a
215 echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP 215 echo update add $DESTNODE.lowttl.example.net. 1 in a $DESTIP
216 echo 216 echo
217 } | nsupdate -d -k $CONFBASE:key.example.net. 217 } | nsupdate -d -k $CONFBASE:key.example.net.
218 218
219=item node-down = relative-or-absolute-path 219=item node-down = relative-or-absolute-path
220 220
221Same as C<node-up>, but gets called whenever a connection is lost. 221Same as C<node-up>, but gets called whenever a connection is lost.
222 222

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines