Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im trying to configure a GRE over IPSec connection between two subnets. The IPSec tunnel is opened and now I want to add a GRE tunnel over it:

ip tunnel add GRE01 mode gre remote local ttl 255
ip link set GRE01 up
ip addr add dev GRE01
ip route add dev GRE01

Now I have an interface GRE01 (ifconfig):

GRE10     Link encap:UNSPEC  HWaddr <h_addr>
inet addr:  P-t-P:  Mask:
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)

And the following routes (ip route list): dev GRE10  scope link 
<pub_subnet> dev eth0  proto kernel  scope link  src <pub_ip> 
default via <pub_gw> dev eth0  metric 100

As a last step, I need now to route my subnet over the tunnel:

ip route add

However, I am getting the error

Error: either "to" is duplicate, or "" is a garbage.

So, what I didn't understand is why I can't route my subnet over the tunnel, once the only route I have there says that it should route the tunnel IP over the GRE01 interface. Any hint? Thanks.

share|improve this question
up vote 1 down vote accepted

You are missing the word via in your route command

ip route add via
share|improve this answer
duh, I thought that duplicate was about entries in the route table, by the way, there is no "via" in my reference book. Thanks. – eMgz Mar 1 '11 at 16:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.