Доброго времени суток всем.
Итак, исходные данные.
7 удалённых магазинов каждый со своим маршрутизатором и провайдером. 1 офис ( итого 8 ) там прокси, то есть весь трафик через него.
Большинство офисов подключены к дорогому, лимитному интернету НО там бесплатная локалка, и по ней работают тонели к офису. Недорогой интернет только в одном магазине и через него и ходим. (да изврат, но не я придумал). Этот недорогой интернет стал часто падать и было принято решение (пока принимается решение о другом провайдере) сделать чтоб в случаи падения, все начали бы работать через дорогой ( собственный ) интернет, естессно автоматом.
На каждом шлюзе стоит quagga и разруливает всю внутреннюю маршрутизацию, поэтому реализовать сие необходимо именно через неё. Костыли исключены!
Для примера (если что нужно ещё выложу)
Quagga.conf одного из удалённых магазинов
log file /var/log/quagga/ospfd.log
log syslog
!
password zebra
enable password zebra1
!
interface eth0
ipv6 nd suppress-ra
!
interface eth1
ipv6 nd suppress-ra
!
interface eth2
ipv6 nd suppress-ra
!
interface eth3
ipv6 nd suppress-ra
!
interface gre0
ipv6 nd suppress-ra
!
interface l2r4
ipv6 nd suppress-ra
!
interface l2r5
ipv6 nd suppress-ra
!
interface lo
!
interface ppp0
bandwidth 2000
description Internet connection to Telecom
ipv6 nd suppress-ra
!
interface t253n1
bandwidth 10000
ipv6 nd suppress-ra
!
router-id 192.168.2.0
!
router ospf
auto-cost reference-bandwidth 1000
redistribute connected
network 192.168.2.0/25 area 0.0.0.2
network 192.168.2.128/25 area 0.0.0.2
network 192.168.250.8/30 area 0.0.0.0
area 0.0.0.2 range 192.168.2.0/25
area 0.0.0.2 range 192.168.2.128/25
distribute-list 1 out connected
!
ip route 87.244.7.0/24 87.244.7.105
ip route 87.244.7.104/30 87.244.7.105
ip route 87.244.7.128/30 87.244.7.105
ip route 87.244.7.136/30 87.244.7.105
ip route 87.244.7.220/30 87.244.7.105
!
access-list 1 permit 192.168.2.0 0.0.0.255
access-list 1 permit 192.168.0.4 0.0.0.3
!
ip forwarding
!
line vty
!
ospfd.conf офиса
!
! Zebra configuration saved from vty
! 2012/09/10 16:16:48
!
password zebra
enable password zebra
log file /var/log/quagga/ospfd.log
!
!
!
interface eth0
!
interface eth1
!
interface eth1:1
description For New Servers Setup
!
interface eth2
!
interface eth3
!
interface eth4
!
interface gre0
!
interface lo
!
interface ppp0
!
interface ppp1
!
interface t2n1
description vpn to oktyabrskaya
!
interface t3n1
!
interface t4n1
description vpn to intersity
!
interface t5n1
description vpn to tula.lenina.19
!
interface t6n1
description vpn to sovetskaya
!
interface t7n1
description vpn to gostinniy dvor
!
interface t7n2
!
interface t8n2
!
router ospf
! Important: ensure reference bandwidth is consistent across all routers
auto-cost reference-bandwidth 1000
redistribute connected
redistribute static
passive-interface eth0
network 192.168.250.0/30 area 0.0.0.0
network 192.168.250.4/30 area 0.0.0.0
network 192.168.250.8/30 area 0.0.0.0
network 192.168.250.12/30 area 0.0.0.0
network 192.168.250.20/30 area 0.0.0.0
network 192.168.250.32/30 area 0.0.0.0
network 192.168.250.100/30 area 0.0.0.0
network 192.168.251.0/24 area 0.0.0.251
network 192.168.253.0/25 area 0.0.0.253
network 192.168.253.128/25 area 0.0.0.253
network 192.168.254.0/25 area 0.0.0.254
network 192.168.254.128/25 area 0.0.0.254
area 0.0.0.251 range 192.168.251.0/24
area 0.0.0.253 range 192.168.253.0/25
area 0.0.0.253 range 192.168.253.128/25
area 0.0.0.254 range 192.168.254.0/25
area 0.0.0.254 range 192.168.254.128/25
distribute-list 1 out connected
distribute-list 1 out static
!
access-list 1 permit 192.168.253.0 0.0.0.255
access-list 1 permit 192.168.254.0 0.0.0.255
!
line vty
!
zebra.conf офиса
!
! Zebra configuration saved from vty
! 2012/09/10 16:16:48
!
hostname myhost
password zebra password
enable password enable zebra passsword
log file /var/log/quagga/zebra.log
!
interface eth0
ipv6 nd suppress-ra
!
interface eth1
ipv6 nd suppress-ra
!
interface eth1:1
description For New Servers Setup
ipv6 nd suppress-ra
!
interface eth2
ipv6 nd suppress-ra
!
interface eth3
ipv6 nd suppress-ra
!
interface eth4
ipv6 nd suppress-ra
!
interface gre0
ipv6 nd suppress-ra
!
interface lo
!
interface ppp0
ipv6 nd suppress-ra
!
interface ppp1
ipv6 nd suppress-ra
!
interface t2n1
description vpn to 001
bandwidth 10000
ipv6 nd suppress-ra
!
interface t3n1
ipv6 nd suppress-ra
!
interface t4n1
description vpn to 002
bandwidth 10000
ipv6 nd suppress-ra
!
interface t5n1
description vpn to 003
bandwidth 10000
ipv6 nd suppress-ra
!
interface t6n1
description vpn to 004
bandwidth 10000
ipv6 nd suppress-ra
!
interface t7n1
description vpn to 005
ipv6 nd suppress-ra
!
interface t7n2
ipv6 nd suppress-ra
!
interface t8n2
ipv6 nd suppress-ra
!
ip route 87.244.0.0/24 87.244.7.129
ip route 87.244.2.148/30 87.244.7.129
ip route 87.244.7.0/24 87.244.7.129
ip route 87.244.7.104/30 87.244.7.129
ip route 87.244.7.136/30 87.244.7.129
ip route 87.244.7.152/30 87.244.7.129
ip route 87.244.7.220/30 87.244.7.129
ip route 212.12.24.96/32 ppp0
ip route 212.12.25.188/32 ppp0
ip route 212.12.29.211/32 ppp0
!
access-list 1 permit 192.168.253.0 0.0.0.255
access-list 1 permit 192.168.254.0 0.0.0.255
!
router-id 192.168.253.0
ip forwarding
!
!
line vty
!