cisco学习笔记

      CCIE之路中。。。。其实我是一个天才,可惜天妒英才!o(∩_∩)o...哈哈

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  39 随笔 :: 5 文章 :: 36 评论 :: 0 Trackbacks

  no-advertise属性


当一台路由器,收到一个
bgp的路由带有no-export属性是这台路由器就不会再向EBGP对等体及IBGP对等体发送该路由了

拓扑:

 

R3#sh ip bgp

BGP table version is 1, local router ID is 10.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

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

 

   Network          Next Hop            Metric LocPrf Weight Path

* i172.16.1.0/24    10.1.1.1                 0    100      0 1 i

* i172.16.2.0/24    10.1.1.1                 0    100      0 1 i

* i172.16.3.0/24    10.1.1.1                 0    100      0 1 i

不是最优的,在R2NEXT-HOP-SELF

R2(config)#router bgp 2

R2(config-router)#nei 10.2.2.2 next-hop-self

 

再查看R3的路由表

R3#sh ip bgp

BGP table version is 4, local router ID is 10.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

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

 

   Network          Next Hop            Metric LocPrf Weight Path

*>i172.16.1.0/24    10.2.2.1                 0    100      0 1 i

*>i172.16.2.0/24    10.2.2.1                 0    100      0 1 i

*>i172.16.3.0/24    10.2.2.1                 0    100      0 1 i

 

 

no-advertise

R1(config)#access-list 1 per 172.16.3.0 0.0.0.255

R1(config)#route-map ccxx per 10

R1(config-route-map)#ma ip add 1

R1(config-route-map)#set community no-advertise

R1(config-route-map)#exi

R1(config)#route-map ccxx per 20

R1(config-route-map)#exi

R1(config)#router bgp 1

R1(config-router)#nei 10.1.1.2 route-map ccxx out

R1(config-router)#nei 10.1.1.2 send-community

 

查看R3的路由表:

R3#sh ip bgp

BGP table version is 5, local router ID is 10.2.2.2

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale

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

 

   Network          Next Hop            Metric LocPrf Weight Path

*>i172.16.1.0/24    10.2.2.1                 0    100      0 1 i

*>i172.16.2.0/24    10.2.2.1                 0    100      0 1 i

没学到172.16.3.0网段

再验证下是不是用了NO-ADVERTISE

R2#sh ip bgp 172.16.3.1

BGP routing table entry for 172.16.3.0/24, version 5

Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer)

  Not advertised to any peer

  1

    10.1.1.1 from 10.1.1.1 (172.16.1.1)

      Origin IGP, metric 0, localpref 100, valid, external, best

      Community: no-advertise

posted on 2008-09-17 19:28 cisco交流平台 阅读(6445) 评论(0)  编辑 收藏 引用 所属分类: BGP
只有注册用户登录后才能发表评论。