# Network_Basic-Фадеев_Александр-Практика-3 ## Задание: - Настроить сетевое оборудование в зоне статической маршрутизации - Настроить статические маршруты на устройствах в зоне статической маршрутизации - Настроить сетевое оборудование в зоне OSPF - Настроить динамическую маршрутизацию в зоне OSPF - Настроить сетевое оборудование в зоне BGP - Настроить динамическую маршрутизацию в зоне BGP - Провести атаку с подменой маршрута в зоне OSPF - Провести атаку с подменой маршрута в зоне BGP* ### Конфигурацию любого одно маршрутизатора в каждой из зон маршрутизации (должно получиться 3 конфигурации роутеров) #### C-R-4, Static ```/= Current configuration : 1398 bytes ! version 15.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname C-R-4 ! boot-start-marker boot-end-marker ! ! ! no aaa new-model clock timezone EET 2 0 mmi polling-interval 60 no mmi auto-configure no mmi pvc mmi snmp-timeout 180 ! ... ! interface Ethernet0/0 ip address 10.0.2.4 255.255.255.0 ! interface Ethernet0/1 ip address 10.0.1.4 255.255.255.0 ! interface Ethernet0/2 no ip address ! interface Ethernet0/2.10 encapsulation dot1Q 10 ip address 192.168.10.254 255.255.255.0 ! interface Ethernet0/2.20 encapsulation dot1Q 20 ip address 192.168.20.254 255.255.255.0 ! interface Ethernet0/2.30 encapsulation dot1Q 30 ip address 192.168.30.254 255.255.255.0 ! ... ! no ip http server no ip http secure-server ip route 0.0.0.0 0.0.0.0 10.0.2.16 ip route 10.0.0.0 255.255.255.0 10.0.1.1 ! ... ``` #### M-R-10, OSPF ```/= # dec/10/2022 00:58:01 by RouterOS 6.47beta60 # software id = # # # /interface wireless security-profiles set [ find default=yes ] supplicant-identity=MikroTik /ip address add address=11.0.4.10/24 interface=ether2 network=11.0.4.0 add address=11.0.1.10/24 interface=ether1 network=11.0.1.0 /routing ospf network add area=backbone network=11.0.1.0/24 add area=backbone network=11.0.4.0/24 /system identity set name=MR10 ``` #### C-R-2, BGP ```/= Current configuration : 1573 bytes ! ! Last configuration change at 03:02:26 EET Sat Dec 10 2022 ! version 15.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname C-R-2 ! ... ! interface Ethernet0/0 ip address 12.0.5.2 255.255.255.0 ! interface Ethernet0/1 ip address 12.0.1.2 255.255.255.0 ! interface Ethernet0/2 ip address 12.0.2.2 255.255.255.0 ! interface Ethernet0/3 no ip address shutdown ! interface Ethernet1/0 no ip address shutdown ! interface Ethernet1/1 no ip address shutdown ! interface Ethernet1/2 no ip address shutdown ! interface Ethernet1/3 no ip address shutdown ! router bgp 100 bgp log-neighbor-changes network 12.0.1.0 mask 255.255.255.0 network 12.0.2.0 mask 255.255.255.0 network 12.0.5.0 mask 255.255.255.0 neighbor 12.0.1.6 remote-as 100 neighbor 12.0.1.6 route-reflector-client neighbor 12.0.1.6 next-hop-self neighbor 12.0.2.9 remote-as 100 neighbor 12.0.2.9 route-reflector-client neighbor 12.0.2.9 next-hop-self neighbor 12.0.5.7 remote-as 100 neighbor 12.0.5.7 route-reflector-client ! ... ``` ### Скрин работы утилиты ping между каждыми крайними маршрутизаторами (MR-12, MR-10, CR-6, LR-15) MR-12 -> LR-15 ![](https://i.imgur.com/IYGbWUM.png) ` ping 10.0.5.15 ` --- MR-12 -> MR-10 ![](https://i.imgur.com/bZwQMUz.png) ` ping 11.0.1.10 ` --- MR-12 -> CR-6 ![](https://i.imgur.com/xQtWwEc.png) --- LR-15 -> CR-6 ![](https://i.imgur.com/tRRGdnp.png) --- LR-15 -> MR-10 ![](https://i.imgur.com/UAuYfMO.png) --- CR-6 -> MR-10 ![](https://i.imgur.com/pWxQeru.png) --- ### атака на OSPF ![](https://i.imgur.com/ZxIyYQz.png) получен fake маршрут ![](https://i.imgur.com/XQy7doh.png) ![](https://i.imgur.com/R66KKUE.png) ### Скрин успешной атаки на BGP (если у вас получилось реализовать атаку), а также идею реализации атаки Из-за особенностей работы протокола bgp, а именно необходимость указывать на роутерах адреса соседей, не удается провести атаку с подменной маршрута. ![](https://i.imgur.com/mDdwSD4.png) ![](https://i.imgur.com/0QapLLY.png) ![](https://i.imgur.com/yu1FOy2.png) ![](https://i.imgur.com/MNuCQCi.png) В теории, атака может пройти успешно, если соединить наш fake router с другими роутерами, а не вклинивать его между двумя.