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

BGP Конфедерации

В BGP узлы, работающие с протоколами iBGP, должны быть соединены, формируя полносвязную сеть. Конфедерация решает проблему сложности и неэффективности полносвязной сети iBGP, разделяя большую автономную систему на более мелкие автономные системы, называемые членами конфедерации. Члены конфедерации могут устанавливать соединения eBGP между собой, чтобы избежать полносвязных соединений между каждым узлом, работающим с iBGP.

Команда bgp confederation identifier сообщает маршрутизатору, что он является членом конфедерации, и задает идентификатор конфедерации. Команда bgp confederation peers перечисляет автономные системы-члены, с которыми маршрутизатор соединен. В следующем примере SW1, SW2 и SW3 являются членами одной конфедерации с разными номерами автономных систем.

Топология

Image

Рисунок 7-107: BGP Конфедерация

SW1

#configure terminalПерейти в режим конфигурации.
(config)#router bgp 400Назначить маршрутизатору номер автономной системы (ASN) (400).
(config-router)#bgp confederation identifier 1000Указать идентификатор конфедерации BGP, внешний номер автономной системы, который идентифицирует конфедерацию BGP в целом.
(config-router)#bgp confederation peers 7000Указать номер автономной системы соседа для членства в конфедерации.
(config-router)#neighbor 10.20.30.2 remote-as 7000Указать IP-адрес соседа (10.20.30.2) и номер автономной системы соседа (7000).
(config-router)#endВыйти из режима конфигурации маршрутизатора.

SW2

#configure terminalПерейти в режим конфигурации.
(config)#router bgp 7000Назначить маршрутизатору номер автономной системы (ASN) (7000).
(config-router)#bgp confederation identifier 1000Указать идентификатор конфедерации BGP.
(config-router)#bgp confederation peers 400 90Указать номера автономных систем соседей для членства в конфедерации.
(config-router)#neighbor 10.20.30.1 remote-as 400Указать IP-адрес соседа (10.20.30.1) и номер автономной системы соседа (400).
(config-router)#neighbor 11.20.30.30 remoteas 90Указать IP-адрес соседа (11.20.30.30) и номер автономной системы соседа (90).
(config-router)#endВыйти из режима конфигурации маршрутизатора.

SW3

#configure terminalПерейти в режим конфигурации.
(config-router)#router bgp 90Назначить маршрутизатору номер автономной системы (ASN) (90).
(config-router)#bgp confederation identifier 1000Указать идентификатор конфедерации BGP.
#configure terminalПерейти в режим конфигурации.
(config-router)#bgp confederation peers 7000Указать номер автономной системы соседа для членства в конфедерации.
(config-router)#neighbor 11.20.30.20 remote- as 7000Указать IP-адрес соседа (11.20.30.20) и номер автономной системы соседа (7000).
(config-router)#endВыйти из режима конфигурации маршрутизатора.
Проверка

SW2

#sh ip bgp summary
BGP router identifier 192.168.52.3, local AS number 7000
BGP table version is 1
0 BGP AS-PATH entries
0 BGP community entries
Neighbor                 V   AS   MsgRcv    MsgSen TblVer   InQ   OutQ    Up/ Down   State/PfxRcd
10.20.30.1               4   400    5          5       1      0      0  00:01:36               0
11.20.30.30              4    90    2          3       1      0      0  00:00:24               0
Total number of neighbors 2
Total number of Established sessions 2
#show ip bgp neighbors
BGP neighbor is 10.20.30.1, remote AS 400, local AS 7000, external link
BGP version 4, local router ID 192.168.52.3, remote router ID 192.168.52.2
Neighbor under common administration
BGP state = Established, up for 00:01:25
Last read 00:01:25, 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 30 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.20.30.2, Local port: 35108
Foreign host: 10.20.30.1, Foreign port: 179
Nexthop: 10.20.30.2
Nexthop global: fe80::a00:27ff:fe21:7ed2
Nexthop local: ::
BGP connection: non shared network
BGP neighbor is 11.20.30.30, remote AS 90, local AS 7000, external link
BGP version 4, remote router ID 192.168.56.103
Neighbor under common administration
BGP state = Established, up for 00:00:13
Last read 00:00:13, 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 2 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 30 seconds
For address family: IPv4 IPv4
BGP table version 1, neighbor version 1
Index 2, Offset 0, Mask 0x4
Community attribute sent to this neighbor (both)
0 accepted prefixes
0 announced prefixes
Connections established 1; dropped 0
Local host: 11.20.30.20, Local port: 179
Foreign host: 11.20.30.30, Foreign port: 33465
Nexthop: 11.20.30.20
Nexthop global: fe80::a00:27ff:fed0:57d1
Nexthop local: ::
BGP connection: non shared network

SW1

#show ip bgp neighbors
BGP neighbor is 10.20.30.2, remote AS 7000, local AS 400, external link
BGP version 4, local router ID 192.168.52.2, remote router ID 192.168.52.3
Neighbor under common administration
BGP state = Established, up for 00:01:51
Last read 00:01:51, 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 5 messages, 0 notifications, 0 in queue
Sent 6 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 seconds
For address family: IPv4 Unicast
BGP table version 3, neighbor version 3
Index 1, Offset 0, Mask 0x2
Community attribute sent to this neighbor (both)
0 accepted prefixes
0announced prefixes
Connections established 1; dropped 0
Local host: 10.20.30.1, Local port: 179
Foreign host: 10.20.30.2, Foreign port: 35108
Nexthop: 10.20.30.1
Nexthop global: fe80::a00:27ff:fe50:6a9b
Nexthop local: ::
BGP connection: non shared network
#sh ip bgp summary
BGP router identifier 192.168.52.3, local AS number 400
BGP table version is 3
1BGP AS-PATH entries
0 BGP community entries
Neighbor                 V   AS   MsgRcv    MsgSen TblVer   InQ   OutQ    Up/ Down   State/PfxRcd
10.20.30.2               4  7000    5          6       3      0      0  00:01:57               0
Total number of neighbors 1
Total number of Established sessions 1

SW3

#sh ip bgp neighbors
BGP neighbor is 11.20.30.20, remote AS 7000, local AS 90, external link
BGP version 4, local router ID 192.168.52.5, remote router ID 192.168.52.3
Neighbor under common administration
BGP state = Established, up for 00:00:04
Last read 00:00: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 2 messages, 0 notifications, 0 in queue
Sent 2 messages, 0 notifications, 0 in queue
Route refresh request: received 0, sent 0
Minimum time between advertisement runs is 30 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: 11.20.30.30, Local port: 33465
Foreign host: 11.20.30.20, Foreign port: 179
Nexthop: 11.20.30.30
Nexthop global: fe80::a00:27ff:fe24:5dc9
Nexthop local: ::
BGP connection: non shared network
#sh ip bgp summary
BGP router identifier 192.168.56.103, local AS number 90
BGP table version is 1
0 BGP AS-PATH entries
0 BGP community entries
Neighbor                 V   AS   MsgRcv    MsgSen TblVer   InQ   OutQ    Up/ Down   State/PfxRcd
11.20.30.20              4  7000    3          3       1      0      0  00:00:55               0
Total number of neighbors 1
Total number of Established sessions 1