GRE does not show status

Hello
using openwrt 19.07.
I have setup gre tunnels on two routers.
config on router 1:

config interface 'gre1'
        option proto 'gre'
        option peeraddr '192.168.43.245'
        option ipaddr '192.168.43.233'
        option ltunaddr '10.10.8.1'
        option rtunaddr '10.10.8.2'
        option keepalvi '5'
        option keepalvr '10'
        option tunlink 'wwan'

config on router 2:
config interface 'gre2'
        option proto 'gre'
        option peeraddr '192.168.43.233'
        option ipaddr '192.168.43.245'
        option ltunaddr '10.10.8.2'
        option rtunaddr '10.10.8.1'
        option keepalvi '5'
        option keepalvr '10'
        option tunlink 'wwan'

I gre tunnel on both routers are working as I am able to see ifconfig on both device
on router #1:

gre4-gre1   Link encap:UNSPEC  HWaddr C0-A8-2B-E9-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.10.8.1  P-t-P:10.10.8.2  Mask:255.255.255.255
          inet6 addr: fe80::5efe:c0a8:2be9/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1344 (1.3 KiB)  TX bytes:1764 (1.7 KiB)

on router #2

gre4-gre2 Link encap:UNSPEC  HWaddr C0-A8-2B-F5-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.10.8.2  P-t-P:10.10.8.1  Mask:255.255.255.255
          inet6 addr: fe80::5efe:c0a8:2bf5/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  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:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Also I am able to ping 10.10.8.2 from router 1 and 10.10.8.1 from router 2.

But if run ifstatus on both the routers i get blank values for RX, TX and ipaddress

ifstatus gre1
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 12363,
	"l3_device": "gre4-mh",
	"proto": "gre",
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		
	],
	"dns-server": [
		
	],
	"dns-search": [
		
	],
	"neighbors": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		],
		"neighbors": [
			
		]
	},
	"data": {
		
	}
}

Does anyone knows why these fields are blank in ifstatus result?

Hello @vgaetera
Thanks for your reply.
But how about connecting two router?
Is there any mistake in the configuration I did?

Set up the GRE tunnel the same way as described in the wiki, i.e. using an alias interface.
Then you should be able to fetch the network level configuration with ifstatus/ubus.

@vgaetera I tried the same kind of config for two routers. But the result is same.
The tunnel is UP, able to ping each other but no, RX and TX updated on the web page.

Router1 ( WAN IP: 172.22.103.125)

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option metric '5'
        option proto 'dhcp'

config interface 'mygre1'
        option ipaddr '172.22.103.125'
        option peeraddr '172.22.101.144'
        option proto 'gre'

config interface 'mygre1_static'
        option proto 'static'
        option ifname '@mygre1'
        option ipaddr '10.10.10.1'
        option netmask '255.255.255.252'

config route 'tunnel'
        option interface 'mygre_static'
        option target '192.168.2.1'
        option netmask '255.255.255.0'
        option gateway '10.10.10.2

Router 2 ( WAN IP: 172.22.101.144)

config interface 'lan'                         
        option type 'bridge'                   
        option proto 'static'                  
        option netmask '255.255.255.0'         
        option ip6assign '60'                  
        option ipaddr '192.168.2.1'            
        option ifname 'eth0.1 tap0'            
                                               
config interface 'wan'                    
        option ifname 'eth0.2'            
        option metric '5'                 
        option proto 'dhcp'               
                                          
config interface 'mygre1'                 
        option ipaddr '172.22.101.144'    
        option peeraddr '172.22.103.125'  
        option proto 'gre'                
                                          
config interface 'mygre1_static'          
        option proto 'static'             
        option ifname '@mygre1'           
        option ipaddr '10.10.10.2'        
        option netmask '255.255.255.252'  
                                          
config route 'tunnel'                     
        option interface 'mygre_static1'  
        option target '192.168.1.1'       
        option netmask '255.255.255.0'    
        option gateway '10.10.10.1'

I am able to ping from 10.10.10.1 to 10.10.10.2 and vice versa, but interface web page does not shows any RX TX information.

1 Like

Check if you can see the IPs now:

ifstatus mygre1_static

Actually, it works for me on OpenWrt 19.07.7, and I see the RX/TX changing.

Try the following:

  • Keep peeraddr but remove ipaddr in the mygre1 section on both peers.
  • Install the package kmod-nf-nathelper-extra and restart the firewall service.
  • Check if the issue persists with the firewall service stopped.

I think I am missing something in luci part.
I am able to see the RX and TX for gre tunnel if I run
ubus call luci-rpc getNetworkDevices

	"gre4-mygre1": {
		"name": "gre4-mygre1",
		"wireless": false,
		"up": true,
		"mtu": 1280,
		"qlen": 1000,
		"ipaddrs": [
			{
				"address": "10.10.10.1",
				"netmask": "255.255.255.252",
				"remote": "10.10.10.3"
			}
		],
		"ip6addrs": [
			{
				"address": "fe80::5efe:ac16:677d",
				"netmask": "ffff:ffff:ffff:ffff::"
			}
		],
		"type": 778,
		"ifindex": 17,
		"stats": {
			"rx_bytes": 1764,
			"tx_bytes": 3948,
			"tx_errors": 0,
			"rx_errors": 0,
			"tx_packets": 47,
			"rx_packets": 21,
			"multicast": 0,
			"collisions": 0,
			"rx_dropped": 0,
			"tx_dropped": 0
		},
		"flags": {
			"up": true,
			"broadcast": false,
			"promisc": false,
			"loopback": false,
			"noarp": true,
			"multicast": false,
			"pointtopoint": true
		}
	},
1 Like
opkg update
opkg install gre luci-proto-gre
/etc/init.d/rpcd restart
/etc/init.d/network restart

If the issue persists:

  • Upgrade OpenWrt to the latest stable release.
  • Upgrade all luci-* packages.
  • Back up and reset configs to factory defaults.