Перейти к основному содержимому

Route Reflector

Конфигурации в этом разделе применяются к BGP Route Reflectors (RR).

Сокращение iBGP Mesh внутри автономной системы

Используйте Route Reflectors для сокращения iBGP mesh внутри автономной системы (AS).

Топология

В этом примере SW2, SW5 и SW4 должны поддерживать полносвязную mesh-сеть между собой, но, сделав SW5 Route Reflector, SW2 (Client1) устанавливает iBGP-сессию только с RR, но не с SW4 (Client 2). Маршруты, полученные от SW2, передаются другим клиентам и iBGP-пирам за пределами кластера; iBGP-маршруты, полученные от iBGP-пиров за пределами кластера, передаются SW2. Это сокращает количество iBGP-пирингов в AS1.

Image

Рисунок 7-105: BGP Route Reflector

RR (SW5)

#configure terminalПерейти в режим конфигурации.
(config)#router bgp 1Определить процесс маршрутизации. Число 1 идентифицирует номер AS для SW5.
(config-router)#neighbor 10.10.10.50 remoteas 1Определить BGP-соседа и установить TCP-сессию. 10.10.10.50 — это IP-адрес одного из соседей (SW2), а 1 — номер AS соседа.
(config-router)#neighbor 10.10.10.50 routereflector-clientНастроить SW5 как Route Reflector (RR) и соседа SW2 как его клиента.
(config-router)#neighbor 10.10.11.50 remoteas 1Определить BGP-соседа и установить TCP-сессию. 10.10.11.50 — это IP-адрес одного из соседей (SW4), а 1 — номер AS соседа.
(config-router)#neighbor 10.10.11.50 routereflector-clientНастроить SW5 как Route Reflector (RR) и соседа SW4 как его клиента.
(config-router)#exitВыйти из режима маршрутизатора.

RR Client 1 (SW2)

(config)#router bgp 1Определить процесс маршрутизации. Число 1 указывает номер AS для SW2.
(config-router)#neighbor 10.10.10.10 remoteas 1Определить BGP-соседа и установить TCP-сессию. 10.10.10.10 — это IP-адрес соседа (SW5), а 1 — номер AS соседа.
(config-router)#exitВыйти из режима маршрутизатора.

RR Client 2 (SW4)

(config)#router bgp 1Определить процесс маршрутизации. Число 1 идентифицирует номер AS для SW4.
(config-router)#neighbor 10.10.11.10 remoteas 1Определить BGP-соседа и установить TCP-сессию. 10.10.11.10 — это IP-адрес соседа (SW5), а 1 — номер AS соседа.
(config-router)#exitВыйти из режима маршрутизатора.
Проверка

SW5

#sh ip bgp neighbors
BGP neighbor is 10.10.10.50, remote AS 1, local AS 1, internal link
BGP version 4, remote router ID 10.12.4.152   local router ID 192.160.50.3
BGP state = Established, up for 00:01:04
Last read 00:01:04, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 4 messages, 0 notifications, 0 in queue
Sent 4 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Route-Reflector Client
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.10.10.10, Local port: 47983
Foreign host: 10.10.10.50, Foreign port: 179
Nexthop: 10.10.10.10
Nexthop global: fe80::a00:27ff:fe09:fd25
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is 10.10.11.50, remote AS 1, local AS 1, internal link
BGP version 4, remote router ID 10.12.4.197
local router ID 192.160.50.3
BGP state = Established, up for 00:01:04
Last read 00:01:04, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 4 messages, 0 notifications, 0 in queue
Sent 4 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Route-Reflector Client
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.10.11.10, Local port: 39851
Foreign host: 10.10.11.50, Foreign port: 179
Nexthop: 10.10.11.10
Nexthop global: fe80::a00:27ff:fe52:45f6
Nexthop local: ::
BGP connection: non shared network

SW3

#sh ip bgp neighbors
BGP neighbor is 10.10.11.10, remote AS 1, local AS 1, internal link
BGP version 4, remote router ID 10.12.4.185   local router ID 192.160.50.4
BGP state = Established, up for 00:00:56
Last read 00:00:56, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 3 messages, 0 notifications, 0 in queue
Sent 3 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.10.11.50, Local port: 179
Foreign host: 10.10.11.10, Foreign port: 39851
Nexthop: 10.10.11.50
Nexthop global: fe80::a00:27ff:fe42:fb7a
Nexthop local: ::
BGP connection: non shared network

SW2

#sh ip bgp neighbors
BGP neighbor is 10.10.10.10, remote AS 1, local AS 1, internal link
BGP version 4, remote router ID 10.12.4.185   local router ID 192.160.50.2
BGP state = Established, up for 00:01:23
Last read 00:01:23, hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
Route refresh: advertised and received (old and new)
Address family IPv4 Unicast: advertised and received
Received 4 messages, 0 notifications, 0 in queue
Sent 4 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 5 seconds
For address family: IPv4 Unicast
BGP table version 1, neighbor version 1
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 10.10.10.50, Local port: 179
Foreign host: 10.10.10.10, Foreign port: 47983
Nexthop: 10.10.10.50
Nexthop global: fe80::a00:27ff:fe9c:f35d
Nexthop local: ::
BGP connection: non shared network