![图片[1]-4.10 优选拥有最短的cluster-list长度路由-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片3-25-1024x518.png)
1.R1配置OSPF
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255
[R1-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
2.R2配置OSPF
[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
3.R3配置OSPF
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
[R3-ospf-1-area-0.0.0.0]network 34.1.1.0 0.255.255.255
4.R4配置OSPF
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.0]network 34.1.1.0 0.255.255.255
5.R1配置BGP(R1、R2、R3全互联)
[R1]bgp 1234
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as-number 1234
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R1-bgp]peer 3.3.3.3 as-number 1234
[R1-bgp]peer 3.3.3.3 connect-interface LoopBack 0
6.R2配置BGP(R1、R2、R3全互联)
[R2]bgp 1234
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 1.1.1.1 as-number 1234
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 3.3.3.3 as-number 1234
[R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
7.R3配置BGP(R1、R2、R3全互联)
[R3]bgp 1234
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 1.1.1.1 as-number 1234
[R3-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R3-bgp]peer 2.2.2.2 as-number 1234
[R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
8.R3、R4配置IBGP
[R3-bgp]peer 4.4.4.4 as-number 1234
[R3-bgp]peer 4.4.4.4 connect-interface LoopBack 0
[R4]bgp 1234
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 3.3.3.3 as-number 1234
[R4-bgp]peer 3.3.3.3 connect-interface LoopBack 0
9.配置R1、R2为RR(反射器),R1、R2的client为R3。配置R3为RR,R3的client为R4
[R1-bgp]peer 3.3.3.3 reflect-client
[R2-bgp]peer 3.3.3.3 reflect-client
[R3-bgp]peer 4.4.4.4 reflect-client
10.R4创建LoopBack 1,宣告到BGP
[R4]interface LoopBack 1
[R4-LoopBack1]ip address 44.44.44.44 32
[R4-bgp]network 44.44.44.44 32
11.R1查看BGP路由信息
[R1]display bgp routing-table
*>i 44.44.44.44/32 4.4.4.4 0 100 0 i
* i 4.4.4.4 0 100 0 i
12.R1查看BGP路由信息详细信息
R2路由Cluster list: 2.2.2.2, 3.3.3.3,R3路由 Cluster list: 3.3.3.3,R1选择R3Cluster list值小的路由。
[R1]display bgp routing-table 44.44.44.44
BGP local router ID : 1.1.1.1
Local AS number : 1234
Paths: 2 available, 1 best, 1 select
BGP routing table entry information of 44.44.44.44/32:
RR-client route.
From: 3.3.3.3 (3.3.3.3)
Route Duration: 00h01m23s
Relay IP Nexthop: 13.1.1.3
Relay IP Out-Interface: GigabitEthernet0/0/1
Original nexthop: 4.4.4.4
Qos information : 0x0
AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255, IGP cost 2
Originator: 4.4.4.4
Cluster list: 3.3.3.3
Advertised to such 1 peers:
2.2.2.2
BGP routing table entry information of 44.44.44.44/32:
From: 2.2.2.2 (2.2.2.2)
Route Duration: 00h01m23s
Relay IP Nexthop: 13.1.1.3
Relay IP Out-Interface: GigabitEthernet0/0/1
Original nexthop: 4.4.4.4
Qos information : 0x0
AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, pre 255, IGP cost 2, not preferred for Cluster List
Originator: 4.4.4.4
Cluster list: 2.2.2.2, 3.3.3.3
Not advertised to any peer yet
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容