For example, in order to subordinate the execution of the previous GRE Tunnel to the availability of
the GPRS interface, the following command can be saved on the router:
set trigger gprs up set tun0 gre on
In this way the tunnel will be activated only when the GPRS interface is activated.
The interface is considered active when typical IP addresses of a point-to-point connection are
assigned to it. To get more information on the functionality above, see the chapter dedicated to the
triggers.
ROUTING TABLES
The command set route is used to add a static route. It also modifies the configuration so that
the same route will be added at the next reboot (provided that the configuration has been saved).
set route host 1.2.3.4 dev atm0
There are different ways to add static routes. For example:
set adsl pvc atm0 default-route
in this way a default route is activated on the atm0 interface. Or:
set adsl pcv atm0 no-default-route
set trigger adsl up ip route add 1.2.3.4 dev atm0
The ip command is executed when the atm0 interface (ADSL) is activated. It can be used in different
formats, including:
ip route add default dev atm0
ip route add default via <nexthop>
ip route add X.Y.Z.0/N dev atm0
ip route add X.Y.Z.0/N via <nexthop>
Routes added directly through ip command have priority over routes added through set route
command and over those acquired through routing protocols.
GRE PROTOCOL
Even if the online help allows the usage of the gre keyword, it could produce error messages in
some commands. This occurs, for example, for the iptables command, where the numeric value
47 must be used instead of the gre keyword.