Два провайдера, у каждого свои ресурсы.

Обсуждение оборудования и его настройки
lazarevkirill
Сообщения: 18
Зарегистрирован: 19 фев 2014, 09:57

Добрый день. Настраивал микротик по статье http://habrahabr.ru/post/186284/. Только в моей схеме два провайдера и две сети.
После настройки появилась пара неприятных вещей.
Во-первых, отвалился PPTP сервер - стал недоступен по таймауту просто.
Во-вторых, при заходе по доменному имени, которое сидит на ip второго провайдера, из внутренней сети один пользователь попадает на веб морду микротика вместо веб морды сайта. С внешки все работает. Сам сервер сайта находится во второй локальной сети.
В-третьих, стал тупить обмен между однолокальной сетью и второй. В частности, передаются файлы медленно, с задержкой. Такое ощущение, что роутер думает что с этим пакетом делать. Причем, думает прилично, а потом начинает посылать куда надо при этом возникает задержка на секунду где то.
Подскажите в какую сторону копать, чтоб исправить положение?
Необходимые листинги конфигов могу предоставить.

 конфиг
[admin@MikroTik] > /export compact
# jan/07/1970 03:17:21 by RouterOS 6.9
# software id = 2MGC-QG35
#
/interface bridge
add arp=proxy-arp l2mtu=1590 name=GLOBAL_BRIDGE
/interface ethernet
set [ find default-name=ether1 ] comment=MTS speed=1Gbps
set [ find default-name=ether2 ] comment=GLOBAL speed=1Gbps
set [ find default-name=ether3 ] arp=proxy-arp comment=VMWARE speed=1Gbps
set [ find default-name=ether4 ] comment=MULTICAST speed=1Gbps
set [ find default-name=ether5 ] arp=proxy-arp comment=LAN speed=1Gbps
set [ find default-name=ether6 ] speed=1Gbps
set [ find default-name=ether7 ] speed=1Gbps
set [ find default-name=ether8 ] speed=1Gbps
set [ find default-name=ether9 ] speed=1Gbps
set [ find default-name=ether10 ] speed=1Gbps
set [ find default-name=ether11 ] speed=1Gbps
set [ find default-name=ether12 ] speed=1Gbps
/ip neighbor discovery
set ether1 comment=MTS
set ether2 comment=GLOBAL
set ether3 comment=VMWARE
set ether4 comment=MULTICAST
set ether5 comment=LAN
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
mac-cookie-timeout=3d
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/ip pool
add name=pool_dhcp ranges=192.168.1.0-192.168.1.181
add name=pool_PPPOE ranges=172.16.0.0/24
add name=l2tp-pool ranges=192.168.254.2-192.168.254.62
add name=pool_pptp ranges=192.168.1.182-192.168.1.199
add name=Global_Bridge ranges=10.0.0.2-10.0.0.254
add name=dhcp_pool1 ranges=10.0.0.2-10.0.0.254
/ip dhcp-server
add address-pool=pool_dhcp disabled=no interface=ether5 name=server1
add address-pool=dhcp_pool1 disabled=no interface=GLOBAL_BRIDGE name=dhcp1
/port
set 0 name=serial0
set 1 name=serial1
/ppp profile
add dns-server=192.168.1.252 local-address=pool_pptp name=PPTP \
remote-address=pool_pptp
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=100
/interface bridge port
add bridge=GLOBAL_BRIDGE interface=ether6
add bridge=GLOBAL_BRIDGE interface=ether7
add bridge=GLOBAL_BRIDGE interface=ether3
/interface l2tp-server server
set authentication=mschap2 default-profile=default keepalive-timeout=15 \
max-mru=1418 max-mtu=1418
/interface pptp-server server
set default-profile=PPTP enabled=yes
/ip address
add address=192.168.1.252/24 comment=LAN interface=ether5 network=192.168.1.0
add address=195.34.18.18/29 comment=MTS interface=ether1 network=195.34.18.16
add address=80.252.24.208/26 comment="GLOBAL TELLECOM" interface=ether2 \
network=80.252.24.192
add address=192.168.240.1/24 comment=MULTICAST interface=ether4 network=\
192.168.240.0
add address=80.252.24.231/32 interface=ether2 network=80.252.24.231
add address=80.252.24.232/32 interface=ether2 network=80.252.24.232
add address=80.252.24.233/32 interface=ether2 network=80.252.24.233
add address=80.252.24.234/32 interface=ether2 network=80.252.24.234
add address=80.252.24.211/32 interface=ether2 network=80.252.24.211
add address=10.0.0.1/24 interface=GLOBAL_BRIDGE network=10.0.0.0
add address=80.252.24.209/32 interface=ether2 network=80.252.24.209
add address=80.252.24.210/32 interface=ether2 network=80.252.24.210
/ip arp
add address=192.168.1.2 disabled=yes interface=ether5 mac-address=\
00:1F:C6:17:F9:BA
add address=192.168.1.253 interface=ether5 mac-address=00:11:32:08:33:81
add address=192.168.1.46 interface=ether5 mac-address=00:18:F3:CD:81:04
add address=192.168.1.3 interface=ether5 mac-address=00:19:99:C0:D8:EB
add address=192.168.1.17 comment="laki nout" interface=ether5 mac-address=\
5C:9A:D8:E8:E8:F5
/ip dhcp-server network
add address=10.0.0.0/24 dns-server=10.0.0.1,80.252.20.2,80.252.24.193 \
gateway=10.0.0.1
add address=172.16.0.0/24 dns-server=192.168.1.141 gateway=192.168.1.252
add address=192.168.1.0/24 dns-server=\
192.168.1.141,192.168.1.250,192.168.1.252 gateway=192.168.1.252
/ip dns
set allow-remote-requests=yes servers=\
83.242.248.6,83.242.249.6,80.252.16.130,80.252.20.2
/ip firewall address-list
add address=192.168.1.17 list=Torrent
add address=192.168.1.253 list=Torrent
add address=192.168.1.46 list=Torrent
add address=192.168.1.3 list=Torrent
add address=85.113.55.134 list=PPTP
add address=46.0.192.86 list=PPTP
add address=192.168.1.0/24 list=lan
add address=10.0.0.0/24 list=lan
add address=5.9.57.135 list=FastVPS
add address=78.46.196.114 list=FastVPS
/ip firewall filter
add chain=input comment="PPTP Server" dst-port=1723 protocol=tcp \
src-address-list=PPTP
add chain=input comment="PPTP Connection" protocol=gre
add chain=forward comment=DEV.TRKTERRA.RU dst-address=10.0.0.101 dst-port=\
8080 in-interface=ether2 protocol=tcp
add chain=forward comment=DEV.TRKTERRA.RU dst-address=10.0.0.101 dst-port=80 \
in-interface=ether2 protocol=tcp
add chain=forward comment=OnlineTerra dst-address=10.0.0.2 dst-port=1234 \
in-interface=ether2 protocol=tcp src-address-list=FastVPS
add chain=forward comment=OnlineRR dst-address=10.0.0.10 dst-port=1236 \
in-interface=ether2 protocol=tcp src-address-list=FastVPS
add chain=forward comment=OnlineDFM dst-address=10.0.0.10 dst-port=1238 \
in-interface=ether2 protocol=tcp src-address-list=FastVPS
add chain=forward comment=FTP dst-address=192.168.1.253 dst-port=20 \
in-interface=ether1 protocol=tcp
add chain=forward comment=FTP dst-address=192.168.1.253 dst-port=21 \
in-interface=ether1 protocol=tcp
add chain=forward comment=FTP dst-address=192.168.1.253 dst-port=55536-55567 \
in-interface=ether1 protocol=tcp
add action=drop chain=input dst-port=53 in-interface=ether1 protocol=udp
add action=drop chain=input dst-port=53 in-interface=ether2 protocol=udp
add action=drop chain=forward p2p=all-p2p src-address-list=!Torrent
add action=drop chain=forward content="\r\
\nInfohash: " dst-port=6771 in-interface=ether5 protocol=udp \
src-address-list=!Torrent
add action=drop chain=forward content=d1:ad2:id20: dst-port=1025-65535 \
in-interface=ether5 packet-size=95-190 protocol=udp src-address-list=\
!Torrent
add action=drop chain=forward content="info_hash=" dst-port=2710,80 \
in-interface=ether5 protocol=tcp src-address-list=!Torrent
add chain=forward comment=NOD dst-address=192.168.1.141 dst-port=2221 \
in-interface=ether1 protocol=tcp
add chain=input dst-port=22 protocol=tcp src-address-list=!ip_address_allow
add chain=input dst-port=8291 protocol=tcp src-address-list=!ip_address_allow
add chain=input dst-port=80 protocol=tcp src-address-list=!ip_address_allow
add chain=input protocol=icmp
add chain=forward protocol=icmp
add chain=input connection-state=established
add chain=forward connection-state=established
add chain=input connection-state=related
add chain=forward connection-state=related
add action=drop chain=input connection-state=invalid
add action=drop chain=forward connection-state=invalid
add chain=input protocol=udp
add chain=forward protocol=udp
add chain=forward src-address-list=lan
add chain=input src-address-list=lan
add action=drop chain=input
add action=drop chain=forward
/ip firewall mangle
add action=mark-connection chain=input comment=MTS connection-mark=MTS \
dst-address=195.34.18.18 in-interface=ether1 new-connection-mark=MTS \
passthrough=no
add action=mark-routing chain=output comment=MTS connection-mark=MTS \
new-routing-mark=MTS passthrough=no
add action=mark-connection chain=input comment=GLOBAL dst-address=\
80.252.24.208 in-interface=ether2 new-connection-mark=GLOBAL passthrough=\
no
add action=mark-routing chain=output comment=GLOBAL connection-mark=GLOBAL \
new-routing-mark=GLOBAL passthrough=no
add action=mark-routing chain=prerouting dst-address-list=!lan \
new-routing-mark=LAN passthrough=no src-address=192.168.1.0/24
add action=mark-routing chain=prerouting dst-address-list=!lan \
new-routing-mark=VMWARE passthrough=no src-address=10.0.0.0/24
/ip firewall nat
add action=masquerade chain=srcnat comment=MTS out-interface=ether1
add action=masquerade chain=srcnat comment=GLOBAL out-interface=ether2
add action=dst-nat chain=dstnat comment=DEV.TRKTERRA.RU dst-address=\
80.252.24.209 dst-port=80 in-interface=ether2 protocol=tcp to-addresses=\
10.0.0.101 to-ports=80
add action=dst-nat chain=dstnat comment=DEV.TRKTERRA.RU dst-address=\
80.252.24.209 dst-port=8080 in-interface=ether2 protocol=tcp \
to-addresses=10.0.0.101 to-ports=8080
add action=dst-nat chain=dstnat comment=OnlineTerra dst-address=80.252.24.210 \
dst-port=1234 in-interface=ether2 protocol=tcp src-address-list=FastVPS \
to-addresses=10.0.0.2 to-ports=1234
add action=dst-nat chain=dstnat comment=OnlineRR dst-address=80.252.24.210 \
dst-port=1236 in-interface=ether2 protocol=tcp src-address-list=FastVPS \
to-addresses=10.0.0.10 to-ports=1236
add action=dst-nat chain=dstnat comment=OnlineDFM dst-address=80.252.24.210 \
dst-port=1238 in-interface=ether2 protocol=tcp src-address-list=FastVPS \
to-addresses=10.0.0.10 to-ports=1238
add action=dst-nat chain=dstnat comment=FTP dst-port=20 in-interface=ether1 \
protocol=tcp to-addresses=192.168.1.253 to-ports=20
add action=dst-nat chain=dstnat comment=FTP dst-port=21 in-interface=ether1 \
protocol=tcp to-addresses=192.168.1.253 to-ports=21
add action=dst-nat chain=dstnat comment=FTP dst-port=55536-55567 \
in-interface=ether1 protocol=tcp to-addresses=192.168.1.253 to-ports=\
55536-55567
add action=dst-nat chain=dstnat comment=NOD dst-port=2221 in-interface=ether1 \
protocol=tcp to-addresses=192.168.1.141 to-ports=2221
/ip firewall service-port
set ftp disabled=yes ports=19
set tftp disabled=yes
set irc disabled=yes
set h323 disabled=yes
set sip disabled=yes
/ip route
add check-gateway=arp distance=1 gateway=195.34.18.17 routing-mark=LAN
add check-gateway=arp distance=2 gateway=80.252.24.193 routing-mark=LAN
add distance=1 gateway=80.252.24.193 routing-mark=VMWARE
/ip service
set telnet disabled=yes
set ftp disabled=yes port=19
set www address=85.113.55.134/32,192.168.1.0/24
set ssh address=85.113.55.134/32,192.168.1.0/24
set api disabled=yes
set winbox address=85.113.55.134/32,192.168.1.0/24,46.0.192.86/32
set api-ssl disabled=yes
/ip upnp
set allow-disable-external-interface=no enabled=yes
/ip upnp interfaces
add interface=ether1 type=external
add disabled=yes interface=ether2 type=external
add interface=ether5 type=internal
/lcd
set default-screen=informative-slideshow
/lcd interface
set ether1 interface=ether1
set ether2 interface=ether2
set ether3 interface=ether3
set ether4 interface=ether4
set ether5 interface=ether5
set ether6 interface=ether6
set ether7 interface=ether7
set ether8 interface=ether8
set ether9 interface=ether9
set ether10 interface=ether10
set ether11 interface=ether11
set ether12 interface=ether12
/routing igmp-proxy interface
add interface=ether4 upstream=yes
add
/routing igmp-proxy mfc
add downstream-interfaces=ether5 group=239.0.0.1 source=192.168.240.100 \
upstream-interface=ether4
add downstream-interfaces=ether5 group=239.0.0.2 source=192.168.240.100 \
upstream-interface=ether4
add downstream-interfaces=ether5 group=239.0.0.3 source=192.168.240.102 \
upstream-interface=ether4
/system clock
set time-zone-name=Europe/Samara
/system ntp client
set enabled=yes mode=unicast primary-ntp=91.207.136.50 secondary-ntp=\
217.147.208.1
/system routerboard settings
set cpu-frequency=1200MHz memory-frequency=1066DDR


