bgp什么时候需要bgp next hop local-hope-self

您现在的位置:&&>>&&>>&&>>&&>>&正文
BGP的选路原则
  ①、比较Weight
  1、优选Weight值大的条目
  2、本地产生的BGP路由条目默认Weight为32768,非本地产生的是0
  3、该值只在本地有效,不具有传递性
  4、该属性是一个是一个私有属性
  ②、比较Local-Preference
  1、优选Local-Preference值大的路由条目
  2、默认该值大小为100
  3、只可传递给IBGP邻居,不会传递给EBGP邻居
  ③、优选本地产生的路由条目
  1、即优选Next-Hope为0.0.0.0的路由条目
  ④、比较As-Path
  1、优选As-Path最短的路由条目&&& 注:大括号中的As-Path可视为一个As
  ⑤、比较Origin Code
  1、i&e&?&&& 注:i为network或者aggressive产生的路由条目,e为EGP产生的路由条目,EGP现在已经很少使用了,?则为重分发产生的路由条目
  ⑥、比较MED
  1、在路由器中MED类似于Metric,值越低越好,但是在华为或H3C的路由器,该值越高越好
  2、使用network或者redistribute产生的路由条目MED继承IGP的度量值(直连路由或者静态路由为0),使用aggressive产生的路由条目的MED属性为空
  ⑦、使用EBGP传过来的路由条目,使用联邦是优选联邦EBGP传递过来的路由条目
  ⑧、优选去往Next-Hop最近的路由条目
  ⑨、BGP的负载均衡
  10、优选最老EBGP传递过来的路由条目
  11、选择最小RID的路由条目
  12、选择最短Cluster-List的的路由条目
  13、优选邻居IP(在BGP配置模式小neighbor的IP)地址最小的
【责编:ivy】
?&[]?&[]?&[]?&[]?&[]?&[]?&[]?&[]?&[]?&[]
 友情推荐精华
 专题推荐
 ? ? ? ? ? ? ? ? ? ?
 今日更新
?&?&?&?&?&?&?&?&?&?&
 认证培训
 频道精选
 思科频道导航BGP Next Hop Propagation - Cisco
