BGP之IBGP水平分割之路由反射

6.1 问题
如图配置IP地址和OSPF
AS 234 使用联盟和路由反射,解决路由传递问题
AS 100 和 AS 234 配置 EBGP 邻居
AS 500 和 AS 234 配置稳定 EBGP 邻居
确保 Loopback10和Loopback50互通

配置思路:
1.数据传到R1-R2-R3再往下传的时候需要把R3做成路由反射器。
-需要配置客户机可以是R2或者是R6或者同时都做成客户机,但是不能都不是客户机。.
2.R4不用管如果是出现相应的需要分割情况也按照这个方式进行配置就可以的
3.IP 地址OSPF,R2 R3 R6 R4之间BGP邻居关系设置
4.R1 直连EBGP设置, R5稳定import模式引入设置
4.非直联的使用LOOPBACK接口稳定连接的时候必须使用
[R4-bgp]peer 10.10.6.6 ebgp-max-hop 直连检测机制需要用的命令

4.[R3-bgp]peer 10.10.6.6 reflect-client //设置R3到R6的路由反射器
BGP之IBGP水平分割之路由反射_第1张图片

R1路由设置

[R1-GigabitEthernet0/0/0]ip add 192.168.12.1 24
[R1-GigabitEthernet0/0/0]q
[R1]int LoopBack 10
[R1-LoopBack10]ip add 10.10.10.10 24
[R1-LoopBack10]q
[R1]bgp 100
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 192.168.12.2 as-number 234
Warning: Local interface is already configured with this address.
[R1-bgp]dis this
[V200R003C00]
#
bgp 100
router-id 1.1.1.1
peer 192.168.12.2 as-number 234
#
ipv4-family unicast
undo synchronization
peer 192.168.12.1 enable
#
return
[R1-bgp]network 10.10.10.0 255.255.255.0
[R1-bgp]dis this
[V200R003C00]
#
bgp 100
router-id 1.1.1.1
peer 192.168.12.1 as-number 234
#
ipv4-family unicast
undo synchronization
network 10.10.10.0 255.255.255.0
peer 192.168.12.2 enable

R2:R1,R3邻居设置
[R2]bgp 64523
[R2-bgp]dis this
[V200R003C00]
#
bgp 64523
router-id 2.2.2.2
confederation id 234
confederation peer-as 64544
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface LoopBack0
peer 192.168.12.1 as-number 100
#
ipv4-family unicast
undo synchronization
peer 10.10.3.3 enable
peer 10.10.3.3 next-hop-local
peer 192.168.12.1 enable
#
return

R3:R2,R6邻居设置
[R3-bgp]peer 10.10.6.6 as-number 64523
[R3-bgp]peer 10.10.6.6 connect-interface LoopBack 0
[R3]bgp 64523
[R3]dis bgp routing-table peer 10.10.6.6 advertised-routes
[R3]bgp 64523

[R3-bgp]peer 10.10.6.6 reflect-client /设置R3到R6的路由反射器
[R3-bgp]dis bgp routing-table peer 10.10.6.6 advertised-routes
[R3]bgp 64523
[R3-bgp]dis this
[V200R003C00]
#
bgp 64523
router-id 3.3.3.3
confederation id 234
confederation peer-as 64544
peer 10.10.2.2 as-number 64523
peer 10.10.2.2 connect-interface LoopBack0
peer 10.10.6.6 as-number 64523
peer 10.10.6.6 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 10.10.2.2 enable
peer 10.10.6.6 enable
peer 10.10.6.6 reflect-client
#
return

R6:R3,R4邻居设置

[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 192.168.64.6 24
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip add 192.168.36.6 24
[R6-GigabitEthernet0/0/1]q
[R6]int LoopBack 0
[R6-LoopBack0]ip add 10.10.6.6 32
[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]network 192.168.36.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 192.168.64.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 10.10.6.6 0.0.0.0
[R6-ospf-1-area-0.0.0.0]q
[R6]bgp 64523
[R6-bgp]confederation id 234

[R6-bgp]confederation peer-as 64544

[R6-bgp]router-id 6.6.6.6

[R6-bgp]peer 10.10.3.3 as-number 64523

[R6-bgp]peer 10.10.3.3 connect-interface LoopBack 0

[R6-bgp]peer 10.10.4.4 as-number 64544

[R6-bgp]peer 10.10.4.4 connect-interface LoopBack 0

[R6-bgp]peer 10.10.4.4 ebgp-max-hop
dis bgp peer

[R6]bgp 64523
[R6-bgp]dis this
[V200R003C00]
#
bgp 64523
router-id 6.6.6.6
confederation id 234
confederation peer-as 64544
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface LoopBack0
peer 10.10.4.4 as-number 64544
peer 10.10.4.4 ebgp-max-hop 255
peer 10.10.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 10.10.3.3 enable
peer 10.10.4.4 enable
#
return

R4:R6,R5邻居设置

[R4]bgp 64544
[R4-bgp]dis this
[V200R003C00]
#
bgp 64544
router-id 4.4.4.4
confederation id 234
confederation peer-as 64523
peer 10.10.5.5 as-number 500
peer 10.10.5.5 ebgp-max-hop 255
peer 10.10.5.5 connect-interface LoopBack0
peer 10.10.6.6 as-number 64523
peer 10.10.6.6 ebgp-max-hop 255
peer 10.10.6.6 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 10.10.5.5 enable
peer 10.10.6.6 enable
peer 10.10.6.6 next-hop-local
#
return

R5的BGP设置

[R5]bgp 500
[R5-bgp]dis this
[V200R003C00]
#
bgp 500
router-id 5.5.5.5
peer 10.10.4.4 as-number 234
peer 10.10.4.4 ebgp-max-hop 255
peer 10.10.4.4 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.10.4.4 enable
#
return