中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

4.1.5.3 Quagga(3)

Running Quagga/Zebra

The Quagga daemons can be started from /etc/init.d/<daemon> with several different options, which are the same for all daemons.

-d or --daemon: Runs in daemon mode.
-f file or --config_file=file: Set configuration file name.
-h or --help: Display help.
-i file or --pid_file=file: 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 a runtime 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 different points in the network.
-A address or --vty_addr=address: Set the VTY local address to bind to. If set, the VTY socket will only be bound to this address.
• -P port or --vty_port=port: Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not be opened.
• -u user or --vty_addr=user: Set the user and group to run as.
• -v or --version: Print program version.

Besides the common invocation options, the Zebra itself has some specific options:

-b or --batch: Runs in batch mode. Zebra parses configuration file and terminates
immediately.
-k or --keep_kernel: When Zebra starts up, don’t delete old self inserted routes.
-l or --log_mode: Set verbose logging on.
-r or --retain: When program terminates, retain routes added by Zebra.

Configuring Router Advertisements and Neighbor Discovery

Router Advertisements are configured per interface, so the following commands have to be entered in
the context of an interface:

Command Syntax:

Router(config-if)# (no) ipv6 nd suppress-ra {}

Either switches off or on (no keyword) sending router advertisements on that interface.
Command Syntax:

Router(config-if)# (no) ipv6 nd prefix <ipv6prefix> [valid-lifetime] \\
[preferred-lifetime] [off-link] [no-autconfig] {}

This command configures the IPv6 prefix to include in router advertisements. Several prefix specific optional parameters and flags may follow:

valid-lifetime: The length of time in seconds during which the prefix is valid for the purpose of on-link determination. Value infinite represents infinity (i.e. a value of all one bits (0xffffffff)). Range: <0-4294967295> Default: 2592000
preferred-lifetime: The length of time in seconds during what addresses generated from the prefix remain preferred. Value infinite represents infinity. Range: <0-4294967295> Default: 604800
off-link: Indicates that advertisements makes no statement about on-link or off-link properties of the prefix. Default: not set, i.e. this prefix can be used for on-link determination.
no-autoconfig: Indicates to hosts on the local link that the specified prefix cannot be used for IPv6 autoconfiguration. Default: not set, i.e. prefix can be used for autoconfiguration.

Command Syntax:

Router(config-if)# (no) ipv6 nd ra-interval <seconds> {}

The maximum time allowed between sending unsolicited multicast router advertisements from the interface, in seconds. Must be no less than 3 seconds. The default is 600. Omit <seconds> to delete the statement with the no keyword.

Command Syntax:

Router(config-if)# (no) ipv6 nd ra-lifetime <seconds> {}

This command sets the value to be placed in the Router Lifetime field of router advertisements sent from the interface, in seconds. It indicates the usefulness of the router as a default router on this

interface. Setting the value to zero indicates that the router should not be considered a default router on the connected link. The value must be either zero or between the value specified with ipv6 nd rainterval (or default) and 9000 seconds. The default is 1800 seconds. Omit <seconds> to delete the statement with the no keyword.

Command Syntax:

Router(config-if)# (no) ipv6 nd reachable-time <milliseconds> {}

Use this command to set the value to be placed in the Reachable Time field in the router advertisements messages sent by the router, in milliseconds. The configured time enables the router to detect unavailable neighbors. If set to zero it means this time is unspecified (by this router). The value set must be no greater than 3,600,000 milliseconds (1 hour). The default is 0. Omit <milliseconds> to delete the statement with the no keyword.

Command Syntax:

Router(config-if)# (no) ipv6 nd managed-config-flag {}

This statement sets/unsets the flag in IPv6 router advertisements, which indicates to hosts that they should use managed (stateful) protocol for addresses autoconfiguration in addition to any addresses autoconfigured using stateless address autoconfiguration. As a default this flag is not set.

Command Syntax:

Router(config-if)# (no) ipv6 nd other-config-flag {}

This statement sets/unsets the flag in IPv6 router advertisements which indicates to hosts that they should use administered (stateful) protocol to obtain autoconfiguration information other than addresses. As a default this flag is not set.

A sample IPv6 interface may be configured as follows:

interface eth0
no ipv6 nd supress-ra
ipv6 nd prefix 2001:0DB8:5009::/64

This interface will send out router advertisements for the prefix 2001:0DB8:5009::/64 every 600 seconds.