AR3260 EBGP路由学习不到

发布时间:  2016-09-19 浏览次数:  140 下载次数:  0
问题描述


如图AR1AR2AR2AR3建立了EBGP邻居,AR3是运营商设备,配置不可获得且不能查看。问题:在AR2

能学习到AR3通告的EBGP路由,AR1能学习到AR2通告的路由却学习不到AR3通告的路由。

AR2

bgp 6002

 peer 10.1.1.1 as-number 6001

 peer 10.1.2.2 as-number 6003

 #

 ipv4-family unicast

import-route direct

  undo synchronization

  peer 10.1.1.1 enable

  peer 10.1.2.2 enable

 

AR1

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

bgp 6001

 peer 10.1.1.2 as-number 6002

 #

 ipv4-family unicast

  undo synchronization

  peer 10.1.1.2 enable

处理过程

1.       查看AR1AR2BGP邻居状态正常建立

[AR1]display bgp peer

 BGP local router ID : 10.1.1.1

 Local AS number : 6001

 Total number of peers : 1         Peers in established state : 1

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre fRcv

  10.1.1.2        4        6002       36       35     0 00:32:31     Established     0

 

[AR2]display bgp peer

 BGP local router ID : 10.1.1.2

 Local AS number : 6002

 Total number of peers : 2         Peers in established state : 2

  Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State Pre fRcv

  10.1.1.1        4        6001       36       38     0 00:34:44 Established     0

  10.1.2.2        4        6003       28       27     0 00:22:04 Established      2

 

2.查看AR1上的路由能学习到AR2通告的路由,AR2能学习到AR3的路由,AR1学习不到AR3通告的路由

[AR2]display bgp routing-table

 BGP Local router ID is 10.1.1.2

 Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? – incomplete

 Total Number of Routes: 2

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   3.3.3.3/32         10.1.2.2        0                     0      6003?

      10.1.2.0/24        10.1.2.2        0                     0      6003?

 

<AR1>display bgp routing-table

 BGP Local router ID is 10.1.1.1

 Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 3

      Network            NextHop        MED        LocPrf    PrefVal Path/Ogn

 *>   2.2.2.2/32         10.1.1.2        0                     0      6002?

      10.1.1.0/24        10.1.1.2        0                     0      6002?

 *>   10.1.2.0/24        10.1.1.2        0                     0      6002?

 

2.   查看AR2上从AR3学习的路由团体属性为no-export

[AR2]display bgp routing-table community

 BGP Local router ID is 10.1.1.2

 Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

 Total Number of Routes: 2

      Network            NextHop        MED        LocPrf    PrefVal Community

 *>   3.3.3.3/32         10.1.2.2        0                     0      no-export

      10.1.2.0/24        10.1.2.2        0                     0      no-export

根因

AR2AR3学习到的路由的团体属性为no-export,则不会把此属性的路由传递给下一个AS

解决方案

AR2上配置路由策略将从AR3学习的路由的团体属性修改为internet,配置如下:

[AR2]acl 2001

[AR2-acl2001]rule permit source any

[AR2-acl2001]quit

[AR2]route-policy rp1 permit node 5

[AR2-route-policy]if-match acl 2001

[AR2-route-policy]apply community internet

[AR2-route-policy]quit

[AR2]bgp 6002

[AR2-bgp]ipv4-family unicast

[AR2-bgp-af-ipv4]peer 10.1.2.2 route-policy rp1 import

[AR2-bgp-af-ipv4]quit

[AR2-bgp]quit

END