路由反射器(RR)在BGP中的使用
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了路由反射器(RR)在BGP中的使用相关的知识,希望对你有一定的参考价值。
路由反射器(RR)在BGP中的使用拓扑图拓扑图
?实验目的:
1.验证非客户端产生的路由通过RR传递给反射客户端和EBGP 邻居
2.验证反射客户端产生的路由通过RR传递给非客户端,其它反射客户端,EBGP邻居
3.验证路由簇采用簇ID的如何防环。
4.验证路由族如何采用族的起源ID进行防环
实验要求:
1.路由器链路之间采用XY.1.1.X.y/24的形式配置IP地址,环回口地址配置为X.X.X.X/32地址
2.各路由器配置Router-id为环回口地址。
3.在AS100内部采用OSPF协议,在AS200 内部采用ISIS协议
4.在AS100内部配置R1,R7为路由反射器
5.在AS100内R4,R5为R1,R7的路由反射客户端,R2,R3为R1,R7的非客户端。
6.在R2上network路由
实验步骤:
1.配置各路由器的IP地址
2.配置AS100内IGP的OSPF协议,AS200内IGP的ISIS协议
3.配置AS100,AS200的内的IBGP邻居,AS100和AS200之间的EBGP邻居
4.配置路由R1,R7为反射器
实验配置:
路由的基础配置,如下:
#R1的配置
[R1]interface GigabitEthernet 0/0/0 //进入接口
[R1-GigabitEthernet0/0/0]IP address 14.1.1.1 255.255.255.0 //配置接口IP地址
[R1-GigabitEthernet0/0/0]quit //退出接口
[R1]interface GigabitEthernet 0/0/1 //进入接口
[R1-GigabitEthernet0/0/1]ip address 15.1.1.1 255.255.255.0 //配置接口IP地址
[R1-GigabitEthernet0/0/1]quit //退出接口
[R1]interface GigabitEthernet 0/0/2 //进入接口
[R1-GigabitEthernet0/0/2]ip address 73.1.1.1 255.255.255.0 //配置接口IP地址
[R1-GigabitEthernet0/0/2]quit //退出接口
[R1]interface GigabitEthernet 4/0/0
[R1-GigabitEthernet4/0/0]ip address 13.1.1.1 255.255.255.0
[R1-GigabitEthernet4/0/0]quit
[R1]interface GigabitEthernet 4/0/1 //进入接口
[R1-GigabitEthernet4/0/1]ip address 16.1.1.1 255.255.255.0 //配置接口地址
[R1-GigabitEthernet4/0/1]quit //退出接口
[R1]interface GigabitEthernet 4/0/2 // 进入接口GigabitEthernet4/0/0
[R1-GigabitEthernet4/0/2]ip address 71.1.1.1 255.255.255.0 //配置接口下的IP地址
[R1-GigabitEthernet4/0/2]quit //退出接口
[R1]interface loopback 0 //进入接口
[R1-Loopback0]ip address 1.1.1.1 32 //配置接口的IP地址
[R1-Loopback0]quit //退出接口
[R1]Router id 1.1.1.1 //配置路由器的router-id
[R1]ospf 10 //开启OSPF进程10
[R1-OSPF-10]area 0 //进入区域0
[R1-OSPF-10-0.0.0.0]network 1.1.1.1 0.0.0.0 //宣告接口的路由
[R1-OSPF-10-0.0.0.0]network 71.1.1.0 0.0.0.255
[R1-OSPF-10-0.0.0.0]network 12.1.1.0 0.0.0.255
[R1-OSPF-10-0.0.0.0]network 13.1.1.0 0.0.0.255
[R1-OSPF-10-0.0.0.0]network 73.1.1.0 0.0.0.255
[R1-OSPF-10-0.0.0.0]network 14.1.1.0 0.0.0.255
[R1-OSPF-10-0.0.0.0]network 15.1.1.0 0.0.0.255
[R1-OSPF-10-0.0.0.0]quit
[R1-OSP-10]quit
[R1]bgp 100 //开启BGP100进程
[R1-bgp-100]peer 2.2.2.2 as -number 100 //IBGP的对等体
[R1-bgp-100]peer 2.2.2.2 connect-interface Loopback0 //配置对等体起源接口
[R1-bgg-100]peer 3.3.3.3 as-number 100
[R1-bgp-100]peer 3.3.3.3 connect-interface Loopback0 //配置对等体起源接口
[R1-bgp-100]peer 4.4.4.4 as-number 100 //配置IBGP的对等体
[R1-bgp-100]peer 4.4.4.4 connect-interface Loopback0 //配置对等体起源接口
[R1-bgp-100]peer 5.5.5.5 as-number 100 //配置IBGP的对等体
[R1-bgp-100]peer 5.5.5.5 connect-interface Loopback0 //配置对等体的起源接口
[R1-bgp-100]peer 1.1.1.1 as-number 100
[R1-bgp-100]peer 1.1.1.1 connect-interface Loopback0
[R1-bgp-100]peer 6.6.6.6 as-number 200
[R1-bgp-100]peer 6.6.6.6 connect-interface Loopback 0
[R1-bgp-100]peer 6.6.6.6 edge-max-hop 3
[R1-bgp-100]peer 2.2.2.2 reflict-clinet
[R1-bgp-100]peer 3.3.3.3 reflict-clinet
[R1-bgp-100]peer 4.4.4.4 reflict-clinet
[R1-bgp-100]peer 5.5.5.5 reflict-clinet
[R1-bgp-100]quit
[R1]ip route-static 6.6.6.6 32 16.1.1.6 //配置静态路由
#R2的配置
[R2]interface GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]IP address 12.1.1.2 255.255.255.0
[R2-GigabitEthernet0/0/0]quit
[R2]interface GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip address 72.1.1.2 255.255.255.0
[R2-GigabitEthernet0/0/1]quit
[R2]interface Loopback0
[R2-Loopback0]ip address 2.2.2.2 255.255.255.255
[R2-Loopback0]quit
[R2]router id 2.2.2.2
[R2]ospf 10
[R2-OSPf-10]area 0
[R2-OSPF-10-0.0.0.0]network 12.1.1.0 0.0.0.255
[R2-OSPF-10-0.0.0.0]network 72.1.1.0 0.0.0.255
[R2-OSPF-10-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-OSPF-10-0.0.0.0]quit
[R2-OSPF-10]quit
[R2]bgp 100
[R2-bgp-100]peer 1.1.1.1 as-number 100
[R2-bgp-100]peer 1.1.1.1 connnect-interface loopback 0
[R2-bgp-100]peer 7.7.7.7 as-bumber 100
[R2-bgp-100]peer 7.7.7.7 connect-interface loopback 0
[R2-bgp-100]quit
[R2]
#R3的配置
[R3]interface GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]IP address 13.1.1.3 255.255.255.0
[R3-GigabitEthernet0/0/0]quit
[R3]interface GigabitEthernet 0/0/1
[R3-GigabitEthernet0/0/1]ip address 73.1.1.3 255.255.255.0
[R3-GigabitEthernet0/0/1]quit
[R3]interface Loopback0
[R3-Loopback0]ip address 3.3.3.3 255.255.255.255
[R3-Loopback0]quit
[R3]router id 3.3.3.3
[R3]ospf 10
[R3-OSPF-10]area 0
[R3-OSPF-10-0.0.0.0]netwrok 13.1.1.0 0.0.0.255
[R3-OSPF-10-0.0.0.0]network 73.1.1.0 0.0.0.255
[R3-OSPF-10-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-OSPF-10-0.0.0.0]quit
[R3-OSPF-10]quit
[R3]bgp 100
[R3-bgp-100]peer 1.1.1.1 as-number 100
[R3-bgp-100]peer 1.1.1.1 connect-interface loopback 0
[R3-bgp-100]peer 7.7.7.7 as-number 100
[R3-bgp-100]peer 7.7.7.7 connect-interface loopback 0
[R3-bgp-100]quit
[R3]
#R4的配置
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]IP address 14.1.1.4 255.255.255.0
[R4-GigabitEthernet0/0/0]quit
[R4]interface GigabitEthernet 0/0/1
[R4-GigabitEthernet0/0/1]ip address 74.1.1.4 255.255.255.0
[R4-GigabitEthernet0/0/1]quit
[R4]interface Loopback0
[R4-Loopback0]ip address 4.4.4.4 255.255.255.255
[R4-Loopback0]quit
[R4]router id 4.4.4.4
[R4]ospf 10
[R4-OSPF-10]area 0
[R4-OSPF-10-0.0.0.0]network 14.1.1.0 0.0.0.255
[R4-OSPF-10-0.0.0.0]network 74.1.1.0 0.0.0.255
[R4-OSPF-10-0.0.0.0]network 4.4.4.4 0.0.0.0
[R4-OSPF-10-0.0.0.0]quit
[R4-OSPF-10]quit
[R4]bgp 100
[R4-bgp-100]peer 1.1.1.1 as-number 100
[R4-bgp-100]peer 1.1.1.1 connect-interface loopback 0
[R4-bgp-100]peer 7.7.7.7 as-number 100
[R4-bgp-100]peer 7.7.7.7 connect-interface loopback 0
[R4-bgp-100]quit
[R4]
#R5的配置
[R5]interface GigabitEthernet 0/0/0
[R5-GigabitEthernet0/0/0]IP address 15.1.1.5 255.255.255.0
[R5-GigabitEthernet0/0/0]quit
[R5]interface GigabitEthernet 0/0/1
[R5-GigabitEthernet0/0/1]ip address 75.1.1.5 255.255.255.0
[R5-GigabitEthernet0/0/1]quit
[R5]interface Loopback0
[R5-Loopback0]ip address 2.2.2.2 255.255.255.255
[R5-Loopback0]quit
[R5]router id 5.5.5.5
[R5]ospf 10
[R5-OSPF-10]area 0
[R5-OSPF-10-0.0.0.0]network 5.5.5.5 0.0.0.0
[R5-OSPF-10-0.0.0.0]network 15.1.1.0 0.0.0.255
[R5-OSPF-10-0.0.0.0]network 75.1.1.0 0.0.0.255
[R5-OSPF-10-0.0.0.0]quit
[R5-OSPF-10]quit
[R5]bgp 100
[R5-bgp-100]peer 1.1.1.1 as-number 100
[R5-bgp-100]peer 1.1.1.1 connect-interface loopback 0
[R5-bgp-100]peer 7.7.7.7 as-number 100
[R5-bgp-100]peer 7.7.7.7 connect-interface loopback 0
[R5-bgp-100]quit
[R5]
#R6的配置
[R6]interface GigabitEthernet 0/0/0
[R6-GigabitEthernet0/0/0]IP address 16.1.1.6 255.255.255.0
[R6-GigabitEthernet0/0/0]quit
[R6]interface GigabitEthernet 0/0/1
[R6-GigabitEthernet0/0/1]ip address 69.1.1.6 255.255.255.0
[R6-GigabitEthernet0/0/1]ISIS enable
[R6-GigabitEthernet0/0/1]quit
[R6]interface Loopback0
[R6-Loopback0]ip address 6.6.6.6 255.255.255.255
[R6-Loopback0]isis enable
[R6-Loopback0]quit
[R6]router id 6.6.6.6
[R6]isis 1
[R6-isis-1]network-entity 49.0012.0000.0000.1111.00
[R6-isis-1]is-level level-2
[R6-isis-1]quit
[R6]bgp 200
[R6-bgp-200]peer 9.9.9.9 as-number 200
[R6-bgp-200]peer 9.9.9.9 connect-interface loopback 0
[R6-bgp-200]peer 1.1.1.1 as-number 100
[R6-bgp-200]peer 1.1.1.1 connect-interface loopback 0
[R6-bgp-200]peer 1.1.1.1 edge-max-hop 3
[R6-bgp-200]quit
[R6]ip route-static 1.1.1.1 32 16.1.1.1
R#R7的配置
[R7]interface GigabitEthernet 0/0/0
[R7-GigabitEthernet0/0/0]IP address 74.1.1.7 255.255.255.0
[R7-GigabitEthernet0/0/0]quit
[R7]interface GigabitEthernet 0/0/1
[R7-GigabitEthernet0/0/1]ip address 75.1.1.7 255.255.255.0
[R7-GigabitEthernet0/0/1]quit
[R7]interface GigabitEthernet 0/0/2
[R7-GigabitEthernet0/0/2]ip address 72.1.1.7 255.255.255.0
[R7-GigabitEthernet0/0/2]quit
[R7]interface GigabitEthernet 4/0/0
[R7-GigabitEthernet4/0/0]ip address 73.1.1.7 255.255.255.0
[R7-GigabitEthernet4/0/0]quit
[R7]interface GigabitEthernet 4/0/1
[R7-GigabitEthernet4/0/1]ip address 71.1.1.7 255.255.255.0
[R7-GigabitEthernet4/0/1]quit
[R7]interface GigabitEthernet 4/0/2
[R7-GigabitEthernet4/0/2]ip address 78.1.1.7 255.255.255.0
[R7-GigabitEthernet4/0/2]quit
[R7]interface Loopback0
[R7-Loopback0]ip address 7.7.7.7 255.255.255.255
[R7-Loopback0]quit
[R7]router ID 7.7.7.7
[R7]ospf 10
[R7-ospf-10]area 0
[R7-ospf-10-0.0.0.0]network 71.1.1.0 0.0.0.255
[R7-ospf-10-0.0.0.0]network 72.1.1.0 0.0.0.255
[R7-ospf-10-0.0.0.0]network 73.1.1.0 0.0.0.255
[R7-ospf-10-0.0.0.0]network 75.1.1.0 0.0.0.255
[R7-ospf-10-0.0.0.0]network 74.1.1.0 0.0.0.255
[R7-ospf-10-0.0.0.0]network 7.7.7.7 0.0.0.0
[R7-ospf-10-0.0.0.0]quit
[R7-ospf-10]quit
[R7]bgp 100
[R7-bgp-100]peer 1.1.1.1 as-number 100
[R7-bgp-100]peer 1.1.1.1 connect-interface loopback 0
[R7-bgp-100]peer 2.2.2.2 as-number 100
[R7-bgp-100]peer 2.2.2.2 connect-interface loopback 0
[R7-bgp-100]peer 3.3.3.3 as-number 100
[R7-bgp-100]peer 3.3.3.3 connect-interface loopback 0
[R7-bgp-100]peer 4.4.4.4 as-number 100
[R7-bgp-100]peer 4.4.4.4 connect-interface loopback 0
[R7-bgp-100]peer 5.5.5.5 as-bumber 100
[R7-bgp-100]peer 5.5.5.5 connect-interfac loopback 0
[R7-bgp-100]peer 8.8.8.8 as-number 200
[R7-bgp-100]peer 8.8.8.8 connect-interface loopback 0
[R7-bgp-100]peer 8.8.8.8 edge-max-hop 3
[R7-bgp-100]peer 2.2.2.2 reflict-clinet
[R7-bgp-100]peer 3.3.3.3 reflict-clinet //配置路由反射器
[R7-bgp-100]peer 4.4.4.4 reflict-clinet
[R7-bgp-100]peer 5.5.5.5 reflict-clinet
[R7-bgp-100]quit
[R7]ip route-static 8.8.8.8 32 78.1.1.8 //配置静态路由
#R8的配置
[R8]interface GigabitEthernet 0/0/0
[R8-GigabitEthernet0/0/0]IP address 78.1.1.8 255.255.255.0
[R8-GigabitEthernet0/0/0]quit
[R8]interface GigabitEthernet 0/0/1
[R8-GigabitEthernet0/0/1]ip address 89.1.1.8 255.255.255.0
[R8-GigabitEthernet0/0/1]ISIS enable
[R8-GigabitEthernet0/0/1]quit
[R8]interface Loopback0
[R8-Loopback0]ip address 8.8.8.8 255.255.255.255
[R8-Loopback0]isis enable
[R8-Loopback0]quit
[R8]router id 8.8.8.8
[R]8isis 1
[R8-isis-1]network-entity 49.0012.0000.0000.1111.00
[R8-isis-1]is-level level-2
[R8-isis-1]quit
[R8]bgp 200
[R8-bgp-200]peer 9.9.9.9 as-number 200
[R8-bgp-200]peer 9.9.9.9 connect-loopback 0
[R8-bgp-200]peer 7.7.7.7 as-number 100
[R8-bgp-200]peer 7.7.7.7 connect-loopback 0
[R8-bgp-200]peer 7.7.7.7 ebge-max-hop 3
[R8-bgp-200]quit
[R8]ip route-static 7.7.7.7 32 78.1.1.7
#R9的配置
[R9]interface GigabitEthernet 0/0/1
[R9-GigabitEthernet0/0/1]IP address 69.1.1.9 255.255.255.0
[R9-GigabitEthernet0/0/1]quit
[R9]interface GigabitEthernet 0/0/2
[R9-GigabitEthernet0/0/2]ip address 89.1.1.9 255.255.255.0
[R9-GigabitEthernet0/0/2]ISIS enable
[R9-GigabitEthernet0/0/2]quit
[R9]interface Loopback0
[R9-Loopback0]ip address 6.6.6.6 255.255.255.255
[R9-Loopback0]isis enable
[R9-Loopback0]quit
[R9]router id 6.6.6.6
[R9]isis 1
[R9-isis-1]network-entity 49.0012.0000.0000.1111.00
[R9-isis-1]is-level level-2
[R9-isis-1]quit
[R9]bgp 200
[R9-bgp-200]peer 8.8.8.8 as-number 200
[R9-bgp-200]peer 8.8.8.8 connect-interface loopback 0
[R9-bgp-200]peer 9.9.9.9 as-number 200
[R9-bgp-200]peer 9.9.9.9 connect-interface loopback 0
[R9-bgp-200]quit
[R9]
得出结论:
路由反射器能打破IBGP的水平分割。
以上是关于路由反射器(RR)在BGP中的使用的主要内容,如果未能解决你的问题,请参考以下文章