Jump to content

Recommended Posts

Posted

Добрый день

 

Есть несколько MT, соединенных в сеть.

На всех настроен RIP для динамической маршрутизации.

 

При этом есть необходимость фильтрации маршрутов в зависимости от подключенного MT.

 

Например:

Центральный MT (MTC)

/export compact

# may/13/2016 13:55:29 by RouterOS 6.35.2
# software id = 0XYZ-CFZR
#
/interface vlan
add interface=ether1 name=vl-mtc-11 vlan-id=11
add interface=ether1 name=vl-mtc-12 vlan-id=12
add interface=ether1 name=vl-mtc-13 vlan-id=13

/tool user-manager customer
set admin access=own-routers,own-users,own-profiles,own-limits,config-payment-gw

/ip address
add address=10.10.10.1/24 interface=ether1 network=10.10.10.0
add address=192.168.1.1/24 interface=vl-mtc-11 network=192.168.1.0
add address=192.168.2.1/24 interface=vl-mtc-12 network=192.168.2.0
add address=192.168.3.1/24 interface=vl-mtc-13 network=192.168.3.0

/routing filter
add action=accept chain=rip-out prefix=192.168.1.0/24
add action=accept chain=rip-out prefix=192.168.2.0/24
add action=discard chain=rip-out

/routing rip
set redistribute-connected=yes redistribute-static=yes

/routing rip interface
add receive=v2

/routing rip network
add network=10.10.10.0/24


/ip route> print
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
#      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
0 ADC  10.10.10.0/24      10.10.10.1      ether1                    0
1 ADC  192.168.1.0/24     192.168.1.1     vl-mtc-11                 0
2 ADC  192.168.2.0/24     192.168.2.1     vl-mtc-12                 0
3 ADC  192.168.3.0/24     192.168.3.1     vl-mtc-13                 0
4 ADr  192.168.10.0/24                    10.10.10.2              120
5 ADr  192.168.20.0/24                    10.10.10.2              120
6 ADr  192.168.30.0/24                    10.10.10.2              120
7 ADr  192.168.100.0/24                   10.10.10.3              120
8 ADr  192.168.200.0/24                   10.10.10.3              120
9 ADr  192.168.250.0/24                   10.10.10.3              120

 

MT1:

/export compact
# may/13/2016 13:58:35 by RouterOS 6.35.2
# software id = 0XYZ-CFZR
#
/interface vlan
add interface=ether1 name=vl-mt1-101 vlan-id=101
add interface=ether1 name=vl-mt1-102 vlan-id=102
add interface=ether1 name=vl-mt1-103 vlan-id=103

/ip address
add address=10.10.10.2/24 interface=ether1 network=10.10.10.0
add address=192.168.10.1/24 interface=vl-mt1-101 network=192.168.10.0
add address=192.168.20.1/24 interface=vl-mt1-102 network=192.168.20.0
add address=192.168.30.1/24 interface=vl-mt1-103 network=192.168.30.0

/routing rip
set redistribute-connected=yes redistribute-static=yes

/routing rip interface
add receive=v2
/routing rip network
add network=10.10.10.0/24


/ip route> print
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
#      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
0 ADC  10.10.10.0/24      10.10.10.2      ether1                    0
1 ADr  192.168.1.0/24                     10.10.10.1              120
2 ADr  192.168.2.0/24                     10.10.10.1              120
3 ADC  192.168.10.0/24    192.168.10.1    vl-mt1-101                0
4 ADC  192.168.20.0/24    192.168.20.1    vl-mt1-102                0
5 ADC  192.168.30.0/24    192.168.30.1    vl-mt1-103                0
6 ADr  192.168.100.0/24                   10.10.10.3              120
7 ADr  192.168.200.0/24                   10.10.10.3              120
8 ADr  192.168.250.0/24                   10.10.10.3              120

 

MT2:

/export compact
# may/13/2016 14:00:32 by RouterOS 6.35.2
# software id = 0XYZ-CFZR
#
/interface vlan
add interface=ether1 name=vl-mt2-1001 vlan-id=1001
add interface=ether1 name=vl-mt2-1002 vlan-id=1002
add interface=ether1 name=vl-mt2-1003 vlan-id=1003

/ip address
add address=10.10.10.3/24 interface=ether1 network=10.10.10.0
add address=192.168.100.1/24 interface=vl-mt2-1001 network=192.168.100.0
add address=192.168.200.1/24 interface=vl-mt2-1002 network=192.168.200.0
add address=192.168.250.1/24 interface=vl-mt2-1003 network=192.168.250.0

/routing rip
set redistribute-connected=yes redistribute-static=yes

/routing rip interface
add receive=v2

/routing rip network
add network=10.10.10.0/24

/ip route> print
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, 
B - blackhole, U - unreachable, P - prohibit 
#      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
0 ADC  10.10.10.0/24      10.10.10.3      ether1                    0
1 ADr  192.168.1.0/24                     10.10.10.1              120
2 ADr  192.168.2.0/24                     10.10.10.1              120
3 ADr  192.168.10.0/24                    10.10.10.2              120
4 ADr  192.168.20.0/24                    10.10.10.2              120
5 ADr  192.168.30.0/24                    10.10.10.2              120
6 ADC  192.168.100.0/24   192.168.100.1   vl-mt2-1001               0
7 ADC  192.168.200.0/24   192.168.200.1   vl-mt2-1002               0
8 ADC  192.168.250.0/24   192.168.250.1   vl-mt2-1003               0

 

Как можно ограничить передачу маршрутов, так, чтобы 192.168.1.0/24 пришел только на MT1, а 192.168.2.0/24 на MT2?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...
На сайте используются файлы cookie и сервисы аналитики для корректной работы форума и улучшения качества обслуживания. Продолжая использовать сайт, вы соглашаетесь с использованием файлов cookie и с Политикой конфиденциальности.