GRE tunnels
U
SER
G
UIDE
232
Here follows the display of an inactive tunnel:
root@Imola>
ifconfig tgprs0
tun0 Link encap:UNSPEC HWaddr 0A-0A-08-4D-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:3.3.3.1 P-t-P:3.3.3.2 Mask:255.255.255.252
POINTOPOINT NOARP MULTICAST MTU:1476 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Indications
UP
and
RUNNING
show that the tunnel is active. The flag
UP
generally indicates that the
status of the interface is administratively active, while the flag
RUNNING
indicates that it is
operationally active.
In order to enable multicast transmission on the interface the following command is used:
set gre generic multicast
In order to modify the value of MTU the command is:
set gre generic mtu N
The default value is
1476
, i.e.
1500
–
24
, where
1500
is the MTU value of the physical interface and
24
is the overhead of the tunnel itself.
The value of the TTL field is set with the command:
set gre generic ttl N
To avoid possible problems with routing protocols or with particular applications that set the TTL =
1, it is advisable to use:
set gre tunnel 0 ttl 64
The tunnel is activated by using the command:
set gre tunnel 0 on
and it is deactivated with the command:
set gre tunnel 0 off
Sometimes the activation of the tunnel is conditioned to particular events. For example, if you want
to activate the tunnel just when the GPRS session turns on and to deactivate the tunnel when the
GPRS session is turned off:
set trigger gprs up set gre tunnel 0 on
set trigger gprs down set gre tunnel 0 on
Similarly, the tunnel can be made operational at the time of activation of the backup functionality:
set autocmd set gre tunnel 0 on
or the tunnel can be activated when the GPRS session is activated, and it can deactivated when the
GPRS session is terminated:
set trigger gprs up set gre generic on
set trigger gprs down set gre generic on
or when backup functionality is activated: