quagga安装和使用

转载 2012年03月30日 10:05:29
分类: 命令行编程


quagga安装和使用
测试环境-Fedora7.0
1.       下载源码
quagga-0.99.10.tar.gz
2.       解压缩
tar xzvf quagga-0.99.10.tar.gz
3.       配置
cd quagga-0.99.10
    ./configure --prefix =/usr
                --sysconfdir=/etc/quagga
                --localstatedir=/var/run/quagga
                --enable-vtysh
                --enable-user='test'
                --enable-group='test'
                 --enable-vty-group='test'
配置输出:
 

Quagga configuration

--------------------

quagga version          : 0.99.10

host operationg system  : linux-gnu

source code location    : .

compiler                : gcc

compiler flags          : -Os -fno-omit-frame-pointer -g -std=gnu99 -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual

make                    : make
includes                : 

linker flags            :  -lcrypt   -lcap  -ltermcap -lreadline -lm

state file directory    : /var/run/quagga

config file directory   : /etc/quagga

example directory       : /etc/quagga

user to run as          : test

group to run as         : test

group for vty sockets   : test

config file mask        : 0600

log file mask           : 0600

 

The above user and group must have read/write access

to the state file directory and

to the config files in the config file directory.

4.       编译和安装
make ;make install
5.       添加test组和用户
groupadd test;
    useradd test -g test
6.       改变权限 //最好写入启动脚本

chown test:test /var/run/quagga