BGP Next Hop Propagation
Available Languages
Download Options
(266.1 KB)
View with Adobe Reader on a variety of devices
BGP Next Hop Propagation
The BGP Next Hop Propagation feature provides additional flexibility when designing and migrating networks. The BGP Next Hop Propagation feature allows a route reflector to modify the next hop attribute for a reflected route and allows Border Gateway Protocol (BGP) to send an update to an external BGP (eBGP) multihop peer with the next hop attribute unchanged.
Feature History for BGP Next Hop Propagation
12.0(16)ST
This feature was introduced.
This feature was integrated into Cisco IOS Release 12.2.
This feature was integrated into Cisco IOS Release 12.2(14)S.
This feature was integrated into Cisco IOS Release 12.0(22)S.
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco&IOS software image support. Access Cisco Feature Navigator at . You must have an account . If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
oBGP peering has been established, and the next hop is accessible.
oBGP Next Hop Propagation can be configured only between multihop eBGP peers. The follow error message will be displayed if you attempt to configure this feature for a directly connect neighbor:
%BGP: Can propagate the nexthop only to multi-hop EBGP neighbor
oDo not use the neighbor next-hop-self command to modify the next hop attribute for a route reflector when this feature is enabled for a route reflector client. Using the neighbor next-hop-self command on the route reflector will modify next hop attributes only for routes that are learned from eBGP peers and not the intended routes that are being reflected from the route reflector clients. To modify the next hop attribute when reflecting a route, use an outbound route map.
This section contains the following concepts:
The BGP Next Hop Propagation feature provides additional flexibility when designing and migrating networks. The BGP Next Hop Propagation feature allows a route reflector to modify the next hop attribute for a reflected route and allows BGP to send an update to an eBGP multihop peer with the next hop attribute unchanged.
Incorrectly setting BGP attributes for a route reflector can cause inconsistent routing, routing loops, or a loss of connectivity. Setting BGP attributes for a route reflector should be attempted only by an experienced network operator.
The configuration of this feature in conjunction with the iBGP Multipath Load Sharing feature allows you to use an outbound route map to include BGP route reflectors in the forwarding path.
The BGP Next Hop Propagation feature allows you to perform the following tasks:
oBring the route reflector into the forwarding path, which can be used with the iBGP Multipath Load Sharing feature to configure load balancing.
oConfigure interprovider Multiprotocol Label Switching (MPLS) Virtual Private Networks (VPNs) by not modifying the next hop attribute when advertising routes to an eBGP peer.
oTurn off the next hop calculation for an eBGP peer. This feature is useful for configuring the end-to-end connection of a label-switched path.
This section contains the following procedures:
o (required)
o (required)
o (optional)
In this section, the following tasks are completed:
oA route map is created to set the next hop that will be advertised to the router reflector client. The route map is applied only to outbound routes.
oeBGP peering is configured with the route reflector client.
Do not use the neighbor next-hop-self command to modify the next hop attribute for a route reflector when this feature is enabled for a route reflector client.
2. configure terminal
3. route-map map-tag [permit | deny] [sequence-number]
4. set ip next-hop ip-address [peer-address]
6. router bgp as-number
7. address-family ipv4 [mdt | multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name]
8. neighbor ip-address activate
9. neighbor ip-address ebgp-multihop ttl
10. neighbor ip-address route-reflector-client
11. neighbor ip-address route-map map-tag in | out
Router&&enable
Enables privileged EXEC mode.
oEnter your password if prompted.
configure terminal
Router#&configure terminal
Enters global configuration mode.
route-map map-tag [permit | deny] [sequence-number]
Router(config)#&route-map NEXTHOP
Enter route map configuration mode to create or configure a route map.
oThe route map is create to set the next hop for the route reflector client.
set ip next-hop ip-address [peer-address]
Router(config-route-map)#&set ip next-hop 172.16.0.1
Specifies the next hop.
Router(config-route-map)#&exit
Exits route-map configuration mode, and enters global configuration mode.
router bgp as-number
Router(config)#&router bgp 65535
Enters router configuration mode, and creates a BGP routing process.
address-family ipv4 [mdt | multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name]
Router(config-router-af)# address-family ipv4
Enters address family configuration mode to configure BGP peers to accept address family specific configurations.
neighor ip-address activate
Router(config-router-af)#&neighbor 10.0.0.100 activate
Enables the exchange of information with the address family peer.
neighbor ip-address ebgp-multihop ttl
Router(config-router-af)#&neighbor 10.0.0.100 ebgp-multihop 255
Configures the local router to accept and initiate connections to external peers that reside on networks that are not directly connected.
neighbor ip-address route-reflector-client
Router(config-router-af)#&neighbor 10.0.0.100 route-reflector-client
Configures the local router as a BGP route reflector, and configures the specified neighbor as a route-reflector client.
neighbor ip-address route-map map-name out
Router(config-router-af)#&neighbor 10.0.0.100 route-map NEXTHOP out
Applies the route map to outgoing routes.
Router(config-router-af)#&end
Exits address family configuration mode, and enters privileged EXEC mode.
The following example, starting in global configuration mode, configures the local router as a route reflector and configures the 10.0.0.100 multihop peer as a route reflector client. A route map is created to set the advertised next hop to 172.16.0.1.
route-map NEXTHOP
&set ip next-hop 172.16.0.1
router bgp 65535
&address-family ipv4
&neighbor 10.0.0.100 activate
&neighbor 10.0.0.100 ebgp-multihop 255
&neighbor 10.0.0.100 route-reflector-client
&neighbor 10.0.0.100 route-map NEXTHOP out
To complete this configuration, the neighbor next-hop-unchanged command is configured on the route reflector client. Proceed to the next section to see more information.
In this section, the following tasks are completed:
oeBGP peering is configured with the route reflector.
oThe route-reflector client is configured to propagate the next hop unchanged.
2. configure terminal
3. router bgp as-number
4. address-family ipv4 [mdt | multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name]
5. neighbor ip-address activate
6. neighbor ip-address ebgp-multihop ttl
7. neighbor ip-address next-hop-unchanged
Router& enable
Enables privileged EXEC mode.
oEnter your password if prompted.
configure terminal
Router# configure terminal
Enters global configuration mode.
router bgp as-number
Router(config)#&router bgp 65412
Enters router configuration mode, and creates a BGP routing process.
address-family ipv4 [mdt | multicast | tunnel | unicast [vrf vrf-name] | vrf vrf-name]
Router(config-router-af)# address-family ipv4
Enter address family configuration mode to configure BGP peers to accept address family specific configurations.
neighbor ip-address activate
Router(config-router-af)#&neighbor 192.168.0.1 activate
Enables the exchange of information with the address family peer.
neighbor ip-address ebgp-multihop ttl
Router(config-router-af)#&neighbor 192.168.0.1 ebgp-multihop 255
Configures the local router to accept and initiate connections to external peers that reside on networks that are not directly connected.
neighbor ip-address next-hop-unchanged
Router(config-router-af)#&neighbor 192.168.0.1 activate
Configures the router to send BGP updates to BGP peers without modifying the next hop attribute.
Router(config-router-af)#&end
Exits address family configuration mode, and enters privileged EXEC mode.
The following example, starting in global configuration mode, configures the local router (route-reflector client) to establish peering with the route reflector and to propagate the next hop unchanged:
router bgp 65412
&address-family ipv4
&neighbor 192.168.0.1 activate
&neighbor 192.168.0.1 ebgp-multihop 255
&neighbor 192.168.0.1 next-hop-unchanged
Proceed to the next section to see commands that can be used to verify the configuration of the BGP Next Hop Propagation feature.
The configuration of the BGP Next Hop Propagation feature can be verified with the show ip bgp neighbors EXEC command.
2. show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | {paths regexp} | dampened-routes | received prefix-filter]]
3. show ip bgp [network] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter prefixes mask-length]
Router& enable
Enables privileged EXEC mode.
oEnter your password if prompted.
show ip bgp neighbors [neighbor-address] [received-routes | routes | advertised-routes | {paths regexp} | dampened-routes | received prefix-filter]]
Router#&show ip bgp neighbors
Displays information about the TCP and BGP connections to neighbors. The output will display the status of the BGP Next Hop Propagation feature.
show ip bgp [network] [network-mask] [longer-prefixes] [prefix-list prefix-list-name | route-map route-map-name] [shorter prefixes mask-length]
Router#&show ip bgp
Displays entries in the BGP routing table. The displayed output will indicate if the neighbor&next-hop-unchanged command has been configured for the selected address.
The following examples show how to configure this feature:
The following example, starting in global configuration mode, configures the local router as a route reflector and configures the 10.0.0.100 multihop peer as a route reflector client. A route map is created to set the advertised next hop to 172.16.0.1.
route-map NEXTHOP
&set ip next-hop 172.16.0.1
router bgp 65535
&address-family ipv4
&neighbor 10.0.0.100 activate
&neighbor 10.0.0.100 ebgp-multihop 255
&neighbor 10.0.0.100 route-reflector-client
&neighbor 10.0.0.100 route-map NEXTHOP out
The following example, starting in global configuration mode, configures the local router (route-reflector client) to establish peering with the route reflector and to propagate the next hop unchanged:
router bgp 65412
&address-family ipv4
&neighbor 192.168.0.1 activate
&neighbor 192.168.0.1 ebgp-multihop 255
&neighbor 192.168.0.1 next-hop-unchanged
The following sections provide references related to the BGP Next Hop Propagation feature.
BGP commands and configuration tasks—The BGP Next Hop Propagation feature is an extension of the BGP routing protocol. For more information about configuring BGP, route reflectors, route summarization, and filtering, refer to the Cisco&IOS IP Routing Configuration Guide and the Cisco&IOS IP Command Reference, Volume 2 of 4: Routing Protocols.
o, Release 12.3T
o, Release 12.3
iBGP multipath loadsharing—For internal BGP (iBGP) multipath load-sharing configuration and command reference information, refer to the iBGP Multipath Load Sharing feature document in the &New Features in Release 12.2(1)T& area .
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.
To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules, go to the Cisco MIB website
at the following URL:
/public/sw-center/netmgmt/cmtk/mibs.shtml
No new or modified RFCs are supported by this feature, and support for existing standards has not been modified by this feature.
Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools.
users can log in from this page to access even more content.
This section documents new commands. All other commands used with this feature are documented in the Cisco&IOS command reference publications.
neighbor next-hop-unchanged
To enable an external BGP (eBGP) multihop peer to propagate the next hop unchanged, use the neighbor next-hop-unchanged command in address family or router configuration mode. To disable next hop propagation capabilities, use the no form of this command.
neighbor ip-address | peer-group-name next-hop-unchanged
no neighbor ip-address | peer-group-name next-hop-unchanged
Syntax Description
ip-address
The IP address of the next hop.
peer-group-name
The name of a BGP peer group that is the next hop.
No default behavior or values
Command Modes
Address family configurationRouter configuration
Command History
12.0(16)ST
This command was introduced.
This command was integrated into Cisco IOS Release 12.2.
This command was integrated into Cisco IOS Release 12.2(14)S.
This command was integrated into Cisco IOS Release 12.0(22)S.
Usage Guidelines
The neighbor next-hop-unchanged command is used to configured the propagate the next hop unchanged for multihop eBGP peering sessions. This command should not be configured on a route reflector, and the neighbor next-hop-self command should not be used to modify the next hop attribute for a route reflector when this feature is enabled for a route reflector client.
This command can be used to perform the following tasks:
oBring the route reflector into the forwarding path, which can be used with the iBGP Multipath Load Sharing feature to configure load balancing.
oConfigure interprovider Multiprotocol Label Switching (MPLS) Virtual Private Networks (VPNs) by not modifying the next hop attribute when advertising routes to an eBGP peer.
oTurn off the next hop calculation for an eBGP peer. This feature is useful for configuring the end-to-end connection of a label-switched path.
Incorrectly setting BGP attributes for a route reflector can cause inconsistent routing, routing loops, or a loss of connectivity. Setting BGP attributes for a route reflector should be attempted only by an experienced network operator.
Route Reflector Configuration
In the following example, the local router is configured as a route reflector and configures the 10.0.0.100 multihop peer as a route reflector client. A route map is created to set the advertised next hop to 172.16.0.1.
Router(config)#&route-map NEXTHOP
Router(config-route-map)#&set ip next-hop 172.16.0.1
Router(config-route-map)#&exit
Router(config)#&router bgp 65534
Router(config-router)#&neighbor 10.0.0.100 remote-as 65412
Router(config-router)#&address-family ipv4
Router(config-router-af)#&neighbor 10.0.0.100 activate
Router(config-router-af)#&neighbor 10.0.0.100 ebgp-multihop 255
Router(config-router-af)#&neighbor 10.0.0.100 route-reflector-client
Router(config-router-af)#&neighbor 10.0.0.100 route-map NEXTHOP out
Router(config-router-af)#&end
Route Reflector Client Configuration
In the following example, the local router (route-reflector client) is configured to establish peering with the route reflector and to propagate the next hop unchanged:
Router(config)#&router bgp 65412
Router(config-router)#&neighbor 192.168.0.1 remote-as 65412
Router(config-router)#&address-family ipv4
Router(config-router-af)#&neighbor 192.168.0.1 activate
Router(config-router-af)#&neighbor 192.168.0.1 ebgp-multihop 255
Router(config-router-af)#&neighbor 192.168.0.1 next-hop-unchanged
Router(config-router-af)#&end
Related Commands
address-family ipv4
Enters address family configuration mode for configuring routing sessions, such as BGP, RIP, or static routing sessions, that use standard IPv4 address prefixes.
address-family vpnv4
Enters address family configuration mode for configuring routing sessions, such as BGP, RIP, or static routing sessions, that use standard VPNv4 address prefixes.
neighbor ebgp-multihop
Accepts and attempts BGP connections to external peers residing on networks that are not directly connected.
neighbor route-map
Applies a route map to incoming or outgoing routes.
neighbor route-reflector-client
Configures the router as a BGP route reflector and configures the specified neighbor as its client.
Was this Document Helpful?
Let Us Help
(Requires a )
Related Support Community Discussions
This Document Applies to These Products用户名:NetworkAD
文章数:67
访问量:12765
注册日期:
阅读量:1297
阅读量:3317
阅读量:440133
阅读量:1126766
51CTO推荐博文
①、比较Weight& & 1、优选Weight值大的路由条目& & 2、本地产生的BGP路由条目默认Weight为32768,非本地产生的是0& & 3、该值只在本地有效,不具有传递性& & 4、该属性是一个是一个Cisco私有属性②、比较Local-Preference& & 1、优选Local-Preference值大的路由条目& & 2、默认该值大小为100& & 3、只可传递给IBGP邻居,不会传递给EBGP邻居③、优选本地产生的路由条目& & 1、即优选Next-Hope为0.0.0.0的路由条目④、比较As-Path& & 1、优选As-Path最短的路由条目 & &注:大括号中的As-Path可视为一个As⑤、比较Origin Code& & 1、i&e&? & &注:i为network或者aggressive产生的路由条目,e为EGP产生的路由条目,EGP现在已经很少使用了,?则为重分发产生的路由条目⑥、比较MED& & 1、在Cisco路由器中MED类似于Metric,值越低越好,但是在华为或H3C的路由器,该值越高越好& & 2、使用network或者redistribute产生的路由条目MED继承IGP的度量值(直连路由或者静态路由为0),使用aggressive产生的路由条目的MED属性为空⑦、使用EBGP传过来的路由条目,使用联邦是优选联邦EBGP传递过来的路由条目⑧、优选去往Next-Hop最近的路由条目⑨、BGP的负载均衡10、优选最老EBGP传递过来的路由条目11、选择最小RID的路由条目12、选择最短Cluster-List的的路由条目13、优选邻居IP(在BGP配置模式小neighbor的IP)地址最小的本文出自 “” 博客,请务必保留此出处
了这篇文章
类别:┆阅读(0)┆评论(0)}

我要回帖

更多关于 bgp nexthopself 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信