BGP和OSPF在路由重分发时的注意点.docx

上传人:b****5 文档编号:24837004 上传时间:2023-06-02 格式:DOCX 页数:23 大小:127.03KB
下载 相关 举报
BGP和OSPF在路由重分发时的注意点.docx_第1页
第1页 / 共23页
BGP和OSPF在路由重分发时的注意点.docx_第2页
第2页 / 共23页
BGP和OSPF在路由重分发时的注意点.docx_第3页
第3页 / 共23页
BGP和OSPF在路由重分发时的注意点.docx_第4页
第4页 / 共23页
BGP和OSPF在路由重分发时的注意点.docx_第5页
第5页 / 共23页
点击查看更多>>
下载资源
资源描述

BGP和OSPF在路由重分发时的注意点.docx

《BGP和OSPF在路由重分发时的注意点.docx》由会员分享,可在线阅读,更多相关《BGP和OSPF在路由重分发时的注意点.docx(23页珍藏版)》请在冰豆网上搜索。

BGP和OSPF在路由重分发时的注意点.docx

BGP和OSPF在路由重分发时的注意点

 

RGNOSv10.3(3)

BGP和OSPF在路由重分发时的注意点

2008-5-15

 

福建星网锐捷网络有限公司

版权所有XX

前言

本文档介绍了RGNOSV10.3(3)中BGP和OSPF路由重发布时的一些实现特点。

由于这些特点区别于友商CISCO的BGP功能实现,在具体的项目实施过程中需要注意。

1.☹         本文档仅限公司内部使用,严禁外传。

1.☺         如果您在阅读中产生疑问,请与文档维护人联系。

1.1             OSPF重分发BGP路由

1.1.1       注意点

1.K         这里Cisco验证的版本为c7200-adventerprisek9-mz.124-9.T1.bin

项目

Ruijie

Cisco

备注

BGP路由的下发

BGP不会将直连路由下发到核心路由表,因此重分发BGP路由的时候是没有BGP的直连路由

BGP会将BGP的直连路由下发到核心路由表,因此重分发BGP路由的时候,会重分发BGP的直连路由

解决方法:

在OSPF配置BGP的直连路由,参看“重分发BGP的直连路由”。

重分发IBGP路由

默认重分发所有BGP路由

默认不允许重分发BGP的IBGP路由。

在BGP配置模式下可以使用bgpredistribute-internal命令允许IGP协议重分发IBGP路由

解决方法:

1、RGNOSv10.3(4)将增加支持bgpredistribute-internal功能;

2、使用route-map的matchroute-type功能,参看“重分发IBGP路由”。

BGP路由下发的控制

不对下发的路由进行控制

可以使用table-map修改下发到核心路由表的路由属性

解决方法:

1、RGNOSv10.3(4)将增加支持table-map功能。

2.1.2       应用实例

1.1.2.1  网络拓扑

四台设备之间建立EBGP/IBGP/EBGP连接。

C1为CISCO3550、C2、C3是Cisco模拟器,R1是我司设备,实验设备为RG-S5750。

C1和R1建立EBGP连接,R1和C2建立IBGP连接,C2和C3建立EBGP连接。

其中C1和C3主要是发送路由,具体的操作在R1和C2。

2.1.2.2  配置文件

C1简化配置

C1#shorunning-config

Buildingconfiguration...

Currentconfiguration:

2557bytes

!

version12.2

noservicepad

servicetimestampsdebuguptime

servicetimestampsloguptime

noservicepassword-encryption

!

hostnameC1

!

!

noaaanew-model

ipsubnet-zero

iprouting

!

!

!

!

!

!

nofileverifyauto

spanning-treemodepvst

spanning-treeextendsystem-id

!

vlaninternalallocationpolicyascending

!

!

interfaceLoopback0

ipaddress1.1.1.1255.255.255.255

!

interfaceFastEthernet0/1

noswitchport

ipaddress192.168.16.1255.255.255.248

!

interfaceFastEthernet0/2

switchportmodedynamicdesirable

!

interfaceFastEthernet0/3

switchportmodedynamicdesirable

!

...

!

routerbgp1

nosynchronization

bgplog-neighbor-changes

redistributestatic

neighbor192.168.16.2remote-as23

noauto-summary

!

ipclassless

iproute192.168.111.0255.255.255.0Loopback0

iproute192.168.112.0255.255.255.0Loopback0

iphttpserver

iphttpsecure-server

!

!

!

control-plane

!

!

linecon0

linevty04

privilegelevel15

passwordw

login

!

!

end

C1#

C2简化配置

C2#shorunn

Buildingconfiguration...

Currentconfiguration:

1450bytes

!

version12.4

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameC2

!

boot-start-marker

warm-reboot

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

ipcef

!

!

!

!

