Annotation of embedaddon/quagga/doc/quagga.info-1, revision 1.1.1.4
1.1 misho 1: This is quagga.info, produced by makeinfo version 4.13 from quagga.texi.
2:
3: Copyright (C) 1999-2005 Kunihiro Ishiguro, et al.
4:
5: Permission is granted to make and distribute verbatim copies of
6: this manual provided the copyright notice and this permission
7: notice are preserved on all copies.
8:
9: Permission is granted to copy and distribute modified versions of
10: this manual under the conditions for verbatim copying, provided
11: that the entire resulting derived work is distributed under the
12: terms of a permission notice identical to this one.
13:
14: Permission is granted to copy and distribute translations of this
15: manual into another language, under the above conditions for
16: modified versions, except that this permission notice may be
17: stated in a translation approved by Kunihiro Ishiguro.
18:
19: INFO-DIR-SECTION Routing Software:
20: START-INFO-DIR-ENTRY
21: * Quagga: (quagga). The Quagga Software Routing Suite
22: END-INFO-DIR-ENTRY
23:
24: This file documents the Quagga Software Routing Suite which manages
25: common TCP/IP routing protocols.
26:
1.1.1.4 ! misho 27: This is Edition 0.99.22, last updated 27 January 2013 of `The Quagga
! 28: Manual', for Quagga Version 0.99.22.
1.1 misho 29:
30: Copyright (C) 1999-2005 Kunihiro Ishiguro, et al.
31:
32: Permission is granted to make and distribute verbatim copies of
33: this manual provided the copyright notice and this permission
34: notice are preserved on all copies.
35:
36: Permission is granted to copy and distribute modified versions of
37: this manual under the conditions for verbatim copying, provided
38: that the entire resulting derived work is distributed under the
39: terms of a permission notice identical to this one.
40:
41: Permission is granted to copy and distribute translations of this
42: manual into another language, under the above conditions for
43: modified versions, except that this permission notice may be
44: stated in a translation approved by Kunihiro Ishiguro.
45:
46:
47: File: quagga.info, Node: Top, Next: Overview, Up: (dir)
48:
49: Quagga
50: ******
51:
52: Quagga is an advanced routing software package that provides a suite of
1.1.1.4 ! misho 53: TCP/IP based routing protocols. This is the Manual for Quagga 0.99.22.
1.1.1.3 misho 54: Quagga is a fork of GNU Zebra.
1.1 misho 55:
56: Copyright (C) 1999-2005 Kunihiro Ishiguro, et al.
57:
58: Permission is granted to make and distribute verbatim copies of
59: this manual provided the copyright notice and this permission
60: notice are preserved on all copies.
61:
62: Permission is granted to copy and distribute modified versions of
63: this manual under the conditions for verbatim copying, provided
64: that the entire resulting derived work is distributed under the
65: terms of a permission notice identical to this one.
66:
67: Permission is granted to copy and distribute translations of this
68: manual into another language, under the above conditions for
69: modified versions, except that this permission notice may be
70: stated in a translation approved by Kunihiro Ishiguro.
71:
72: * Menu:
73:
74: * Overview::
75: * Installation::
76: * Basic commands::
77: * Zebra::
78: * RIP::
79: * RIPng::
80: * OSPFv2::
81: * OSPFv3::
1.1.1.3 misho 82: * Babel::
1.1 misho 83: * BGP::
84: * Configuring Quagga as a Route Server::
85: * VTY shell::
86: * Filtering::
87: * Route Map::
88: * IPv6 Support::
89: * Kernel Interface::
90: * SNMP Support::
91: * Zebra Protocol::
92: * Packet Binary Dump Format::
93: * Command Index::
94: * VTY Key Index::
95: * Index::
96:
97:
98: File: quagga.info, Node: Overview, Next: Installation, Prev: Top, Up: Top
99:
100: 1 Overview
101: **********
102:
103: Quagga is a routing software package that provides TCP/IP based routing
104: services with routing protocols support such as RIPv1, RIPv2, RIPng,
1.1.1.4 ! misho 105: OSPFv2, OSPFv3, IS-IS, BGP-4, and BGP-4+ (*note Supported RFCs::).
! 106: Quagga also supports special BGP Route Reflector and Route Server
! 107: behavior. In addition to traditional IPv4 routing protocols, Quagga
! 108: also supports IPv6 routing protocols. With SNMP daemon which supports
! 109: SMUX and AgentX protocol, Quagga provides routing protocol MIBs (*note
! 110: SNMP Support::).
1.1 misho 111:
112: Quagga uses an advanced software architecture to provide you with a
113: high quality, multi server routing engine. Quagga has an interactive
114: user interface for each routing protocol and supports common client
115: commands. Due to this design, you can add new protocol daemons to
116: Quagga easily. You can use Quagga library as your program's client
117: user interface.
118:
119: Quagga is distributed under the GNU General Public License.
120:
121: * Menu:
122:
123: * About Quagga:: Basic information about Quagga
124: * System Architecture:: The Quagga system architecture
125: * Supported Platforms:: Supported platforms and future plans
126: * Supported RFCs:: Supported RFCs
127: * How to get Quagga::
128: * Mailing List:: Mailing list information
129: * Bug Reports:: Mail address for bug data
130:
131:
132: File: quagga.info, Node: About Quagga, Next: System Architecture, Up: Overview
133:
134: 1.1 About Quagga
135: ================
136:
137: Today, TCP/IP networks are covering all of the world. The Internet has
138: been deployed in many countries, companies, and to the home. When you
139: connect to the Internet your packet will pass many routers which have
140: TCP/IP routing functionality.
141:
142: A system with Quagga installed acts as a dedicated router. With
143: Quagga, your machine exchanges routing information with other routers
144: using routing protocols. Quagga uses this information to update the
145: kernel routing table so that the right data goes to the right place.
146: You can dynamically change the configuration and you may view routing
147: table information from the Quagga terminal interface.
148:
149: Adding to routing protocol support, Quagga can setup interface's
150: flags, interface's address, static routes and so on. If you have a
151: small network, or a stub network, or xDSL connection, configuring the
152: Quagga routing software is very easy. The only thing you have to do is
153: to set up the interfaces and put a few commands about static routes
154: and/or default routes. If the network is rather large, or if the
155: network structure changes frequently, you will want to take advantage
156: of Quagga's dynamic routing protocol support for protocols such as RIP,
1.1.1.4 ! misho 157: OSPF, IS-IS or BGP.
1.1 misho 158:
159: Traditionally, UNIX based router configuration is done by `ifconfig'
160: and `route' commands. Status of routing table is displayed by
161: `netstat' utility. Almost of these commands work only if the user has
162: root privileges. Quagga has a different system administration method.
163: There are two user modes in Quagga. One is normal mode, the other is
164: enable mode. Normal mode user can only view system status, enable mode
165: user can change system configuration. This UNIX account independent
166: feature will be great help to the router administrator.
167:
1.1.1.4 ! misho 168: Currently, Quagga supports common unicast routing protocols, that is
! 169: BGP, OSPF, RIP and IS-IS. Upcoming for MPLS support, an implementation
! 170: of LDP is currently being prepared for merging. Implementations of BFD
! 171: and PIM-SSM (IPv4) also exist, but are not actively being worked on.
! 172:
! 173: The ultimate goal of the Quagga project is making a productive,
! 174: quality, free TCP/IP routing software package.
1.1 misho 175:
176:
177: File: quagga.info, Node: System Architecture, Next: Supported Platforms, Prev: About Quagga, Up: Overview
178:
179: 1.2 System Architecture
180: =======================
181:
182: Traditional routing software is made as a one process program which
183: provides all of the routing protocol functionalities. Quagga takes a
184: different approach. It is made from a collection of several daemons
185: that work together to build the routing table. There may be several
186: protocol-specific routing daemons and zebra the kernel routing manager.
187:
188: The `ripd' daemon handles the RIP protocol, while `ospfd' is a
189: daemon which supports OSPF version 2. `bgpd' supports the BGP-4
190: protocol. For changing the kernel routing table and for redistribution
191: of routes between different routing protocols, there is a kernel
192: routing table manager `zebra' daemon. It is easy to add a new routing
193: protocol daemons to the entire routing system without affecting any
194: other software. You need to run only the protocol daemon associated
195: with routing protocols in use. Thus, user may run a specific daemon
196: and send routing reports to a central routing console.
197:
198: There is no need for these daemons to be running on the same
199: machine. You can even run several same protocol daemons on the same
200: machine. This architecture creates new possibilities for the routing
201: system.
202:
203: +----+ +----+ +-----+ +-----+
204: |bgpd| |ripd| |ospfd| |zebra|
205: +----+ +----+ +-----+ +-----+
206: |
207: +---------------------------|--+
208: | v |
209: | UNIX Kernel routing table |
210: | |
211: +------------------------------+
212:
213: Quagga System Architecture
214:
215: Multi-process architecture brings extensibility, modularity and
216: maintainability. At the same time it also brings many configuration
217: files and terminal interfaces. Each daemon has it's own configuration
218: file and terminal interface. When you configure a static route, it
219: must be done in `zebra' configuration file. When you configure BGP
220: network it must be done in `bgpd' configuration file. This can be a
221: very annoying thing. To resolve the problem, Quagga provides
222: integrated user interface shell called `vtysh'. `vtysh' connects to
223: each daemon with UNIX domain socket and then works as a proxy for user
224: input.
225:
226: Quagga was planned to use multi-threaded mechanism when it runs with
227: a kernel that supports multi-threads. But at the moment, the thread
228: library which comes with GNU/Linux or FreeBSD has some problems with
229: running reliable services such as routing software, so we don't use
230: threads at all. Instead we use the `select(2)' system call for
231: multiplexing the events.
232:
233:
234: File: quagga.info, Node: Supported Platforms, Next: Supported RFCs, Prev: System Architecture, Up: Overview
235:
236: 1.3 Supported Platforms
237: =======================
238:
1.1.1.4 ! misho 239: Currently Quagga supports GNU/Linux and BSD. Porting Quagga to other
! 240: platforms is not too difficult as platform dependent code should most
! 241: be limited to the `zebra' daemon. Protocol daemons are mostly platform
! 242: independent. Please let us know when you find out Quagga runs on a
! 243: platform which is not listed below.
1.1 misho 244:
245: The list of officially supported platforms are listed below. Note
246: that Quagga may run correctly on other platforms, and may run with
247: partial functionality on further platforms.
248:
249:
1.1.1.4 ! misho 250: * GNU/Linux
! 251:
! 252: * FreeBSD
! 253:
! 254: * NetBSD
! 255:
! 256: * OpenBSD
! 257:
! 258: Versions of these platforms that are older than around 2 years from
! 259: the point of their original release (in case of GNU/Linux, this is
! 260: since the kernel's release on kernel.org) may need some work.
! 261: Similarly, the following platforms may work with some effort:
! 262:
! 263:
! 264: * Solaris
1.1 misho 265:
1.1.1.4 ! misho 266: * Mac OSX
1.1 misho 267:
1.1.1.4 ! misho 268: Also note that, in particular regarding proprietary platforms,
! 269: compiler and C library choice will affect Quagga. Only recent versions
! 270: of the following C compilers are well-tested:
1.1 misho 271:
272:
1.1.1.4 ! misho 273: * GNU's GCC
! 274:
! 275: * LLVM's clang
! 276:
! 277: * Intel's ICC
1.1 misho 278:
279:
280: File: quagga.info, Node: Supported RFCs, Next: How to get Quagga, Prev: Supported Platforms, Up: Overview
281:
282: 1.4 Supported RFCs
283: ==================
284:
285: Below is the list of currently supported RFC's.
286:
287: RFC1058
288: `Routing Information Protocol. C.L. Hedrick. Jun-01-1988.'
289:
290: RF2082
291: `RIP-2 MD5 Authentication. F. Baker, R. Atkinson. January 1997.'
292:
293: RFC2453
294: `RIP Version 2. G. Malkin. November 1998.'
295:
296: RFC2080
297: `RIPng for IPv6. G. Malkin, R. Minnear. January 1997.'
298:
299: RFC2328
300: `OSPF Version 2. J. Moy. April 1998.'
301:
302: RFC2370
303: `The OSPF Opaque LSA Option R. Coltun. July 1998.'
304:
305: RFC3101
306: `The OSPF Not-So-Stubby Area (NSSA) Option P. Murphy. January
307: 2003.'
308:
309: RFC2740
310: `OSPF for IPv6. R. Coltun, D. Ferguson, J. Moy. December 1999.'
311:
312: RFC1771
313: `A Border Gateway Protocol 4 (BGP-4). Y. Rekhter & T. Li. March
314: 1995.'
315:
316: RFC1965
317: `Autonomous System Confederations for BGP. P. Traina. June 1996.'
318:
319: RFC1997
320: `BGP Communities Attribute. R. Chandra, P. Traina & T. Li. August
321: 1996.'
322:
323: RFC2545
324: `Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain
325: Routing. P. Marques, F. Dupont. March 1999.'
326:
327: RFC2796
328: `BGP Route Reflection An alternative to full mesh IBGP. T. Bates &
329: R. Chandrasekeran. June 1996.'
330:
331: RFC2858
332: `Multiprotocol Extensions for BGP-4. T. Bates, Y. Rekhter, R.
333: Chandra, D. Katz. June 2000.'
334:
335: RFC2842
336: `Capabilities Advertisement with BGP-4. R. Chandra, J. Scudder.
337: May 2000.'
338:
339: RFC3137
340: `OSPF Stub Router Advertisement, A. Retana, L. Nguyen, R. White,
341: A. Zinin, D. McPherson. June 2001'
342:
343: When SNMP support is enabled, below RFC is also supported.
344:
345: RFC1227
346: `SNMP MUX protocol and MIB. M.T. Rose. May-01-1991.'
347:
348: RFC1657
349: `Definitions of Managed Objects for the Fourth Version of the
350: Border Gateway Protocol (BGP-4) using SMIv2. S. Willis, J. Burruss,
351: J. Chu, Editor. July 1994.'
352:
353: RFC1724
354: `RIP Version 2 MIB Extension. G. Malkin & F. Baker. November 1994.'
355:
356: RFC1850
357: `OSPF Version 2 Management Information Base. F. Baker, R. Coltun.
358: November 1995.'
359:
1.1.1.4 ! misho 360: RFC2741
! 361: `Agent Extensibility (AgentX) Protocol. M. Daniele, B. Wijnen.
! 362: January 2000.'
! 363:
1.1 misho 364:
365:
366: File: quagga.info, Node: How to get Quagga, Next: Mailing List, Prev: Supported RFCs, Up: Overview
367:
368: 1.5 How to get Quagga
369: =====================
370:
371: The official Quagga web-site is located at:
372:
373: `http://www.quagga.net/'
374:
375: and contains further information, as well as links to additional
376: resources.
377:
378: Quagga (http://www.quagga.net/) is a fork of GNU Zebra, whose
379: web-site is located at:
380:
381: `http://www.zebra.org/'.
382:
383:
384: File: quagga.info, Node: Mailing List, Next: Bug Reports, Prev: How to get Quagga, Up: Overview
385:
386: 1.6 Mailing List
387: ================
388:
389: There is a mailing list for discussions about Quagga. If you have any
390: comments or suggestions to Quagga, please subscribe to:
391:
392: `http://lists.quagga.net/mailman/listinfo/quagga-users'.
393:
394: The Quagga site has further information on the available mailing
395: lists, see:
396:
397: `http://www.quagga.net/lists.php'
398:
399:
400: File: quagga.info, Node: Bug Reports, Prev: Mailing List, Up: Overview
401:
402: 1.7 Bug Reports
403: ===============
404:
405: If you think you have found a bug, please send a bug report to:
406:
407: `http://bugzilla.quagga.net'
408:
409: When you send a bug report, please be careful about the points below.
410:
411: * Please note what kind of OS you are using. If you use the IPv6
412: stack please note that as well.
413:
414: * Please show us the results of `netstat -rn' and `ifconfig -a'.
415: Information from zebra's VTY command `show ip route' will also be
416: helpful.
417:
418: * Please send your configuration file with the report. If you
419: specify arguments to the configure script please note that too.
420:
421: Bug reports are very important for us to improve the quality of
422: Quagga. Quagga is still in the development stage, but please don't
423: hesitate to send a bug report to `http://bugzilla.quagga.net'.
424:
425:
426: File: quagga.info, Node: Installation, Next: Basic commands, Prev: Overview, Up: Top
427:
428: 2 Installation
429: **************
430:
431: There are three steps for installing the software: configuration,
432: compilation, and installation.
433:
434: * Menu:
435:
436: * Configure the Software::
437: * Build the Software::
438: * Install the Software::
439:
440: The easiest way to get Quagga running is to issue the following
441: commands:
442:
443: % configure
444: % make
445: % make install
446:
447:
448: File: quagga.info, Node: Configure the Software, Next: Build the Software, Up: Installation
449:
450: 2.1 Configure the Software
451: ==========================
452:
453: * Menu:
454:
455: * The Configure script and its options::
456: * Least-Privilege support::
457: * Linux notes::
458:
459:
460: File: quagga.info, Node: The Configure script and its options, Next: Least-Privilege support, Up: Configure the Software
461:
462: 2.1.1 The Configure script and its options
463: ------------------------------------------
464:
465: Quagga has an excellent configure script which automatically detects
466: most host configurations. There are several additional configure
467: options you can use to turn off IPv6 support, to disable the
468: compilation of specific daemons, and to enable SNMP support.
469:
470: `--enable-guile'
471: Turn on compilation of the zebra-guile interpreter. You will need
472: the guile library to make this. zebra-guile implementation is not
473: yet finished. So this option is only useful for zebra-guile
474: developers.
475:
476: `--disable-ipv6'
477: Turn off IPv6 related features and daemons. Quagga configure
478: script automatically detects IPv6 stack. But sometimes you might
479: want to disable IPv6 support of Quagga.
480:
481: `--disable-zebra'
482: Do not build zebra daemon.
483:
484: `--disable-ripd'
485: Do not build ripd.
486:
487: `--disable-ripngd'
488: Do not build ripngd.
489:
490: `--disable-ospfd'
491: Do not build ospfd.
492:
493: `--disable-ospf6d'
494: Do not build ospf6d.
495:
496: `--disable-bgpd'
497: Do not build bgpd.
498:
499: `--disable-bgp-announce'
500: Make `bgpd' which does not make bgp announcements at all. This
501: feature is good for using `bgpd' as a BGP announcement listener.
502:
503: `--enable-netlink'
504: Force to enable GNU/Linux netlink interface. Quagga configure
505: script detects netlink interface by checking a header file. When
506: the header file does not match to the current running kernel,
507: configure script will not turn on netlink support.
508:
509: `--enable-snmp'
510: Enable SNMP support. By default, SNMP support is disabled.
511:
1.1.1.4 ! misho 512: `--disable-opaque-lsa'
! 513: Disable support for Opaque LSAs (RFC2370) in ospfd.
1.1 misho 514:
515: `--disable-ospfapi'
516: Disable support for OSPF-API, an API to interface directly with
517: ospfd. OSPF-API is enabled if -enable-opaque-lsa is set.
518:
519: `--disable-ospfclient'
520: Disable building of the example OSPF-API client.
521:
1.1.1.4 ! misho 522: `--disable-ospf-te'
! 523: Disable support for OSPF Traffic Engineering Extension
1.1 misho 524: (internet-draft) this requires support for Opaque LSAs.
525:
526: `--enable-multipath=ARG'
527: Enable support for Equal Cost Multipath. ARG is the maximum number
528: of ECMP paths to allow, set to 0 to allow unlimited number of
529: paths.
530:
1.1.1.4 ! misho 531: `--disable-rtadv'
! 532: Disable support IPV6 router advertisement in zebra.
! 533:
! 534: `--disable-tests'
! 535: Do not build tests. Test programs are built by default, but not
! 536: ran or installed. They can be excluded from build with this
! 537: option, which will minimally decrease compile time and overhead.
! 538: They can always be built and executed at a later time by running
! 539: `make check' in the `tests/' subdirectory, even if they're
! 540: excluded from build.
1.1 misho 541:
542: You may specify any combination of the above options to the configure
543: script. By default, the executables are placed in `/usr/local/sbin'
544: and the configuration files in `/usr/local/etc'. The `/usr/local/'
545: installation prefix and other directories may be changed using the
546: following options to the configuration script.
547:
548: `--prefix=PREFIX'
549: Install architecture-independent files in PREFIX [/usr/local].
550:
551: `--sysconfdir=DIR'
552: Look for configuration files in DIR [PREFIX/etc]. Note that sample
553: configuration files will be installed here.
554:
555: `--localstatedir=DIR'
556: Configure zebra to use DIR for local state files, such as pid
557: files and unix sockets.
558:
559: % ./configure --disable-ipv6
560:
561: This command will configure zebra and the routing daemons.
562:
563:
564: File: quagga.info, Node: Least-Privilege support, Next: Linux notes, Prev: The Configure script and its options, Up: Configure the Software
565:
566: 2.1.2 Least-Privilege support
567: -----------------------------
568:
569: Additionally, you may configure zebra to drop its elevated privileges
570: shortly after startup and switch to another user. The configure script
571: will automatically try to configure this support. There are three
572: configure options to control the behaviour of Quagga daemons.
573:
574: `--enable-user=USER'
575: Switch to user ARG shortly after startup, and run as user ARG in
576: normal operation.
577:
578: `--enable-group=GROUP'
579: Switch real and effective group to GROUP shortly after startup.
580:
581: `--enable-vty-group=GROUP'
582: Create Unix Vty sockets (for use with vtysh) with group owndership
583: set to GROUP. This allows one to create a seperate group which is
584: restricted to accessing only the Vty sockets, hence allowing one to
585: delegate this group to individual users, or to run vtysh setgid to
586: this group.
587:
588: The default user and group which will be configured is 'quagga' if
589: no user or group is specified. Note that this user or group requires
590: write access to the local state directory (see -localstatedir) and
591: requires at least read access, and write access if you wish to allow
592: daemons to write out their configuration, to the configuration
593: directory (see -sysconfdir).
594:
595: On systems which have the 'libcap' capabilities manipulation library
596: (currently only linux), the quagga system will retain only minimal
597: capabilities required, further it will only raise these capabilities for
598: brief periods. On systems without libcap, quagga will run as the user
599: specified and only raise its uid back to uid 0 for brief periods.
600:
601:
602: File: quagga.info, Node: Linux notes, Prev: Least-Privilege support, Up: Configure the Software
603:
604: 2.1.3 Linux Notes
605: -----------------
606:
607: There are several options available only to GNU/Linux systems: (1). If
608: you use GNU/Linux, make sure that the current kernel configuration is
609: what you want. Quagga will run with any kernel configuration but some
610: recommendations do exist.
611:
612: CONFIG_NETLINK
613: Kernel/User netlink socket. This is a brand new feature which
614: enables an advanced interface between the Linux kernel and zebra
615: (*note Kernel Interface::).
616:
617: CONFIG_RTNETLINK
618: Routing messages. This makes it possible to receive netlink
619: routing messages. If you specify this option, `zebra' can detect
620: routing information updates directly from the kernel (*note Kernel
621: Interface::).
622:
623: CONFIG_IP_MULTICAST
624: IP: multicasting. This option should be specified when you use
625: `ripd' (*note RIP::) or `ospfd' (*note OSPFv2::) because these
626: protocols use multicast.
627:
628:
629: IPv6 support has been added in GNU/Linux kernel version 2.2. If you
630: try to use the Quagga IPv6 feature on a GNU/Linux kernel, please make
631: sure the following libraries have been installed. Please note that
632: these libraries will not be needed when you uses GNU C library 2.1 or
633: upper.
634:
635: `inet6-apps'
636: The `inet6-apps' package includes basic IPv6 related libraries such
637: as `inet_ntop' and `inet_pton'. Some basic IPv6 programs such as
638: `ping', `ftp', and `inetd' are also included. The `inet-apps' can
639: be found at `ftp://ftp.inner.net/pub/ipv6/'.
640:
641: `net-tools'
642: The `net-tools' package provides an IPv6 enabled interface and
643: routing utility. It contains `ifconfig', `route', `netstat', and
644: other tools. `net-tools' may be found at
645: `http://www.tazenda.demon.co.uk/phil/net-tools/'.
646:
647:
648: ---------- Footnotes ----------
649:
650: (1) GNU/Linux has very flexible kernel configuration features
651:
652:
653: File: quagga.info, Node: Build the Software, Next: Install the Software, Prev: Configure the Software, Up: Installation
654:
655: 2.2 Build the Software
656: ======================
657:
658: After configuring the software, you will need to compile it for your
659: system. Simply issue the command `make' in the root of the source
660: directory and the software will be compiled. If you have *any* problems
661: at this stage, be certain to send a bug report *Note Bug Reports::.
662:
663: % ./configure
664: .
665: .
666: .
667: ./configure output
668: .
669: .
670: .
671: % make
672:
673:
674: File: quagga.info, Node: Install the Software, Prev: Build the Software, Up: Installation
675:
676: 2.3 Install the Software
677: ========================
678:
679: Installing the software to your system consists of copying the compiled
680: programs and supporting files to a standard location. After the
681: installation process has completed, these files have been copied from
682: your work directory to `/usr/local/bin', and `/usr/local/etc'.
683:
684: To install the Quagga suite, issue the following command at your
685: shell prompt: `make install'.
686:
687: %
688: % make install
689: %
690:
691: Quagga daemons have their own terminal interface or VTY. After
692: installation, you have to setup each beast's port number to connect to
693: them. Please add the following entries to `/etc/services'.
694:
695: zebrasrv 2600/tcp # zebra service
696: zebra 2601/tcp # zebra vty
697: ripd 2602/tcp # RIPd vty
698: ripngd 2603/tcp # RIPngd vty
699: ospfd 2604/tcp # OSPFd vty
700: bgpd 2605/tcp # BGPd vty
701: ospf6d 2606/tcp # OSPF6d vty
702: ospfapi 2607/tcp # ospfapi
703: isisd 2608/tcp # ISISd vty
704:
705: If you use a FreeBSD newer than 2.2.8, the above entries are already
706: added to `/etc/services' so there is no need to add it. If you specify
707: a port number when starting the daemon, these entries may not be needed.
708:
709: You may need to make changes to the config files in
710: `/etc/quagga/*.conf'. *Note Config Commands::.
711:
712:
713: File: quagga.info, Node: Basic commands, Next: Zebra, Prev: Installation, Up: Top
714:
715: 3 Basic commands
716: ****************
717:
718: There are five routing daemons in use, and there is one manager daemon.
719: These daemons may be located on separate machines from the manager
720: daemon. Each of these daemons will listen on a particular port for
721: incoming VTY connections. The routing daemons are:
722:
723: * `ripd', `ripngd', `ospfd', `ospf6d', `bgpd'
724:
725: * `zebra'
726:
727: The following sections discuss commands common to all the routing
728: daemons.
729:
730: * Menu:
731:
732: * Terminal Mode Commands:: Common commands used in a VTY
733: * Config Commands:: Commands used in config files
734: * Common Invocation Options:: Starting the daemons
735: * Virtual Terminal Interfaces:: Interacting with the daemons
736:
737:
738: File: quagga.info, Node: Config Commands, Next: Common Invocation Options, Prev: Terminal Mode Commands, Up: Basic commands
739:
740: 3.1 Config Commands
741: ===================
742:
743: * Menu:
744:
745: * Basic Config Commands:: Some of the generic config commands
746: * Sample Config File:: An example config file
747:
748: In a config file, you can write the debugging options, a vty's
749: password, routing daemon configurations, a log file name, and so forth.
750: This information forms the initial command set for a routing beast as
751: it is starting.
752:
753: Config files are generally found in:
754:
755: `/etc/quagga/*.conf'
756:
757: Each of the daemons has its own config file. For example, zebra's
758: default config file name is:
759:
760: `/etc/quagga/zebra.conf'
761:
762: The daemon name plus `.conf' is the default config file name. You
763: can specify a config file using the `-f' or `--config-file' options
764: when starting the daemon.
765:
766:
767: File: quagga.info, Node: Basic Config Commands, Next: Sample Config File, Up: Config Commands
768:
769: 3.1.1 Basic Config Commands
770: ---------------------------
771:
772: -- Command: hostname HOSTNAME
773: Set hostname of the router.
774:
775: -- Command: password PASSWORD
776: Set password for vty interface. If there is no password, a vty
777: won't accept connections.
778:
779: -- Command: enable password PASSWORD
780: Set enable password.
781:
782: -- Command: log trap LEVEL
783: -- Command: no log trap
784: These commands are deprecated and are present only for historical
785: compatibility. The log trap command sets the current logging
786: level for all enabled logging destinations, and it sets the
787: default for all future logging commands that do not specify a
788: level. The normal default logging level is debugging. The `no'
789: form of the command resets the default level for future logging
790: commands to debugging, but it does not change the logging level of
791: existing logging destinations.
792:
793: -- Command: log stdout
794: -- Command: log stdout LEVEL
795: -- Command: no log stdout
796: Enable logging output to stdout. If the optional second argument
797: specifying the logging level is not present, the default logging
798: level (typically debugging, but can be changed using the
799: deprecated `log trap' command) will be used. The `no' form of the
800: command disables logging to stdout. The `level' argument must
801: have one of these values: emergencies, alerts, critical, errors,
802: warnings, notifications, informational, or debugging. Note that
803: the existing code logs its most important messages with severity
804: `errors'.
805:
806: -- Command: log file FILENAME
807: -- Command: log file FILENAME LEVEL
808: -- Command: no log file
809: If you want to log into a file, please specify `filename' as in
810: this example:
811: log file /var/log/quagga/bgpd.log informational
812: If the optional second argument specifying the logging level is
813: not present, the default logging level (typically debugging, but
814: can be changed using the deprecated `log trap' command) will be
815: used. The `no' form of the command disables logging to a file.
816:
817: Note: if you do not configure any file logging, and a daemon
818: crashes due to a signal or an assertion failure, it will attempt
819: to save the crash information in a file named
820: /var/tmp/quagga.<daemon name>.crashlog. For security reasons,
821: this will not happen if the file exists already, so it is
822: important to delete the file after reporting the crash information.
823:
824: -- Command: log syslog
825: -- Command: log syslog LEVEL
826: -- Command: no log syslog
827: Enable logging output to syslog. If the optional second argument
828: specifying the logging level is not present, the default logging
829: level (typically debugging, but can be changed using the
830: deprecated `log trap' command) will be used. The `no' form of the
831: command disables logging to syslog.
832:
833: -- Command: log monitor
834: -- Command: log monitor LEVEL
835: -- Command: no log monitor
836: Enable logging output to vty terminals that have enabled logging
837: using the `terminal monitor' command. By default, monitor logging
838: is enabled at the debugging level, but this command (or the
839: deprecated `log trap' command) can be used to change the monitor
840: logging level. If the optional second argument specifying the
841: logging level is not present, the default logging level (typically
842: debugging, but can be changed using the deprecated `log trap'
843: command) will be used. The `no' form of the command disables
844: logging to terminal monitors.
845:
846: -- Command: log facility FACILITY
847: -- Command: no log facility
848: This command changes the facility used in syslog messages. The
849: default facility is `daemon'. The `no' form of the command resets
850: the facility to the default `daemon' facility.
851:
852: -- Command: log record-priority
853: -- Command: no log record-priority
854: To include the severity in all messages logged to a file, to
855: stdout, or to a terminal monitor (i.e. anything except syslog),
856: use the `log record-priority' global configuration command. To
857: disable this option, use the `no' form of the command. By default,
858: the severity level is not included in logged messages. Note: some
859: versions of syslogd (including Solaris) can be configured to
860: include the facility and level in the messages emitted.
861:
862: -- Command: log timestamp precision <0-6>
863: -- Command: no log timestamp precision
864: This command sets the precision of log message timestamps to the
865: given number of digits after the decimal point. Currently, the
866: value must be in the range 0 to 6 (i.e. the maximum precision is
867: microseconds). To restore the default behavior (1-second
868: accuracy), use the `no' form of the command, or set the precision
869: explicitly to 0.
870:
871: log timestamp precision 3
872:
873: In this example, the precision is set to provide timestamps with
874: millisecond accuracy.
875:
876: -- Command: service password-encryption
877: Encrypt password.
878:
879: -- Command: service advanced-vty
880: Enable advanced mode VTY.
881:
882: -- Command: service terminal-length <0-512>
883: Set system wide line configuration. This configuration command
884: applies to all VTY interfaces.
885:
886: -- Command: line vty
887: Enter vty configuration mode.
888:
889: -- Command: banner motd default
890: Set default motd string.
891:
892: -- Command: no banner motd
893: No motd banner string will be printed.
894:
895: -- Line Command: exec-timeout MINUTE
896: -- Line Command: exec-timeout MINUTE SECOND
897: Set VTY connection timeout value. When only one argument is
898: specified it is used for timeout value in minutes. Optional
899: second argument is used for timeout value in seconds. Default
900: timeout value is 10 minutes. When timeout value is zero, it means
901: no timeout.
902:
903: -- Line Command: no exec-timeout
904: Do not perform timeout at all. This command is as same as
905: `exec-timeout 0 0'.
906:
907: -- Line Command: access-class ACCESS-LIST
908: Restrict vty connections with an access list.
909:
910:
911: File: quagga.info, Node: Sample Config File, Prev: Basic Config Commands, Up: Config Commands
912:
913: 3.1.2 Sample Config File
914: ------------------------
915:
916: Below is a sample configuration file for the zebra daemon.
917:
918: !
919: ! Zebra configuration file
920: !
921: hostname Router
922: password zebra
923: enable password zebra
924: !
925: log stdout
926: !
927: !
928:
929: '!' and '#' are comment characters. If the first character of the
930: word is one of the comment characters then from the rest of the line
931: forward will be ignored as a comment.
932:
933: password zebra!password
934:
935: If a comment character is not the first character of the word, it's a
936: normal character. So in the above example '!' will not be regarded as a
937: comment and the password is set to 'zebra!password'.
938:
939:
940: File: quagga.info, Node: Terminal Mode Commands, Next: Config Commands, Up: Basic commands
941:
942: 3.2 Terminal Mode Commands
943: ==========================
944:
945: -- Command: write terminal
946: Displays the current configuration to the vty interface.
947:
948: -- Command: write file
949: Write current configuration to configuration file.
950:
951: -- Command: configure terminal
952: Change to configuration mode. This command is the first step to
953: configuration.
954:
955: -- Command: terminal length <0-512>
956: Set terminal display length to <0-512>. If length is 0, no
957: display control is performed.
958:
959: -- Command: who
960: Show a list of currently connected vty sessions.
961:
962: -- Command: list
963: List all available commands.
964:
965: -- Command: show version
966: Show the current version of Quagga and its build host information.
967:
968: -- Command: show logging
969: Shows the current configuration of the logging system. This
970: includes the status of all logging destinations.
971:
972: -- Command: logmsg LEVEL MESSAGE
973: Send a message to all logging destinations that are enabled for
974: messages of the given severity.
975:
976:
977: File: quagga.info, Node: Common Invocation Options, Next: Virtual Terminal Interfaces, Prev: Config Commands, Up: Basic commands
978:
979: 3.3 Common Invocation Options
980: =============================
981:
982: These options apply to all Quagga daemons.
983:
984: `-d'
985: `--daemon'
986: Runs in daemon mode.
987:
988: `-f FILE'
989: `--config_file=FILE'
990: Set configuration file name.
991:
992: `-h'
993: `--help'
994: Display this help and exit.
995:
996: `-i FILE'
997: `--pid_file=FILE'
998: Upon startup the process identifier of the daemon is written to a
999: file, typically in `/var/run'. This file can be used by the init
1000: system to implement commands such as `.../init.d/zebra status',
1001: `.../init.d/zebra restart' or `.../init.d/zebra stop'.
1002:
1003: The file name is an run-time option rather than a configure-time
1004: option so that multiple routing daemons can be run simultaneously.
1005: This is useful when using Quagga to implement a routing looking
1006: glass. One machine can be used to collect differing routing views
1007: from differing points in the network.
1008:
1009: `-A ADDRESS'
1010: `--vty_addr=ADDRESS'
1011: Set the VTY local address to bind to. If set, the VTY socket will
1012: only be bound to this address.
1013:
1014: `-P PORT'
1015: `--vty_port=PORT'
1016: Set the VTY TCP port number. If set to 0 then the TCP VTY sockets
1017: will not be opened.
1018:
1019: `-u USER'
1020: `--vty_addr=USER'
1021: Set the user and group to run as.
1022:
1023: `-v'
1024: `--version'
1025: Print program version.
1026:
1027:
1028:
1029: File: quagga.info, Node: Virtual Terminal Interfaces, Prev: Common Invocation Options, Up: Basic commands
1030:
1031: 3.4 Virtual Terminal Interfaces
1032: ===============================
1033:
1034: VTY - Virtual Terminal [aka TeletYpe] Interface is a command line
1035: interface (CLI) for user interaction with the routing daemon.
1036:
1037: * Menu:
1038:
1039: * VTY Overview:: Basics about VTYs
1040: * VTY Modes:: View, Enable, and Other VTY modes
1041: * VTY CLI Commands:: Commands for movement, edition, and management
1042:
1043:
1044: File: quagga.info, Node: VTY Overview, Next: VTY Modes, Up: Virtual Terminal Interfaces
1045:
1046: 3.4.1 VTY Overview
1047: ------------------
1048:
1049: VTY stands for Virtual TeletYpe interface. It means you can connect to
1050: the daemon via the telnet protocol.
1051:
1052: To enable a VTY interface, you have to setup a VTY password. If
1053: there is no VTY password, one cannot connect to the VTY interface at
1054: all.
1055:
1056: % telnet localhost 2601
1057: Trying 127.0.0.1...
1058: Connected to localhost.
1059: Escape character is '^]'.
1060:
1.1.1.4 ! misho 1061: Hello, this is Quagga (version 0.99.22)
1.1 misho 1062: Copyright (C) 1999-2005 Kunihiro Ishiguro, et al.
1063:
1064: User Access Verification
1065:
1066: Password: XXXXX
1067: Router> ?
1068: enable Turn on privileged commands
1069: exit Exit current mode and down to previous mode
1070: help Description of the interactive help system
1071: list Print command list
1072: show Show running system information
1073: who Display who is on a vty
1074: Router> enable
1075: Password: XXXXX
1076: Router# configure terminal
1077: Router(config)# interface eth0
1078: Router(config-if)# ip address 10.0.0.1/8
1079: Router(config-if)# ^Z
1080: Router#
1081:
1082: '?' is very useful for looking up commands.
1083:
1084:
1085: File: quagga.info, Node: VTY Modes, Next: VTY CLI Commands, Prev: VTY Overview, Up: Virtual Terminal Interfaces
1086:
1087: 3.4.2 VTY Modes
1088: ---------------
1089:
1090: There are three basic VTY modes:
1091:
1092: * Menu:
1093:
1094: * VTY View Mode:: Mode for read-only interaction
1095: * VTY Enable Mode:: Mode for read-write interaction
1096: * VTY Other Modes:: Special modes (tftp, etc)
1097:
1098: There are commands that may be restricted to specific VTY modes.
1099:
1100:
1101: File: quagga.info, Node: VTY View Mode, Next: VTY Enable Mode, Up: VTY Modes
1102:
1103: 3.4.2.1 VTY View Mode
1104: .....................
1105:
1106: This mode is for read-only access to the CLI. One may exit the mode by
1107: leaving the system, or by entering `enable' mode.
1108:
1109:
1110: File: quagga.info, Node: VTY Enable Mode, Next: VTY Other Modes, Prev: VTY View Mode, Up: VTY Modes
1111:
1112: 3.4.2.2 VTY Enable Mode
1113: .......................
1114:
1115: This mode is for read-write access to the CLI. One may exit the mode by
1116: leaving the system, or by escaping to view mode.
1117:
1118:
1119: File: quagga.info, Node: VTY Other Modes, Prev: VTY Enable Mode, Up: VTY Modes
1120:
1121: 3.4.2.3 VTY Other Modes
1122: .......................
1123:
1124: This page is for describing other modes.
1125:
1126:
1127: File: quagga.info, Node: VTY CLI Commands, Prev: VTY Modes, Up: Virtual Terminal Interfaces
1128:
1129: 3.4.3 VTY CLI Commands
1130: ----------------------
1131:
1132: Commands that you may use at the command-line are described in the
1133: following three subsubsections.
1134:
1135: * Menu:
1136:
1137: * CLI Movement Commands:: Commands for moving the cursor about
1138: * CLI Editing Commands:: Commands for changing text
1139: * CLI Advanced Commands:: Other commands, session management and so on
1140:
1141:
1142: File: quagga.info, Node: CLI Movement Commands, Next: CLI Editing Commands, Up: VTY CLI Commands
1143:
1144: 3.4.3.1 CLI Movement Commands
1145: .............................
1146:
1147: These commands are used for moving the CLI cursor. The <C> character
1148: means press the Control Key.
1149:
1150: `C-f'
1151: `<RIGHT>'
1152: Move forward one character.
1153:
1154: `C-b'
1155: `<LEFT>'
1156: Move backward one character.
1157:
1158: `M-f'
1159: Move forward one word.
1160:
1161: `M-b'
1162: Move backward one word.
1163:
1164: `C-a'
1165: Move to the beginning of the line.
1166:
1167: `C-e'
1168: Move to the end of the line.
1169:
1170:
1171:
1172: File: quagga.info, Node: CLI Editing Commands, Next: CLI Advanced Commands, Prev: CLI Movement Commands, Up: VTY CLI Commands
1173:
1174: 3.4.3.2 CLI Editing Commands
1175: ............................
1176:
1177: These commands are used for editing text on a line. The <C> character
1178: means press the Control Key.
1179:
1180: `C-h'
1181: `<DEL>'
1182: Delete the character before point.
1183:
1184: `C-d'
1185: Delete the character after point.
1186:
1187: `M-d'
1188: Forward kill word.
1189:
1190: `C-w'
1191: Backward kill word.
1192:
1193: `C-k'
1194: Kill to the end of the line.
1195:
1196: `C-u'
1197: Kill line from the beginning, erasing input.
1198:
1199: `C-t'
1200: Transpose character.
1201:
1202:
1203:
1204: File: quagga.info, Node: CLI Advanced Commands, Prev: CLI Editing Commands, Up: VTY CLI Commands
1205:
1206: 3.4.3.3 CLI Advanced Commands
1207: .............................
1208:
1209: There are several additional CLI commands for command line completions,
1210: insta-help, and VTY session management.
1211:
1212: `C-c'
1213: Interrupt current input and moves to the next line.
1214:
1215: `C-z'
1216: End current configuration session and move to top node.
1217:
1218: `C-n'
1219: `<DOWN>'
1220: Move down to next line in the history buffer.
1221:
1222: `C-p'
1223: `<UP>'
1224: Move up to previous line in the history buffer.
1225:
1226: `TAB'
1227: Use command line completion by typing <TAB>.
1228:
1229: `'
1230: You can use command line help by typing `help' at the beginning of
1231: the line. Typing `?' at any point in the line will show possible
1232: completions.
1233:
1234:
1235:
1236: File: quagga.info, Node: Zebra, Next: RIP, Prev: Basic commands, Up: Top
1237:
1238: 4 Zebra
1239: *******
1240:
1241: `zebra' is an IP routing manager. It provides kernel routing table
1242: updates, interface lookups, and redistribution of routes between
1243: different routing protocols.
1244:
1245: * Menu:
1246:
1247: * Invoking zebra:: Running the program
1248: * Interface Commands:: Commands for zebra interfaces
1249: * Static Route Commands:: Commands for adding static routes
1250: * zebra Route Filtering:: Commands for zebra route filtering
1.1.1.4 ! misho 1251: * zebra FIB push interface:: Interface to optional FPM component
1.1 misho 1252: * zebra Terminal Mode Commands:: Commands for zebra's VTY
1253:
1254:
1255: File: quagga.info, Node: Invoking zebra, Next: Interface Commands, Up: Zebra
1256:
1257: 4.1 Invoking zebra
1258: ==================
1259:
1260: Besides the common invocation options (*note Common Invocation
1261: Options::), the `zebra' specific invocation options are listed below.
1262:
1263: `-b'
1264: `--batch'
1265: Runs in batch mode. `zebra' parses configuration file and
1266: terminates immediately.
1267:
1268: `-k'
1269: `--keep_kernel'
1270: When zebra starts up, don't delete old self inserted routes.
1271:
1272: `-r'
1273: `--retain'
1274: When program terminates, retain routes added by zebra.
1275:
1276:
1277:
1278: File: quagga.info, Node: Interface Commands, Next: Static Route Commands, Prev: Invoking zebra, Up: Zebra
1279:
1280: 4.2 Interface Commands
1281: ======================
1282:
1283: -- Command: interface IFNAME
1284:
1285: -- Interface Command: shutdown
1286: -- Interface Command: no shutdown
1287: Up or down the current interface.
1288:
1289: -- Interface Command: ip address ADDRESS/PREFIX
1290: -- Interface Command: ipv6 address ADDRESS/PREFIX
1291: -- Interface Command: no ip address ADDRESS/PREFIX
1292: -- Interface Command: no ipv6 address ADDRESS/PREFIX
1293: Set the IPv4 or IPv6 address/prefix for the interface.
1294:
1295: -- Interface Command: ip address ADDRESS/PREFIX secondary
1296: -- Interface Command: no ip address ADDRESS/PREFIX secondary
1297: Set the secondary flag for this address. This causes ospfd to not
1298: treat the address as a distinct subnet.
1299:
1300: -- Interface Command: description DESCRIPTION ...
1301: Set description for the interface.
1302:
1303: -- Interface Command: multicast
1304: -- Interface Command: no multicast
1305: Enable or disables multicast flag for the interface.
1306:
1307: -- Interface Command: bandwidth <1-10000000>
1308: -- Interface Command: no bandwidth <1-10000000>
1309: Set bandwidth value of the interface in kilobits/sec. This is for
1310: calculating OSPF cost. This command does not affect the actual
1311: device configuration.
1312:
1313: -- Interface Command: link-detect
1314: -- Interface Command: no link-detect
1315: Enable/disable link-detect on platforms which support this.
1316: Currently only Linux and Solaris, and only where network interface
1317: drivers support reporting link-state via the IFF_RUNNING flag.
1318:
1319:
1320: File: quagga.info, Node: Static Route Commands, Next: zebra Route Filtering, Prev: Interface Commands, Up: Zebra
1321:
1322: 4.3 Static Route Commands
1323: =========================
1324:
1325: Static routing is a very fundamental feature of routing technology. It
1326: defines static prefix and gateway.
1327:
1328: -- Command: ip route NETWORK GATEWAY
1329: NETWORK is destination prefix with format of A.B.C.D/M. GATEWAY
1330: is gateway for the prefix. When GATEWAY is A.B.C.D format. It is
1331: taken as a IPv4 address gateway. Otherwise it is treated as an
1332: interface name. If the interface name is NULL0 then zebra installs
1333: a blackhole route.
1334:
1335: ip route 10.0.0.0/8 10.0.0.2
1336: ip route 10.0.0.0/8 ppp0
1337: ip route 10.0.0.0/8 null0
1338:
1339: First example defines 10.0.0.0/8 static route with gateway
1340: 10.0.0.2. Second one defines the same prefix but with gateway to
1341: interface ppp0. The third install a blackhole route.
1342:
1343: -- Command: ip route NETWORK NETMASK GATEWAY
1344: This is alternate version of above command. When NETWORK is
1345: A.B.C.D format, user must define NETMASK value with A.B.C.D
1346: format. GATEWAY is same option as above command
1347:
1348: ip route 10.0.0.0 255.255.255.0 10.0.0.2
1349: ip route 10.0.0.0 255.255.255.0 ppp0
1350: ip route 10.0.0.0 255.255.255.0 null0
1351:
1352: These statements are equivalent to those in the previous example.
1353:
1354: -- Command: ip route NETWORK GATEWAY DISTANCE
1355: Installs the route with the specified distance.
1356:
1357: Multiple nexthop static route
1358:
1359: ip route 10.0.0.1/32 10.0.0.2
1360: ip route 10.0.0.1/32 10.0.0.3
1361: ip route 10.0.0.1/32 eth0
1362:
1363: If there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0 is
1364: reachable, then the last route is installed into the kernel.
1365:
1366: If zebra has been compiled with multipath support, and both 10.0.0.2
1367: and 10.0.0.3 are reachable, zebra will install a multipath route via
1368: both nexthops, if the platform supports this.
1369:
1370: zebra> show ip route
1371: S> 10.0.0.1/32 [1/0] via 10.0.0.2 inactive
1372: via 10.0.0.3 inactive
1373: * is directly connected, eth0
1374:
1375: ip route 10.0.0.0/8 10.0.0.2
1376: ip route 10.0.0.0/8 10.0.0.3
1377: ip route 10.0.0.0/8 null0 255
1378:
1379: This will install a multihop route via the specified next-hops if
1380: they are reachable, as well as a high-metric blackhole route, which can
1381: be useful to prevent traffic destined for a prefix to match
1382: less-specific routes (eg default) should the specified gateways not be
1383: reachable. Eg:
1384:
1385: zebra> show ip route 10.0.0.0/8
1386: Routing entry for 10.0.0.0/8
1387: Known via "static", distance 1, metric 0
1388: 10.0.0.2 inactive
1389: 10.0.0.3 inactive
1390:
1391: Routing entry for 10.0.0.0/8
1392: Known via "static", distance 255, metric 0
1393: directly connected, Null0
1394:
1395: -- Command: ipv6 route NETWORK GATEWAY
1396: -- Command: ipv6 route NETWORK GATEWAY DISTANCE
1397: These behave similarly to their ipv4 counterparts.
1398:
1399: -- Command: table TABLENO
1400: Select the primary kernel routing table to be used. This only
1401: works for kernels supporting multiple routing tables (like
1402: GNU/Linux 2.2.x and later). After setting TABLENO with this
1403: command, static routes defined after this are added to the
1404: specified table.
1405:
1406:
1.1.1.4 ! misho 1407: File: quagga.info, Node: zebra Route Filtering, Next: zebra FIB push interface, Prev: Static Route Commands, Up: Zebra
1.1 misho 1408:
1409: 4.4 zebra Route Filtering
1410: =========================
1411:
1412: Zebra supports `prefix-list' and `route-map' to match routes received
1413: from other quagga components. The `permit'/`deny' facilities provided
1414: by these commands can be used to filter which routes zebra will install
1415: in the kernel.
1416:
1417: -- Command: ip protocol PROTOCOL route-map ROUTEMAP
1418: Apply a route-map filter to routes for the specified protocol.
1419: PROTOCOL can be any or one of system, kernel, connected, static,
1420: rip, ripng, ospf, ospf6, isis, bgp, hsls.
1421:
1422: -- Route Map: set src ADDRESS
1423: Within a route-map, set the preferred source address for matching
1424: routes when installing in the kernel.
1425:
1426: The following creates a prefix-list that matches all addresses, a route-map
1427: that sets the preferred source address, and applies the route-map to all
1428: `rip' routes.
1429:
1430: ip prefix-list ANY permit 0.0.0.0/0 le 32
1431: route-map RM1 permit 10
1432: match ip address prefix-list ANY
1433: set src 10.0.0.1
1434:
1435: ip protocol rip route-map RM1
1436:
1437:
1.1.1.4 ! misho 1438: File: quagga.info, Node: zebra FIB push interface, Next: zebra Terminal Mode Commands, Prev: zebra Route Filtering, Up: Zebra
! 1439:
! 1440: 4.5 zebra FIB push interface
! 1441: ============================
! 1442:
! 1443: Zebra supports a 'FIB push' interface that allows an external component
! 1444: to learn the forwarding information computed by the Quagga routing
! 1445: suite.
! 1446:
! 1447: In Quagga, the Routing Information Base (RIB) resides inside zebra.
! 1448: Routing protocols communicate their best routes to zebra, and zebra
! 1449: computes the best route across protocols for each prefix. This latter
! 1450: information makes up the Forwarding Information Base (FIB). Zebra feeds
! 1451: the FIB to the kernel, which allows the IP stack in the kernel to
! 1452: forward packets according to the routes computed by Quagga. The kernel
! 1453: FIB is updated in an OS-specific way. For example, the `netlink'
! 1454: interface is used on Linux, and route sockets are used on FreeBSD.
! 1455:
! 1456: The FIB push interface aims to provide a cross-platform mechanism to
! 1457: support scenarios where the router has a forwarding path that is
! 1458: distinct from the kernel, commonly a hardware-based fast path. In these
! 1459: cases, the FIB needs to be maintained reliably in the fast path as
! 1460: well. We refer to the component that programs the forwarding plane
! 1461: (directly or indirectly) as the Forwarding Plane Manager or FPM.
! 1462:
! 1463: The FIB push interface comprises of a TCP connection between zebra
! 1464: and the FPM. The connection is initiated by zebra - that is, the FPM
! 1465: acts as the TCP server.
! 1466:
! 1467: The relevant zebra code kicks in when zebra is configured with the
! 1468: `--enable-fpm' flag. Zebra periodically attempts to connect to the
! 1469: well-known FPM port. Once the connection is up, zebra starts sending
! 1470: messages containing routes over the socket to the FPM. Zebra sends a
! 1471: complete copy of the forwarding table to the FPM, including routes that
! 1472: it may have picked up from the kernel. The existing interaction of
! 1473: zebra with the kernel remains unchanged - that is, the kernel continues
! 1474: to receive FIB updates as before.
! 1475:
! 1476: The format of the messages exchanged with the FPM is defined by the
! 1477: file `fpm/fpm.h' in the quagga tree.
! 1478:
! 1479: The zebra FPM interface uses replace semantics. That is, if a 'route
! 1480: add' message for a prefix is followed by another 'route add' message,
! 1481: the information in the second message is complete by itself, and
! 1482: replaces the information sent in the first message.
! 1483:
! 1484: If the connection to the FPM goes down for some reason, zebra sends
! 1485: the FPM a complete copy of the forwarding table(s) when it reconnects.
! 1486:
! 1487:
! 1488: File: quagga.info, Node: zebra Terminal Mode Commands, Prev: zebra FIB push interface, Up: Zebra
1.1 misho 1489:
1.1.1.4 ! misho 1490: 4.6 zebra Terminal Mode Commands
1.1 misho 1491: ================================
1492:
1493: -- Command: show ip route
1494: Display current routes which zebra holds in its database.
1495:
1496: Router# show ip route
1497: Codes: K - kernel route, C - connected, S - static, R - RIP,
1498: B - BGP * - FIB route.
1499:
1500: K* 0.0.0.0/0 203.181.89.241
1501: S 0.0.0.0/0 203.181.89.1
1502: C* 127.0.0.0/8 lo
1503: C* 203.181.89.240/28 eth0
1504:
1505: -- Command: show ipv6 route
1506:
1507: -- Command: show interface
1508:
1509: -- Command: show ip prefix-list [NAME]
1510:
1511: -- Command: show route-map [NAME]
1512:
1513: -- Command: show ip protocol
1514:
1515: -- Command: show ipforward
1516: Display whether the host's IP forwarding function is enabled or
1517: not. Almost any UNIX kernel can be configured with IP forwarding
1518: disabled. If so, the box can't work as a router.
1519:
1520: -- Command: show ipv6forward
1521: Display whether the host's IP v6 forwarding is enabled or not.
1522:
1.1.1.4 ! misho 1523: -- Command: show zebra fpm stats
! 1524: Display statistics related to the zebra code that interacts with
! 1525: the optional Forwarding Plane Manager (FPM) component.
! 1526:
! 1527: -- Command: clear zebra fpm stats
! 1528: Reset statistics related to the zebra code that interacts with the
! 1529: optional Forwarding Plane Manager (FPM) component.
! 1530:
1.1 misho 1531:
1532: File: quagga.info, Node: RIP, Next: RIPng, Prev: Zebra, Up: Top
1533:
1534: 5 RIP
1535: *****
1536:
1537: RIP - Routing Information Protocol is widely deployed interior gateway
1538: protocol. RIP was developed in the 1970s at Xerox Labs as part of the
1539: XNS routing protocol. RIP is a "distance-vector" protocol and is based
1540: on the "Bellman-Ford" algorithms. As a distance-vector protocol, RIP
1541: router send updates to its neighbors periodically, thus allowing the
1542: convergence to a known topology. In each update, the distance to any
1543: given network will be broadcasted to its neighboring router.
1544:
1545: `ripd' supports RIP version 2 as described in RFC2453 and RIP
1546: version 1 as described in RFC1058.
1547:
1548: * Menu:
1549:
1550: * Starting and Stopping ripd::
1551: * RIP Configuration::
1552: * RIP Version Control::
1553: * How to Announce RIP route::
1554: * Filtering RIP Routes::
1555: * RIP Metric Manipulation::
1556: * RIP distance::
1557: * RIP route-map::
1558: * RIP Authentication::
1559: * RIP Timers::
1560: * Show RIP Information::
1561: * RIP Debug Commands::
1562:
1563:
1564: File: quagga.info, Node: Starting and Stopping ripd, Next: RIP Configuration, Up: RIP
1565:
1566: 5.1 Starting and Stopping ripd
1567: ==============================
1568:
1569: The default configuration file name of `ripd''s is `ripd.conf'. When
1570: invocation `ripd' searches directory /etc/quagga. If `ripd.conf' is
1571: not there next search current directory.
1572:
1573: RIP uses UDP port 520 to send and receive RIP packets. So the user
1574: must have the capability to bind the port, generally this means that
1575: the user must have superuser privileges. RIP protocol requires
1576: interface information maintained by `zebra' daemon. So running `zebra'
1577: is mandatory to run `ripd'. Thus minimum sequence for running RIP is
1578: like below:
1579:
1580: # zebra -d
1581: # ripd -d
1582:
1583: Please note that `zebra' must be invoked before `ripd'.
1584:
1585: To stop `ripd'. Please use `kill `cat /var/run/ripd.pid`'. Certain
1586: signals have special meaningss to `ripd'.
1587:
1588: `SIGHUP'
1589: Reload configuration file `ripd.conf'. All configurations are
1590: reseted. All routes learned so far are cleared and removed from
1591: routing table.
1592:
1593: `SIGUSR1'
1594: Rotate `ripd' logfile.
1595:
1596: `SIGINT'
1597: `SIGTERM'
1598: `ripd' sweeps all installed RIP routes then terminates properly.
1599:
1600: `ripd' invocation options. Common options that can be specified
1601: (*note Common Invocation Options::).
1602:
1603: `-r'
1604: `--retain'
1605: When the program terminates, retain routes added by `ripd'.
1606:
1607: * Menu:
1608:
1609: * RIP netmask::
1610:
1611:
1612: File: quagga.info, Node: RIP netmask, Up: Starting and Stopping ripd
1613:
1614: 5.1.1 RIP netmask
1615: -----------------
1616:
1617: The netmask features of `ripd' support both version 1 and version 2 of
1618: RIP. Version 1 of RIP originally contained no netmask information. In
1619: RIP version 1, network classes were originally used to determine the
1620: size of the netmask. Class A networks use 8 bits of mask, Class B
1621: networks use 16 bits of masks, while Class C networks use 24 bits of
1622: mask. Today, the most widely used method of a network mask is assigned
1623: to the packet on the basis of the interface that received the packet.
1624: Version 2 of RIP supports a variable length subnet mask (VLSM). By
1625: extending the subnet mask, the mask can be divided and reused. Each
1626: subnet can be used for different purposes such as large to middle size
1627: LANs and WAN links. Quagga `ripd' does not support the non-sequential
1628: netmasks that are included in RIP Version 2.
1629:
1630: In a case of similar information with the same prefix and metric, the
1631: old information will be suppressed. Ripd does not currently support
1632: equal cost multipath routing.
1633:
1634:
1635: File: quagga.info, Node: RIP Configuration, Next: RIP Version Control, Prev: Starting and Stopping ripd, Up: RIP
1636:
1637: 5.2 RIP Configuration
1638: =====================
1639:
1640: -- Command: router rip
1641: The `router rip' command is necessary to enable RIP. To disable
1642: RIP, use the `no router rip' command. RIP must be enabled before
1643: carrying out any of the RIP commands.
1644:
1645: -- Command: no router rip
1646: Disable RIP.
1647:
1648: -- RIP Command: network NETWORK
1649: -- RIP Command: no network NETWORK
1650: Set the RIP enable interface by NETWORK. The interfaces which
1651: have addresses matching with NETWORK are enabled.
1652:
1653: This group of commands either enables or disables RIP interfaces
1654: between certain numbers of a specified network address. For
1655: example, if the network for 10.0.0.0/24 is RIP enabled, this would
1656: result in all the addresses from 10.0.0.0 to 10.0.0.255 being
1657: enabled for RIP. The `no network' command will disable RIP for
1658: the specified network.
1659:
1660: -- RIP Command: network IFNAME
1661: -- RIP Command: no network IFNAME
1662: Set a RIP enabled interface by IFNAME. Both the sending and
1663: receiving of RIP packets will be enabled on the port specified in
1664: the `network ifname' command. The `no network ifname' command
1665: will disable RIP on the specified interface.
1666:
1667: -- RIP Command: neighbor A.B.C.D
1668: -- RIP Command: no neighbor A.B.C.D
1669: Specify RIP neighbor. When a neighbor doesn't understand
1670: multicast, this command is used to specify neighbors. In some
1671: cases, not all routers will be able to understand multicasting,
1672: where packets are sent to a network or a group of addresses. In a
1673: situation where a neighbor cannot process multicast packets, it is
1674: necessary to establish a direct link between routers. The
1675: neighbor command allows the network administrator to specify a
1676: router as a RIP neighbor. The `no neighbor a.b.c.d' command will
1677: disable the RIP neighbor.
1678:
1679: Below is very simple RIP configuration. Interface `eth0' and
1680: interface which address match to `10.0.0.0/8' are RIP enabled.
1681:
1682: !
1683: router rip
1684: network 10.0.0.0/8
1685: network eth0
1686: !
1687:
1688: Passive interface
1689:
1690: -- RIP command: passive-interface (IFNAME|default)
1691: -- RIP command: no passive-interface IFNAME
1692: This command sets the specified interface to passive mode. On
1693: passive mode interface, all receiving packets are processed as
1694: normal and ripd does not send either multicast or unicast RIP
1695: packets except to RIP neighbors specified with `neighbor' command.
1696: The interface may be specified as DEFAULT to make ripd default to
1697: passive on all interfaces.
1698:
1699: The default is to be passive on all interfaces.
1700:
1701: RIP split-horizon
1702:
1703: -- Interface command: ip split-horizon
1704: -- Interface command: no ip split-horizon
1705: Control split-horizon on the interface. Default is `ip
1706: split-horizon'. If you don't perform split-horizon on the
1707: interface, please specify `no ip split-horizon'.
1708:
1709:
1710: File: quagga.info, Node: RIP Version Control, Next: How to Announce RIP route, Prev: RIP Configuration, Up: RIP
1711:
1712: 5.3 RIP Version Control
1713: =======================
1714:
1715: RIP can be configured to send either Version 1 or Version 2 packets.
1716: The default is to send RIPv2 while accepting both RIPv1 and RIPv2 (and
1717: replying with packets of the appropriate version for REQUESTS /
1718: triggered updates). The version to receive and send can be specified
1719: globally, and further overriden on a per-interface basis if needs be
1720: for send and receive seperately (see below).
1721:
1722: It is important to note that RIPv1 can not be authenticated. Further,
1723: if RIPv1 is enabled then RIP will reply to REQUEST packets, sending the
1724: state of its RIP routing table to any remote routers that ask on
1725: demand. For a more detailed discussion on the security implications of
1726: RIPv1 see *note RIP Authentication::.
1727:
1728: -- RIP Command: version VERSION
1729: Set RIP version to accept for reads and send. VERSION can be
1730: either `1" or `2".
1731:
1732: Disabling RIPv1 by specifying version 2 is STRONGLY encouraged,
1733: *Note RIP Authentication::. This may become the default in a future
1734: release.
1735:
1736: Default: Send Version 2, and accept either version.
1737:
1738: -- RIP Command: no version
1739: Reset the global version setting back to the default.
1740:
1741: -- Interface command: ip rip send version VERSION
1742: VERSION can be `1', `2' or `1 2'.
1743:
1744: This interface command overrides the global rip version setting,
1745: and selects which version of RIP to send packets with, for this
1746: interface specifically. Choice of RIP Version 1, RIP Version 2, or
1747: both versions. In the latter case, where `1 2' is specified,
1748: packets will be both broadcast and multicast.
1749:
1750: Default: Send packets according to the global version (version 2)
1751:
1752: -- Interface command: ip rip receive version VERSION
1753: VERSION can be `1', `2' or `1 2'.
1754:
1755: This interface command overrides the global rip version setting,
1756: and selects which versions of RIP packets will be accepted on this
1757: interface. Choice of RIP Version 1, RIP Version 2, or both.
1758:
1759: Default: Accept packets according to the global setting (both 1
1760: and 2).
1761:
1762:
1763: File: quagga.info, Node: How to Announce RIP route, Next: Filtering RIP Routes, Prev: RIP Version Control, Up: RIP
1764:
1765: 5.4 How to Announce RIP route
1766: =============================
1767:
1768: -- RIP command: redistribute kernel
1769: -- RIP command: redistribute kernel metric <0-16>
1770: -- RIP command: redistribute kernel route-map ROUTE-MAP
1771: -- RIP command: no redistribute kernel
1772: `redistribute kernel' redistributes routing information from
1773: kernel route entries into the RIP tables. `no redistribute kernel'
1774: disables the routes.
1775:
1776: -- RIP command: redistribute static
1777: -- RIP command: redistribute static metric <0-16>
1778: -- RIP command: redistribute static route-map ROUTE-MAP
1779: -- RIP command: no redistribute static
1780: `redistribute static' redistributes routing information from
1781: static route entries into the RIP tables. `no redistribute static'
1782: disables the routes.
1783:
1784: -- RIP command: redistribute connected
1785: -- RIP command: redistribute connected metric <0-16>
1786: -- RIP command: redistribute connected route-map ROUTE-MAP
1787: -- RIP command: no redistribute connected
1788: Redistribute connected routes into the RIP tables. `no
1789: redistribute connected' disables the connected routes in the RIP
1790: tables. This command redistribute connected of the interface
1791: which RIP disabled. The connected route on RIP enabled interface
1792: is announced by default.
1793:
1794: -- RIP command: redistribute ospf
1795: -- RIP command: redistribute ospf metric <0-16>
1796: -- RIP command: redistribute ospf route-map ROUTE-MAP
1797: -- RIP command: no redistribute ospf
1798: `redistribute ospf' redistributes routing information from ospf
1799: route entries into the RIP tables. `no redistribute ospf' disables
1800: the routes.
1801:
1802: -- RIP command: redistribute bgp
1803: -- RIP command: redistribute bgp metric <0-16>
1804: -- RIP command: redistribute bgp route-map ROUTE-MAP
1805: -- RIP command: no redistribute bgp
1806: `redistribute bgp' redistributes routing information from bgp
1807: route entries into the RIP tables. `no redistribute bgp' disables
1808: the routes.
1809:
1810: If you want to specify RIP only static routes:
1811:
1812: -- RIP command: default-information originate
1813:
1814: -- RIP command: route A.B.C.D/M
1815: -- RIP command: no route A.B.C.D/M
1816: This command is specific to Quagga. The `route' command makes a
1817: static route only inside RIP. This command should be used only by
1818: advanced users who are particularly knowledgeable about the RIP
1819: protocol. In most cases, we recommend creating a static route in
1820: Quagga and redistributing it in RIP using `redistribute static'.
1821:
1822:
1823: File: quagga.info, Node: Filtering RIP Routes, Next: RIP Metric Manipulation, Prev: How to Announce RIP route, Up: RIP
1824:
1825: 5.5 Filtering RIP Routes
1826: ========================
1827:
1828: RIP routes can be filtered by a distribute-list.
1829:
1830: -- Command: distribute-list ACCESS_LIST DIRECT IFNAME
1831: You can apply access lists to the interface with a
1832: `distribute-list' command. ACCESS_LIST is the access list name.
1833: DIRECT is `in' or `out'. If DIRECT is `in' the access list is
1834: applied to input packets.
1835:
1836: The `distribute-list' command can be used to filter the RIP path.
1837: `distribute-list' can apply access-lists to a chosen interface.
1838: First, one should specify the access-list. Next, the name of the
1839: access-list is used in the distribute-list command. For example,
1840: in the following configuration `eth0' will permit only the paths
1841: that match the route 10.0.0.0/8
1842:
1843: !
1844: router rip
1845: distribute-list private in eth0
1846: !
1847: access-list private permit 10 10.0.0.0/8
1848: access-list private deny any
1849: !
1850:
1851: `distribute-list' can be applied to both incoming and outgoing data.
1852:
1853: -- Command: distribute-list prefix PREFIX_LIST (in|out) IFNAME
1854: You can apply prefix lists to the interface with a
1855: `distribute-list' command. PREFIX_LIST is the prefix list name.
1856: Next is the direction of `in' or `out'. If DIRECT is `in' the
1857: access list is applied to input packets.
1858:
1859:
1860: File: quagga.info, Node: RIP Metric Manipulation, Next: RIP distance, Prev: Filtering RIP Routes, Up: RIP
1861:
1862: 5.6 RIP Metric Manipulation
1863: ===========================
1864:
1865: RIP metric is a value for distance for the network. Usually `ripd'
1866: increment the metric when the network information is received.
1867: Redistributed routes' metric is set to 1.
1868:
1869: -- RIP command: default-metric <1-16>
1870: -- RIP command: no default-metric <1-16>
1871: This command modifies the default metric value for redistributed
1872: routes. The default value is 1. This command does not affect
1873: connected route even if it is redistributed by `redistribute
1874: connected'. To modify connected route's metric value, please use
1875: `redistribute connected metric' or `route-map'. `offset-list' also
1876: affects connected routes.
1877:
1878: -- RIP command: offset-list ACCESS-LIST (in|out)
1879: -- RIP command: offset-list ACCESS-LIST (in|out) IFNAME
1880:
1881:
1882: File: quagga.info, Node: RIP distance, Next: RIP route-map, Prev: RIP Metric Manipulation, Up: RIP
1883:
1884: 5.7 RIP distance
1885: ================
1886:
1887: Distance value is used in zebra daemon. Default RIP distance is 120.
1888:
1889: -- RIP command: distance <1-255>
1890: -- RIP command: no distance <1-255>
1891: Set default RIP distance to specified value.
1892:
1893: -- RIP command: distance <1-255> A.B.C.D/M
1894: -- RIP command: no distance <1-255> A.B.C.D/M
1895: Set default RIP distance to specified value when the route's
1896: source IP address matches the specified prefix.
1897:
1898: -- RIP command: distance <1-255> A.B.C.D/M ACCESS-LIST
1899: -- RIP command: no distance <1-255> A.B.C.D/M ACCESS-LIST
1900: Set default RIP distance to specified value when the route's
1901: source IP address matches the specified prefix and the specified
1902: access-list.
1903:
1904:
1905: File: quagga.info, Node: RIP route-map, Next: RIP Authentication, Prev: RIP distance, Up: RIP
1906:
1907: 5.8 RIP route-map
1908: =================
1909:
1910: Usage of `ripd''s route-map support.
1911:
1912: Optional argument route-map MAP_NAME can be added to each
1913: `redistribute' statement.
1914:
1915: redistribute static [route-map MAP_NAME]
1916: redistribute connected [route-map MAP_NAME]
1917: .....
1918:
1919: Cisco applies route-map _before_ routes will exported to rip route
1920: table. In current Quagga's test implementation, `ripd' applies
1921: route-map after routes are listed in the route table and before routes
1922: will be announced to an interface (something like output filter). I
1923: think it is not so clear, but it is draft and it may be changed at
1924: future.
1925:
1926: Route-map statement (*note Route Map::) is needed to use route-map
1927: functionality.
1928:
1929: -- Route Map: match interface WORD
1930: This command match to incoming interface. Notation of this match
1931: is different from Cisco. Cisco uses a list of interfaces - NAME1
1932: NAME2 ... NAMEN. Ripd allows only one name (maybe will change in
1933: the future). Next - Cisco means interface which includes next-hop
1934: of routes (it is somewhat similar to "ip next-hop" statement).
1935: Ripd means interface where this route will be sent. This
1936: difference is because "next-hop" of same routes which sends to
1937: different interfaces must be different. Maybe it'd be better to
1938: made new matches - say "match interface-out NAME" or something
1939: like that.
1940:
1941: -- Route Map: match ip address WORD
1942: -- Route Map: match ip address prefix-list WORD
1943: Match if route destination is permitted by access-list.
1944:
1.1.1.3 misho 1945: -- Route Map: match ip next-hop WORD
1946: -- Route Map: match ip next-hop prefix-list WORD
1947: Match if route next-hop (meaning next-hop listed in the rip
1948: route-table as displayed by "show ip rip") is permitted by
1949: access-list.
1.1 misho 1950:
1951: -- Route Map: match metric <0-4294967295>
1952: This command match to the metric value of RIP updates. For other
1953: protocol compatibility metric range is shown as <0-4294967295>.
1954: But for RIP protocol only the value range <0-16> make sense.
1955:
1956: -- Route Map: set ip next-hop A.B.C.D
1957: This command set next hop value in RIPv2 protocol. This command
1958: does not affect RIPv1 because there is no next hop field in the
1959: packet.
1960:
1961: -- Route Map: set metric <0-4294967295>
1962: Set a metric for matched route when sending announcement. The
1963: metric value range is very large for compatibility with other
1964: protocols. For RIP, valid metric values are from 1 to 16.
1965:
1966:
1967: File: quagga.info, Node: RIP Authentication, Next: RIP Timers, Prev: RIP route-map, Up: RIP
1968:
1969: 5.9 RIP Authentication
1970: ======================
1971:
1972: RIPv2 allows packets to be authenticated via either an insecure plain
1973: text password, included with the packet, or via a more secure MD5 based
1974: HMAC (keyed-Hashing for Message AuthentiCation), RIPv1 can not be
1975: authenticated at all, thus when authentication is configured `ripd'
1976: will discard routing updates received via RIPv1 packets.
1977:
1978: However, unless RIPv1 reception is disabled entirely, *Note RIP
1979: Version Control::, RIPv1 REQUEST packets which are received, which
1980: query the router for routing information, will still be honoured by
1981: `ripd', and `ripd' WILL reply to such packets. This allows `ripd' to
1982: honour such REQUESTs (which sometimes is used by old equipment and very
1983: simple devices to bootstrap their default route), while still providing
1984: security for route updates which are received.
1985:
1986: In short: Enabling authentication prevents routes being updated by
1987: unauthenticated remote routers, but still can allow routes (I.e. the
1988: entire RIP routing table) to be queried remotely, potentially by anyone
1989: on the internet, via RIPv1.
1990:
1991: To prevent such unauthenticated querying of routes disable RIPv1,
1992: *Note RIP Version Control::.
1993:
1994: -- Interface command: ip rip authentication mode md5
1995: -- Interface command: no ip rip authentication mode md5
1996: Set the interface with RIPv2 MD5 authentication.
1997:
1998: -- Interface command: ip rip authentication mode text
1999: -- Interface command: no ip rip authentication mode text
2000: Set the interface with RIPv2 simple password authentication.
2001:
2002: -- Interface command: ip rip authentication string STRING
2003: -- Interface command: no ip rip authentication string STRING
2004: RIP version 2 has simple text authentication. This command sets
2005: authentication string. The string must be shorter than 16
2006: characters.
2007:
2008: -- Interface command: ip rip authentication key-chain KEY-CHAIN
2009: -- Interface command: no ip rip authentication key-chain KEY-CHAIN
2010: Specifiy Keyed MD5 chain.
2011:
2012: !
2013: key chain test
2014: key 1
2015: key-string test
2016: !
2017: interface eth1
2018: ip rip authentication mode md5
2019: ip rip authentication key-chain test
2020: !
2021:
2022:
2023: File: quagga.info, Node: RIP Timers, Next: Show RIP Information, Prev: RIP Authentication, Up: RIP
2024:
2025: 5.10 RIP Timers
2026: ===============
2027:
2028: -- RIP command: timers basic UPDATE TIMEOUT GARBAGE
2029: RIP protocol has several timers. User can configure those timers'
2030: values by `timers basic' command.
2031:
2032: The default settings for the timers are as follows:
2033:
2034: * The update timer is 30 seconds. Every update timer seconds,
2035: the RIP process is awakened to send an unsolicited Response
2036: message containing the complete routing table to all
2037: neighboring RIP routers.
2038:
2039: * The timeout timer is 180 seconds. Upon expiration of the
2040: timeout, the route is no longer valid; however, it is
2041: retained in the routing table for a short time so that
2042: neighbors can be notified that the route has been dropped.
2043:
2044: * The garbage collect timer is 120 seconds. Upon expiration of
2045: the garbage-collection timer, the route is finally removed
2046: from the routing table.
2047:
2048:
2049: The `timers basic' command allows the the default values of the
2050: timers listed above to be changed.
2051:
2052: -- RIP command: no timers basic
2053: The `no timers basic' command will reset the timers to the default
2054: settings listed above.
2055:
2056:
2057: File: quagga.info, Node: Show RIP Information, Next: RIP Debug Commands, Prev: RIP Timers, Up: RIP
2058:
2059: 5.11 Show RIP Information
2060: =========================
2061:
2062: To display RIP routes.
2063:
2064: -- Command: show ip rip
2065: Show RIP routes.
2066:
2067: The command displays all RIP routes. For routes that are received
2068: through RIP, this command will display the time the packet was sent and
2069: the tag information. This command will also display this information
2070: for routes redistributed into RIP.
2071:
2072: -- Command: show ip protocols
2073: The command displays current RIP status. It includes RIP timer,
2074: filtering, version, RIP enabled interface and RIP peer inforation.
2075:
2076: ripd> show ip protocols
2077: Routing Protocol is "rip"
2078: Sending updates every 30 seconds with +/-50%, next due in 35 seconds
2079: Timeout after 180 seconds, garbage collect after 120 seconds
2080: Outgoing update filter list for all interface is not set
2081: Incoming update filter list for all interface is not set
2082: Default redistribution metric is 1
2083: Redistributing: kernel connected
2084: Default version control: send version 2, receive version 2
2085: Interface Send Recv
2086: Routing for Networks:
2087: eth0
2088: eth1
2089: 1.1.1.1
2090: 203.181.89.241
2091: Routing Information Sources:
2092: Gateway BadPackets BadRoutes Distance Last Update
2093:
2094:
2095: File: quagga.info, Node: RIP Debug Commands, Prev: Show RIP Information, Up: RIP
2096:
2097: 5.12 RIP Debug Commands
2098: =======================
2099:
2100: Debug for RIP protocol.
2101:
2102: -- Command: debug rip events
2103: Debug rip events.
2104:
2105: `debug rip' will show RIP events. Sending and receiving packets,
2106: timers, and changes in interfaces are events shown with `ripd'.
2107:
2108: -- Command: debug rip packet
2109: Debug rip packet.
2110:
2111: `debug rip packet' will display detailed information about the RIP
2112: packets. The origin and port number of the packet as well as a packet
2113: dump is shown.
2114:
2115: -- Command: debug rip zebra
2116: Debug rip between zebra communication.
2117:
2118: This command will show the communication between `ripd' and `zebra'.
2119: The main information will include addition and deletion of paths to the
2120: kernel and the sending and receiving of interface information.
2121:
2122: -- Command: show debugging rip
2123: Display `ripd''s debugging option.
2124:
2125: `show debugging rip' will show all information currently set for ripd
2126: debug.
2127:
2128:
2129: File: quagga.info, Node: RIPng, Next: OSPFv2, Prev: RIP, Up: Top
2130:
2131: 6 RIPng
2132: *******
2133:
2134: `ripngd' supports the RIPng protocol as described in RFC2080. It's an
2135: IPv6 reincarnation of the RIP protocol.
2136:
2137: * Menu:
2138:
2139: * Invoking ripngd::
2140: * ripngd Configuration::
2141: * ripngd Terminal Mode Commands::
2142: * ripngd Filtering Commands::
2143:
2144:
2145: File: quagga.info, Node: Invoking ripngd, Next: ripngd Configuration, Up: RIPng
2146:
2147: 6.1 Invoking ripngd
2148: ===================
2149:
2150: There are no `ripngd' specific invocation options. Common options can
2151: be specified (*note Common Invocation Options::).
2152:
2153:
2154: File: quagga.info, Node: ripngd Configuration, Next: ripngd Terminal Mode Commands, Prev: Invoking ripngd, Up: RIPng
2155:
2156: 6.2 ripngd Configuration
2157: ========================
2158:
2159: Currently ripngd supports the following commands:
2160:
2161: -- Command: router ripng
2162: Enable RIPng.
2163:
2164: -- RIPng Command: flush_timer TIME
2165: Set flush timer.
2166:
2167: -- RIPng Command: network NETWORK
2168: Set RIPng enabled interface by NETWORK
2169:
2170: -- RIPng Command: network IFNAME
2171: Set RIPng enabled interface by IFNAME
2172:
2173: -- RIPng Command: route NETWORK
2174: Set RIPng static routing announcement of NETWORK.
2175:
2176: -- Command: router zebra
2177: This command is the default and does not appear in the
2178: configuration. With this statement, RIPng routes go to the
2179: `zebra' daemon.
2180:
2181:
2182: File: quagga.info, Node: ripngd Terminal Mode Commands, Next: ripngd Filtering Commands, Prev: ripngd Configuration, Up: RIPng
2183:
2184: 6.3 ripngd Terminal Mode Commands
2185: =================================
2186:
2187: -- Command: show ip ripng
2188:
2189: -- Command: show debugging ripng
2190:
2191: -- Command: debug ripng events
2192:
2193: -- Command: debug ripng packet
2194:
2195: -- Command: debug ripng zebra
2196:
2197:
2198: File: quagga.info, Node: ripngd Filtering Commands, Prev: ripngd Terminal Mode Commands, Up: RIPng
2199:
2200: 6.4 ripngd Filtering Commands
2201: =============================
2202:
2203: -- Command: distribute-list ACCESS_LIST (in|out) IFNAME
2204: You can apply an access-list to the interface using the
2205: `distribute-list' command. ACCESS_LIST is an access-list name.
2206: DIRECT is `in' or `out'. If DIRECT is `in', the access-list is
2207: applied only to incoming packets.
2208:
2209: distribute-list local-only out sit1
2210:
2211:
2212: File: quagga.info, Node: OSPFv2, Next: OSPFv3, Prev: RIPng, Up: Top
2213:
2214: 7 OSPFv2
2215: ********
2216:
2217: OSPF (Open Shortest Path First) version 2 is a routing protocol which
2218: is described in `RFC2328, OSPF Version 2'. OSPF is an IGP (Interior
2219: Gateway Protocol). Compared with RIP, OSPF can provide scalable
2220: network support and faster convergence times. OSPF is widely used in
2221: large networks such as ISP (Internet Service Provider) backbone and
2222: enterprise networks.
2223:
2224: * Menu:
2225:
2226: * Configuring ospfd::
2227: * OSPF router::
2228: * OSPF area::
2229: * OSPF interface::
2230: * Redistribute routes to OSPF::
2231: * Showing OSPF information::
2232: * Debugging OSPF::
2233: * OSPF Configuration Examples::
2234:
2235:
2236: File: quagga.info, Node: Configuring ospfd, Next: OSPF router, Up: OSPFv2
2237:
2238: 7.1 Configuring ospfd
2239: =====================
2240:
2241: There are no `ospfd' specific options. Common options can be specified
2242: (*note Common Invocation Options::) to `ospfd'. `ospfd' needs to
2243: acquire interface information from `zebra' in order to function.
2244: Therefore `zebra' must be running before invoking `ospfd'. Also, if
2245: `zebra' is restarted then `ospfd' must be too.
2246:
2247: Like other daemons, `ospfd' configuration is done in OSPF specific
2248: configuration file `ospfd.conf'.
2249:
2250:
2251: File: quagga.info, Node: OSPF router, Next: OSPF area, Prev: Configuring ospfd, Up: OSPFv2
2252:
2253: 7.2 OSPF router
2254: ===============
2255:
2256: To start OSPF process you have to specify the OSPF router. As of this
2257: writing, `ospfd' does not support multiple OSPF processes.
2258:
2259: -- Command: router ospf
2260: -- Command: no router ospf
2261: Enable or disable the OSPF process. `ospfd' does not yet support
2262: multiple OSPF processes. So you can not specify an OSPF process
2263: number.
2264:
2265: -- OSPF Command: ospf router-id A.B.C.D
2266: -- OSPF Command: no ospf router-id
2267: This sets the router-ID of the OSPF process. The router-ID may be
2268: an IP address of the router, but need not be - it can be any
2269: arbitrary 32bit number. However it MUST be unique within the
2270: entire OSPF domain to the OSPF speaker - bad things will happen if
2271: multiple OSPF speakers are configured with the same router-ID! If
2272: one is not specified then `ospfd' will obtain a router-ID
2273: automatically from `zebra'.
2274:
2275: -- OSPF Command: ospf abr-type TYPE
2276: -- OSPF Command: no ospf abr-type TYPE
2277: TYPE can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM"
2278: types are equivalent.
2279:
2280: The OSPF standard for ABR behaviour does not allow an ABR to
2281: consider routes through non-backbone areas when its links to the
2282: backbone are down, even when there are other ABRs in attached
2283: non-backbone areas which still can reach the backbone - this
2284: restriction exists primarily to ensure routing-loops are avoided.
2285:
2286: With the "Cisco" or "IBM" ABR type, the default in this release of
2287: Quagga, this restriction is lifted, allowing an ABR to consider
2288: summaries learnt from other ABRs through non-backbone areas, and
2289: hence route via non-backbone areas as a last resort when, and only
2290: when, backbone links are down.
2291:
2292: Note that areas with fully-adjacent virtual-links are considered
2293: to be "transit capable" and can always be used to route backbone
2294: traffic, and hence are unaffected by this setting (*note OSPF
2295: virtual-link::).
2296:
2297: More information regarding the behaviour controlled by this
2298: command can be found in `RFC 3509, Alternative Implementations of
2299: OSPF Area Border Routers', and
2300: `draft-ietf-ospf-shortcut-abr-02.txt'.
2301:
2302: Quote: "Though the definition of the ABR (Area Border Router) in
2303: the OSPF specification does not require a router with multiple
2304: attached areas to have a backbone connection, it is actually
2305: necessary to provide successful routing to the inter-area and
2306: external destinations. If this requirement is not met, all traffic
2307: destined for the areas not connected to such an ABR or out of the
2308: OSPF domain, is dropped. This document describes alternative ABR
2309: behaviors implemented in Cisco and IBM routers."
2310:
2311: -- OSPF Command: ospf rfc1583compatibility
2312: -- OSPF Command: no ospf rfc1583compatibility
2313: `RFC2328', the sucessor to `RFC1583', suggests according to
2314: section G.2 (changes) in section 16.4 a change to the path
2315: preference algorithm that prevents possible routing loops that were
2316: possible in the old version of OSPFv2. More specifically it demands
2317: that inter-area paths and intra-area backbone path are now of
2318: equal preference but still both preferred to external paths.
2319:
2320: This command should NOT be set normally.
2321:
2322: -- OSPF Command: log-adjacency-changes [detail]
2323: -- OSPF Command: no log-adjacency-changes [detail]
2324: Configures ospfd to log changes in adjacency. With the optional
2325: detail argument, all changes in adjacency status are shown.
2326: Without detail, only changes to full or regressions are shown.
2327:
2328: -- OSPF Command: passive-interface INTERFACE
2329: -- OSPF Command: no passive-interface INTERFACE
2330: Do not speak OSPF interface on the given interface, but do
2331: advertise the interface as a stub link in the router-LSA (Link
2332: State Advertisement) for this router. This allows one to advertise
2333: addresses on such connected interfaces without having to originate
2334: AS-External/Type-5 LSAs (which have global flooding scope) - as
2335: would occur if connected addresses were redistributed into OSPF
2336: (*note Redistribute routes to OSPF::). This is the only way to
2337: advertise non-OSPF links into stub areas.
2338:
2339: -- OSPF Command: timers throttle spf DELAY INITIAL-HOLDTIME
2340: MAX-HOLDTIME
2341: -- OSPF Command: no timers throttle spf
2342: This command sets the initial DELAY, the INITIAL-HOLDTIME and the
2343: MAXIMUM-HOLDTIME between when SPF is calculated and the event
2344: which triggered the calculation. The times are specified in
2345: milliseconds and must be in the range of 0 to 600000 milliseconds.
2346:
2347: The DELAY specifies the minimum amount of time to delay SPF
2348: calculation (hence it affects how long SPF calculation is delayed
2349: after an event which occurs outside of the holdtime of any
2350: previous SPF calculation, and also serves as a minimum holdtime).
2351:
2352: Consecutive SPF calculations will always be seperated by at least
2353: 'hold-time' milliseconds. The hold-time is adaptive and initially
2354: is set to the INITIAL-HOLDTIME configured with the above command.
2355: Events which occur within the holdtime of the previous SPF
2356: calculation will cause the holdtime to be increased by
2357: INITIAL-HOLDTIME, bounded by the MAXIMUM-HOLDTIME configured with
2358: this command. If the adaptive hold-time elapses without any
2359: SPF-triggering event occuring then the current holdtime is reset
2360: to the INITIAL-HOLDTIME. The current holdtime can be viewed with
2361: *note show ip ospf::, where it is expressed as a multiplier of the
2362: INITIAL-HOLDTIME.
2363:
2364: router ospf
2365: timers throttle spf 200 400 10000
2366:
2367: In this example, the DELAY is set to 200ms, the INITIAL HOLDTIME
2368: is set to 400ms and the MAXIMUM HOLDTIME to 10s. Hence there will
2369: always be at least 200ms between an event which requires SPF
2370: calculation and the actual SPF calculation. Further consecutive SPF
2371: calculations will always be seperated by between 400ms to 10s, the
2372: hold-time increasing by 400ms each time an SPF-triggering event
2373: occurs within the hold-time of the previous SPF calculation.
2374:
2375: This command supercedes the `timers spf' command in previous Quagga
2376: releases.
2377:
2378: -- OSPF Command: max-metric router-lsa [on-startup|on-shutdown]
2379: <5-86400>
2380: -- OSPF Command: max-metric router-lsa administrative
2381: -- OSPF Command: no max-metric router-lsa
2382: [on-startup|on-shutdown|administrative]
2383: This enables `RFC3137, OSPF Stub Router Advertisement' support,
2384: where the OSPF process describes its transit links in its
2385: router-LSA as having infinite distance so that other routers will
2386: avoid calculating transit paths through the router while still
2387: being able to reach networks through the router.
2388:
2389: This support may be enabled administratively (and indefinitely) or
2390: conditionally. Conditional enabling of max-metric router-lsas can
2391: be for a period of seconds after startup and/or for a period of
2392: seconds prior to shutdown.
2393:
2394: Enabling this for a period after startup allows OSPF to converge
2395: fully first without affecting any existing routes used by other
2396: routers, while still allowing any connected stub links and/or
2397: redistributed routes to be reachable. Enabling this for a period
2398: of time in advance of shutdown allows the router to gracefully
2399: excuse itself from the OSPF domain.
2400:
2401: Enabling this feature administratively allows for administrative
2402: intervention for whatever reason, for an indefinite period of time.
2403: Note that if the configuration is written to file, this
2404: administrative form of the stub-router command will also be
2405: written to file. If `ospfd' is restarted later, the command will
2406: then take effect until manually deconfigured.
2407:
2408: Configured state of this feature as well as current status, such
2409: as the number of second remaining till on-startup or on-shutdown
2410: ends, can be viewed with the *note show ip ospf:: command.
2411:
2412: -- OSPF Command: auto-cost reference-bandwidth <1-4294967>
2413: -- OSPF Command: no auto-cost reference-bandwidth
2414: This sets the reference bandwidth for cost calculations, where
2415: this bandwidth is considered equivalent to an OSPF cost of 1,
2416: specified in Mbits/s. The default is 100Mbit/s (i.e. a link of
2417: bandwidth 100Mbit/s or higher will have a cost of 1. Cost of lower
2418: bandwidth links will be scaled with reference to this cost).
2419:
2420: This configuration setting MUST be consistent across all routers
2421: within the OSPF domain.
2422:
2423: -- OSPF Command: network A.B.C.D/M area A.B.C.D
2424: -- OSPF Command: network A.B.C.D/M area <0-4294967295>
2425: -- OSPF Command: no network A.B.C.D/M area A.B.C.D
2426: -- OSPF Command: no network A.B.C.D/M area <0-4294967295>
2427: This command specifies the OSPF enabled interface(s). If the
2428: interface has an address from range 192.168.1.0/24 then the
2429: command below enables ospf on this interface so router can provide
2430: network information to the other ospf routers via this interface.
2431:
2432: router ospf
2433: network 192.168.1.0/24 area 0.0.0.0
2434:
2435: Prefix length in interface must be equal or bigger (ie. smaller
2436: network) than prefix length in network statement. For example
2437: statement above doesn't enable ospf on interface with address
2438: 192.168.1.1/23, but it does on interface with address
2439: 192.168.1.129/25.
2440:
2441: Note that the behavior when there is a peer address defined on an
2442: interface changed after release 0.99.7. Currently, if a peer
2443: prefix has been configured, then we test whether the prefix in the
2444: network command contains the destination prefix. Otherwise, we
2445: test whether the network command prefix contains the local address
2446: prefix of the interface.
2447:
2448:
2449: File: quagga.info, Node: OSPF area, Next: OSPF interface, Prev: OSPF router, Up: OSPFv2
2450:
2451: 7.3 OSPF area
2452: =============
2453:
2454: -- OSPF Command: area A.B.C.D range A.B.C.D/M
2455: -- OSPF Command: area <0-4294967295> range A.B.C.D/M
2456: -- OSPF Command: no area A.B.C.D range A.B.C.D/M
2457: -- OSPF Command: no area <0-4294967295> range A.B.C.D/M
2458: Summarize intra area paths from specified area into one Type-3
2459: summary-LSA announced to other areas. This command can be used
2460: only in ABR and ONLY router-LSAs (Type-1) and network-LSAs
2461: (Type-2) (ie. LSAs with scope area) can be summarized. Type-5
2462: AS-external-LSAs can't be summarized - their scope is AS.
2463: Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
2464:
2465: router ospf
2466: network 192.168.1.0/24 area 0.0.0.0
2467: network 10.0.0.0/8 area 0.0.0.10
2468: area 0.0.0.10 range 10.0.0.0/8
2469:
2470: With configuration above one Type-3 Summary-LSA with routing info
2471: 10.0.0.0/8 is announced into backbone area if area 0.0.0.10
2472: contains at least one intra-area network (ie. described with
2473: router or network LSA) from this range.
2474:
2475: -- OSPF Command: area A.B.C.D range IPV4_PREFIX not-advertise
2476: -- OSPF Command: no area A.B.C.D range IPV4_PREFIX not-advertise
2477: Instead of summarizing intra area paths filter them - ie. intra
2478: area paths from this range are not advertised into other areas.
2479: This command makes sense in ABR only.
2480:
2481: -- OSPF Command: area A.B.C.D range IPV4_PREFIX substitute IPV4_PREFIX
2482: -- OSPF Command: no area A.B.C.D range IPV4_PREFIX substitute
2483: IPV4_PREFIX
2484: Substitute summarized prefix with another prefix.
2485:
2486: router ospf
2487: network 192.168.1.0/24 area 0.0.0.0
2488: network 10.0.0.0/8 area 0.0.0.10
2489: area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8
2490:
2491: One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced
2492: into backbone area if area 0.0.0.10 contains at least one
2493: intra-area network (ie. described with router-LSA or network-LSA)
2494: from range 10.0.0.0/8. This command makes sense in ABR only.
2495:
2496: -- OSPF Command: area A.B.C.D virtual-link A.B.C.D
2497: -- OSPF Command: area <0-4294967295> virtual-link A.B.C.D
2498: -- OSPF Command: no area A.B.C.D virtual-link A.B.C.D
2499: -- OSPF Command: no area <0-4294967295> virtual-link A.B.C.D
2500:
2501: -- OSPF Command: area A.B.C.D shortcut
2502: -- OSPF Command: area <0-4294967295> shortcut
2503: -- OSPF Command: no area A.B.C.D shortcut
2504: -- OSPF Command: no area <0-4294967295> shortcut
2505: Configure the area as Shortcut capable. See `RFC3509'. This
2506: requires that the 'abr-type' be set to 'shortcut'.
2507:
2508: -- OSPF Command: area A.B.C.D stub
2509: -- OSPF Command: area <0-4294967295> stub
2510: -- OSPF Command: no area A.B.C.D stub
2511: -- OSPF Command: no area <0-4294967295> stub
2512: Configure the area to be a stub area. That is, an area where no
2513: router originates routes external to OSPF and hence an area where
2514: all external routes are via the ABR(s). Hence, ABRs for such an
2515: area do not need to pass AS-External LSAs (type-5s) or
2516: ASBR-Summary LSAs (type-4) into the area. They need only pass
2517: Network-Summary (type-3) LSAs into such an area, along with a
2518: default-route summary.
2519:
2520: -- OSPF Command: area A.B.C.D stub no-summary
2521: -- OSPF Command: area <0-4294967295> stub no-summary
2522: -- OSPF Command: no area A.B.C.D stub no-summary
2523: -- OSPF Command: no area <0-4294967295> stub no-summary
2524: Prevents an `ospfd' ABR from injecting inter-area summaries into
2525: the specified stub area.
2526:
2527: -- OSPF Command: area A.B.C.D default-cost <0-16777215>
2528: -- OSPF Command: no area A.B.C.D default-cost <0-16777215>
2529: Set the cost of default-summary LSAs announced to stubby areas.
2530:
2531: -- OSPF Command: area A.B.C.D export-list NAME
2532: -- OSPF Command: area <0-4294967295> export-list NAME
2533: -- OSPF Command: no area A.B.C.D export-list NAME
2534: -- OSPF Command: no area <0-4294967295> export-list NAME
2535: Filter Type-3 summary-LSAs announced to other areas originated
2536: from intra- area paths from specified area.
2537:
2538: router ospf
2539: network 192.168.1.0/24 area 0.0.0.0
2540: network 10.0.0.0/8 area 0.0.0.10
2541: area 0.0.0.10 export-list foo
2542: !
2543: access-list foo permit 10.10.0.0/16
2544: access-list foo deny any
2545:
2546: With example above any intra-area paths from area 0.0.0.10 and
2547: from range 10.10.0.0/16 (for example 10.10.1.0/24 and
2548: 10.10.2.128/30) are announced into other areas as Type-3
2549: summary-LSA's, but any others (for example 10.11.0.0/16 or
2550: 10.128.30.16/30) aren't.
2551:
2552: This command is only relevant if the router is an ABR for the
2553: specified area.
2554:
2555: -- OSPF Command: area A.B.C.D import-list NAME
2556: -- OSPF Command: area <0-4294967295> import-list NAME
2557: -- OSPF Command: no area A.B.C.D import-list NAME
2558: -- OSPF Command: no area <0-4294967295> import-list NAME
2559: Same as export-list, but it applies to paths announced into
2560: specified area as Type-3 summary-LSAs.
2561:
2562: -- OSPF Command: area A.B.C.D filter-list prefix NAME in
2563: -- OSPF Command: area A.B.C.D filter-list prefix NAME out
2564: -- OSPF Command: area <0-4294967295> filter-list prefix NAME in
2565: -- OSPF Command: area <0-4294967295> filter-list prefix NAME out
2566: -- OSPF Command: no area A.B.C.D filter-list prefix NAME in
2567: -- OSPF Command: no area A.B.C.D filter-list prefix NAME out
2568: -- OSPF Command: no area <0-4294967295> filter-list prefix NAME in
2569: -- OSPF Command: no area <0-4294967295> filter-list prefix NAME out
2570: Filtering Type-3 summary-LSAs to/from area using prefix lists.
2571: This command makes sense in ABR only.
2572:
2573: -- OSPF Command: area A.B.C.D authentication
2574: -- OSPF Command: area <0-4294967295> authentication
2575: -- OSPF Command: no area A.B.C.D authentication
2576: -- OSPF Command: no area <0-4294967295> authentication
2577: Specify that simple password authentication should be used for the
2578: given area.
2579:
2580: -- OSPF Command: area A.B.C.D authentication message-digest
2581: -- OSPF Command: area <0-4294967295> authentication message-digest
2582: Specify that OSPF packets must be authenticated with MD5 HMACs
2583: within the given area. Keying material must also be configured on
2584: a per-interface basis (*note ip ospf message-digest-key::).
2585:
2586: MD5 authentication may also be configured on a per-interface basis
2587: (*note ip ospf authentication message-digest::). Such per-interface
2588: settings will override any per-area authentication setting.
2589:
2590:
2591: File: quagga.info, Node: OSPF interface, Next: Redistribute routes to OSPF, Prev: OSPF area, Up: OSPFv2
2592:
2593: 7.4 OSPF interface
2594: ==================
2595:
2596: -- Interface Command: ip ospf authentication-key AUTH_KEY
2597: -- Interface Command: no ip ospf authentication-key
2598: Set OSPF authentication key to a simple password. After setting
2599: AUTH_KEY, all OSPF packets are authenticated. AUTH_KEY has length
2600: up to 8 chars.
2601:
2602: Simple text password authentication is insecure and deprecated in
2603: favour of MD5 HMAC authentication (*note ip ospf authentication
2604: message-digest::).
2605:
2606: -- Interface Command: ip ospf authentication message-digest
2607: Specify that MD5 HMAC authentication must be used on this
2608: interface. MD5 keying material must also be configured (*note ip
2609: ospf message-digest-key::). Overrides any authentication enabled
2610: on a per-area basis (*note area authentication message-digest::).
2611:
2612: Note that OSPF MD5 authentication requires that time never go
2613: backwards (correct time is NOT important, only that it never goes
2614: backwards), even across resets, if ospfd is to be able to promptly
2615: reestabish adjacencies with its neighbours after restarts/reboots.
2616: The host should have system time be set at boot from an external
2617: or non-volatile source (eg battery backed clock, NTP, etc.) or
2618: else the system clock should be periodically saved to non-volative
2619: storage and restored at boot if MD5 authentication is to be
2620: expected to work reliably.
2621:
2622: -- Interface Command: ip ospf message-digest-key KEYID md5 KEY
2623: -- Interface Command: no ip ospf message-digest-key
2624: Set OSPF authentication key to a cryptographic password. The
2625: cryptographic algorithm is MD5.
2626:
2627: KEYID identifies secret key used to create the message digest.
2628: This ID is part of the protocol and must be consistent across
2629: routers on a link.
2630:
2631: KEY is the actual message digest key, of up to 16 chars (larger
2632: strings will be truncated), and is associated with the given KEYID.
2633:
2634: -- Interface Command: ip ospf cost <1-65535>
2635: -- Interface Command: no ip ospf cost
2636: Set link cost for the specified interface. The cost value is set
2637: to router-LSA's metric field and used for SPF calculation.
2638:
2639: -- Interface Command: ip ospf dead-interval <1-65535>
2640: -- Interface Command: ip ospf dead-interval minimal hello-multiplier
2641: <2-20>
2642: -- Interface Command: no ip ospf dead-interval
2643: Set number of seconds for RouterDeadInterval timer value used for
2644: Wait Timer and Inactivity Timer. This value must be the same for
2645: all routers attached to a common network. The default value is 40
2646: seconds.
2647:
2648: If 'minimal' is specified instead, then the dead-interval is set
2649: to 1 second and one must specify a hello-multiplier. The
2650: hello-multiplier specifies how many Hellos to send per second,
2651: from 2 (every 500ms) to 20 (every 50ms). Thus one can have 1s
2652: convergence time for OSPF. If this form is specified, then the
2653: hello-interval advertised in Hello packets is set to 0 and the
2654: hello-interval on received Hello packets is not checked, thus the
2655: hello-multiplier need NOT be the same across multiple routers on a
2656: common link.
2657:
2658: -- Interface Command: ip ospf hello-interval <1-65535>
2659: -- Interface Command: no ip ospf hello-interval
2660: Set number of seconds for HelloInterval timer value. Setting this
2661: value, Hello packet will be sent every timer value seconds on the
2662: specified interface. This value must be the same for all routers
2663: attached to a common network. The default value is 10 seconds.
2664:
2665: This command has no effect if *note ip ospf dead-interval
2666: minimal:: is also specified for the interface.
2667:
2668: -- Interface Command: ip ospf network
2669: (broadcast|non-broadcast|point-to-multipoint|point-to-point)
2670: -- Interface Command: no ip ospf network
2671: Set explicitly network type for specifed interface.
2672:
2673: -- Interface Command: ip ospf priority <0-255>
2674: -- Interface Command: no ip ospf priority
2675: Set RouterPriority integer value. The router with the highest
2676: priority will be more eligible to become Designated Router.
2677: Setting the value to 0, makes the router ineligible to become
2678: Designated Router. The default value is 1.
2679:
2680: -- Interface Command: ip ospf retransmit-interval <1-65535>
2681: -- Interface Command: no ip ospf retransmit interval
2682: Set number of seconds for RxmtInterval timer value. This value is
2683: used when retransmitting Database Description and Link State
2684: Request packets. The default value is 5 seconds.
2685:
2686: -- Interface Command: ip ospf transmit-delay
2687: -- Interface Command: no ip ospf transmit-delay
2688: Set number of seconds for InfTransDelay value. LSAs' age should be
2689: incremented by this value when transmitting. The default value is
2690: 1 seconds.
2691:
2692:
2693: File: quagga.info, Node: Redistribute routes to OSPF, Next: Showing OSPF information, Prev: OSPF interface, Up: OSPFv2
2694:
2695: 7.5 Redistribute routes to OSPF
2696: ===============================
2697:
2698: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
2699: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
2700: ROUTE-MAP
2701: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
2702: metric-type (1|2)
2703: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
2704: metric-type (1|2) route-map WORD
2705: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric
2706: <0-16777214>
2707: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp) metric
2708: <0-16777214> route-map WORD
2709: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
2710: metric-type (1|2) metric <0-16777214>
2711: -- OSPF Command: redistribute (kernel|connected|static|rip|bgp)
2712: metric-type (1|2) metric <0-16777214> route-map WORD
2713: -- OSPF Command: no redistribute (kernel|connected|static|rip|bgp)
2714: Redistribute routes of the specified protocol or kind into OSPF,
2715: with the metric type and metric set if specified, filtering the
2716: routes using the given route-map if specified. Redistributed
2717: routes may also be filtered with distribute-lists, see *note ospf
2718: distribute-list::.
2719:
2720: Redistributed routes are distributed as into OSPF as Type-5
2721: External LSAs into links to areas that accept external routes,
2722: Type-7 External LSAs for NSSA areas and are not redistributed at
2723: all into Stub areas, where external routes are not permitted.
2724:
2725: Note that for connected routes, one may instead use
2726: "passive-interface", see *note OSPF passive-interface::.
2727:
2728: -- OSPF Command: default-information originate
2729: -- OSPF Command: default-information originate metric <0-16777214>
2730: -- OSPF Command: default-information originate metric <0-16777214>
2731: metric-type (1|2)
2732: -- OSPF Command: default-information originate metric <0-16777214>
2733: metric-type (1|2) route-map WORD
2734: -- OSPF Command: default-information originate always
2735: -- OSPF Command: default-information originate always metric
2736: <0-16777214>
2737: -- OSPF Command: default-information originate always metric
2738: <0-16777214> metric-type (1|2)
2739: -- OSPF Command: default-information originate always metric
2740: <0-16777214> metric-type (1|2) route-map WORD
2741: -- OSPF Command: no default-information originate
2742: Originate an AS-External (type-5) LSA describing a default route
2743: into all external-routing capable areas, of the specified metric
2744: and metric type. If the 'always' keyword is given then the default
2745: is always advertised, even when there is no default present in the
2746: routing table.
2747:
2748: -- OSPF Command: distribute-list NAME out
2749: (kernel|connected|static|rip|ospf
2750: -- OSPF Command: no distribute-list NAME out
2751: (kernel|connected|static|rip|ospf
2752: Apply the access-list filter, NAME, to redistributed routes of the
2753: given type before allowing the routes to redistributed into OSPF
2754: (*note OSPF redistribute::).
2755:
2756: -- OSPF Command: default-metric <0-16777214>
2757: -- OSPF Command: no default-metric
2758:
2759: -- OSPF Command: distance <1-255>
2760: -- OSPF Command: no distance <1-255>
2761:
2762: -- OSPF Command: distance ospf (intra-area|inter-area|external)
2763: <1-255>
2764: -- OSPF Command: no distance ospf
2765:
2766:
2767: File: quagga.info, Node: Showing OSPF information, Next: Debugging OSPF, Prev: Redistribute routes to OSPF, Up: OSPFv2
2768:
2769: 7.6 Showing OSPF information
2770: ============================
2771:
2772: -- Command: show ip ospf
2773: Show information on a variety of general OSPF and area state and
2774: configuration information.
2775:
2776: -- Command: show ip ospf interface [INTERFACE]
2777: Show state and configuration of OSPF the specified interface, or
2778: all interfaces if no interface is given.
2779:
2780: -- Command: show ip ospf neighbor
2781: -- Command: show ip ospf neighbor INTERFACE
2782: -- Command: show ip ospf neighbor detail
2783: -- Command: show ip ospf neighbor INTERFACE detail
2784:
2785: -- Command: show ip ospf database
2786:
2787: -- Command: show ip ospf database
2788: (asbr-summary|external|network|router|summary)
2789: -- Command: show ip ospf database
2790: (asbr-summary|external|network|router|summary) LINK-STATE-ID
2791: -- Command: show ip ospf database
2792: (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router
2793: ADV-ROUTER
2794: -- Command: show ip ospf database
2795: (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER
2796: -- Command: show ip ospf database
2797: (asbr-summary|external|network|router|summary) LINK-STATE-ID
2798: self-originate
2799: -- Command: show ip ospf database
2800: (asbr-summary|external|network|router|summary) self-originate
2801:
2802: -- Command: show ip ospf database max-age
2803:
2804: -- Command: show ip ospf database self-originate
2805:
2806: -- Command: show ip ospf route
2807: Show the OSPF routing table, as determined by the most recent SPF
2808: calculation.
2809:
2810:
2811: File: quagga.info, Node: Debugging OSPF, Next: OSPF Configuration Examples, Prev: Showing OSPF information, Up: OSPFv2
2812:
2813: 7.7 Debugging OSPF
2814: ==================
2815:
2816: -- Command: debug ospf packet
2817: (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
2818: -- Command: no debug ospf packet
2819: (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]
2820:
2821: -- Command: debug ospf ism
2822: -- Command: debug ospf ism (status|events|timers)
2823: -- Command: no debug ospf ism
2824: -- Command: no debug ospf ism (status|events|timers)
2825:
2826: -- Command: debug ospf nsm
2827: -- Command: debug ospf nsm (status|events|timers)
2828: -- Command: no debug ospf nsm
2829: -- Command: no debug ospf nsm (status|events|timers)
2830:
2831: -- Command: debug ospf lsa
2832: -- Command: debug ospf lsa (generate|flooding|refresh)
2833: -- Command: no debug ospf lsa
2834: -- Command: no debug ospf lsa (generate|flooding|refresh)
2835:
2836: -- Command: debug ospf zebra
2837: -- Command: debug ospf zebra (interface|redistribute)
2838: -- Command: no debug ospf zebra
2839: -- Command: no debug ospf zebra (interface|redistribute)
2840:
2841: -- Command: show debugging ospf
2842:
2843:
2844: File: quagga.info, Node: OSPF Configuration Examples, Prev: Debugging OSPF, Up: OSPFv2
2845:
2846: 7.8 OSPF Configuration Examples
2847: ===============================
2848:
2849: A simple example, with MD5 authentication enabled:
2850:
2851: !
2852: interface bge0
2853: ip ospf authentication message-digest
2854: ip ospf message-digest-key 1 md5 ABCDEFGHIJK
2855: !
2856: router ospf
2857: network 192.168.0.0/16 area 0.0.0.1
2858: area 0.0.0.1 authentication message-digest
2859:
2860: An ABR router, with MD5 authentication and performing summarisation
2861: of networks between the areas:
2862:
2863: !
2864: password ABCDEF
2865: log file /var/log/quagga/ospfd.log
2866: service advanced-vty
2867: !
2868: interface eth0
2869: ip ospf authentication message-digest
2870: ip ospf message-digest-key 1 md5 ABCDEFGHIJK
2871: !
2872: interface ppp0
2873: !
2874: interface br0
2875: ip ospf authentication message-digest
2876: ip ospf message-digest-key 2 md5 XYZ12345
2877: !
2878: router ospf
2879: ospf router-id 192.168.0.1
2880: redistribute connected
2881: passive interface ppp0
2882: network 192.168.0.0/24 area 0.0.0.0
2883: network 10.0.0.0/16 area 0.0.0.0
2884: network 192.168.1.0/24 area 0.0.0.1
2885: area 0.0.0.0 authentication message-digest
2886: area 0.0.0.0 range 10.0.0.0/16
2887: area 0.0.0.0 range 192.168.0.0/24
2888: area 0.0.0.1 authentication message-digest
2889: area 0.0.0.1 range 10.2.0.0/16
2890: !
2891:
2892:
1.1.1.3 misho 2893: File: quagga.info, Node: OSPFv3, Next: Babel, Prev: OSPFv2, Up: Top
1.1 misho 2894:
2895: 8 OSPFv3
2896: ********
2897:
2898: `ospf6d' is a daemon support OSPF version 3 for IPv6 network. OSPF for
2899: IPv6 is described in RFC2740.
2900:
2901: * Menu:
2902:
2903: * OSPF6 router::
2904: * OSPF6 area::
2905: * OSPF6 interface::
2906: * Redistribute routes to OSPF6::
2907: * Showing OSPF6 information::
2908: * OSPF6 Configuration Examples::
2909:
2910:
2911: File: quagga.info, Node: OSPF6 router, Next: OSPF6 area, Up: OSPFv3
2912:
2913: 8.1 OSPF6 router
2914: ================
2915:
2916: -- Command: router ospf6
2917:
2918: -- OSPF6 Command: router-id A.B.C.D
2919: Set router's Router-ID.
2920:
2921: -- OSPF6 Command: interface IFNAME area AREA
2922: Bind interface to specified area, and start sending OSPF packets.
2923: AREA can be specified as 0.
2924:
2925:
2926: File: quagga.info, Node: OSPF6 area, Next: OSPF6 interface, Prev: OSPF6 router, Up: OSPFv3
2927:
2928: 8.2 OSPF6 area
2929: ==============
2930:
2931: Area support for OSPFv3 is not yet implemented.
2932:
2933:
2934: File: quagga.info, Node: OSPF6 interface, Next: Redistribute routes to OSPF6, Prev: OSPF6 area, Up: OSPFv3
2935:
2936: 8.3 OSPF6 interface
2937: ===================
2938:
2939: -- Interface Command: ipv6 ospf6 cost COST
2940: Sets interface's output cost. Default value is 1.
2941:
2942: -- Interface Command: ipv6 ospf6 hello-interval HELLOINTERVAL
2943: Sets interface's Hello Interval. Default 40
2944:
2945: -- Interface Command: ipv6 ospf6 dead-interval DEADINTERVAL
2946: Sets interface's Router Dead Interval. Default value is 40.
2947:
2948: -- Interface Command: ipv6 ospf6 retransmit-interval
2949: RETRANSMITINTERVAL
2950: Sets interface's Rxmt Interval. Default value is 5.
2951:
2952: -- Interface Command: ipv6 ospf6 priority PRIORITY
2953: Sets interface's Router Priority. Default value is 1.
2954:
2955: -- Interface Command: ipv6 ospf6 transmit-delay TRANSMITDELAY
2956: Sets interface's Inf-Trans-Delay. Default value is 1.
2957:
2958:
2959: File: quagga.info, Node: Redistribute routes to OSPF6, Next: Showing OSPF6 information, Prev: OSPF6 interface, Up: OSPFv3
2960:
2961: 8.4 Redistribute routes to OSPF6
2962: ================================
2963:
2964: -- OSPF6 Command: redistribute static
2965: -- OSPF6 Command: redistribute connected
2966: -- OSPF6 Command: redistribute ripng
2967:
2968:
2969: File: quagga.info, Node: Showing OSPF6 information, Next: OSPF6 Configuration Examples, Prev: Redistribute routes to OSPF6, Up: OSPFv3
2970:
2971: 8.5 Showing OSPF6 information
2972: =============================
2973:
2974: -- Command: show ipv6 ospf6 [INSTANCE_ID]
2975: INSTANCE_ID is an optional OSPF instance ID. To see router ID and
2976: OSPF instance ID, simply type "show ipv6 ospf6 <cr>".
2977:
2978: -- Command: show ipv6 ospf6 database
2979: This command shows LSA database summary. You can specify the type
2980: of LSA.
2981:
2982: -- Command: show ipv6 ospf6 interface
2983: To see OSPF interface configuration like costs.
2984:
2985: -- Command: show ipv6 ospf6 neighbor
2986: Shows state and chosen (Backup) DR of neighbor.
2987:
2988: -- Command: show ipv6 ospf6 request-list A.B.C.D
2989: Shows requestlist of neighbor.
2990:
2991: -- Command: show ipv6 route ospf6
2992: This command shows internal routing table.
2993:
2994:
2995: File: quagga.info, Node: OSPF6 Configuration Examples, Prev: Showing OSPF6 information, Up: OSPFv3
2996:
2997: 8.6 OSPF6 Configuration Examples
2998: ================================
2999:
3000: Example of ospf6d configured on one interface and area:
3001:
3002: interface eth0
3003: ipv6 ospf6 instance-id 0
3004: !
3005: router ospf6
3006: router-id 212.17.55.53
3007: area 0.0.0.0 range 2001:770:105:2::/64
3008: interface eth0 area 0.0.0.0
3009: !
3010:
3011:
1.1.1.3 misho 3012: File: quagga.info, Node: Babel, Next: BGP, Prev: OSPFv3, Up: Top
1.1 misho 3013:
1.1.1.3 misho 3014: 9 Babel
3015: *******
3016:
3017: Babel is an interior gateway protocol that is suitable both for wired
3018: networks and for wireless mesh networks. Babel has been described as
3019: "RIP on speed" -- it is based on the same principles as RIP, but
3020: includes a number of refinements that make it react much faster to
3021: topology changes without ever counting to infinity, and allow it to
3022: perform reliable link quality estimation on wireless links. Babel is a
3023: double-stack routing protocol, meaning that a single Babel instance is
3024: able to perform routing for both IPv4 and IPv6.
3025:
3026: Quagga implements Babel as described in RFC6126.
3027:
3028: * Menu:
3029:
3030: * Configuring babeld::
3031: * Babel configuration::
3032: * Babel redistribution::
3033: * Show Babel information::
3034: * Babel debugging commands::
3035:
3036:
3037: File: quagga.info, Node: Configuring babeld, Next: Babel configuration, Prev: Babel, Up: Babel
3038:
3039: 9.1 Configuring babeld
3040: ======================
3041:
3042: The `babeld' daemon can be invoked with any of the common options
3043: (*note Common Invocation Options::).
3044:
3045: The `zebra' daemon must be running before `babeld' is invoked. Also,
3046: if `zebra' is restarted then `babeld' must be too.
3047:
3048: Configuration of `babeld' is done in its configuration file
3049: `babeld.conf'.
3050:
3051:
3052: File: quagga.info, Node: Babel configuration, Next: Babel redistribution, Prev: Configuring babeld, Up: Babel
3053:
3054: 9.2 Babel configuration
3055: =======================
3056:
3057: -- Command: router babel
3058: -- Command: no router babel
3059: Enable or disable Babel routing.
3060:
3061: -- Babel Command: network IFNAME
3062: -- Babel Command: no network IFNAME
3063: Enable or disable Babel on the given interface.
3064:
3065: -- Interface Command: babel wired
3066: -- Interface Command: babel wireless
3067: Specifies whether this interface is wireless, which disables a
3068: number of optimisations that are only correct on wired interfaces.
3069: Specifying `wireless' (the default) is always correct, but may
3070: cause slower convergence and extra routing traffic.
3071:
3072: -- Interface Command: babel split-horizon
3073: -- Interface Command: no babel split-horizon
3074: Specifies whether to perform split-horizon on the interface.
3075: Specifying `no babel split-horizon' (the default) is always
3076: correct, while `babel split-horizon' is an optimisation that
3077: should only be used on symmetric and transitive (wired) networks.
3078:
3079: -- Interface Command: babel hello-interval <20-655340>
3080: Specifies the time in milliseconds between two scheduled hellos.
3081: On wired links, Babel notices a link failure within two hello
3082: intervals; on wireless links, the link quality value is
3083: reestimated at every hello interval. The default is 4000ms.
3084:
3085: -- Interface Command: babel update-interval <20-655340>
3086: Specifies the time in milliseconds between two scheduled updates.
3087: Since Babel makes extensive use of triggered updates, this can be
3088: set to fairly high values on links with little packet loss. The
3089: default is 20000ms.
3090:
3091: -- Babel Command: babel resend-delay <20-655340>
3092: Specifies the time in milliseconds after which an "important"
3093: request or update will be resent. The default is 2000ms. You
3094: probably don't want to tweak this value.
3095:
3096:
3097: File: quagga.info, Node: Babel redistribution, Next: Show Babel information, Prev: Babel configuration, Up: Babel
3098:
3099: 9.3 Babel redistribution
3100: ========================
3101:
3102: -- Babel command: redistribute KIND
3103: -- Babel command: no redistribute KIND
3104: Specify which kind of routes should be redistributed into Babel.
3105:
3106:
3107: File: quagga.info, Node: Show Babel information, Next: Babel debugging commands, Prev: Babel redistribution, Up: Babel
3108:
3109: 9.4 Show Babel information
3110: ==========================
3111:
3112: -- Command: show babel database
3113: -- Command: show babel interface
3114: -- Command: show babel neighbour
3115: -- Command: show babel parameters
3116: These commands dump various parts of `babeld''s internal state.
3117: They are mostly useful for troubleshooting.
3118:
3119:
3120: File: quagga.info, Node: Babel debugging commands, Prev: Show Babel information, Up: Babel
3121:
3122: 9.5 Babel debugging commands
3123: ============================
3124:
3125: -- Babel Command: debug babel KIND
3126: -- Babel Command: no debug babel KIND
3127: Enable or disable debugging messages of a given kind. KIND can be
3128: one of `common', `kernel', `filter', `timeout', `interface',
3129: `route' or `all'. Note that if you have compiled with the
3130: NO_DEBUG flag, then these commands aren't available.
3131:
3132:
3133: File: quagga.info, Node: BGP, Next: Configuring Quagga as a Route Server, Prev: Babel, Up: Top
3134:
3135: 10 BGP
3136: ******
1.1 misho 3137:
3138: BGP stands for a Border Gateway Protocol. The lastest BGP version is
3139: 4. It is referred as BGP-4. BGP-4 is one of the Exterior Gateway
3140: Protocols and de-fact standard of Inter Domain routing protocol. BGP-4
3141: is described in `RFC1771, A Border Gateway Protocol 4 (BGP-4)'.
3142:
3143: Many extensions have been added to `RFC1771'. `RFC2858,
3144: Multiprotocol Extensions for BGP-4' provides multiprotocol support to
3145: BGP-4.
3146:
3147: * Menu:
3148:
3149: * Starting BGP::
3150: * BGP router::
3151: * BGP network::
3152: * BGP Peer::
3153: * BGP Peer Group::
3154: * BGP Address Family::
3155: * Autonomous System::
3156: * BGP Communities Attribute::
3157: * BGP Extended Communities Attribute::
3158: * Displaying BGP routes::
3159: * Capability Negotiation::
3160: * Route Reflector::
3161: * Route Server::
3162: * How to set up a 6-Bone connection::
3163: * Dump BGP packets and table::
3164: * BGP Configuration Examples::
3165:
3166:
3167: File: quagga.info, Node: Starting BGP, Next: BGP router, Up: BGP
3168:
1.1.1.3 misho 3169: 10.1 Starting BGP
3170: =================
1.1 misho 3171:
3172: Default configuration file of `bgpd' is `bgpd.conf'. `bgpd' searches
3173: the current directory first then /etc/quagga/bgpd.conf. All of bgpd's
3174: command must be configured in `bgpd.conf'.
3175:
3176: `bgpd' specific invocation options are described below. Common
3177: options may also be specified (*note Common Invocation Options::).
3178:
3179: `-p PORT'
3180: `--bgp_port=PORT'
3181: Set the bgp protocol's port number.
3182:
3183: `-r'
3184: `--retain'
3185: When program terminates, retain BGP routes added by zebra.
3186:
3187:
3188: File: quagga.info, Node: BGP router, Next: BGP network, Prev: Starting BGP, Up: BGP
3189:
1.1.1.3 misho 3190: 10.2 BGP router
3191: ===============
1.1 misho 3192:
3193: First of all you must configure BGP router with `router bgp' command.
3194: To configure BGP router, you need AS number. AS number is an
3195: identification of autonomous system. BGP protocol uses the AS number
3196: for detecting whether the BGP connection is internal one or external
3197: one.
3198:
3199: -- Command: router bgp ASN
3200: Enable a BGP protocol process with the specified ASN. After this
3201: statement you can input any `BGP Commands'. You can not create
3202: different BGP process under different ASN without specifying
3203: `multiple-instance' (*note Multiple instance::).
3204:
3205: -- Command: no router bgp ASN
3206: Destroy a BGP protocol process with the specified ASN.
3207:
3208: -- BGP: bgp router-id A.B.C.D
3209: This command specifies the router-ID. If `bgpd' connects to
3210: `zebra' it gets interface and address information. In that case
3211: default router ID value is selected as the largest IP Address of
3212: the interfaces. When `router zebra' is not enabled `bgpd' can't
3213: get interface information so `router-id' is set to 0.0.0.0. So
3214: please set router-id by hand.
3215:
3216: * Menu:
3217:
3218: * BGP distance::
3219: * BGP decision process::
3220: * BGP route flap dampening::
3221:
3222:
3223: File: quagga.info, Node: BGP distance, Next: BGP decision process, Up: BGP router
3224:
1.1.1.3 misho 3225: 10.2.1 BGP distance
3226: -------------------
1.1 misho 3227:
3228: -- BGP: distance bgp <1-255> <1-255> <1-255>
3229: This command change distance value of BGP. Each argument is
3230: distance value for external routes, internal routes and local
3231: routes.
3232:
3233: -- BGP: distance <1-255> A.B.C.D/M
3234: -- BGP: distance <1-255> A.B.C.D/M WORD
3235: This command set distance value to
3236:
3237:
3238: File: quagga.info, Node: BGP decision process, Next: BGP route flap dampening, Prev: BGP distance, Up: BGP router
3239:
1.1.1.3 misho 3240: 10.2.2 BGP decision process
3241: ---------------------------
1.1 misho 3242:
3243: 1. Weight check
3244:
3245: 2. Local preference check.
3246:
3247: 3. Local route check.
3248:
3249: 4. AS path length check.
3250:
3251: 5. Origin check.
3252:
3253: 6. MED check.
3254:
3255: -- BGP: bgp bestpath as-path confed
3256: This command specifies that the length of confederation path sets
3257: and sequences should should be taken into account during the BGP
3258: best path decision process.
3259:
3260:
3261: File: quagga.info, Node: BGP route flap dampening, Prev: BGP decision process, Up: BGP router
3262:
1.1.1.3 misho 3263: 10.2.3 BGP route flap dampening
3264: -------------------------------
1.1 misho 3265:
3266: -- BGP: bgp dampening <1-45> <1-20000> <1-20000> <1-255>
3267: This command enables BGP route-flap dampening and specifies
3268: dampening parameters.
3269:
3270: half-life
3271: Half-life time for the penalty
3272:
3273: reuse-threshold
3274: Value to start reusing a route
3275:
3276: suppress-threshold
3277: Value to start suppressing a route
3278:
3279: max-suppress
3280: Maximum duration to suppress a stable route
3281:
3282: The route-flap damping algorithm is compatible with `RFC2439'. The
3283: use of this command is not recommended nowadays, see RIPE-378.
3284:
3285:
3286: File: quagga.info, Node: BGP network, Next: BGP Peer, Prev: BGP router, Up: BGP
3287:
1.1.1.3 misho 3288: 10.3 BGP network
3289: ================
1.1 misho 3290:
3291: * Menu:
3292:
3293: * BGP route::
3294: * Route Aggregation::
3295: * Redistribute to BGP::
3296:
3297:
3298: File: quagga.info, Node: BGP route, Next: Route Aggregation, Up: BGP network
3299:
1.1.1.3 misho 3300: 10.3.1 BGP route
3301: ----------------
1.1 misho 3302:
3303: -- BGP: network A.B.C.D/M
3304: This command adds the announcement network.
3305: router bgp 1
3306: network 10.0.0.0/8
3307: This configuration example says that network 10.0.0.0/8 will be
3308: announced to all neighbors. Some vendors' routers don't advertise
3309: routes if they aren't present in their IGP routing tables; `bgpd'
3310: doesn't care about IGP routes when announcing its routes.
3311:
3312: -- BGP: no network A.B.C.D/M
3313:
3314:
3315: File: quagga.info, Node: Route Aggregation, Next: Redistribute to BGP, Prev: BGP route, Up: BGP network
3316:
1.1.1.3 misho 3317: 10.3.2 Route Aggregation
3318: ------------------------
1.1 misho 3319:
3320: -- BGP: aggregate-address A.B.C.D/M
3321: This command specifies an aggregate address.
3322:
3323: -- BGP: aggregate-address A.B.C.D/M as-set
3324: This command specifies an aggregate address. Resulting routes
3325: inlucde AS set.
3326:
3327: -- BGP: aggregate-address A.B.C.D/M summary-only
3328: This command specifies an aggregate address. Aggreated routes will
3329: not be announce.
3330:
3331: -- BGP: no aggregate-address A.B.C.D/M
3332:
3333:
3334: File: quagga.info, Node: Redistribute to BGP, Prev: Route Aggregation, Up: BGP network
3335:
1.1.1.3 misho 3336: 10.3.3 Redistribute to BGP
3337: --------------------------
1.1 misho 3338:
3339: -- BGP: redistribute kernel
3340: Redistribute kernel route to BGP process.
3341:
3342: -- BGP: redistribute static
3343: Redistribute static route to BGP process.
3344:
3345: -- BGP: redistribute connected
3346: Redistribute connected route to BGP process.
3347:
3348: -- BGP: redistribute rip
3349: Redistribute RIP route to BGP process.
3350:
3351: -- BGP: redistribute ospf
3352: Redistribute OSPF route to BGP process.
3353:
3354:
3355: File: quagga.info, Node: BGP Peer, Next: BGP Peer Group, Prev: BGP network, Up: BGP
3356:
1.1.1.3 misho 3357: 10.4 BGP Peer
3358: =============
1.1 misho 3359:
3360: * Menu:
3361:
3362: * Defining Peer::
3363: * BGP Peer commands::
3364: * Peer filtering::
3365:
3366:
3367: File: quagga.info, Node: Defining Peer, Next: BGP Peer commands, Up: BGP Peer
3368:
1.1.1.3 misho 3369: 10.4.1 Defining Peer
3370: --------------------
1.1 misho 3371:
3372: -- BGP: neighbor PEER remote-as ASN
3373: Creates a new neighbor whose remote-as is ASN. PEER can be an
3374: IPv4 address or an IPv6 address.
3375: router bgp 1
3376: neighbor 10.0.0.1 remote-as 2
3377: In this case my router, in AS-1, is trying to peer with AS-2 at
3378: 10.0.0.1.
3379:
3380: This command must be the first command used when configuring a
3381: neighbor. If the remote-as is not specified, `bgpd' will complain
3382: like this:
3383: can't find neighbor 10.0.0.1
3384:
3385:
3386: File: quagga.info, Node: BGP Peer commands, Next: Peer filtering, Prev: Defining Peer, Up: BGP Peer
3387:
1.1.1.3 misho 3388: 10.4.2 BGP Peer commands
3389: ------------------------
1.1 misho 3390:
3391: In a `router bgp' clause there are neighbor specific configurations
3392: required.
3393:
3394: -- BGP: neighbor PEER shutdown
3395: -- BGP: no neighbor PEER shutdown
3396: Shutdown the peer. We can delete the neighbor's configuration by
3397: `no neighbor PEER remote-as AS-NUMBER' but all configuration of
3398: the neighbor will be deleted. When you want to preserve the
3399: configuration, but want to drop the BGP peer, use this syntax.
3400:
3401: -- BGP: neighbor PEER ebgp-multihop
3402: -- BGP: no neighbor PEER ebgp-multihop
3403:
3404: -- BGP: neighbor PEER description ...
3405: -- BGP: no neighbor PEER description ...
3406: Set description of the peer.
3407:
3408: -- BGP: neighbor PEER version VERSION
3409: Set up the neighbor's BGP version. VERSION can be 4, 4+ or 4-.
3410: BGP version 4 is the default value used for BGP peering. BGP
3411: version 4+ means that the neighbor supports Multiprotocol
3412: Extensions for BGP-4. BGP version 4- is similar but the neighbor
3413: speaks the old Internet-Draft revision 00's Multiprotocol
3414: Extensions for BGP-4. Some routing software is still using this
3415: version.
3416:
3417: -- BGP: neighbor PEER interface IFNAME
3418: -- BGP: no neighbor PEER interface IFNAME
3419: When you connect to a BGP peer over an IPv6 link-local address, you
3420: have to specify the IFNAME of the interface used for the
3421: connection. To specify IPv4 session addresses, see the `neighbor
3422: PEER update-source' command below.
3423:
3424: This command is deprecated and may be removed in a future release.
3425: Its use should be avoided.
3426:
3427: -- BGP: neighbor PEER next-hop-self
3428: -- BGP: no neighbor PEER next-hop-self
3429: This command specifies an announced route's nexthop as being
3430: equivalent to the address of the bgp router.
3431:
3432: -- BGP: neighbor PEER update-source <IFNAME|ADDRESS>
3433: -- BGP: no neighbor PEER update-source
3434: Specify the IPv4 source address to use for the BGP session to this
3435: neighbour, may be specified as either an IPv4 address directly or
3436: as an interface name (in which case the `zebra' daemon MUST be
3437: running in order for `bgpd' to be able to retrieve interface
3438: state).
3439: router bgp 64555
3440: neighbor foo update-source 192.168.0.1
3441: neighbor bar update-source lo0
3442:
3443: -- BGP: neighbor PEER default-originate
3444: -- BGP: no neighbor PEER default-originate
3445: `bgpd''s default is to not announce the default route (0.0.0.0/0)
3446: even it is in routing table. When you want to announce default
3447: routes to the peer, use this command.
3448:
3449: -- BGP: neighbor PEER port PORT
3450: -- BGP: neighbor PEER port PORT
3451:
3452: -- BGP: neighbor PEER send-community
3453: -- BGP: neighbor PEER send-community
3454:
3455: -- BGP: neighbor PEER weight WEIGHT
3456: -- BGP: no neighbor PEER weight WEIGHT
3457: This command specifies a default WEIGHT value for the neighbor's
3458: routes.
3459:
3460: -- BGP: neighbor PEER maximum-prefix NUMBER
3461: -- BGP: no neighbor PEER maximum-prefix NUMBER
3462:
1.1.1.4 ! misho 3463: -- BGP: neighbor PEER local-as AS-NUMBER
! 3464: -- BGP: neighbor PEER local-as AS-NUMBER no-prepend
! 3465: -- BGP: neighbor PEER local-as AS-NUMBER no-prepend replace-as
! 3466: -- BGP: no neighbor PEER local-as
! 3467: Specify an alternate AS for this BGP process when interacting with
! 3468: the specified peer. With no modifiers, the specified local-as is
! 3469: prepended to the received AS_PATH when receiving routing updates
! 3470: from the peer, and prepended to the outgoing AS_PATH (after the
! 3471: process local AS) when transmitting local routes to the peer.
! 3472:
! 3473: If the no-prepend attribute is specified, then the supplied
! 3474: local-as is not prepended to the received AS_PATH.
! 3475:
! 3476: If the replace-as attribute is specified, then only the supplied
! 3477: local-as is prepended to the AS_PATH when transmitting local-route
! 3478: updates to this peer.
! 3479:
! 3480: Note that replace-as can only be specified if no-prepend is.
! 3481:
! 3482: This command is only allowed for eBGP peers.
! 3483:
1.1 misho 3484:
3485: File: quagga.info, Node: Peer filtering, Prev: BGP Peer commands, Up: BGP Peer
3486:
1.1.1.3 misho 3487: 10.4.3 Peer filtering
3488: ---------------------
1.1 misho 3489:
3490: -- BGP: neighbor PEER distribute-list NAME [in|out]
3491: This command specifies a distribute-list for the peer. DIRECT is
3492: `in' or `out'.
3493:
3494: -- BGP command: neighbor PEER prefix-list NAME [in|out]
3495:
3496: -- BGP command: neighbor PEER filter-list NAME [in|out]
3497:
3498: -- BGP: neighbor PEER route-map NAME [in|out]
3499: Apply a route-map on the neighbor. DIRECT must be `in' or `out'.
3500:
3501:
3502: File: quagga.info, Node: BGP Peer Group, Next: BGP Address Family, Prev: BGP Peer, Up: BGP
3503:
1.1.1.3 misho 3504: 10.5 BGP Peer Group
3505: ===================
1.1 misho 3506:
3507: -- BGP: neighbor WORD peer-group
3508: This command defines a new peer group.
3509:
3510: -- BGP: neighbor PEER peer-group WORD
3511: This command bind specific peer to peer group WORD.
3512:
3513:
3514: File: quagga.info, Node: BGP Address Family, Next: Autonomous System, Prev: BGP Peer Group, Up: BGP
3515:
1.1.1.3 misho 3516: 10.6 BGP Address Family
3517: =======================
1.1 misho 3518:
3519:
3520: File: quagga.info, Node: Autonomous System, Next: BGP Communities Attribute, Prev: BGP Address Family, Up: BGP
3521:
1.1.1.3 misho 3522: 10.7 Autonomous System
3523: ======================
1.1 misho 3524:
3525: The AS (Autonomous System) number is one of the essential element of
3526: BGP. BGP is a distance vector routing protocol, and the AS-Path
3527: framework provides distance vector metric and loop detection to BGP.
3528: `RFC1930, Guidelines for creation, selection, and registration of an
3529: Autonomous System (AS)' provides some background on the concepts of an
3530: AS.
3531:
3532: The AS number is a two octet value, ranging in value from 1 to 65535.
3533: The AS numbers 64512 through 65535 are defined as private AS numbers.
3534: Private AS numbers must not to be advertised in the global Internet.
3535:
3536: * Menu:
3537:
3538: * AS Path Regular Expression::
3539: * Display BGP Routes by AS Path::
3540: * AS Path Access List::
3541: * Using AS Path in Route Map::
3542: * Private AS Numbers::
3543:
3544:
3545: File: quagga.info, Node: AS Path Regular Expression, Next: Display BGP Routes by AS Path, Up: Autonomous System
3546:
1.1.1.3 misho 3547: 10.7.1 AS Path Regular Expression
3548: ---------------------------------
1.1 misho 3549:
3550: AS path regular expression can be used for displaying BGP routes and AS
3551: path access list. AS path regular expression is based on `POSIX
3552: 1003.2' regular expressions. Following description is just a subset of
3553: `POSIX' regular expression. User can use full `POSIX' regular
3554: expression. Adding to that special character '_' is added for AS path
3555: regular expression.
3556:
3557: `.'
3558: Matches any single character.
3559:
3560: `*'
3561: Matches 0 or more occurrences of pattern.
3562:
3563: `+'
3564: Matches 1 or more occurrences of pattern.
3565:
3566: `?'
3567: Match 0 or 1 occurrences of pattern.
3568:
3569: `^'
3570: Matches the beginning of the line.
3571:
3572: `$'
3573: Matches the end of the line.
3574:
3575: `_'
3576: Character `_' has special meanings in AS path regular expression.
3577: It matches to space and comma , and AS set delimiter { and } and AS
3578: confederation delimiter `(' and `)'. And it also matches to the
3579: beginning of the line and the end of the line. So `_' can be used
3580: for AS value boundaries match. `show ip bgp regexp _7675_'
3581: matches to all of BGP routes which as AS number include 7675.
3582:
3583:
3584: File: quagga.info, Node: Display BGP Routes by AS Path, Next: AS Path Access List, Prev: AS Path Regular Expression, Up: Autonomous System
3585:
1.1.1.3 misho 3586: 10.7.2 Display BGP Routes by AS Path
3587: ------------------------------------
1.1 misho 3588:
3589: To show BGP routes which has specific AS path information `show ip bgp'
3590: command can be used.
3591:
3592: -- Command: show ip bgp regexp LINE
3593: This commands display BGP routes that matches AS path regular
3594: expression LINE.
3595:
3596:
3597: File: quagga.info, Node: AS Path Access List, Next: Using AS Path in Route Map, Prev: Display BGP Routes by AS Path, Up: Autonomous System
3598:
1.1.1.3 misho 3599: 10.7.3 AS Path Access List
3600: --------------------------
1.1 misho 3601:
3602: AS path access list is user defined AS path.
3603:
3604: -- Command: ip as-path access-list WORD {permit|deny} LINE
3605: This command defines a new AS path access list.
3606:
3607: -- Command: no ip as-path access-list WORD
3608: -- Command: no ip as-path access-list WORD {permit|deny} LINE
3609:
3610:
3611: File: quagga.info, Node: Using AS Path in Route Map, Next: Private AS Numbers, Prev: AS Path Access List, Up: Autonomous System
3612:
1.1.1.3 misho 3613: 10.7.4 Using AS Path in Route Map
3614: ---------------------------------
1.1 misho 3615:
3616: -- Route Map: match as-path WORD
3617:
3618: -- Route Map: set as-path prepend AS-PATH
3619:
3620:
3621: File: quagga.info, Node: Private AS Numbers, Prev: Using AS Path in Route Map, Up: Autonomous System
3622:
1.1.1.3 misho 3623: 10.7.5 Private AS Numbers
3624: -------------------------
1.1 misho 3625:
3626:
3627: File: quagga.info, Node: BGP Communities Attribute, Next: BGP Extended Communities Attribute, Prev: Autonomous System, Up: BGP
3628:
1.1.1.3 misho 3629: 10.8 BGP Communities Attribute
3630: ==============================
1.1 misho 3631:
3632: BGP communities attribute is widely used for implementing policy
3633: routing. Network operators can manipulate BGP communities attribute
3634: based on their network policy. BGP communities attribute is defined in
3635: `RFC1997, BGP Communities Attribute' and `RFC1998, An Application of
3636: the BGP Community Attribute in Multi-home Routing'. It is an optional
3637: transitive attribute, therefore local policy can travel through
3638: different autonomous system.
3639:
3640: Communities attribute is a set of communities values. Each
3641: communities value is 4 octet long. The following format is used to
3642: define communities value.
3643:
3644: `AS:VAL'
3645: This format represents 4 octet communities value. `AS' is high
3646: order 2 octet in digit format. `VAL' is low order 2 octet in
3647: digit format. This format is useful to define AS oriented policy
3648: value. For example, `7675:80' can be used when AS 7675 wants to
3649: pass local policy value 80 to neighboring peer.
3650:
3651: `internet'
3652: `internet' represents well-known communities value 0.
3653:
3654: `no-export'
3655: `no-export' represents well-known communities value `NO_EXPORT'
3656: (0xFFFFFF01). All routes carry this value must not be advertised
3657: to outside a BGP confederation boundary. If neighboring BGP peer
3658: is part of BGP confederation, the peer is considered as inside a
3659: BGP confederation boundary, so the route will be announced to the
3660: peer.
3661:
3662: `no-advertise'
3663: `no-advertise' represents well-known communities value
3664: `NO_ADVERTISE'
3665: (0xFFFFFF02). All routes carry this value must not be advertise
3666: to other BGP peers.
3667:
3668: `local-AS'
3669: `local-AS' represents well-known communities value
3670: `NO_EXPORT_SUBCONFED' (0xFFFFFF03). All routes carry this value
3671: must not be advertised to external BGP peers. Even if the
3672: neighboring router is part of confederation, it is considered as
3673: external BGP peer, so the route will not be announced to the peer.
3674:
3675: When BGP communities attribute is received, duplicated communities
3676: value in the communities attribute is ignored and each communities
3677: values are sorted in numerical order.
3678:
3679: * Menu:
3680:
3681: * BGP Community Lists::
3682: * Numbered BGP Community Lists::
3683: * BGP Community in Route Map::
3684: * Display BGP Routes by Community::
3685: * Using BGP Communities Attribute::
3686:
3687:
3688: File: quagga.info, Node: BGP Community Lists, Next: Numbered BGP Community Lists, Up: BGP Communities Attribute
3689:
1.1.1.3 misho 3690: 10.8.1 BGP Community Lists
3691: --------------------------
1.1 misho 3692:
3693: BGP community list is a user defined BGP communites attribute list.
3694: BGP community list can be used for matching or manipulating BGP
3695: communities attribute in updates.
3696:
3697: There are two types of community list. One is standard community
3698: list and another is expanded community list. Standard community list
3699: defines communities attribute. Expanded community list defines
3700: communities attribute string with regular expression. Standard
3701: community list is compiled into binary format when user define it.
3702: Standard community list will be directly compared to BGP communities
3703: attribute in BGP updates. Therefore the comparison is faster than
3704: expanded community list.
3705:
3706: -- Command: ip community-list standard NAME {permit|deny} COMMUNITY
3707: This command defines a new standard community list. COMMUNITY is
3708: communities value. The COMMUNITY is compiled into community
3709: structure. We can define multiple community list under same name.
3710: In that case match will happen user defined order. Once the
3711: community list matches to communities attribute in BGP updates it
3712: return permit or deny by the community list definition. When
3713: there is no matched entry, deny will be returned. When COMMUNITY
3714: is empty it matches to any routes.
3715:
3716: -- Command: ip community-list expanded NAME {permit|deny} LINE
3717: This command defines a new expanded community list. LINE is a
3718: string expression of communities attribute. LINE can include
3719: regular expression to match communities attribute in BGP updates.
3720:
3721: -- Command: no ip community-list NAME
3722: -- Command: no ip community-list standard NAME
3723: -- Command: no ip community-list expanded NAME
3724: These commands delete community lists specified by NAME. All of
3725: community lists shares a single name space. So community lists
3726: can be removed simpley specifying community lists name.
3727:
3728: -- Command: show ip community-list
3729: -- Command: show ip community-list NAME
3730: This command display current community list information. When
3731: NAME is specified the specified community list's information is
3732: shown.
3733:
3734: # show ip community-list
3735: Named Community standard list CLIST
3736: permit 7675:80 7675:100 no-export
3737: deny internet
3738: Named Community expanded list EXPAND
3739: permit :
3740:
3741: # show ip community-list CLIST
3742: Named Community standard list CLIST
3743: permit 7675:80 7675:100 no-export
3744: deny internet
3745:
3746:
3747: File: quagga.info, Node: Numbered BGP Community Lists, Next: BGP Community in Route Map, Prev: BGP Community Lists, Up: BGP Communities Attribute
3748:
1.1.1.3 misho 3749: 10.8.2 Numbered BGP Community Lists
3750: -----------------------------------
1.1 misho 3751:
3752: When number is used for BGP community list name, the number has special
3753: meanings. Community list number in the range from 1 and 99 is standard
3754: community list. Community list number in the range from 100 to 199 is
3755: expanded community list. These community lists are called as numbered
3756: community lists. On the other hand normal community lists is called as
3757: named community lists.
3758:
3759: -- Command: ip community-list <1-99> {permit|deny} COMMUNITY
3760: This command defines a new community list. <1-99> is standard
3761: community list number. Community list name within this range
3762: defines standard community list. When COMMUNITY is empty it
3763: matches to any routes.
3764:
3765: -- Command: ip community-list <100-199> {permit|deny} COMMUNITY
3766: This command defines a new community list. <100-199> is expanded
3767: community list number. Community list name within this range
3768: defines expanded community list.
3769:
3770: -- Command: ip community-list NAME {permit|deny} COMMUNITY
3771: When community list type is not specifed, the community list type
3772: is automatically detected. If COMMUNITY can be compiled into
3773: communities attribute, the community list is defined as a standard
3774: community list. Otherwise it is defined as an expanded community
3775: list. This feature is left for backward compability. Use of this
3776: feature is not recommended.
3777:
3778:
3779: File: quagga.info, Node: BGP Community in Route Map, Next: Display BGP Routes by Community, Prev: Numbered BGP Community Lists, Up: BGP Communities Attribute
3780:
1.1.1.3 misho 3781: 10.8.3 BGP Community in Route Map
3782: ---------------------------------
1.1 misho 3783:
3784: In Route Map (*note Route Map::), we can match or set BGP communities
3785: attribute. Using this feature network operator can implement their
3786: network policy based on BGP communities attribute.
3787:
3788: Following commands can be used in Route Map.
3789:
3790: -- Route Map: match community WORD
3791: -- Route Map: match community WORD exact-match
3792: This command perform match to BGP updates using community list
3793: WORD. When the one of BGP communities value match to the one of
3794: communities value in community list, it is match. When
3795: `exact-match' keyword is spcified, match happen only when BGP
3796: updates have completely same communities value specified in the
3797: community list.
3798:
3799: -- Route Map: set community none
3800: -- Route Map: set community COMMUNITY
3801: -- Route Map: set community COMMUNITY additive
3802: This command manipulate communities value in BGP updates. When
3803: `none' is specified as communities value, it removes entire
3804: communities attribute from BGP updates. When COMMUNITY is not
3805: `none', specified communities value is set to BGP updates. If BGP
3806: updates already has BGP communities value, the existing BGP
3807: communities value is replaced with specified COMMUNITY value.
3808: When `additive' keyword is specified, COMMUNITY is appended to the
3809: existing communities value.
3810:
3811: -- Route Map: set comm-list WORD delete
3812: This command remove communities value from BGP communities
3813: attribute. The WORD is community list name. When BGP route's
3814: communities value matches to the community list WORD, the
3815: communities value is removed. When all of communities value is
3816: removed eventually, the BGP update's communities attribute is
3817: completely removed.
3818:
3819:
3820: File: quagga.info, Node: Display BGP Routes by Community, Next: Using BGP Communities Attribute, Prev: BGP Community in Route Map, Up: BGP Communities Attribute
3821:
1.1.1.3 misho 3822: 10.8.4 Display BGP Routes by Community
3823: --------------------------------------
1.1 misho 3824:
3825: To show BGP routes which has specific BGP communities attribute, `show
3826: ip bgp' command can be used. The COMMUNITY value and community list
3827: can be used for `show ip bgp' command.
3828:
3829: -- Command: show ip bgp community
3830: -- Command: show ip bgp community COMMUNITY
3831: -- Command: show ip bgp community COMMUNITY exact-match
3832: `show ip bgp community' displays BGP routes which has communities
3833: attribute. When COMMUNITY is specified, BGP routes that matches
3834: COMMUNITY value is displayed. For this command, `internet'
3835: keyword can't be used for COMMUNITY value. When `exact-match' is
3836: specified, it display only routes that have an exact match.
3837:
3838: -- Command: show ip bgp community-list WORD
3839: -- Command: show ip bgp community-list WORD exact-match
3840: This commands display BGP routes that matches community list WORD.
3841: When `exact-match' is specified, display only routes that have an
3842: exact match.
3843:
3844:
3845: File: quagga.info, Node: Using BGP Communities Attribute, Prev: Display BGP Routes by Community, Up: BGP Communities Attribute
3846:
1.1.1.3 misho 3847: 10.8.5 Using BGP Communities Attribute
3848: --------------------------------------
1.1 misho 3849:
3850: Following configuration is the most typical usage of BGP communities
3851: attribute. AS 7675 provides upstream Internet connection to AS 100.
3852: When following configuration exists in AS 7675, AS 100 networks
3853: operator can set local preference in AS 7675 network by setting BGP
3854: communities attribute to the updates.
3855:
3856: router bgp 7675
3857: neighbor 192.168.0.1 remote-as 100
3858: neighbor 192.168.0.1 route-map RMAP in
3859: !
3860: ip community-list 70 permit 7675:70
3861: ip community-list 70 deny
3862: ip community-list 80 permit 7675:80
3863: ip community-list 80 deny
3864: ip community-list 90 permit 7675:90
3865: ip community-list 90 deny
3866: !
3867: route-map RMAP permit 10
3868: match community 70
3869: set local-preference 70
3870: !
3871: route-map RMAP permit 20
3872: match community 80
3873: set local-preference 80
3874: !
3875: route-map RMAP permit 30
3876: match community 90
3877: set local-preference 90
3878:
3879: Following configuration announce 10.0.0.0/8 from AS 100 to AS 7675.
3880: The route has communities value 7675:80 so when above configuration
3881: exists in AS 7675, announced route's local preference will be set to
3882: value 80.
3883:
3884: router bgp 100
3885: network 10.0.0.0/8
3886: neighbor 192.168.0.2 remote-as 7675
3887: neighbor 192.168.0.2 route-map RMAP out
3888: !
3889: ip prefix-list PLIST permit 10.0.0.0/8
3890: !
3891: route-map RMAP permit 10
3892: match ip address prefix-list PLIST
3893: set community 7675:80
3894:
3895: Following configuration is an example of BGP route filtering using
3896: communities attribute. This configuration only permit BGP routes which
3897: has BGP communities value 0:80 or 0:90. Network operator can put
3898: special internal communities value at BGP border router, then limit the
3899: BGP routes announcement into the internal network.
3900:
3901: router bgp 7675
3902: neighbor 192.168.0.1 remote-as 100
3903: neighbor 192.168.0.1 route-map RMAP in
3904: !
3905: ip community-list 1 permit 0:80 0:90
3906: !
3907: route-map RMAP permit in
3908: match community 1
3909:
3910: Following exmaple filter BGP routes which has communities value 1:1.
3911: When there is no match community-list returns deny. To avoid filtering
3912: all of routes, we need to define permit any at last.
3913:
3914: router bgp 7675
3915: neighbor 192.168.0.1 remote-as 100
3916: neighbor 192.168.0.1 route-map RMAP in
3917: !
3918: ip community-list standard FILTER deny 1:1
3919: ip community-list standard FILTER permit
3920: !
3921: route-map RMAP permit 10
3922: match community FILTER
3923:
3924: Communities value keyword `internet' has special meanings in
3925: standard community lists. In below example `internet' act as match
3926: any. It matches all of BGP routes even if the route does not have
3927: communities attribute at all. So community list `INTERNET' is same as
3928: above example's `FILTER'.
3929:
3930: ip community-list standard INTERNET deny 1:1
3931: ip community-list standard INTERNET permit internet
3932:
3933: Following configuration is an example of communities value deletion.
3934: With this configuration communities value 100:1 and 100:2 is removed
3935: from BGP updates. For communities value deletion, only `permit'
3936: community-list is used. `deny' community-list is ignored.
3937:
3938: router bgp 7675
3939: neighbor 192.168.0.1 remote-as 100
3940: neighbor 192.168.0.1 route-map RMAP in
3941: !
3942: ip community-list standard DEL permit 100:1 100:2
3943: !
3944: route-map RMAP permit 10
3945: set comm-list DEL delete
3946:
3947:
3948: File: quagga.info, Node: BGP Extended Communities Attribute, Next: Displaying BGP routes, Prev: BGP Communities Attribute, Up: BGP
3949:
1.1.1.3 misho 3950: 10.9 BGP Extended Communities Attribute
3951: =======================================
1.1 misho 3952:
3953: BGP extended communities attribute is introduced with MPLS VPN/BGP
3954: technology. MPLS VPN/BGP expands capability of network infrastructure
3955: to provide VPN functionality. At the same time it requires a new
3956: framework for policy routing. With BGP Extended Communities Attribute
3957: we can use Route Target or Site of Origin for implementing network
3958: policy for MPLS VPN/BGP.
3959:
3960: BGP Extended Communities Attribute is similar to BGP Communities
3961: Attribute. It is an optional transitive attribute. BGP Extended
3962: Communities Attribute can carry multiple Extended Community value.
3963: Each Extended Community value is eight octet length.
3964:
3965: BGP Extended Communities Attribute provides an extended range
3966: compared with BGP Communities Attribute. Adding to that there is a
3967: type field in each value to provides community space structure.
3968:
3969: There are two format to define Extended Community value. One is AS
3970: based format the other is IP address based format.
3971:
3972: `AS:VAL'
3973: This is a format to define AS based Extended Community value.
3974: `AS' part is 2 octets Global Administrator subfield in Extended
3975: Community value. `VAL' part is 4 octets Local Administrator
3976: subfield. `7675:100' represents AS 7675 policy value 100.
3977:
3978: `IP-Address:VAL'
3979: This is a format to define IP address based Extended Community
3980: value. `IP-Address' part is 4 octets Global Administrator
3981: subfield. `VAL' part is 2 octets Local Administrator subfield.
3982: `10.0.0.1:100' represents
3983:
3984: * Menu:
3985:
3986: * BGP Extended Community Lists::
3987: * BGP Extended Communities in Route Map::
3988:
3989:
3990: File: quagga.info, Node: BGP Extended Community Lists, Next: BGP Extended Communities in Route Map, Up: BGP Extended Communities Attribute
3991:
1.1.1.3 misho 3992: 10.9.1 BGP Extended Community Lists
3993: -----------------------------------
1.1 misho 3994:
3995: Expanded Community Lists is a user defined BGP Expanded Community Lists.
3996:
3997: -- Command: ip extcommunity-list standard NAME {permit|deny}
3998: EXTCOMMUNITY
3999: This command defines a new standard extcommunity-list.
4000: EXTCOMMUNITY is extended communities value. The EXTCOMMUNITY is
4001: compiled into extended community structure. We can define
4002: multiple extcommunity-list under same name. In that case match
4003: will happen user defined order. Once the extcommunity-list
4004: matches to extended communities attribute in BGP updates it return
4005: permit or deny based upon the extcommunity-list definition. When
4006: there is no matched entry, deny will be returned. When
4007: EXTCOMMUNITY is empty it matches to any routes.
4008:
4009: -- Command: ip extcommunity-list expanded NAME {permit|deny} LINE
4010: This command defines a new expanded extcommunity-list. LINE is a
4011: string expression of extended communities attribute. LINE can
4012: include regular expression to match extended communities attribute
4013: in BGP updates.
4014:
4015: -- Command: no ip extcommunity-list NAME
4016: -- Command: no ip extcommunity-list standard NAME
4017: -- Command: no ip extcommunity-list expanded NAME
4018: These commands delete extended community lists specified by NAME.
4019: All of extended community lists shares a single name space. So
4020: extended community lists can be removed simpley specifying the
4021: name.
4022:
4023: -- Command: show ip extcommunity-list
4024: -- Command: show ip extcommunity-list NAME
4025: This command display current extcommunity-list information. When
4026: NAME is specified the community list's information is shown.
4027:
4028: # show ip extcommunity-list
4029:
4030:
4031: File: quagga.info, Node: BGP Extended Communities in Route Map, Prev: BGP Extended Community Lists, Up: BGP Extended Communities Attribute
4032:
1.1.1.3 misho 4033: 10.9.2 BGP Extended Communities in Route Map
4034: --------------------------------------------
1.1 misho 4035:
4036: -- Route Map: match extcommunity WORD
4037:
4038: -- Route Map: set extcommunity rt EXTCOMMUNITY
4039: This command set Route Target value.
4040:
4041: -- Route Map: set extcommunity soo EXTCOMMUNITY
4042: This command set Site of Origin value.
4043:
4044:
4045: File: quagga.info, Node: Displaying BGP routes, Next: Capability Negotiation, Prev: BGP Extended Communities Attribute, Up: BGP
4046:
1.1.1.3 misho 4047: 10.10 Displaying BGP Routes
4048: ===========================
1.1 misho 4049:
4050: * Menu:
4051:
4052: * Show IP BGP::
4053: * More Show IP BGP::
4054:
4055:
4056: File: quagga.info, Node: Show IP BGP, Next: More Show IP BGP, Up: Displaying BGP routes
4057:
1.1.1.3 misho 4058: 10.10.1 Show IP BGP
4059: -------------------
1.1 misho 4060:
4061: -- Command: show ip bgp
4062: -- Command: show ip bgp A.B.C.D
4063: -- Command: show ip bgp X:X::X:X
4064: This command displays BGP routes. When no route is specified it
4065: display all of IPv4 BGP routes.
4066:
4067: BGP table version is 0, local router ID is 10.1.1.1
4068: Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
4069: Origin codes: i - IGP, e - EGP, ? - incomplete
4070:
4071: Network Next Hop Metric LocPrf Weight Path
4072: *> 1.1.1.1/32 0.0.0.0 0 32768 i
4073:
4074: Total number of prefixes 1
4075:
4076:
4077: File: quagga.info, Node: More Show IP BGP, Prev: Show IP BGP, Up: Displaying BGP routes
4078:
1.1.1.3 misho 4079: 10.10.2 More Show IP BGP
4080: ------------------------
1.1 misho 4081:
4082: -- Command: show ip bgp regexp LINE
4083: This command display BGP routes using AS path regular expression
4084: (*note Display BGP Routes by AS Path::).
4085:
4086: -- Command: show ip bgp community COMMUNITY
4087: -- Command: show ip bgp community COMMUNITY exact-match
4088: This command display BGP routes using COMMUNITY (*note Display BGP
4089: Routes by Community::).
4090:
4091: -- Command: show ip bgp community-list WORD
4092: -- Command: show ip bgp community-list WORD exact-match
4093: This command display BGP routes using community list (*note
4094: Display BGP Routes by Community::).
4095:
4096: -- Command: show ip bgp summary
4097:
4098: -- Command: show ip bgp neighbor [PEER]
4099:
4100: -- Command: clear ip bgp PEER
4101: Clear peers which have addresses of X.X.X.X
4102:
4103: -- Command: clear ip bgp PEER soft in
4104: Clear peer using soft reconfiguration.
4105:
4106: -- Command: show ip bgp dampened-paths
4107: Display paths suppressed due to dampening
4108:
4109: -- Command: show ip bgp flap-statistics
4110: Display flap statistics of routes
4111:
4112: -- Command: show debug
4113:
4114: -- Command: debug event
4115:
4116: -- Command: debug update
4117:
4118: -- Command: debug keepalive
4119:
4120: -- Command: no debug event
4121:
4122: -- Command: no debug update
4123:
4124: -- Command: no debug keepalive
4125:
4126:
4127: File: quagga.info, Node: Capability Negotiation, Next: Route Reflector, Prev: Displaying BGP routes, Up: BGP
4128:
1.1.1.3 misho 4129: 10.11 Capability Negotiation
4130: ============================
1.1 misho 4131:
4132: When adding IPv6 routing information exchange feature to BGP. There
4133: were some proposals. IETF (Internet Engineering Task Force) IDR (Inter
4134: Domain Routing) WG (Working group) adopted a proposal called
4135: Multiprotocol Extension for BGP. The specification is described in
4136: `RFC2283'. The protocol does not define new protocols. It defines new
4137: attributes to existing BGP. When it is used exchanging IPv6 routing
4138: information it is called BGP-4+. When it is used for exchanging
4139: multicast routing information it is called MBGP.
4140:
4141: `bgpd' supports Multiprotocol Extension for BGP. So if remote peer
4142: supports the protocol, `bgpd' can exchange IPv6 and/or multicast
4143: routing information.
4144:
4145: Traditional BGP did not have the feature to detect remote peer's
4146: capabilities, e.g. whether it can handle prefix types other than IPv4
4147: unicast routes. This was a big problem using Multiprotocol Extension
4148: for BGP to operational network. `RFC2842, Capabilities Advertisement
4149: with BGP-4' adopted a feature called Capability Negotiation. `bgpd' use
4150: this Capability Negotiation to detect the remote peer's capabilities.
4151: If the peer is only configured as IPv4 unicast neighbor, `bgpd' does
4152: not send these Capability Negotiation packets (at least not unless
4153: other optional BGP features require capability negotation).
4154:
4155: By default, Quagga will bring up peering with minimal common
4156: capability for the both sides. For example, local router has unicast
4157: and multicast capabilitie and remote router has unicast capability. In
4158: this case, the local router will establish the connection with unicast
4159: only capability. When there are no common capabilities, Quagga sends
4160: Unsupported Capability error and then resets the connection.
4161:
4162: If you want to completely match capabilities with remote peer.
4163: Please use `strict-capability-match' command.
4164:
4165: -- BGP: neighbor PEER strict-capability-match
4166: -- BGP: no neighbor PEER strict-capability-match
4167: Strictly compares remote capabilities and local capabilities. If
4168: capabilities are different, send Unsupported Capability error then
4169: reset connection.
4170:
4171: You may want to disable sending Capability Negotiation OPEN message
4172: optional parameter to the peer when remote peer does not implement
4173: Capability Negotiation. Please use `dont-capability-negotiate' command
4174: to disable the feature.
4175:
4176: -- BGP: neighbor PEER dont-capability-negotiate
4177: -- BGP: no neighbor PEER dont-capability-negotiate
4178: Suppress sending Capability Negotiation as OPEN message optional
4179: parameter to the peer. This command only affects the peer is
4180: configured other than IPv4 unicast configuration.
4181:
4182: When remote peer does not have capability negotiation feature, remote
4183: peer will not send any capabilities at all. In that case, bgp
4184: configures the peer with configured capabilities.
4185:
4186: You may prefer locally configured capabilities more than the
4187: negotiated capabilities even though remote peer sends capabilities. If
4188: the peer is configured by `override-capability', `bgpd' ignores
4189: received capabilities then override negotiated capabilities with
4190: configured values.
4191:
4192: -- BGP: neighbor PEER override-capability
4193: -- BGP: no neighbor PEER override-capability
4194: Override the result of Capability Negotiation with local
4195: configuration. Ignore remote peer's capability value.
4196:
4197:
4198: File: quagga.info, Node: Route Reflector, Next: Route Server, Prev: Capability Negotiation, Up: BGP
4199:
1.1.1.3 misho 4200: 10.12 Route Reflector
4201: =====================
1.1 misho 4202:
4203: -- BGP: bgp cluster-id A.B.C.D
4204:
4205: -- BGP: neighbor PEER route-reflector-client
4206: -- BGP: no neighbor PEER route-reflector-client
4207:
4208:
4209: File: quagga.info, Node: Route Server, Next: How to set up a 6-Bone connection, Prev: Route Reflector, Up: BGP
4210:
1.1.1.3 misho 4211: 10.13 Route Server
4212: ==================
1.1 misho 4213:
4214: At an Internet Exchange point, many ISPs are connected to each other by
4215: external BGP peering. Normally these external BGP connection are done
4216: by `full mesh' method. As with internal BGP full mesh formation, this
4217: method has a scaling problem.
4218:
4219: This scaling problem is well known. Route Server is a method to
4220: resolve the problem. Each ISP's BGP router only peers to Route Server.
4221: Route Server serves as BGP information exchange to other BGP routers.
4222: By applying this method, numbers of BGP connections is reduced from
4223: O(n*(n-1)/2) to O(n).
4224:
4225: Unlike normal BGP router, Route Server must have several routing
4226: tables for managing different routing policies for each BGP speaker.
4227: We call the routing tables as different `view's. `bgpd' can work as
4228: normal BGP router or Route Server or both at the same time.
4229:
4230: * Menu:
4231:
4232: * Multiple instance::
4233: * BGP instance and view::
4234: * Routing policy::
4235: * Viewing the view::
4236:
4237:
4238: File: quagga.info, Node: Multiple instance, Next: BGP instance and view, Up: Route Server
4239:
1.1.1.3 misho 4240: 10.13.1 Multiple instance
4241: -------------------------
1.1 misho 4242:
4243: To enable multiple view function of `bgpd', you must turn on multiple
4244: instance feature beforehand.
4245:
4246: -- Command: bgp multiple-instance
4247: Enable BGP multiple instance feature. After this feature is
4248: enabled, you can make multiple BGP instances or multiple BGP views.
4249:
4250: -- Command: no bgp multiple-instance
4251: Disable BGP multiple instance feature. You can not disable this
4252: feature when BGP multiple instances or views exist.
4253:
4254: When you want to make configuration more Cisco like one,
4255:
4256: -- Command: bgp config-type cisco
4257: Cisco compatible BGP configuration output.
4258:
4259: When bgp config-type cisco is specified,
4260:
4261: "no synchronization" is displayed. "no auto-summary" is displayed.
4262:
4263: "network" and "aggregate-address" argument is displayed as "A.B.C.D
4264: M.M.M.M"
4265:
4266: Quagga: network 10.0.0.0/8 Cisco: network 10.0.0.0
4267:
4268: Quagga: aggregate-address 192.168.0.0/24 Cisco: aggregate-address
4269: 192.168.0.0 255.255.255.0
4270:
4271: Community attribute handling is also different. If there is no
4272: configuration is specified community attribute and extended community
4273: attribute are sent to neighbor. When user manually disable the feature
4274: community attribute is not sent to the neighbor. In case of `bgp
4275: config-type cisco' is specified, community attribute is not sent to the
4276: neighbor by default. To send community attribute user has to specify
4277: `neighbor A.B.C.D send-community' command.
4278:
4279: !
4280: router bgp 1
4281: neighbor 10.0.0.1 remote-as 1
4282: no neighbor 10.0.0.1 send-community
4283: !
4284: router bgp 1
4285: neighbor 10.0.0.1 remote-as 1
4286: neighbor 10.0.0.1 send-community
4287: !
4288:
4289: -- Command: bgp config-type zebra
4290: Quagga style BGP configuration. This is default.
4291:
4292:
4293: File: quagga.info, Node: BGP instance and view, Next: Routing policy, Prev: Multiple instance, Up: Route Server
4294:
1.1.1.3 misho 4295: 10.13.2 BGP instance and view
4296: -----------------------------
1.1 misho 4297:
4298: BGP instance is a normal BGP process. The result of route selection
4299: goes to the kernel routing table. You can setup different AS at the
4300: same time when BGP multiple instance feature is enabled.
4301:
4302: -- Command: router bgp AS-NUMBER
4303: Make a new BGP instance. You can use arbitrary word for the NAME.
4304:
4305: bgp multiple-instance
4306: !
4307: router bgp 1
4308: neighbor 10.0.0.1 remote-as 2
4309: neighbor 10.0.0.2 remote-as 3
4310: !
4311: router bgp 2
4312: neighbor 10.0.0.3 remote-as 4
4313: neighbor 10.0.0.4 remote-as 5
4314:
4315: BGP view is almost same as normal BGP process. The result of route
4316: selection does not go to the kernel routing table. BGP view is only
4317: for exchanging BGP routing information.
4318:
4319: -- Command: router bgp AS-NUMBER view NAME
4320: Make a new BGP view. You can use arbitrary word for the NAME.
4321: This view's route selection result does not go to the kernel
4322: routing table.
4323:
4324: With this command, you can setup Route Server like below.
4325:
4326: bgp multiple-instance
4327: !
4328: router bgp 1 view 1
4329: neighbor 10.0.0.1 remote-as 2
4330: neighbor 10.0.0.2 remote-as 3
4331: !
4332: router bgp 2 view 2
4333: neighbor 10.0.0.3 remote-as 4
4334: neighbor 10.0.0.4 remote-as 5
4335:
4336:
4337: File: quagga.info, Node: Routing policy, Next: Viewing the view, Prev: BGP instance and view, Up: Route Server
4338:
1.1.1.3 misho 4339: 10.13.3 Routing policy
4340: ----------------------
1.1 misho 4341:
4342: You can set different routing policy for a peer. For example, you can
4343: set different filter for a peer.
4344:
4345: bgp multiple-instance
4346: !
4347: router bgp 1 view 1
4348: neighbor 10.0.0.1 remote-as 2
4349: neighbor 10.0.0.1 distribute-list 1 in
4350: !
4351: router bgp 1 view 2
4352: neighbor 10.0.0.1 remote-as 2
4353: neighbor 10.0.0.1 distribute-list 2 in
4354:
4355: This means BGP update from a peer 10.0.0.1 goes to both BGP view 1
4356: and view 2. When the update is inserted into view 1, distribute-list 1
4357: is applied. On the other hand, when the update is inserted into view 2,
4358: distribute-list 2 is applied.
4359:
4360:
4361: File: quagga.info, Node: Viewing the view, Prev: Routing policy, Up: Route Server
4362:
1.1.1.3 misho 4363: 10.13.4 Viewing the view
4364: ------------------------
1.1 misho 4365:
4366: To display routing table of BGP view, you must specify view name.
4367:
4368: -- Command: show ip bgp view NAME
4369: Display routing table of BGP view NAME.
4370:
4371:
4372: File: quagga.info, Node: How to set up a 6-Bone connection, Next: Dump BGP packets and table, Prev: Route Server, Up: BGP
4373:
1.1.1.3 misho 4374: 10.14 How to set up a 6-Bone connection
4375: =======================================
1.1 misho 4376:
4377: zebra configuration
4378: ===================
4379: !
4380: ! Actually there is no need to configure zebra
4381: !
4382:
4383: bgpd configuration
4384: ==================
4385: !
4386: ! This means that routes go through zebra and into the kernel.
4387: !
4388: router zebra
4389: !
4390: ! MP-BGP configuration
4391: !
4392: router bgp 7675
4393: bgp router-id 10.0.0.1
4394: neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 remote-as AS-NUMBER
4395: !
4396: address-family ipv6
4397: network 3ffe:506::/32
4398: neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 activate
4399: neighbor 3ffe:1cfa:0:2:2a0:c9ff:fe9e:f56 route-map set-nexthop out
4400: neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 remote-as AS-NUMBER
4401: neighbor 3ffe:1cfa:0:2:2c0:4fff:fe68:a231 route-map set-nexthop out
4402: exit-address-family
4403: !
4404: ipv6 access-list all permit any
4405: !
4406: ! Set output nexthop address.
4407: !
4408: route-map set-nexthop permit 10
4409: match ipv6 address all
4410: set ipv6 nexthop global 3ffe:1cfa:0:2:2c0:4fff:fe68:a225
4411: set ipv6 nexthop local fe80::2c0:4fff:fe68:a225
4412: !
4413: ! logfile FILENAME is obsolete. Please use log file FILENAME
4414:
4415: log file bgpd.log
4416: !
4417:
4418:
4419: File: quagga.info, Node: Dump BGP packets and table, Next: BGP Configuration Examples, Prev: How to set up a 6-Bone connection, Up: BGP
4420:
1.1.1.3 misho 4421: 10.15 Dump BGP packets and table
4422: ================================
1.1 misho 4423:
4424: -- Command: dump bgp all PATH
4425: -- Command: dump bgp all PATH INTERVAL
4426: Dump all BGP packet and events to PATH file.
4427:
4428: -- Command: dump bgp updates PATH
4429: -- Command: dump bgp updates PATH INTERVAL
4430: Dump BGP updates to PATH file.
4431:
4432: -- Command: dump bgp routes PATH
4433: -- Command: dump bgp routes PATH
4434: Dump whole BGP routing table to PATH. This is heavy process.
4435:
4436:
4437: File: quagga.info, Node: BGP Configuration Examples, Prev: Dump BGP packets and table, Up: BGP
4438:
1.1.1.3 misho 4439: 10.16 BGP Configuration Examples
4440: ================================
1.1 misho 4441:
4442: Example of a session to an upstream, advertising only one prefix to it.
4443:
4444: router bgp 64512
4445: bgp router-id 10.236.87.1
4446: network 10.236.87.0/24
4447: neighbor upstream peer-group
4448: neighbor upstream remote-as 64515
4449: neighbor upstream capability dynamic
4450: neighbor upstream prefix-list pl-allowed-adv out
4451: neighbor 10.1.1.1 peer-group upstream
4452: neighbor 10.1.1.1 description ACME ISP
4453: !
4454: ip prefix-list pl-allowed-adv seq 5 permit 82.195.133.0/25
4455: ip prefix-list pl-allowed-adv seq 10 deny any
4456:
4457: A more complex example. With upstream, peer and customer sessions.
4458: Advertising global prefixes and NO_EXPORT prefixes and providing
4459: actions for customer routes based on community values. Extensive use of
4460: route-maps and the 'call' feature to support selective advertising of
4461: prefixes. This example is intended as guidance only, it has NOT been
4462: tested and almost certainly containts silly mistakes, if not serious
4463: flaws.
4464:
4465: router bgp 64512
4466: bgp router-id 10.236.87.1
4467: network 10.123.456.0/24
4468: network 10.123.456.128/25 route-map rm-no-export
4469: neighbor upstream capability dynamic
4470: neighbor upstream route-map rm-upstream-out out
4471: neighbor cust capability dynamic
4472: neighbor cust route-map rm-cust-in in
4473: neighbor cust route-map rm-cust-out out
4474: neighbor cust send-community both
4475: neighbor peer capability dynamic
4476: neighbor peer route-map rm-peer-in in
4477: neighbor peer route-map rm-peer-out out
4478: neighbor peer send-community both
4479: neighbor 10.1.1.1 remote-as 64515
4480: neighbor 10.1.1.1 peer-group upstream
4481: neighbor 10.2.1.1 remote-as 64516
4482: neighbor 10.2.1.1 peer-group upstream
4483: neighbor 10.3.1.1 remote-as 64517
4484: neighbor 10.3.1.1 peer-group cust-default
4485: neighbor 10.3.1.1 description customer1
4486: neighbor 10.3.1.1 prefix-list pl-cust1-network in
4487: neighbor 10.4.1.1 remote-as 64518
4488: neighbor 10.4.1.1 peer-group cust
4489: neighbor 10.4.1.1 prefix-list pl-cust2-network in
4490: neighbor 10.4.1.1 description customer2
4491: neighbor 10.5.1.1 remote-as 64519
4492: neighbor 10.5.1.1 peer-group peer
4493: neighbor 10.5.1.1 prefix-list pl-peer1-network in
4494: neighbor 10.5.1.1 description peer AS 1
4495: neighbor 10.6.1.1 remote-as 64520
4496: neighbor 10.6.1.1 peer-group peer
4497: neighbor 10.6.1.1 prefix-list pl-peer2-network in
4498: neighbor 10.6.1.1 description peer AS 2
4499: !
4500: ip prefix-list pl-default permit 0.0.0.0/0
4501: !
4502: ip prefix-list pl-upstream-peers permit 10.1.1.1/32
4503: ip prefix-list pl-upstream-peers permit 10.2.1.1/32
4504: !
4505: ip prefix-list pl-cust1-network permit 10.3.1.0/24
4506: ip prefix-list pl-cust1-network permit 10.3.2.0/24
4507: !
4508: ip prefix-list pl-cust2-network permit 10.4.1.0/24
4509: !
4510: ip prefix-list pl-peer1-network permit 10.5.1.0/24
4511: ip prefix-list pl-peer1-network permit 10.5.2.0/24
4512: ip prefix-list pl-peer1-network permit 192.168.0.0/24
4513: !
4514: ip prefix-list pl-peer2-network permit 10.6.1.0/24
4515: ip prefix-list pl-peer2-network permit 10.6.2.0/24
4516: ip prefix-list pl-peer2-network permit 192.168.1.0/24
4517: ip prefix-list pl-peer2-network permit 192.168.2.0/24
4518: ip prefix-list pl-peer2-network permit 172.16.1/24
4519: !
4520: ip as-path access-list asp-own-as permit ^$
4521: ip as-path access-list asp-own-as permit _64512_
4522: !
4523: ! #################################################################
4524: ! Match communities we provide actions for, on routes receives from
4525: ! customers. Communities values of <our-ASN>:X, with X, have actions:
4526: !
4527: ! 100 - blackhole the prefix
4528: ! 200 - set no_export
4529: ! 300 - advertise only to other customers
4530: ! 400 - advertise only to upstreams
4531: ! 500 - set no_export when advertising to upstreams
4532: ! 2X00 - set local_preference to X00
4533: !
4534: ! blackhole the prefix of the route
4535: ip community-list standard cm-blackhole permit 64512:100
4536: !
4537: ! set no-export community before advertising
4538: ip community-list standard cm-set-no-export permit 64512:200
4539: !
4540: ! advertise only to other customers
4541: ip community-list standard cm-cust-only permit 64512:300
4542: !
4543: ! advertise only to upstreams
4544: ip community-list standard cm-upstream-only permit 64512:400
4545: !
4546: ! advertise to upstreams with no-export
4547: ip community-list standard cm-upstream-noexport permit 64512:500
4548: !
4549: ! set local-pref to least significant 3 digits of the community
4550: ip community-list standard cm-prefmod-100 permit 64512:2100
4551: ip community-list standard cm-prefmod-200 permit 64512:2200
4552: ip community-list standard cm-prefmod-300 permit 64512:2300
4553: ip community-list standard cm-prefmod-400 permit 64512:2400
4554: ip community-list expanded cme-prefmod-range permit 64512:2...
4555: !
4556: ! Informational communities
4557: !
4558: ! 3000 - learned from upstream
4559: ! 3100 - learned from customer
4560: ! 3200 - learned from peer
4561: !
4562: ip community-list standard cm-learnt-upstream permit 64512:3000
4563: ip community-list standard cm-learnt-cust permit 64512:3100
4564: ip community-list standard cm-learnt-peer permit 64512:3200
4565: !
4566: ! ###################################################################
4567: ! Utility route-maps
4568: !
4569: ! These utility route-maps generally should not used to permit/deny
4570: ! routes, i.e. they do not have meaning as filters, and hence probably
4571: ! should be used with 'on-match next'. These all finish with an empty
4572: ! permit entry so as not interfere with processing in the caller.
4573: !
4574: route-map rm-no-export permit 10
4575: set community additive no-export
4576: route-map rm-no-export permit 20
4577: !
4578: route-map rm-blackhole permit 10
4579: description blackhole, up-pref and ensure it cant escape this AS
4580: set ip next-hop 127.0.0.1
4581: set local-preference 10
4582: set community additive no-export
4583: route-map rm-blackhole permit 20
4584: !
4585: ! Set local-pref as requested
4586: route-map rm-prefmod permit 10
4587: match community cm-prefmod-100
4588: set local-preference 100
4589: route-map rm-prefmod permit 20
4590: match community cm-prefmod-200
4591: set local-preference 200
4592: route-map rm-prefmod permit 30
4593: match community cm-prefmod-300
4594: set local-preference 300
4595: route-map rm-prefmod permit 40
4596: match community cm-prefmod-400
4597: set local-preference 400
4598: route-map rm-prefmod permit 50
4599: !
4600: ! Community actions to take on receipt of route.
4601: route-map rm-community-in permit 10
4602: description check for blackholing, no point continuing if it matches.
4603: match community cm-blackhole
4604: call rm-blackhole
4605: route-map rm-community-in permit 20
4606: match community cm-set-no-export
4607: call rm-no-export
4608: on-match next
4609: route-map rm-community-in permit 30
4610: match community cme-prefmod-range
4611: call rm-prefmod
4612: route-map rm-community-in permit 40
4613: !
4614: ! #####################################################################
4615: ! Community actions to take when advertising a route.
4616: ! These are filtering route-maps,
4617: !
4618: ! Deny customer routes to upstream with cust-only set.
4619: route-map rm-community-filt-to-upstream deny 10
4620: match community cm-learnt-cust
4621: match community cm-cust-only
4622: route-map rm-community-filt-to-upstream permit 20
4623: !
4624: ! Deny customer routes to other customers with upstream-only set.
4625: route-map rm-community-filt-to-cust deny 10
4626: match community cm-learnt-cust
4627: match community cm-upstream-only
4628: route-map rm-community-filt-to-cust permit 20
4629: !
4630: ! ###################################################################
4631: ! The top-level route-maps applied to sessions. Further entries could
4632: ! be added obviously..
4633: !
4634: ! Customers
4635: route-map rm-cust-in permit 10
4636: call rm-community-in
4637: on-match next
4638: route-map rm-cust-in permit 20
4639: set community additive 64512:3100
4640: route-map rm-cust-in permit 30
4641: !
4642: route-map rm-cust-out permit 10
4643: call rm-community-filt-to-cust
4644: on-match next
4645: route-map rm-cust-out permit 20
4646: !
4647: ! Upstream transit ASes
4648: route-map rm-upstream-out permit 10
4649: description filter customer prefixes which are marked cust-only
4650: call rm-community-filt-to-upstream
4651: on-match next
4652: route-map rm-upstream-out permit 20
4653: description only customer routes are provided to upstreams/peers
4654: match community cm-learnt-cust
4655: !
4656: ! Peer ASes
4657: ! outbound policy is same as for upstream
4658: route-map rm-peer-out permit 10
4659: call rm-upstream-out
4660: !
4661: route-map rm-peer-in permit 10
4662: set community additive 64512:3200
4663:
4664:
4665: File: quagga.info, Node: Configuring Quagga as a Route Server, Next: VTY shell, Prev: BGP, Up: Top
4666:
1.1.1.3 misho 4667: 11 Configuring Quagga as a Route Server
1.1 misho 4668: ***************************************
4669:
4670: The purpose of a Route Server is to centralize the peerings between BGP
4671: speakers. For example if we have an exchange point scenario with four
4672: BGP speakers, each of which maintaining a BGP peering with the other
4673: three (*note fig:full-mesh::), we can convert it into a centralized
4674: scenario where each of the four establishes a single BGP peering
4675: against the Route Server (*note fig:route-server::).
4676:
4677: We will first describe briefly the Route Server model implemented by
4678: Quagga. We will explain the commands that have been added for
4679: configuring that model. And finally we will show a full example of
4680: Quagga configured as Route Server.
4681:
4682: * Menu:
4683:
4684: * Description of the Route Server model::
4685: * Commands for configuring a Route Server::
4686: * Example of Route Server Configuration::
4687:
4688:
4689: File: quagga.info, Node: Description of the Route Server model, Next: Commands for configuring a Route Server, Up: Configuring Quagga as a Route Server
4690:
1.1.1.3 misho 4691: 11.1 Description of the Route Server model
1.1 misho 4692: ==========================================
4693:
4694: First we are going to describe the normal processing that BGP
4695: announcements suffer inside a standard BGP speaker, as shown in *note
4696: fig:normal-processing::, it consists of three steps:
4697:
4698: * When an announcement is received from some peer, the `In' filters
4699: configured for that peer are applied to the announcement. These
4700: filters can reject the announcement, accept it unmodified, or
4701: accept it with some of its attributes modified.
4702:
4703: * The announcements that pass the `In' filters go into the Best Path
4704: Selection process, where they are compared to other announcements
4705: referred to the same destination that have been received from
4706: different peers (in case such other announcements exist). For each
4707: different destination, the announcement which is selected as the
4708: best is inserted into the BGP speaker's Loc-RIB.
4709:
4710: * The routes which are inserted in the Loc-RIB are considered for
4711: announcement to all the peers (except the one from which the route
4712: came). This is done by passing the routes in the Loc-RIB through
4713: the `Out' filters corresponding to each peer. These filters can
4714: reject the route, accept it unmodified, or accept it with some of
4715: its attributes modified. Those routes which are accepted by the
4716: `Out' filters of a peer are announced to that peer.
4717:
4718: