1.  neighbor {ip-address | peer-group-name} advertisement-interval seconds<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

n  ip-address— Neighbor's IP address.
n  peer-group-name— Name of the peer group.
n  seconds— 0 to 600.

 

Defaults:  IBGP 5 seconds.  EBGP 30 seconds.
To set the minimum interval between the sending of Border Gateway Protocol (BGP) routing updates.
设置发送BGP路由更新的最小时间间隔.
用来解决路由翻动,控制泛洪.

 

R1 R2 EBGP邻居关系 IBGP同理)

R1#sh ip bgp nei <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />10.1.12.2

BGP neighbor is 10.1.12.2,  remote AS 2, external link
  BGP version 4, remote router ID 2.2.2.2
  BGP state = Established, up for 00:20:49
  Last read 00:00:49, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                   3          3
    Notifications:          0          0
    Updates:               11          0
    Keepalives:           31         31
    Route Refresh:        3          0
    Total:                    48         34
  Default minimum time between advertisement runs is 30 seconds

 

修改R1配置,R2保持默认

R1(config)#router bgp 1

R1(config-router)#nei 10.1.12.2 advertisement-interval 20  

R1#sh ip bgp nei 10.1.12.2

BGP neighbor is 10.1.12.2,  remote AS 2, external link
  BGP version 4, remote router ID 2.2.2.2
  BGP state = Established, up for 02:32:47
  Last read 00:00:47, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  3          3
    Notifications:          0          0
    Updates:               11          0
    Keepalives:          163        163
    Route Refresh:        3          0
    Total:                   180        166
  Default minimum time between advertisement runs is 30 seconds

 

 For address family: IPv4 Unicast
  BGP table version 12, neighbor version 12
  Index 1, Offset 0, Mask 0x2
  Condition-map lo12, Advertise-map lo3, status: Advertise
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               1          0
    Prefixes Total:                   3          0
    Implicit Withdraw:             0          0
    Explicit Withdraw:             2          0
    Used as bestpath:             n/a          0
    Used as multipath:            n/a          0

 

                                   Outbound    Inbound
  Local Policy Denied Prefixes:    --------    -------
    advertise-map:                        1        n/a
    Suppressed due to dampening:          2        n/a
    Total:                                3          0
  Number of NLRIs in the update sent: max 1, min 0
  Minimum time between advertisement runs is 20 seconds

 

R2#sh ip bgp nei 10.1.12.1

BGP neighbor is 10.1.12.1,  remote AS 1, external link
  BGP version 4, remote router ID 1.1.1.1
  BGP state = Established, up for 02:33:45
  Last read 00:00:45, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                  3          3
    Notifications:          0          0
    Updates:                0         11
    Keepalives:           165        164
    Route Refresh:          0          3
    Total:                   168        181
  Default minimum time between advertisement runs is 30 seconds

 

2. neighbor {ip-address | peer-group-name} default-originate

 

The router owning the default route can advertise it through BGP using the default-originate form of the neighbor command. Using this form is not recommended, because the router always advertises the default route, even if the router does not have a default route or if the network to the default route is down..
有默认路由的路由器可以通过neighbor 命令default-originate 通告. 用这样的形式不被推荐,因为路由器总是通告默认路由,甚至路由器没有默认路由或到默认路由的网络断掉的情况下. neighbor {ip-address | peer-group-name} default-originate 始终向邻居通告默认路由.

 

neighbor {ip-address | peer-group-name} default-originate route-map route-map-name

 

The router owning the default route can advertise it through BGP using the default-originate route-map form of the neighbor command. Using this form is recommended, because the router advertises the default route only if the condition of the specified route map is satisfied. The condition that is typically used is whether or not the default network is up.
有默认路由的路由器可以通过neighbor 命令default-originate route-map通告. 用这样的形式被推荐,因为仅仅只在指定的route map 满足条件的时候,路由器才通告默认路由。条件即看默认网络是否up 。

 

