Есть такая конфигурация IPsec+GRE и простенький OSPF:
R1:
Код: Выделить всё
/ip ipsec peer
add exchange-mode=ike2 name=peer1 passive=yes send-initial-contact=no
/ip ipsec identity
add generate-policy=port-strict peer=peer1 secret=Password
/interface gre
add allow-fast-path=no local-address=172.16.0.1 name=gre-tunnel1 remote-address=172.16.0.2
/ip address
add address=100.100.100.2/30 interface=ether1 network=100.100.100.0
add address=10.10.0.1/24 interface=ether2 network=10.10.0.0
add address=172.16.0.1/30 interface=gre-tunnel1 network=172.16.0.0
/routing ospf interface
add interface=ether2 network-type=point-to-point
add interface=gre-tunnel1 network-type=point-to-point
/routing ospf network
add area=backbone network=10.10.0.0/24
add area=backbone network=172.16.0.0/24
/ip firewall nat
add action=accept chain=srcnat dst-address=172.16.0.0/24
add action=masquerade chain=srcnat out-interface=ether1
Код: Выделить всё
/ip ipsec peer
add address=100.100.100.2/32 exchange-mode=ike2 name=peer1 send-initial-contact=no
/ip ipsec identity
add peer=peer1 secret=Password
/ip ipsec policy
add dst-address=172.16.0.1/32 level=unique peer=peer1 src-address=172.16.0.2/32 tunnel=yes
/interface gre
add allow-fast-path=no local-address=172.16.0.2 name=gre-tunnel1 remote-address=172.16.0.1
/ip address
add address=100.100.100.6/30 interface=ether1 network=100.100.100.4
add address=10.10.5.1/24 interface=ether2 network=10.10.5.0
add address=172.16.0.2/30 interface=gre-tunnel1 network=172.16.0.0
/routing ospf interface
add interface=ether2 network-type=point-to-point
add interface=gre-tunnel1 network-type=point-to-point
/routing ospf network
add area=backbone network=10.10.5.0/24
add area=backbone network=172.16.0.0/24
/ip firewall nat
add action=accept chain=srcnat dst-address=172.16.0.0/24
add action=masquerade chain=srcnat out-interface=ether1
Код: Выделить всё
ospf-instance-1 { version: 2 router-id: 172.16.0.2 } backbone { 0.0.0.0 } interface { p2p 172.16.0.2%gre-tunnel1 } send hello
ospf-instance-1 { version: 2 router-id: 172.16.0.2 } backbone { 0.0.0.0 } interface { p2p 172.16.0.2%gre-tunnel1 } neighbor { router-id: 10.10.0.1 state: ExStart } send DD to 172.16.0.1 Init Master More sequence 1939173898
ospf-instance-1 { version: 2 router-id: 172.16.0.2 } backbone { 0.0.0.0 } interface { p2p 172.16.0.2%gre-tunnel1 } neighbor { router-id: 10.10.0.1 state: ExStart } receive DD from 172.16.0.1 Init Master More sequence 0
Если отключить IPsec и перенастроить GRE с внешними адресами на R1 и R2:
Код: Выделить всё
/interface gre
add allow-fast-path=no ipsec-secret=Password local-address=100.100.100.2 name=gre-tunnel2 remote-address=100.100.100.6
/interface gre
add allow-fast-path=no ipsec-secret=Password local-address=100.100.100.6 name=gre-tunnel2 remote-address=100.100.100.2
Вопрос в том, как заставить OSPF работать в приведенной выше конфигурации IPsec/GRE в ROS7?