Im trying to create IP over GRE tunnel but i get No such device:

ip tunnel add gre0 mode gre remote local ttl 255
ioctl: No such device

I have compiled GRE support in my kernel:


There is not gre0 interface when interfaces are displayed via ifconfig -a where i see all available network interfaces (also those not upped yet).

My kernel version is and iproute2 version is 2-2.6.33.

ip tunnel show displays:

ip tunnel show
ioctl: Invalid argument
tunl0: ip/ip  remote any  local any  ttl inherit  nopmtudisc
sit0: ipv6/ip  remote any  local any  ttl 64  nopmtudisc 6rd-prefix 2002::/16

3 Answers 3


The problem was GRE demultiplexer module required by ip_gre. When kernel loads GRE demultiplexer driver registers protocol 47 handle so when ip_gre.c attempted to do the same it fails because it has been registered before. It is solved by modifying ip_gre.c to not register protocol GRE handle.


The syntax you're looking for is:

ip tunnel add <name> mode <mode> ...


ip tunnel add gre0 mode gre ...

The name is an arbitrary text string, it can be anything you want. I usually name the tunnels after the remote side for clarity.

  • I am sorry i wrote command with bad syntax, im going to edit the question, but im testing now with ip tunnel add gre0 mode gre.. and the result is the same, ioctl: no such device.
    – MABC
    Jan 2, 2014 at 21:48

Just execute:

modprobe ip_gre

Before your command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .