0
点赞
收藏
分享

微信扫一扫

【BGP_1】

幺幺零 2022-02-17 阅读 15

在这里插入图片描述

R1

[R1]bgp 1
[R1-bgp]dis th
[V200R003C00]
#
bgp 1
router-id 1.1.1.1
peer 12.1.1.2 as-number 2 和R2建立EBGP邻居
#
ipv4-family unicast
undo synchronization
network 11.1.1.0 255.255.255.0 宣告用户网络
peer 12.1.1.2 enable
#
return
[R1-bgp]

R2

[R2]bgp 2
[R2-bgp]dis th
[V200R003C00]
#
bgp 2
router-id 2.2.2.2
peer 3.3.3.3 as-number 2 和R3建立IBGP邻居
peer 3.3.3.3 connect-interface LoopBack0指明为环回端口
peer 4.4.4.4 as-number 2 和R4建立IBGP邻居
peer 4.4.4.4 connect-interface LoopBack0指明为换回端口
peer 12.1.1.1 as-number 1 和R1建立EBGP邻居
#
ipv4-family unicast
undo synchronization
network 22.1.1.0 255.255.255.0 宣告用户网络
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local 指定下一跳为本地,让R1的用户网段可以到达R3并优秀
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
peer 12.1.1.1 enable
#
return
[R2-bgp]

R3

[R3]bgp 2
[R3-bgp]dis th
[V200R003C00]
#
bgp 2
router-id 3.3.3.3
peer 2.2.2.2 as-number 2
peer 2.2.2.2 connect-interface LoopBack0
peer 4.4.4.4 as-number 2
peer 4.4.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 33.1.1.0 255.255.255.0
peer 2.2.2.2 enable
peer 4.4.4.4 enable
#
return
[R3-bgp]

R4

[R4]bgp 2
[R4-bgp]dis th
[V200R003C00]
#
bgp 2
router-id 4.4.4.4
peer 2.2.2.2 as-number 2
peer 2.2.2.2 connect-interface LoopBack0
peer 3.3.3.3 as-number 2
peer 3.3.3.3 connect-interface LoopBack0
peer 5.5.5.5 as-number 3
peer 5.5.5.5 ebgp-max-hop 2 因为其默认TTL为1,需要更改为2让两边环回可以相互访问到,实现建邻。
peer 5.5.5.5 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 44.1.1.0 255.255.255.0
peer 2.2.2.2 enable
peer 2.2.2.2 next-hop-local
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 5.5.5.5 enable
#
return
[R4-bgp]

R5

[R5]bgp 3
[R5-bgp]dis th
[V200R003C00]
#
bgp 3
router-id 5.5.5.5
peer 4.4.4.4 as-number 2
peer 4.4.4.4 ebgp-max-hop 2
peer 4.4.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
network 55.1.1.0 255.255.255.0
peer 4.4.4.4 enable
#
return
[R5-bgp]

最终效果:
在这里插入图片描述
在这里插入图片描述

举报

相关推荐

0 条评论