BGP组网实验简单配置.docx

上传人:b****1 文档编号:11078541 上传时间:2023-05-29 格式:DOCX 页数:53 大小:427.60KB
下载 相关 举报
BGP组网实验简单配置.docx_第1页
第1页 / 共53页
BGP组网实验简单配置.docx_第2页
第2页 / 共53页
BGP组网实验简单配置.docx_第3页
第3页 / 共53页
BGP组网实验简单配置.docx_第4页
第4页 / 共53页
BGP组网实验简单配置.docx_第5页
第5页 / 共53页
BGP组网实验简单配置.docx_第6页
第6页 / 共53页
BGP组网实验简单配置.docx_第7页
第7页 / 共53页
BGP组网实验简单配置.docx_第8页
第8页 / 共53页
BGP组网实验简单配置.docx_第9页
第9页 / 共53页
BGP组网实验简单配置.docx_第10页
第10页 / 共53页
BGP组网实验简单配置.docx_第11页
第11页 / 共53页
BGP组网实验简单配置.docx_第12页
第12页 / 共53页
BGP组网实验简单配置.docx_第13页
第13页 / 共53页
BGP组网实验简单配置.docx_第14页
第14页 / 共53页
BGP组网实验简单配置.docx_第15页
第15页 / 共53页
BGP组网实验简单配置.docx_第16页
第16页 / 共53页
BGP组网实验简单配置.docx_第17页
第17页 / 共53页
BGP组网实验简单配置.docx_第18页
第18页 / 共53页
BGP组网实验简单配置.docx_第19页
第19页 / 共53页
BGP组网实验简单配置.docx_第20页
第20页 / 共53页
亲,该文档总共53页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

BGP组网实验简单配置.docx

《BGP组网实验简单配置.docx》由会员分享,可在线阅读,更多相关《BGP组网实验简单配置.docx(53页珍藏版)》请在冰点文库上搜索。

BGP组网实验简单配置.docx

BGP组网实验简单配置

BGP邻居建立与路由发布

实验拓扑图:

实验配置:

1.接口ip地址配置

r1#showipintbrief

InterfaceIP-AddressOK?

MethodStatusProtocol

Serial0/010.10.13.1YESmanualupup

Serial0/110.10.1.5YESmanualupup

FastEthernet1/010.10.1.1YESmanualupup

Loopback010.10.0.1YESmanualupup

r2#showipintbrief

InterfaceIP-AddressOK?

MethodStatusProtocol

Serial0/010.20.24.1YESmanualupup

Serial0/110.10.1.9YESmanualupup

FastEthernet1/010.10.1.2YESmanualupup

Loopback010.10.0.2YESmanualupup

r3#showipintbrief

InterfaceIP-AddressOK?

MethodStatusProtocol

Serial0/010.10.13.2YESmanualupup

FastEthernet1/010.30.34.1YESmanualupup

Ethernet3/010.30.3.1YESmanualupup

Loopback010.30.0.1YESmanualupup

r4#showipintbrief

InterfaceIP-AddressOK?

MethodStatusProtocol

Serial0/010.20.24.2YESmanualupup

FastEthernet1/010.30.34.2YESmanualupup

Ethernet3/010.40.4.1YESmanualupup

Loopback010.40.0.1YESmanualupup

r5#showipintbrief

InterfaceIP-AddressOK?

MethodStatusProtocol

Serial0/010.10.1.6YESmanualupup

FastEthernet1/010.10.1.13YESmanualupup

Ethernet3/010.10.5.1YESmanualupup

Loopback010.10.0.5YESmanualupup

r6#showipintbrief

InterfaceIP-AddressOK?

MethodStatusProtocol

Serial0/010.10.1.10YESmanualupup

FastEthernet1/010.10.1.14YESmanualupup

Ethernet3/010.10.6.1YESmanualupup

Loopback010.10.0.6YESmanualupup

保证直连的连通性:

