D
D
Denis Verbin2014-10-30 11:22:07
linux
Denis Verbin, 2014-10-30 11:22:07

Switching gre tunnel (Cisco -> Debian)?

Hey! There are 2 gre tunnels from cisco to Debian server. I need to organize automatic switching between them when one of them crashes.
The configuration is like this.

interface Tunnel100
 description ISP1
 ip address 192.168.1.254 255.255.255.252
 ip virtual-reassembly in
 tunnel source GigabitEthernet0/0.668
 tunnel destination 82.196.1.21
!
interface Tunnel200
 description ISP2
 ip address 192.168.1.2 255.255.255.252
 tunnel source GigabitEthernet0/0.667
 tunnel destination 82.196.1.21

ip route 192.168.0.0 255.255.0.0 Tunnel100 10
ip route 192.168.0.0 255.255.0.0 Tunnel200 20

On the back side.
/sbin/modprobe gre
/sbin/ip tunnel add tun100 mode gre remote $cisco_ip local 192.168.1.1
/sbin/ifconfig tun100 inet 192.168.1.1 pointopoint 192.168.1.1

/sbin/ip tunnel add tun200 mode gre remote $cisco_ip local 192.168.1.253
/sbin/ifconfig tun200 inet 192.168.1.253 pointopoint 192.168.1.254

/sbin/ip route add 192.168.0.0/16 via 192.168.1.2 dev 100 metric 10
/sbin/ip route add 192.168.0.0/16 via 192.168.1.254 dev tun200 metric 20

So, when one of the tunnels crashes, on Debian it does not go down and, accordingly, the route does not disappear, switching to the working tunnel does not occur. How can I force it to go into the down state and take the routes with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rinat Garipov, 2014-10-30
@ragent

Hi. obviously you need to raise dynamic routing between the router and debian. For example OSPF or RIP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question