This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
использование_протоколов_маршрутизации [2021/07/26 11:41] admin |
использование_протоколов_маршрутизации [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 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> | ||
- | server# telnet localhost ospfd | ||
</code><code> | </code><code> | ||
- | ! access-list ACL_IP_NET permit 192.168.100+X.0/24 | + | frr# show ip ospf neighbor |
- | ! route-map RM_IP_NET permit 1 | + | frr# show ip route |
- | ! match ip address ACL_IP_NET | + | |
- | + | ||
- | router ospf | + | |
- | network 192.168.X.0/24 area 0 | + | |
- | redistribute connected ! route-map RM_IP_NET | + | |
- | + | ||
- | service_ospfd# show ip ospf neighbor | + | |
- | </code><code> | + | |
- | server# telnet localhost zebra | + | |
</code><code> | </code><code> | ||
- | service_zebra# show ip route | + | linux# ip r |
</code> | </code> | ||
Line 80: | Line 71: | ||
==== Cisco ==== | ==== Cisco ==== | ||
<code> | <code> | ||
+ | no router ospf 100 | ||
+ | |||
router bgp 100+X | router bgp 100+X | ||
- | network 192.168.X.0 mask 255.255.255.0 | ||
- | redistribute connected | ||
neighbor 192.168.X.10 remote-as 200+X | neighbor 192.168.X.10 remote-as 200+X | ||
neighbor 192.168.X.10 default-originate | neighbor 192.168.X.10 default-originate | ||
</code> | </code> | ||
- | ==== Zebra ==== | + | ==== frr ==== |
- | + | ||
- | * [[https://docstore.mik.ua/manuals/ru/LARTC/x3036.html|Настройка BGP4 с помощью Zebra]] | + | |
<code> | <code> | ||
+ | # cat /etc/frr/daemons | ||
+ | </code><code> | ||
+ | ... | ||
+ | bgpd=yes | ||
+ | ... | ||
+ | </code><code> | ||
+ | # service frr restart | ||
+ | |||
+ | # vtysh | ||
+ | </code><code> | ||
router bgp 200+X | router bgp 200+X | ||
- | network 192.168.X.0/24 | + | no bgp ebgp-requires-policy |
- | redistribute connected | + | |
neighbor 192.168.X.1 remote-as 100+X | neighbor 192.168.X.1 remote-as 100+X | ||
+ | redistribute connected | ||
</code> | </code> | ||
+ | |||
+ | ==== Cisco/frr ==== | ||
+ | <code> | ||
+ | # show ip bgp summary | ||
+ | |||
+ | # show ip route | ||
+ | </code> | ||
+ |