This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
использование_протоколов_маршрутизации [2022/03/15 15:17] val [Подготовка UNIX] |
использование_протоколов_маршрутизации [2024/12/06 20:24] (current) val |
||
---|---|---|---|
Line 6: | Line 6: | ||
<code> | <code> | ||
- | gate.isp.un# route add 192.168.100+X/24 172.16.1.X | + | gate.isp.un# ip route add 192.168.100+X.0/24 via 172.16.1.X |
</code> | </code> | ||
==== Настройка маршрутизатора cisco ==== | ==== Настройка маршрутизатора cisco ==== | ||
Line 26: | Line 26: | ||
==== Подготовка UNIX ==== | ==== Подготовка UNIX ==== | ||
- | * [[Сервисы Gateway и routing#Протокол OSPF]] - установка и базовая настройка ПО | + | * [[Сервисы Gateway и routing#Протокол OSPF]] - установка и базовая настройка и запуск |
<code> | <code> | ||
Line 52: | Line 52: | ||
<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 | + | |
- | ! 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 | + | frr# show ip route |
</code><code> | </code><code> | ||
linux# ip r | linux# ip r | ||
- | |||
- | freebsd# netstat -rn | ||
- | |||
- | server# telnet localhost zebra | ||
- | </code><code> | ||
- | service_zebra# show ip route | ||
</code> | </code> | ||
Line 87: | Line 71: | ||
==== Cisco ==== | ==== Cisco ==== | ||
<code> | <code> | ||
+ | no router ospf 100 | ||
+ | |||
router bgp 100+X | router bgp 100+X | ||
neighbor 192.168.X.10 remote-as 200+X | neighbor 192.168.X.10 remote-as 200+X | ||
Line 92: | Line 78: | ||
</code> | </code> | ||
- | ==== Zebra ==== | + | ==== frr ==== |
- | + | ||
- | * [[https://docstore.mik.ua/manuals/ru/LARTC/x3036.html|Настройка BGP4 с помощью Zebra]] | + | |
<code> | <code> | ||
- | # cat /etc/quagga/bgpd.conf | + | # cat /etc/frr/daemons |
</code><code> | </code><code> | ||
- | hostname service_bgpd | + | ... |
- | password zebra | + | bgpd=yes |
- | enable password zebra | + | ... |
+ | </code><code> | ||
+ | # service frr restart | ||
+ | # vtysh | ||
+ | </code><code> | ||
router bgp 200+X | router bgp 200+X | ||
- | redistribute connected | + | no bgp ebgp-requires-policy |
neighbor 192.168.X.1 remote-as 100+X | neighbor 192.168.X.1 remote-as 100+X | ||
+ | redistribute connected | ||
</code> | </code> | ||
- | ==== Cisco/Zebra ==== | + | ==== Cisco/frr ==== |
<code> | <code> | ||
# show ip bgp summary | # show ip bgp summary | ||
+ | |||
+ | # show ip route | ||
</code> | </code> | ||