# Бонусы

PBRВ режиме глобальной конфигурации.\
Добавляем маршрут по умолчанию:

```
ip route 0.0.0.0 0.0.0.0 10.0.1.1
```

В списке доступа отфильтровываем трафик из сети 192.168.2.0/24

```
access-list 101 permit ip 192.168.2.0 0.0.0.255 any
```

Создаём карту маршрутов, где обозначаем, что если пакет из сети 192.168.2.0/24, то для него назначить next-hop 10.0.2.1 (вместо 10.0.1.1)

```
route-map CLIENT permit 5
match ip address 101
set ip next-hop 10.0.2.1
```

Применяем карту на интерфейс:

```
ip policy route-map CLIENT
```

Это лишь одно из применений мощного инструмента Policy-Based Routing, который, к сожалению, ни в каком виде не реализован в РТ.

rate-limit

На том же примере ограничим скорость для сети 192.168.1.0/24 до 1.5 Мб/с, а для 192.168.2.0/24 до 64 кб/с.\
На 10.0.1.1 можно выполнить следующие команды:

```
Router(config)# access-list 100 permit ip 192.168.1.0 0.0.0.255 any
Router(config)# access-list 101 permit ip 192.168.2.0 0.0.0.255 any
Router(config)# interface fa0/0
Router(config-if)# rate-limit output access-group 100 1544000 64000 64000 conform-action transmit exceed-action drop
Router(config-if)# rate-limit output access-group 101 64000 16000 16000 conform-action transmit exceed-action drop
```


---

# 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/5.-acl-i-nat/04-bonus.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.
