﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-烂漫时空-文章分类-电子书籍 &amp; 软件下载</title><link>http://www.blogjava.net/net/category/6300.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 27 Feb 2007 12:34:53 GMT</lastBuildDate><pubDate>Tue, 27 Feb 2007 12:34:53 GMT</pubDate><ttl>60</ttl><item><title>Visual Studio.Net 2003简体中文企业版(带MSDN)</title><link>http://www.blogjava.net/net/articles/26877.html</link><dc:creator>烂漫时空</dc:creator><author>烂漫时空</author><pubDate>Fri, 06 Jan 2006 06:29:00 GMT</pubDate><guid>http://www.blogjava.net/net/articles/26877.html</guid><wfw:comment>http://www.blogjava.net/net/comments/26877.html</wfw:comment><comments>http://www.blogjava.net/net/articles/26877.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/net/comments/commentRss/26877.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/net/services/trackbacks/26877.html</trackback:ping><description><![CDATA[<P><FONT face="Courier New" size=2>&nbsp;&nbsp;&nbsp; Visual Studio .NET 向开发人员提供最具效率的工具，用于为 Microsoft Windows 和 Web 创建下一代应用程序。Visual Studio .NET Enterprise Architect (VSEA) 通过包括其他用于设计、指定和沟通应用程序结构和功能的能力，基于 Visual Studio .NET Enterprise Developer 而创建。它使软件设计师和高级开发人员能够提供结构指导并在整个开发小组内共享最佳做法。有了 Visual Studio .NET Enterprise Architect，设计师和高级开发人员就可以为 XML Web 服务和应用程序明确定义应用程序功能和结构。数据库的概念模型使数据库设计人员和分析人员能够捕获业务要求，并确保业务要求能够精确地反映数据库模型和数据库的物理设计。企业模板便于创建开发准则和策略、与经验较少的成员共享高级开发人员和设计师的知识、为他们的项目创建可重复使用的应用程序框架。基于统一模型语言 (UML) 的应用程序模型确保结构和功能在编码之前被清楚地记录和沟通。 <BR><FONT color=#000000><STRONG><BR>包括以下四种编程语言：</STRONG></FONT><BR>Visual Basic .NET 2003 Visual C# .NET 2003 Visual C++ .NET 2003 Visual J# .NET 2003 <BR></FONT></P>
<P><FONT face="Courier New" size=2>MSDN，全名为 Microsoft Developer Network（微软开发者网络），是 Microsoft 公司为开发人员提供所需的工具、技术、培训、信息、事件、以及其他一些技术资料的主要项目。在MSDN中包含MSDN Library（开发库），包含上千兆字节的开发人员所必须的信息、文档、示例代码、技术文章等等 </FONT></P>
<P><BR><FONT face="Courier New" size=2>安装序列号:<FONT color=#ff0000>QMVXY-93XBP-4CQP3-VG9H3-R2Q39</FONT></FONT></P>
<P><FONT face="Courier New" size=2>1. Visual Studio.Net 2003 简体中文企业版 Visio流程图制作工具</FONT></P>
<P><FONT face="Courier New" size=2>2. Visual Studio.Net 2003 简体中文企业版主程序_CD1</FONT></P>
<P><FONT face="Courier New" size=2>3. Visual Studio.Net 2003 简体中文企业版主程序_CD2</FONT></P>
<P><FONT face="Courier New" size=2>4. Visual Studio.Net 2003 简体中文企业版 MSND_CD1</FONT></P>
<P><FONT face="Courier New" size=2>5. Visual Studio.Net 2003 简体中文企业版 MSND_CD2</FONT></P>
<P><FONT face="Courier New" size=2>6. Visual Studio.Net 2003 简体中文企业版 MSND_CD3</FONT></P>
<P><FONT face="Courier New" size=2>7.Visual Studio.Net 2003 简体中文企业版必须环境</FONT></P>
<P><FONT face="Courier New" color=#000000 size=2><STRONG>下载页面:</STRONG></FONT></P>
<P><A href="http://www.rescn.net/Software/Catalog13/149.html" target=_blank></A>&nbsp;&nbsp;&nbsp; <A href="http://www.rescn.net/Software/Catalog13/149.html" target=_blank><FONT face="Courier New" color=#000080 size=2>http://www.rescn.net/Software/Catalog13/149.html</FONT></A><BR><BR>&nbsp;&nbsp;&nbsp; <A href="http://www.a5d.com/SoftView/SoftView_74.asp" target=_blank><FONT face="Courier New" color=#000080 size=2>http://www.a5d.com/SoftView/SoftView_74.asp</FONT></A></A></P>
<P><A href="http://www.zdcn.com/softview/softview_705.html" target=_blank></A>&nbsp;&nbsp;&nbsp; <A href="http://www.zdcn.com/softview/softview_705.html" target=_blank><FONT face="Courier New" color=#000080 size=2>http://www.zdcn.com/softview/softview_705.html</FONT></A></A></P><img src ="http://www.blogjava.net/net/aggbug/26877.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/net/" target="_blank">烂漫时空</a> 2006-01-06 14:29 <a href="http://www.blogjava.net/net/articles/26877.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Zebra基本配置 </title><link>http://www.blogjava.net/net/articles/25756.html</link><dc:creator>烂漫时空</dc:creator><author>烂漫时空</author><pubDate>Wed, 28 Dec 2005 09:25:00 GMT</pubDate><guid>http://www.blogjava.net/net/articles/25756.html</guid><wfw:comment>http://www.blogjava.net/net/comments/25756.html</wfw:comment><comments>http://www.blogjava.net/net/articles/25756.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/net/comments/commentRss/25756.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/net/services/trackbacks/25756.html</trackback:ping><description><![CDATA[<DIV dir=ltr style="TEXT-ALIGN: left"><FONT face="Courier New" size=2><FONT color=#000000><STRONG>前言</STRONG><BR><BR>Zebra是一个路由软件包，提供基于TCP/IP路由服务，支持RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP- 4,<BR>和 BGP-4+等众多路由协议。Zebra还支持BGP特性路由反射器（Route Reflector）。除了传统的 IPv4路由协议，Zebra也支持IPv6路由协议。如果运行的SNMP守护进程（需要ucd-snmp）支持SMUX协 议，Zebra还能支持路由协议MIBs。<BR><BR>由以上可见，Zebra的确是一个很不错的路由系统，但比起真正的路由器就简直是小儿科，所以网络高手 就当这文章是小孩子过家家吧，而对于象我这样的初学者（特别是没有真实设备或足够设备进行实验） 也不失为一个学习和熟悉路由配置、路由协议的好工具。我没有实际的配置经验，对路由的技术细节也 不是十分清晰，完全是在扔破砖头。希望路由高手指正概念错误。<BR><BR>安装<BR><BR>Zebra目前最新的版本是0.92a，它的安装非常简单，我们只需从</FONT></FONT><A href="http://www.zebra.org%20下载&nbsp;zebra-/" target=_blank><FONT face="Courier New" color=#000000 size=2>http://www.zebra.org 下载<BR>&nbsp;zebra-</FONT></A><FONT face="Courier New" size=2><FONT color=#000000>0.92a.tar.gz，然后执行以下命令安装（本文环境是RedHat7.2）：<BR><BR>shell&gt; tar xzf zebra-0.92a.tar.gz<BR>shell&gt; cd zebra-0.92a<BR>shell&gt; ./configure<BR>shell&gt; make<BR>shell&gt; make install<BR><BR>这样Zebra就安装好了，安装的执行文件：<BR><BR>shell&gt; ls /usr/local/sbin<BR>bgpd&nbsp; ospfd&nbsp; ripd&nbsp; zebra<BR><BR><STRONG>配置文件：</STRONG><BR><BR>shell&gt; ls /usr/local/etc<BR>bgpd.conf.sample&nbsp;&nbsp; ospfd.conf.sample&nbsp; zebra.conf.sample<BR>bgpd.conf.sample2&nbsp; ripd.conf.sample<BR><BR><STRONG>运行</STRONG><BR><BR>编译安装完Zebra后，可以看到有4个可执行文件和5个配置样本文件，我们就使用它的配置样本文件：<BR><BR>shell&gt; cd /usr/local/etc<BR>shell&gt; cp zebra.conf.sample zebra.conf<BR><BR>Zebra的各进程有各自的终端接口或VTY，如果我们需要给连接到它们的端口设置别名的话，在/etc/ services<BR><BR><STRONG>文件添加如下内容：</STRONG><BR><BR>zebrasrv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2600/tcp&nbsp;&nbsp; # zebra service<BR>zebra&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2601/tcp&nbsp;&nbsp; # zebra vty<BR>ripd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2602/tcp&nbsp;&nbsp; # RIPd vty<BR>ripngd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2603/tcp&nbsp;&nbsp; # RIPngd vty<BR>ospfd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2604/tcp&nbsp;&nbsp; # OSPFd vty<BR>bgpd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2605/tcp&nbsp;&nbsp; # BGPd vty<BR>ospf6d&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2606/tcp&nbsp;&nbsp; # OSPF6d vty<BR><BR>然后就可以启动Zebra了：<BR><BR>shell&gt; zebra -d<BR><BR>这样，Zebra就以守护进程启动了，其它的参数请参考zebra -h。<BR><BR>基本路由配置命令<BR><BR><STRONG>直接用telnet连接：</STRONG><BR><BR>shell&gt; telnet localhost 2601<BR>Trying 127.0.0.1...<BR>Connected to localhost.<BR>Escape character is '^]'.<BR><BR>Hello, this is zebra (version 0.92a).<BR>Copyright 1996-2001 Kunihiro Ishiguro.<BR><BR><BR>User Access Verification<BR><BR>Password:<BR><BR>Zebra会提示输入口令，我们通过/usr/local/etc/zebra.conf可以看到口令是zebra，enable口令也是zebra。<BR><BR>输 入口令zebra，得到路由器用户模式提示符：<BR><BR>Router&gt;<BR><BR>进入特权模式：<BR><BR>Router&gt; en<BR>Password:<BR>Router#<BR><BR>输入一个问号，看看Zebra提供了多少路由命令：<BR><BR>Router# ?<BR>&nbsp; configure&nbsp; Configuration from vty interface<BR>&nbsp; copy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copy configuration<BR>&nbsp; debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debugging functions (see also 'undebug')<BR>&nbsp; disable&nbsp;&nbsp;&nbsp; Turn off privileged mode command<BR>&nbsp; end&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End current mode and change to enable mode.<BR>&nbsp; exit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit current mode and down to previous mode<BR>&nbsp; help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description of the interactive help system<BR>&nbsp; list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Print command list<BR>&nbsp; no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Negate a command or set its defaults<BR>&nbsp; quit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit current mode and down to previous mode<BR>&nbsp; show&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Show running system information<BR>&nbsp; terminal&nbsp;&nbsp; Set terminal line parameters<BR>&nbsp; who&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Display who is on vty<BR>&nbsp; write&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write running configuration to memory, network, or terminal<BR><BR>提供的命令很少，实际路由器好多命令都没有，我们只能用有限的命令投入到无限的实验中去。<BR><BR>Router# sh run<BR><BR>Current configuration:<BR>!<BR>hostname Router<BR>password zebra<BR>enable password zebra<BR>!<BR>interface lo<BR>!<BR>interface eth0<BR>!<BR>line vty<BR>!<BR>end<BR><BR>Zebra把操作系统的网络接口当做路由器的接口，所以在做比较复杂的路由实验，会需要比较多的网卡。<BR><BR>进入全局模式，尽可能把实际可用的配置命令都实验一遍：<BR><BR>Router# conf t<BR>Router(config)#<BR><BR>自己取一个路由器名字：<BR><BR>Router(config)# hostname r1<BR>r1(config)#<BR><BR>Zebra比较简单，登陆口令不是在line下修改，而是直接在全局模式下用password修改<BR><BR>r1(config)# password {password}<BR><BR>Zebra不支持enable secret {password}这种MD5加密口令，只能使用enable password {password}来修改 <BR><BR>enable口令：<BR><BR>r1# conf t<BR>r1(config)# enable password {password}<BR><BR>在路由器配置中加密所有的口令：<BR><BR>r1(config)# service password-encryption<BR><BR></FONT><FONT color=#000000><STRONG>回到特权模式：<BR></STRONG><BR>r1(config)# exit<BR>r1# sh run<BR><BR>Current configuration:<BR>!<BR>hostname r1<BR>password 8 alA5.vcyMAwXQ<BR>enable password 8 ksbxOFN8xcFMc<BR>service password-encryption<BR>!<BR>interface lo<BR>!<BR>interface eth0<BR>!<BR>line vty<BR>!<BR>end<BR><BR>我们看到刚才的明文密码都进行加密了，给我们的实验机也提高安全性。Zebra有一点比较恶心，如果我 们先设置了service password-encryption，然后再修改口令，sh run就发现口令又都是明文的了，但是由于有<BR>service password-encryption，所以就无法登陆了。<BR><BR>去掉会话超时，免得10分钟没有动作，就把我们给踢了。但是在实际的路由器配置中，为安全起见我们 最好还是设上会话超时。<BR><BR>r1# conf t<BR>r1(config)# line vty<BR>r1(config-line)# exec-timeout 0 0<BR><BR>设置日志记录，Zebra可以把日志记录到标准输出、syslog、以及指定输出文件：<BR><BR>r1(config-line)# exit<BR>r1(config)# log stdout<BR>r1(config)# no log stdout<BR>r1(config)# log syslog<BR>r1(config)# no log syslog<BR>r1(config)# log file /usr/local/etc/zebra.log<BR><BR>配置接口IP地址：<BR><BR>r1(config)# int lo<BR>r1(config-if)# ip address 127.0.0.1/8<BR>r1(config-if)# exit<BR>r1(config)# int eth0<BR>r1(config-if)# ip address 192.168.5.121/24<BR><BR>Zebra比较奇怪，不能使用ip address 192.168.5.121 255.255.255.0这种形式设置IP。测试一下，就设置成和Linux中使用的一样。<BR><BR>保存我们刚才的配置：<BR><BR>r1(config-if)# exit<BR>r1(config)# exit<BR>r1# copy run start<BR>Configuration saved to /usr/local/etc/zebra.conf<BR>r1#<BR><BR><BR><STRONG>2、用Zebra做简单的RIP实验</STRONG><BR><BR>RIP是应用较早、使用较普遍的IGP，适用于小型同类网络，是典型的距离向量(distance-vector)协 议。RIP通过广播UDP报文来交换路由信息，每30秒发送一次路由信息更新。RIP提供跳跃计数(hop count)作为尺度来衡量路由距，跳跃计数是一个包到达目标所必须经过的路由器的数目。如果到相同 目标有二个不等速或不同带宽的路由器，但跳跃计数相同，则RIP认为两个路由是等距离的。RIP最多支 持的跳数为15，即在源和目的网间所要经过的最多路由器的数目为15，跳数16表示不可达。RIPv2支持 验证、密钥管理、路由汇总、无类域间路由(CIDR)和变长子网掩码(VLSMs)。<BR><BR>Zebra支持RIPv2，使用ripd程序实现RIP路由功能，但ripd程序需要在zebra程序读取接口信息，所以zebra 一定要在ripd之前启动。由于条件所限，下面的RIP实验是在两台单网卡的RedHat7.2下做的，所以只是 最简单的演示。<BR><BR>按照上面基本配置的方法初始化第一台机器：<BR><BR>shell_1&gt; cd /usr/local/etc<BR>shell_1&gt; cp zebra.conf.sample zebra.conf<BR>shell_1&gt; cp ripd.conf.sample ripd.conf<BR>shell_1&gt; zebra -d<BR><BR>进入zebra设置IP<BR><BR>shell_1&gt; telnet localhost 2601<BR>Password:<BR>Router&gt; en<BR>Password:<BR>Router# conf t<BR>Router(config)# hostname r1<BR>r1(config)# int eth0<BR>r1(config-if)# ip address 192.168.5.121/24<BR>r1(config-if)# ctrl+z<BR>r1# copy run start<BR><BR>进入第一台机器的rip设置<BR><BR>shell_1&gt; ripd -d<BR>shell_1&gt; telnet localhost 2602<BR>Password:<BR>ripd&gt; en<BR>ripd# conf t<BR>ripd(config)# hostname r1_ripd !改个名字好辨认<BR>r1_ripd(config)# router rip !启动rip<BR>r1_ripd(config-router)# network 192.168.5.0/24 !RIPv1是有类别路由协议，RIPv2是无类别路由协议，<BR>Zebra 默认支持RIPv2，指定网络需要子网掩码。<BR><BR>r1的RIP简单配置这样就可用了，下面来检验一下：<BR><BR>r1_ripd# sh ip protocols<BR>Routing Protocol is "rip"<BR>&nbsp; Sending updates every 30 seconds with +/-50%, next due in 3 seconds<BR>&nbsp; Timeout after 180 seconds, garbage collect after 120 seconds<BR>&nbsp; Outgoing update filter list for all interface is not set<BR>&nbsp; Incoming update filter list for all interface is not set<BR>&nbsp; Default redistribution metric is 1<BR>&nbsp; Redistributing:<BR>&nbsp; Default version control: send version 2, receive version 2<BR>&nbsp;&nbsp;&nbsp; Interface&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Send&nbsp; Recv&nbsp;&nbsp; Key-chain<BR>&nbsp;&nbsp;&nbsp; eth0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; 2<BR>&nbsp; Routing for Networks:<BR>&nbsp;&nbsp;&nbsp; 192.168.5.0/24<BR>&nbsp; Routing Information Sources:<BR>&nbsp;&nbsp;&nbsp; Gateway&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BadPackets BadRoutes&nbsp; Distance Last Update<BR>&nbsp; Distance: (default is 120)<BR><BR>我们看到RIP已经起来了，是RIPv2。<BR><BR>r1_ripd# sh ip rip<BR>Codes: R - RIP, C - connected, O - OSPF, B - BGP<BR><BR>&nbsp;&nbsp; Network&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next Hop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metric From&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Time<BR><BR>由于就两个接口直连，没有其它网络，所以sh ip rip看不到什么。<BR><BR>Zebra对log处理可能有些问题，使用log stdout不能显示各种debug信息，所以只能记录到文件，在shell下 用tail命令查看。<BR><BR>r1_ripd# debug rip events<BR>r1_ripd# debug rip packet<BR>r1_ripd(config)# log file /usr/local/etc/ripd.log<BR><BR>然后我们在shell下查看debug信息<BR><BR>shell_1&gt; tail -f /usr/local/etc/ripd.log<BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/28 22:17:44 RIP: update timer fire!<BR>2002/04/28 22:17:44 RIP: SEND UPDATE to eth0 ifindex 2<BR>2002/04/28 22:17:44 RIP: multicast announce on eth0<BR>2002/04/28 22:17:44 RIP: update routes on interface eth0 ifindex 2<BR>2002/04/28 22:18:23 RIP: update timer fire!<BR>2002/04/28 22:18:23 RIP: SEND UPDATE to eth0 ifindex 2<BR>2002/04/28 22:18:23 RIP: multicast announce on eth0<BR>2002/04/28 22:18:23 RIP: update routes on interface eth0 ifindex 2<BR>2002/04/28 22:19:04 RIP: update timer fire!<BR>2002/04/28 22:19:04 RIP: SEND UPDATE to eth0 ifindex 2<BR>2002/04/28 22:19:04 RIP: multicast announce on eth0<BR>2002/04/28 22:19:04 RIP: update routes on interface eth0 ifindex 2<BR>--------------------------------8&lt;---------------------------------------<BR><BR>RIP每隔30秒发送一次更新，在sh ip prot可以看到Sending updates every 30 seconds with +/-50%第二台机器的设置<BR><BR>前面的初始化和第一台一样，不过这里名字设成r2便于辨认，IP设成了192.168.5.123/24。<BR><BR>进入第二台机器的rip设置<BR><BR>shell_2&gt; ripd -d<BR>shell_2&gt; telnet localhost 2602<BR>Password:<BR>ripd&gt; en<BR>ripd# conf t<BR>ripd(config)# hostname r2_ripd<BR>r2_ripd(config)# router rip<BR>r2_ripd(config-router)# network 192.168.5.0/24<BR><BR>执行完network命令，我们看到第一台机器的tail -f /usr/local/etc/ripd.log输出下面的信息：<BR><BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/28 22:19:15 RIP: RECV packet from 192.168.5.123 port 520 on eth0<BR>2002/04/28 22:19:15 RIP: RECV REQUEST version 2 packet size 24<BR>2002/04/28 22:19:15 RIP:&nbsp;&nbsp; 0.0.0.0/0 -&gt; 0.0.0.0 family 0 tag 0 metric 16<BR>2002/04/28 22:19:15 RIP: update routes to neighbor 192.168.5.123<BR>2002/04/28 22:19:35 RIP: update timer fire!<BR>2002/04/28 22:19:35 RIP: SEND UPDATE to eth0 ifindex 2<BR>2002/04/28 22:19:35 RIP: multicast announce on eth0<BR>2002/04/28 22:19:35 RIP: update routes on interface eth0 ifindex 2<BR>--------------------------------8&lt;---------------------------------------<BR><BR>r1通过UDP广播接收到192.168.5.123的更新包，并且把192.168.5.123设为neighbor。<BR><BR>保存一下配置<BR><BR>r1_ripd# copy run start<BR>Configuration saved to /usr/local/etc/ripd.conf<BR>r2_ripd# copy run start<BR>Configuration saved to /usr/local/etc/ripd.conf<BR><BR>Zebra还支持很多RIP功能，如果Filtering RIP Routes, RIP route-map, RIP Authentication等，有条件有时间 的话可以做更复杂的实验。<BR><BR>3、用Zebra做OSPF实验<BR><BR>OSPF（开放最短路径优先）路由协议是一项链路状态型技术，是目前IGP中应用最广、性能最优的一个 协议，解决了RIP不能解决的大型、可扩展的网络需求而写的，适用于大规模的网络。<BR><BR>Zebra支持OSPFv2和OSPFv3（用于IPv6的OSPF，CISCO还未对其封装），由于条件所限，下面的OSPF实 验同样是在两台单网卡的RedHat7.2下做的。<BR>Zebra使用ospfd程序实现OSPF路由功能，但ospfd需要从zebra程序获得接口信息，所以zebra程序必须在 ospfd程序之前运行。ospfd不支持多个OSPF进程，我们不能指定OSPF进程号。<BR><BR>初始化第一台机器：<BR><BR>shell_1&gt; cd /usr/local/etc<BR>shell_1&gt; cp zebra.conf.sample zebra.conf<BR>shell_1&gt; cp ospfd.conf.sample ospfd.conf<BR>shell_1&gt; zebra -d<BR><BR>进入zebra设置IP<BR><BR>shell_1&gt; telnet localhost 2601<BR>Password:<BR>Router&gt; en<BR>Password:<BR>Router# conf t<BR>Router(config)# hostname r1<BR>r1(config)# int eth0<BR>r1(config-if)# ip address 192.168.5.121/24<BR>r1(config-if)# ctrl+z<BR>r1# copy run start<BR><BR>进入第一台机器的ospf设置<BR><BR>shell_1&gt; ospfd -d<BR>shell_1&gt; telnet localhost 2604<BR>Password:<BR>ospfd&gt; en<BR>ospfd# conf t<BR>ospfd(config)# hostname r1_ospfd !改个名字好辨认<BR>r1_ospfd(config)# router ospf !启动ospf<BR>r1_ospfd(config-router)# ospf router-id 192.168.5.121 !设置router-id<BR>r1_ospfd(config-router)# network 192.168.5.0/24 area 0<BR>!最关键的，来标识路由器上哪些IP网络号是OSPF的一部分，对于每个网络，我们必须标识该网络所属 的区域。由于我们只有两台机器，当然只有一个网络，所以只需执行一个network命令就够了。<BR><BR>对于我们的小网络，ospf就算配好了，下面来检验一下：<BR><BR>r1_ospfd(config-router)# ctrl+z<BR>r1_ospfd# sh ip ospf route<BR>============ OSPF network routing table ============<BR>N&nbsp;&nbsp;&nbsp; 192.168.5.0/24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [10] area: 0.0.0.0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; directly attached to eth0<BR><BR>============ OSPF router routing table =============<BR><BR>============ OSPF external routing table ===========<BR><BR>r1_ospfd# sh ip ospf database<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OSPF Router with ID (192.168.5.121)<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Router Link States (Area 0.0.0.0)<BR><BR>Link ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADV Router&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Age&nbsp; Seq#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CkSum&nbsp; Link count<BR>192.168.5.121&nbsp;&nbsp; 192.168.5.121&nbsp;&nbsp;&nbsp; 126 0x80000002 0x8584 1<BR><BR>r1_ospfd# sh ip ospf int eth0<BR>eth0 is up, line protocol is up<BR><BR>&nbsp; Internet Address 192.168.5.121/24, Area 0.0.0.0<BR>&nbsp; Router ID 192.168.5.121, Network Type BROADCAST, Cost: 10<BR>&nbsp; Transmit Delay is 1 sec, State DR, Priority 1<BR>&nbsp; Designated Router (ID) 192.168.5.121, Interface Address 192.168.5.121<BR>&nbsp; No backup designated router on this network<BR>&nbsp; Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5<BR>&nbsp;&nbsp;&nbsp; Hello due in 00:00:07<BR>&nbsp; Neighbor Count is 0, Adjacent neighbor count is 0<BR><BR>由于网络里没有其它的路由器，r1就把自己选为DR（指定路由器）了。Zebra对log处理可能有些问题，使用log stdout不能显示各种debug信息，所以只能记录到文件，在shell下用tail命令查看。而且debug命令和实际路由器也有不同。<BR><BR>r1_ospfd# debug ospf event<BR>r1_ospfd(config)# log file /usr/local/etc/ospfd.log<BR><BR>然后我们在shell下查看debug信息<BR><BR>shell_1&gt; tail -f /usr/local/etc/ospfd.log<BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/28 14:24:27 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 14:24:37 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 14:24:47 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 14:24:57 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 14:25:07 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>--------------------------------8&lt;---------------------------------------<BR><BR>我们错过了最开始的信息，看到路由器每隔10秒发送一个hello数据包。hello数据包通过多目组播地址224.0.0.5被发送出去，如果我们打开debug ospf packet all就能很清楚的看到。<BR><BR>第二台机器的设置<BR><BR>前面的初始化和第一台一样，不过这里名字设成r2便于辨认，IP设成了192.168.5.123/24。<BR><BR>进入第二台机器的ospf设置<BR><BR>shell_2&gt; ospfd -d<BR>shell_2&gt; telnet localhost 2604<BR>Password:<BR>ospfd&gt; en<BR>ospfd# conf t<BR>ospfd(config)# hostname r2_ospfd<BR>r2_ospfd(config)# router ospf<BR>r2_ospfd(config-router)# ospf router-id 192.168.5.123<BR>r2_ospfd(config-router)# network 192.168.5.0/24 area 0<BR><BR>执行完network命令，我们看到第一台机器的tail -f /usr/local/etc/ospfd.log输出下面的信息：<BR><BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/28 14:25:51 OSPF: Packet 192.168.5.123 [Hello:RECV]: Options *|*|-|-|-|-|E|*<BR>2002/04/28 14:25:51 OSPF: NSM[eth0:192.168.5.121:0.0.0.0]: start<BR>2002/04/28 14:25:52 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 14:25:52 OSPF: couldn't find any VL to associate the packet with<BR>2002/04/28 14:25:52 OSPF: DR-Election[1st]: Backup 192.168.5.123<BR>2002/04/28 14:25:52 OSPF: DR-Election[1st]: DR&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.121<BR>2002/04/28 14:25:52 OSPF: Packet[DD]: Negotiation done (Slave).<BR>--------------------------------8&lt;---------------------------------------<BR><BR>r1收到r2(192.168.5.123)发过来的hello数据包，交换信息后选举DR，由于本身192.168.5.121是DR了，所以 <BR><BR>只选举了BDR就好了。这时在r1上就能看到r2了。<BR><BR>r1_ospfd# sh ip ospf neig<BR><BR>Neighbor ID&nbsp;&nbsp;&nbsp;&nbsp; Pri&nbsp;&nbsp; State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dead Time&nbsp;&nbsp; Address&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interface&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RXmtL <BR><BR>RqstL DBsmL<BR>192.168.5.123&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; Full/Backup&nbsp;&nbsp;&nbsp;&nbsp; 00:00:37&nbsp;&nbsp;&nbsp; 192.168.5.123&nbsp;&nbsp; eth0:192.168.5.121&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; <BR><BR>&nbsp;&nbsp; 0<BR><BR>检验其它信息<BR><BR>r1_ospfd# sh ip ospf database<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OSPF Router with ID (192.168.5.121)<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Router Link States (Area 0.0.0.0)<BR><BR>Link ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADV Router&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Age&nbsp; Seq#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CkSum&nbsp; Link count<BR>192.168.5.121&nbsp;&nbsp; 192.168.5.121&nbsp;&nbsp; 1259 0x80000008 0x534e 1<BR>192.168.5.123&nbsp;&nbsp; 192.168.5.123&nbsp;&nbsp; 1265 0x80000006 0x534a 1<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Net Link States (Area 0.0.0.0)<BR><BR>Link ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADV Router&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Age&nbsp; Seq#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CkSum<BR>192.168.5.123&nbsp;&nbsp; 192.168.5.123&nbsp;&nbsp; 1265 0x80000001 0x5a5a<BR><BR>r1_ospfd# sh ip ospf int eth0<BR>eth0 is up, line protocol is up<BR><BR>&nbsp; Internet Address 192.168.5.121/24, Area 0.0.0.0<BR>&nbsp; Router ID 192.168.5.121, Network Type BROADCAST, Cost: 10<BR>&nbsp; Transmit Delay is 1 sec, State DR, Priority 1<BR>&nbsp; Designated Router (ID) 192.168.5.121, Interface Address 192.168.5.121<BR>&nbsp; Backup Designated Router (ID) 192.168.5.123, Interface Address 192.168.5.123<BR>&nbsp; Timer intarvals configured, Hello 10, Dead 40, Wait 40, Retransmit 5<BR>&nbsp;&nbsp;&nbsp; Hello due in 00:00:01<BR>&nbsp; Neighbor Count is 1, Adjacent neighbor count is 1<BR><BR>和前面的输出信息相比，发生了很多变化，两台路由器已经相互识别了。OSPF不象RIP一样，每隔30秒 给所有的邻居广播一次完整的路由表，而是通过IP多目组播地址224.0.0.5每隔10秒发送一个很小的hello 数据包来维护邻居关系，当链路发生变化的时候，才重新计算。<BR><BR>拔掉两台机器连接的网线，看ospfd.log的记录：<BR><BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/28 16:25:53 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 16:25:57 OSPF: Packet 192.168.5.123 [Hello:RECV]: Options *|*|-|-|-|-|E|*<BR>2002/04/28 16:26:03 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 16:26:13 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 16:26:23 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 16:26:33 OSPF: make_hello: options: 2, int: eth0:192.168.5.121<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): Start<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): looked through areas<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): bb_configured: 1<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): bb_act_attached: 1<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): areas_configured: 1<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): areas_act_attached: 1<BR>2002/04/28 16:26:37 OSPF: nsm_change_status(): scheduling new router-LSA origination<BR>2002/04/28 16:26:37 OSPF: DR-Election[1nd]: Backup 0.0.0.0<BR>2002/04/28 16:26:37 OSPF: DR-Election[1nd]: DR&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.121<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): Start<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): looked through areas<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): bb_configured: 1<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): bb_act_attached: 1<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): areas_configured: 1<BR>2002/04/28 16:26:37 OSPF: ospf_check_abr_status(): areas_act_attached: 1<BR>2002/04/28 16:26:37 OSPF: Timer[router-LSA]: (router-LSA Refresh expire)<BR>2002/04/28 16:26:37 OSPF: counting fully adjacent virtual neighbors in area 0.0.0.0<BR>2002/04/28 16:26:37 OSPF: there are 0 of them<BR>2002/04/28 16:26:37 OSPF: SPF: calculation timer scheduled<BR>2002/04/28 16:26:37 OSPF: SPF: calculation timer delay = 5<BR>2002/04/28 16:26:37 OSPF: ospf_flood_through_interface(): considering int eth0:192.168.5.121<BR>2002/04/28 16:26:37 OSPF: ospf_flood_through_interface(): considering nbr 192.168.5.121<BR>2002/04/28 16:26:42 OSPF: SPF: Timer (SPF calculation expire)<BR>2002/04/28 16:26:42 OSPF: ospf_spf_calculate: Start<BR>2002/04/28 16:26:42 OSPF: ospf_spf_calculate: running Dijkstra for area 0.0.0.0<BR>2002/04/28 16:26:42 OSPF: SPF Result: 0 [R] 192.168.5.121<BR>2002/04/28 16:26:42 OSPF: ========== OSPF routing table ==========<BR>2002/04/28 16:26:42 OSPF: ========================================<BR>2002/04/28 16:26:42 OSPF: ospf_process_stub():processing stubs for area 0.0.0.0<BR>2002/04/28 16:26:42 OSPF: ospf_process_stub():processing router LSA, id: 192.168.5.121<BR>2002/04/28 16:26:42 OSPF: ospf_process_stub(): we have 1 links to process<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): Start<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): processing route to 192.168.5.0/24<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): calculated cost is 0 + 10 = 10<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): installing new route<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): this network is on this router<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): the interface is eth0:192.168.5.121<BR>2002/04/28 16:26:42 OSPF: ospf_intra_add_stub(): Stop<BR>2002/04/28 16:26:42 OSPF: children of V:<BR>2002/04/28 16:26:42 OSPF: ospf_spf_calculate: Stop<BR>2002/04/28 16:26:42 OSPF: ospf_ia_routing():start<BR>2002/04/28 16:26:42 OSPF: ospf_ia_routing():not ABR, considering all areas<BR>2002/04/28 16:26:42 OSPF: Pruning unreachable networks<BR>2002/04/28 16:26:42 OSPF: Pruning unreachable routers<BR>2002/04/28 16:26:42 OSPF: Route: Router Routing Table free<BR>2002/04/28 16:26:42 OSPF: SPF: calculation complete<BR>--------------------------------8&lt;---------------------------------------<BR><BR>我们看到r1生成一个LSA包，通知其它路由器，由于网络里只有自己了，又选自己为DR。r2也是一样。 我们再插上网线，查看ospfd.log：<BR><BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/28 16:52:08 OSPF: Packet 192.168.5.123 [Hello:RECV]: Options *|*|-|-|-|-|E|*<BR>2002/04/28 16:52:08 OSPF: NSM[eth0:192.168.5.121:0.0.0.0]: start<BR>2002/04/28 16:52:08 OSPF: DR-Election[1st]: Backup 192.168.5.123<BR>2002/04/28 16:52:08 OSPF: DR-Election[1st]: DR&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.121<BR>2002/04/28 16:52:08 OSPF: DR-Election[1st]: Backup 0.0.0.0<BR>2002/04/28 16:52:08 OSPF: DR-Election[1st]: DR&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.123<BR>2002/04/28 16:52:08 OSPF: DR-Election[2nd]: Backup 192.168.5.121<BR>2002/04/28 16:52:08 OSPF: DR-Election[2nd]: DR&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.123<BR>--------------------------------8&lt;---------------------------------------<BR><BR>由于拔了网线，r1和r2都把自己选为DR，一个网络只能有一个DR，所以恢复连接后它们重新进行了DR选 举，由于192.168.5.123的router id大，所以它被选为DR。<BR><BR>保存一下配置<BR><BR>r1_ospfd# copy run start<BR>Configuration saved to /usr/local/etc/ospfd.conf<BR>r2_ospfd# copy run start<BR>Configuration saved to /usr/local/etc/ospfd.conf<BR><BR>以上只是演示了最简单的OSPF的配置，而OSPF在大型网络才广泛的使用，配置也复杂多很多。即使是 Zebra，也还可用做复杂的多的OSPF实验。<BR><BR>4、用Zebra做BGP实验<BR><BR>RIP和OSPF都是内部网关协议（IGP），BGP属于外部网关协议（EGP）。BGP广泛用于Internet以连接 ISP，并将企业与ISP互连。<BR><BR>当BGP的影响被完全了解，并且至少下列情况之一存在时，在AS中使用BGP才是最恰当的：<BR>&nbsp; 1 AS允许数据包穿过它到达其它自治系统（例如，某个服务提供商）。<BR>&nbsp; 2 AS有到其它自治系统的多条连接。<BR>&nbsp; 3 必须对进入和离开AS的数据流进行控制。<BR><BR>对于互连的自治系统来说，BGP并不总是恰当的解决方案，如果有如下情况中的一个或多个时，不要使 用BGP：<BR>&nbsp; 1 只有到Internet或另一AS的单一连接。<BR>&nbsp; 2 无需考虑路由策略或路由选择。<BR>&nbsp; 3 路由器缺乏经常性的BGP更新的内存或处理器。<BR>&nbsp; 4 对路由过滤和BGP路径选择过程的了解十分有限。<BR>&nbsp; 5 在自治系统间的带宽较低。<BR>在这些情况下，应该使用静态路由。<BR><BR>Zebra支持BGP-4和BGP-4+，下面实验只是演示BGP的基本命令，以及debug的一些信息。一个比较复杂 的用Zebra做BGP实验见</FONT><A href="http://www.unixreview.com/print/documentID=15977"><FONT color=#000000>http://www.unixreview.com/print/documentID=15977</FONT></A><FONT color=#000000>，有条件可以做一下。<BR><BR>Zebra使用bgpd程序实现BGP路由功能，但bgpd需要从zebra程序获得接口信息，所以zebra程序必须在 bgpd程序之前运行。<BR><BR>初始化第一台机器：<BR><BR>shell_1&gt; cd /usr/local/etc<BR>shell_1&gt; cp zebra.conf.sample zebra.conf<BR>shell_1&gt; cp bgpd.conf.sample bgpd.conf<BR>shell_1&gt; zebra -d<BR><BR>还有一个bgpd.conf.sample2配置样例是用于IPv6的。<BR><BR>进入zebra设置IP<BR><BR>shell_1&gt; telnet localhost 2601<BR>Password:<BR>Router&gt; en<BR>Password:<BR>Router# conf t<BR>Router(config)# hostname r1<BR>r1(config)# int eth0<BR>r1(config-if)# ip address 192.168.5.121/24<BR>r1(config-if)# ctrl+z<BR>r1# copy run start<BR><BR>进入第一台机器的bgp设置<BR><BR>shell_1&gt; bgpd -d<BR><BR>启动bgpd，我们看到TCP端口179已经打开。两台BGP路由器相互间建立一条TCP连接，交换消息以打开 和确认连接参数。这两台路由器被称为对等路由器，或者邻居。<BR><BR>shell_1&gt; telnet localhost 2605<BR>Password:<BR>bgpd&gt; en<BR>bgpd# conf t<BR>bgpd(config)# hostname r1_bgpd<BR>r1_bgpd(config)# router bgp 7675<BR><BR>配置样例里已经指定了AS为7675，我们懒的改就拿来用。AS是一个16bit的数字，其范围从1到 65535。RFC 1930给出了AS编号使用指南。从64512到65535的AS编号范围是留作私用的，类似私有IP。<BR><BR>r1_bgpd(config-router)# network 192.168.5.0/24<BR>r1_bgpd(config-router)# neighbor 192.168.5.121 remote-as 7676<BR><BR>查看bgp信息：<BR><BR>r1_bgpd# sh ip bgp<BR>BGP table version is 0, local router ID is 192.168.5.123<BR>Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal<BR>Origin codes: i - IGP, e - EGP, ? - incomplete<BR><BR>&nbsp;&nbsp; Network&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next Hop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metric LocPrf Weight Path<BR>*&gt; 192.168.5.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32768 i<BR><BR>Total number of prefixes 1<BR><BR>把log记录到文件：<BR><BR>r1_bgpd# conf t<BR>r1_bgpd(config)# log file /usr/local/etc/bgpd.log<BR><BR>打开debug选项：<BR><BR>r1_bgpd(config)# exit<BR>r1_bgpd debug bgp events<BR>r1_bgpd debug bgp keepalives<BR>r1_bgpd debug bgp updates<BR><BR>然后在shell下用tail查看log记录：<BR><BR>shell_1&gt; tail -f /usr/local/etc/bgpd.log<BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/29 19:13:08 BGP: 192.168.5.121 [Event] Connect start to 192.168.5.121 fd 10<BR>2002/04/29 19:13:11 BGP: 192.168.5.121 [Event] Connect failed (Operation now in progress)<BR>--------------------------------8&lt;---------------------------------------<BR><BR>r1不能连接邻居192.168.5.121。<BR><BR>第二台机器的设置<BR><BR>前面的初始化和第一台一样，不过这里名字设成r2便于辨认，IP设成了192.168.5.123/24。<BR><BR>进入第二台机器的bgp设置<BR><BR>shell_2&gt; bgpd -d<BR>shell_2&gt; telnet localhost 2605<BR>Password:<BR>bgpd&gt; en<BR>bgpd# conf t<BR>bgpd(config)# hostname r2_bgpd<BR><BR>AS要设成不一样，所以修改一下：<BR><BR>r2_bgpd(config)# no router bgp 7675<BR>r2_bgpd(config)# router bgp 7676<BR>r2_bgpd(config-router)# network 192.168.5.0/24<BR>r2_bgpd(config-router)# neighbor 192.168.5.123 remote-as 7675<BR><BR>这时第一台机器的log出现如下信息：<BR><BR>--------------------------------8&lt;---------------------------------------<BR>2002/04/29 19:16:35 BGP: [Event] BGP connection from host 192.168.5.121<BR>2002/04/29 19:16:35 BGP: [Event] Make dummy peer structure until read Open packet<BR>2002/04/29 19:16:35 BGP: 192.168.5.121 [Event] Transfer temporary BGP peer to existing one<BR>2002/04/29 19:16:35 BGP: 192.168.5.121 [Event] Accepting BGP peer delete<BR>2002/04/29 19:16:35 BGP: 192.168.5.121 send UPDATE 192.168.5.0/24 nexthop 192.168.5.123, origin <BR><BR>i, path<BR>2002/04/29 19:16:35 BGP: 192.168.5.121 rcvd UPDATE w/ attr: nexthop 192.168.5.121, origin i, path <BR><BR>7676<BR>2002/04/29 19:16:35 BGP: 192.168.5.121 rcvd 192.168.5.0/24<BR>--------------------------------8&lt;---------------------------------------<BR><BR>两台bgp已经互连了。再看一下第一台机器的bgp信息：<BR><BR>r1_bgpd# sh ip bgp<BR>BGP table version is 0, local router ID is 192.168.5.123<BR>Status codes: s suppressed, d damped, h history, * valid, &gt; best, i - internal<BR>Origin codes: i - IGP, e - EGP, ? - incomplete<BR><BR>&nbsp;&nbsp; Network&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next Hop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metric LocPrf Weight Path<BR>*&nbsp; 192.168.5.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.5.121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 7676 i<BR>*&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32768 i<BR><BR>Total number of prefixes 1<BR><BR>r1_bgpd# sh ip bgp neighbors<BR>BGP neighbor is 192.168.5.121, remote AS 7676, local AS 7675, external link<BR>&nbsp; BGP version 4, remote router ID 192.168.5.121<BR>&nbsp; BGP state = Established, up for 00:01:13<BR>&nbsp; Last read 00:00:13, hold time is 180, keepalive interval is 60 seconds<BR>&nbsp; Neighbor capabilities:<BR>&nbsp;&nbsp;&nbsp; Route refresh: advertised and received (old and new)<BR>&nbsp;&nbsp;&nbsp; Address family IPv4 Unicast: advertised and received<BR>&nbsp; Received 98 messages, 0 notifications, 0 in queue<BR>&nbsp; Sent 103 messages, 0 notifications, 0 in queue<BR>&nbsp; Route refresh request: received 0, sent 0<BR>&nbsp; Minimum time between advertisement runs is 0 seconds<BR><BR>For address family: IPv4 Unicast<BR>&nbsp; Community attribute sent to this neighbor (both)<BR>&nbsp; 1 accepted prefixes<BR><BR>&nbsp; Connections established 2; dropped 1<BR>Local host: 192.168.5.123, Local port: 179<BR>Foreign host: 192.168.5.121, Foreign port: 1029<BR>Nexthop: 192.168.5.123<BR>Read thread: on&nbsp; Write thread: off<BR><BR>Zebra还支持很多BGP的特性，请参考GNU Zebra Manual，有条件的可以做一下那些实验。<BR><BR>Zebra的Mailing List比较活跃，有许多人在那里讨论Zebra的开发和配置等等，有问题的话，在那里应该 能得到解答。<BR><BR><STRONG>Reference</STRONG><BR><BR>GNU Zebra Manual<BR>http://www.pointless.net/~jasper/zebra-html/zebra_toc.html#SEC_Contents<BR><BR>组建可扩展的Cisco网络<BR></FONT><A href="http://www.unixreview.com/print/documentID=15977"><FONT color=#000000>http://www.unixreview.com/print/documentID=15977</FONT></A></FONT></DIV><img src ="http://www.blogjava.net/net/aggbug/25756.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/net/" target="_blank">烂漫时空</a> 2005-12-28 17:25 <a href="http://www.blogjava.net/net/articles/25756.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>著名公司网站欣赏</title><link>http://www.blogjava.net/net/articles/25368.html</link><dc:creator>烂漫时空</dc:creator><author>烂漫时空</author><pubDate>Sun, 25 Dec 2005 07:15:00 GMT</pubDate><guid>http://www.blogjava.net/net/articles/25368.html</guid><wfw:comment>http://www.blogjava.net/net/comments/25368.html</wfw:comment><comments>http://www.blogjava.net/net/articles/25368.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/net/comments/commentRss/25368.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/net/services/trackbacks/25368.html</trackback:ping><description><![CDATA[<P><STRONG>飞利蒲</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<A href="http://www.philips.com.cn/"><FONT face="Courier New" color=#000000 size=2>http://www.philips.com</FONT></A><STRONG><BR><BR>索尼</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#000000>&nbsp; </FONT><A href="http://www.sony.com/"><FONT face="Courier New" color=#000000 size=2>http://www.sony.com</FONT></A><BR><BR><STRONG><BR>红塔集团</STRONG>&nbsp;&nbsp;&nbsp;&nbsp; <A href="http://www.hongta.com/"><FONT face="Courier New" color=#000000 size=2>http://www.hongta.com</FONT></A><BR><BR><STRONG><BR>立邦</STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FONT color=#000000>&nbsp;&nbsp;&nbsp; </FONT><A href="http://www.nipponpaint.com/"><FONT face="Courier New" color=#000000 size=2>http://www.nipponpaint.com</FONT></A><BR><BR><STRONG><BR>马自达&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</STRONG><A href="http://www.mazda.com/"><FONT face="Courier New" color=#000000 size=2>http://www.mazda.com/</FONT></A></P><img src ="http://www.blogjava.net/net/aggbug/25368.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/net/" target="_blank">烂漫时空</a> 2005-12-25 15:15 <a href="http://www.blogjava.net/net/articles/25368.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>几维下载</title><link>http://www.blogjava.net/net/articles/25354.html</link><dc:creator>烂漫时空</dc:creator><author>烂漫时空</author><pubDate>Sun, 25 Dec 2005 04:24:00 GMT</pubDate><guid>http://www.blogjava.net/net/articles/25354.html</guid><wfw:comment>http://www.blogjava.net/net/comments/25354.html</wfw:comment><comments>http://www.blogjava.net/net/articles/25354.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/net/comments/commentRss/25354.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/net/services/trackbacks/25354.html</trackback:ping><description><![CDATA[<STRONG>几维下载</STRONG>_ _<FONT size=2>常用开发应用软件</FONT><A href="http://www.sooweb.net/"><BR><FONT color=#000000>http://www.sooweb.net/</FONT></A><BR><BR><BR><STRONG>Zebra V0.94<BR><BR><FONT color=#808080 size=2>软件下载</FONT></STRONG>：<A href="http://download.enet.com.cn/html/222122001022302.html"><FONT face=Tahoma color=#000000 size=2>http://download.enet.com.cn/html/222122001022302.html</FONT></A><BR><BR><FONT face="Courier New" color=#ffa500 size=2>说明：基于LINUX平台的一种小型路由软件</FONT><img src ="http://www.blogjava.net/net/aggbug/25354.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/net/" target="_blank">烂漫时空</a> 2005-12-25 12:24 <a href="http://www.blogjava.net/net/articles/25354.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>电子教案</title><link>http://www.blogjava.net/net/articles/25352.html</link><dc:creator>烂漫时空</dc:creator><author>烂漫时空</author><pubDate>Sun, 25 Dec 2005 04:06:00 GMT</pubDate><guid>http://www.blogjava.net/net/articles/25352.html</guid><wfw:comment>http://www.blogjava.net/net/comments/25352.html</wfw:comment><comments>http://www.blogjava.net/net/articles/25352.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/net/comments/commentRss/25352.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/net/services/trackbacks/25352.html</trackback:ping><description><![CDATA[<STRONG>人民邮电出版社</STRONG> <FONT size=1><FONT size=2>课件源码下载</FONT><BR></FONT><A href="http://www.ptpress.com.cn/download/index.asp"><BR><FONT face=Garamond color=#808080>http://www.ptpress.com.cn/download/index.asp</FONT></A><img src ="http://www.blogjava.net/net/aggbug/25352.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/net/" target="_blank">烂漫时空</a> 2005-12-25 12:06 <a href="http://www.blogjava.net/net/articles/25352.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>