CCIE考试学习BGP技术文档-BGP联盟-QYT培训认证
我将使用以下拓扑来介绍BGP联盟的实验:
上面的拓扑有AS 2,它分为两个子AS,AS 24和AS 35.还有AS 1,
与任何其他IBGP配置一样,最佳做法是为BGP sesssions使用环回接口。出于这个原因,我在AS 2中的所有路由器上创建了一个环回接口,我将使用OSPF来通告它们。具体的接口配置自己在做实验的时候可以自己参考的!这里就不一一列举接口配置的命令了!
OSPF配置
R2(config)#router ospf 1
R2(config-router)#network 192.168.23.0 0.0.0.255 area 0
R2(config-router)#network 192.168.24.0 0.0.0.255 area 0
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R3(config)#router ospf 1
R3(config-router)#network 192.168.23.0 0.0.0.255 area 0
R3(config-router)#network 192.168.35.0 0.0.0.255 area 0
R3(config-router)#network 3.3.3.3 0.0.0.0 area 0
R4(config)#router ospf 1
R4(config-router)#network 192.168.24.0 0.0.0.255 area 0
R4(config-router)#network 192.168.45.0 0.0.0.255 area 0
R4(config-router)#network 4.4.4.4 0.0.0.0 area 0
R5(config)#router ospf 1
R5(config-router)#network 192.168.35.0 0.0.0.255 area 0
R5(config-router)#network 192.168.45.0 0.0.0.255 area 0
R5(config-router)#network 5.5.5.5 0.0.0.0 area 0
现在我们可以担心BGP联盟配置。我将解释所有不同的步骤......
BGP联盟配置
让我们从R2开始:
R2(config)#router bgp 24
R2(config-router)#bgp confederation identifier 2
R2(config-router)#bgp confederation peers 35
R2(config-router)#neighbor 4.4.4.4 remote-as 24
R2(config-router)#neighbor 4.4.4.4 update-source loopback 0
R2(config-router)#neighbor 3.3.3.3 remote-as 35
R2(config-router)#neighbor 3.3.3.3 update-source loopback 0
R2(config-router)#neighbor 3.3.3.3 ebgp-multihop 2
R2的配置需要一些解释。首先,当您启动BGP进程时,您必须使用子AS的AS号。其次,您必须使用bgp confederation identifier命令告诉BGP主要AS号是什么。
我们还必须使用bgp confederation peers命令配置所有其他子AS号,在这种情况下只有AS 35.R4在同一子域中,因此您可以像任何其他IBGP邻居一样配置此邻居。虽然R3有点不同......因为它在另一个子AS中我们必须使用与EBGP相同的规则,这意味着如果你使用环回,则配置多跳。
我们来看看R3:
R3(config)#router bgp 35
R3(config-router)#bgp confederation identifier 2
R3(config-router)#bgp confederation peers 24
R3(config-router)#neighbor 2.2.2.2 remote-as 24
R3(config-router)#neighbor 2.2.2.2 update-source loopback 0
R3(config-router)#neighbor 2.2.2.2 ebgp-multihop 2
R3(config-router)#neighbor 5.5.5.5 remote-as 35
R3(config-router)#neighbor 5.5.5.5 update-source loopback 0
R3的配置类似于R2。我们将其配置为使用AS 35,而主AS为2.我们唯一的子AS对等体是24,并且我们有两个邻居...一个IBGP邻居和一个“EBGP”(联盟BGP)邻居。
R4和R5看起来几乎相同:
R4(config)#router bgp 24
R4(config-router)#bgp confederation identifier 2
R4(config-router)#bgp confederation peers 35
R4(config-router)#neighbor 2.2.2.2 remote-as 24
R4(config-router)#neighbor 2.2.2.2 update-source loopback 0
R4(config-router)#neighbor 5.5.5.5 remote-as 35
R4(config-router)#neighbor 5.5.5.5 update-source loopback 0
R4(config-router)#neighbor 5.5.5.5 ebgp-multihop 2
R5(config)#router bgp 35
R5(config-router)#bgp confederation identifier 2
R5(config-router)#bgp confederation peers 24
R5(config-router)#neighbor 4.4.4.4 remote-as 24
R5(config-router)#neighbor 4.4.4.4 update-source loopback 0
R5(config-router)#neighbor 4.4.4.4 ebgp-multihop 2
R5(config-router)#neighbor 3.3.3.3 remote-as 35
R5(config-router)#neighbor 3.3.3.3 update-source loopback 0
这需要配置邻居。更有趣的部分当然是使用一些show命令来查看与普通IBGP和EBGP的差异。
为了得到我们可以看到的东西,我将在R5上创建一个环回接口并在BGP中通告网络:
R5(config)#interface loopback 5
R5(config-if)#ip address 55.55.55.55 255.255.255.255
让我们在BGP中做广告:
R5(config)#router bgp 35
R5(config-router)#network 55.55.55.55 mask 255.255.255.255
让我们先看看R3,这个路由器和R5在同一个子AS中:
R3#show ip bgp 55.55.55.55
BGP routing table entry for 55.55.55.55/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
Local
5.5.5.5 (metric 2) from 5.5.5.5 (5.5.5.5)
Origin IGP, metric 0, localpref 100, valid, confed-internal, best
此条目看起来与普通IBGP几乎相同,但有一个重要区别......
该路由标记为confed-internal,这意味着它来自同一子AS内的 IBGP路由器。我们现在检查R2:
R2#show ip bgp 55.55.55.55
BGP routing table entry for 55.55.55.55/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
2
(35)
5.5.5.5 (metric 3) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, confed-external, best
BGP联盟使用名为AS_CONFED_SET的新BGP属性。这个“联盟集”在子列表的前面列出了该子列表。在上面你可以看到(35)这意味着这条路线来自另一个子AS(35)。R3将更新发送到R2时发生前置。
当此路由发送到另一个AS时,将删除所有子AS号。让我们看看它是如何工作的......我没有在R1和R2之间配置EBGP,所以我们现在就这样做:
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 2
R2(config)#router bgp 24
R2(config-router)#neighbor 192.168.12.1 remote-as 1
让我们看看AS 1中的R1对55.55.55.55 / 32路线的看法:
R1#show ip bgp 55.55.55.55
BGP routing table entry for 55.55.55.55/32, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
2
192.168.12.2 from 192.168.12.2 (2.2.2.2)
Origin IGP, localpref 100, valid, external, best
R1仅看到AS 2,我将创建一个环回并在BGP中做通告:
R1(config)#interface loopback 1
R1(config-if)#ip address 11.11.11.11 255.255.255.255
R1(config)#router bgp 1
R1(config-router)#network 11.11.11.11 mask 255.255.255.255
我们还有一件事要做......因为下一跳不随BGP变化,我们的路由器将不知道如何达到192.168.12.1(R1)。我将通过在BGP中通告192.168.12.0 / 24网络来解决这个问题:
R2(config)#router bgp 24
R2(config-router)#network 192.168.12.0 mask 255.255.255.0
现在让我们来看看R2:
R2#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1 2
1
192.168.12.1 from 192.168.12.1 (192.168.12.1)
Origin IGP, metric 0, localpref 100, valid, external, best
这只是普通的EBGP信息,没什么特别的。让我们看看R4在同一个子AS中:
R4#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 9
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
1
192.168.12.1 (metric 2) from 2.2.2.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, confed-internal, best
R4看到路线并将其识别为“内部干扰”。让我们检查R3更有趣:
R3#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 6
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
(24) 1
192.168.12.1 (metric 2) from 2.2.2.2 (2.2.2.2)
Origin IGP, metric 0, localpref 100, valid, confed-external, best
R3在与R2不同的子AS中,你可以看到它表示confed-external。需要注意的一点是下一跳IP地址没有改变。当您使用常规EBGP时,路由器在将路由发送到另一个EBGP路由器时会将路由的下一跳IP地址更改为其自己的IP地址。
来自R2的子AS编号已预先添加,AS路径现在为(24)1。
让我们检查最后一个路由器R5:
R5#show ip bgp 11.11.11.11
BGP routing table entry for 11.11.11.11/32, version 6
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
(24) 1
192.168.12.1 (metric 3) from 4.4.4.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, confed-external
(24) 1
192.168.12.1 (metric 3) from 3.3.3.3 (3.3.3.3)
Origin IGP, metric 0, localpref 100, valid, confed-internal, best
R5有两个选项,它从R3(confed-internal)或R4(confed-external)了解这条路线。它选择内部路径作为最佳路径。
CCNA|CCNP|CCIE|HCIA|HCIP|HCIE
路由交换|安全|DC数据中心|无线|云计算 点击咨询
乾颐堂客服热线:400-618-8070
乾颐堂官网:www.qytang.com
乾颐堂网络实验室 我们为您想的更多
CCIE考试学习BGP技术文档-BGP联盟-QYT培训认证
姓名:
Q Q:
电话:
|