例: nei 10.1.12.2 default-originate route-map lo0
          route-map lo0
             Match ip add pre 1
          ip pre 1 per 1.1.1.1/32
1.1.1.1/32 路由存在的情况,则向邻居10.1.12.2 通告默认路由,否则不通告.

 

3. neighbor {ip-address | peer-group-name} filter-list as-path-list-number weight weight

 

n  as-path-list-number— IPAS path list number.
n  weight— 1 to 65535. This value is applied to the weight attribute of incoming routes matching the conditions in the AS path filter list.
1-65535,对匹配AS PATH过滤列表进来的路由设置 weight 属性.

 

Purpose: Routes learned from BGP neighbors have the weight attribute set to 0. This form of the filter-list command allows you to set the weight attribute of selected routes received from a particular neighbor. This command applies only to incoming route updates. The operation of the filter list is identical for both IBGP and EBGP neighbors.
BGP邻居学来的路由weight 属性默认设置为0filter-list允许设置weight属性给从邻居接收来的路由. 仅仅应用于进来的路由更新. 命令操作对IBGPEBGP邻居适用.

 

Cisco IOS Software Release: the weight keyword was removed in Release 12.1.
Weight 关键字已经在Release 12.1被移除.

 

4. neighbor {ip-address | peer-group-name} remove-private-as

 

Purpose: To remove private autonomous systems in updates to the neighbor or peer group. Private AS numbers are in the range 64512 to 65535. Private AS numbers should not be advertised to the Internet. The following conditions apply when using this command:
在到邻居或对等体组的更新中移除私有自治系统号. 私用AS号的范围是6451265535. 私有AS号不能被通告到Internet. 当用这个命令时,需遵循以下条件:

 

n   Use only with EBGP peers.
仅仅用于EBGP对等体.
n   If the update has only private AS numbers in the AS path, BGP removes them.
如果更新的AS路径中仅仅只有私有AS号的话,那么BGP将移除它.
n   If the AS path includes both private and public AS numbers, BGP doesn't remove the private AS numbers. This situation is considered a configuration error.
如果AS路径中私有和公有AS号都有的话,BGP将不会移除私有AS.
这种形势被考虑成一个配置错误.
n   If the AS path contains the AS number of the EBGP neighbor, BGP doesn't remove the private AS number.

如果AS路径包括EBGP邻居的AS号,BGP将不会移除私有AS.
n   If the AS path contains confederations, BGP removes the private AS numbers only if they come after the confederation portion of the AS path.

如果AS路径包括联盟,那么BGP仅仅当私有AS号跟在作为部分AS路径的联盟后面的话,才会被移除.

 

 

R1--------------R2----------------R3
     AS65530           AS 1                   AS 2
R1的路由通告,在R2  show ip bgp 表里 AS PATH 65530 i ,在R3 show ip bgp 表里 AS PATH 1 65535 i . R2 BGP中配置 neighbor (IP address for R3) remove-private-as之后, R3 show ip bgp 表里 AS PATH 1 i .

 

5.  neighbor {ip-address | peer-group-name} soft-reconfiguration inbound

 

Purpose: If you have a policy configured with a BGP neighbor, such as a route map or distribute list, and you change the policy, the BGP session needs to be cleared in order for the new policy to take effect. When a BGP session is cleared, the cache is invalidated. This has a momentary impact on your routing. The soft-reconfiguration option allows you to change policies without clearing the BGP session. The two forms of soft reconfiguration are inbound and outbound. When you use inbound, soft reconfiguration updates from a neighbor are stored in memory, regardless of the inbound policy. Be aware that using inbound soft reconfiguration uses more memory than not using inbound soft reconfiguration. Outbound soft reconfiguration does not require additional memory and is always enabled.

 

6.  neighbor {ip-address | peer-group-name} unsuppress-map route-map-name

 

Purpose: When the aggregate-address command is used with the summary-only option, the more-specific routes of the aggregate are suppressed . The aggregate-address summary-only command suppresses the more-specific routes to all neighbors. You can use an unsuppress map to selectively leak more-specific routes to a particular neighbor.