vqd
Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

Код: Выделить всё

/ip firewall mangle
[b]add action=mark-connection chain=input comment=MTS connection-mark=MTS dst-address=195.34.18.18 in-interface=ether1 new-connection-mark=MTS  passthrough=no

add action=mark-routing chain=output comment=MTS connection-mark=MTS  new-routing-mark=MTS passthrough=no

add action=mark-connection chain=input comment=GLOBAL dst-address=80.252.24.208 in-interface=ether2 new-connection-mark=GLOBAL passthrough=no

add action=mark-routing chain=output comment=GLOBAL connection-mark=GLOBAL  new-routing-mark=GLOBAL passthrough=no[/b]

add action=mark-routing chain=prerouting dst-address-list=!lan new-routing-mark=LAN passthrough=no src-address=192.168.1.0/24

add action=mark-routing chain=prerouting dst-address-list=!lan new-routing-mark=VMWARE passthrough=no src-address=10.0.0.0/24


Код: Выделить всё

/ip route
add check-gateway=arp distance=1 gateway=195.34.18.17 routing-mark=LAN
add check-gateway=arp distance=2 gateway=80.252.24.193 routing-mark=LAN
add distance=1 gateway=80.252.24.193 routing-mark=VMWARE


Ну собственно вышеописанные симптомы потверждает


