Indice   FAQ  
Iscriviti  Login
Indice RouterOS RouterOS

OSPF su collegamenti L2TP

Tutto su questo sistema operativo linux based - Configurazioni, dubbi, problematiche &....

OSPF su collegamenti L2TP

Messaggioda Sivics » mer 10 giu 2015, 9:09

Ciao a tutti, non riesco a capire una cosa, se qualcuno riesce a farmi capire gliene sono gratos!!!

Ho una rete hiperlan di con circa 200 router che fanno OSPF in modalità punto punto. Sui router connessi alle ADSL (5) ho creato dei collegamenti L2TP/IPSec tra di loro in modo da avere un eventuale collegamento di backup sicuro. Quello che vorrei fare è far funzionare OSPF anche su queste VPN in modo che se qualche collegamento verso quei router va giù siano raggiungibili lo stesso in tempo zero.

Il problema...ho provato ad aggiungere tra 2 router le network per OSPF ma, giustamente, vedendosi come neighbor, anche se imposto un pathcost più elevato sull'interfaccia VPN le rotte direttamente connesse ai router vengono girate tramite VPN piuttosto che su hiperlan.
Cosa potrei fare per ovviare a questa cosa?

Grazie a tutti!
Avatar utente
Sivics
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 46
Iscritto il: lun 19 set 2011, 11:20
Uso routerOS dalla Versione: v4.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE, MTCTCE, MTCUME

Re: OSPF su collegamenti L2TP

Messaggioda figheras » gio 11 giu 2015, 19:23

Posta la configurazione di entrambi i router e vediamo...
Siamo tutti ignoranti. Ma non tutti ignoriamo le stesse cose! - Einstein -
Avatar utente
figheras
Staff rosIT
Staff rosIT
 
Messaggi: 1218
Iscritto il: sab 19 set 2009, 20:09
Uso routerOS dalla Versione: v2.9.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE
Altre certificazioni: Cisco CCNA, KalliopePBX
Preferred Training Centre: Grifonline

Re: OSPF su collegamenti L2TP

Messaggioda Sivics » ven 12 giu 2015, 12:56

Posso postare le due configurazioni censurate, avevo fatto un pò di prove quindi ora sono anche incasinate e non è abilitato ospf sulla l2tp.

Router1
Codice: Seleziona tutto
/interface bridge
add mtu=1500 name=bridge
add name=bridge_mngt
/ip ipsec proposal
add auth-algorithms=sha512 enc-algorithms=twofish name=VPN pfs-group=modp2048
/interface l2tp-client
add add-default-route=no allow=mschap2 connect-to=xx.xx.xx.xx dial-on-demand=no disabled=no keepalive-timeout=60 max-mru=1450 max-mtu=1450 mrru=1600 name=l2tp-aaa password=***** profile=default-encryption \
    user=AAA
