| [Top] | [Contents] | [Index] | [ ? ] |
Quagga is an advanced routing software package that provides a suite of TCP/IP based routing protocols. This is the Manual for Quagga 0.99.4. Quagga is a fork of GNU Zebra.
Copyright © 1999-2005 Kunihiro Ishiguro, et al.
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by Kunihiro Ishiguro.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Quagga is a routing software package that provides TCP/IP based routing services with routing protocols support such as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+ (see section Supported RFCs). Quagga also supports special BGP Route Reflector and Route Server behavior. In addition to traditional IPv4 routing protocols, Quagga also supports IPv6 routing protocols. With SNMP daemon which supports SMUX protocol, Quagga provides routing protocol MIBs (see section SNMP Support).
Quagga uses an advanced software architecture to provide you with a high quality, multi server routing engine. Quagga has an interactive user interface for each routing protocol and supports common client commands. Due to this design, you can add new protocol daemons to Quagga easily. You can use Quagga library as your program's client user interface.
Quagga is distributed under the GNU General Public License.
| 1.1 About Quagga | Basic information about Quagga | |
| 1.2 System Architecture | The Quagga system architecture | |
| 1.3 Supported Platforms | Supported platforms and future plans | |
| 1.4 Supported RFCs | ||
| 1.5 How to get Quagga | ||
| 1.6 Mailing List | Mailing list information | |
| 1.7 Bug Reports | Mail address for bug data |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Today, TCP/IP networks are covering all of the world. The Internet has been deployed in many countries, companies, and to the home. When you connect to the Internet your packet will pass many routers which have TCP/IP routing functionality.
A system with Quagga installed acts as a dedicated router. With Quagga, your machine exchanges routing information with other routers using routing protocols. Quagga uses this information to update the kernel routing table so that the right data goes to the right place. You can dynamically change the configuration and you may view routing table information from the Quagga terminal interface.
Adding to routing protocol support, Quagga can setup interface's flags, interface's address, static routes and so on. If you have a small network, or a stub network, or xDSL connection, configuring the Quagga routing software is very easy. The only thing you have to do is to set up the interfaces and put a few commands about static routes and/or default routes. If the network is rather large, or if the network structure changes frequently, you will want to take advantage of Quagga's dynamic routing protocol support for protocols such as RIP, OSPF or BGP.
Traditionally, UNIX based router configuration is done by
ifconfig and route commands. Status of routing
table is displayed by netstat utility. Almost of these commands
work only if the user has root privileges. Quagga has a different system
administration method. There are two user modes in Quagga. One is normal
mode, the other is enable mode. Normal mode user can only view system
status, enable mode user can change system configuration. This UNIX account
independent feature will be great help to the router administrator.
Currently, Quagga supports common unicast routing protocols. Multicast routing protocols such as BGMP, PIM-SM, PIM-DM may be supported in Quagga 2.0. MPLS support is going on. In the future, TCP/IP filtering control, QoS control, diffserv configuration will be added to Quagga. Quagga project's final goal is making a productive, quality, free TCP/IP routing software.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Traditional routing software is made as a one process program which provides all of the routing protocol functionalities. Quagga takes a different approach. It is made from a collection of several daemons that work together to build the routing table. There may be several protocol-specific routing daemons and zebra the kernel routing manager.
The ripd daemon handles the RIP protocol, while
ospfd is a daemon which supports OSPF version 2.
bgpd supports the BGP-4 protocol. For changing the kernel
routing table and for redistribution of routes between different routing
protocols, there is a kernel routing table manager zebra daemon.
It is easy to add a new routing protocol daemons to the entire routing
system without affecting any other software. You need to run only the
protocol daemon associated with routing protocols in use. Thus, user may
run a specific daemon and send routing reports to a central routing console.
There is no need for these daemons to be running on the same machine. You can even run several same protocol daemons on the same machine. This architecture creates new possibilities for the routing system.
+----+ +----+ +-----+ +-----+
|bgpd| |ripd| |ospfd| |zebra|
+----+ +----+ +-----+ +-----+
|
+---------------------------|--+
| v |
| UNIX Kernel routing table |
| |
+------------------------------+
Quagga System Architecture
|
Multi-process architecture brings extensibility, modularity and
maintainability. At the same time it also brings many configuration files
and terminal interfaces. Each daemon has it's own configuration file and
terminal interface. When you configure a static route, it must be done in
zebra configuration file. When you configure BGP network it must
be done in bgpd configuration file. This can be a very annoying
thing. To resolve the problem, Quagga provides integrated user interface
shell called vtysh. vtysh connects to each daemon with
UNIX domain socket and then works as a proxy for user input.
Quagga was planned to use multi-threaded mechanism when it runs with a
kernel that supports multi-threads. But at the moment, the thread library
which comes with GNU/Linux or FreeBSD has some problems with running
reliable services such as routing software, so we don't use threads at all.
Instead we use the select(2) system call for multiplexing the
events.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Currently Quagga supports GNU/Linux, BSD and Solaris. Porting Quagga
to other platforms is not too difficult as platform dependent code should
most be limited to the zebra daemon. Protocol daemons are mostly
platform independent. Please let us know when you find out Quagga runs on a
platform which is not listed below.
The list of officially supported platforms are listed below. Note that Quagga may run correctly on other platforms, and may run with partial functionality on further platforms.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Below is the list of currently supported RFC's.
Routing Information Protocol. C.L. Hedrick. Jun-01-1988.
RIP-2 MD5 Authentication. F. Baker, R. Atkinson. January 1997.
RIP Version 2. G. Malkin. November 1998.
RIPng for IPv6. G. Malkin, R. Minnear. January 1997.
OSPF Version 2. J. Moy. April 1998.
The OSPF Opaque LSA Option R. Coltun. July 1998.
The OSPF Not-So-Stubby Area (NSSA) Option P. Murphy. January 2003.
OSPF for IPv6. R. Coltun, D. Ferguson, J. Moy. December 1999.
A Border Gateway Protocol 4 (BGP-4). Y. Rekhter & T. Li. March 1995.
Autonomous System Confederations for BGP. P. Traina. June 1996.
BGP Communities Attribute. R. Chandra, P. Traina & T. Li. August 1996.
Use of BGP-4 Multiprotocol Extensions for IPv6 Inter-Domain Routing. P. Marques, F. Dupont. March 1999.
BGP Route Reflection An alternative to full mesh IBGP. T. Bates & R. Chandrasekeran. June 1996.
Multiprotocol Extensions for BGP-4. T. Bates, Y. Rekhter, R. Chandra, D. Katz. June 2000.
Capabilities Advertisement with BGP-4. R. Chandra, J. Scudder. May 2000.
OSPF Stub Router Advertisement, A. Retana, L. Nguyen, R. White, A. Zinin, D. McPherson. June 2001
When SNMP support is enabled, below RFC is also supported.
SNMP MUX protocol and MIB. M.T. Rose. May-01-1991.
Definitions of Managed Objects for the Fourth Version of the Border Gateway Protocol (BGP-4) using SMIv2. S. Willis, J. Burruss, J. Chu, Editor. July 1994.
RIP Version 2 MIB Extension. G. Malkin & F. Baker. November 1994.
OSPF Version 2 Management Information Base. F. Baker, R. Coltun. November 1995.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The official Quagga web-site is located at:
and contains further information, as well as links to additional resources.
Quagga is a fork of GNU Zebra, whose web-site is located at:
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There is a mailing list for discussions about Quagga. If you have any comments or suggestions to Quagga, please subscribe to:
http://lists.quagga.net/mailman/listinfo/quagga-users.
The Quagga site has further information on the available mailing lists, see:
http://www.quagga.net/lists.php
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
If you think you have found a bug, please send a bug report to:
When you send a bug report, please be careful about the points below.
netstat -rn and ifconfig -a.
Information from zebra's VTY command show ip route will also be
helpful.
Bug reports are very important for us to improve the quality of Quagga. Quagga is still in the development stage, but please don't hesitate to send a bug report to http://bugzilla.quagga.net.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are three steps for installing the software: configuration, compilation, and installation.
| 2.1 Configure the Software | ||
| 2.2 Build the Software | ||
| 2.3 Install the Software |
The easiest way to get Quagga running is to issue the following commands:
% configure % make % make install |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| 2.1.1 The Configure script and its options | ||
| 2.1.2 Least-Privilege support | ||
| 2.1.3 Linux Notes |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Quagga has an excellent configure script which automatically detects most host configurations. There are several additional configure options you can use to turn off IPv6 support, to disable the compilation of specific daemons, and to enable SNMP support.
Turn on compilation of the zebra-guile interpreter. You will need the guile library to make this. zebra-guile implementation is not yet finished. So this option is only useful for zebra-guile developers.
Turn off IPv6 related features and daemons. Quagga configure script automatically detects IPv6 stack. But sometimes you might want to disable IPv6 support of Quagga.
Do not build zebra daemon.
Do not build ripd.
Do not build ripngd.
Do not build ospfd.
Do not build ospf6d.
Do not build bgpd.
Make bgpd which does not make bgp announcements at all. This
feature is good for using bgpd as a BGP announcement listener.
Force to enable GNU/Linux netlink interface. Quagga configure script detects netlink interface by checking a header file. When the header file does not match to the current running kernel, configure script will not turn on netlink support.
Enable SNMP support. By default, SNMP support is disabled.
Enable support for Opaque LSAs (RFC2370) in ospfd.
Disable support for OSPF-API, an API to interface directly with ospfd. OSPF-API is enabled if -enable-opaque-lsa is set.
Disable building of the example OSPF-API client.
Enable support for OSPF Traffic Engineering Extension (internet-draft) this requires support for Opaque LSAs.
Enable support for Equal Cost Multipath. ARG is the maximum number of ECMP paths to allow, set to 0 to allow unlimited number of paths.
Enable support IPV6 router advertisement in zebra.
You may specify any combination of the above options to the configure script. By default, the executables are placed in `/usr/local/sbin' and the configuration files in `/usr/local/etc'. The `/usr/local/' installation prefix and other directories may be changed using the following options to the configuration script.
Install architecture-independent files in prefix [/usr/local].
Look for configuration files in dir [prefix/etc]. Note that sample configuration files will be installed here.
Configure zebra to use dir for local state files, such as pid files and unix sockets.
% ./configure --disable-ipv6 |
This command will configure zebra and the routing daemons.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Additionally, you may configure zebra to drop its elevated privileges shortly after startup and switch to another user. The configure script will automatically try to configure this support. There are three configure options to control the behaviour of Quagga daemons.
Switch to user ARG shortly after startup, and run as user ARG in normal operation.
Switch real and effective group to group shortly after startup.
Create Unix Vty sockets (for use with vtysh) with group owndership set to group. This allows one to create a seperate group which is restricted to accessing only the Vty sockets, hence allowing one to delegate this group to individual users, or to run vtysh setgid to this group.
The default user and group which will be configured is 'quagga' if no user or group is specified. Note that this user or group requires write access to the local state directory (see -localstatedir) and requires at least read access, and write access if you wish to allow daemons to write out their configuration, to the configuration directory (see -sysconfdir).
On systems which have the 'libcap' capabilities manipulation library (currently only linux), the quagga system will retain only minimal capabilities required, further it will only raise these capabilities for brief periods. On systems without libcap, quagga will run as the user specified and only raise its uid back to uid 0 for brief periods.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are several options available only to GNU/Linux systems: (1). If you use GNU/Linux, make sure that the current kernel configuration is what you want. Quagga will run with any kernel configuration but some recommendations do exist.
Kernel/User netlink socket. This is a brand new feature which enables an advanced interface between the Linux kernel and zebra (see section Kernel Interface).
Routing messages.
This makes it possible to receive netlink routing messages. If you
specify this option, zebra can detect routing information
updates directly from the kernel (see section Kernel Interface).
IP: multicasting.
This option should be specified when you use ripd (see section RIP) or
ospfd (see section OSPFv2) because these protocols use multicast.
IPv6 support has been added in GNU/Linux kernel version 2.2. If you try to use the Quagga IPv6 feature on a GNU/Linux kernel, please make sure the following libraries have been installed. Please note that these libraries will not be needed when you uses GNU C library 2.1 or upper.
inet6-appsThe inet6-apps package includes basic IPv6 related libraries such
as inet_ntop and inet_pton. Some basic IPv6 programs such
as ping, ftp, and inetd are also
included. The inet-apps can be found at
ftp://ftp.inner.net/pub/ipv6/.
net-toolsThe net-tools package provides an IPv6 enabled interface and
routing utility. It contains ifconfig, route,
netstat, and other tools. net-tools may be found at
http://www.tazenda.demon.co.uk/phil/net-tools/.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
After configuring the software, you will need to compile it for your
system. Simply issue the command make in the root of the source
directory and the software will be compiled. If you have *any* problems
at this stage, be certain to send a bug report See section Bug Reports.
% ./configure . . . ./configure output . . . % make |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Installing the software to your system consists of copying the compiled programs and supporting files to a standard location. After the installation process has completed, these files have been copied from your work directory to `/usr/local/bin', and `/usr/local/etc'.
To install the Quagga suite, issue the following command at your shell
prompt: make install.
% % make install % |
Quagga daemons have their own terminal interface or VTY. After installation, you have to setup each beast's port number to connect to them. Please add the following entries to `/etc/services'.
zebrasrv 2600/tcp # zebra service zebra 2601/tcp # zebra vty ripd 2602/tcp # RIPd vty ripngd 2603/tcp # RIPngd vty ospfd 2604/tcp # OSPFd vty bgpd 2605/tcp # BGPd vty ospf6d 2606/tcp # OSPF6d vty ospfapi 2607/tcp # ospfapi isisd 2608/tcp # ISISd vty |
If you use a FreeBSD newer than 2.2.8, the above entries are already added to `/etc/services' so there is no need to add it. If you specify a port number when starting the daemon, these entries may not be needed.
You may need to make changes to the config files in `/etc/quagga/*.conf'. See section Config Commands.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are five routing daemons in use, and there is one manager daemon. These daemons may be located on separate machines from the manager daemon. Each of these daemons will listen on a particular port for incoming VTY connections. The routing daemons are:
ripd, ripngd, ospfd, ospf6d, bgpd
zebra
The following sections discuss commands common to all the routing daemons.
| 3.2 Terminal Mode Commands | Common commands used in a VTY | |
| 3.1 Config Commands | Commands used in config files | |
| 3.3 Common Invocation Options | Starting the daemons | |
| 3.4 Virtual Terminal Interfaces | Interacting with the daemons |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| 3.1.1 Basic Config Commands | Some of the generic config commands | |
| 3.1.2 Sample Config File | An example config file |
In a config file, you can write the debugging options, a vty's password, routing daemon configurations, a log file name, and so forth. This information forms the initial command set for a routing beast as it is starting.
Config files are generally found in:
Each of the daemons has its own config file. For example, zebra's default config file name is:
The daemon name plus `.conf' is the default config file name. You can specify a config file using the -f or --config-file options when starting the daemon.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Set hostname of the router.
Set password for vty interface. If there is no password, a vty won't accept connections.
Set enable password.
These commands are deprecated and are present only for historical compatibility.
The log trap command sets the current logging level for all enabled
logging destinations, and it sets the default for all future logging commands
that do not specify a level. The normal default
logging level is debugging. The no form of the command resets
the default level for future logging commands to debugging, but it does
not change the logging level of existing logging destinations.
Enable logging output to stdout.
If the optional second argument specifying the
logging level is not present, the default logging level (typically debugging,
but can be changed using the deprecated log trap command) will be used.
The no form of the command disables logging to stdout.
The level argument must have one of these values:
emergencies, alerts, critical, errors, warnings, notifications, informational, or debugging. Note that the existing code logs its most important messages
with severity errors.
If you want to log into a file, please specify filename as
in this example:
log file /var/log/quagga/bgpd.log informational |
If the optional second argument specifying the
logging level is not present, the default logging level (typically debugging,
but can be changed using the deprecated log trap command) will be used.
The no form of the command disables logging to a file.
Note: if you do not configure any file logging, and a daemon crashes due to a signal or an assertion failure, it will attempt to save the crash information in a file named /var/tmp/quagga.<daemon name>.crashlog. For security reasons, this will not happen if the file exists already, so it is important to delete the file after reporting the crash information.
Enable logging output to syslog.
If the optional second argument specifying the
logging level is not present, the default logging level (typically debugging,
but can be changed using the deprecated log trap command) will be used.
The no form of the command disables logging to syslog.
Enable logging output to vty terminals that have enabled logging
using the terminal monitor command.
By default, monitor logging is enabled at the debugging level, but this
command (or the deprecated log trap command) can be used to change
the monitor logging level.
If the optional second argument specifying the
logging level is not present, the default logging level (typically debugging,
but can be changed using the deprecated log trap command) will be used.
The no form of the command disables logging to terminal monitors.
This command changes the facility used in syslog messages. The default
facility is daemon. The no form of the command resets
the facility to the default daemon facility.
To include the severity in all messages logged to a file, to stdout, or to
a terminal monitor (i.e. anything except syslog),
use the log record-priority global configuration command.
To disable this option, use the no form of the command. By default,
the severity level is not included in logged messages. Note: some
versions of syslogd (including Solaris) can be configured to include
the facility and level in the messages emitted.
Encrypt password.
Enable advanced mode VTY.
Set system wide line configuration. This configuration command applies to all VTY interfaces.
Enter vty configuration mode.
Set default motd string.
No motd banner string will be printed.
Set VTY connection timeout value. When only one argument is specified it is used for timeout value in minutes. Optional second argument is used for timeout value in seconds. Default timeout value is 10 minutes. When timeout value is zero, it means no timeout.
Do not perform timeout at all. This command is as same as
exec-timeout 0 0.
Restrict vty connections with an access list.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Below is a sample configuration file for the zebra daemon.
! ! Zebra configuration file ! hostname Router password zebra enable password zebra ! log stdout ! ! |
'!' and '#' are comment characters. If the first character of the word is one of the comment characters then from the rest of the line forward will be ignored as a comment.
password zebra!password |
If a comment character is not the first character of the word, it's a normal character. So in the above example '!' will not be regarded as a comment and the password is set to 'zebra!password'.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Displays the current configuration to the vty interface.
Write current configuration to configuration file.
Change to configuration mode. This command is the first step to configuration.
Set terminal display length to <0-512>. If length is 0, no display control is performed.
Show a list of currently connected vty sessions.
List all available commands.
Show the current version of Quagga and its build host information.
Shows the current configuration of the logging system. This includes the status of all logging destinations.
Send a message to all logging destinations that are enabled for messages of the given severity.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These options apply to all Quagga daemons.
Runs in daemon mode.
Set configuration file name.
Display this help and exit.
Upon startup the process identifier of the daemon is written to a file,
typically in `/var/run'. This file can be used by the init system
to implement commands such as …/init.d/zebra status,
…/init.d/zebra restart or …/init.d/zebra
stop.
The file name is an run-time option rather than a configure-time option so that multiple routing daemons can be run simultaneously. This is useful when using Quagga to implement a routing looking glass. One machine can be used to collect differing routing views from differing points in the network.
Set the VTY local address to bind to. If set, the VTY socket will only be bound to this address.
Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not be opened.
Set the user and group to run as.
Print program version.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
VTY - Virtual Terminal [aka TeletYpe] Interface is a command line interface (CLI) for user interaction with the routing daemon.
| 3.4.1 VTY Overview | Basics about VTYs | |
| 3.4.2 VTY Modes | View, Enable, and Other VTY modes | |
| 3.4.3 VTY CLI Commands | Commands for movement, edition, and management |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
VTY stands for Virtual TeletYpe interface. It means you can connect to the daemon via the telnet protocol.
To enable a VTY interface, you have to setup a VTY password. If there is no VTY password, one cannot connect to the VTY interface at all.
% telnet localhost 2601 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Hello, this is Quagga (version 0.99.4) Copyright © 1999-2005 Kunihiro Ishiguro, et al. User Access Verification Password: XXXXX Router> ? enable Turn on privileged commands exit Exit current mode and down to previous mode help Description of the interactive help system list Print command list show Show running system information who Display who is on a vty Router> enable Password: XXXXX Router# configure terminal Router(config)# interface eth0 Router(config-if)# ip address 10.0.0.1/8 Router(config-if)# ^Z Router# |
'?' is very useful for looking up commands.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are three basic VTY modes:
| 3.4.2.1 VTY View Mode | Mode for read-only interaction | |
| 3.4.2.2 VTY Enable Mode | Mode for read-write interaction | |
| 3.4.2.3 VTY Other Modes | Special modes (tftp, etc) |
There are commands that may be restricted to specific VTY modes.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This mode is for read-only access to the CLI. One may exit the mode by
leaving the system, or by entering enable mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This mode is for read-write access to the CLI. One may exit the mode by leaving the system, or by escaping to view mode.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This page is for describing other modes.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Commands that you may use at the command-line are described in the following three subsubsections.
| 3.4.3.1 CLI Movement Commands | Commands for moving the cursor about | |
| 3.4.3.2 CLI Editing Commands | Commands for changing text | |
| 3.4.3.3 CLI Advanced Commands | Other commands, session management and so on |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These commands are used for moving the CLI cursor. The C character means press the Control Key.
Move forward one character.
Move backward one character.
Move forward one word.
Move backward one word.
Move to the beginning of the line.
Move to the end of the line.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
These commands are used for editing text on a line. The C character means press the Control Key.
Delete the character before point.
Delete the character after point.
Forward kill word.
Backward kill word.
Kill to the end of the line.
Kill line from the beginning, erasing input.
Transpose character.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are several additional CLI commands for command line completions, insta-help, and VTY session management.
Interrupt current input and moves to the next line.
End current configuration session and move to top node.
Move down to next line in the history buffer.
Move up to previous line in the history buffer.
Use command line completion by typing TAB.
You can use command line help by typing help at the beginning of
the line. Typing ? at any point in the line will show possible
completions.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
zebra is an IP routing manager. It provides kernel routing
table updates, interface lookups, and redistribution of routes between
different routing protocols.
| 4.1 Invoking zebra | Running the program | |
| 4.2 Interface Commands | Commands for zebra interfaces | |
| 4.3 Static Route Commands | Commands for adding static routes | |
| 4.4 zebra Terminal Mode Commands | Commands for zebra's VTY |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Besides the common invocation options (see section Common Invocation Options), the
zebra specific invocation options are listed below.
Runs in batch mode. zebra parses configuration file and terminates
immediately.
When zebra starts up, don't delete old self inserted routes.
When program terminates, retain routes added by zebra.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Up or down the current interface.
Set the IPv4 or IPv6 address/prefix for the interface.
Set the secondary flag for this address. This causes ospfd to not treat the address as a distinct subnet.
Set description for the interface.
Enable or disables multicast flag for the interface.
Set bandwidth value of the interface in kilobits/sec. This is for calculating OSPF cost. This command does not affect the actual device configuration.
Enable/disable link-detect on platforms which support this. Currently only Linux and Solaris, and only where network interface drivers support reporting link-state via the IFF_RUNNING flag.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Static routing is a very fundamental feature of routing technology. It defines static prefix and gateway.
network is destination prefix with format of A.B.C.D/M. gateway is gateway for the prefix. When gateway is A.B.C.D format. It is taken as a IPv4 address gateway. Otherwise it is treated as an interface name. If the interface name is null0 then zebra installs a blackhole route.
ip route 10.0.0.0/8 10.0.0.2 ip route 10.0.0.0/8 ppp0 ip route 10.0.0.0/8 null0 |
First example defines 10.0.0.0/8 static route with gateway 10.0.0.2. Second one defines the same prefix but with gateway to interface ppp0. The third install a blackhole route.
This is alternate version of above command. When network is A.B.C.D format, user must define netmask value with A.B.C.D format. gateway is same option as above command
ip route 10.0.0.0 255.255.255.0 10.0.0.2 ip route 10.0.0.0 255.255.255.0 ppp0 ip route 10.0.0.0 255.255.255.0 null0 |
These statements are equivalent to those in the previous example.
Installs the route with the specified distance.
Multiple nexthop static route
ip route 10.0.0.1/32 10.0.0.2 ip route 10.0.0.1/32 10.0.0.3 ip route 10.0.0.1/32 eth0 |
If there is no route to 10.0.0.2 and 10.0.0.3, and interface eth0 is reachable, then the last route is installed into the kernel.
If zebra has been compiled with multipath support, and both 10.0.0.2 and 10.0.0.3 are reachable, zebra will install a multipath route via both nexthops, if the platform supports this.
zebra> show ip route
S> 10.0.0.1/32 [1/0] via 10.0.0.2 inactive
via 10.0.0.3 inactive
* is directly connected, eth0
|
ip route 10.0.0.0/8 10.0.0.2 ip route 10.0.0.0/8 10.0.0.3 ip route 10.0.0.0/8 null0 255 |
This will install a multihop route via the specified next-hops if they are reachable, as well as a high-metric blackhole route, which can be useful to prevent traffic destined for a prefix to match less-specific routes (eg default) should the specified gateways not be reachable. Eg:
zebra> show ip route 10.0.0.0/8
Routing entry for 10.0.0.0/8
Known via "static", distance 1, metric 0
10.0.0.2 inactive
10.0.0.3 inactive
Routing entry for 10.0.0.0/8
Known via "static", distance 255, metric 0
directly connected, Null0
|
These behave similarly to their ipv4 counterparts.
Select the primary kernel routing table to be used. This only works for kernels supporting multiple routing tables (like GNU/Linux 2.2.x and later). After setting tableno with this command, static routes defined after this are added to the specified table.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Display current routes which zebra holds in its database.
Router# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
B - BGP * - FIB route.
K* 0.0.0.0/0 203.181.89.241
S 0.0.0.0/0 203.181.89.1
C* 127.0.0.0/8 lo
C* 203.181.89.240/28 eth0
|
Display whether the host's IP forwarding function is enabled or not. Almost any UNIX kernel can be configured with IP forwarding disabled. If so, the box can't work as a router.
Display whether the host's IP v6 forwarding is enabled or not.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
RIP - Routing Information Protocol is widely deployed interior gateway protocol. RIP was developed in the 1970s at Xerox Labs as part of the XNS routing protocol. RIP is a distance-vector protocol and is based on the Bellman-Ford algorithms. As a distance-vector protocol, RIP router send updates to its neighbors periodically, thus allowing the convergence to a known topology. In each update, the distance to any given network will be broadcasted to its neighboring router.
ripd supports RIP version 2 as described in RFC2453 and RIP
version 1 as described in RFC1058.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The default configuration file name of ripd's is
`ripd.conf'. When invocation ripd searches directory
/etc/quagga. If `ripd.conf' is not there next
search current directory.
RIP uses UDP port 520 to send and receive RIP packets. So the user must have
the capability to bind the port, generally this means that the user must
have superuser privileges. RIP protocol requires interface information
maintained by zebra daemon. So running zebra
is mandatory to run ripd. Thus minimum sequence for running
RIP is like below:
# zebra -d # ripd -d |
Please note that zebra must be invoked before ripd.
To stop ripd. Please use kill `cat
/var/run/ripd.pid`. Certain signals have special meaningss to ripd.
Reload configuration file `ripd.conf'. All configurations are reseted. All routes learned so far are cleared and removed from routing table.
Rotate ripd logfile.
ripd sweeps all installed RIP routes then terminates properly.
ripd invocation options. Common options that can be specified
(see section Common Invocation Options).
When the program terminates, retain routes added by ripd.
| 5.1.1 RIP netmask |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The netmask features of ripd support both version 1 and version 2 of
RIP. Version 1 of RIP originally contained no netmask information. In
RIP version 1, network classes were originally used to determine the
size of the netmask. Class A networks use 8 bits of mask, Class B
networks use 16 bits of masks, while Class C networks use 24 bits of
mask. Today, the most widely used method of a network mask is assigned
to the packet on the basis of the interface that received the packet.
Version 2 of RIP supports a variable length subnet mask (VLSM). By
extending the subnet mask, the mask can be divided and reused. Each
subnet can be used for different purposes such as large to middle size
LANs and WAN links. Quagga ripd does not support the non-sequential
netmasks that are included in RIP Version 2.
In a case of similar information with the same prefix and metric, the old information will be suppressed. Ripd does not currently support equal cost multipath routing.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The router rip command is necessary to enable RIP. To disable
RIP, use the no router rip command. RIP must be enabled before
carrying out any of the RIP commands.
Disable RIP.
Set the RIP enable interface by network. The interfaces which have addresses matching with network are enabled.
This group of commands either enables or disables RIP interfaces between
certain numbers of a specified network address. For example, if the
network for 10.0.0.0/24 is RIP enabled, this would result in all the
addresses from 10.0.0.0 to 10.0.0.255 being enabled for RIP. The no
network command will disable RIP for the specified network.
Set a RIP enabled interface by ifname. Both the sending and
receiving of RIP packets will be enabled on the port specified in the
network ifname command. The no network ifname command will disable
RIP on the specified interface.
Specify RIP neighbor. When a neighbor doesn't understand multicast,
this command is used to specify neighbors. In some cases, not all
routers will be able to understand multicasting, where packets are sent
to a network or a group of addresses. In a situation where a neighbor
cannot process multicast packets, it is necessary to establish a direct
link between routers. The neighbor command allows the network
administrator to specify a router as a RIP neighbor. The no
neighbor a.b.c.d command will disable the RIP neighbor.
Below is very simple RIP configuration. Interface eth0 and
interface which address match to 10.0.0.0/8 are RIP enabled.
! router rip network 10.0.0.0/8 network eth0 ! |
Passive interface
This command sets the specified interface to passive mode. On passive mode
interface, all receiving packets are processed as normal and ripd does
not send either multicast or unicast RIP packets except to RIP neighbors
specified with neighbor command. The interface may be specified
as default to make ripd default to passive on all interfaces.
The default is to be passive on all interfaces.
RIP split-horizon
Control split-horizon on the interface. Default is ip
split-horizon. If you don't perform split-horizon on the interface,
please specify no ip split-horizon.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
RIP can be configured to send either Version 1 or Version 2 packets. The default is to send RIPv2 while accepting both RIPv1 and RIPv2 (and replying with packets of the appropriate version for REQUESTS / triggered updates). The version to receive and send can be specified globally, and further overriden on a per-interface basis if needs be for send and receive seperately (see below).
It is important to note that RIPv1 can not be authenticated. Further, if RIPv1 is enabled then RIP will reply to REQUEST packets, sending the state of its RIP routing table to any remote routers that ask on demand. For a more detailed discussion on the security implications of RIPv1 see RIP Authentication.
Set RIP version to accept for reads and send. version can be either `1" or `2".
Disabling RIPv1 by specifying version 2 is STRONGLY encouraged, See section RIP Authentication. This may become the default in a future release.
Default: Send Version 2, and accept either version.
Reset the global version setting back to the default.
version can be `1', `2' or `1 2'.
This interface command overrides the global rip version setting, and selects which version of RIP to send packets with, for this interface specifically. Choice of RIP Version 1, RIP Version 2, or both versions. In the latter case, where `1 2' is specified, packets will be both broadcast and multicast.
Default: Send packets according to the global version (version 2)
version can be `1', `2' or `1 2'.
This interface command overrides the global rip version setting, and selects which versions of RIP packets will be accepted on this interface. Choice of RIP Version 1, RIP Version 2, or both.
Default: Accept packets according to the global setting (both 1 and 2).
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
redistribute kernel redistributes routing information from
kernel route entries into the RIP tables. no redistribute kernel
disables the routes.
redistribute static redistributes routing information from
static route entries into the RIP tables. no redistribute static
disables the routes.
Redistribute connected routes into the RIP tables. no
redistribute connected disables the connected routes in the RIP tables.
This command redistribute connected of the interface which RIP disabled.
The connected route on RIP enabled interface is announced by default.
redistribute ospf redistributes routing information from
ospf route entries into the RIP tables. no redistribute ospf
disables the routes.
redistribute bgp redistributes routing information from
bgp route entries into the RIP tables. no redistribute bgp
disables the routes.
If you want to specify RIP only static routes:
This command is specific to Quagga. The route command makes a static
route only inside RIP. This command should be used only by advanced
users who are particularly knowledgeable about the RIP protocol. In
most cases, we recommend creating a static route in Quagga and
redistributing it in RIP using redistribute static.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] |