Есть интересная задача и бюджет? http://mikrotik.site
lazarevkirill
Сообщения: 18
Зарегистрирован: 19 фев 2014, 09:57

Добрый день. Согласен что задержка может быть из маркировки пакетов, но не понятно почему отвалился PPTP сервер и почему при обращении из подсети 192.168.х.х в сеть 10.х.х.х на 80 порт попадаем на веб морду роутера а не на адрес в сети 10.х.х.х


vqd
Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

Марки тут не причем. У вас в конфиге дофига всевозможных костылей. Честно говоря по конфигу больше вопросов чем ответов и на то что бы ваш конфиг разгрести уйдет довольно много времени.

Я бы взял ТЗ изначальное, снес бы все нафиг и настроил заново, это быстрее и проще.

Например я ни как не пойму что это

Код: Выделить всё

add address=80.252.24.231/32 interface=ether2 network=80.252.24.231
add address=80.252.24.232/32 interface=ether2 network=80.252.24.232
add address=80.252.24.233/32 interface=ether2 network=80.252.24.233
add address=80.252.24.234/32 interface=ether2 network=80.252.24.234
add address=80.252.24.211/32 interface=ether2 network=80.252.24.211
add address=80.252.24.209/32 interface=ether2 network=80.252.24.209
add address=80.252.24.210/32 interface=ether2 network=80.252.24.210


Есть интересная задача и бюджет? http://mikrotik.site
lazarevkirill
Сообщения: 18
Зарегистрирован: 19 фев 2014, 09:57

Это несколько адресов у сетевого интерфейса второго провайдера.


vqd
Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

это понятно, а почему маска 32-я то?


Есть интересная задача и бюджет? http://mikrotik.site
lazarevkirill
Сообщения: 18
Зарегистрирован: 19 фев 2014, 09:57

При задании адреса через маску типа 80.252.24.208/26 роутер не выходит в интернет через второго провайдера а начинате рассылать who-has arp запросы и все. Вылечилось только изменением маски.


vqd
Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

ну так а может стоит почитать про настройку микротика для работу с двумя и более провайдерами?


Есть интересная задача и бюджет? http://mikrotik.site
lazarevkirill
Сообщения: 18
Зарегистрирован: 19 фев 2014, 09:57

Ну вроде при настройке я руководствовался мануалам из сети если там была допущена ошибка или я что то сделал не так поправьте пожалуйста меня.


vqd
Модератор
Сообщения: 3605
Зарегистрирован: 26 сен 2013, 14:20
Откуда: НСК
Контактная информация:

Я уже написал свои мысли по вашему конфигу


Есть интересная задача и бюджет? http://mikrotik.site
Ответить