interfaceLoopback0

ipaddress192.168.125.1255.255.255.0secondary

ipaddress192.168.126.1255.255.255.0secondary

ipaddress2.2.2.2255.255.255.255

!

interfaceFastEthernet0/0

ipaddress192.168.26.2255.255.255.248

duplexfull

!

interfaceEthernet1/0

noipaddress

shutdown

duplexhalf

!

interfaceEthernet1/1

noipaddress

shutdown

duplexhalf

!

interfaceEthernet1/2

noipaddress

shutdown

duplexhalf

!

interfaceEthernet1/3

ipaddress192.168.23.1255.255.255.248

duplexfull

!

routerospf1

log-adjacency-changes

network2.2.2.20.0.0.0area0

network192.168.26.00.0.0.7area0

!

routerbgp23

nosynchronization

bgplog-neighbor-changes

network192.168.125.0

network192.168.126.0

neighbor6.6.6.6remote-as23

neighbor6.6.6.6update-sourceLoopback0

neighbor6.6.6.6next-hop-self

neighbor192.168.23.2remote-as3

noauto-summary

!

noiphttpserver

noiphttpsecure-server

!

!

...

!

linecon0

stopbits1

lineaux0

linevty04

privilegelevel15

passwordw

login

!

!

end

C2#

C3简化配置

C3#shorunn

Buildingconfiguration...

Currentconfiguration:

1178bytes

!

version12.4

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameC3

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

ipcef

!

!

!

!

!

!

interfaceLoopback0

ipaddress3.3.3.3255.255.255.255

!

interfaceFastEthernet0/0

noipaddress

shutdown

duplexfull

!

interfaceEthernet1/0

noipaddress

shutdown

duplexhalf

!

interfaceEthernet1/1

noipaddress

shutdown

duplexhalf

!

interfaceEthernet1/2

noipaddress

shutdown

duplexhalf

!

interfaceEthernet1/3

ipaddress192.168.23.2255.255.255.248

duplexfull

!

routerbgp3

nosynchronization

bgplog-neighbor-changes

redistributestatic

neighbor192.168.23.1remote-as23

noauto-summary

!

iproute192.168.131.0255.255.255.0Loopback0

iproute192.168.132.0255.255.255.0Loopback0

noiphttpserver

noiphttpsecure-server

!

!

!

loggingalarminformational

!

...

!

linecon0

stopbits1

lineaux0

linevty04

privilegelevel15

passwordw

login

!

!

end

C2#

R1简化配置

R1#showrunn

Buildingconfiguration...

Currentconfiguration:

2080bytes

!

versionRGNOS10.3.00(3),Release(38105)(FriApr2515:

29:

44CST2008-ngcf31)

hostnameR1

co-operateenable

!

!

!

!

route-mapospf_redistpermit10

matchroute-typeexternal

!

vlan1

!

!

!

!

!

interfaceGigabitEthernet0/1

noswitchport

noipproxy-arp

ipaddress192.168.26.1255.255.255.248

!

interfaceGigabitEthernet0/2

!

...

!

interfaceGigabitEthernet0/23

!

interfaceGigabitEthernet0/24

noswitchport

noipproxy-arp

ipaddress192.168.16.2255.255.255.248

!

interfaceLoopback0

ipaddress6.6.6.6255.255.255.255

ipaddress192.168.165.1255.255.255.0secondary

ipaddress192.168.166.1255.255.255.0secondary

!

!

!

!

!

!

!

!

routerbgp23

neighbor2.2.2.2remote-as23

neighbor2.2.2.2update-sourceLoopback0

neighbor192.168.16.1remote-as1

!

address-familyipv4

network192.168.165.0

network192.168.166.0

neighbor2.2.2.2activate

neighbor2.2.2.2next-hop-self

neighbor192.168.16.1activate

exit-address-family

!

!

routerospf1

router-id6.6.6.6

network6.6.6.60.0.0.0area0

network192.168.26.00.0.0.7area0

!

!

!

iproute192.168.161.0255.255.255.0Loopback0

iproute192.168.162.0255.255.255.0Loopback0

!

!

linecon0

linevty010

privilegelevel15

login

passwordw

!

!

end

3.1.2.3  检验配置效果

C2

使用showipbgp可以看到125.0/126.0是源发路由,111.0/112.0/165.0/166.0是IBGP路由,131.0/132.0是EBGP路由。

使用showipospfdatabase可以看到,OSPF中没有外部路由。

C2#showipbgp

BGPtableversionis25,localrouterIDis2.2.2.2

Statuscodes:

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

rRIB-failure,SStale

Origincodes:

i-IGP,e-EGP,?

-incomplete

NetworkNextHopMetricLocPrfWeightPath

*>i192.168.111.06.6.6.6010001?