r1#ping10.10.13.2

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto10.10.13.2,timeoutis2seconds:

!

!

!

!

!

Successrateis100percent(5/5),round-tripmin/avg/max=8/22/40ms

r1#ping10.10.1.6

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto10.10.1.6,timeoutis2seconds:

!

!

!

!

!

Successrateis100percent(5/5),round-tripmin/avg/max=12/35/76ms

r1#ping10.10.1.2

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto10.10.1.2,timeoutis2seconds:

.!

!

!

!

Successrateis80percent(4/5),round-tripmin/avg/max=8/28/56ms

2.IGP路由协议配置

r1(config)#routerospf1

r1(config-router)#router-id1.1.1.1

r1(config-router)#net10.10.1.00.0.0.255area0

r1(config-router)#net10.10.0.10.0.0.0area0

r1(config-router)#net10.10.13.10.0.0.3area0

r1(config-router)#passive-interfaces0/0

//**配置被动接口,保护内部安全不被外部网络学习到自己自治系统的路由

r1(config-router)#$ormationoriginatealwaysmetric2000metric-type1

//**下发缺省路由

r2(config)#routerospf1

r2(config-router)#router-id2.2.2.2

r2(config-router)#net10.10.0.20.0.0.0area0

r2(config-router)#net10.10.1.00.0.0.255area0

r2(config-router)#redistributeconnectedmetric2000metric-type1subnets

//**重发布直连路由进ospf进程,让其他路由器学习到这条直连路由

r2(config-router)#$ormationoriginatealwaysmetric2000metric-type1

//**同样也发布缺省路由,作为r1的备份

r5(config)#routerospf1

r5(config-router)#net10.10.0.50.0.0.0area0

r5(config-router)#net10.10.1.130.0.0.3area0

r5(config-router)#net10.10.1.60.0.0.3area0

r5(config-router)#net10.10.5.10.0.0.255area0

r6(config)#routerospf1

r6(config-router)#router-id6.6.6.6

r6(config-router)#net10.10.0.60.0.0.0area0

r6(config-router)#net10.10.1.140.0.0.3area0

r6(config-router)#net10.10.6.10.0.0.255area0

r6(config-router)#net10.10.1.100.0.0.3area0

//**AS30和AS40里面只有一台路由器,无需运行IGP

将自治系统内的接口配置成点对点类型且ospfcost值配置为100:

r1(config)#intf1/0

r1(config-if)#ipospfnetpoint-to-p//**接口配置成点对点,节省收敛时间

r1(config-if)#ipospfcost100//**链路cost值统一配成100

r1(config)#ints0/1

r1(config-if)#ipospfnetpoint-to-p

r1(config-if)#ipospfcost100

r2(config)#intf1/0

r2(config-if)#ipospfnetpoint-to-p

r2(config-if)#ipospfcost100

r2(config)#ints0/1

r2(config-if)#ipospfnetpoint-to-p

r2(config-if)#ipospfcost100

r5(config)#ints0/0

r5(config-if)#ipospfnetpoint-to-p

r5(config)#intf1/0

r5(config-if)#ipospfnetpoint-to-p

r5(config-if)#ipospfcost100

r5(config-if)#ints0/0

r5(config-if)#ipospfcost100

r6(config)#intf1/0

r6(config-if)#ipospfnetp

r6(config-if)#ipospfnetpoint-to-p

r6(config)#ints0/1

r6(config-if)#ipospfnetpoint-to-p

r6(config)#intf1/0

r6(config-if)#ipospfcost100

r6(config-if)#ints0/0

r6(config-if)#ipospfcost100

查看邻居关系的建立:

r1#showipospfnei

NeighborIDPriStateDeadTimeAddressInterface

2.2.2.20FULL/-00:

00:

3510.10.1.2FastEthernet1/0

10.10.0.50FULL/-00:

00:

3210.10.1.6Serial0/1

r2#showipospfnei

