14: Configuring a GRE interface
_______________________________________________________________________________________________________
_______________________________________________________________________________________________________
© Virtual Access 2018
GW2020 Series User Manual
Issue: 2.1
Page 124 of 423
Click Save and Apply. This will save the current settings and return you to the Interface
Overview page. To configure further settings on the GRE interface select EDIT for the
relevant GRE interface.
14.2.4
GRE connection: adding a static route
After you have configured the GRE interface, you must configure a static route to route
the desired traffic over the GRE tunnel. To do this, browse to Network->Static Routes.
For more information, read the chapter ‘Configuring Static Routes’.
14.3
GRE configuration using command line
The configuration file is stored on /etc/config/network
For the examples below tunnel1 is used as the interface logical name.
14.4
GRE configuration using UCI
root@VA_router:~# uci show network
network.tunnel1=interface
network.tunnel1.proto=gre
network.tunnel1.monitored=0
network.tunnel1.ipaddr=172.255.255.2
network.tunnel1.mask_length=24
network.tunnel1.local_interface=wan
network.tunnel1.remote_ip=172.255.255.100
network.tunnel1.ttl=128
network.tunnel1.key=1234
network.tunnel1.mtu=1472
network.tunnel1.auto=1
14.5
GRE configuration using package options
root@VA_router:~# uci export network
config interface 'tunnel1'
option proto 'gre'
option monitored ‘0’
option ipaddr '172.255.255.2'
option mask_length '24'
option local_interface 'wan'
option remote_ip ‘172.255.255.100’
option ttl '128'