*>i192.168.112.06.6.6.6010001?

*>192.168.125.00.0.0.0032768i

*>192.168.126.00.0.0.0032768i

*>192.168.131.0192.168.23.2003?

*>192.168.132.0192.168.23.2003?

*>i192.168.165.06.6.6.601000i

*>i192.168.166.06.6.6.601000i

C2#showipospfdata

OSPFRouterwithID(2.2.2.2)(ProcessID1)

RouterLinkStates(Area0)

LinkIDADVRouterAgeSeq#ChecksumLinkcount

2.2.2.22.2.2.2910x800000090x00B6402

6.6.6.66.6.6.64980x800000040x00CD202

NetLinkStates(Area0)

LinkIDADVRouterAgeSeq#Checksum

192.168.26.22.2.2.2910x800000030x00C1CF

C2#

R1

使用showipbgp可以看到165.0/166.0是源发路由,125.0/126.0/131.0/132.0是IBGP路由,111.0/112.0是EBGP路由。

使用showipospfdatabase可以看到,OSPF中没有外部路由。

R1#showipbgp

BGPtableversionis9,localrouterIDis192.168.166.1

Statuscodes:

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

SStale

Origincodes:

i-IGP,e-EGP,?

-incomplete

NetworkNextHopMetricLocPrfPath

*>192.168.111.0192.168.16.101?

*>192.168.112.0192.168.16.101?

*>i192.168.125.02.2.2.20100i

*>i192.168.126.02.2.2.20100i

*>i192.168.131.02.2.2.201003?

*>i192.168.132.02.2.2.201003?

*>192.168.165.00.0.0.00i

*>192.168.166.00.0.0.00i

Totalnumberofprefixes8

R1#showipospfdata

OSPFRouterwithID(6.6.6.6)(ProcessID1)

RouterLinkStates(Area0.0.0.0)

LinkIDADVRouterAgeSeq#CkSumLinkcount

2.2.2.22.2.2.22540x800000090xb6402

6.6.6.66.6.6.66590x800000040xcd202

NetworkLinkStates(Area0.0.0.0)

LinkIDADVRouterAgeSeq#CkSum

192.168.26.22.2.2.22530x800000030xc1cf

4.1.2.4  重分发BGP的直连路由

C2

配置OSPF重分发BGP路由:

routerospf1

redistributebgp23subnets

使用showipospfdatabase可以看到EBGP路由(131.0/132.0)和直连路由(125.0/126.0)都重分发给OSPF,而IBGP路由没有重分发给OSPF。

因此可以看出Cisco会向下通告BGP的直连路由(这里是通过network命令配置的路由)。

C2#shoipospfdatabase

OSPFRouterwithID(2.2.2.2)(ProcessID1)

RouterLinkStates(Area0)

LinkIDADVRouterAgeSeq#ChecksumLinkcount

2.2.2.22.2.2.2140x8000000A0x00BA392

6.6.6.66.6.6.69310x800000040x00CD202

NetLinkStates(Area0)

LinkIDADVRouterAgeSeq#Checksum

192.168.26.22.2.2.25240x800000030x00C1CF

Type-5ASExternalLinkStates

LinkIDADVRouterAgeSeq#ChecksumTag

192.168.125.02.2.2.2130x800000010x00D6ED0

192.168.126.02.2.2.2130x800000010x00CBF70

192.168.131.02.2.2.2130x800000010x00CAF03

192.168.132.02.2.2.2130x800000010x00BFFA3

R1

配置OSPF重分发BGP路由:

routerospf1

redistributebgpsubnets

使用showipospfdatabase可以看到IBGP路由(125.0/126.0/131.0/132.0)和EBGP路由(111.0/112.0)都重分发给OSPF的,而这里没有直连路由(165.0/166.0)。

因为现在的实现中,BGP的直连路由是不下发的,因此重分发BGP路由的时候BGP的直连路由是不会被重分发的。

R1#shoipospfdatabase

OSPFRouterwithID(6.6.6.6)(ProcessID1)

RouterLinkStates(Area0.0.0.0)

LinkIDADVRouterAgeSeq#CkSumLinkcount

2.2.2.22.2.2.27810x800000110xa6482

6.6.6.66.6.6.690x800000140xb3282

NetworkLinkStates(Area0.0.0.0)

LinkIDADVRouterAgeSeq#CkSum

192.168.26.22.2.2.215440x800000080xb7d4

ASExternalLinkStates

LinkIDADVRouterAgeSeq#CkSumRouteTag

192.168.111.06.6.6.680x800000010xbc24E2192.168.111.0/240

192.168.112.06.6.6.680x800000010xb12eE2192.168.112.0/240

192.168.125.06.6.6.680x800000010x22b0E2

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

当前位置:首页 > 高中教育 > 小学教育

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1