chmod 777 /var/run/quagga   
chown test:test /etc/quagga //需要将配置写入操作系统
chmod 777 /etc/quagga/*                    
7.       增加log权限//最好写入启动脚本

Mkdir  /var/log/quagga/

Vi /var/log/quagga/zebra.log
Chmod 777 /var/log/quagga/zebra.log
 
8.       修改 /etc/services  //just for telnet

                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

                isid           2608/tcp    # ISISd vty
 
 
9.       编辑配置文件

copy /etc/quagga/zebra.conf.example   /etc/quagga/zebra.conf

! -*- zebra -*-
!

! zebra sample configuration file

!
hostname Router
password zebra

enable password zebra

log file  /var/log/quagga/zebra.log//注意zebra.conf启用log,这样便于查找错误
 
 
10.     启动
zebra –d
如果启动不成功,察看/var/log/quagga/zebra.log
一般由于权限设置会出现以下错误:

2008/10/22 16:59:22 ZEBRA: Could not lock pid_file /var/run/quagga/zebra.pid, exiting

 
11.    登陆
telnet localhost zebra(0r 2601)
[root@localhost quagga-0.99.10]# telnet localhost 2601

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

 

Hello, this is Quagga (version 0.99.10).

Copyright 1996-2005 Kunihiro Ishiguro, et al.

 
 
User Access Verification
 
Password:
Router> enable
Password:
Router# help

Quagga VTY provides advanced help feature.  When you need help,

anytime at the command line please press '?'.

 

If nothing matches, the help list will be empty and you must backup

 until entering a '?' shows the available options.

Two styles of help are provided:

1. Full help is available when you are ready to enter a

command argument (e.g. 'show ?') and describes each possible

argument.

2. Partial help is provided when an abbreviated argument is entered

   and you want to know what arguments match the input

   (e.g. 'show me?'.)
 
Router#
 
12.    使用
 
 
 
 
 

Network Topology Overview


Configure R1
configure zebra.conf

! -*- zebra -*-
!
! zebra sample configuration file
!
! $Id: zebra.conf.sample,v 1.1.1.1 2002/12/13 20:15:30 paul Exp $
!
hostname Router
password zebra
enable password zebra

! list Interfaces
interface eth0
ip address 192.168.1.2/24

interface eth2
ip address 192.168.10.2/24

interface lo

!
! Static default route sample.
! null route to consolidate all subnets in this /24
!ip route 192.168.10.0/24 Null0 255
ip route 172.16.71.0/24 eth0

!log file
log file /var/log/quagga/zebra.log

line vty
 

configure ripd.conf

! -*- rip -*-
!
! RIPd sample configuration file
!
! $Id: ripd.conf.sample,v 1.1.1.1 2002/12/13 20:15:30 paul Exp $
!
hostname ripd
password zebra
enable password zebra

!
debug rip events
debug rip packet

!
router rip
network 192.168.1.0/24
network 192.168.10.0/24

!
!log file ripd.log
log file /var/log/quagga/ripd.log
 

Configure R2
configure zebra.conf

! -*- zebra -*-
!
! zebra sample configuration file
!
! $Id: zebra.conf.sample,v 1.1.1.1 2002/12/13 20:15:30 paul Exp $
!
hostname Router
password xxx
enable password xxx

! list Interfaces
interface eth0
ip address 172.16.71.121/24

interface eth2
ip address 192.168.1.5/24

interface lo
! Static default route sample
ip route 0.0.0.0/0 192.168.1.2

!log file zebra.log
log file /var/log/zebra/zebra.log

!
line vty
 

configure ripd.conf

! -*- rip -*-
!
! RIPd sample configuration file
!
! $Id: ripd.conf.sample,v 1.1.1.1 2002/12/13 20:15:30 paul Exp $
!
hostname ripd
password zebra
enable password zebra

!
debug rip events
debug rip packet

!
router rip
network 172.16.71.0/24
network 192.168.1.0/24
network 192.168.2.0/24
!
!log file ripd.log
log file /var/log/ripd.log

!
line vty

Hint :
 '!'  for comment
config file is put in 'PREFIX'/etc directory
if you want start ripd daemon, you must start zebra daemon at first
Testing Connectivity
start zebra/ripd daemon
login zebra vty

 $ telnet localhost zebra
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

Hello, this is Quagga (version 0.98.5).
Copyright 1996-2005 Kunihiro Ishiguro, et al

User Access Verification

Password:
Router> show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route

K>* 0.0.0.0/0 via 140.114.71.254, eth1
C>* 10.0.0.0/8 is directly connected, eth1
C>* 127.0.0.0/8 is directly connected, lo
C>* 140.114.71.0/24 is directly connected, eth1
R 172.16.71.0/24 [120/2] via 192.168.1.5, eth0, 1d04h26m
S>* 172.16.71.0/24 [1/0] is directly connected, eth0
C>* 192.168.1.0/24 is directly connected, eth0
R>* 192.168.2.0/24 [120/2] via 192.168.1.5, eth0, 1d04h26m
C>* 192.168.10.0/24 is directly connected, eth2
Router>

login ripd vty

[]$ telnet localhost ripd
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.

Hello, this is Quagga (version 0.98.5).
Copyright 1996-2005 Kunihiro Ishiguro, et al.


User Access Verification

Password:
ripd> show ip rip
Codes: R - RIP, C - connected, S - Static, O - OSPF, B - BGP
Sub-codes:
(n) - normal, (s) - static, (d) - default, (r) - redistribute,
(i) - interface

Network Next Hop Metric From Tag Time
R(n) 172.16.71.0/24 192.168.1.5 2 192.168.1.5 0 02:40
C(i) 192.168.1.0/24 0.0.0.0 1 self 0
R(n) 192.168.2.0/24 192.168.1.5 2 192.168.1.5 0 02:40
C(i) 192.168.10.0/24 0.0.0.0 1 self 0
ripd>

linux路由器Quagga的安装

  • 2015年04月18日 22:26
  • 17KB
  • 下载

quagga安装、配置与更新

  • 2012年08月10日 15:22
  • 507KB
  • 下载

Quagga(zebra)安装配置

Zebos编译 以下是在ubuntu12.04实验并编译通过(理论上适用ubuntu10.04)   一、安装编译需要的工具 1. ./configure 报错 configure: error: G...
  • fzs333
  • fzs333
  • 2016年04月12日 18:44
  • 1289

Quagga配置及使用文档

  • 2011年11月12日 01:06
  • 759KB
  • 下载

quagga的安装与配置

首先下载Quagga 0.99.17到硬盘,然后在终端输入 tar –zxvf quagga-0.99.17.tar.gz 进入目录 #cd quagga-0.99.17 ...
  • nnqcqw
  • nnqcqw
  • 2014年04月18日 15:40
  • 302

linux下使用quagga配置ospf协议

环境:三台(VM虚拟机) 一、ospf协议   OSPF(Open Shortest Path First开放式最短路径优先)是一个内部网关协议(Interior Gatewa...

菜鸟学习网络协议软件Quagga,修改ospfd vty端口和编译安装

TIP:笔者的系统是红帽6U3,编译安装前记得把gcc各种依赖工具先安装上,避免编译出错     本文目的是为了学习如何编译安装开源软件Quagga,并修改下OSPF模块的vty登录端口号,...
  • onwer3
  • onwer3
  • 2013年07月14日 00:24
  • 2288

Linux下使用Quagga搭建软路由-OSPFv2学习

在学习路由协议如OSPF协议时,需要进行一个实操的练习,若手里又没有核心交换机,怎么破? 本文讲述了如何在Linux系统上搭建软路由环境,并使用OSPF路由协议完成路由表的学习。 Quagga是一款开...

Quagga安装过程记录

本篇是quagga安装过程中的记录,可以看下错误,但不具备教程意义。 目前问题:无法解决 f627@f627-OptiPlex-7040:/usr/local/sbin$ telnet l...

开源路由软件Quagga 源代码 编译/安装/运行/调试(Eclipse环境)

(http://siwind.iteye.com/blog/1745643) 安装:  0) 安装依赖软件包(--enable-vtysh需要)  #sudo apt-get insta...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:quagga安装和使用
举报原因:
原因补充:

(最多只允许输入30个字)