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

📄 bgpd.texi

📁 大名鼎鼎的路由器源码。程序分ZEBRA、OSPFRIP等3个包。程序框架采用一个路由协议一个进程的方式
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@c -*-texinfo-*-@c This is part of the GNU Zebra Manual.@c Copyright (C) 1999, 2000, 2001 2002 Kunihiro Ishiguro <kunihiro@zebra.org>@c See file zebra.texi for copying conditions.@node BGP@comment  node-name,  next,  previous,  up@chapter BGP  BGP stands for a Border Gateway Protocol.  The lastest BGP versionis 4.  It is referred as BGP-4.  BGP-4 is one of the Exterior GatewayProtocols and de-fact standard of Inter Domain routing protocol.BGP-4 is described in @code{RFC1771} - @cite{A Border Gateway Protocol4 (BGP-4)}.  Many extentions are added to @code{RFC1771}.  @code{RFC2858} -@cite{Multiprotocol Extensions for BGP-4} provide multiprotocolsupport to BGP-4.@menu* Starting BGP::                * BGP router::                  * BGP network::                 * BGP Peer::                    * BGP Peer Group::              * BGP Address Family::          * Autonomous System::           * BGP Communities Attribute::   * BGP Extended Communities Attribute::  * Displaying BGP routes::       * Capability Negotiation::      * Route Reflector::             * Route Server::                * How to set up a 6-Bone connection::  * Dump BGP packets and table::  @end menu@node Starting BGP, BGP router, BGP, BGP@comment  node-name,  next,  previous,  up@section Starting BGPDefault configuration file of @command{bgpd} is @file{bgpd.conf}.@command{bgpd} searches the current directory first then@value{INSTALL_PREFIX_ETC}/bgpd.conf.  All of bgpd's command must beconfigured in @file{bgpd.conf}.@command{bgpd} specific invocation options are described below.  Commonoptions may also be specified (@pxref{Common Invocation Options}).@table @samp@item -p @var{PORT}@itemx --bgp_port=@var{PORT}Set the bgp protocol's port number.@item -r@itemx --retainWhen program terminates, retain BGP routes added by zebra.@end table@node BGP router, BGP network, Starting BGP, BGP@comment  node-name,  next,  previous,  up@section BGP router  First of all you must configure BGP router with @command{router bgp}command.  To configure BGP router, you need AS number.  AS number is anidentification of autonomous system.  BGP protocol uses the AS numberfor detecting whether the BGP connection is internal one or external one.@deffn Command {router bgp @var{asn}} {}Enable a BGP protocol process with the specified @var{asn}.  Afterthis statement you can input any @code{BGP Commands}.  You can notcreate different BGP process under different @var{asn} withoutspecifying @code{multiple-instance} (@pxref{Multiple instance}).@end deffn@deffn Command {no router bgp @var{asn}} {}Destroy a BGP protocol process with the specified @var{asn}.@end deffn@deffn {BGP} {bgp router-id @var{A.B.C.D}} {}This command specifies the router-ID.  If @command{bgpd} connects to @command{zebra} it getsinterface and address information.  In that case default router ID valueis selected as the largest IP Address of the interfaces.  When@code{router zebra} is not enabled @command{bgpd} can't get interface informationso @code{router-id} is set to 0.0.0.0.  So please set router-id by hand.@end deffn@menu* BGP distance::                * BGP decision process::        @end menu@node BGP distance, BGP decision process, BGP router, BGP router@comment  node-name,  next,  previous,  up@subsection BGP distance@deffn {BGP} {distance bgp <1-255> <1-255> <1-255>} {}This command change distance value of BGP.  Each argument is distancevalue for external routes, internal routes and local routes.@end deffn@deffn {BGP} {distance <1-255> @var{A.B.C.D/M}} {}@deffnx {BGP} {distance <1-255> @var{A.B.C.D/M} @var{word}} {}This command set distance value to @end deffn@node BGP decision process,  , BGP distance, BGP router@comment  node-name,  next,  previous,  up@subsection BGP decision process@table @asis@item 1. Weight check  @item 2. Local preference check.@item 3. Local route check.@item 4. AS path length check.@item 5. Origin check.@item 6. MED check.@end table@node BGP network, BGP Peer, BGP router, BGP@comment  node-name,  next,  previous,  up@section BGP network@menu* BGP route::                   * Route Aggregation::           * Redistribute to BGP::         @end menu@node BGP route, Route Aggregation, BGP network, BGP network@comment  node-name,  next,  previous,  up@subsection BGP route@deffn {BGP} {network @var{A.B.C.D/M}} {}This command adds the announcement network.@example@grouprouter bgp 1 network 10.0.0.0/8@end group@end exampleThis configuration example says that network 10.0.0.0/8 will beannounced to all neighbors.  Some vendors' routers don't advertiseroutes if they aren't present in their IGP routing tables; @code{bgp}doesn't care about IGP routes when announcing its routes.@end deffn@deffn {BGP} {no network @var{A.B.C.D/M}} {}@end deffn@node Route Aggregation, Redistribute to BGP, BGP route, BGP network@comment  node-name,  next,  previous,  up@subsection Route Aggregation@deffn {BGP} {aggregate-address @var{A.B.C.D/M}} {}This command specifies an aggregate address.@end deffn@deffn {BGP} {aggregate-address @var{A.B.C.D/M} as-set} {}This command specifies an aggregate address.  Resulting routes inlucdeAS set.@end deffn@deffn {BGP} {aggregate-address @var{A.B.C.D/M} summary-only} {}This command specifies an aggregate address.  Aggreated routes willnot be announce.@end deffn@deffn {BGP} {no aggregate-address @var{A.B.C.D/M}} {}@end deffn@node Redistribute to BGP,  , Route Aggregation, BGP network@comment  node-name,  next,  previous,  up@subsection Redistribute to BGP@deffn {BGP} {redistribute kernel} {}Redistribute kernel route to BGP process.@end deffn@deffn {BGP} {redistribute static} {}Redistribute static route to BGP process.@end deffn@deffn {BGP} {redistribute connected} {}Redistribute connected route to BGP process.@end deffn@deffn {BGP} {redistribute rip} {}Redistribute RIP route to BGP process.@end deffn@deffn {BGP} {redistribute ospf} {}Redistribute OSPF route to BGP process.@end deffn@node BGP Peer, BGP Peer Group, BGP network, BGP@comment  node-name,  next,  previous,  up@section BGP Peer@menu* Defining Peer::               * BGP Peer commands::           * Peer filtering::              @end menu@node Defining Peer, BGP Peer commands, BGP Peer, BGP Peer@comment  node-name,  next,  previous,  up@subsection Defining Peer@deffn {BGP} {neighbor @var{peer} remote-as @var{asn}} {}Creates a new neighbor whose remote-as is @var{asn}.  @var{peer}can be an IPv4 address or an IPv6 address.@example@grouprouter bgp 1 neighbor 10.0.0.1 remote-as 2@end group@end exampleIn this case my router, in AS-1, is trying to peer with AS-2 at10.0.0.1.This command must be the first command used when configuring a neighbor.If the remote-as is not specified, @command{bgpd} will complain like this:@examplecan't find neighbor 10.0.0.1@end example@end deffn@node BGP Peer commands, Peer filtering, Defining Peer, BGP Peer@comment  node-name,  next,  previous,  up@subsection BGP Peer commandsIn a @code{router bgp} clause there are neighbor specific configurationsrequired.@deffn {BGP} {neighbor @var{peer} shutdown} {}@deffnx {BGP} {no neighbor @var{peer} shutdown} {}Shutdown the peer.  We can delete the neighbor's configuration by@code{no neighbor @var{peer} remote-as @var{as-number}} but allconfiguration of the neighbor will be deleted.  When you want topreserve the configuration, but want to drop the BGP peer, use thissyntax.@end deffn@deffn {BGP} {neighbor @var{peer} ebgp-multihop} {}@deffnx {BGP} {no neighbor @var{peer} ebgp-multihop} {}@end deffn@deffn {BGP} {neighbor @var{peer} description ...} {}@deffnx {BGP} {no neighbor @var{peer} description ...} {}Set description of the peer.@end deffn@deffn {BGP} {neighbor @var{peer} version @var{version}} {}Set up the neighbor's BGP version.  @var{version} can be @var{4},@var{4+} or @var{4-}.  BGP version @var{4} is the default value used forBGP peering.  BGP version @var{4+} means that the neighbor supportsMultiprotocol Extensions for BGP-4.  BGP version @var{4-} is similar butthe neighbor speaks the old Internet-Draft revision 00's MultiprotocolExtensions for BGP-4.  Some routing software is still using thisversion.@end deffn@deffn {BGP} {neighbor @var{peer} interface @var{ifname}} {}@deffnx {BGP} {no neighbor @var{peer} interface @var{ifname}} {}When you connect to a BGP peer over an IPv6 link-local address, you haveto specify the @var{ifname} of the interface used for the connection.@end deffn@deffn {BGP} {neighbor @var{peer} next-hop-self} {}@deffnx {BGP} {no neighbor @var{peer} next-hop-self} {}This command specifies an announced route's nexthop as being equivalentto the address of the bgp router.@end deffn@deffn {BGP} {neighbor @var{peer} update-source} {}@deffnx {BGP} {no neighbor @var{peer} update-source} {}@end deffn@deffn {BGP} {neighbor @var{peer} default-originate} {}@deffnx {BGP} {no neighbor @var{peer} default-originate} {}@command{bgpd}'s default is to not announce the default route (0.0.0.0/0) even itis in routing table.  When you want to announce default routes to thepeer, use this command.@end deffn@deffn {BGP} {neighbor @var{peer} port @var{port}} {}@deffnx {BGP} {neighbor @var{peer} port @var{port}} {}@end deffn@deffn {BGP} {neighbor @var{peer} send-community} {}@deffnx {BGP} {neighbor @var{peer} send-community} {}@end deffn@deffn {BGP} {neighbor @var{peer} weight @var{weight}} {}@deffnx {BGP} {no neighbor @var{peer} weight @var{weight}} {}This command specifies a default @var{weight} value for the neighbor'sroutes.@end deffn@deffn {BGP} {neighbor @var{peer} maximum-prefix @var{number}} {}@deffnx {BGP} {no neighbor @var{peer} maximum-prefix @var{number}} {}@end deffn@node Peer filtering,  , BGP Peer commands, BGP Peer@comment  node-name,  next,  previous,  up@subsection Peer filtering@deffn {BGP} {neighbor @var{peer} distribute-list @var{name} [in|out]} {}This command specifies a distribute-list for the peer.  @var{direct} is@samp{in} or @samp{out}.@end deffn@deffn {BGP command} {neighbor @var{peer} prefix-list @var{name} [in|out]} {}@end deffn@deffn {BGP command} {neighbor @var{peer} filter-list @var{name} [in|out]} {}@end deffn

⌨️ 快捷键说明

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