LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SuSE<->Cisco GRE Tunnel with ifcfg-file (https://www.linuxquestions.org/questions/linux-networking-3/suse-cisco-gre-tunnel-with-ifcfg-file-4175468145/)

ViennaAustria 07-02-2013 06:10 AM

SuSE<->Cisco GRE Tunnel with ifcfg-file
 
Hello!

I try to configure a GRE Tunnel with SuSE Linux to a Cisco router through NAT on my side. When I enter all commandy by hand, it works perfectly:
Code:

modprobe ip_gre
iptunnel add tun0 mode gre local 192.168.1.2 remote 91.224.66.1 ttl 225
ifconfig tun0 37.75.142.30/30
ifconfig tun0 up
ifconfig tun0 pointopoint 37.75.142.29
route add default gw 37.75.142.29

But when I try to do that with /etc/sysconfic/network/ifcfg-tun0, I only get non-working tunnels. No error message; just no traffic through the tunnel.
Code:

STARTMODE='onboot'
BOOTPROTO='static'
TUNNEL='gre'
TUNNEL_LOCAL_IPADDR='192.168.1.2'
TUNNEL_REMOTE_IPADDR='91.224.66.1'
IPADDR='37.75.142.30/30'

Can somebody help me please? Thanks!!!

ViennaAustria 07-02-2013 10:52 AM

When I add
Code:

TUNNEL_TTL=225
to the ifcfg file, it works.

However, when I shrink the Prefix down to /31 it produces a strange tunnel configuration with local and remote endpoint being the same IP address.
Code:

tun0      Link encap:UNSPEC  HWaddr C0-A8-01-02-97-BF-48-7E-00-00-00-00-00-00-00-00
          inet addr:37.75.142.29  P-t-P:37.75.142.29  Mask:255.255.255.254
          UP POINTOPOINT RUNNING NOARP  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)

But it works, nevertheless. Obviously the `ifupī script on SuSE 11.2 can't handle /31 netmasks properly.


All times are GMT -5. The time now is 11:13 AM.