/routing ospf area
add area-id=0.0.0.51 name=area2
/routing ospf instance
set [ find default=yes ] distribute-default=always-as-type-1 redistribute-connected=as-type-1 redistribute-static=as-type-1 router-id=0.0.0.57
add disabled=yes metric-connected=30 name=ospf1 redistribute-connected=as-type-1 router-id=0.0.0.14
/routing ospf area
add area-id=0.0.0.111 instance=ospf1 name=area222
/interface bridge port
add bridge=bridge interface=ether2
add bridge=bridge interface=ether10
/interface l2tp-server server
set authentication=mschap2 enabled=yes
/interface pptp-server server
set authentication=mschap2 enabled=yes max-mru=1460 max-mtu=1460
/ip address
add address=10.63.2.13/30 interface=ether9 network=10.63.2.12
add address=**.**.**.**/29 interface=ether6 network=**.**.**.**
add address=yy.yy.yy.yy/29 interface=ether6 network=**.**.**.**
add address=**.**.**.**/29 interface=ether6 network=**.**.**.**
add address=**.**.**.**/29 interface=ether6 network=**.**.**.**
add address=**.**.**.**/29 interface=ether6 network=**.**.**.**
add address=10.56.39.1/25 interface=ether1 network=10.56.39.0
add address=10.56.39.129/25 interface=ether4 network=10.56.39.128
add address=10.56.38.1/24 interface=bridge network=10.56.38.0
add address=10.56.37.1/24 interface=ether3 network=10.56.37.0
add address=10.56.36.1/25 interface=ether5 network=10.56.36.0
add address=10.61.8.1/24 interface=ether8 network=10.61.8.0
add address=10.56.36.129/25 interface=ether7 network=10.56.36.128
add address=10.63.244.1/32 interface=bridge_mngt network=10.63.244.1
/ip ipsec peer
add address=xx.xx.xx.xx/32 auth-method=rsa-signature certificate=cert1 dh-group=modp2048 enc-algorithm=aes-256 hash-algorithm=sha512 lifetime=4h nat-traversal=no remote-certificate=cert2
/ip ipsec policy
add dst-address=xx.xx.xx.xx/32 proposal=VPN sa-dst-address=xx.xx.xx.xx sa-src-address=yy.yy.yy.yy src-address=yy.yy.yy.yy/32
/ip route
add check-gateway=ping distance=1 gateway=**.**.**.**
add distance=1 dst-address=10.57.38.0/24 gateway=10.63.3.154
add distance=150 dst-address=10.59.18.0/24 gateway=10.63.2.94
add distance=1 dst-address=10.59.35.0/24 gateway=10.63.2.74
/ppp secret
add disabled=yes local-address=10.63.2.73 name=user1 password=**** profile=default-encryption remote-address=10.63.2.74 service=pptp
add disabled=yes local-address=10.63.2.29 name=user2 password=**** remote-address=10.63.2.30 service=pptp
add local-address=10.63.2.93 name=user3 password=**** profile=default-encryption remote-address=10.63.2.94 service=pptp
add local-address=10.63.3.153 name=user4 password=**** profile=default-encryption remote-address=10.63.3.154 service=l2tp
add local-address=10.63.8.45 name=user5 password=**** profile=default-encryption remote-address=10.63.8.46 service=l2tp
/routing ospf interface
add authentication=md5 authentication-key="****" interface=ether9 network-type=point-to-point
add authentication=md5 authentication-key="****" cost=65000 interface=l2tp-aaa network-type=point-to-point
/routing ospf network
add area=area2 network=10.63.2.12/30
add area=area2 disabled=yes network=10.63.7.253/32
add area=area222 disabled=yes network=10.63.8.33/32


Router2
Codice: Seleziona tutto
/interface bridge
add mtu=1500 name=bridge
add mtu=1500 name=bridge_mngt
/interface l2tp-client
add allow=mschap2 connect-to=**.**.**.** disabled=no mrru=1600 name=l2tp-bbb password=**** user=user1
add allow=mschap2 connect-to=**.**.**.** disabled=no mrru=1600 name=l2tp-ccc password=**** user=user2
/ip ipsec proposal
add auth-algorithms=sha512 enc-algorithms=twofish name=VPN pfs-group=modp2048
/routing ospf instance
set [ find default=yes ] distribute-default=always-as-type-1 redistribute-connected=as-type-1 redistribute-static=as-type-1 router-id=0.0.0.37
add disabled=yes metric-connected=30 name=ospf1 redistribute-connected=as-type-1 router-id=0.0.0.13
/routing ospf area
add area-id=0.0.0.111 disabled=yes instance=ospf1 name=area222
/interface bridge port
add bridge=bridge interface=ether3
add bridge=bridge interface=ether11
/interface l2tp-server server
set authentication=mschap2 enabled=yes
/interface pptp-server server
set authentication=mschap2 enabled=yes
/ip address
add address=xx.xx.xx.xx/29 interface=ether4 network=**.**.**.**
add address=**.**.**.**/29 interface=ether4 network=**.**.**.**
add address=**.**.**.**/29 interface=ether4 network=**.**.**.**
add address=**.**.**.**/29 interface=ether4 network=**.**.**.**
add address=10.56.22.1/24 interface=ether8 network=10.56.22.0
add address=10.56.21.1/24 interface=ether7 network=10.56.21.0
add address=10.56.20.1/25 interface=ether6 network=10.56.20.0
add address=10.56.23.1/24 interface=ether9 network=10.56.23.0
add address=**.**.**.**/29 interface=ether4 network=**.**.**.**
add address=10.57.20.1/24 interface=ether1 network=10.57.20.0
add address=10.56.20.129/25 interface=ether2 network=10.56.20.128
add address=10.61.4.1/24 interface=bridge network=10.61.4.0
add address=10.63.7.77/30 interface=ether10 network=10.63.7.76
add address=10.63.243.1/32 interface=bridge_mngt network=10.63.243.1
/ip ipsec peer
add address=yy.yy.yy.yy/32 auth-method=rsa-signature certificate=cert1 dh-group=modp2048 enc-algorithm=aes-256 hash-algorithm=sha512 lifetime=4h nat-traversal=no passive=yes remote-certificate=PRO send-initial-contact=no
/ip ipsec policy
add dst-address=yy.yy.yy.yy/32 proposal=VPN sa-dst-address=yy.yy.yy.yy sa-src-address=xx.xx.xx.xx src-address=xx.xx.xx.xx/32
/ip route
add distance=1 gateway=**.**.**.**
add distance=130 dst-address=10.59.14.0/24 gateway=10.63.2.134
/ppp secret
add local-address=10.63.2.133 name=user1 password=***** remote-address=10.63.2.134 service=l2tp
add local-address=10.63.8.33 name=AAA password=***** profile=default-encryption remote-address=10.63.8.34 service=l2tp
add local-address=10.63.8.41 name=user3 password=***** profile=default-encryption remote-address=10.63.8.42 service=l2tp
/routing ospf interface
add authentication=md5 authentication-key="*****" interface=ether10 network-type=point-to-point
add authentication=md5 authentication-key="*****" cost=65000 network-type=point-to-point
/routing ospf network
add area=backbone network=10.63.3.4/30
add area=backbone network=10.63.7.76/30
add area=area222 disabled=yes network=10.63.8.34/32


