4.11 优选更小的Originator ID或router-ID的BGP邻居

图片[1]-4.11 优选更小的Originator ID或router-ID的BGP邻居-大赛人网
图4-11 优选更小的Originator ID或router-ID的BGP邻居网络拓扑

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

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

3.R1配置IBGP、EBGP

[R1]bgp 12
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as-number 12
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R1-bgp]peer 2.2.2.2 next-hop-local
[R1-bgp]peer 13.1.1.3 as-number 300

4.R2配置IBGP、EBGP,2.2.2.2/32宣告进BGP

[R2]bgp 12
[R2-bgp]router-id 2.2.2.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.1.1 next-hop-local
[R2-bgp]peer 23.1.1.3 as-number 300

5.R3配置EBGP

[R3]bgp 300
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 13.1.1.1 as-number 12
[R3-bgp]peer 23.1.1.2 as-number 12

6.R2创建LoopBack 1,宣告进BGP

[R2]interface LoopBack 1
[R2-LoopBack1]ip address 1.1.2.1 32
[R2-LoopBack1]quit
[R2]bgp 12
[R2-bgp]network 1.1.2.1 32

7.R3查看BGP路由信息

选择R1的router-id小的路由,R2不优选的原因是router-id大(not preferred for router ID)
[R3]display bgp routing-table 
 *>   1.1.2.1/32         13.1.1.1                              0      12i
 *                       23.1.1.2        0                     0      12i

[R3]display bgp routing-table 1.1.2.1
 BGP local router ID : 3.3.3.3
 Local AS number : 300
 Paths:   2 available, 1 best, 1 select
 BGP routing table entry information of 1.1.2.1/32:
 From: 13.1.1.1 (1.1.1.1)
 Route Duration: 00h11m05s  
 Direct Out-interface: GigabitEthernet0/0/2
 Original nexthop: 13.1.1.1
 Qos information : 0x0
 AS-path 12, origin igp, pref-val 0, valid, external, best, select, active, pre 255
 Advertised to such 2 peers:
    13.1.1.1
    23.1.1.2
 BGP routing table entry information of 1.1.2.1/32:
 From: 23.1.1.2 (2.2.2.2)
 Route Duration: 00h11m06s  
 Direct Out-interface: GigabitEthernet0/0/1
 Original nexthop: 23.1.1.2
 Qos information : 0x0
 AS-path 12, origin igp, MED 0, pref-val 0, valid, external, pre 255, not preferred for router ID
 Not advertised to any peer yet
© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容