4.12 优选最低BGP邻居地址路由

图片[1]-4.12 优选最低BGP邻居地址路由-大赛人网
图4-12 优选最低BGP邻居地址路由网络拓扑

1.R1配置OSPF

[R1]ospf 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 1.1.2.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255

2.R2配置OSPF

[R2]ospf 1 router-id 2.2.1.2 
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.1.2 0.0.0.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

3.R1配置BGP

[R1]bgp 12
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.1.2 as-number 12
[R1-bgp]peer 2.2.1.2 connect-interface LoopBack 0
[R1-bgp]peer 2.2.2.2 as-number 12
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 1

4.R2配置BGP

[R2]bgp 12
[R2-bgp]router-id 2.2.1.2
[R2-bgp]peer 1.1.1.1 as-number 12
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0                     
[R2-bgp]peer 1.1.2.1 as-number 12
[R2-bgp]peer 1.1.2.1 connect-interface LoopBack 1

5.R2宣告2.2.3.2/32到BGP

[R2-bgp]network 2.2.3.2 32

6.R1查看BGP信息,优选具有最小IP地址的路由(2.2.1.2/32)

[R1]display bgp routing-table 
 *>i  2.2.3.2/32         2.2.1.2         0          100        0      i
 * i                     2.2.2.2         0          100        0      i

[R1]display bgp routing-table 2.2.3.2
 BGP local router ID : 1.1.1.1
 Local AS number : 12
 Paths:   2 available, 1 best, 1 select
 BGP routing table entry information of 2.2.3.2/32:
 From: 2.2.1.2 (2.2.1.2)
 Route Duration: 00h07m46s  
 Relay IP Nexthop: 12.1.1.2
 Relay IP Out-Interface: GigabitEthernet0/0/0
 Original nexthop: 2.2.1.2
 Qos information : 0x0
 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255, IGP cost 1
 Not advertised to any peer yet

 BGP routing table entry information of 2.2.3.2/32:
 From: 2.2.2.2 (2.2.1.2)
 Route Duration: 00h02m47s  
 Relay IP Nexthop: 12.1.1.2
 Relay IP Out-Interface: GigabitEthernet0/0/0
 Original nexthop: 2.2.2.2
 Qos information : 0x0
 AS-path Nil, origin igp, MED 0, localpref 100, pref-val 0, valid, internal, pre 255, IGP cost 1, not preferred for peer address
 Not advertised to any peer yet
© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容