Quagga官方说明文档阅读笔记

来源:互联网 发布:网站seo编辑会收录吗 编辑:程序博客网 时间:2024/05/18 02:23

本文是阅读quagga官方说明文档的笔记。

一些概念

  • zebra是核心后台 core daemon, zebra

  • 后台程序

    ISIS是一个分级的链接状态路由协议,基于DECnet PhaseV 路由算法,实际上与OSPF非常相似,它也使用Hello协议寻找毗邻节点,使用一个传播协议发送链接信息。ISIS可以在不同的子网上操作,包括广播型的LAN、WAN和点到点链路。


说明文档

以下是阅读官网说明文档的笔记。

有下划线的中文是对英文的翻译,不喜欢阅读英文的可以略过英文,当中文读起来不太顺畅(我的翻译水平有限)时,英文可以帮助你更好理解工作原理。

  • 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.

    Quagga使用路由信息更新路由表(kernel routing table)

  • 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, IS-IS or BGP.

    网络小的话可以直接配置成静态路径,网络大的话可以利用Quagga对动态路由协议(如RIP,OSPF,BGP)的支持来配置。

  • There are two user modes in Quagga. One is normal mode, the other is enablemode. Normal mode user can only view system status, enable mode user can change system configuration.

    两种模式:Normal模式和enable模式;Normal只能读取系统状态;enable模式的用户可以改变系统配置

  • supports common unicast routing protocol,that is BGP, OSPF,RIP and IS-IS

    目前支持单播协议

System Architecture

  • 工作机理: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.

  • 系统架构

    bgpd支持BGP-4,ripd支持RIP,ospfd支持OSPF v2。

    为了更改路由表或在不同协议间重新分配路径,Quagga有一个路由表管理者zebra。

    For changing the kernel routing table and for redistribution of routes between different routing protocols, there is a kernel routing table manager zebra daemon.

    添加新的路由协议后台程序的方式(Quagga支持用户自己添加新的protocol):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.

  • 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 vtyshvtysh connects to each daemon with UNIX domain socket and then works as a proxy for user input.


installation

There are three steps for installing the software: configuration, compilation, and installation.

configuration(配置)

  • The easiest way to get Quagga running is to issue the following commands:
    % configure
    % make
    % make install

  • 关闭/开启某个后台程序/ipv6服务,具体可以查说明文档 P12-P13

    %--disable-(ipv6/zebra/...)

    % --enable-

  • 默认路径

    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 bechanged using the following options to the configuration script.

  • 三种配置选项来控制Quagga的后台程序(2.1.2 Least-Privilege support 不太理解)

    There are three configure options to control the behaviour of Quagga daemons.
    --enable-user=user
            Switch to user ARG shortly after startup, and run as user ARG in normal operation.
    --enable-group=group
            Switch real and effective group to group shortly after startup.
    --enable-vty-group=group
            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 individualusers, or to run vtysh setgid to this group.

  • Linux下一些选项

    CONFIG_NETLINK
            Kernel/User netlink socket. This is a brand new feature which enables an advanced interface between the Linux kernel and zebra (see Chapter 16 [KernelInterface], page 96).
    CONFIG_RTNETLINK
            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 Chapter 16 [Kernel Interface], page 96).
    CONFIG_IP_MULTICAST
            IP: multicasting. This option should be specified when you use ripd (see Chapter 5 [RIP], page 23) or ospfd (see Chapter 7 [OSPFv2], page 33) because these protocols use multicast.

building(compiling)

% ./configure
.
.
.
./configure output
.
.
.
% make


install

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.

如果安装步骤完成,这些文件就会在文件的如下路径: /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.

安装以后要将以下配置写入 /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
pimd 2611/tcp # PIMd vty

%%%%%%%%%%%%%%%%%%%%%%%%%%%%

配置命令

配置命令

  • 配置文件的路径Config files are generally found in:/etc/quagga/*.conf
  • Each of the daemons has its own config file. 
        For example, zebra’s default config file name is: /etc/quagga/zebra.conf
  • 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.

基本配置命令

hostname hostname [Command]
         Set hostname of the router.      
password password [Command]
         Set password for vty interface. If there is no password, a vty won’t accept connections.
enable password password [Command]
Set enable password.


log stdout [Command]
log stdout level [Command]
no log stdout [Command]
Enable logging output to stdout 更多种输出类型查看说明文档3.1.1 P17

示例配置文件

Below is a sample configuration file for the zebra daemon.
!
! Zebra configuration file
!
hostname Router
password zebra
enable password zebra
!
log stdout
!
!


公共调用选项

 





















0 0
原创粉丝点击