⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bgpd.texi

📁 大名鼎鼎的路由器源码。程序分ZEBRA、OSPFRIP等3个包。程序框架采用一个路由协议一个进程的方式
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@section Capability Negotiation  When adding IPv6 routing information exchange feature to BGP.  Therewere some proposals.  @acronym{IETF} @acronym{IDR} working group finallytake a proposal called Multiprotocol Extension for BGP.  Thespecification is described in RFC2283.  The protocol does not define newprotocols.  It defines new attributes to existing BGP.  When it is usedexchanging IPv6 routing information it is called BGP-4+.  When it isused for exchanging multicast routing information it is called MBGP.  @command{bgpd} supports Multiprotocol Extension for BGP.  So if remote peersupports the protocol, @command{bgpd} can exchange IPv6 and/or multicast routinginformation.  Traditional BGP does not have the feature to detect remote peer'scapability whether it can handle other than IPv4 unicast routes.  Thisis a big problem using Multiprotocol Extension for BGP to operationalnetwork.  @cite{draft-ietf-idr-bgp4-cap-neg-04.txt} is proposing afeature called Capability Negotiation.  @command{bgpd} use this CapabilityNegotiation to detect remote peer's capabilities.  If the peer is onlyconfigured as IPv4 unicast neighbor, @command{bgpd} does not send these CapabilityNegotiation packets.  By default, Zebra will bring up peering with minimal common capabilityfor the both sides.  For example, local router has unicast and multicast capabilitie and remote router has unicast capability.  In this case,the local router will establish the connection with unicast only capability.When there are no common capabilities, Zebra sends Unsupported Capabilityerror and then resets the connection.  If you want to completely match capabilities with remote peer.  Pleaseuse @command{strict-capability-match} command.  @deffn {BGP} {neighbor @var{peer} strict-capability-match} {}@deffnx {BGP} {no neighbor @var{peer} strict-capability-match} {}Strictly compares remote capabilities and local capabilities.  If capabilitiesare different, send Unsupported Capability error then reset connection.@end deffn  You may want to disable sending Capability Negotiation OPEN messageoptional parameter to the peer when remote peer does not implementCapability Negotiation.  Please use @command{dont-capability-negotiate}command to disable the feature.@deffn {BGP} {neighbor @var{peer} dont-capability-negotiate} {}@deffnx {BGP} {no neighbor @var{peer} dont-capability-negotiate} {}Suppress sending Capability Negotiation as OPEN message optionalparameter to the peer.  This command only affects the peer is configuredother than IPv4 unicast configuration.@end deffn  When remote peer does not have capability negotiation feature, remotepeer will not send any capabilities at all.  In that case, bgp configuresthe peer with configured capabilities.  You may prefer locally configured capabilities more than the negotiatedcapabilities even though remote peer sends capabilities.  If the peer isconfigured by @command{override-capability}, @command{bgpd} ignores receivedcapabilities then override negotiated capabilities with configured values.@deffn {BGP} {neighbor @var{peer} override-capability} {}@deffnx {BGP} {no neighbor @var{peer} override-capability} {}Override the result of Capability Negotiation with local configuration.Ignore remote peer's capability value.@end deffn@node Route Reflector, Route Server, Capability Negotiation, BGP@comment  node-name,  next,  previous,  up@section Route Reflector@deffn {BGP} {bgp cluster-id @var{a.b.c.d}} {}@end deffn@deffn {BGP} {neighbor @var{peer} route-reflector-client} {}@deffnx {BGP} {no neighbor @var{peer} route-reflector-client} {}@end deffn@node Route Server, How to set up a 6-Bone connection, Route Reflector, BGP@comment  node-name,  next,  previous,  up@section Route ServerAt an Internet Exchange point, many ISPs are connected to each other byexternal BGP peering.  Normally these external BGP connection are done by@code{full mesh} method.  As with internal BGP full mesh formation,this method has a scaling problem.This scaling problem is well known.  Route Server is a method to resolvethe problem.  Each ISP's BGP router only peers to Route Server.  RouteServer serves as BGP information exchange to other BGP routers.  Byapplying this method, numbers of BGP connections is reduced fromO(n*(n-1)/2) to O(n).Unlike normal BGP router, Route Server must have several routing tablesfor managing different routing policies for each BGP speaker.  We call therouting tables as different @code{view}s.  @command{bgpd} can work asnormal BGP router or Route Server or both at the same time.@menu* Multiple instance::           * BGP instance and view::       * Routing policy::              * Viewing the view::            @end menu@node Multiple instance, BGP instance and view, Route Server, Route Server@comment  node-name,  next,  previous,  up@subsection Multiple instanceTo enable multiple view function of @code{bgpd}, you must turn onmultiple instance feature beforehand.@deffn {Command} {bgp multiple-instance} {}Enable BGP multiple instance feature.  After this feature is enabled,you can make multiple BGP instances or multiple BGP views.@end deffn@deffn {Command} {no bgp multiple-instance} {}Disable BGP multiple instance feature.  You can not disable this featurewhen BGP multiple instances or views exist.@end deffnWhen you want to make configuration more Cisco like one, @deffn {Command} {bgp config-type cisco} {}Cisco compatible BGP configuration output.@end deffnWhen bgp config-type cisco is specified, ``no synchronization'' is displayed.``no auto-summary'' is desplayed.``network'' and ``aggregate-address'' argument is displayed as``A.B.C.D M.M.M.M''Zebra: network 10.0.0.0/8Cisco: network 10.0.0.0Zebra: aggregate-address 192.168.0.0/24Cisco: aggregate-address 192.168.0.0 255.255.255.0Community attribute handling is also different.  If there is noconfiguration is specified community attribute and extended communityattribute are sent to neighbor.  When user manually disable thefeature community attribute is not sent to the neighbor.  In case of``bgp config-type cisco'' is specified, community attribute is notsent to the neighbor by default.  To send community attribute user hasto specify ``neighbor A.B.C.D send-community'' command.!router bgp 1 neighbor 10.0.0.1 remote-as 1 no neighbor 10.0.0.1 send-community!!router bgp 1 neighbor 10.0.0.1 remote-as 1 neighbor 10.0.0.1 send-community!@deffn {Command} {bgp config-type zebra} {}Zebra style BGP configuration.  This is default.@end deffn@node BGP instance and view, Routing policy, Multiple instance, Route Server@comment  node-name,  next,  previous,  up@subsection BGP instance and viewBGP instance is a normal BGP process.  The result of route selectiongoes to the kernel routing table.  You can setup different AS at thesame time when BGP multiple instance feature is enabled.@deffn {Command} {router bgp @var{as-number}} {}Make a new BGP instance.  You can use arbitrary word for the @var{name}.@end deffn@example@groupbgp multiple-instance!router bgp 1 neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.2 remote-as 3!router bgp 2 neighbor 10.0.0.3 remote-as 4 neighbor 10.0.0.4 remote-as 5@end group@end exampleBGP view is almost same as normal BGP process. The result ofroute selection does not go to the kernel routing table.  BGP view isonly for exchanging BGP routing information.@deffn {Command} {router bgp @var{as-number} view @var{name}} {}Make a new BGP view.  You can use arbitrary word for the @var{name}.  Thisview's route selection result does not go to the kernel routing table.@end deffnWith this command, you can setup Route Server like below.@example@groupbgp multiple-instance!router bgp 1 view 1 neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.2 remote-as 3!router bgp 2 view 2 neighbor 10.0.0.3 remote-as 4 neighbor 10.0.0.4 remote-as 5@end group@end example@node Routing policy, Viewing the view, BGP instance and view, Route Server@comment  node-name,  next,  previous,  up@subsection Routing policyYou can set different routing policy for a peer.  For example, you canset different filter for a peer.@example@groupbgp multiple-instance!router bgp 1 view 1 neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.1 distribute-list 1 in!router bgp 1 view 2 neighbor 10.0.0.1 remote-as 2 neighbor 10.0.0.1 distribute-list 2 in@end group@end exampleThis means BGP update from a peer 10.0.0.1 goes to both BGP view 1 and view2.  When the update is inserted into view 1, distribute-list 1 isapplied.  On the other hand, when the update is inserted into view 2,distribute-list 2 is applied.@node Viewing the view,  , Routing policy, Route Server@comment  node-name,  next,  previous,  up@subsection Viewing the viewTo display routing table of BGP view, you must specify view name.@deffn {Command} {show ip bgp view @var{name}} {}Display routing table of BGP view @var{name}.@end deffn@node How to set up a 6-Bone connection, Dump BGP packets and table, Route Server, BGP@comment  node-name,  next,  previous,  up@section How to set up a 6-Bone connection@example@groupzebra configuration =================== !  ! Actually there is no need to configure zebra !bgpd configuration==================!! This means that routes go through zebra and into the kernel.!router zebra!! MP-BGP configuration!router bgp 7675 bgp router-id 10.0.0.1 neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 remote-as @var{as-number}! address-family ipv6 network 3ffe:506::/32 neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 activate neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 route-map set-nexthop out neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 remote-as @var{as-number} neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 route-map set-nexthop out exit-address-family!ipv6 access-list all permit any!! Set output nexthop address.!route-map set-nexthop permit 10 match ipv6 address all set ipv6 nexthop global 3ffe:1cfa:0:2:2c0:4fff:fe68:a225 set ipv6 nexthop local fe80::2c0:4fff:fe68:a225!! logfile FILENAME is obsolete.  Please use log file FILENAME!log file bgpd.log!@end group@end example@node Dump BGP packets and table,  , How to set up a 6-Bone connection, BGP@comment  node-name,  next,  previous,  up@section Dump BGP packets and table@deffn Command {dump bgp all @var{path}} {}@deffnx Command {dump bgp all @var{path} @var{interval}} {}Dump all BGP packet and events to @var{path} file.@end deffn @deffn Command {dump bgp updates @var{path}} {}@deffnx Command {dump bgp updates @var{path} @var{interval}} {}Dump BGP updates to @var{path} file.@end deffn@deffn Command {dump bgp routes @var{path}} {}@deffnx Command {dump bgp routes @var{path}} {}Dump whole BGP routing table to @var{path}.  This is heavy process.@end deffn

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -