免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3669 | 回复: 0
打印 上一主题 下一主题

Ubuntu8.04上的Quagga初始化配置手册 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-21 18:09 |只看该作者 |倒序浏览

   
   
   
   
  Notes on Initializing Quagga for Ubuntu 8.04
  
   Illidan.modeler@gmail.com
  Northern Capital, Republic of Pandaria
  
  
  
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+.
   With
quagga we can turn an ordinary PC into a multiple-interface router. In
addition, it is easy to monitor and study routing/signaling traffic  if
the router software is run on a PC than on a commodity hardware router,
since we're able to run protocol analyzer software such as wireshark.
  
This short manual will show you how to run a quagga routing software,
with a very basic configuration. All the configuration work flow is
against the topology given below.
  
  
   

  
  
  
  
  Note:
In the text below, quagga commands, to be input in quagga CLIs, are
highlighted by  deep shadowed background color. Don't confuse them with
Linux shell commands, which are highlighted by light background color.
  
  0. Install the software
  sudo apt-get install quagga
  
  1. Prepare the configuration file
  cd /etc/quagga
  sudo cp /usr/share/doc/quagga/examples/ospf.conf.sample ospfd.conf
  
  
2. Start Quagga
  edit /etc/quagga/daemons
  
There's an entry for each daemon, with a default option of 'no'. Change
it to 'yes' to invoke it. For this experiment, change the options for ospf  and zebra to 'yes'.
  
  Start quagga with the following command:
  sudo /etc/init.d/quagga start
  
  It invokes those daemons with 'yes' in configuration file.
  
  3. Configure ospf paramters
  telnet 127.0.0.1 2604
  When it prompts for password, provide the default password 'zebra'.
  
  The default ports for quagga daemons' vty can be found at /etc/services.
  
  zebrasrv    2600/tcp            # zebra service
  zebra        2601/tcp            # zebra vty
  ripd        2602/tcp            # ripd vty (zebra)
  ripngd        2603/tcp            # ripngd vty (zebra)
  ospfd        2604/tcp            # ospfd vty (zebra)
  bgpd        2605/tcp            # bgpd vty (zebra)
  ospf6d        2606/tcp            # ospf6d vty (zebra)
  ospfapi        2607/tcp            # OSPF-API
  isisd        2608/tcp            # ISISd vty (zebra)
  
  You can also view the port in the fly by issuing a command 'sudo netstat -anp -A inet' to the Linux shell.
  
After  login, we get a quagga command line interface via the telnet
session. Configuring quagga ospf routing is almost identical to
configure Cisco ospf routing.Next, in quagga CLI, issue the following commands.
  
  enable
  configure terminal
  
  At this point, we've entered the configuration mode. Configure an ospf process to advertise network 192.168.1.0/24.
  
  router ospf
  network 192.168.1.0/24 area 0
  
Since quagga currently doesn't support multiple ospf processes, there's
no process id at the end of line 'router ospf'. And please note that
this ospf process is not a process to the operating system Linux. It's
a 'logical' process within quagga's realm.
  
  4. Configre the Cisco router
  At this point, we might start our wireshark if we want to view the OSPF packets, such as Hello, LS Update, LS Ack, etc.
  
  The cisco router is configured to advertise network 192.168.1.0/24 and 192.168.3.0/24 for OSPF.
  
  !
  interface Ethernet0/0
   ip address 192.168.1.100 255.255.255.0
   ip route-cache flow
   half-duplex
  !
  interface Ethernet0/1
   ip address 192.168.3.100 255.255.255.0
   ip route-cache flow
   half-duplex
  !
  router ospf 1
   log-adjacency-changes
   network 192.168.1.0 0.0.0.255 area 0
   network 192.168.3.0 0.0.0.255 area 0
  !
  
  5. Verify
  zebra
is an IP routing manager. It provides kernel routing table updates,
interface lookups, and redistribution of routes between different
routing protocols.
  
  Log in zebra vty to view the IP forwarding table.
  
  telnet 127.0.0.1 2601
  
  Router> show ip route
  Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
         I - ISIS, B - BGP, > - selected route, * - FIB route
  ...
  O>* 192.168.3.0/24 [110/20] via 192.168.1.100, ath0, 00:01:54
  
  We can see that quagga has learned the route of 192.168.3.0/24 via ospf.
  
  In a common BASH, try
  ping 192.168.3.100
  
  PING 192.168.3.100 (192.168.3.100) 56(84) bytes of data.
  64 bytes from 192.168.3.100: icmp_seq=1 ttl=255 time=12.2 ms
  64 bytes from 192.168.3.100: icmp_seq=2 ttl=255 time=2.23 ms
  64 bytes from 192.168.3.100: icmp_seq=3 ttl=255 time=2.30 ms
  
  
  
  


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/22344/showart_1087906.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP