📄 bgpd.conf.5
字号:
.\" $KAME: bgpd.conf.5,v 1.8 2000/11/10 12:12:09 itojun Exp $.\".\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project..\" All rights reserved..\" .\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. Neither the name of the project nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\" .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".Dd May 17, 1998.Dt BGPD.CONF 5.Os KAME.\".Sh NAME.Nm bgpd.conf.Nd bgpd configuration file.\".Sh SYNOPSIS.Pa /usr/local/v6/etc/bgpd.conf.\".Sh DESCRIPTIONThe bgpd config file consists of a sequence of statements terminatedby a semi-colon (`;').Statements are composed of tokensseparated by white space, which can be any combination of blanks, tabsand newlines.This structure simplifies identification ofthe parts of the configuration associated with each other and withspecific protocols.Lines beginning with.Ql #are comments..\".Sh Meta SyntaxKeywords and special characters that the parser expects exactly aredisplayed using the.Ic boldfont.Parameters are specifying with.Ar underline .Parameters shown insquare brackets (`[' and `]') are used to show optionalkeywords and parameters.The vertical bar (`|') is used to indicatebetween a choice of optional parameters.Parentheses (`(' and`)') are used to group keywords and parameters when necessary..\".Sh Interface specificationThere are some statements that may or have to specify interface.Interfaces are specified in the form of "name unit", such as.Ar lo0and.Ar ep1..\".Sh Specifying Log Level.Bl -tag -width Ds -compact.It Xo.Ic log.Ar option....Ic ;.XcSpecify debug messages to be printed out.Each.Ar optionusually specifies a subset of the messages to be printed.If an.Ar optionbegins with.Ic no ,it means that the set of the messages that are specified by the optionwill not be printed.For example,.Ic `all norip'means that all the messages except RIPng related ones will be printed.Valid options are.Ic aspath, bgpstate, bgpconnect, bgpinput, bgpoutput, bgproute, bgp,.Ic interface, inet6, rip, route, filter, timer,and.Ic all .The.Ic bgpoption means all the BGP related options to be printed..El.\".Sh Specifying Dump File.Bl -tag -width Ds -compact.It Xo.Ic dumpfile Ar filename Ic ;.XcSpecifies the name of the dump file(see.Xr bgpd 8 ) ..El.\".Sh Specifying FiltersThe following four route filters can be specified, each of whichis for a RIPng interface or a BGP peer (see below)..Bl -tag -width Ds -compact.It Ic filterin Ar prefix Ic ;Specifies incoming route filtering.If an incoming route on theinterface or from the peer matches the specified prefix,it will be ignored and will not be installed in the kernel..PpThe prefixes are specified in the form of.Ql address/prefix_length,such as.Ar 3ffe:509::/32and.Ar 3ffe:501:100f::/48.The special string .Ar defaultcan also be specified as a prefix, which means the default route.Note that the semantics of.Ar defaultis different from the semantics of.Ar ::/0 .The former is to specify filtering the default route (exact match),but the latter is to specify filtering all routes that match.Ar ::/0 ,that is, filtering all incoming routes..\".It Ic restrictin Ar prefix Ic ;Specifies incoming route restriction.An incoming route on the interface or from the peerwill be ignored unless it matches.Ar prefix .If this attribute is specified for more than one prefix,an incoming route will be required to match at least one prefix of them.Like the.Ic filterinattribute, the special string.Ar defaultcan be specified as a prefix, which means that all non default routeswill be ignored on the interface or from the peer..\".It Ic filterout Ar prefix Ic ;Specifies outgoing route filtering.If an outgoing route on theinterface or to the peer matches the specified prefix,it will not be advertised.The special string.Ar defaultcan also be specified for this attribute, which means that the default routewill not be advertised on the interface nor to the peer.Note that the semantics of.Ic filterout Ar ::/0is different from the semantics of.Ic filterout Ar default .The former means that all routes that match the prefix.Ar ::/0will not be advertised on the interface.For a RIPng interface, it thus has the same meaningof the.Ic noripout .attribute..\".It Ic restrictout Ar prefix Ic ;Specifies outgoing route restriction.An outgoing route on the interface or to the peer will not beadvertised unless it matches.Ar prefix .If this attribute is specified for more than one prefix,an outgoing route will be required to match at least one prefix ofthem.If the special string.Ar defaultis specified as a prefix, it means that only the default route will beadvertised on the interface nor to the peer..El.\".Sh The BGP Related Statements.Bl -tag -width Ds -compact.It Xo.Ic autonomoussystem Ar as_number Ic ;.XcSets the autonomous system number of this router to be autonomoussystem.This statement is required if BGP is in use.The AS number is assigned by the Network Information Center (NIC)..\".It Ic bgpsbsize Ar size Ic ;Sets the size of socket write buffer for each BGP socket..\".It Ic routerid Ar router_id Ic ;Sets the router identifier for use by the BGP and OSPF protocols.The default is the address of the first interface encountered by.Nm bgpdexcept the loopback address(127.0.0.1)..\".It Ic clusterid Ar cluster_id Ic ;Sets the cluster identifier for use as a BGP route reflector.The default is the address of the first interface encountered by.Nm bgpdexcept the loopback address(127.0.0.1)..\".It Ic IamRouteReflector ;Specifies to act as a route reflector..\".It Ic holdtime Ar seconds Ic ;Specifies the BGP holdtime value to use when negotiating theconnection with this peer, in seconds.According to BGP, if bgpd does not receive a keepalive, update, or notification messagewithin the period specified in the Hold Time field ofthe BGP Open message, then the BGP connection will be closed.The value must be either 0 (no keepalives will be sent)or at least 3.The default value is 240 according to the RFC 1771..\".It Xo.Ic bgp (yes \(ba no) { Ar substatements.Ic };.XcEnables or disables BGP.By default BGP is disabled.The following two substatements can be appeared in the.Ic bgpstatement..\".It Ic group type external peeras Ar remote_as_number {.Bl -tag -width Ds -compact.It Xo.Ic peer Ar host.Op Ic interface Ar interface.Op Ic preference Ar preference.Op Ic prepend Op Ar iteration.Op Ic no synchronization.Op Ic lcladdr Ar localaddress.Op Ar filters....Ic ;.Ic };.Xc.El.PpSpecifies the IPv6 address and AS number of an individual EBGP peer.The interface on which the peer exists may also be specified.Interfacespecification may be necessary when the peer address is a link-localaddress.If the optional keyword.Ic preferenceis specified followed by a number, bgpd uses the value as the value oflocal preference when advertising reachable routes from the peer viaIBGP.Currently, the value can only be specified per peer base.If the optional keyword.Ic prependis specified, bgpd adds its AS number to the as path when advertisingreachable routes to other EBGP peers.This keywords takes an optional argument, which specifies number of iterationof the addition.If the argument is omitted, bgpd treats it as 1.Note that.Ic prepend 1makes each advertised AS path longer than usual.Typically, this keywords does not have to be set.If the optional keyword.Ic no synchronizationis specified, bgpd will export each EBGP route to the peer without waitingfor synchronization with RIPng for the route.The optional keyword.Ic lcladdrspecifies the local(source) IPv6 address to connect the peer.If the node has multiple IPv6 addresses that can be used as the source address,the keyword should be specified.If a list of.Ar filtersis specified, each of the.Ar filtersis applied to the peer according to the semantics of each filterdescribed above..\".It Xo.Ic group type internal.Op Ic routerid Ar router_id.Ic { Ar substatements.Ic };.XcSpecifies a set of IBGP peers.The BGP identifier of the peer can be specified with the keyword
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -