BGP和OSPF在路由重分发时的注意点_第1页
BGP和OSPF在路由重分发时的注意点_第2页
BGP和OSPF在路由重分发时的注意点_第3页
BGP和OSPF在路由重分发时的注意点_第4页
BGP和OSPF在路由重分发时的注意点_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

RGNOSv10.3(3)

BGP和OSPF在路由重分发时的注意点2008-5-15福建星网锐捷网络版权所有侵权必究前言本文档介绍了RGNOSV10.3(3)中BGP和OSPF路由重发布时的一些实现特点。由于这些特点区别于友商CISCO的BGP功能实现,在具体的工程实施过程中需要注意。本文档仅限公司内部使用,严禁外传。如果您在阅读中产生疑问,请与文档维护人联系。目录1OSPF重分发BGP路由1.1注意点这里Cisco验证的版本为工程RuijieCisco备注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功能。1.2应用实例网络拓扑四台设备之间建立EBGP/IBGP/EBGP连接。C1为CISCO3550、C2、C3是Cisco模拟器,R1是我司设备,实验设备为RG-S5750。C1和R1建立EBGP连接,R1和C2建立IBGP连接,C2和C3建立EBGP连接。其中C1和C3主要是发送路由,具体的操作在R1和C2。配置文件C1 简化配置C1#shorunning-configBuildingconfiguration...Currentconfiguration:2557bytes!version12.2noservicepadservicetimestampsdebuguptimeservicetimestampsloguptimenoservicepassword-encryption!hostnameC1!!noaaanew-modelipsubnet-zeroiprouting!!!!!!nofileverifyautospanning-treemodepvstspanning-treeextendsystem-id!vlaninternalallocationpolicyascending!!interfaceLoopback0ipaddress!interfaceFastEthernet0/1noswitchport!interfaceFastEthernet0/2switchportmodedynamicdesirable!interfaceFastEthernet0/3switchportmodedynamicdesirable!...!routerbgp1nosynchronizationbgplog-neighbor-changesredistributestaticneighbor192.168.16.2remote-as23noauto-summary!ipclasslessiproute192.168.111.0255.255.255.0Loopback0iproute192.168.112.0255.255.255.0Loopback0ipserveripsecure-server!!!control-plane!!linecon0linevty04privilegelevel15passwordwlogin!!endC1#C2简化配置C2#shorunnBuildingconfiguration...Currentconfiguration:1450bytes!version12.4servicetimestampsdebugdatetimemsecservicetimestampslogdatetimemsecnoservicepassword-encryption!hostnameC2!boot-start-markerwarm-rebootboot-end-marker!!noaaanew-model!resourcepolicy!ipcef!!!!interfaceLoopback0ipaddress192.168.125.1255.255.255.0secondaryipaddress192.168.126.1255.255.255.0secondaryipaddress!interfaceFastEthernet0/0duplexfull!interfaceEthernet1/0noipaddressshutdownduplexhalf!interfaceEthernet1/1noipaddressshutdownduplexhalf!interfaceEthernet1/2noipaddressshutdownduplexhalf!interfaceEthernet1/3duplexfull!routerospf1log-adjacency-changesnetwork.20.0.0.0area0network192.168.26.0.7area0!routerbgp23nosynchronizationbgplog-neighbor-changesneighbor.6remote-as23neighbor.6update-sourceLoopback0neighbor.6next-hop-selfneighbor192.168.23.2remote-as3noauto-summary!noipservernoipsecure-server!!...!linecon0stopbits1lineaux0linevty04privilegelevel15passwordwlogin!!endC2#C3简化配置C3#shorunnBuildingconfiguration...Currentconfiguration:1178bytes!version12.4servicetimestampsdebugdatetimemsecservicetimestampslogdatetimemsecnoservicepassword-encryption!hostnameC3!boot-start-markerboot-end-marker!!noaaanew-model!resourcepolicy!ipcef!!!!!!interfaceLoopback0ipaddress!interfaceFastEthernet0/0noipaddressshutdownduplexfull!interfaceEthernet1/0noipaddressshutdownduplexhalf!interfaceEthernet1/1noipaddressshutdownduplexhalf!interfaceEthernet1/2noipaddressshutdownduplexhalf!interfaceEthernet1/3duplexfull!routerbgp3nosynchronizationbgplog-neighbor-changesredistributestaticneighbor192.168.23.1remote-as23noauto-summary!iproute192.168.131.0255.255.255.0Loopback0iproute192.168.132.0255.255.255.0Loopback0noipservernoipsecure-server!!!loggingalarminformational!...!linecon0stopbits1lineaux0linevty04privilegelevel15passwordwlogin!!endC2#R1简化配置R1#showrunnBuildingconfiguration...Currentconfiguration:2080bytes!versionRGNOS(3),Release(38105)(FriApr2515:29:44CST2023-ngcf31)hostnameR1co-operateenable!!!!route-mapospf_redistpermit10matchroute-typeexternal!vlan1!!!!!interfaceGigabitEthernet0/1noswitchportnoipproxy-arp!interfaceGigabitEthernet0/2!...!interfaceGigabitEthernet0/23!interfaceGigabitEthernet0/24noswitchportnoipproxy-arp!interfaceLoopback0ipaddressipaddress192.168.165.1255.255.255.0secondaryipaddress192.168.166.1255.255.255.0secondary!!!!!!!!routerbgp23neighbor.2remote-as23neighbor.2update-sourceLoopback0neighbor192.168.16.1remote-as1!address-familyipv4neighbor.2activateneighbor.2next-hop-selfneighbor192.168.16.1activateexit-address-family!!routerospf1router-id.6network.60.0.0.0area0network192.168.26.0.7area0!!!iproute192.168.161.0255.255.255.0Loopback0iproute192.168.162.0255.255.255.0Loopback0!!linecon0linevty010privilegelevel15loginpasswordw!!end检验配置效果C2使用showipbgp可以看到125.0/126.0是源发路由,111.0/112.0/165.0/166.0是IBGP路由,131.0/132.0是EBGP路由。使用showipospfdatabase可以看到,OSPF中没有外部路由。C2#showipbgpBGPtableversionis25,localrouterIDis.2Statuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-internal,rRIB-failure,SStaleOrigincodes:i-IGP,e-EGP,?-incompleteNetworkNextHopMetricLocPrfWeightPath*>i192.168.111.0.6010001?*>i192.168.112.0.6010001?*>192.168.125.0.0032768i*>192.168.126.0.0032768i*>192.168.131.0192.168.23.2003?*>192.168.132.0192.168.23.2003?*>i192.168.165.0.601000i*>i192.168.166.0.601000iC2#showipospfdataOSPFRouterwithID(.2)(ProcessID1)RouterLinkStates(Area0)LinkIDADVRouterAgeSeq#ChecksumLinkcount.2.2910x800000090x00B6402.6.64980x800000040x00CD202NetLinkStates(Area0)LinkIDADVRouterAgeSeq#Checksum192.168.26.2.2910x800000030x00C1CFC2#R1使用showipbgp可以看到165.0/166.0是源发路由,125.0/126.0/131.0/132.0是IBGP路由,111.0/112.0是EBGP路由。使用showipospfdatabase可以看到,OSPF中没有外部路由。R1#showipbgpStatuscodes:ssuppressed,ddamped,hhistory,*valid,>best,i-internal,SStaleOrigincodes:i-IGP,e-EGP,?-incompleteNetworkNextHopMetricLocPrfPath*>192.168.111.0192.168.16.101?*>192.168.112.0192.168.16.101?*>i192.168.125.0.20100i*>i192.168.126.0.20100i*>i192.168.131.0.201003?*>i192.168.132.0.201003?*>192.168.165.0.00i*>192.168.166.0.00iTotalnumberofprefixes8R1#showipospfdataOSPFRouterwithID(.6)(ProcessID1)RouterLinkStates(Are.0)LinkIDADVRouterAgeSeq#CkSumLinkcount.2.22540x800000090xb6402.6.66590x800000040xcd202NetworkLinkStates(Are.0)LinkIDADVRouterAgeSeq#CkSum192.168.26.2.22530x800000030xc1cf重分发BGP的直连路由C2配置OSPF重分发BGP路由:routerospf1redistributebgp23subnets使用showipospfdatabase可以看到EBGP路由(131.0/132.0)和直连路由(125.0/126.0)都重分发给OSPF,而IBGP路由没有重分发给OSPF。因此可以看出Cisco会向下通告BGP的直连路由〔这里是通过network命令配置的路由〕。C2#shoipospfdatabaseOSPFRouterwithID(.2)(ProcessID1)RouterLinkStates(Area0)LinkIDADVRouterAgeSeq#ChecksumLinkcount.2.2140x8000000A0x00BA392.6.69310x800000040x00CD202NetLinkStates(Area0)LinkIDADVRouterAgeSeq#Checksum192.168.26.2.25240x800000030x00C1CFType-5ASExternalLinkStatesLinkIDADVRouterAgeSeq#ChecksumTag192.168.125.0.2130x800000010x00D6ED0192.168.126.0.2130x800000010x00CBF70192.168.131.0.2130x800000010x00CAF03192.168.132.0.2130x800000010x00BFFA3R1配置OSPF重分发BGP路由:routerospf1redistributebgpsubnets使用showipospfdatabase可以看到IBGP路由(125.0/126.0/131.0/132.0)和EBGP路由(111.0/112.0)都重分发给OSPF的,而这里没有直连路由(165.0/166.0)。因为现在的实现中,BGP的直连路由是不下发的,因此重分发BGP路由的时候BGP的直连路由是不会被重分发的。R1#shoipospfdatabaseOSPFRouterwithID(.6)(ProcessID1)RouterLinkStates(Are.0)LinkIDADVRouterAgeSeq#CkSumLinkcount.2.27810x800000110xa6482.6.690x800000140xb3282NetworkLinkStates(Are.0)LinkIDADVRouterAgeSeq#CkSum192.168.26.2.215440x800000080xb7d4ASExternalLinkStatesLinkIDADVRouterAgeSeq#CkSumRouteTag192.168.111.0192.168.112.0192.168.125.0192.168.126.0192.168.131.0192.168.132.0.680x800000010xd4f因此需要重分发BGP的直连路由,就必须手工的在OSPF中配置BGP的直连路由。比方:routerospf1network192.168.165.0.255area0network192.168.166.0.255area0重分发IBGP路由C2配置OSPF重分发BGP路由:routerospf1redistributebgp23subnets使用showipospfdatabase可以看到IBGP路由(111.0/112.0/165.0/166.0)是不会重分发给OSPF,而EBGP路由(131.0/132.0)和源发路由(125.0/126.0)会重分发给OSPF。因此可以看出Cisco默认缺省是不重分发IBGP路由的,其它的EBGP路由和源发路由是可以被重分发的。C2#shoipospfdatabaseOSPFRouterwithID(.2)(ProcessID1)RouterLinkStates(Area0)LinkIDADVRouterAgeSeq#ChecksumLinkcount.2.2140x800000100x00AE3F2.6.62150x8000000F0x00C2DE4NetLinkStates(Area0)LinkIDADVRouterAgeSeq#Checksum192.168.26.2.25380x800000080x00B7D4Type-5ASExternalLinkStatesLinkIDADVRouterAgeSeq#ChecksumTag192.168.125.0.2130x800000010x00D6ED0192.168.126.0.2130x800000010x00CBF70192.168.131.0.2130x800000010x00CAF03192.168.132.0.2130x800000010x00BFFA3Cisco可以在BGP模式下使用bgpredistribute-internal命令允许IBGP路由重分发给IGP协议:routerbgp23bgpredistribute-internal此时使用showipospfdatabase可以看到,IBGP路由被重分发到OSPF中:C2#shoipospfdatabaseOSPFRouterwithID(.2)(ProcessID1)RouterLinkStates(Area0)LinkIDADVRouterAgeSeq#ChecksumLinkcount.2.21460x800000100x00AE3F2.6.63480x8000000F0x00C2DE4NetLinkStates(Area0)LinkIDADVRouterAgeSeq#Checksum192.168.26.2.26710x800000080x00B7D4Type-5ASExternalLinkStatesLinkIDADVRouterAgeSeq#ChecksumTag192.168.111.0.240x800000010x00834E1192.168.112.0.240x800000010x0078581192.168.125.0.21450x800000010x00D6ED0192.168.126.0.21450x800000010x00CBF70192.168.131.0.21450x800000010x00CAF03192.168.132.0.21450x800000010x00BFFA3192.168.165.0.240x800000010x001D7F0192.168.166.0.250x800000010x0012890R1配置OSPF重分发BGP路由:routerospf1redistributebgpsubnets使用showipospfdatabase可以看到IBGP路由(125.0/126.0/131.0/132.0)和EBGP路由(111.0/112.0)都重分发给OSPF的(这里没有源发路由)。这就是与Cisco不一致的地方:Cisco缺省不重分发IBGP路由,而Ruijie是重分发所有BGP路由的。R1#shoipospfdatabaseOSPFRouterwithID(.6)(ProcessID1)RouterLinkStates(Are.0)LinkIDADVRouterAg

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论