NeighborIDPriStateDeadTimeAddressInterface

1.1.1.10FULL/-00:

00:

3010.10.1.1FastEthernet1/0

6.6.6.60FULL/-00:

00:

3410.10.1.10Serial0/1

r5#showipospfnei

NeighborIDPriStateDeadTimeAddressInterface

6.6.6.60FULL/-00:

00:

3410.10.1.14FastEthernet1/0

1.1.1.10FULL/-00:

00:

3610.10.1.5Serial0/0

r6#showipospfnei

NeighborIDPriStateDeadTimeAddressInterface

10.10.0.50FULL/-00:

00:

3310.10.1.13FastEthernet1/0

2.2.2.20FULL/-00:

00:

3910.10.1.9Serial0/0

BGP邻居建立:

r1(config)#routerbgp10//**定义自治系统号为10

r1(config-router)#nosynchronization//**关同步

r1(config-router)#noauto-summary//**关闭自动汇总

r1(config-router)#neighbor10.10.0.2remote-as10

//**与自治系统为10的10.10.0.2建立邻居关系

r1(config-router)#neighbor10.10.0.2update-sourceloopback0

//**使用loopback0接口来建立邻居关系

r1(config-router)#neighbor10.10.13.2remote-as30

//**与自治系统30的10.10.13.2建立邻居关系

r2(config)#routerbgp10

r2(config-router)#nosyn

r2(config-router)#noau

r2(config-router)#nei10.10.0.1remote-as10

r2(config-router)#neighbor10.10.0.1update-sourceloop0

r2(config-router)#nei10.20.24.2remote-as40

r3(config)#routerbgp30

r3(config-router)#nosynchronization

r3(config-router)#noau

r3(config-router)#nei10.10.13.1remote-as10

r3(config-router)#nei10.30.34.2remote-as40

r4(config)#routerbgp40

r4(config-router)#nosyn

r4(config-router)#noau

r4(config-router)#nei10.20.24.1remote-as10

r4(config-router)#nei10.30.34.1remote-as30

查看bgp邻居表:

r1#showipbgpsum

BGProuteridentifier10.10.0.1,localASnumber10

BGPtableversionis4,mainroutingtableversion4

3networkentriesusing351bytesofmemory

5pathentriesusing260bytesofmemory

6/3BGPpath/bestpathattributeentriesusing744bytesofmemory

3BGPAS-PATHentriesusing72bytesofmemory

0BGProute-mapcacheentriesusing0bytesofmemory

0BGPfilter-listcacheentriesusing0bytesofmemory

BGPusing1427totalbytesofmemory

BGPactivity3/0prefixes,5/0paths,scaninterval60secs

NeighborVASMsgRcvdMsgSentTblVerInQOutQUp/DownState/PfxRcd

10.10.0.241011511540001:

49:

092

10.10.13.243011311340001:

47:

492

r2#showipbgpsum

NeighborVASMsgRcvdMsgSentTblVerInQOutQUp/DownState/PfxRcd

10.10.0.141011511570001:

49:

432

10.20.24.244011611470001:

47:

122

r3#showipbgpsum

NeighborVASMsgRcvdMsgSentTblVerInQOutQUp/DownState/PfxRcd

10.10.13.141011411440001:

48:

462

10.30.34.244011611440001:

47:

192

r4#showipbgpsum

NeighborVASMsgRcvdMsgSentTblVerInQOutQUp/DownState/PfxRcd

10.20.24.141011511760001:

48:

232

10.30.34.143011511760001:

48:

082

//**i表示network发布的igp

//**e表示egp协议发布egp

//**?

表示redistribute发布incomplete

BGP路由发布(静态注入):

r1(config)#iproute10.10.0.0255.255.0.0null0//**黑洞路由配置,当去往目标网段down时,能够在本路由器上就丢包,不会在去往其他路由器而占用带宽

r1(config)#routerbgp10

