Здесь показаны различия между двумя версиями данной страницы.
| Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
|
setup_bgp [26.01.2018 13:03] phantom [Оборудование MikroTik] |
setup_bgp [21.09.2022 10:48] (текущий) phantom [Оборудование MikroTik (RouterOS 7.x)] |
||
|---|---|---|---|
| Строка 1: | Строка 1: | ||
| - | |||
| - | |||
| - | |||
| ====== Облачный вариант ====== | ====== Облачный вариант ====== | ||
| Строка 130: | Строка 127: | ||
| </code> | </code> | ||
| - | ===== Оборудование MikroTik ===== | + | ===== Оборудование MikroTik (RouterOS 6.x) ===== |
| Туннели: | Туннели: | ||
| Строка 177: | Строка 174: | ||
| add instance=default remote-address=198.51.100.C \ | add instance=default remote-address=198.51.100.C \ | ||
| remote-as=64512 tcp-md5-key=<password> out-filter=CF-Out name=CF2 | remote-as=64512 tcp-md5-key=<password> out-filter=CF-Out name=CF2 | ||
| + | </code> | ||
| + | |||
| + | ===== Оборудование MikroTik (RouterOS 7.x) ===== | ||
| + | |||
| + | Туннели: | ||
| + | |||
| + | <code> | ||
| + | /interface ipip | ||
| + | add local-address=<local-ip> remote-address=<CF-remote-1> name=CF1 | ||
| + | add local-address=<local-ip> remote-address=<CF-remote-2> name=CF2 | ||
| + | |||
| + | /ip address | ||
| + | add address=198.51.100.B netmask=255.255.255.252 interface=CF1 | ||
| + | add address=198.51.100.D netmask=255.255.255.252 interface=CF2 | ||
| + | </code> | ||
| + | |||
| + | BGP: | ||
| + | |||
| + | <code> | ||
| + | # Настройка address-list с префиксами, которые будут анонсироваться | ||
| + | /ip firewall address-list | ||
| + | add list=CF-Out address=<prefix1> | ||
| + | add list=CF-Out address=<prefixN> | ||
| + | |||
| + | # Настройка blackhole для префиксов, которые будут анонсироваться | ||
| + | /ip route | ||
| + | add dst-address=<prefix1> blackhole | ||
| + | add dst-address=<prefixN> blackhole | ||
| + | |||
| + | # Настройка BGP пиров | ||
| + | /routing bgp connection | ||
| + | add name=CF1 as=<asn> remote.address=198.51.100.A remote.as=64512 output.network=CF-Out\ | ||
| + | tcp-md5-key=<password> local.role=ebgp-peer | ||
| + | add name=CF2 as=<asn> remote.address=198.51.100.C remote.as=64512 output.network=CF-Out\ | ||
| + | tcp-md5-key=<password> local.role=ebgp-peer | ||
| </code> | </code> | ||
| Строка 200: | Строка 232: | ||
| </code> | </code> | ||
| - | ===== Оборудование MikroTik ===== | + | ===== Оборудование MikroTik (RouterOS 6.x)===== |
| <code> | <code> | ||
| Строка 206: | Строка 238: | ||
| add instance=default remote-address=198.51.100.A multihop=yes\ | add instance=default remote-address=198.51.100.A multihop=yes\ | ||
| remote-as=64512 tcp-md5-key=<password> out-filter=CF-Out name=CF1 | remote-as=64512 tcp-md5-key=<password> out-filter=CF-Out name=CF1 | ||
| - | add instance=default remote-address=198.51.100.C multihop=yes\ | + | add instance=default remote-address=198.51.100.C multihop=yes\ |
| remote-as=64512 tcp-md5-key=<password> out-filter=CF-Out name=CF2 | remote-as=64512 tcp-md5-key=<password> out-filter=CF-Out name=CF2 | ||
| + | </code> | ||
| + | |||
| + | ===== Оборудование MikroTik (RouterOS 7.x)===== | ||
| + | |||
| + | <code> | ||
| + | /routing bgp connection | ||
| + | add name=CF1 as=<asn> remote.address=198.51.100.A remote.as=64512 output.network=CF-Out\ | ||
| + | multihop=yes tcp-md5-key=<password> local.role=ebgp-peer | ||
| + | add name=CF2 as=<asn> remote.address=198.51.100.C remote.as=64512 output.network=CF-Out\ | ||
| + | multihop=yes tcp-md5-key=<password> local.role=ebgp-peer | ||
| </code> | </code> | ||