大型BGP组网课件.docx
- 文档编号:5817758
- 上传时间:2023-01-01
- 格式:DOCX
- 页数:74
- 大小:832.82KB
大型BGP组网课件.docx
《大型BGP组网课件.docx》由会员分享,可在线阅读,更多相关《大型BGP组网课件.docx(74页珍藏版)》请在冰豆网上搜索。
大型BGP组网课件
从实验现象详细分析BGP的路由策略与选路原则
1.1 组网需求
1) AS65001边界网段发布:
R2,R5重发布直连路由至ospf(metric1000type1)
2) AS65002边界网段发布:
R1,R6network至ospf,并配置被动接口
3) R3,R4发布业务网段至ospf1area0(10.13.3.0/24、10.14.4.0/24、10.15.4.0/24)
4) BGP配置要求
Nosynchronization
Noauto-summary
Neighbor
Neighbor
5) R2,R3,R4,R5都运行BGP;R3,R4为同簇RR(簇ID为R3loopback0),R2,R5都分别为R3,R4的客户端,且R3与R4之间建立普通的IBGP邻居
6) R3,R4发布AS65001的汇总路由至BGP:
10.10.0.0/16、10.13.0.0/16、10.14.0.0/16、10.15.0.0/16
7) R1,R6发布AS65002的汇总路由至BGP:
10.200.0.0/16、10.30.0.0/16
1.2 组网拓扑
1.3 选路需求
AS65002(R1,R6)去往10.13.0.0/16的主路径走R1—R2
AS65002(R1,R6)去往10.14.0.0/16、10.15.0.0/16的主路径走R6—R5
AS65001(R2,R3,R4,R5)去往10.20.0.0/16的主路径走R2—R1
AS65001 (R2,R3,R4,R5)去往10.30.0.0/16的主路径走R5—R6
1.4 基本连通性测试
1.5 BGP配置及调测
1) BGP配置
R3(config)#
routerbgp65001
bgpcluster-id10.10.0.3
bgplog-neighbor-changes
network10.10.0.0mask255.255.0.0
network10.13.0.0mask255.255.0.0
network10.14.0.0mask255.255.0.0
network10.15.0.0mask255.255.0.0
neighboras65001-rrpeer-group
neighboras65001-rrremote-as65001
neighboras65001-rrupdate-sourceLoopback0
neighboras65001-rrroute-reflector-client
neighboras65001-rrnext-hop-self
neighbor10.10.0.2peer-groupas65001-rr
neighbor10.10.0.4remote-as65001
neighbor10.10.0.4update-sourceLoopback0
neighbor10.10.0.4next-hop-self
neighbor10.10.0.5peer-groupas65001-rr
noauto-summary
!
iphttpserver
noiphttpsecure-server
iproute10.10.0.0255.255.0.0Null0
iproute10.13.0.0255.255.0.0Null0
iproute10.14.0.0255.255.0.0Null0
iproute10.15.0.0255.255.0.0Null0
R4(config)#
routerospf1
router-id10.10.0.4
log-adjacency-changes
passive-interfaceEthernet1/1
passive-interfaceEthernet1/2
network10.10.0.40.0.0.0area0
network10.10.1.40.0.0.3area0
network10.10.1.80.0.0.3area0
network10.14.4.00.0.0.255area0
network10.15.4.00.0.0.255area0
!
routerbgp65001
nosynchronization
bgpcluster-id10.10.0.3
network10.10.0.0mask255.255.0.0
network10.13.0.0mask255.255.0.0
network10.14.0.0mask255.255.0.0
network10.15.0.0mask255.255.0.0
neighboras65001-rrpeer-group
neighboras65001-rrremote-as65001
neighboras65001-rrupdate-sourceLoopback0
neighboras65001-rrroute-reflector-client
neighboras65001-rrnext-hop-self
neighbor10.10.0.2peer-groupas65001-rr
neighbor10.10.0.3remote-as65001
neighbor10.10.0.3update-sourceLoopback0
neighbor10.10.0.3next-hop-self
neighbor10.10.0.5peer-groupas65001-rr
noauto-summary
!
noiphttpsecure-server
iproute10.10.0.0255.255.0.0Null0
iproute10.13.0.0255.255.0.0Null0
iproute10.14.0.0255.255.0.0Null0
iproute10.15.0.0255.255.0.0Null0
R2(config)#
routerbgp65001
nosynchronization
bgplog-neighbor-changes
neighbor10.10.0.3remote-as65001
neighbor10.10.0.3update-sourceLoopback0
neighbor10.10.0.3next-hop-self
neighbor10.10.0.4remote-as65001
neighbor10.10.0.4update-sourceLoopback0
neighbor10.10.0.4next-hop-self
neighbor10.10.12.1remote-as65002
neighbor10.10.12.1route-mapas65002-inin
noauto-summary
R5(config)#(略)
R1(config)#
routerbgp65002
nosynchronization
bgplog-neighbor-changes
network10.20.0.0mask255.255.0.0
network10.30.0.0mask255.255.0.0
neighbor10.10.12.2remote-as65001
neighbor10.10.12.2route-mapas65001-inin
neighbor10.30.0.5remote-as65002
neighbor10.30.0.5update-sourceLoopback0
neighbor10.30.0.5next-hop-self
noauto-summary
noiphttpsecure-server
iproute10.20.0.0255.255.0.0Null0
iproute10.30.0.0255.255.0.0Null0
R6(config)#(略)
2) 查看邻居状态
R1#showipbgpneighbors
BGPneighboris10.10.12.2, remoteAS65001,externallink
BGPversion4,remoterouterID10.10.0.2
BGPstate=Established,upfor01:
58:
07
BGPneighboris10.30.0.5, remoteAS65002,internallink
BGPversion4,remoterouterID10.30.0.5
BGPstate=Established,upfor01:
31:
05
R2#showipbgpneighbors
BGPneighboris10.10.0.3, remoteAS65001,internallink
BGPversion4,remoterouterID10.10.0.3
BGPstate=Established,upfor02:
11:
05
BGPneighboris10.10.0.4, remoteAS65001,internallink
BGPversion4,remoterouterID10.10.0.4
BGPstate=Established,upfor02:
06:
34
BGPneighboris10.10.12.1, remoteAS65002,externallink
BGPversion4,remoterouterID10.20.0.1
BGPstate=Established,upfor01:
59:
57
R3#showipbgpneighbors
BGPneighboris10.10.0.2, remoteAS65001,internallink
Memberofpeer-groupas65001-rrforsessionparameters
BGPversion4,remoterouterID10.10.0.2
BGPstate=Established,upfor02:
12:
26
BGPneighboris10.10.0.4, remoteAS65001,internallink
BGPversion4,remoterouterID10.10.0.4
BGPstate=Established,upfor02:
07:
38
BGPneighboris10.10.0.5, remoteAS65001,internallink
Memberofpeer-groupas65001-rrforsessionparameters
BGPversion4,remoterouterID10.10.0.5
BGPstate=Established,upfor01:
33:
47
R4#showipbgpneighbors
BGPneighboris10.10.0.2, remoteAS65001,internallink
Memberofpeer-groupas65001-rrforsessionparameters
BGPversion4,remoterouterID10.10.0.2
BGPstate=Established,upfor02:
09:
08
BGPneighboris10.10.0.3, remoteAS65001,internallink
BGPversion4,remoterouterID10.10.0.3
BGPstate=Established,upfor02:
09:
30
BGPneighboris10.10.0.5, remoteAS65001,internallink
Memberofpeer-groupas65001-rrforsessionparameters
BGPversion4,remoterouterID10.10.0.5
BGPstate=Established,upfor01:
35:
45
R5# showipbgpneighbors
BGPneighboris10.10.0.3, remoteAS65001,internallink
BGPversion4,remoterouterID10.10.0.3
BGPstate=Established,upfor01:
36:
07
BGPneighboris10.10.0.4, remoteAS65001,internallink
BGPversion4,remoterouterID10.10.0.4
BGPstate=Established,upfor01:
36:
32
R6#showipbgpneighbors
BGPneighboris10.10.56.1, remoteAS65001,externallink
BGPversion4,remoterouterID10.10.0.5
BGPstate=Established,upfor01:
36:
32
BGPneighboris10.20.0.1, remoteAS65002,internallink
BGPversion4,remoterouterID10.20.0.1
BGPstate=Established,upfor01:
37:
12
3)BGP路由策略部署(方案一:
Local_preference)
R1(config)#
ipprefix-listp3seq5permit10.13.0.0/16
ipprefix-listp4seq5permit10.14.0.0/16
ipprefix-listp4seq10permit10.15.0.0/16
!
route-mapas65001-inpermit10
matchipaddressprefix-listp3
setlocal-preference300
!
route-mapas65001-inpermit20
matchipaddressprefix-listp4
setlocal-preference200
!
route-mapas65001-inpermit30
neighbor10.10.12.2route-mapas65001-inin
R1#clearipbgp*soft
R6(config)#
ipprefix-listp3seq5permit10.13.0.0/16
!
ipprefix-listp4seq5permit10.14.0.0/16
ipprefix-listp4seq10permit10.15.0.0/16
!
route-mapas65001-inpermit10
matchipaddressprefix-listp3
setlocal-preference200
!
route-mapas65001-inpermit20
matchipaddressprefix-listp4
setlocal-preference300
!
route-mapas65001-inpermit30
!
neighbor10.10.56.1route-mapas65001-inin
R6#clear ipbgp*soft
R2(config)#
ipprefix-listp1seq5permit10.20.0.0/16
!
ipprefix-listp6seq5permit10.30.0.0/16
!
route-mapas65002-inpermit10
matchipaddressprefix-listp1
setlocal-preference300
!
route-mapas65002-inpermit20
matchipaddressprefix-listp6
setlocal-preference200
!
route-mapas65002-inpermit30
neighbor10.10.12.1route-mapas65002-inin
R2#clear ipbgp*soft
ipprefix-listp1seq5permit10.20.0.0/16
!
ipprefix-listp6seq5permit10.30.0.0/16
!
route-mapas65002-inpermit10
matchipaddressprefix-listp1
setlocal-preference200
!
route-mapas65002-inpermit20
matchipaddressprefix-listp6
setlocal-preference300
neighbor10.10.56.2route-mapas65002-inin
R5#clear ipbgp*soft
查看设备的BGP表
R1#showipbgp
Network NextHop MetricLocPrfWeightPath
*>10.13.0.0/16 10.10.12.2 300 065001i
*>i10.14.0.0/16 10.30.0.5 0 300 065001i
* 10.10.12.2 200 065001i
*>i10.15.0.0/16 10.30.0.5 0 300 065001i
* 10.10.12.2 200 065001i
//选择localpreference最大的路由
//BGP只把最优的路由通告给它的邻居:
以及基于邻居的水平分割
R2#showipbgp
*>10.20.0.0/16 10.10.12.1 0 300 065002i
*i10.30.0.0/16 10.10.0.5 0 300 065002i
*>i 10.10.0.5 0 300 065002i
* 10.10.12.1 0 200 065002i
//选择localpreference最大的路由
//选择routerid最大的BGP邻居通告的路由
//BGP只把最优的路由通告给它的邻居:
以及基于邻居的水平分割
//从IBGP学习到的路由不通告给其他的IBGP邻居
R3#showipbgp
*>i10.20.0.0/16 10.10.0.2 0 300 065002i
*>i10.30.0.0/16 10.10.0.5 0 300 065002i
R4#showipbgp
*>i10.20.0.0/16 10.10.0.2 0 300 065002i
*>i10.30.0.0/16 10.10.0.5 0 300 065002i
R5#showipbgp
*i10.20.0.0/16 10.10.0.2 0 300 065002i
* 10.10.56.2 0 200 065002i
*>i 10.10.0.2 0 300 065002i
*>10.30.0.0/16 10.10.56.2 0 300 065002i
//来吧,我们解释一下这里为这么10.20.0.0/16有三条,而10.30.0.0/16有一条:
首先,在刚开始的时候,R2将10.20.0./16网段发给R3,R5也将该网段发给R3,R3经过比较之后将从R2发过来的路由反射给R5,此时R5不会再发回去了(IBGP的水平分割),假设R5还与其他设备是BGP邻居关系,它只会将从R3反射过来的路由传播出去(传播最优路由),此时关于10.20.0.0/16网段有两个RR反射的和一个EBGP邻居传来的优先级是200的
而10.30.0.0/16网段根据前面的分析,及时这个网段从R1传到R2,R2再传到R3,但因为优先级是200,而R3从R5收到的关于该网段的优先级则为3
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 大型 BGP 组网 课件
![提示](https://static.bdocx.com/images/bang_tan.gif)