OSPF и несколько офисов
Добавлено: 24 июн 2019, 12:46
Добрый день! Подскажите пожалуйста, был джунипер(вышел из строя) , конфиг остался, начал переносить на микротик, но запутался с оспф. На джунипере все было просто, такой то area такой интерфейс. А тут не могу понять. Конфига прикладываю.
джунипер
Микротик
джунипер
Код: Выделить всё
set system services dhcp pool 172.31.8.0/23 address-range low 172.31.8.31
set system services dhcp pool 172.31.8.0/23 address-range high 172.31.9.254
set system services dhcp pool 172.31.8.0/23 default-lease-time 2678400
set system services dhcp pool 172.31.8.0/23 name-server 172.31.8.5
set system services dhcp pool 172.31.8.0/23 name-server 8.8.8.8
set system services dhcp pool 172.31.8.0/23 router 172.31.8.1
set system services dhcp pool 172.31.8.0/23 propagate-settings ge-0/0/1.0
set system services dhcp pool 172.31.10.0/24 address-range low 172.31.10.31
set system services dhcp pool 172.31.10.0/24 address-range high 172.31.10.254
set system services dhcp pool 172.31.10.0/24 default-lease-time 2678400
set system services dhcp pool 172.31.10.0/24 name-server 172.31.8.5
set system services dhcp pool 172.31.10.0/24 name-server 8.8.8.8
set system services dhcp pool 172.31.10.0/24 router 172.31.10.1
set system services dhcp pool 172.31.10.0/24 propagate-settings fe-0/0/2.0
set interfaces ge-0/0/0 unit 0 description "#CRYPTO#"
set interfaces ge-0/0/0 unit 0 family inet address 172.31.15.1/29
set interfaces gr-0/0/0 unit 0 description set
set interfaces gr-0/0/0 unit 0 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 0 tunnel destination 172.31.0.150
set interfaces gr-0/0/0 unit 0 family inet mtu 1400
set interfaces gr-0/0/0 unit 0 family inet address 172.31.57.1/30
set interfaces gr-0/0/0 unit 1 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 1 tunnel destination 172.31.0.129
set interfaces gr-0/0/0 unit 1 family inet mtu 1400
set interfaces gr-0/0/0 unit 1 family inet address 172.31.19.5/30
set interfaces gr-0/0/0 unit 2 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 2 tunnel destination 172.31.0.132
set interfaces gr-0/0/0 unit 2 family inet mtu 1400
set interfaces gr-0/0/0 unit 2 family inet address 172.31.31.5/30
set interfaces gr-0/0/0 unit 3 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 3 tunnel destination 172.31.0.133
set interfaces gr-0/0/0 unit 3 family inet mtu 1400
set interfaces gr-0/0/0 unit 3 family inet address 172.31.35.5/30
set interfaces gr-0/0/0 unit 4 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 4 tunnel destination 172.31.0.134
set interfaces gr-0/0/0 unit 4 family inet mtu 1400
set interfaces gr-0/0/0 unit 4 family inet address 172.31.39.5/30
set interfaces gr-0/0/0 unit 5 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 5 tunnel destination 172.31.0.135
set interfaces gr-0/0/0 unit 5 family inet mtu 1400
set interfaces gr-0/0/0 unit 5 family inet address 172.31.43.5/30
set interfaces gr-0/0/0 unit 6 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 6 tunnel destination 172.31.0.136
set interfaces gr-0/0/0 unit 6 family inet mtu 1400
set interfaces gr-0/0/0 unit 6 family inet address 172.31.47.5/30
set interfaces gr-0/0/0 unit 7 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 7 tunnel destination 172.31.0.142
set interfaces gr-0/0/0 unit 7 family inet mtu 1400
set interfaces gr-0/0/0 unit 7 family inet address 172.31.71.5/30
set interfaces gr-0/0/0 unit 8 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 8 tunnel destination 172.31.0.144
set interfaces gr-0/0/0 unit 8 family inet mtu 1400
set interfaces gr-0/0/0 unit 8 family inet address 172.31.79.5/30
set interfaces gr-0/0/0 unit 9 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 9 tunnel destination 172.31.0.130
set interfaces gr-0/0/0 unit 9 family inet mtu 1400
set interfaces gr-0/0/0 unit 9 family inet address 172.31.23.5/30
set interfaces gr-0/0/0 unit 10 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 10 tunnel destination 172.31.0.131
set interfaces gr-0/0/0 unit 10 family inet mtu 1400
set interfaces gr-0/0/0 unit 10 family inet address 172.31.27.5/30
set interfaces gr-0/0/0 unit 11 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 11 tunnel destination 10.0.2.14
set interfaces gr-0/0/0 unit 11 family inet mtu 1400
set interfaces gr-0/0/0 unit 11 family inet address 172.19.2.86/30
deactivate interfaces gr-0/0/0 unit 11
set interfaces gr-0/0/0 unit 12 tunnel source 172.31.0.128
set interfaces gr-0/0/0 unit 12 tunnel destination 172.31.0.137
set interfaces gr-0/0/0 unit 12 family inet mtu 1400
set interfaces gr-0/0/0 unit 12 family inet address 172.31.51.5/30
set interfaces ge-0/0/1 unit 0 description "#LAN_multibind#"
set interfaces ge-0/0/1 unit 0 family inet address 172.31.8.1/23
set interfaces fe-0/0/2 unit 0 description "#Remote_Clients#"
set interfaces fe-0/0/2 unit 0 family inet address 172.31.10.1/24
set interfaces fe-0/0/2 unit 0 family mpls
set interfaces fe-0/0/7 unit 0 family ethernet-switching port-mode trunk
set interfaces fe-0/0/7 unit 0 family ethernet-switching vlan members 666
set interfaces fe-0/0/7 unit 0 family ethernet-switching vlan members 667
set interfaces fe-0/0/7 unit 0 family ethernet-switching vlan members 668
set interfaces lo0 unit 0 family inet address 172.31.0.128/32
set interfaces vlan unit 666 family inet address 10.0.3.42/29
set interfaces vlan unit 667 family inet address 10.1.1.41/29
set interfaces vlan unit 668 family inet address 172.31.15.17/29
set routing-options static route 0.0.0.0/0 next-hop 172.31.15.2
set routing-options static route 10.2.0.8/30 next-hop 172.31.15.18
set routing-options static route 10.2.0.8/30 tag 1
set routing-options static route 10.231.201.128/25 next-hop 172.31.15.18
set routing-options static route 10.231.201.128/25 tag 1
set routing-options static route 172.16.0.0/14 next-hop 172.31.15.18
set routing-options static route 172.16.0.0/14 tag 1
set routing-options static route 172.17.22.0/24 next-hop 172.31.15.18
set routing-options static route 172.17.22.0/24 tag 1
set routing-options static route 172.31.0.0/24 next-hop 172.31.15.2
set routing-options static route 172.31.15.20/30 next-hop 172.31.15.2
set routing-options static route 172.31.56.0/24 next-hop 172.31.57.2
set routing-options static route 172.31.80.0/24 next-hop 172.31.8.5
set routing-options static route 172.31.80.0/24 tag 1
set routing-options static route 172.31.90.0/24 next-hop 172.31.8.27
set routing-options static route 172.31.90.0/24 tag 1
set protocols ospf export OSPF
set protocols ospf area 0.0.0.0 interface gr-0/0/0.0 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.1 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.2 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.3 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.4 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.5 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.6 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.7 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.8 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.9 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.10 interface-type p2p
set protocols ospf area 0.0.0.0 interface gr-0/0/0.11 interface-type p2p
deactivate protocols ospf area 0.0.0.0 interface gr-0/0/0.11
set protocols ospf area 0.0.0.0 interface gr-0/0/0.12 interface-type p2p
set protocols ospf area 172.31.8.0 area-range 172.16.0.0/14
set protocols ospf area 172.31.8.0 area-range 172.31.8.0/21
set protocols ospf area 172.31.8.0 interface ge-0/0/0.0 passive
set policy-options policy-statement OSPF term term1 from protocol static
set policy-options policy-statement OSPF term term1 from tag 1
set policy-options policy-statement OSPF term term1 then accept
set policy-options policy-statement OSPF term term2 then reject
Код: Выделить всё
/interface bridge
add name=loopback0
/interface ethernet
set [ find default-name=ether1 ] disable-running-check=no
set [ find default-name=ether2 ] disable-running-check=no
set [ find default-name=ether3 ] disable-running-check=no
set [ find default-name=ether4 ] disable-running-check=no
set [ find default-name=ether5 ] disable-running-check=no
set [ find default-name=ether6 ] disable-running-check=no
set [ find default-name=ether7 ] disable-running-check=no
/interface gre
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel1 remote-address=172.31.0.150
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel2 remote-address=172.31.0.129
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel3 remote-address=172.31.0.132
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel4 remote-address=172.31.0.133
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel5 remote-address=172.31.0.134
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel6 remote-address=172.31.0.135
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel7 remote-address=172.31.0.136
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel8 remote-address=172.31.0.142
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel9 remote-address=172.31.0.144
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel10 remote-address=172.31.0.130
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel11 remote-address=172.31.0.131
add local-address=172.31.0.128 mtu=1400 name=gre-tunnel12 remote-address=172.31.0.137
/interface vlan
add interface=ether5 name=666 vlan-id=666
add interface=ether5 name=667 vlan-id=667
add interface=ether5 name=668 vlan-id=668
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=LAN_POOL ranges=172.31.8.31-172.31.9.254
add name=Remoute_lan ranges=172.31.10.31-172.31.10.254
/ip dhcp-server
add address-pool=LAN_POOL disabled=no interface=ether3 lease-time=4w2d10m name=LAN_DHCP
add address-pool=Remoute_lan disabled=no interface=ether4 lease-time=4w2d10m name=remoute_dhcp
/routing ospf area
add area-id=172.31.8.0 name=area1
/routing ospf instance
set [ find default=yes ] name=30 redistribute-static=as-type-1 routing-table="tag 1"
/ip address
add address=172.31.15.1/29 comment=#CRYPTO# interface=ether2 network=172.31.15.0
add address=172.31.8.1/23 comment=#LAN_multibind# interface=ether3 network=172.31.8.0
add address=172.31.10.1/24 comment=#Remote_Clients# interface=ether4 network=172.31.10.0
add address=172.31.0.128 interface=loopback0 network=172.31.0.128
add address=10.0.3.42/29 interface=666 network=10.0.3.40
add address=10.1.1.41/29 interface=667 network=10.1.1.40
add address=172.31.15.17/29 interface=668 network=172.31.15.16
add address=172.31.57.1/30 interface=gre-tunnel1 network=172.31.57.0
add address=192.168.0.2/24 interface=ether1 network=192.168.0.0
add address=172.31.19.5/30 interface=gre-tunnel2 network=172.31.19.4
add address=172.31.31.5/30 interface=gre-tunnel3 network=172.31.31.4
add address=172.31.35.5/30 interface=gre-tunnel4 network=172.31.35.4
add address=172.31.39.5/30 interface=gre-tunnel5 network=172.31.39.4
add address=172.31.43.5/30 interface=gre-tunnel6 network=172.31.43.4
add address=172.31.47.5/30 interface=gre-tunnel7 network=172.31.47.4
add address=172.31.71.5/30 interface=gre-tunnel8 network=172.31.71.4
add address=172.31.79.5/30 interface=gre-tunnel9 network=172.31.79.4
add address=172.31.23.5/30 interface=gre-tunnel10 network=172.31.23.4
add address=172.31.27.5/30 interface=gre-tunnel11 network=172.31.27.4
add address=172.31.51.5/30 interface=gre-tunnel12 network=172.31.51.4
/ip dhcp-client
add disabled=no interface=ether1
/ip dhcp-server network
add address=172.31.8.0/23 dns-server=172.31.8.5,8.8.8.8 gateway=172.31.8.1 netmask=23
add address=172.31.10.0/24 dns-server=172.31.8.5,8.8.8.8 gateway=172.31.10.1 netmask=24
/ip route
add distance=1 dst-address=10.2.0.8/30 gateway=172.31.15.18 routing-mark="tag 1"
add distance=1 gateway=172.31.15.2
/ip route vrf
add routing-mark="tag 1"
/routing ospf area range
add area=area1 range=172.16.0.0/14
add area=area1 range=172.31.8.0/21
/routing ospf interface
add instance-id=30 interface=gre-tunnel1 network-type=point-to-point
add instance-id=30 interface=gre-tunnel2 network-type=point-to-point
add instance-id=30 interface=gre-tunnel3 network-type=point-to-point
add instance-id=30 interface=gre-tunnel4 network-type=point-to-point
add instance-id=30 interface=gre-tunnel5 network-type=point-to-point
add instance-id=30 interface=gre-tunnel6 network-type=point-to-point
add instance-id=30 interface=gre-tunnel7 network-type=point-to-point
add instance-id=30 interface=gre-tunnel8 network-type=point-to-point
add instance-id=30 interface=gre-tunnel9 network-type=point-to-point
add instance-id=30 interface=gre-tunnel10 network-type=point-to-point
add instance-id=30 interface=gre-tunnel11 network-type=point-to-point
add instance-id=30 interface=gre-tunnel12 network-type=point-to-point
add instance-id=30 interface=ether2 passive=yes