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

📄 bgpd.texi

📁 大名鼎鼎的路由器源码。程序分ZEBRA、OSPFRIP等3个包。程序框架采用一个路由协议一个进程的方式
💻 TEXI
📖 第 1 页 / 共 4 页
字号:
@deffn {BGP} {neighbor @var{peer} route-map @var{name} [in|out]} {}Apply a route-map on the neighbor.  @var{direct} must be @code{in} or@code{out}.@end deffn@c -----------------------------------------------------------------------@node BGP Peer Group, BGP Address Family, BGP Peer, BGP@comment  node-name,  next,  previous,  up@section BGP Peer Group@deffn {BGP} {neighbor @var{word} peer-group} {}This command defines a new peer group.@end deffn@deffn {BGP} {neighbor @var{peer} peer-group @var{word}} {}This command bind specific peer to peer group @var{word}.@end deffn@node BGP Address Family, Autonomous System, BGP Peer Group, BGP@comment  node-name,  next,  previous,  up@section BGP Address Family@page@c -----------------------------------------------------------------------@node Autonomous System, BGP Communities Attribute, BGP Address Family, BGP@comment  node-name,  next,  previous,  up@section Autonomous System  AS (Autonomous System) is one of the essential element of BGP.  BGPis a distance vector routing protocol.  AS framework provides distancevector metric and loop detection to BGP.  @code{RFC1930} -@cite{Guidelines for creation, selection, and registration of anAutonomous System (AS)} describes how to use AS.  AS number is tow octet digita value.  So the value range is from 1to 65535.  AS numbers 64512 through 65535 are defined as private ASnumbers.  Private AS numbers must not to be advertised in the globalInternet.@menu* AS Path Regular Expression::  * Display BGP Routes by AS Path::  * AS Path Access List::         * Using AS Path in Route Map::  * Private AS Numbers::          @end menu@node AS Path Regular Expression, Display BGP Routes by AS Path, Autonomous System, Autonomous System@comment  node-name,  next,  previous,  up@subsection AS Path Regular Expression  AS path regular expression can be used for displaying BGP routes andAS path access list.  AS path regular expression is based on@code{POSIX 1003.2} regular expressions.  Following description isjust a subset of @code{POSIX} regular expression.  User can use full@code{POSIX} regular expression.  Adding to that special character '_'is added for AS path regular expression.@table @code@item .Matches any single character.@item *Matches 0 or more occurrences of pattern.@item +Matches 1 or more occurrences of pattern.@item ?Match 0 or 1 occurrences of pattern.@item ^Matches the beginning of the line.@item $Matches the end of the line.@item _Character @code{_} has special meanings in AS path regular expression.It matches to space and comma , and AS set delimiter @{ and @} and ASconfederation delimiter @code{(} and @code{)}.  And it also matches tothe beginning of the line and the end of the line.  So @code{_} can beused for AS value boundaries match.  @code{show ip bgp regexp _7675_}matches to all of BGP routes which as AS number include @var{7675}.@end table@node Display BGP Routes by AS Path, AS Path Access List, AS Path Regular Expression, Autonomous System@comment  node-name,  next,  previous,  up@subsection Display BGP Routes by AS Path  To show BGP routes which has specific AS path information @code{showip bgp} command can be used.  @deffn Command {show ip bgp regexp @var{line}} {}This commands display BGP routes that matches AS path regularexpression @var{line}.@end deffn@node AS Path Access List, Using AS Path in Route Map, Display BGP Routes by AS Path, Autonomous System@comment  node-name,  next,  previous,  up@subsection AS Path Access List  AS path access list is user defined AS path.@deffn {Command} {ip as-path access-list @var{word} @{permit|deny@} @var{line}} {}This command defines a new AS path access list.@end deffn@deffn {Command} {no ip as-path access-list @var{word}} {}@deffnx {Command} {no ip as-path access-list @var{word} @{permit|deny@} @var{line}} {}@end deffn@node Using AS Path in Route Map, Private AS Numbers, AS Path Access List, Autonomous System@comment  node-name,  next,  previous,  up@subsection Using AS Path in Route Map@deffn {Route Map} {match as-path @var{word}} {}@end deffn@deffn {Route Map} {set as-path prepend @var{as-path}} {}@end deffn@node Private AS Numbers,  , Using AS Path in Route Map, Autonomous System@comment  node-name,  next,  previous,  up@subsection Private AS Numbers@page@c -----------------------------------------------------------------------@node BGP Communities Attribute, BGP Extended Communities Attribute, Autonomous System, BGP@comment  node-name,  next,  previous,  up@section BGP Communities Attribute  BGP communities attribute is widely used for implementing policyrouting.  Network operators can manipulate BGP communities attributebased on their network policy.  BGP communities attribute is definedin @code{RFC1997} - @cite{BGP Communities Attribute} and@code{RFC1998} - @cite{An Application of the BGP Community Attributein Multi-home Routing}.  It is an optional transitive attribute,therefore local policy can travel through different autonomous system.  Communities attribute is a set of communities values.  Eachcommunities value is 4 octet long.  The following format is used todefine communities value.@table @code@item AS:VALThis format represents 4 octet communities value.  @code{AS} is highorder 2 octet in digit format.  @code{VAL} is low order 2 octet indigit format.  This format is useful to define AS oriented policyvalue.  For example, @code{7675:80} can be used when AS 7675 wants topass local policy value 80 to neighboring peer.@item internet@code{internet} represents well-known communities value 0.@item no-export@code{no-export} represents well-known communities value @code{NO_EXPORT}@*@r{(0xFFFFFF01)}.  All routes carry this value must not be advertisedto outside a BGP confederation boundary.  If neighboring BGP peer ispart of BGP confederation, the peer is considered as inside a BGPconfederation boundary, so the route will be announced to the peer.@item no-advertise@code{no-advertise} represents well-known communities value@code{NO_ADVERTISE}@*@r{(0xFFFFFF02)}.  All routes carry this valuemust not be advertise to other BGP peers.@item local-AS@code{local-AS} represents well-known communities value@code{NO_EXPORT_SUBCONFED} @r{(0xFFFFFF03)}.  All routes carry thisvalue must not be advertised to external BGP peers.  Even if theneighboring router is part of confederation, it is considered asexternal BGP peer, so the route will not be announced to the peer.@end table  When BGP communities attribute is received, duplicated communitiesvalue in the communities attribute is ignored and each communitiesvalues are sorted in numerical order.  @menu* BGP Community Lists::         * Numbered BGP Community Lists::  * BGP Community in Route Map::  * Display BGP Routes by Community::  * Using BGP Communities Attribute::  @end menu@node BGP Community Lists, Numbered BGP Community Lists, BGP Communities Attribute, BGP Communities Attribute@comment  node-name,  next,  previous,  up@subsection BGP Community Lists  BGP community list is a user defined BGP communites attribute list.BGP community list can be used for matching or manipulating BGPcommunities attribute in updates.  There are two types of community list.  One is standard communitylist and another is expanded community list.  Standard community listdefines communities attribute.  Expanded community list definescommunities attribute string with regular expression.  Standardcommunity list is compiled into binary format when user define it.Standard community list will be directly compared to BGP communitiesattribute in BGP updates.  Therefore the comparison is faster thanexpanded community list.@deffn Command {ip community-list standard @var{name} @{permit|deny@} @var{community}} {}This command defines a new standard community list.  @var{community}is communities value.  The @var{community} is compiled into communitystructure.  We can define multiple community list under same name.  Inthat case match will happen user defined order.  Once thecommunity list matches to communities attribute in BGP updates itreturn permit or deny by the community list definition.  When there isno matched entry, deny will be returned.  When @var{community} isempty it matches to any routes.@end deffn@deffn Command {ip community-list expanded @var{name} @{permit|deny@} @var{line}} {}This command defines a new expanded community list.  @var{line} is astring expression of communities attribute.  @var{line} can includeregular expression to match communities attribute in BGP updates.@end deffn@deffn Command {no ip community-list @var{name}} {}@deffnx Command {no ip community-list standard @var{name}} {}@deffnx Command {no ip community-list expanded @var{name}} {}These commands delete community lists specified by @var{name}.  All ofcommunity lists shares a single name space.  So community lists can beremoved simpley specifying community lists name.@end deffn@deffn {Command} {show ip community-list} {}@deffnx {Command} {show ip community-list @var{name}} {}This command display current community list information.  When@var{name} is specified the specified community list's information isshown.@example# show ip community-list Named Community standard list CLIST    permit 7675:80 7675:100 no-export    deny internetNamed Community expanded list EXPAND    permit :# show ip community-list CLISTNamed Community standard list CLIST    permit 7675:80 7675:100 no-export    deny internet@end example@end deffn@node Numbered BGP Community Lists, BGP Community in Route Map, BGP Community Lists, BGP Communities Attribute@comment  node-name,  next,  previous,  up@subsection Numbered BGP Community Lists  When number is used for BGP community list name, the number hasspecial meanings.  Community list number in the range from 1 and 99 isstandard community list.  Community list number in the range from 100to 199 is expanded community list.  These community lists are calledas numbered community lists.  On the other hand normal community listsis called as named community lists.@deffn Command {ip community-list <1-99> @{permit|deny@} @var{community}} {}This command defines a new community list.  <1-99> is standardcommunity list number.  Community list name within this range definesstandard community list.  When @var{community} is empty it matches toany routes.@end deffn@deffn Command {ip community-list <100-199> @{permit|deny@} @var{community}} {}This command defines a new community list.  <100-199> is expandedcommunity list number.  Community list name within this range definesexpanded community list.@end deffn@deffn Command {ip community-list @var{name} @{permit|deny@} @var{community}} {}When community list type is not specifed, the community list type isautomatically detected.  If @var{community} can be compiled intocommunities attribute, the community list is defined as a standardcommunity list.  Otherwise it is defined as an expanded communitylist.  This feature is left for backward compability.  Use of thisfeature is not recommended.@end deffn@node BGP Community in Route Map, Display BGP Routes by Community, Numbered BGP Community Lists, BGP Communities Attribute@comment  node-name,  next,  previous,  up@subsection BGP Community in Route Map  In Route Map (@pxref{Route Map}), we can match or set BGPcommunities attribute.  Using this feature network operator canimplement their network policy based on BGP communities attribute.  Following commands can be used in Route Map.@deffn {Route Map} {match community @var{word}} {}@deffnx {Route Map} {match community @var{word} exact-match} {}This command perform match to BGP updates using community list@var{word}.  When the one of BGP communities value match to the one ofcommunities value in community list, it is match.  When@code{exact-match} keyword is spcified, match happen only when BGPupdates have completely same communities value specified in thecommunity list.@end deffn@deffn {Route Map} {set community none} {}@deffnx {Route Map} {set community @var{community}} {}@deffnx {Route Map} {set community @var{community} additive} {}This command manipulate communities value in BGP updates.  When@code{none} is specified as communities value, it removes entirecommunities attribute from BGP updates.  When @var{community} is not@code{none}, specified communities value is set to BGP updates.  IfBGP updates already has BGP communities value, the existing BGPcommunities value is replaced with specified @var{community} value.When @code{additive} keyword is specified, @var{community} is appendedto the existing communities value.@end deffn@deffn {Route Map} {set comm-list @var{word} delete} {}This command remove communities value from BGP communities attribute.The @var{word} is community list name.  When BGP route's communitiesvalue matches to the community list @var{word}, the communities valueis removed.  When all of communities value is removed eventually, theBGP update's communities attribute is completely removed.@end deffn@node Display BGP Routes by Community, Using BGP Communities Attribute, BGP Community in Route Map, BGP Communities Attribute@comment  node-name,  next,  previous,  up@subsection Display BGP Routes by Community  To show BGP routes which has specific BGP communities attribute,@code{show ip bgp} command can be used.  The @var{community} value andcommunity list can be used for @code{show ip bgp} command.

⌨️ 快捷键说明

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