实例介绍
Quagga是一个基本的软件路由器,前身是Zebra。 现在在做实验研究都要使用,小型的网络管理也可以使用。 Quagga的配置和一般的路由器基本一致,这个文档中给予了介绍,而且对于其中的一些机制进行了介绍
Table of Contents 1 Overview 1 1.1 About Quagga 1.2 System Architecture 2 1.3 Supported Platforms............ 1.4 Supported RFCs ,,鲁 1.5Ho get Qu magga 1.6 Mailing list 1.7 Bug reports.… 234445 2 Installation,,,,,,,,,,,,,。,,,,,,。,,,,,, 2.1 Configure thc Softwarc.................... 5 2.1.1 The Configure script and its options 2.1.2 Least-Privilege support 6 2.1.3 Linux notes 7 2.2 Build the Software 2.3 Install the software 3 Basic commands 3.1 Config Commands 3.1.1 Basic Config Commands 9 3.1.2 Sample Config File 3.2 Terminal modc commands Invocation Options 12 3.4 Virtual terminal interfaces 13 3.4.1 VTY Overview 13 3.4.2 VTY Modes 14 3.4.2.1 VTY View mode ..14 3.4.2.2 VTY Enable mode 14 3.4.2.3 VTY Other modes 14 3.4.3 VTY CLI Commands 14 3.4.3.1 CLI Movement commands 3.4.3.2 cli Editing Commands 15 3.4.3.3 cli Advanced Commands 4 Zebra 17 4.1 Invoking zebra 17 4.2 Intcrfacc Commands ..,17 4.3 Static route commands 18 4.4 zebra Terminal mode Commands Quagga 5 RIP 。,21 5.1 Starting and Stopping rid 21 5.1.1 RIP netmask 21 5.2 RIP Configuration 22 5.3 RIP Version Control 23 5.4 How to Announce rip route 24 5.5 Filtering RIP Routes 25 5.6 RIP Metric Manipulation 25 5.7 riP distance .....25 5.8 RIP route-map. 26 5.9 RIP Authentication 鲁,鲁 27 5.10 RIP Timers 28 5.11 Show RIP Information ,,,,28 5.12 RIP Debug Commands 29 6 RIPng ···.············· ,,,。,,,,31 6.1 Invoking ripngd 鲁, .,.31 6.2 ripngd Configuration 31 6.3 ripngd Terminal mode commands ,,,,,, 31 6.4 ripngd Filtering Commands 31 7 OSPFv2 33 7. 1 Configuring ospfd 33 7.2 OSPF router 33 7.3 OSPF area 36 7.4 OSPF interface 39 7.5 Redistribute routes to OSPF 40 7.6 Showing OSPF information 42 7.7 Debugging OsPF ,42 7. 8 OSPF Configuration Examples 43 8 OSPFv3 45 8.1 OSPF6 router 45 8.2 OSPF6 area 45 8.3 OSPF6 interface 45 8. 4 Redistribute routes to OsPF 45 8.5 Showing OSPF6 information 46 8.6 OSPF6 Configuration Examples 46 9BGP,.。,,,,, 47 9.1 Starting bgP 鲁,垂 ......47 9. 2 BGP router 47 9. 2. 1 bGP distance 47 9. 2. 2 BGP decision process 18 9.3 BGP network 48 9.3.1 BGP route 48 9.3.2 Route Aggregation................... 48 9.3.3 Rcdistributc to BGP 48 9.4 BGP Peer 49 9.4.1 Defining Peer 49 9.4.2 BGP Peer commands 49 9.4.3 Peer filtering ·要·静,,, 50 9.5 BGP Peer Group ·· 51 9.6 bGP Address famil 51 9.7 Autonomous System 51 9.7.1 AS Path Regular Expression 51 9.7.2 Display bgP routes by As Path 51 9. 7.3 AS Path Access List 52 9.7. 4 Using AS Path in Route Map ..52 9.7.5 Private As Numbers ,,,,52 9. 8 BGP Communities attribute 鲁鲁 52 9.8. 1 BGP Conmunity lists 春 申鲁,,,,鲁 53 9.8.2 Numbered BGP Community Lists 54 9.8.3 BGP Community in Route map 54 9.8. 4 Display BGP routes by Community 9.85 Using BGP Communities Attribute∴…. 55 55 9.9 BGP Extcndcd Communitics Attribute 57 9.9.1 BGP Extended Community Lists ,,,,57 9.9.2 BGP Extended Communitics in Route Map.......58 9.10 Displaying BGP Routes 58 9. 10.1 Show IP bgP ·····.,···· 58 9.10.2 More Show IP bgP 59 9.11 Capability Negotiation 60 9.12 Route reflector 61 9. 13 Route Server .61 9.13.1 Multiple instance 61 9. 13.2 BGP instance and view 62 9.13.3 Routing policy 63 9. 13. 4 Viewing the view 63 9.14 How to set up a 6-Bone connection 63 9. 15 Dump BGP packets and table ......64 9.16 BGP Configuration Examples 6 Quagga 10 Configuring Quagga as a Route Server.. 71 10.1 Description of the Route Server model .71 10.2 Commands for configuring a Route Server.......... 75 10.3 Example of Route Server Configuration 76 10.3.1 Configuration of the bGP routers without Route Server. 77 10.3.2 Configuration of the bgP routers with route Server 10.3.3 Configuration of the route Server itself ·· 79 10.3.4 Further considerations about Import and Export route-maps 81 11 VTY Shell 83 11.1 VTY Shell username ...,,,,,,83 11.2 VTY shell integrated configuration ..,.,,83 12 Filtering 85 12.1 IP Access list 12.2 IP Prefix List 85 12.2.1 ip prefix-list description 12.2.2i fix-list sequential number control 86 12.2. 3 Showing ip prefix-list 86 12.2.4 Clear counter of ip prefix-list 87 13 Route Map 89 13.1 Roule Map Command................... 90 13.2 Route Map Match Command 90 13.3 Route Map Set Command ,,,,,,,,,91 13.4 Route Map call command 13.5 Route Map Exit Action Command ·.··.·: 91 91 13.6 Route Map examples 91 14 IPv6 Support 9 14.1 Router advertisement 93 15 Kernel Interface 97 16 SNMP Support 99 16.1 Getting and installing an SNMP agent 16.2 SMUX cOnfiguration............. 16.3 MIB and command reference ····.······ ...,,,,100 16. Handling SNMP Traps ,,,,,,,,100 Appendix a Zebra Protocol 105 A 1 Overview of the Zebra Protocol ·.··· 105 A2 Zebra protocol definition 105 A 2.1 Zebra Protocol Header(version 0 105 A 2.2 Zebra Protocol Common Header(version 1)............ 105 A 2.3 Zebra protocol header field definitions 105 A 2.4 Zebra Protocol Commands 106 Appendix b Packet Binary Dump Format. 107 Command index 111 VTY Key Index 117 Index 119 Quagga Chapter 1: Overview 1Oⅴ envies 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 1.4 Supported RFCs], page 3). Quagga also supports special BGP Route reflector and route server behavior. In addition to traditional TPv4 routing proto- cols, Quagga also supports IPv6 routing protocols. With SNMP daemon which supports SMUX protocol, Quagga provides routing protocol MIBs(see Chapter 16[SNMP Support page 99) 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 programs client user interface Quagga is distributed under the GNU General Public License 1 About Quagga Today, TCP/IP networks are covering all of the world. The Internet has been deployed in many countrics, companics, and to the homc. 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 orotocol support, Quagga can setup interface's flags, interface's ad- dress, 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 up the nd put a lew mands about static rout routes. If the network is rather large, or if the network structure changes frequently, you will want to take advantage of Quaggas dynamic routing protocol support for protocols such as rip ospf or bgp Traditionally, UNIX based router configuration is done by ifconfig and route com- mands. 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 mcthod. Therc arc two uscr modes in Quagga. Onc is normal modc, the other is enable mode. Normal mode user can only view system status, enable mode user can change sys tem configuration. This UNIX account independent feature will be great help to the router administrator Currently, Quagga supports common unicast routing protocols. Multicast routing pro- tocols 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 Quagga 2 System Architecturc Traditional routing software is made as a one process program which provides all of the routing protocol functionalities. Quagga lakes a dierent approach. It is made from a collection of several daemons that work together to build the routing table. There may be everal 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 scnd routing rcports to a contral routing consolo There is no need for these daemons lo 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 syst ++ ++一---- I bgpd lripdI lospfdI |zebra UNIX Kernel routing table Quagga System Architecture Multi-process architecture brings extensibility, modularity and maintainability. At the samc timc 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 dont use threads at all. Instead we use the select(2) system call for multiplexing the events 1.3 Supported Platforms Currently Quagga supports GNU/Linux, BSD and Solaris. Porting Quagga to other plat- forms 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 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论