本文主要是介绍华为bgp反射器,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.AS1存在两个环回,一个地址为192.168.1.0/24该地址不能在任何协议中宣告AS3存在两个环回,一个地址为192.168.2.0/24该地址不能在任何协议中宣告最终要求这两个环回可以互相通讯;
AS1的另一个环回为10.1.1.0/24,AS3的另一个环回为10.1.2.0/24
2、整个AS2的ip地址为172.16.0.0/16请合理划分
3、AS间的骨干链路ip地址随意定制
4、使用BGP协议让整个网络所有设备的环回可以相互访问
5、减少条目数量,避免环路出现
R1
sysname R1
#
interface GigabitEthernet0/0/0 ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1 ip address 192.168.1.1 255.255.255.0
#
interface LoopBack0 ip address 10.1.1.1 255.255.255.0
#
bgp 1 router-id 1.1.1.1 peer 12.1.1.2 as-number 2 # ipv4-family unicast undo synchronization network 192.168.1.0 //查看配置没有带掩码,但是在宣告时,掩码必须和路由表中的一致network 12.1.1.2 peer 12.1.1.2 enable
R2
sysname R2
#
interface GigabitEthernet0/0/0 ip address 172.16.0.1 255.255.224.0
#
interface GigabitEthernet0/0/1 ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/2 ip address 172.16.160.1 255.255.224.0
#
interface LoopBack0 ip address 2.2.2.2 255.255.255.255
#
bgp 2 router-id 2.2.2.2 peer 3.3.3.3 as-number 2 peer 3.3.3.3 connect-interface LoopBack0 peer 5.5.5.5 as-number 2 peer 5.5.5.5 connect-interface LoopBack0 peer 12.1.1.1 as-number 1 # ipv4-family unicast undo synchronization aggregate 172.16.0.0 255.255.0.0 //进行路由汇总,但是注意路由黑洞peer 3.3.3.3 enable peer 3.3.3.3 next-hop-local peer 5.5.5.5 enable peer 5.5.5.5 next-hop-local peer 12.1.1.1 enable
#
ospf 1 router-id 2.2.2.2 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 172.16.0.1 0.0.0.0 network 172.16.160.1 0.0.0.0
#
ip route-static 172.16.0.0 255.255.0.0 ULL0 //本地手工静态一条指向汇总网段的空接口防环路由
然后再将其宣告到BGP协议中来;从IGP表中宣告到BGP协议中的条目,仅携带目标网络号和度量值;
R3
sysname R3
#
interface GigabitEthernet0/0/0 ip address 172.16.32.1 255.255.224.0
#
interface GigabitEthernet0/0/1 ip address 172.16.0.2 255.255.224.0
#
interface GigabitEthernet0/0/2 ip address 172.16.192.1 255.255.224.0
#
interface LoopBack0 ip address 3.3.3.3 255.255.255.255
#
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 172.16.192.0 255.255.224.0 peer 2.2.2.2 enable peer 4.4.4.4 enable peer 4.4.4.4 reflect-client
#
ospf 1 router-id 3.3.3.3 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 172.16.0.2 0.0.0.0 network 172.16.32.1 0.0.0.0 network 172.16.192.1 0.0.0.0
R4
sysname R4
#
interface GigabitEthernet0/0/1 ip address 172.16.32.2 255.255.224.0
#
interface GigabitEthernet0/0/2 ip address 172.16.64.1 255.255.224.0
#
interface LoopBack0 ip address 4.4.4.4 255.255.255.255
#
bgp 2 router-id 4.4.4.4 peer 3.3.3.3 as-number 2 peer 3.3.3.3 connect-interface LoopBack0 peer 7.7.7.7 as-number 2 peer 7.7.7.7 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable peer 7.7.7.7 enable peer 7.7.7.7 reflect-client
#
ospf 1 router-id 4.4.4.4 area 0.0.0.0 network 4.4.4.4 0.0.0.0 network 172.16.32.2 0.0.0.0 network 172.16.64.1 0.0.0.0
R5
sysname R5
#
interface GigabitEthernet0/0/0 ip address 172.16.160.2 255.255.224.0
#
interface GigabitEthernet0/0/1 ip address 172.16.128.2 255.255.224.0
#
interface GigabitEthernet0/0/2
#
interface LoopBack0 ip address 5.5.5.5 255.255.255.255
#
bgp 2 router-id 5.5.5.5 peer 2.2.2.2 as-number 2 peer 2.2.2.2 connect-interface LoopBack0 peer 6.6.6.6 as-number 2 peer 6.6.6.6 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable peer 6.6.6.6 enable peer 6.6.6.6 reflect-client
#
ospf 1 router-id 5.5.5.5 area 0.0.0.0 network 5.5.5.5 0.0.0.0 network 172.16.128.2 0.0.0.0 network 172.16.160.2 0.0.0.0
R6
sysname R6
#
interface GigabitEthernet0/0/0 ip address 172.16.128.1 255.255.224.0
#
interface GigabitEthernet0/0/1 ip address 172.16.96.2 255.255.224.0
#
interface GigabitEthernet0/0/2
#
interface LoopBack0 ip address 6.6.6.6 255.255.255.255
#
bgp 2 router-id 6.6.6.6 peer 5.5.5.5 as-number 2 peer 5.5.5.5 connect-interface LoopBack0 peer 7.7.7.7 as-number 2 peer 7.7.7.7 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 5.5.5.5 enable peer 7.7.7.7 enable peer 7.7.7.7 reflect-client //让7.7.7.7成为RR自己为他的客户可以在ibgp间传递路由,但是不能更改性
#
ospf 1 router-id 6.6.6.6 area 0.0.0.0 network 6.6.6.6 0.0.0.0 network 172.16.96.2 0.0.0.0 network 172.16.128.1 0.0.0.0
R7
sysname R7
#
interface GigabitEthernet0/0/0 ip address 172.16.96.1 255.255.224.0
#
interface GigabitEthernet0/0/1 ip address 172.16.64.2 255.255.224.0
#
interface GigabitEthernet0/0/2 ip address 78.1.1.1 255.255.255.0
#
interface LoopBack0 ip address 7.7.7.7 255.255.255.255
#
bgp 2 router-id 7.7.7.7 peer 4.4.4.4 as-number 2 peer 4.4.4.4 connect-interface LoopBack0 peer 6.6.6.6 as-number 2 peer 6.6.6.6 connect-interface LoopBack0 peer 78.1.1.2 as-number 3 # ipv4-family unicast undo synchronization aggregate 172.16.0.0 255.255.0.0 peer 4.4.4.4 enable peer 4.4.4.4 next-hop-local peer 6.6.6.6 enable peer 6.6.6.6 next-hop-local peer 78.1.1.2 enable
#
ospf 1 router-id 7.7.7.7 area 0.0.0.0 network 7.7.7.7 0.0.0.0 network 172.16.64.2 0.0.0.0 network 172.16.96.1 0.0.0.0
#
ip route-static 172.16.0.0 255.255.0.0 NULL0
R8
sysname R8
#
interface GigabitEthernet0/0/0 ip address 78.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1 ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface LoopBack0 ip address 10.1.2.1 255.255.255.0
#
bgp 3 peer 78.1.1.1 as-number 2 # ipv4-family unicast undo synchronization network 192.168.2.0 network 10.1.2.0 peer 78.1.1.1 enable
这篇关于华为bgp反射器的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!