Grazie mille!
Avatar utente
Sivics
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 46
Iscritto il: lun 19 set 2011, 11:20
Uso routerOS dalla Versione: v4.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE, MTCTCE, MTCUME

Re: OSPF su collegamenti L2TP

Messaggioda xanio » sab 13 giu 2015, 9:20

IO quello che nn ho capito e se vuoi fare passare ospf sotto la VPN oppure a livello Dorsale in HIPERLAN?

In ogni caso ti consiglio di:
1. creare un'interfaccia di loopback ed assegnare un relativo ip /32
2. instradare la classe degli ip di loopback attraverso il backbone.

Poi dipende da cosa vuoi fare ;)
---
MTCNA - MTCRE
Avatar utente
xanio
Staff rosIT
Staff rosIT
 
Messaggi: 1054
Iscritto il: lun 31 ott 2011, 18:15
Località: Sicilia
Uso routerOS dalla Versione: v4.x
Certificazioni Mikrotik: MTCNA - MTCRE
Altre certificazioni: Milestone - Yeastar - Cambium
Preferred Training Centre: Grifonline

Re: OSPF su collegamenti L2TP

Messaggioda Sivics » lun 15 giu 2015, 14:34

La loopback c'è già si chiama bridge_mngt. Forse mi manca da pubblicizzarla nelle network OSPF?

Sostanzialmente la mia situazione HL ora è:

Router1 (area2) === backbone === Router2 (backbone)

Quello che mi serve fare è avere ospf che gira anche su L2TP che mi dia un collegamento di backup tra R1 e R2 nel caso qualche ponte radio nel mezzo esplodesse.

Sicuramente qualcosa di sbagliato nella configurazione c'è perchè se provo a fare OSPF (vado a memoria perchè l'ho fatto qualche tempo fa) succede che:
Con la stessa instance -> tutto il traffico viene comunque reindirizzato via L2TP anche se i ponti radio stanno funzionanto
Creando un'altra instance OSPF -> qualcosa va via L2TP e qualcosa va via ponte radio.

Non c'è la situazione netta che va tutto via ponte radio e se muore va in backup su L2TP.
Dettaglio in più, sempre se non ricordo male, questo problema di routing succede solo per le rotte che risiedono localmente sui 2 router coinvolti, tutto il resto va via HL.
Avatar utente
Sivics
Mikrotik-User 10° Liv
Mikrotik-User 10° Liv
 
Messaggi: 46
Iscritto il: lun 19 set 2011, 11:20
Uso routerOS dalla Versione: v4.x
Certificazioni Mikrotik: MTCNA, MTCRE, MTCWE, MTCTCE, MTCUME



Torna a RouterOS

Chi c’è in linea

Visitano il forum: Nessuno e 10 ospiti