Execution of commands according to the geographical position
U
SER
G
UIDE
316
set cps area N command in <command>
Specifies a command that must be execute when the router enter in the specified area for the first
time.
set cps area N command no-exec-when-overlap yes|no
If the area the router enters is overlapping another one, the command above specifies is the
commands associated to the entering of the area should be executerd or not. The default value is
yes
, that means that the commands are always executed, regardless of whether the area cross one
another.
set cps area N no-command in <command>
removes the specified command.
set cps area N command out <command>
specifies a command that is executed when the router exits the specified area.
set cps area N no-command out <command>
removes the specified command.
set cps nmea-timeout <seconds>
defines the reception timeout for the GPS coordinates, if those are non received in time, the router
enters the area 0 and the associated commands are executed.
set no-cps
disables the georeference services and removes all the specified policies.
set cps no area N
removes only the specified area.
For example:
set cps nmea-source multicast 239.1.1.1 port 1237 interface eth1.3
tells that the NMEA data going to the 239.1.1.1 address and 1237 port, will be received as multicast
flow on the eth1.3 interface,
The sequence
set cps area 1 latitude 4525.91000N longitude 00753.41000E radius 1000
set cps area 1 description around-ivrea
set cps area 1 command in gprsmode no-umts
set cps area 1 command in iptables
–
A FORWARD
–
o ppp0
–
p udp
–
j DROP
executes the commands to operate on the 2G mobile network only and to block all the UDP
trafficwhen the router is located in a radius of 1000 meters from the specified position.
set cps area 1 command out gprsmode auto
set cps area 1 command out iptables
–
D FORWARD
–
o ppp0
–
p udp
–
j DROP
remove the restrinctions set by the previous commands when the router exits the specified area.
set cps area 1 latitude 4380.00000N longitude 01125.0000E radius 100
set cps area 1 description in-firenze
set cps area 1 command in upload log-file to 192.168.121.12
set cps area 1 command in hello 192.168.121.12 22000