paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | @c -*-texinfo-*- |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 2 | @c This is part of the Quagga Manual. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 3 | @c Copyright (C) 1999, 2000, 2001 2002 Kunihiro Ishiguro <kunihiro@zebra.org> |
| 4 | @c See file zebra.texi for copying conditions. |
| 5 | @node BGP |
| 6 | @comment node-name, next, previous, up |
| 7 | @chapter BGP |
| 8 | |
| 9 | BGP stands for a Border Gateway Protocol. The lastest BGP version |
| 10 | is 4. It is referred as BGP-4. BGP-4 is one of the Exterior Gateway |
| 11 | Protocols and de-fact standard of Inter Domain routing protocol. |
| 12 | BGP-4 is described in @code{RFC1771} - @cite{A Border Gateway Protocol |
| 13 | 4 (BGP-4)}. |
| 14 | |
| 15 | Many extentions are added to @code{RFC1771}. @code{RFC2858} - |
| 16 | @cite{Multiprotocol Extensions for BGP-4} provide multiprotocol |
| 17 | support to BGP-4. |
| 18 | |
| 19 | @menu |
| 20 | * Starting BGP:: |
| 21 | * BGP router:: |
| 22 | * BGP network:: |
| 23 | * BGP Peer:: |
| 24 | * BGP Peer Group:: |
| 25 | * BGP Address Family:: |
| 26 | * Autonomous System:: |
| 27 | * BGP Communities Attribute:: |
| 28 | * BGP Extended Communities Attribute:: |
| 29 | * Displaying BGP routes:: |
| 30 | * Capability Negotiation:: |
| 31 | * Route Reflector:: |
| 32 | * Route Server:: |
| 33 | * How to set up a 6-Bone connection:: |
| 34 | * Dump BGP packets and table:: |
| 35 | @end menu |
| 36 | |
| 37 | @node Starting BGP, BGP router, BGP, BGP |
| 38 | @comment node-name, next, previous, up |
| 39 | @section Starting BGP |
| 40 | |
| 41 | Default configuration file of @command{bgpd} is @file{bgpd.conf}. |
| 42 | @command{bgpd} searches the current directory first then |
| 43 | @value{INSTALL_PREFIX_ETC}/bgpd.conf. All of bgpd's command must be |
| 44 | configured in @file{bgpd.conf}. |
| 45 | |
| 46 | @command{bgpd} specific invocation options are described below. Common |
| 47 | options may also be specified (@pxref{Common Invocation Options}). |
| 48 | |
| 49 | @table @samp |
| 50 | @item -p @var{PORT} |
| 51 | @itemx --bgp_port=@var{PORT} |
| 52 | Set the bgp protocol's port number. |
| 53 | |
| 54 | @item -r |
| 55 | @itemx --retain |
| 56 | When program terminates, retain BGP routes added by zebra. |
| 57 | @end table |
| 58 | |
| 59 | @node BGP router, BGP network, Starting BGP, BGP |
| 60 | @comment node-name, next, previous, up |
| 61 | @section BGP router |
| 62 | |
| 63 | First of all you must configure BGP router with @command{router bgp} |
| 64 | command. To configure BGP router, you need AS number. AS number is an |
| 65 | identification of autonomous system. BGP protocol uses the AS number |
| 66 | for detecting whether the BGP connection is internal one or external one. |
| 67 | |
| 68 | @deffn Command {router bgp @var{asn}} {} |
| 69 | Enable a BGP protocol process with the specified @var{asn}. After |
| 70 | this statement you can input any @code{BGP Commands}. You can not |
| 71 | create different BGP process under different @var{asn} without |
| 72 | specifying @code{multiple-instance} (@pxref{Multiple instance}). |
| 73 | @end deffn |
| 74 | |
| 75 | @deffn Command {no router bgp @var{asn}} {} |
| 76 | Destroy a BGP protocol process with the specified @var{asn}. |
| 77 | @end deffn |
| 78 | |
| 79 | @deffn {BGP} {bgp router-id @var{A.B.C.D}} {} |
| 80 | This command specifies the router-ID. If @command{bgpd} connects to @command{zebra} it gets |
| 81 | interface and address information. In that case default router ID value |
| 82 | is selected as the largest IP Address of the interfaces. When |
| 83 | @code{router zebra} is not enabled @command{bgpd} can't get interface information |
| 84 | so @code{router-id} is set to 0.0.0.0. So please set router-id by hand. |
| 85 | @end deffn |
| 86 | |
| 87 | @menu |
| 88 | * BGP distance:: |
| 89 | * BGP decision process:: |
| 90 | @end menu |
| 91 | |
| 92 | @node BGP distance, BGP decision process, BGP router, BGP router |
| 93 | @comment node-name, next, previous, up |
| 94 | @subsection BGP distance |
| 95 | |
| 96 | @deffn {BGP} {distance bgp <1-255> <1-255> <1-255>} {} |
| 97 | This command change distance value of BGP. Each argument is distance |
| 98 | value for external routes, internal routes and local routes. |
| 99 | @end deffn |
| 100 | |
| 101 | @deffn {BGP} {distance <1-255> @var{A.B.C.D/M}} {} |
| 102 | @deffnx {BGP} {distance <1-255> @var{A.B.C.D/M} @var{word}} {} |
| 103 | This command set distance value to |
| 104 | @end deffn |
| 105 | |
| 106 | @node BGP decision process, , BGP distance, BGP router |
| 107 | @comment node-name, next, previous, up |
| 108 | @subsection BGP decision process |
| 109 | |
| 110 | @table @asis |
| 111 | @item 1. Weight check |
| 112 | |
| 113 | @item 2. Local preference check. |
| 114 | |
| 115 | @item 3. Local route check. |
| 116 | |
| 117 | @item 4. AS path length check. |
| 118 | |
| 119 | @item 5. Origin check. |
| 120 | |
| 121 | @item 6. MED check. |
| 122 | @end table |
| 123 | |
| 124 | @node BGP network, BGP Peer, BGP router, BGP |
| 125 | @comment node-name, next, previous, up |
| 126 | @section BGP network |
| 127 | |
| 128 | @menu |
| 129 | * BGP route:: |
| 130 | * Route Aggregation:: |
| 131 | * Redistribute to BGP:: |
| 132 | @end menu |
| 133 | |
| 134 | @node BGP route, Route Aggregation, BGP network, BGP network |
| 135 | @comment node-name, next, previous, up |
| 136 | @subsection BGP route |
| 137 | |
| 138 | @deffn {BGP} {network @var{A.B.C.D/M}} {} |
| 139 | This command adds the announcement network. |
| 140 | @example |
| 141 | @group |
| 142 | router bgp 1 |
| 143 | network 10.0.0.0/8 |
| 144 | @end group |
| 145 | @end example |
| 146 | This configuration example says that network 10.0.0.0/8 will be |
| 147 | announced to all neighbors. Some vendors' routers don't advertise |
| 148 | routes if they aren't present in their IGP routing tables; @code{bgp} |
| 149 | doesn't care about IGP routes when announcing its routes. |
| 150 | @end deffn |
| 151 | |
| 152 | @deffn {BGP} {no network @var{A.B.C.D/M}} {} |
| 153 | @end deffn |
| 154 | |
| 155 | @node Route Aggregation, Redistribute to BGP, BGP route, BGP network |
| 156 | @comment node-name, next, previous, up |
| 157 | @subsection Route Aggregation |
| 158 | |
| 159 | @deffn {BGP} {aggregate-address @var{A.B.C.D/M}} {} |
| 160 | This command specifies an aggregate address. |
| 161 | @end deffn |
| 162 | |
| 163 | @deffn {BGP} {aggregate-address @var{A.B.C.D/M} as-set} {} |
| 164 | This command specifies an aggregate address. Resulting routes inlucde |
| 165 | AS set. |
| 166 | @end deffn |
| 167 | |
| 168 | @deffn {BGP} {aggregate-address @var{A.B.C.D/M} summary-only} {} |
| 169 | This command specifies an aggregate address. Aggreated routes will |
| 170 | not be announce. |
| 171 | @end deffn |
| 172 | |
| 173 | @deffn {BGP} {no aggregate-address @var{A.B.C.D/M}} {} |
| 174 | @end deffn |
| 175 | |
| 176 | @node Redistribute to BGP, , Route Aggregation, BGP network |
| 177 | @comment node-name, next, previous, up |
| 178 | @subsection Redistribute to BGP |
| 179 | |
| 180 | @deffn {BGP} {redistribute kernel} {} |
| 181 | Redistribute kernel route to BGP process. |
| 182 | @end deffn |
| 183 | |
| 184 | @deffn {BGP} {redistribute static} {} |
| 185 | Redistribute static route to BGP process. |
| 186 | @end deffn |
| 187 | |
| 188 | @deffn {BGP} {redistribute connected} {} |
| 189 | Redistribute connected route to BGP process. |
| 190 | @end deffn |
| 191 | |
| 192 | @deffn {BGP} {redistribute rip} {} |
| 193 | Redistribute RIP route to BGP process. |
| 194 | @end deffn |
| 195 | |
| 196 | @deffn {BGP} {redistribute ospf} {} |
| 197 | Redistribute OSPF route to BGP process. |
| 198 | @end deffn |
| 199 | |
| 200 | @node BGP Peer, BGP Peer Group, BGP network, BGP |
| 201 | @comment node-name, next, previous, up |
| 202 | @section BGP Peer |
| 203 | |
| 204 | @menu |
| 205 | * Defining Peer:: |
| 206 | * BGP Peer commands:: |
| 207 | * Peer filtering:: |
| 208 | @end menu |
| 209 | |
| 210 | @node Defining Peer, BGP Peer commands, BGP Peer, BGP Peer |
| 211 | @comment node-name, next, previous, up |
| 212 | @subsection Defining Peer |
| 213 | |
| 214 | @deffn {BGP} {neighbor @var{peer} remote-as @var{asn}} {} |
| 215 | Creates a new neighbor whose remote-as is @var{asn}. @var{peer} |
| 216 | can be an IPv4 address or an IPv6 address. |
| 217 | @example |
| 218 | @group |
| 219 | router bgp 1 |
| 220 | neighbor 10.0.0.1 remote-as 2 |
| 221 | @end group |
| 222 | @end example |
| 223 | In this case my router, in AS-1, is trying to peer with AS-2 at |
| 224 | 10.0.0.1. |
| 225 | |
| 226 | This command must be the first command used when configuring a neighbor. |
| 227 | If the remote-as is not specified, @command{bgpd} will complain like this: |
| 228 | @example |
| 229 | can't find neighbor 10.0.0.1 |
| 230 | @end example |
| 231 | @end deffn |
| 232 | |
| 233 | @node BGP Peer commands, Peer filtering, Defining Peer, BGP Peer |
| 234 | @comment node-name, next, previous, up |
| 235 | @subsection BGP Peer commands |
| 236 | |
| 237 | In a @code{router bgp} clause there are neighbor specific configurations |
| 238 | required. |
| 239 | |
| 240 | @deffn {BGP} {neighbor @var{peer} shutdown} {} |
| 241 | @deffnx {BGP} {no neighbor @var{peer} shutdown} {} |
| 242 | Shutdown the peer. We can delete the neighbor's configuration by |
| 243 | @code{no neighbor @var{peer} remote-as @var{as-number}} but all |
| 244 | configuration of the neighbor will be deleted. When you want to |
| 245 | preserve the configuration, but want to drop the BGP peer, use this |
| 246 | syntax. |
| 247 | @end deffn |
| 248 | |
| 249 | @deffn {BGP} {neighbor @var{peer} ebgp-multihop} {} |
| 250 | @deffnx {BGP} {no neighbor @var{peer} ebgp-multihop} {} |
| 251 | @end deffn |
| 252 | |
| 253 | @deffn {BGP} {neighbor @var{peer} description ...} {} |
| 254 | @deffnx {BGP} {no neighbor @var{peer} description ...} {} |
| 255 | Set description of the peer. |
| 256 | @end deffn |
| 257 | |
| 258 | @deffn {BGP} {neighbor @var{peer} version @var{version}} {} |
| 259 | Set up the neighbor's BGP version. @var{version} can be @var{4}, |
| 260 | @var{4+} or @var{4-}. BGP version @var{4} is the default value used for |
| 261 | BGP peering. BGP version @var{4+} means that the neighbor supports |
| 262 | Multiprotocol Extensions for BGP-4. BGP version @var{4-} is similar but |
| 263 | the neighbor speaks the old Internet-Draft revision 00's Multiprotocol |
| 264 | Extensions for BGP-4. Some routing software is still using this |
| 265 | version. |
| 266 | @end deffn |
| 267 | |
| 268 | @deffn {BGP} {neighbor @var{peer} interface @var{ifname}} {} |
| 269 | @deffnx {BGP} {no neighbor @var{peer} interface @var{ifname}} {} |
| 270 | When you connect to a BGP peer over an IPv6 link-local address, you have |
| 271 | to specify the @var{ifname} of the interface used for the connection. |
| 272 | @end deffn |
| 273 | |
| 274 | @deffn {BGP} {neighbor @var{peer} next-hop-self} {} |
| 275 | @deffnx {BGP} {no neighbor @var{peer} next-hop-self} {} |
| 276 | This command specifies an announced route's nexthop as being equivalent |
| 277 | to the address of the bgp router. |
| 278 | @end deffn |
| 279 | |
| 280 | @deffn {BGP} {neighbor @var{peer} update-source} {} |
| 281 | @deffnx {BGP} {no neighbor @var{peer} update-source} {} |
| 282 | @end deffn |
| 283 | |
| 284 | @deffn {BGP} {neighbor @var{peer} default-originate} {} |
| 285 | @deffnx {BGP} {no neighbor @var{peer} default-originate} {} |
| 286 | @command{bgpd}'s default is to not announce the default route (0.0.0.0/0) even it |
| 287 | is in routing table. When you want to announce default routes to the |
| 288 | peer, use this command. |
| 289 | @end deffn |
| 290 | |
| 291 | @deffn {BGP} {neighbor @var{peer} port @var{port}} {} |
| 292 | @deffnx {BGP} {neighbor @var{peer} port @var{port}} {} |
| 293 | @end deffn |
| 294 | |
| 295 | @deffn {BGP} {neighbor @var{peer} send-community} {} |
| 296 | @deffnx {BGP} {neighbor @var{peer} send-community} {} |
| 297 | @end deffn |
| 298 | |
| 299 | @deffn {BGP} {neighbor @var{peer} weight @var{weight}} {} |
| 300 | @deffnx {BGP} {no neighbor @var{peer} weight @var{weight}} {} |
| 301 | This command specifies a default @var{weight} value for the neighbor's |
| 302 | routes. |
| 303 | @end deffn |
| 304 | |
| 305 | @deffn {BGP} {neighbor @var{peer} maximum-prefix @var{number}} {} |
| 306 | @deffnx {BGP} {no neighbor @var{peer} maximum-prefix @var{number}} {} |
| 307 | @end deffn |
| 308 | |
| 309 | @node Peer filtering, , BGP Peer commands, BGP Peer |
| 310 | @comment node-name, next, previous, up |
| 311 | @subsection Peer filtering |
| 312 | |
| 313 | @deffn {BGP} {neighbor @var{peer} distribute-list @var{name} [in|out]} {} |
| 314 | This command specifies a distribute-list for the peer. @var{direct} is |
| 315 | @samp{in} or @samp{out}. |
| 316 | @end deffn |
| 317 | |
| 318 | @deffn {BGP command} {neighbor @var{peer} prefix-list @var{name} [in|out]} {} |
| 319 | @end deffn |
| 320 | |
| 321 | @deffn {BGP command} {neighbor @var{peer} filter-list @var{name} [in|out]} {} |
| 322 | @end deffn |
| 323 | |
| 324 | @deffn {BGP} {neighbor @var{peer} route-map @var{name} [in|out]} {} |
| 325 | Apply a route-map on the neighbor. @var{direct} must be @code{in} or |
| 326 | @code{out}. |
| 327 | @end deffn |
| 328 | |
| 329 | @c ----------------------------------------------------------------------- |
| 330 | @node BGP Peer Group, BGP Address Family, BGP Peer, BGP |
| 331 | @comment node-name, next, previous, up |
| 332 | @section BGP Peer Group |
| 333 | |
| 334 | @deffn {BGP} {neighbor @var{word} peer-group} {} |
| 335 | This command defines a new peer group. |
| 336 | @end deffn |
| 337 | |
| 338 | @deffn {BGP} {neighbor @var{peer} peer-group @var{word}} {} |
| 339 | This command bind specific peer to peer group @var{word}. |
| 340 | @end deffn |
| 341 | |
| 342 | @node BGP Address Family, Autonomous System, BGP Peer Group, BGP |
| 343 | @comment node-name, next, previous, up |
| 344 | @section BGP Address Family |
| 345 | |
| 346 | |
| 347 | |
| 348 | @page |
| 349 | @c ----------------------------------------------------------------------- |
| 350 | @node Autonomous System, BGP Communities Attribute, BGP Address Family, BGP |
| 351 | @comment node-name, next, previous, up |
| 352 | @section Autonomous System |
| 353 | |
| 354 | AS (Autonomous System) is one of the essential element of BGP. BGP |
| 355 | is a distance vector routing protocol. AS framework provides distance |
| 356 | vector metric and loop detection to BGP. @code{RFC1930} - |
| 357 | @cite{Guidelines for creation, selection, and registration of an |
| 358 | Autonomous System (AS)} describes how to use AS. |
| 359 | |
| 360 | AS number is tow octet digita value. So the value range is from 1 |
| 361 | to 65535. AS numbers 64512 through 65535 are defined as private AS |
| 362 | numbers. Private AS numbers must not to be advertised in the global |
| 363 | Internet. |
| 364 | |
| 365 | @menu |
| 366 | * AS Path Regular Expression:: |
| 367 | * Display BGP Routes by AS Path:: |
| 368 | * AS Path Access List:: |
| 369 | * Using AS Path in Route Map:: |
| 370 | * Private AS Numbers:: |
| 371 | @end menu |
| 372 | |
| 373 | @node AS Path Regular Expression, Display BGP Routes by AS Path, Autonomous System, Autonomous System |
| 374 | @comment node-name, next, previous, up |
| 375 | @subsection AS Path Regular Expression |
| 376 | |
| 377 | AS path regular expression can be used for displaying BGP routes and |
| 378 | AS path access list. AS path regular expression is based on |
| 379 | @code{POSIX 1003.2} regular expressions. Following description is |
| 380 | just a subset of @code{POSIX} regular expression. User can use full |
| 381 | @code{POSIX} regular expression. Adding to that special character '_' |
| 382 | is added for AS path regular expression. |
| 383 | |
| 384 | @table @code |
| 385 | @item . |
| 386 | Matches any single character. |
| 387 | @item * |
| 388 | Matches 0 or more occurrences of pattern. |
| 389 | @item + |
| 390 | Matches 1 or more occurrences of pattern. |
| 391 | @item ? |
| 392 | Match 0 or 1 occurrences of pattern. |
| 393 | @item ^ |
| 394 | Matches the beginning of the line. |
| 395 | @item $ |
| 396 | Matches the end of the line. |
| 397 | @item _ |
| 398 | Character @code{_} has special meanings in AS path regular expression. |
| 399 | It matches to space and comma , and AS set delimiter @{ and @} and AS |
| 400 | confederation delimiter @code{(} and @code{)}. And it also matches to |
| 401 | the beginning of the line and the end of the line. So @code{_} can be |
| 402 | used for AS value boundaries match. @code{show ip bgp regexp _7675_} |
| 403 | matches to all of BGP routes which as AS number include @var{7675}. |
| 404 | @end table |
| 405 | |
| 406 | @node Display BGP Routes by AS Path, AS Path Access List, AS Path Regular Expression, Autonomous System |
| 407 | @comment node-name, next, previous, up |
| 408 | @subsection Display BGP Routes by AS Path |
| 409 | |
| 410 | To show BGP routes which has specific AS path information @code{show |
| 411 | ip bgp} command can be used. |
| 412 | |
| 413 | @deffn Command {show ip bgp regexp @var{line}} {} |
| 414 | This commands display BGP routes that matches AS path regular |
| 415 | expression @var{line}. |
| 416 | @end deffn |
| 417 | |
| 418 | @node AS Path Access List, Using AS Path in Route Map, Display BGP Routes by AS Path, Autonomous System |
| 419 | @comment node-name, next, previous, up |
| 420 | @subsection AS Path Access List |
| 421 | |
| 422 | AS path access list is user defined AS path. |
| 423 | |
| 424 | @deffn {Command} {ip as-path access-list @var{word} @{permit|deny@} @var{line}} {} |
| 425 | This command defines a new AS path access list. |
| 426 | @end deffn |
| 427 | |
| 428 | @deffn {Command} {no ip as-path access-list @var{word}} {} |
| 429 | @deffnx {Command} {no ip as-path access-list @var{word} @{permit|deny@} @var{line}} {} |
| 430 | @end deffn |
| 431 | |
| 432 | @node Using AS Path in Route Map, Private AS Numbers, AS Path Access List, Autonomous System |
| 433 | @comment node-name, next, previous, up |
| 434 | @subsection Using AS Path in Route Map |
| 435 | |
| 436 | @deffn {Route Map} {match as-path @var{word}} {} |
| 437 | @end deffn |
| 438 | |
| 439 | @deffn {Route Map} {set as-path prepend @var{as-path}} {} |
| 440 | @end deffn |
| 441 | |
| 442 | @node Private AS Numbers, , Using AS Path in Route Map, Autonomous System |
| 443 | @comment node-name, next, previous, up |
| 444 | @subsection Private AS Numbers |
| 445 | |
| 446 | @page |
| 447 | @c ----------------------------------------------------------------------- |
| 448 | @node BGP Communities Attribute, BGP Extended Communities Attribute, Autonomous System, BGP |
| 449 | @comment node-name, next, previous, up |
| 450 | @section BGP Communities Attribute |
| 451 | |
| 452 | BGP communities attribute is widely used for implementing policy |
| 453 | routing. Network operators can manipulate BGP communities attribute |
| 454 | based on their network policy. BGP communities attribute is defined |
| 455 | in @code{RFC1997} - @cite{BGP Communities Attribute} and |
| 456 | @code{RFC1998} - @cite{An Application of the BGP Community Attribute |
| 457 | in Multi-home Routing}. It is an optional transitive attribute, |
| 458 | therefore local policy can travel through different autonomous system. |
| 459 | |
| 460 | Communities attribute is a set of communities values. Each |
| 461 | communities value is 4 octet long. The following format is used to |
| 462 | define communities value. |
| 463 | |
| 464 | @table @code |
| 465 | @item AS:VAL |
| 466 | This format represents 4 octet communities value. @code{AS} is high |
| 467 | order 2 octet in digit format. @code{VAL} is low order 2 octet in |
| 468 | digit format. This format is useful to define AS oriented policy |
| 469 | value. For example, @code{7675:80} can be used when AS 7675 wants to |
| 470 | pass local policy value 80 to neighboring peer. |
| 471 | @item internet |
| 472 | @code{internet} represents well-known communities value 0. |
| 473 | @item no-export |
| 474 | @code{no-export} represents well-known communities value @code{NO_EXPORT}@* |
| 475 | @r{(0xFFFFFF01)}. All routes carry this value must not be advertised |
| 476 | to outside a BGP confederation boundary. If neighboring BGP peer is |
| 477 | part of BGP confederation, the peer is considered as inside a BGP |
| 478 | confederation boundary, so the route will be announced to the peer. |
| 479 | @item no-advertise |
| 480 | @code{no-advertise} represents well-known communities value |
| 481 | @code{NO_ADVERTISE}@*@r{(0xFFFFFF02)}. All routes carry this value |
| 482 | must not be advertise to other BGP peers. |
| 483 | @item local-AS |
| 484 | @code{local-AS} represents well-known communities value |
| 485 | @code{NO_EXPORT_SUBCONFED} @r{(0xFFFFFF03)}. All routes carry this |
| 486 | value must not be advertised to external BGP peers. Even if the |
| 487 | neighboring router is part of confederation, it is considered as |
| 488 | external BGP peer, so the route will not be announced to the peer. |
| 489 | @end table |
| 490 | |
| 491 | When BGP communities attribute is received, duplicated communities |
| 492 | value in the communities attribute is ignored and each communities |
| 493 | values are sorted in numerical order. |
| 494 | |
| 495 | @menu |
| 496 | * BGP Community Lists:: |
| 497 | * Numbered BGP Community Lists:: |
| 498 | * BGP Community in Route Map:: |
| 499 | * Display BGP Routes by Community:: |
| 500 | * Using BGP Communities Attribute:: |
| 501 | @end menu |
| 502 | |
| 503 | @node BGP Community Lists, Numbered BGP Community Lists, BGP Communities Attribute, BGP Communities Attribute |
| 504 | @comment node-name, next, previous, up |
| 505 | @subsection BGP Community Lists |
| 506 | |
| 507 | BGP community list is a user defined BGP communites attribute list. |
| 508 | BGP community list can be used for matching or manipulating BGP |
| 509 | communities attribute in updates. |
| 510 | |
| 511 | There are two types of community list. One is standard community |
| 512 | list and another is expanded community list. Standard community list |
| 513 | defines communities attribute. Expanded community list defines |
| 514 | communities attribute string with regular expression. Standard |
| 515 | community list is compiled into binary format when user define it. |
| 516 | Standard community list will be directly compared to BGP communities |
| 517 | attribute in BGP updates. Therefore the comparison is faster than |
| 518 | expanded community list. |
| 519 | |
| 520 | @deffn Command {ip community-list standard @var{name} @{permit|deny@} @var{community}} {} |
| 521 | This command defines a new standard community list. @var{community} |
| 522 | is communities value. The @var{community} is compiled into community |
| 523 | structure. We can define multiple community list under same name. In |
| 524 | that case match will happen user defined order. Once the |
| 525 | community list matches to communities attribute in BGP updates it |
| 526 | return permit or deny by the community list definition. When there is |
| 527 | no matched entry, deny will be returned. When @var{community} is |
| 528 | empty it matches to any routes. |
| 529 | @end deffn |
| 530 | |
| 531 | @deffn Command {ip community-list expanded @var{name} @{permit|deny@} @var{line}} {} |
| 532 | This command defines a new expanded community list. @var{line} is a |
| 533 | string expression of communities attribute. @var{line} can include |
| 534 | regular expression to match communities attribute in BGP updates. |
| 535 | @end deffn |
| 536 | |
| 537 | @deffn Command {no ip community-list @var{name}} {} |
| 538 | @deffnx Command {no ip community-list standard @var{name}} {} |
| 539 | @deffnx Command {no ip community-list expanded @var{name}} {} |
| 540 | These commands delete community lists specified by @var{name}. All of |
| 541 | community lists shares a single name space. So community lists can be |
| 542 | removed simpley specifying community lists name. |
| 543 | @end deffn |
| 544 | |
| 545 | @deffn {Command} {show ip community-list} {} |
| 546 | @deffnx {Command} {show ip community-list @var{name}} {} |
| 547 | This command display current community list information. When |
| 548 | @var{name} is specified the specified community list's information is |
| 549 | shown. |
| 550 | |
| 551 | @example |
| 552 | # show ip community-list |
| 553 | Named Community standard list CLIST |
| 554 | permit 7675:80 7675:100 no-export |
| 555 | deny internet |
| 556 | Named Community expanded list EXPAND |
| 557 | permit : |
| 558 | |
| 559 | # show ip community-list CLIST |
| 560 | Named Community standard list CLIST |
| 561 | permit 7675:80 7675:100 no-export |
| 562 | deny internet |
| 563 | @end example |
| 564 | @end deffn |
| 565 | |
| 566 | @node Numbered BGP Community Lists, BGP Community in Route Map, BGP Community Lists, BGP Communities Attribute |
| 567 | @comment node-name, next, previous, up |
| 568 | @subsection Numbered BGP Community Lists |
| 569 | |
| 570 | When number is used for BGP community list name, the number has |
| 571 | special meanings. Community list number in the range from 1 and 99 is |
| 572 | standard community list. Community list number in the range from 100 |
| 573 | to 199 is expanded community list. These community lists are called |
| 574 | as numbered community lists. On the other hand normal community lists |
| 575 | is called as named community lists. |
| 576 | |
| 577 | @deffn Command {ip community-list <1-99> @{permit|deny@} @var{community}} {} |
| 578 | This command defines a new community list. <1-99> is standard |
| 579 | community list number. Community list name within this range defines |
| 580 | standard community list. When @var{community} is empty it matches to |
| 581 | any routes. |
| 582 | @end deffn |
| 583 | |
| 584 | @deffn Command {ip community-list <100-199> @{permit|deny@} @var{community}} {} |
| 585 | This command defines a new community list. <100-199> is expanded |
| 586 | community list number. Community list name within this range defines |
| 587 | expanded community list. |
| 588 | @end deffn |
| 589 | |
| 590 | @deffn Command {ip community-list @var{name} @{permit|deny@} @var{community}} {} |
| 591 | When community list type is not specifed, the community list type is |
| 592 | automatically detected. If @var{community} can be compiled into |
| 593 | communities attribute, the community list is defined as a standard |
| 594 | community list. Otherwise it is defined as an expanded community |
| 595 | list. This feature is left for backward compability. Use of this |
| 596 | feature is not recommended. |
| 597 | @end deffn |
| 598 | |
| 599 | @node BGP Community in Route Map, Display BGP Routes by Community, Numbered BGP Community Lists, BGP Communities Attribute |
| 600 | @comment node-name, next, previous, up |
| 601 | @subsection BGP Community in Route Map |
| 602 | |
| 603 | In Route Map (@pxref{Route Map}), we can match or set BGP |
| 604 | communities attribute. Using this feature network operator can |
| 605 | implement their network policy based on BGP communities attribute. |
| 606 | |
| 607 | Following commands can be used in Route Map. |
| 608 | |
| 609 | @deffn {Route Map} {match community @var{word}} {} |
| 610 | @deffnx {Route Map} {match community @var{word} exact-match} {} |
| 611 | This command perform match to BGP updates using community list |
| 612 | @var{word}. When the one of BGP communities value match to the one of |
| 613 | communities value in community list, it is match. When |
| 614 | @code{exact-match} keyword is spcified, match happen only when BGP |
| 615 | updates have completely same communities value specified in the |
| 616 | community list. |
| 617 | @end deffn |
| 618 | |
| 619 | @deffn {Route Map} {set community none} {} |
| 620 | @deffnx {Route Map} {set community @var{community}} {} |
| 621 | @deffnx {Route Map} {set community @var{community} additive} {} |
| 622 | This command manipulate communities value in BGP updates. When |
| 623 | @code{none} is specified as communities value, it removes entire |
| 624 | communities attribute from BGP updates. When @var{community} is not |
| 625 | @code{none}, specified communities value is set to BGP updates. If |
| 626 | BGP updates already has BGP communities value, the existing BGP |
| 627 | communities value is replaced with specified @var{community} value. |
| 628 | When @code{additive} keyword is specified, @var{community} is appended |
| 629 | to the existing communities value. |
| 630 | @end deffn |
| 631 | |
| 632 | @deffn {Route Map} {set comm-list @var{word} delete} {} |
| 633 | This command remove communities value from BGP communities attribute. |
| 634 | The @var{word} is community list name. When BGP route's communities |
| 635 | value matches to the community list @var{word}, the communities value |
| 636 | is removed. When all of communities value is removed eventually, the |
| 637 | BGP update's communities attribute is completely removed. |
| 638 | @end deffn |
| 639 | |
| 640 | @node Display BGP Routes by Community, Using BGP Communities Attribute, BGP Community in Route Map, BGP Communities Attribute |
| 641 | @comment node-name, next, previous, up |
| 642 | @subsection Display BGP Routes by Community |
| 643 | |
| 644 | To show BGP routes which has specific BGP communities attribute, |
| 645 | @code{show ip bgp} command can be used. The @var{community} value and |
| 646 | community list can be used for @code{show ip bgp} command. |
| 647 | |
| 648 | @deffn Command {show ip bgp community} {} |
| 649 | @deffnx Command {show ip bgp community @var{community}} {} |
| 650 | @deffnx Command {show ip bgp community @var{community} exact-match} {} |
| 651 | @code{show ip bgp community} displays BGP routes which has communities |
| 652 | attribute. When @var{community} is specified, BGP routes that matches |
| 653 | @var{community} value is displayed. For this command, @code{internet} |
| 654 | keyword can't be used for @var{community} value. When |
| 655 | @code{exact-match} is specified, it display only routes that have an |
| 656 | exact match. |
| 657 | @end deffn |
| 658 | |
| 659 | @deffn Command {show ip bgp community-list @var{word}} {} |
| 660 | @deffnx Command {show ip bgp community-list @var{word} exact-match} {} |
| 661 | This commands display BGP routes that matches community list |
| 662 | @var{word}. When @code{exact-match} is specified, display only routes |
| 663 | that have an exact match. |
| 664 | @end deffn |
| 665 | |
| 666 | @node Using BGP Communities Attribute, , Display BGP Routes by Community, BGP Communities Attribute |
| 667 | @comment node-name, next, previous, up |
| 668 | @subsection Using BGP Communities Attribute |
| 669 | |
| 670 | Following configuration is the most typical usage of BGP communities |
| 671 | attribute. AS 7675 provides upstream Internet connection to AS 100. |
| 672 | When following configuration exists in AS 7675, AS 100 networks |
| 673 | operator can set local preference in AS 7675 network by setting BGP |
| 674 | communities attribute to the updates. |
| 675 | |
| 676 | @example |
| 677 | router bgp 7675 |
| 678 | neighbor 192.168.0.1 remote-as 100 |
| 679 | neighbor 192.168.0.1 route-map RMAP in |
| 680 | ! |
| 681 | ip community-list 70 permit 7675:70 |
| 682 | ip community-list 70 deny |
| 683 | ip community-list 80 permit 7675:80 |
| 684 | ip community-list 80 deny |
| 685 | ip community-list 90 permit 7675:90 |
| 686 | ip community-list 90 deny |
| 687 | ! |
| 688 | route-map RMAP permit 10 |
| 689 | match community 70 |
| 690 | set local-preference 70 |
| 691 | ! |
| 692 | route-map RMAP permit 20 |
| 693 | match community 80 |
| 694 | set local-preference 80 |
| 695 | ! |
| 696 | route-map RMAP permit 30 |
| 697 | match community 90 |
| 698 | set local-preference 90 |
| 699 | @end example |
| 700 | |
| 701 | Following configuration announce 10.0.0.0/8 from AS 100 to AS 7675. |
| 702 | The route has communities value 7675:80 so when above configuration |
| 703 | exists in AS 7675, announced route's local preference will be set to |
| 704 | value 80. |
| 705 | |
| 706 | @example |
| 707 | router bgp 100 |
| 708 | network 10.0.0.0/8 |
| 709 | neighbor 192.168.0.2 remote-as 7675 |
| 710 | neighbor 192.168.0.2 route-map RMAP out |
| 711 | ! |
| 712 | ip prefix-list PLIST permit 10.0.0.0/8 |
| 713 | ! |
| 714 | route-map RMAP permit 10 |
| 715 | match ip address prefix-list PLIST |
| 716 | set community 7675:80 |
| 717 | @end example |
| 718 | |
| 719 | Following configuration is an example of BGP route filtering using |
| 720 | communities attribute. This configuration only permit BGP routes |
| 721 | which has BGP communities value 0:80 or 0:90. Network operator can |
| 722 | put special internal communities value at BGP border router, then |
| 723 | limit the BGP routes announcement into the internal network. |
| 724 | |
| 725 | @example |
| 726 | router bgp 7675 |
| 727 | neighbor 192.168.0.1 remote-as 100 |
| 728 | neighbor 192.168.0.1 route-map RMAP in |
| 729 | ! |
| 730 | ip community-list 1 permit 0:80 0:90 |
| 731 | ! |
| 732 | route-map RMAP permit in |
| 733 | match community 1 |
| 734 | @end example |
| 735 | |
| 736 | Following exmaple filter BGP routes which has communities value 1:1. |
| 737 | When there is no match community-list returns deny. To avoid |
| 738 | filtering all of routes, we need to define permit any at last. |
| 739 | |
| 740 | @example |
| 741 | router bgp 7675 |
| 742 | neighbor 192.168.0.1 remote-as 100 |
| 743 | neighbor 192.168.0.1 route-map RMAP in |
| 744 | ! |
| 745 | ip community-list standard FILTER deny 1:1 |
| 746 | ip community-list standard FILTER permit |
| 747 | ! |
| 748 | route-map RMAP permit 10 |
| 749 | match community FILTER |
| 750 | @end example |
| 751 | |
| 752 | Communities value keyword @code{internet} has special meanings in |
| 753 | standard community lists. In below example @code{internet} act as |
| 754 | match any. It matches all of BGP routes even if the route does not |
| 755 | have communities attribute at all. So community list @code{INTERNET} |
| 756 | is same as above example's @code{FILTER}. |
| 757 | |
| 758 | @example |
| 759 | ip community-list standard INTERNET deny 1:1 |
| 760 | ip community-list standard INTERNET permit internet |
| 761 | @end example |
| 762 | |
| 763 | Following configuration is an example of communities value deletion. |
| 764 | With this configuration communities value 100:1 and 100:2 is removed |
| 765 | from BGP updates. For communities value deletion, only @code{permit} |
| 766 | community-list is used. @code{deny} community-list is ignored. |
| 767 | |
| 768 | @example |
| 769 | router bgp 7675 |
| 770 | neighbor 192.168.0.1 remote-as 100 |
| 771 | neighbor 192.168.0.1 route-map RMAP in |
| 772 | ! |
| 773 | ip community-list standard DEL permit 100:1 100:2 |
| 774 | ! |
| 775 | route-map RMAP permit 10 |
| 776 | set comm-list DEL delete |
| 777 | @end example |
| 778 | |
| 779 | @c ----------------------------------------------------------------------- |
| 780 | @node BGP Extended Communities Attribute, Displaying BGP routes, BGP Communities Attribute, BGP |
| 781 | @comment node-name, next, previous, up |
| 782 | @section BGP Extended Communities Attribute |
| 783 | |
| 784 | BGP extended communities attribute is introduced with MPLS VPN/BGP |
| 785 | technology. MPLS VPN/BGP expands capability of network infrastructure |
| 786 | to provide VPN functionality. At the same time it requires a new |
| 787 | framework for policy routing. With BGP Extended Communities Attribute |
| 788 | we can use Route Target or Site of Origin for implementing network |
| 789 | policy for MPLS VPN/BGP. |
| 790 | |
| 791 | BGP Extended Communities Attribute is similar to BGP Communities |
| 792 | Attribute. It is an optional transitive attribute. BGP Extended |
| 793 | Communities Attribute can carry multiple Extended Community value. |
| 794 | Each Extended Community value is eight octet length. |
| 795 | |
| 796 | BGP Extended Communities Attribute provides an extended range |
| 797 | compared with BGP Communities Attribute. Adding to that there is a |
| 798 | type field in each value to provides community space structure. |
| 799 | |
| 800 | There are two format to define Extended Community value. One is AS |
| 801 | based format the other is IP address based format. |
| 802 | |
| 803 | @table @code |
| 804 | @item AS:VAL |
| 805 | This is a format to define AS based Extended Community value. |
| 806 | @code{AS} part is 2 octets Global Administrator subfield in Extended |
| 807 | Community value. @code{VAL} part is 4 octets Local Administrator |
| 808 | subfield. @code{7675:100} represents AS 7675 policy value 100. |
| 809 | @item IP-Address:VAL |
| 810 | This is a format to define IP address based Extended Community value. |
| 811 | @code{IP-Address} part is 4 octets Global Administrator subfield. |
| 812 | @code{VAL} part is 2 octets Local Administrator subfield. |
| 813 | @code{10.0.0.1:100} represents |
| 814 | @end table |
| 815 | |
| 816 | @menu |
| 817 | * BGP Extended Community Lists:: |
| 818 | * BGP Extended Communities in Route Map:: |
| 819 | @end menu |
| 820 | |
| 821 | @node BGP Extended Community Lists, BGP Extended Communities in Route Map, BGP Extended Communities Attribute, BGP Extended Communities Attribute |
| 822 | @comment node-name, next, previous, up |
| 823 | @subsection BGP Extended Community Lists |
| 824 | |
| 825 | Expanded Community Lists is a user defined BGP Expanded Community |
| 826 | Lists. |
| 827 | |
| 828 | @deffn Command {ip extcommunity-list standard @var{name} @{permit|deny@} @var{extcommunity}} {} |
| 829 | This command defines a new standard extcommunity-list. |
| 830 | @var{extcommunity} is extended communities value. The |
| 831 | @var{extcommunity} is compiled into extended community structure. We |
| 832 | can define multiple extcommunity-list under same name. In that case |
| 833 | match will happen user defined order. Once the extcommunity-list |
| 834 | matches to extended communities attribute in BGP updates it return |
| 835 | permit or deny based upon the extcommunity-list definition. When |
| 836 | there is no matched entry, deny will be returned. When |
| 837 | @var{extcommunity} is empty it matches to any routes. |
| 838 | @end deffn |
| 839 | |
| 840 | @deffn Command {ip extcommunity-list expanded @var{name} @{permit|deny@} @var{line}} {} |
| 841 | This command defines a new expanded extcommunity-list. @var{line} is |
| 842 | a string expression of extended communities attribute. @var{line} can |
| 843 | include regular expression to match extended communities attribute in |
| 844 | BGP updates. |
| 845 | @end deffn |
| 846 | |
| 847 | @deffn Command {no ip extcommunity-list @var{name}} {} |
| 848 | @deffnx Command {no ip extcommunity-list standard @var{name}} {} |
| 849 | @deffnx Command {no ip extcommunity-list expanded @var{name}} {} |
| 850 | These commands delete extended community lists specified by |
| 851 | @var{name}. All of extended community lists shares a single name |
| 852 | space. So extended community lists can be removed simpley specifying |
| 853 | the name. |
| 854 | @end deffn |
| 855 | |
| 856 | @deffn {Command} {show ip extcommunity-list} {} |
| 857 | @deffnx {Command} {show ip extcommunity-list @var{name}} {} |
| 858 | This command display current extcommunity-list information. When |
| 859 | @var{name} is specified the community list's information is shown. |
| 860 | |
| 861 | @example |
| 862 | # show ip extcommunity-list |
| 863 | @end example |
| 864 | @end deffn |
| 865 | |
| 866 | @node BGP Extended Communities in Route Map, , BGP Extended Community Lists, BGP Extended Communities Attribute |
| 867 | @comment node-name, next, previous, up |
| 868 | @subsection BGP Extended Communities in Route Map |
| 869 | |
| 870 | @deffn {Route Map} {match extcommunity @var{word}} {} |
| 871 | @end deffn |
| 872 | |
| 873 | @deffn {Route Map} {set extcommunity rt @var{extcommunity}} {} |
| 874 | This command set Route Target value. |
| 875 | @end deffn |
| 876 | |
| 877 | @deffn {Route Map} {set extcommunity soo @var{extcommunity}} {} |
| 878 | This command set Site of Origin value. |
| 879 | @end deffn |
| 880 | |
| 881 | @c ----------------------------------------------------------------------- |
| 882 | @node Displaying BGP routes, Capability Negotiation, BGP Extended Communities Attribute, BGP |
| 883 | @comment node-name, next, previous, up |
| 884 | @section Displaying BGP Routes |
| 885 | |
| 886 | @menu |
| 887 | * Show IP BGP:: |
| 888 | * More Show IP BGP:: |
| 889 | @end menu |
| 890 | |
| 891 | @node Show IP BGP, More Show IP BGP, Displaying BGP routes, Displaying BGP routes |
| 892 | @comment node-name, next, previous, up |
| 893 | @subsection Show IP BGP |
| 894 | |
| 895 | @deffn {Command} {show ip bgp} {} |
| 896 | @deffnx {Command} {show ip bgp @var{A.B.C.D}} {} |
| 897 | @deffnx {Command} {show ip bgp @var{X:X::X:X}} {} |
| 898 | This command displays BGP routes. When no route is specified it |
| 899 | display all of IPv4 BGP routes. |
| 900 | @end deffn |
| 901 | |
| 902 | @example |
| 903 | BGP table version is 0, local router ID is 10.1.1.1 |
| 904 | Status codes: s suppressed, d damped, h history, * valid, > best, i - internal |
| 905 | Origin codes: i - IGP, e - EGP, ? - incomplete |
| 906 | |
| 907 | Network Next Hop Metric LocPrf Weight Path |
| 908 | *> 1.1.1.1/32 0.0.0.0 0 32768 i |
| 909 | |
| 910 | Total number of prefixes 1 |
| 911 | @end example |
| 912 | |
| 913 | @node More Show IP BGP, , Show IP BGP, Displaying BGP routes |
| 914 | @comment node-name, next, previous, up |
| 915 | @subsection More Show IP BGP |
| 916 | |
| 917 | @deffn {Command} {show ip bgp regexp @var{line}} {} |
| 918 | This command display BGP routes using AS path regular expression (@pxref{Display BGP Routes by AS Path}). |
| 919 | @end deffn |
| 920 | |
| 921 | @deffn Command {show ip bgp community @var{community}} {} |
| 922 | @deffnx Command {show ip bgp community @var{community} exact-match} {} |
| 923 | This command display BGP routes using @var{community} (@pxref{Display |
| 924 | BGP Routes by Community}). |
| 925 | @end deffn |
| 926 | |
| 927 | @deffn Command {show ip bgp community-list @var{word}} {} |
| 928 | @deffnx Command {show ip bgp community-list @var{word} exact-match} {} |
| 929 | This command display BGP routes using community list (@pxref{Display |
| 930 | BGP Routes by Community}). |
| 931 | @end deffn |
| 932 | |
| 933 | @deffn {Command} {show ip bgp summary} {} |
| 934 | @end deffn |
| 935 | |
| 936 | @deffn {Command} {show ip bgp neighbor [@var{peer}]} {} |
| 937 | @end deffn |
| 938 | |
| 939 | @deffn {Command} {clear ip bgp @var{peer}} {} |
| 940 | Clear peers which have addresses of X.X.X.X |
| 941 | @end deffn |
| 942 | |
| 943 | @deffn {Command} {clear ip bgp @var{peer} soft in} {} |
| 944 | Clear peer using soft reconfiguration. |
| 945 | @end deffn |
| 946 | |
| 947 | @deffn {Command} {show debug} {} |
| 948 | @end deffn |
| 949 | |
| 950 | @deffn {Command} {debug event} {} |
| 951 | @end deffn |
| 952 | |
| 953 | @deffn {Command} {debug update} {} |
| 954 | @end deffn |
| 955 | |
| 956 | @deffn {Command} {debug keepalive} {} |
| 957 | @end deffn |
| 958 | |
| 959 | @deffn {Command} {no debug event} {} |
| 960 | @end deffn |
| 961 | |
| 962 | @deffn {Command} {no debug update} {} |
| 963 | @end deffn |
| 964 | |
| 965 | @deffn {Command} {no debug keepalive} {} |
| 966 | @end deffn |
| 967 | |
| 968 | @node Capability Negotiation, Route Reflector, Displaying BGP routes, BGP |
| 969 | @comment node-name, next, previous, up |
| 970 | @section Capability Negotiation |
| 971 | |
| 972 | When adding IPv6 routing information exchange feature to BGP. There |
| 973 | were some proposals. @acronym{IETF} @acronym{IDR} working group finally |
| 974 | take a proposal called Multiprotocol Extension for BGP. The |
| 975 | specification is described in RFC2283. The protocol does not define new |
| 976 | protocols. It defines new attributes to existing BGP. When it is used |
| 977 | exchanging IPv6 routing information it is called BGP-4+. When it is |
| 978 | used for exchanging multicast routing information it is called MBGP. |
| 979 | |
| 980 | @command{bgpd} supports Multiprotocol Extension for BGP. So if remote peer |
| 981 | supports the protocol, @command{bgpd} can exchange IPv6 and/or multicast routing |
| 982 | information. |
| 983 | |
| 984 | Traditional BGP does not have the feature to detect remote peer's |
| 985 | capability whether it can handle other than IPv4 unicast routes. This |
| 986 | is a big problem using Multiprotocol Extension for BGP to operational |
| 987 | network. @cite{draft-ietf-idr-bgp4-cap-neg-04.txt} is proposing a |
| 988 | feature called Capability Negotiation. @command{bgpd} use this Capability |
| 989 | Negotiation to detect remote peer's capabilities. If the peer is only |
| 990 | configured as IPv4 unicast neighbor, @command{bgpd} does not send these Capability |
| 991 | Negotiation packets. |
| 992 | |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 993 | By default, Quagga will bring up peering with minimal common capability |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 994 | for the both sides. For example, local router has unicast and multicast |
| 995 | capabilitie and remote router has unicast capability. In this case, |
| 996 | the local router will establish the connection with unicast only capability. |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 997 | When there are no common capabilities, Quagga sends Unsupported Capability |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 998 | error and then resets the connection. |
| 999 | |
| 1000 | If you want to completely match capabilities with remote peer. Please |
| 1001 | use @command{strict-capability-match} command. |
| 1002 | |
| 1003 | @deffn {BGP} {neighbor @var{peer} strict-capability-match} {} |
| 1004 | @deffnx {BGP} {no neighbor @var{peer} strict-capability-match} {} |
| 1005 | Strictly compares remote capabilities and local capabilities. If capabilities |
| 1006 | are different, send Unsupported Capability error then reset connection. |
| 1007 | @end deffn |
| 1008 | |
| 1009 | You may want to disable sending Capability Negotiation OPEN message |
| 1010 | optional parameter to the peer when remote peer does not implement |
| 1011 | Capability Negotiation. Please use @command{dont-capability-negotiate} |
| 1012 | command to disable the feature. |
| 1013 | |
| 1014 | @deffn {BGP} {neighbor @var{peer} dont-capability-negotiate} {} |
| 1015 | @deffnx {BGP} {no neighbor @var{peer} dont-capability-negotiate} {} |
| 1016 | Suppress sending Capability Negotiation as OPEN message optional |
| 1017 | parameter to the peer. This command only affects the peer is configured |
| 1018 | other than IPv4 unicast configuration. |
| 1019 | @end deffn |
| 1020 | |
| 1021 | When remote peer does not have capability negotiation feature, remote |
| 1022 | peer will not send any capabilities at all. In that case, bgp configures |
| 1023 | the peer with configured capabilities. |
| 1024 | |
| 1025 | You may prefer locally configured capabilities more than the negotiated |
| 1026 | capabilities even though remote peer sends capabilities. If the peer is |
| 1027 | configured by @command{override-capability}, @command{bgpd} ignores received |
| 1028 | capabilities then override negotiated capabilities with configured values. |
| 1029 | |
| 1030 | @deffn {BGP} {neighbor @var{peer} override-capability} {} |
| 1031 | @deffnx {BGP} {no neighbor @var{peer} override-capability} {} |
| 1032 | Override the result of Capability Negotiation with local configuration. |
| 1033 | Ignore remote peer's capability value. |
| 1034 | @end deffn |
| 1035 | |
| 1036 | @node Route Reflector, Route Server, Capability Negotiation, BGP |
| 1037 | @comment node-name, next, previous, up |
| 1038 | @section Route Reflector |
| 1039 | |
| 1040 | @deffn {BGP} {bgp cluster-id @var{a.b.c.d}} {} |
| 1041 | @end deffn |
| 1042 | |
| 1043 | @deffn {BGP} {neighbor @var{peer} route-reflector-client} {} |
| 1044 | @deffnx {BGP} {no neighbor @var{peer} route-reflector-client} {} |
| 1045 | @end deffn |
| 1046 | |
| 1047 | @node Route Server, How to set up a 6-Bone connection, Route Reflector, BGP |
| 1048 | @comment node-name, next, previous, up |
| 1049 | @section Route Server |
| 1050 | |
| 1051 | At an Internet Exchange point, many ISPs are connected to each other by |
| 1052 | external BGP peering. Normally these external BGP connection are done by |
| 1053 | @code{full mesh} method. As with internal BGP full mesh formation, |
| 1054 | this method has a scaling problem. |
| 1055 | |
| 1056 | This scaling problem is well known. Route Server is a method to resolve |
| 1057 | the problem. Each ISP's BGP router only peers to Route Server. Route |
| 1058 | Server serves as BGP information exchange to other BGP routers. By |
| 1059 | applying this method, numbers of BGP connections is reduced from |
| 1060 | O(n*(n-1)/2) to O(n). |
| 1061 | |
| 1062 | Unlike normal BGP router, Route Server must have several routing tables |
| 1063 | for managing different routing policies for each BGP speaker. We call the |
| 1064 | routing tables as different @code{view}s. @command{bgpd} can work as |
| 1065 | normal BGP router or Route Server or both at the same time. |
| 1066 | |
| 1067 | @menu |
| 1068 | * Multiple instance:: |
| 1069 | * BGP instance and view:: |
| 1070 | * Routing policy:: |
| 1071 | * Viewing the view:: |
| 1072 | @end menu |
| 1073 | |
| 1074 | @node Multiple instance, BGP instance and view, Route Server, Route Server |
| 1075 | @comment node-name, next, previous, up |
| 1076 | @subsection Multiple instance |
| 1077 | |
| 1078 | To enable multiple view function of @code{bgpd}, you must turn on |
| 1079 | multiple instance feature beforehand. |
| 1080 | |
| 1081 | @deffn {Command} {bgp multiple-instance} {} |
| 1082 | Enable BGP multiple instance feature. After this feature is enabled, |
| 1083 | you can make multiple BGP instances or multiple BGP views. |
| 1084 | @end deffn |
| 1085 | |
| 1086 | @deffn {Command} {no bgp multiple-instance} {} |
| 1087 | Disable BGP multiple instance feature. You can not disable this feature |
| 1088 | when BGP multiple instances or views exist. |
| 1089 | @end deffn |
| 1090 | |
| 1091 | When you want to make configuration more Cisco like one, |
| 1092 | |
| 1093 | @deffn {Command} {bgp config-type cisco} {} |
| 1094 | Cisco compatible BGP configuration output. |
| 1095 | @end deffn |
| 1096 | |
| 1097 | When bgp config-type cisco is specified, |
| 1098 | |
| 1099 | ``no synchronization'' is displayed. |
| 1100 | ``no auto-summary'' is desplayed. |
| 1101 | |
| 1102 | ``network'' and ``aggregate-address'' argument is displayed as |
| 1103 | ``A.B.C.D M.M.M.M'' |
| 1104 | |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 1105 | Quagga: network 10.0.0.0/8 |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1106 | Cisco: network 10.0.0.0 |
| 1107 | |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 1108 | Quagga: aggregate-address 192.168.0.0/24 |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1109 | Cisco: aggregate-address 192.168.0.0 255.255.255.0 |
| 1110 | |
| 1111 | Community attribute handling is also different. If there is no |
| 1112 | configuration is specified community attribute and extended community |
| 1113 | attribute are sent to neighbor. When user manually disable the |
| 1114 | feature community attribute is not sent to the neighbor. In case of |
| 1115 | ``bgp config-type cisco'' is specified, community attribute is not |
| 1116 | sent to the neighbor by default. To send community attribute user has |
| 1117 | to specify ``neighbor A.B.C.D send-community'' command. |
| 1118 | |
| 1119 | ! |
| 1120 | router bgp 1 |
| 1121 | neighbor 10.0.0.1 remote-as 1 |
| 1122 | no neighbor 10.0.0.1 send-community |
| 1123 | ! |
| 1124 | |
| 1125 | ! |
| 1126 | router bgp 1 |
| 1127 | neighbor 10.0.0.1 remote-as 1 |
| 1128 | neighbor 10.0.0.1 send-community |
| 1129 | ! |
| 1130 | |
| 1131 | @deffn {Command} {bgp config-type zebra} {} |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 1132 | Quagga style BGP configuration. This is default. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1133 | @end deffn |
| 1134 | |
| 1135 | @node BGP instance and view, Routing policy, Multiple instance, Route Server |
| 1136 | @comment node-name, next, previous, up |
| 1137 | @subsection BGP instance and view |
| 1138 | |
| 1139 | BGP instance is a normal BGP process. The result of route selection |
| 1140 | goes to the kernel routing table. You can setup different AS at the |
| 1141 | same time when BGP multiple instance feature is enabled. |
| 1142 | |
| 1143 | @deffn {Command} {router bgp @var{as-number}} {} |
| 1144 | Make a new BGP instance. You can use arbitrary word for the @var{name}. |
| 1145 | @end deffn |
| 1146 | |
| 1147 | @example |
| 1148 | @group |
| 1149 | bgp multiple-instance |
| 1150 | ! |
| 1151 | router bgp 1 |
| 1152 | neighbor 10.0.0.1 remote-as 2 |
| 1153 | neighbor 10.0.0.2 remote-as 3 |
| 1154 | ! |
| 1155 | router bgp 2 |
| 1156 | neighbor 10.0.0.3 remote-as 4 |
| 1157 | neighbor 10.0.0.4 remote-as 5 |
| 1158 | @end group |
| 1159 | @end example |
| 1160 | |
| 1161 | BGP view is almost same as normal BGP process. The result of |
| 1162 | route selection does not go to the kernel routing table. BGP view is |
| 1163 | only for exchanging BGP routing information. |
| 1164 | |
| 1165 | @deffn {Command} {router bgp @var{as-number} view @var{name}} {} |
| 1166 | Make a new BGP view. You can use arbitrary word for the @var{name}. This |
| 1167 | view's route selection result does not go to the kernel routing table. |
| 1168 | @end deffn |
| 1169 | |
| 1170 | With this command, you can setup Route Server like below. |
| 1171 | |
| 1172 | @example |
| 1173 | @group |
| 1174 | bgp multiple-instance |
| 1175 | ! |
| 1176 | router bgp 1 view 1 |
| 1177 | neighbor 10.0.0.1 remote-as 2 |
| 1178 | neighbor 10.0.0.2 remote-as 3 |
| 1179 | ! |
| 1180 | router bgp 2 view 2 |
| 1181 | neighbor 10.0.0.3 remote-as 4 |
| 1182 | neighbor 10.0.0.4 remote-as 5 |
| 1183 | @end group |
| 1184 | @end example |
| 1185 | |
| 1186 | @node Routing policy, Viewing the view, BGP instance and view, Route Server |
| 1187 | @comment node-name, next, previous, up |
| 1188 | @subsection Routing policy |
| 1189 | |
| 1190 | You can set different routing policy for a peer. For example, you can |
| 1191 | set different filter for a peer. |
| 1192 | |
| 1193 | @example |
| 1194 | @group |
| 1195 | bgp multiple-instance |
| 1196 | ! |
| 1197 | router bgp 1 view 1 |
| 1198 | neighbor 10.0.0.1 remote-as 2 |
| 1199 | neighbor 10.0.0.1 distribute-list 1 in |
| 1200 | ! |
| 1201 | router bgp 1 view 2 |
| 1202 | neighbor 10.0.0.1 remote-as 2 |
| 1203 | neighbor 10.0.0.1 distribute-list 2 in |
| 1204 | @end group |
| 1205 | @end example |
| 1206 | |
| 1207 | This means BGP update from a peer 10.0.0.1 goes to both BGP view 1 and view |
| 1208 | 2. When the update is inserted into view 1, distribute-list 1 is |
| 1209 | applied. On the other hand, when the update is inserted into view 2, |
| 1210 | distribute-list 2 is applied. |
| 1211 | |
| 1212 | @node Viewing the view, , Routing policy, Route Server |
| 1213 | @comment node-name, next, previous, up |
| 1214 | @subsection Viewing the view |
| 1215 | |
| 1216 | To display routing table of BGP view, you must specify view name. |
| 1217 | |
| 1218 | @deffn {Command} {show ip bgp view @var{name}} {} |
| 1219 | Display routing table of BGP view @var{name}. |
| 1220 | @end deffn |
| 1221 | |
| 1222 | @node How to set up a 6-Bone connection, Dump BGP packets and table, Route Server, BGP |
| 1223 | @comment node-name, next, previous, up |
| 1224 | @section How to set up a 6-Bone connection |
| 1225 | |
| 1226 | @example |
| 1227 | @group |
| 1228 | zebra configuration |
| 1229 | =================== |
| 1230 | ! |
| 1231 | ! Actually there is no need to configure zebra |
| 1232 | ! |
| 1233 | |
| 1234 | bgpd configuration |
| 1235 | ================== |
| 1236 | ! |
| 1237 | ! This means that routes go through zebra and into the kernel. |
| 1238 | ! |
| 1239 | router zebra |
| 1240 | ! |
| 1241 | ! MP-BGP configuration |
| 1242 | ! |
| 1243 | router bgp 7675 |
| 1244 | bgp router-id 10.0.0.1 |
| 1245 | neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 remote-as @var{as-number} |
| 1246 | ! |
| 1247 | address-family ipv6 |
| 1248 | network 3ffe:506::/32 |
| 1249 | neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 activate |
| 1250 | neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 route-map set-nexthop out |
| 1251 | neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 remote-as @var{as-number} |
| 1252 | neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 route-map set-nexthop out |
| 1253 | exit-address-family |
| 1254 | ! |
| 1255 | ipv6 access-list all permit any |
| 1256 | ! |
| 1257 | ! Set output nexthop address. |
| 1258 | ! |
| 1259 | route-map set-nexthop permit 10 |
| 1260 | match ipv6 address all |
| 1261 | set ipv6 nexthop global 3ffe:1cfa:0:2:2c0:4fff:fe68:a225 |
| 1262 | set ipv6 nexthop local fe80::2c0:4fff:fe68:a225 |
| 1263 | ! |
| 1264 | ! logfile FILENAME is obsolete. Please use log file FILENAME |
paul | 7190f4e | 2003-08-12 12:40:20 +0000 | [diff] [blame] | 1265 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1266 | log file bgpd.log |
| 1267 | ! |
| 1268 | @end group |
| 1269 | @end example |
| 1270 | |
| 1271 | @node Dump BGP packets and table, , How to set up a 6-Bone connection, BGP |
| 1272 | @comment node-name, next, previous, up |
| 1273 | @section Dump BGP packets and table |
| 1274 | |
| 1275 | @deffn Command {dump bgp all @var{path}} {} |
| 1276 | @deffnx Command {dump bgp all @var{path} @var{interval}} {} |
| 1277 | Dump all BGP packet and events to @var{path} file. |
| 1278 | @end deffn |
| 1279 | |
| 1280 | @deffn Command {dump bgp updates @var{path}} {} |
| 1281 | @deffnx Command {dump bgp updates @var{path} @var{interval}} {} |
| 1282 | Dump BGP updates to @var{path} file. |
| 1283 | @end deffn |
| 1284 | |
| 1285 | @deffn Command {dump bgp routes @var{path}} {} |
| 1286 | @deffnx Command {dump bgp routes @var{path}} {} |
| 1287 | Dump whole BGP routing table to @var{path}. This is heavy process. |
| 1288 | @end deffn |