# Практика

Поскольку мы имеем широковещательную L2 сеть на туннельных интерфейсах, указываем явно тип сети Broadcast на туннельных интерфейсах на всех узлах:

```
ip ospf network broadcast
```

Кроме того в такой сети должен выбираться DR. Логично, чтобы им стал хаб. Всем Spoke-маршрутизаторам запрещаем участие в выборах DR:

```
ip ospf priority 0
```

Ну и, естественно, определяем анонсируемые сети.

```
router ospf 1
network 172.16.0.0 0.0.255.255 area 0
```

Сети анонсируются:

> msk-arbat-gw1#sh ip route\
> \
> Gateway of last resort is 198.51.100.1 to network 0.0.0.0\
> \
> 172.16.0.0/16 is variably subnetted, 7 subnets, 3 masks\
> C 172.16.2.128/30 is directly connected, FastEthernet0/1.8\
> C 172.16.255.1/32 is directly connected, Loopback0\
> C 172.16.254.0/24 is directly connected, Tunnel0\
> C 172.16.2.32/30 is directly connected, FastEthernet0/1.7\
> C 172.16.2.16/30 is directly connected, FastEthernet0/1.5\
> C 172.16.2.0/30 is directly connected, FastEthernet0/1.4\
> O 172.16.255.128/32 \[110/11112] via 172.16.254.2, 00:05:14, Tunnel0\
> 198.51.100.0/28 is subnetted, 1 subnets\
> C 198.51.100.0 is directly connected, FastEthernet0/1.6\
> S\* 0.0.0.0/0 \[1/0] via 198.51.100.1

Пинг проходит

> msk-arbat-gw1#ping 172.16.255.128\
> \
> Type escape sequence to abort.\
> Sending 5, 100-byte ICMP Echos to 172.16.255.128, timeout is 2 seconds:\
> !!!\
> Success rate is 100 percent (5/5), round-trip min/avg/max = 60/70/80 ms

Вот так выглядят пакеты, передающиеся через сеть Интернет:

![](http://img-fotki.yandex.ru/get/4126/83739833.23/0_abbfe_750be85d_XXXL.jpg)\
\&#xNAN;*\* Дамп с nsk-obsea-gw1 fa0/0*

Проверяем, как у нас проходит пинг от одного филиала до другого:

> nsk-obsea-gw1#ping 172.16.255.132\
> \
> Type escape sequence to abort.\
> Sending 5, 100-byte ICMP Echos to 172.16.255.132, timeout is 2 seconds:\
> !!!\
> Success rate is 100 percent (5/5), round-trip min/avg/max = 132/231/492 ms\
> \
> nsk-obsea-gw1#traceroute 172.16.255.132\
> \
> Type escape sequence to abort.\
> Tracing the route to 172.16.255.132\
> \
> 1 172.16.254.3 240 msec \* 172 msec\
> \
> nsk-obsea-gw1#sh ip nhrp br\
> Target Via NBMA Mode Intfc Claimed\
> 172.16.254.1/32 172.16.254.1 198.51.100.2 static Tu0 < >\
> 172.16.254.3/32 172.16.254.3 198.51.102.2 dynamic Tu0 < >

Как видите пакеты не заходят на хаб, а идут напрямую сразу на маршрутизатор другого филиала через Интернет. Но действительность несколько сложнее.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://linkmeup.gitbook.io/sdsm/7.-vpn/5.-dmvpn/1.-ospf/0.-praktika.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
