This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
использование_протоколов_маршрутизации [2021/07/26 10:43] admin [Настройка UNIX] |
использование_протоколов_маршрутизации [2024/12/06 20:24] (current) val |
||
---|---|---|---|
Line 5: | Line 5: | ||
===== Статическая маршрутизация ===== | ===== Статическая маршрутизация ===== | ||
+ | <code> | ||
+ | gate.isp.un# ip route add 192.168.100+X.0/24 via 172.16.1.X | ||
+ | </code> | ||
==== Настройка маршрутизатора cisco ==== | ==== Настройка маршрутизатора cisco ==== | ||
<code> | <code> | ||
Line 14: | Line 17: | ||
[[Сервисы Gateway и routing#Добаление статических маршрутов на этапе загрузки]] | [[Сервисы Gateway и routing#Добаление статических маршрутов на этапе загрузки]] | ||
- | ===== Динамическая маршрутизация (OSPF) ===== | + | ===== Протокол OSPF ===== |
==== Подготовка маршрутизатора cisco ==== | ==== Подготовка маршрутизатора cisco ==== | ||
Line 23: | Line 26: | ||
==== Подготовка UNIX ==== | ==== Подготовка UNIX ==== | ||
- | !!! Не забыть про установку ПО !!! | + | * [[Сервисы Gateway и routing#Протокол OSPF]] - установка и базовая настройка и запуск |
<code> | <code> | ||
Line 46: | Line 49: | ||
==== Настройка UNIX ==== | ==== Настройка UNIX ==== | ||
- | [[Сервисы Gateway и routing#Протокол OSPF]] | + | * [[Сервисы Gateway и routing#Протокол OSPF]] |
<code> | <code> | ||
- | server### ifdown eth0 | + | linux# ###telnet localhost ospfd |
- | server# telnet localhost ospfd | + | linux# vtysh |
</code><code> | </code><code> | ||
router ospf | router ospf | ||
network 192.168.X.0/24 area 0 | network 192.168.X.0/24 area 0 | ||
redistribute connected | redistribute connected | ||
+ | </code><code> | ||
+ | frr# show ip ospf neighbor | ||
+ | |||
+ | frr# show ip route | ||
+ | </code><code> | ||
+ | linux# ip r | ||
</code> | </code> | ||
+ | |||
+ | ===== Протокол BGP ===== | ||
+ | |||
+ | ==== Cisco ==== | ||
+ | <code> | ||
+ | no router ospf 100 | ||
+ | |||
+ | router bgp 100+X | ||
+ | neighbor 192.168.X.10 remote-as 200+X | ||
+ | neighbor 192.168.X.10 default-originate | ||
+ | </code> | ||
+ | |||
+ | ==== frr ==== | ||
+ | |||
<code> | <code> | ||
- | server# telnet localhost ospfd | + | # cat /etc/frr/daemons |
</code><code> | </code><code> | ||
... | ... | ||
- | access-list ACL_IP_NET permit 192.168.100+X.0/24 | + | bgpd=yes |
+ | ... | ||
+ | </code><code> | ||
+ | # service frr restart | ||
- | route-map RM_IP_NET permit 1 | + | # vtysh |
- | match ip address ACL_IP_NET | + | </code><code> |
+ | router bgp 200+X | ||
+ | no bgp ebgp-requires-policy | ||
+ | neighbor 192.168.X.1 remote-as 100+X | ||
+ | redistribute connected | ||
+ | </code> | ||
- | router ospf | + | ==== Cisco/frr ==== |
- | network 192.168.X.0/24 area 0 | + | <code> |
- | redistribute connected route-map RM_IP_NET | + | # show ip bgp summary |
+ | |||
+ | # show ip route | ||
</code> | </code> | ||
+ |