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