r1(config-router)#network10.10.0.0mask255.255.0.0//**将10.10.0.0网段手动静态注入BGP,使BGP能承载这些路由

其他路由器也进行相应配置:

r2(config)#iproute10.10.0.0255.255.0.0null0

r2(config)#routerbgp10

r2(config-router)#net10.10.0.0mask255.255.0.0

r3(config)#iproute10.30.0.0255.255.0.0null0

r3(config)#routerbgp30

r3(config-router)#net10.30.0.0mask255.255.0.0

r4(config)#iproute10.40.0.0255.255.0.0null0

r4(config)#routerbgp40

r4(config-router)#net10.40.0.0mask255.255.0.0

查看bgp表和全局路由表:

r1#showipbgp

BGPtableversionis4,localrouterIDis10.10.0.1

Statuscodes:

ssuppressed,ddamped,hhistory,*valid,>best,i-internal,

rRIB-failure,SStale

Origincodes:

i-IGP,e-EGP,?

-incomplete

NetworkNextHopMetricLocPrfWeightPath

*i10.10.0.0/1610.10.0.201000i

*>0.0.0.0032768i

*>10.30.0.0/1610.10.13.20030i

*10.40.0.0/1610.10.13.203040i

*>i10.20.24.20100040i

//**Bgp表只选择最佳路由,*表示存在这样一条链路但是没有选择其进路由表,原因是选10.10.13.2作为下一跳要经过30和40两个自治系统,而如果选择10.20.24.2为下一跳只需经过40这一个自治系统,路由器会选择AS_path最短的路由

r1#showiproute

10.0.0.0/8isvariablysubnetted,15subnets,4masks

S10.10.0.0/16isdirectlyconnected,Null0

C10.10.1.0/30isdirectlyconnected,FastEthernet1/0

C10.10.0.1/32isdirectlyconnected,Loopback0

O10.10.0.2/32[110/101]via10.10.1.2,01:

02:

20,FastEthernet1/0

O10.10.5.0/24[110/110]via10.10.1.6,01:

02:

20,Serial0/1

C10.10.1.4/30isdirectlyconnected,Serial0/1

O10.10.0.5/32[110/101]via10.10.1.6,01:

02:

20,Serial0/1

OE110.20.24.0/30[110/2100]via10.10.1.2,01:

02:

20,FastEthernet1/0

O10.10.6.0/24[110/210]via10.10.1.6,01:

02:

20,Serial0/1

[110/210]via10.10.1.2,01:

02:

20,FastEthernet1/0

O10.10.0.6/32[110/201]via10.10.1.6,01:

02:

20,Serial0/1

[110/201]via10.10.1.2,01:

02:

20,FastEthernet1/0

O10.10.1.8/30[110/200]via10.10.1.2,01:

02:

21,FastEthernet1/0

C10.10.13.0/30isdirectlyconnected,Serial0/0

O10.10.1.12/30[110/200]via10.10.1.6,01:

02:

21,Serial0/1

B10.30.0.0/16[20/0]via10.10.13.2,01:

55:

17

B10.40.0.0/16[200/0]via10.20.24.2,01:

54:

25

//**两条bgp路由一条管理距离为20,为外部r3学习到的,一条管理距离为200为自己自治系统r2发的。

r2#showipbgp

BGPtableversionis7,localrouterIDis10.10.0.2

Statuscodes:

ssuppressed,ddamped,hhistory,*valid,>best,i-internal,

rRIB-failure,SStale

Origincodes:

i-IGP,e-EGP,?

-incomplete

NetworkNextHopMetricLocPrfWeightPath

*>10.10.0.0/160.0.0.0032768i

//**Cisco:

选择weight值最高的,其他厂家:

选择本地始发路由,下一跳为0.0.0.0,只有向邻居通告是才将下一跳改为自己

*i10.10.0.101000i

*10.30.0.0/1610.20.24.204030i

*>i10.10.13.20100

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > PPT模板 > 简洁抽象

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2