﻿<?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-地狱男爵之博客无限-随笔分类-系统综合</title><link>http://www.blogjava.net/hellboys/category/10570.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 05 Dec 2007 17:22:48 GMT</lastBuildDate><pubDate>Wed, 05 Dec 2007 17:22:48 GMT</pubDate><ttl>60</ttl><item><title>Android中文文档v0.1 beta低调发布,期待更多同学来参加review</title><link>http://www.blogjava.net/hellboys/archive/2007/12/05/165574.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Wed, 05 Dec 2007 08:42:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2007/12/05/165574.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/165574.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2007/12/05/165574.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/165574.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/165574.html</trackback:ping><description><![CDATA[<div class="t_msgfont" id="message656"><font color="red">第一阶段:Android中文文档v0.1 beta发布</font><a style="font-size: 16px" href="http://www.androidcn.net/wiki/index.php/Documentation" target="_blank">--由www.androidcn.net社区提供</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img alt="" src="http://www.androidcn.net/images/smilies/lol.gif" border="0" smilieid="12" /><br />
<br />
Android中文文档阅读地址:&nbsp;&nbsp;<a href="http://www.androidcn.net/wiki/index.php/Documentation" target="_blank">http://www.androidcn.net/wiki/index.php/Documentation</a><br />
<br />
Android中文文档大部分已经完成. 但是可能有不少细节和不足之处需要完善和修补.<br />
<br />
感谢翻译的同学,已经在文档里面加入. 如果缺少,请联系我<img alt="" src="http://www.androidcn.net/images/smilies/smile.gif" border="0" smilieid="1" /> <br />
<br />
<br />
<br />
<font color="red">第二阶段:请有时间的同学进行review.</font><br />
<br />
review阶段既然采用wiki上面形式. 希望review的同学可以联系AndroidCN管理员和各版版主.<br />
<br />
相信review阶段对同学理解Android可以有更快的理解和提高. 阅读文档也是对Android理解之初步. <br />
<br />
所有在阅读文档的时候,希望同学们不吝啬自己的一笔之力,对于未完全或翻译有误的地方进行涂抹. <img alt="" src="http://www.androidcn.net/images/smilies/handshake.gif" border="0" smilieid="17" /> <br />
<br />
相信大家可以先阅读文档,然后提出翻译中的不足进行.<br />
<br />
review 讨论区： <a href="http://www.androidcn.net/thread-119-1-1.html">http://www.androidcn.net/thread-119-1-1.html</a><br />
</div>
<img src ="http://www.blogjava.net/hellboys/aggbug/165574.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2007-12-05 16:42 <a href="http://www.blogjava.net/hellboys/archive/2007/12/05/165574.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>欢迎访问Android中国</title><link>http://www.blogjava.net/hellboys/archive/2007/11/15/160794.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Thu, 15 Nov 2007 09:24:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2007/11/15/160794.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/160794.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2007/11/15/160794.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/160794.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/160794.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 欢迎访问Android中国, Android是google为手机开发的操作系统, 基于Linux2.6内核. 移动终端开发和使用是一个非常有趣,有挑战的活动.于是, 我们一些志同道合的朋友成立了Android中国, 致力于docs的中文化, 当然还有交流何使用经验, 共同开发Android项目. 欢迎您的光临和加入.<br><br>主页：http://www.androidcn.net&nbsp;&nbsp;<a href='http://www.blogjava.net/hellboys/archive/2007/11/15/160794.html'>阅读全文</a><img src ="http://www.blogjava.net/hellboys/aggbug/160794.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2007-11-15 17:24 <a href="http://www.blogjava.net/hellboys/archive/2007/11/15/160794.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一台主机被多台电脑监控 (keyword:cacti,snmp,snmpd.conf)</title><link>http://www.blogjava.net/hellboys/archive/2007/03/07/102331.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Wed, 07 Mar 2007 02:27:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2007/03/07/102331.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/102331.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2007/03/07/102331.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/102331.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/102331.html</trackback:ping><description><![CDATA[SNMPD.CONF(5)                                       SNMPD.CONF(5)<br /><br /><br /><br />NAME<br />       share/snmp/snmpd.conf  -  configuration  file for the ucd-<br />       snmp SNMP agent.<br /><br />DESCRIPTION<br />       snmpd.conf is the configuration file which defines how the<br />       ucd-smnp SNMP agent operates.  These files may contain any<br />       of the directives found in the DIRECTIVES  section  below.<br />       This  file  is  not  required for the agent to operate and<br />       report mib entries.<br /><br />PLEASE READ FIRST<br />       First, make sure you have read the  snmp_config(5)  manual<br />       page  that  describes how the ucd-snmp configuration files<br />       operate, where they are located  and  how  they  all  work<br />       together.<br /><br />EXTENSIBLE-MIB<br />       The  ucd-snmp  SNMP  agent reports much of its information<br />       through queries to the 1.3.6.1.4.1.2021 section of the mib<br />       tree.   Every  mib in this section has the following table<br />       entries in it.<br /><br />       .1 -- index<br />              This is the table's index numbers for each  of  the<br />              DIRECTIVES listed below.<br /><br />       .2 -- name<br />              The  name of the given table entry.  This should be<br />              unique, but is not required to be.<br /><br />       .100 -- errorFlag<br />              This is a flag returning either the integer value 1<br />              or  0 if an error is detected for this table entry.<br /><br />       .101 -- errorMsg<br />              This is a DISPLAY-STRING describing any error trig-<br />              gering the errorFlag above.<br /><br />       .102 -- errorFix<br />              If  this entry is SNMPset to the integer value of 1<br />              AND the errorFlag defined above is indeed  a  1,  a<br />              program  or script will get executed with the table<br />              entry name from above as the argument.  The program<br />              to  be  executed is configured in the config.h file<br />              at compile time.<br /><br />   Directives<br />       proc NAME<br /><br />       proc NAME MAX<br /><br />       proc NAME MAX MIN<br /><br />              Checks to see if the NAME'd processes  are  running<br />              on  the  agent's  machine.  An error flag (1) and a<br />              description  message  are  then   passed   to   the<br />              1.3.6.1.4.1.2021.2.100  and  1.3.6.1.4.1.2021.2.101<br />              mib tables (respectively) if the NAME'd program  is<br />              not  found  in  the  process  table  as reported by<br />              "/bin/ps -e".<br /><br />              If MAX and MIN are not specified, MAX is assumed to<br />              be infinity and MIN is assumed to be 1.<br /><br />              If  MAX  is specified but MIN is not specified, MIN<br />              is assumed to be 0.<br /><br />       procfix NAME PROG ARGS<br />              This registers a command  that  knows  how  to  fix<br />              errors   with   the   given   process  NAME.   When<br />              1.3.6.1.4.1.2021.2.102 for a given NAMEd program is<br />              set to the integer value of 1, this command will be<br />              called.  It defaults to a compiled value set  using<br />              the PROCFIXCMD definition in the config.h file.<br /><br />       exec NAME PROG ARGS<br /><br />       exec MIBNUM NAME PROG ARGS<br /><br />              If  MIBNUM is not specified, the agent executes the<br />              named PROG with arguments of ARGS and  returns  the<br />              exit status and the first line of the STDOUT output<br />              of   the   PROG   program   to   queries   of   the<br />              1.3.6.1.4.1.2021.8.100  and  1.3.6.1.4.1.2021.8.101<br />              mib  tables  (respectively).   All  STDOUT   output<br />              beyond the first line is silently truncated.<br /><br />              If  MIBNUM  is  specified,  it  acts  as  above but<br />              returns the exit status  to  MIBNUM.100.0  and  the<br />              entire  STDOUT  output to the table MIBNUM.101 in a<br />              mib table.  In this case, the MIBNUM.101  mib  con-<br />              tains the entire STDOUT output, one mib table entry<br />              per line of output (ie, the first line is output as<br />              MIBNUM.101.1,  the second at MIBNUM.101.2, etc...).<br /><br />              Note:  The MIBNUM must be specified in dotted-inte-<br />                     ger  notation  and  can  not be specified as<br />                     ".iso.org.dod.internet..."  (should  instead<br />                     be<br /><br />              Note:  The  agent caches the exit status and STDOUT<br />                     of the executed program for 30 seconds after<br />                     the  initial  query.   This  is  to increase<br />                     speed and maintain consistency  of  informa-<br />                     tion  for  consecutive  table  queries.  The<br />                     cache can be flushed by a  snmp-set  request<br />                     of  integer(1)  to 1.3.6.1.4.1.2021.100.VER-<br />                     CLEARCACHE.<br /><br />       execfix NAME PROG ARGS<br />              This registers a command  that  knows  how  to  fix<br />              errors  with  the  given  exec  or  sh  NAME.  When<br />              1.3.6.1.4.1.2021.8.102 for a given NAMEd  entry  is<br />              set to the integer value of 1, this command will be<br />              called.  It defaults to a compiled value set  using<br />              the EXECFIXCMD definition in the config.h file.<br /><br />       disk PATH<br /><br />       disk PATH [ MINSPACE | MINPERCENT% ]<br /><br />              Checks  the  named disks mounted at PATH for avail-<br />              able disk space.  If the disk space  is  less  than<br />              MINSPACE  (kB) if specified or less than MINPERCENT<br />              (%) if a  %  sign  is  specified,  or  DEFDISKMINI-<br />              MUMSPACE  (kB)  if  not  specified,  the associated<br />              entry in the 1.3.6.1.4.1.2021.9.100 mib table  will<br />              be  set to (1) and a descriptive error message will<br />              be returned to queries of 1.3.6.1.4.1.2021.9.101.<br /><br />       load MAX1<br /><br />       load MAX1 MAX5<br /><br />       load MAX1 MAX5 MAX15<br /><br />              Checks the load average of the machine and  returns<br />              an error flag (1), and an text-string error message<br />              to   queries   of    1.3.6.1.4.1.2021.10.100    and<br />              1.3.6.1.4.1.2021.10.101   (respectively)  when  the<br />              1-minute, 5-minute, or  15-minute  averages  exceed<br />              the associated maximum values.  If any of the MAX1,<br />              MAX5, or MAX15 values are unspecified, they default<br />              to a value of DEFMAXLOADAVE.<br /><br />       file FILE [MAXSIZE]<br />              Monitors  file sizes and makes sure they don't grow<br />              beyond a certain size.  MAXSIZE defaults  to  infi-<br />              nite  if  not specified, and only monitors the size<br />              without reporting errors about it.<br /><br />   Errors<br />       Any errors in obtaining the above information are reported<br />       via    the    1.3.6.1.4.1.2021.101.100    flag   and   the<br />       1.3.6.1.4.1.2021.101.101 text-string description.<br /><br />SMUX SUB-AGENTS<br />       To enable and SMUX based sub-agent, such as gated, use the<br />       smuxpeer configuration entry<br /><br />       smuxpeer OID PASS<br />              For gated a sensible entry might be<br /><br />       .1.3.6.1.4.1.4.1.3 secret<br /><br />ACCESS CONTROL<br />       snmpd  supports the View-Based Access Control Model (vacm)<br />       as defined in RFC 2275.  To this end,  it  recognizes  the<br />       following  keywords  in  the  configuration file: com2sec,<br />       group, access, and view  as  well  as  some  easier-to-use<br />       wrapper   directives:  rocommunity,  rwcommunity,  rouser,<br />       rwuser.<br /><br />       rocommunity COMMUNITY [SOURCE] [OID]<br /><br />       rwcommunity COMMUNITY [SOURCE] [OID]<br />              These create read-only and  read-write  communities<br />              that  can  be used to access the agent.  They are a<br />              quick method of using the following com2sec, group,<br />              access,  and view directive lines.  They are not as<br />              efficient either, as groups aren't created  so  the<br />              tables  are possibly larger.  In other words: don't<br />              use these if you have complex situations to set up.<br /><br />              The  format  of the SOURCE is token is described in<br />              the com2sec directive section below.  The OID token<br />              restricts  access  for that community to everything<br />              below that given OID.<br /><br />       rouser USER [noauth|auth|priv] [OID]<br /><br />       rwuser USER [noauth|auth|priv] [OID]<br />              Creates a  SNMPv3  USM  user  in  the  VACM  access<br />              configuration  tables.   Again,  its more efficient<br />              (and powerful) to use the combined com2sec,  group,<br />              access, and view directives instead.<br /><br />              The minimum level of authentication and privacy the<br />              user must use  is  specified  by  the  first  token<br />              (which  defaults  to  "auth").   The  OID parameter<br />              restricts access for that user to everything  below<br />              the given OID.<br /><br />       com2sec NAME SOURCE COMMUNITY<br />              This   directive   specifies  the  mapping  from  a<br />              source/community pair to a  security  name.  SOURCE<br />              can be a hostname, a subnet, or the word "default".<br />              A subnet can be specified as  IP/MASK  or  IP/BITS.<br />              The first source/community combination that matches<br />              the incoming packet is selected.<br /><br />       group NAME MODEL SECURITY<br />              This directive defines the mapping  from  security-<br />              model/securityname  to  group.  MODEL is one of v1,<br />              v2c, or usm.<br /><br />       access NAME CONTEXT MODEL LEVEL PREFX READ WRITE NOTIFY<br />              The  access  directive  maps  from   group/security<br />              model/security  level  to  a view.  MODEL is one of<br />              any, v1, v2c, or usm.   LEVEL  is  one  of  noauth,<br />              auth,  or priv.  PREFX specifies how CONTEXT should<br />              be matched against the context of the incoming pdu,<br />              either  exact  or  prefix.   READ, WRITE and NOTIFY<br />              specifies the view to be used for the corresponding<br />              access.   For  v1  or  v2c  access,  LEVEL  will be<br />              noauth, and CONTEXT will be empty.<br /><br />       view NAME TYPE SUBTREE [MASK]<br />              The defines the named view. TYPE is either included<br />              or  excluded.   MASK is a list of hex octets, sepa-<br />              rated by '.' or ':'.  The MASK defaults to "ff"  if<br />              not specified.<br /><br />              The  reason  for the mask is, that it allows you to<br />              control access to one row in a table,  in  a  rela-<br />              tively  simple  way.  As  an example, as an ISP you<br />              might consider giving each customer access  to  his<br />              or her own interface:<br /><br />              view cust1 included interfaces.ifTable.ifEntry.ifIndex.1 ff.a0<br />              view cust2 included interfaces.ifTable.ifEntry.ifIndex.2 ff.a0<br /><br />              (interfaces.ifTable.ifEntry.ifIndex.1 == .1.3.6.1.2.1.2.2.1.1.1,<br />              ff.a0 == 11111111.10100000. which nicely covers up and including<br />              the row index, but lets the user vary the field of the row)<br /><br />       VACM Examples:<br />              #       sec.name  source          community<br />              <strong>com2sec local     localhost       private<br />              com2sec mynet     10.10.10.0/24   public<br />              com2sec public    default         public<br /><br />              #             sec.model  sec.name<br />              group mygroup v1         mynet<br />              group mygroup v2c        mynet<br />              group mygroup usm        mynet<br />              group local   v1         local<br />              group local   v2c        local<br />              group local   usm        local<br />              group public  v1         public<br />              group public  v2c        public<br />              group public  usm        public<br /><br />              #           incl/excl subtree                          mask<br />              view all    included  .1                               80<br />              view system included  system                           fe<br />              view mib2   included  .iso.org.dod.internet.mgmt.mib-2 fc<br /><br />              #              context sec.model sec.level prefix read   write notify<br />              access mygroup ""      any       noauth    exact  mib2   none  none<br />              access public  ""      any       noauth    exact  system none  none<br />              access local   ""      any       noauth    exact  all    all   all<br /></strong><br />       Default VACM model<br />              The default configuration of the agent, as shipped, is functionally<br />              equivalent to the following entries:<br />              com2sec   public    default   public<br />              group     public    v1   public<br />              group     public    v2c  public<br />              group     public    usm  public<br />              view      all  included  .1<br />              access    public    ""   any  noauth    exact     all  none none<br /><br />SNMPv3 CONFIGURATION<br />       engineID STRING<br />              The  snmpd  agent  needs  to  be configured with an<br />              engineID to be able to respond to SNMPv3  messages.<br />              With  this  configuration  file  line, the engineID<br />              will be configured from STRING.  The default  value<br />              of  the  engineID  is  configured with the first IP<br />              address found for the hostname of the machine.<br /><br />       createUser username (MD5|SHA) authpassphrase [DES]  [priv-<br />       passphrase]<br />              This directive should be placed into the "/var/ucd-<br />              snmp"/snmpd.conf  file  instead of the other normal<br />              locations.  The reason is that the  information  is<br />              read  from  the  file  and then the line is removed<br />              (eliminating the storage of the master password for<br />              that  user)  and  replaced  with  the  key  that is<br />              derived from it.  This key is a localized  key,  so<br />              that  if  it is stolen it can not be used to access<br />              other agents.  If the password is stolen,  however,<br />              it can be.<br /><br />              MD5  and  SHA  are the authentication types to use,<br />              but you must have built the  package  with  openssl<br />              installed  in  order  to use SHA.  The only privacy<br />              protocol currently supported is DES.  If  the  pri-<br />              vacy  passphrase is not specified, it is assumed to<br />              be the same as the authentication passphrase.  Note<br />              that  the users created will be useless unless they<br />              are also added to the VACM  access  control  tables<br />              described above.<br /><br />              Warning:  the minimum pass phrase length is 8 char-<br />              acters.<br /><br />              SNMPv3 users can be created at  runtime  using  the<br />              snmpusm command.<br /><br /><br />SETTING SYSTEM INFORMATION<br />       syslocation STRING<br /><br />       syscontact STRING<br /><br />              Sets the system location and the system contact for<br />              the agent.  This information  is  reported  by  the<br />              'system' table in the mibII tree.<br /><br />       authtrapenable NUMBER<br />              Setting  authtrapenable  to 1 enables generation of<br />              authentication failure traps. The default value  is<br />              2 (disable).<br /><br />       trapcommunity STRING<br />              This  defines  the  default  community string to be<br />              used when sending traps.  Note  that  this  command<br />              must  be  used  prior to any of the following three<br />              commands  that  are  intended  use  this  community<br />              string.<br /><br />       trapsink HOST [COMMUNITY [PORT]]<br /><br />       trap2sink HOST [COMMUNITY [PORT]]<br /><br />       informsink HOST [COMMUNITY [PORT]]<br />              These  commands  define  the hosts to receive traps<br />              (and/or inform notifications). The daemon  sends  a<br />              Cold  Start  trap when it starts up. If enabled, it<br />              also sends traps on authentication failures.   Mul-<br />              tiple  trapsink, trap2sink and informsink lines may<br />              be specified to specify multiple destinations.  Use<br />              trap2sink  to  send  SNMPv2 traps and informsink to<br />              send inform notifications.   If  COMMUNITY  is  not<br />              specified,  the  string from a preceding trapcommu-<br />              nity directive will be used. If PORT is not  speci-<br />              fied,  the  well known SNMP trap port (162) will be<br />              used.<br /><br />PASS-THROUGH CONTROL<br />       pass MIBOID EXEC<br />              Passes entire control of MIBOID to  the  EXEC  pro-<br />              gram.   The  EXEC  program  is called in one of the<br />              following three ways:<br /><br />              EXEC -g MIBOID<br /><br />              EXEC -n MIBOID<br /><br />                     These call lines match to SNMP get and  get-<br />                     next requests.  It is expected that the EXEC<br />                     program will take the arguments passed to it<br />                     and  return the appropriate response through<br />                     it's stdout.<br /><br />                     The first line of stdout should be  the  mib<br />                     OID of the returning value.  The second line<br />                     should be the TYPE of value returned,  where<br />                     TYPE  is  one  of  the text strings: string,<br />                     integer,  unsigned,   objectid,   timeticks,<br />                     ipaddress,  counter,  or  gauge.   The third<br />                     line of stdout should be  the  VALUE  corre-<br />                     sponding with the returned TYPE.<br /><br />                     For  instance, if a script was to return the<br />                     value integer value "42" when a request  for<br />                     .1.3.6.1.4.100  was  requested,  the  script<br />                     should return the following 3 lines:<br />                       .1.3.6.1.4.100<br />                       integer<br />                       42<br /><br />                     To indicate that the  script  is  unable  to<br />                     comply with the request due to an end-of-mib<br />                     condition or an invalid request, simple exit<br />                     and  return  no  output to stdout at all.  A<br />                     snmp error will be  generated  corresponding<br />                     to the SNMP NO-SUCH-NAME response.<br /><br />              EXEC -s MIBOID TYPE VALUE<br /><br />                     For SNMP set requests, the above call method<br />                     is used.  The TYPE passed to the  EXEC  pro-<br />                     gram  is  one  of the text strings: integer,<br />                     counter, gauge, timeticks, ipaddress, objid,<br />                     or  string,  indicating  the  type  of value<br />                     passed in the next argument.<br /><br />                     Return nothing to stdout, and the  set  will<br />                     assumed to have been successful.  Otherwise,<br />                     return one of the following error strings to<br />                     signal an error: not-writable, or wrong-type<br />                     and the appropriate error response  will  be<br />                     generated instead.<br /><br />                      Note:  By   default,   the  only  community<br />                             allowed to  write  (ie  snmpset)  to<br />                             your  script  will  be the "private"<br />                             community,or community #2 if defined<br />                             differently by the "community" token<br />                             discussed above.  Which  communities<br />                             are  allowed  write  access are con-<br />                             trolled by the RWRITE definition  in<br />                             the snmplib/snmp_impl.h source file.<br /><br />EXAMPLE<br />       See the EXAMPLE.CONF file in the top level  source  direc-<br />       tory for a more detailed example of how the above informa-<br />       tion is used in real examples.<br /><br />RE-READING snmpd.conf and snmpd.local.conf<br />       The ucd-snmp agent can be forced to re-read its configura-<br />       tion files.  It can be told to do so by one of two ways:<br /><br />       1.     An       snmpset       of       integer(1)       to<br />              1.3.6.1.4.1.2021.100.VERUPDATECONFIG.<br /><br />       2.     A "kill -HUP" signal sent to the snmpd  agent  pro-<br />              cess.<br /><br />FILES<br />       share/snmp/snmpd.conf<br /><br />SEE ALSO<br />       snmp_config(5), snmpd(1), EXAMPLE.conf, read_config(3).<br /><br /><br /><br />                           27 Jan 2000              SNMPD.CONF(5)<br /><img src ="http://www.blogjava.net/hellboys/aggbug/102331.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2007-03-07 10:27 <a href="http://www.blogjava.net/hellboys/archive/2007/03/07/102331.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>妙解网络多台dhcp引起的IP冲突 </title><link>http://www.blogjava.net/hellboys/archive/2006/11/15/81181.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Wed, 15 Nov 2006 02:22:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/11/15/81181.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/81181.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/11/15/81181.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/81181.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/81181.html</trackback:ping><description><![CDATA[客人在我所供职的酒店上网的时候，经常会弹出一个对话框，显示一些提示，如上网的注意事项和消费标准等信息;并且有自己的电影和歌曲服务器，DHCP-server也是其中的一台服务器，宾馆、酒店就是用这台机器，为客户分配IP地址提供上网功能，即客户把自己的计算机连上网线，网卡配置自动获取IP地址，就会从动态主机配置协议(DHCP)服务器分配到一个IP地址;采用DHCP server可以自动为用户设置网络IP地址、掩码、网关、DNS、Wins 等网络参数，简化了用户网络设置，提高了管理效率。 <br /><br />　　那么我们的问题也出现了:常见的，很多用户抱怨用这种方法上不了网，但不是所有客户都上不了网。经过调查发现，住宾馆、酒店的人绝大多数是商务人员和工程师，他们携带的手提电脑一般安装的是Windows server版本，server版本默认启动了DHCP server功能，当一台这样的计算机连入网络，在他之后的计算机就会把他当成DHCP服务器，并被分配了不正确的IP地址，从而上不了网。 <br /><br />　　<b>DHCP服务器地址分配方式</b><br /><br />　　DHCP是一种用于简化主机IP配置管理的协议标准。通过采用DHCP标准，可以使用DHCP服务器为网络上所有启用了DHCP的客户端分配、配置、跟踪和更改(必要时)所有TCP/IP设置。此外，DHCP还可以确保不使用重复地址、重新分配未使用的地址，并且可以自动为主机连接的子网分配适当的IP地址。当一个网络中，有2个或2个以上的DHCP服务器时，提醒切勿将DHCP地址池定义的过大，以免多个地址池之间出现“包含于”的关系，或者是部分客户端手工指定的IP地址包含于DHCP服务器的地址池中，从而造成DHCP的一些异常故障。 <br /><br />　　针对不同的需求，DHCP服务器有三种机制分配IP地址: <br /><br />　　自动分配 DHCP服务器给首次连接到网络的某些客户端分配固定IP地址，该地址由用户长期使用; <br /><br />　　动态分配 DHCP服务器给客户端分配有时间限制的IP地址，使用期限到期后，客户端需要重新申请地址，客户端也可以主动释放该地址。绝大多数客户端主机得到的是这种动态分配的地址; <br /><br />　　手动分配 由网络管理员为客户端指定固定的IP地址。 <br /><br />　　三种地址分配方式中，只有动态分配可以重复使用客户端不再需要的地址。 <br /><br />　　每项技术都是有利有弊的，DHCP也不例外，由于DHCP有着配置简单，管理方便的优点，问题也随之产生，由于DHCP的运作机制，通常服务器和客户端没有认证机制，如果网络上存在多台DHCP服务器将会给网络造成混乱。由于用户不小心配置了DHCP服务器引起的网络混乱非常常见，足可见此问题的普遍性。 <br /><br />　　本人在从事网络工作的几年里，遇到过很多问题，其中有关DHCP-server冲突的不在少数，在解决问题的同时也总结了一些经验，在这里简单介绍一下，与大家分享，希望给在解决此类问题的同行一些帮助，也希望广大高手指出其中的不足和需要改进的地方。<br /><br /><strong>DHCP服务器冲突的解决方法</strong><br /><br />　　<b>使用DHCP snooping技术来解决</b><br /><br />　　针对这种DHCP服务器冲突的解决方法有很多，最直接的方法就是贴告示，让入住的客户在上网时关闭Windows的DHCP网络服务，这个选项在‘控制面板’，‘管理工具’里的‘DHCP网络服务’，进入关闭即可。这里要注意的是，非server版的Windows不用关闭，并且不要把‘控制面板’，‘管理工具’，‘服务’中的DHCP client给停止了，这样是分配不到地址的。 <br /><br />　　当然上面的方法比较被动也不合常理，更不便于我们网络的管理，所以还是应该从我们网络本身出发来解决问题。 <br /><br />　　既然是DHCP的问题，那么我们就用DHCP的技术来解决问题，比较有代表的就是DHCP snooping技术。DHCP snooping技术是DHCP安全特性，通过建立和维护DHCP snooping绑定表过滤不可信任的DHCP信息，这些信息是指来自不信任区域的DHCP信息。DHCP snooping绑定表包含不信任区域的用户mac地址、IP地址、租用期、vlan-id接口等信息。 <br /><br />　　首先定义交换机上的信任端口和不信任端口，其中信任端口连接DHCP服务器或其他交换机的端口;不信任端口连接用户或网络。不信任端口将接收到的DHCP服务器响应的DHCP ack 和DHCP off报文丢弃;而信任端口将此配置中的命令都是以CISCO的设备为基础，但不管是哪个公司的设备，总体设计思想是一致的，不同的可能在命令格式上略有差异，工作人员应该根据具体的实际情况来解决相应的问题。 <br /><br />　　在全局模式下启动DHCP snooping功能，这个默认是关闭的，而且不是所有设备都支持这个功能，最好先看使用说明。 <br /><br />　　switch(config)#ip dhcp-snooping <br /><br />　　如果有vlan就使用下面的命令来监测具体的vlan <br /><br />　　switch(config)#ip dhcp-snooping vlan vlan-id <br /><br />　　然后定义可信任的端口，默认情况交换机的端口均为不信任端口，通常网络设备接口， TRUNK 接口和连接DHCP服务器的端口定义为可信任端口。 <br /><br />　　switch(config)#int f0/x <br /><br />　　switch(config-if)#ip dhcp snooping trust <br /><br /><strong>使用PVLAN技术来解决</strong><br /><br />　　有很多二层的技术可以防止DHCP-server冲突的，PVLAN就是其中一个运用比较广的技术。 <br /><br />　　PVLAN私有局域网(private vlan)，在PVLAN的概念里，端口有3种类型:Isolated port，Community port, Promiscuous port;它们分别对应不同的vlan类型:Isolated port属于Isolated PVLAN，Community port属于Community PVLAN，而代表一个Private vlan整体的是Primary vlan，前面两类vlan需要和它绑定在一起，同时它还包括Promiscuous port。在Isolated PVLAN中，Isolated port只能和Promiscuous port，彼此之间不能访问;在Community PVLAN中，vlan与vlan之间都不能访问，同一Community vlan的接口可以互相访问，并且所有Community vlan的接口都可以与Promiscuous port进行通信。利用这项技术，我们可以把上连或连接DHCP服务器的接口定义为Promiscuous port，其他接口分配到Isolated vlan里，这样所有接口都只能与上连或DHCP服务器进行通信，即使有一台机器设为DHCP服务器，其他机器也不会与它产生流量，把它做为服务器。 <br /><br />　　利用这个技术解决DHCP-server冲突的方法有很多，也很灵活，下面介绍一种比较简单的方法，也是用的比较多的: <br /><br />　　首先把交换机配置成transparents模式:　　 <br /><br />　　switch(config)#vtp mode transparent <br /><br />　　顺便可以打开端口的保护功能，它的意思是打开端口保护的端口之间不能访问，但打开保护的端口可以与没有开启此项功能的端口通信，可以根据自己的需求来打开保护功能: <br /><br />　　switch(config)#int range f0/124 <br /><br />　　switch(config-if-range)#switchitchport protected <br /><br />　　建立isolated vlan和primary vlan，把isolated vlan定义为primary lan的附属vlan，因为要与primary互相访问: <br /><br />　　switch(config)#vlan 14 <br /><br />　　switch(config-vlan)private-vlan isolated <br /><br />　　switch(config)#vlan 44 <br /><br />　　switch(config-vlan)#private-vlan primary <br /><br />　　switch(config-vlan)#private-vlan association 14 <br /><img src ="http://www.blogjava.net/hellboys/aggbug/81181.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-11-15 10:22 <a href="http://www.blogjava.net/hellboys/archive/2006/11/15/81181.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>P2P之UDP穿透NAT的原理与实现</title><link>http://www.blogjava.net/hellboys/archive/2006/09/13/69263.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Tue, 12 Sep 2006 16:32:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/09/13/69263.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/69263.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/09/13/69263.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/69263.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/69263.html</trackback:ping><description><![CDATA[
		<h2 class="diaryTitle">P2P之UDP穿透NAT的原理与实现 - 增强篇(附修改过的源代码)</h2>
		<br />
		<p>------------------------------------------------------------------------------------------------------------</p>
		<p>NAT(The IP Network Address Translator) 的概念和意义是什么?</p>
		<p>NAT, 中文翻译为网络地址转换。具体的详细信息可以访问RFC 1631 - <a href="http://www.faqs.org/rfcs/rfc1631.html">http://www.faqs.org/rfcs/rfc1631.html</a>, 这是对于NAT的定义和解释的最权威的描述。网络术语都是很抽象和艰涩的，除非是专业人士，否则很难从字面中来准确理解NAT的含义。</p>
		<p>要想完全明白NAT 的作用，我们必须理解IP地址的两大分类，一类是私有IP地址，在这里我们称作内网IP地址。一类是非私有的IP地址，在这里我们称作公网IP地址。关于IP地址的概念和作用的介绍参见我的另一篇文章: <a href="http://hwycheng.blogchina.com/2402121.html">http://hwycheng.blogchina.com/2402121.html</a></p>
		<p>内网IP地址: 是指使用A/B/C类中的私有地址, 分配的IP地址在全球不惧有唯一性，也因此无法被其它外网主机直接访问。<br />公网IP地址: 是指具有全球唯一的IP地址，能够直接被其它主机访问的。</p>
		<p>NAT
最初的目的是为使用内网IP地址的计算机提供通过少数几台具有公网的IP地址的计算机访问外部网络的功能。NAT
负责将某些内网IP地址的计算机向外部网络发出的IP数据包的源IP地址转换为NAT自己的公网的IP地址，目的IP地址不变,
并将IP数据包转发给路由器，最终到达外部的计算机。同时负责将外部的计算机返回的IP数据包的目的IP地址转换为内网的IP地址，源IP地址不变，并最
终送达到内网中的计算机。<br />                                                 <br />        ----------------------                           ----------------------               <br />        | 192.168.0.5        |  Internat host            | 192.168.0.6        |  Internat host<br />        ----------------------                           ----------------------               <br />                ^ port:2809                                      ^port: 1827                            <br />                |                                                |                            <br />                V                                                V                            <br />        ----------------------                           ----------------------               <br />        | 192.168.0.1        | NAT device                | 192.168.0.2        | NAT device    <br />        | 61.51.99.86        |                           | 61.51.77.66        |               <br />        ----------------------                           ----------------------               <br />                ^                                                ^                            <br />                |                                                |                            <br />                V port:80                                        V port: 80                           <br />        ----------------------                           ----------------------               <br />        | 61.51.202.88       | Internet host             | 61.51.76.102       | Internet host <br />        ----------------------                           ----------------------               <br />                                                            <br />                              图一: NAT 实现了私有IP的计算机分享几个公网IP地址访问Internet的功能。<br />                              <br />随
着网络的普及，IPv4的局限性暴露出来。公网IP地址成为一种稀缺的资源，此时NAT
的功能局限也暴露出来，同一个公网的IP地址，某个时间只能由一台私有IP地址的计算机使用。于是NAPT(The IP Network
Address/Port
Translator)应运而生，NAPT实现了多台私有IP地址的计算机可以同时通过一个公网IP地址来访问Internet的功能。这在很大程度上暂
时缓解了IPv4地址资源的紧张。</p>
		<p>NAPT
负责将某些内网IP地址的计算机向外部网络发出的TCP/UDP数据包的源IP地址转换为NAPT自己的公网的IP地址，源端口转为NAPT自己的一个端
口。目的IP地址和端口不变,
并将IP数据包发给路由器，最终到达外部的计算机。同时负责将外部的计算机返回的IP数据包的目的IP地址转换内网的IP地址，目的端口转为内网计算机的
端口，源IP地址和源端口不变，并最终送达到内网中的计算机。</p>
		<p>                                                 <br />                ----------------------                           ----------------------               <br />                | 192.168.0.5        |  Internat host            | 192.168.0.6        |  Internat host<br />                ----------------------                           ----------------------               <br />                        port: 2809      ^                   ^ port: 1827<br />                                         \                 /<br />                                          v               v                             <br />                                        ----------------------            <br />                                        | 192.168.0.1        | NAT device <br />                                        | 61.51.99.86        |            <br />                                        ----------------------                                  <br />        map port:9882 to 192.168.0.5:2809 ^              ^ map port: 9881 to 192.168.0.6:1827<br />                                         /                \<br />                             port:80    v                  v    port:80                         <br />                ----------------------                           ----------------------               <br />                | 61.51.202.88       | Internet host             | 61.51.76.102       | Internet host <br />                ----------------------                           ----------------------                                 <br />                                <br />                              图二: NAPT 实现了私有IP的计算机分享一个公网IP地址访问Internet的功能。                                             <br /> <br />在
我们的工作和生活中,
NAPT的作用随处可见，绝大部分公司的网络架构，都是通过1至N台支持NAPT的路由器来实现公司的所有计算机连接外部的Internet网络的。包括
本人在写这篇文章的时候，也是在家中使用一台IBM笔记本通过一台宽带连接的台式机来访问Internet的。我们本篇文章主要讨论的NAPT的问题。</p>
		<p>NAPT(The IP Network Address/Port Translator) 为何阻碍了P2P软件的应用?</p>
		<p>通
过NAPT
上网的特点决定了只能由NAPT内的计算机主动向NAPT外部的主机发起连接，外部的主机想直接和NAPT内的计算机直接建立连接是不被允许的。IM(即
时通讯)而言，这意味着由于NAPT内的计算机和NAPT外的计算机只能通过服务器中转数据来进行通讯。对于P2P方式的下载程序而言，意味着NAPT内
的计算机不能接收到NAPT外部的连接，导致连接数用过少，下载速度很难上去。因此P2P软件必须要解决的一个问题就是要能够在一定的程度上解决NAPT
内的计算机不能被外部连接的问题。</p>
		<p>NAT(The IP Network Address Translator) 进行UDP穿透的原理是什么?</p>
		<p>TCP/IP
传输时主要用到TCP和UDP协议。TCP协议是可靠的，面向连接的传输协议。UDP是不可靠的，无连接的协议。根据TCP和UDP协议的实现原理，对于
NAPT来进行穿透，主要是指的UDP协议。TCP协议也有可能，但是可行性非常小，要求更高，我们此处不作讨论，如果感兴趣可以到Google上搜索，
有些文章对这个问题做了探讨性的描述。下面我们来看看利用UDP协议来穿透NAPT的原理是什么:</p>
		<p>                        ----------------------                           ----------------------               <br />                        | 192.168.0.5        |  Internat host            | 192.168.0.6        |  Internat host<br />                        ----------------------                           ----------------------               <br />                          UDP port: 2809        ^                   ^ UDP port: 1827<br />                                                 \                 /<br />                                                  v               v                             <br />                                                ----------------------            <br />                                                | 192.168.0.1        | NAT device <br />                                                | 61.51.99.86        |            <br />                                                ----------------------                                  <br />  Session(192.168.0.6:1827 &lt;-&gt; 61.51.76.102:8098) ^              ^ Session(192.168.0.6:1827 &lt;-&gt; 61.51.76.102:8098)<br />               map port:9882 to 192.168.0.5:2809 /                \map port: 9881 to 192.168.0.6:1827<br />                                  UDP port:8098 v                  v    UDP port:8098                           <br />                        ----------------------                           ----------------------               <br />                        | 61.51.202.88       | Internet host             | 61.51.76.102       | Internet host <br />                        ----------------------                           ----------------------                 <br />                                                        <br />                                        <br />                                      图三: NAPT 是如何将私有IP地址的UDP数据包与公网主机进行透明传输的。</p>
		<p>UDP协议包经NAPT透明传输的说明:</p>
		<p>NAPT
为每一个Session分配一个NAPT自己的端口号，依据此端口号来判断将收到的公网IP主机返回的TCP/IP数据包转发给那台内网IP地址的计算
机。在这里Session是虚拟的，UDP通讯并不需要建立连接，但是对于NAPT而言，的确要有一个Session的概念存在。NAPT对于UDP协议
包的透明传输面临的一个重要的问题就是如何处理这个虚拟的Session。我们都知道TCP连接的Session以SYN包开始，以FIN包结束，
NAPT可以很容易的获取到TCP
Session的生命周期，并进行处理。但是对于UDP而言，就麻烦了，NAPT并不知道转发出去的UDP协议包是否到达了目的主机，也没有办法知道。而
且鉴于UDP协议的特点，可靠很差，因此NAPT必须强制维持Session的存在，以便等待将外部送回来的数据并转发给曾经发起请求的内网IP地址的计
算机。NAPT具体如何处理UDP
Session的超时呢？不同的厂商提供的设备对于NAPT的实现不近相同，也许几分钟，也许几个小时，些NAPT的实现还会根据设备的忙碌状态进行智能
计算超时时间的长短。</p>
		<p>                  [192.168.0.6:1827]<br />                            | UDP Packet[src ip:192.168.0.6 src port:1827 dst ip:61.51.76.102 dst port 8098]<br />                            v<br />        [pub ip: 61.51.99.86]NAT[priv ip: 192.168.0.1]<br />                            | UDP Packet[src ip:61.51.99.86 src port:9881 dst ip:61.51.76.102 dst port 8098]<br />                            v                   <br />                  [61.51.76.102:8098]<br />                  <br />                                    图四: NAPT 将内部发出的UDP协议包的源地址和源端口改变传输给公网IP主机。<br />                                    <br />                                    <br />                  [192.168.0.6:1827]<br />                            ^<br />                            | UDP Packet[src ip:61.51.76.102 src port:8098 dst ip:192.168.0.6 dst port 1827]<br />        [pub ip: 61.51.99.86]NAT[priv ip: 192.168.0.1]<br />                            ^   <br />                            | UDP Packet[src ip:61.51.76.102 src port:8098 dst ip:61.51.99.86 dst port 9881]    <br />                  [61.51.76.102:8098]<br />                  <br />                                    图五: NAPT 将收到的公网IP主机返回的UDP协议包的目的地址和目的端口改变传输给内网IP计算机。                                <br />现在我们大概明白了NAPT如何实现内网计算机和外网主机间的透明通讯。现在来看一下我们最关心的问题，就是NAPT是依据什么策略来判断是否要为一个请求发出的UDP数据包建立Session的呢？主要有一下几个策略: </p>
		<p>A. 源地址(内网IP地址)不同，忽略其它因素, 在NAPT上肯定对应不同的Session<br />B. 源地址(内网IP地址)相同，源端口不同，忽略其它的因素，则在NAPT上也肯定对应不同的Session<br />C. 源地址(内网IP地址)相同，源端口相同，目的地址(公网IP地址)相同，目的端口不同，则在NAPT上肯定对应同一个Session<br />D. 源地址(内网IP地址)相同，源端口相同，目的地址(公网IP地址)不同，忽略目的端口，则在NAPT上是如何处理Session的呢？</p>
		<p>D的情况正式我们关心和要讨论的问题。依据目的地址(公网IP地址)对于Session的建立的决定方式我们将NAPT设备划分为两大类:</p>
		<p>Symmetric NAPT:<br />对于到同一个IP地址，任意端口的连接分配使用同一个Session; 对于到不同的IP地址, 任意端口的连接使用不同的Session. <br />我们称此种NAPT为 Symmetric NAPT. 也就是只要本地绑定的UDP端口相同， 发出的目的IP地址不同，则会建立不同的Session.</p>
		<p>        [202.223.98.78:9696] [202.223.98.78:9696] [202.223.98.78:9696]<br />                ^               ^                       ^<br />                |               |                       |<br />                v               v                       v<br />               9883            9882                    9881<br />                                 |<br />                             \ [NAT] /<br />                                 ^<br />                                 |<br />                                 v                        <br />                          [192.168.0.6:1827]<br />                          <br />                          图六: Symmetric 的英文意思是对称。多个端口对应多个主机，平行的，对称的!<br />                  <br />Cone NAPT:<br />对于到同一个IP地址，任意端口的连接分配使用同一个Session; 对于到不同的IP地址，任意端口的连接也使用同一个Session.<br />我们称此种NAPT为 Cone NAPT. 也就是只要本地绑定的UDP端口相同， 发出的目的地址不管是否相同， 都使用同一个Session.</p>
		<p>        [202.223.98.78:9696] [202.223.98.78:9696] [202.223.98.78:9696]</p>
		<p>                        ^          ^         ^<br />                         \         |        /<br />                          v        v       v<br />                                 9881<br />                                 [NAT]<br />                                   ^<br />                                   |<br />                                   v                      <br />                          [192.168.0.6:1827]<br />                          <br />                          图七: Cone 的英文意思是锥。一个端口对应多个主机，是不是像个锥子?</p>
		<p>现
在绝大多数的NAPT属于后者，即Cone NAT。本人在测试的过程中，只好使用了一台日本的Symmetric
NAT。还好不是自己的买的，我从不买日货,
希望看这篇文章的朋友也自觉的不要购买日本的东西。Win9x/2K/XP/2003系统自带的NAPT也是属于 Cone
NAT的。这是值的庆幸的，因为我们要做的UDP穿透只能在Cone NAT间进行，只要有一台不是Cone
NAT，对不起，UDP穿透没有希望了，服务器转发吧。后面会做详细分析!</p>
		<p>下面我们再来分析一下NAPT
工作时的一些数据结构，在这里我们将真正说明UDP可以穿透Cone
NAT的依据。这里描述的数据结构只是为了说明原理，不具有实际参考价值，真正感兴趣可以阅读Linux的中关于NAT实现部分的源码。真正的NAT实现
也没有利用数据库的，呵呵，为了速度！</p>
		<p>Symmetric NAPT 工作时的端口映射数据结构如下:</p>
		<p>内网信息表:</p>
		<p>[NAPT 分配端口] [ 内网IP地址 ] [ 内网端口 ] [ 外网IP地址 ] [ SessionTime 开始时间 ]</p>
		<p>PRIMARY KEY( [NAPT 分配端口] ) -&gt; 表示依据[NAPT 分配端口]建立主键，必须唯一且建立索引，加快查找.<br />UNIQUE( [ 内网IP地址 ], [ 内网端口 ] ) -&gt; 表示这两个字段联合起来不能重复.<br />UNIQUE( [ 内网IP地址 ], [ 内网端口 ], [ 外网IP地址 ] ) -&gt; 表示这三个字段联合起来不能重复.</p>
		<p>映射表:</p>
		<p>[NAPT 分配端口] [ 外网端口 ]</p>
		<p>UNIQUE( [NAPT 分配端口], [ 外网端口 ] ) -&gt; 表示这两个字段联合起来不能重复.</p>
		<p>Cone NAPT 工作时的端口映射数据结构如下:</p>
		<p>内网信息表:</p>
		<p>[NAPT 分配端口] [ 内网IP地址 ] [ 内网端口 ] [ SessionTime 开始时间 ]</p>
		<p>PRIMARY KEY( [NAPT 分配端口] ) -&gt; 表示依据[NAPT 分配端口]建立主键，必须唯一且建立索引，加快查找.<br />UNIQUE( [ 内网IP地址 ], [ 内网端口 ] ) -&gt; 表示这两个字段联合起来不能重复.</p>
		<p>外网信息表:</p>
		<p>[ wid 主键标识 ] [ 外网IP地址 ] [ 外网端口 ]</p>
		<p>PRIMARY KEY( [ wid 主键标识 ] ) -&gt; 表示依据[ wid 主键标识 ]建立主键，必须唯一且建立索引，加快查找.<br />UNIQUE( [ 外网IP地址 ], [ 外网端口 ] ) -&gt; 表示这两个字段联合起来不能重复.</p>
		<p>映射表: 实现一对多，的</p>
		<p>[NAPT 分配端口] [ wid 主键标识 ]</p>
		<p>UNIQUE( [NAPT 分配端口], [ wid 主键标识 ] ) -&gt; 表示这两个字段联合起来不能重复.<br />UNIQUE( [ wid 主键标识 ] ) -&gt; 标识此字段不能重复.</p>
		<p>看完了上面的数据结构是更明白了还是更晕了？ 呵呵! 多想一会儿就会明白了。通过NAT,内网计算机计算机向外连结是很容易的，NAPT会自动处理，我们的应用程序根本不必关心它是如何处理的。那么外部的计算机想访问内网中的计算机如何实现呢？我们来看一下下面的流程：</p>
		<p>c 是一台在NAPT后面的内网计算机，s是一台有外网IP地址的计算机。c 主动向 s 发起连接请求，NAPT依据上面描述的规则在自己的数据结构中记录下来，建立一个Session. 然后 c 和 s 之间就可以实现双向的透明的数据传输了。如下面所示:</p>
		<p>   c[192.168.0.6:1827] &lt;-&gt; [priv ip: 192.168.0.1]NAPT[pub ip: 61.51.99.86:9881] &lt;-&gt; s[61.51.76.102:8098]</p>
		<p>由
此可见，一台外网IP地址的计算机想和NAPT后面的内网计算机通讯的条件就是要求NAPT后面的内网计算机主动向外网IP地址的计算机发起一个UDP数
据包。外网IP地址的计算机利用收到的UDP数据包获取到NAPT的外网IP地址和映射的端口，以后就可以和内网IP的计算机透明的进行通讯了。<br />    <br />现
在我们再来分析一下我们最关心的两个NAPT后面的内网计算机如何实现直接通讯呢?
两者都无法主动发出连接请求，谁也不知道对方的NAPT的公网IP地址和NAPT上面映射的端口号。所以我们要靠一个公网IP地址的服务器帮助两者来建立
连接。当两个NAPT后面的内网计算机分别连接了公网IP地址的服务器后，服务器可以从收到的UDP数据包中获取到这两个NAPT设备的公网IP地址和这
两个连接建立的Session的映射端口。两个内网计算机可以从服务器上获取到对方的NAPT设备公网IP地址和映射的端口了。</p>
		<p>我们假设两个内网计算机分别为A和B，对应的NAPT分别为AN和BN， 如果A在获取到B对应的BN的IP地址和映射的端口后，迫不急待的向这个IP<br />地
址和映射的端口发送了个UDP数据包，会有什么情况发生呢？依据上面的原理和数据结构我们会知道，AN会在自己的数据结构中生成一条记录，标识一个新
Session的存在。BN在收到数据包后，从自己的数据结构中查询，没有找到相关记录，因此将包丢弃。B是个慢性子，此时才慢吞吞的向着AN的IP地址
和映射的端口发送了一个UDP数据包，结果如何呢？当然是我们期望的结构了，AN在收到数据包后，从自己的数据结构中查找到了记录，所以将数据包进行处理
发送给了A。A 再次向B发送数据包时，一切都时畅通无阻了。OK, 大工告成！且慢，这时对于Cone NAPT而言，对于Symmetric
NAPT呢？呵呵，自己分析一下吧...</p>
		<p>NAPT(The IP Network Address/Port Translator) 进行UDP穿透的具体情况分析!</p>
		<p>首先明确的将NAPT设备按照上面的说明分为: Symmetric NAPT 和 Cone NAPT, Cone NAPT 是我们需要的。Win9x/2K/XP/2003 自带的NAPT也为Cone NAPT。</p>
		<p>第一种情况, 双方都是Symmetric NAPT:</p>
		<p>此情况应给不存在什么问题，肯定是不支持UDP穿透。</p>
		<p>第二种情况, 双方都是Cone NAPT:</p>
		<p>此情况是我们需要的，可以进行UDP穿透。</p>
		<p>第三种情况, 一个是Symmetric NAPT, 一个是Cone NAPT:</p>
		<p>此情况比较复杂，但我们按照上面的描述和数据机构进行一下分析也很容易就会明白了, 分析如下,</p>
		<p>假设: A -&gt; Symmetric NAT, B -&gt; Cone NAT</p>
		<p>1.
A 想连接 B, A 从服务器那儿获取到 B 的NAT地址和映射端口, A 通知服务器，服务器告知 B A的NAT地址和映射端口, B 向 A
发起连接，A 肯定无法接收到。此时 A 向 B 发起连接， A 对应的NAT建立了一个新的Session，分配了一个新的映射端口， B 的
NAT 接收到UDP包后，在自己的映射表中查询，无法找到映射项，因此将包丢弃了。</p>
		<p>2. B 想连接 A, B 从服务器那儿获取到
A 的NAT地址和映射端口, B 通知服务器, 服务器告知 A B的NAT地址和映射端口,A 向 B 发起连接, A
对应的NAT建立了一个新的Session，分配了一个新的映射端口B肯定无法接收到。此时 B 向 A 发起连接, 由于 B 无法获取 A
建立的新的Session的映射端口，仍是使用服务器上获取的映射端口进行连接， 因此 A
的NAT在接收到UDP包后，在自己的映射表中查询，无法找到映射项, 因此将包丢弃了。</p>
		<p>根据以上分析，只有当连接的两端的NAT都为Cone NAT的情况下，才能进行UDP的内网穿透互联。</p>
		<p>
				<br />NAPT(The IP Network Address/Port Translator) 进行UDP穿透如何进行现实的验证和分析!</p>
		<p>需要的网络结构如下:</p>
		<p>三个NAT后面的内网机器，两个外网服务器。其中两台Cone NAPT，一台 Symmetric NAPT。</p>
		<p>验证方法:</p>
		<p>可
以使用本程序提供的源码，编译，然后分别运行服务器程序和客户端。修改过后的源码增加了客户端之间直接通过IP地址和端口发送消息的命令，利用此命令，你
可以手动的验证NAPT的穿透情况。为了方便操作，推荐你使用一个远程登陆软件，可以直接在一台机器上操作所有的相关的计算机，这样很方便，一个人就可以
完成所有的工作了。呵呵，本人就是这么完成的。欢迎有兴趣和经验的朋友来信批评指正，共同进步。</p>
		<br />
		<p>
				<br />
		</p>原始作者: Hwycheng Leo(<a href="mailto:FlashBT@Hotmail.com">FlashBT@Hotmail.com</a>)<br /><p>源码下载: <a href="http://bbs.hwysoft.com/download/UDP-NAT-LEO.rar">http://bbs.hwysoft.com/download/UDP-NAT-LEO.rar</a><br />参考：<a href="http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt">http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt</a><br />      P2P之UDP穿透NAT的原理与实现(shootingstars)</p><p>文章说明:</p><p>关
于UDP穿透NAT的中文资料在网络上是很少的，仅有&lt;&lt;P2P之UDP穿透NAT的原理与实现(shootingstars)&gt;
&gt;这篇文章有实际的参考价值。本人近两年来也一直从事P2P方面的开发工作，比较有代表性的是个人开发的BitTorrent下载软件 -
FlashBT(变态快车). 对P2P下载或者P2P的开发感兴趣的朋友可以访问软件的官方主页: <a href="http://www.hwysoft.com/chs/">http://www.hwysoft.com/chs/</a> 下载看看，说不定有收获。写这篇文章的主要目的是懒的再每次单独回答一些网友的提问, 一次性写下来, 即节省了自己的时间，也方便了对于P2P的UDP穿透感兴趣的网友阅读和理解。对此有兴趣和经验的朋友可以给我发邮件或者访问我的个人Blog留言: <a href="http://hwycheng.blogchina.com/">http://hwycheng.blogchina.com</a>. <br />您可以自由转载此篇文章，但是请保留此说明。</p><p>再次感谢shootingstars网友的早期贡献. 表示谢意。</p><img src ="http://www.blogjava.net/hellboys/aggbug/69263.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-09-13 00:32 <a href="http://www.blogjava.net/hellboys/archive/2006/09/13/69263.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>desktop推荐使用ubuntu</title><link>http://www.blogjava.net/hellboys/archive/2006/08/29/66483.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Tue, 29 Aug 2006 09:40:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/08/29/66483.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/66483.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/08/29/66483.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/66483.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/66483.html</trackback:ping><description><![CDATA[
		<p>在安装ubuntu6.061LTS 以后,感觉非常不错.<br /><br />桌面部分ubuntu5 和ubuntu6有很大的改进.不要自己费劲去装输入法了. 自带的scim感觉很不错.兼容性也可以.影音部分只要安装个 w32code就可以rth可以很流畅的play 决大部分格式的文件.<br />驱动也支持的比较好.不过自己又做了一下nv的驱动.感觉也没什么太大的变化.<br />还有一贯的继承deb的安装包组织.可以很舒服的setup 一些东东. 这个就不做广告了. 有兴趣的可以试试.<br /><br />感觉可惜的就是 apt-get 是lock单任务的, 安装很多东东的时候不太方便. </p>
		<p>其实不必要用她和windows来比较. 因为各自的方式.如何你很喜欢shell,那么linux更加方便.当然,ubuntu6用户体验已经有了很大的提升,已经和windows很接近了.其实就是用户习惯的问题.<br /><br />单张光盘的iso也让人非常满意.</p>
<img src ="http://www.blogjava.net/hellboys/aggbug/66483.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-08-29 17:40 <a href="http://www.blogjava.net/hellboys/archive/2006/08/29/66483.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>了解SNMP简单网络管理协议</title><link>http://www.blogjava.net/hellboys/archive/2006/07/14/58224.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Fri, 14 Jul 2006 09:10:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/07/14/58224.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/58224.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/07/14/58224.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/58224.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/58224.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 21pt; COLOR: blue; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">了解</span>
				<span lang="EN-US" style="FONT-SIZE: 21pt; COLOR: blue; FONT-FAMILY: Arial; mso-font-kerning: 0pt">SNMP</span>
				<span style="FONT-SIZE: 21pt; COLOR: blue; FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">简单网络管理协议</span>
				<span lang="EN-US" style="FONT-SIZE: 21pt; COLOR: blue; FONT-FAMILY: Arial; mso-font-kerning: 0pt">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">1.</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">基于</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">T C P / I P</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的网络管理包含</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">3</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个组成部分：</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">1) </span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个管理信息库</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">M I B</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">Management Information Base</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）。管理信息库包含所有代理进程</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的所有可被查询和修改的参数。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">2) </span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关于</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">M I B</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的一套公用的结构和表示符号。叫做管理信息结构</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">S M I</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。例如：</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">S M I<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义计数器是一个非负整数，它的计数范围是</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">0~4 294 967 295</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，当达到最大值时，又从</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">0</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开始</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">计数。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">3) </span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">管理进程和代理进程之间的通信协议，叫做简单网络管理协议</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">S N M P</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">Simple Network<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">Management Protocol</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一般是</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">udp</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">协议，默认端口</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">udp:161.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">2.</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
				</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">协议</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关于管理进程和代理进程之间的交互信息，</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt"> S N M P</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义了</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">5</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种报文：</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">1) </span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">g e t - r e q u e s t</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作：从代理进程处提取一个或多个参数值。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">2) </span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">g e t - n e x t - r e q u e s t</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作：从代理进程处提取一个或多个参数的下一个参数值（关于“下一个（</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">n e x t</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）”的含义将在后面的章节中介绍）。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">3) </span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">s e t - r e q u e s t</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作：设置代理进程的一个或多个参数值。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">4) </span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">g e t - r e s p o n s e</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作：返回的一个或多个参数值。这个操作是由代理进程发出的。它是前面</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">3</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中操作的响应操作。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">5) </span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">t r a p </span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">操作：代理进程主动发出的报文，通知管理进程有某些事情发生。</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 21pt; COLOR: blue; FONT-FAMILY: Arial; mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">版本字段是</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">0</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。该字段的值是通过</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">S N M P</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">版本号减去</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">1</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">得到的。显然</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">0</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代表</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">SNMP v1</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。<img height="225" alt="image002.jpg" src="http://www.blogjava.net/images/blogjava_net/hellboys/image002.jpg" width="486" border="0" /></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 21pt; COLOR: blue; FONT-FAMILY: Arial; mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">差错状态字段是一个整数，它是由代理进程标注的，指明有差错发生。图是参数值、名称和描述之间的对应关系。</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">差错索引字段是一个整数偏移量，指明当有差错发生</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">时，差错发生在哪个参数。它是由代理进程标注的，并且</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">只有在发生</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">n o S u c h N a m e</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">、</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">r e a d O n l y</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">和</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">b a d V a l u e</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">差错</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: Courier; mso-hansi-font-family: Courier; mso-bidi-font-family: Courier">时才进行标注。<br /><img height="107" alt="image004.jpg" src="http://www.blogjava.net/images/blogjava_net/hellboys/image004.jpg" width="407" border="0" /></span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">3. </span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象标识符</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象标识是一种数据类型，它指明一种“授权”命名的对象。“授权”的意思就是这些标</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">识不是随便分配的，它是由一些权威机构进行管理和分配的</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象标识是一个整数序列，以点（“</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">.</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”）分隔。这些整数构成一个树型结构，类似于</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">D N S<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">U n i x</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的文件系统。对象标识从树的顶部开始，顶部没有标识，以</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">r o o t</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示（这和</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">U n i x</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中文件系统的树遍历方向非常类似）。树上的每个结点同时还有一个文字名。例如标识</span>
				<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /?>
				<st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False">
						<span lang="EN-US" style="mso-font-kerning: 0pt">1 . 3 . 6</span>
				</st1:chsdate>
				<span lang="EN-US" style="mso-font-kerning: 0pt"> . 1 . 2 . 1</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就和</span>
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">i s o . o r g . d o d .<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-FAMILY: Courier; mso-font-kerning: 0pt; mso-bidi-font-family: Courier">i n t e r n e t . m e m t . m i b</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对应。这主要是为了人们阅读方便。在实际应用中，也就是说在管理进程</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和代理进程进行数据报交互时，</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">M I B</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">变量名是以对象标识来标识的，当然都是以</span>
				<st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False">
						<span lang="EN-US" style="mso-font-kerning: 0pt">1 . 3 . 6</span>
				</st1:chsdate>
				<span lang="EN-US" style="mso-font-kerning: 0pt"> . 1 . 2 . 1</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开头的。<img height="343" alt="image006.jpg" src="http://www.blogjava.net/images/blogjava_net/hellboys/image006.jpg" width="427" border="0" /></span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: AdobeSongStd-Light; mso-font-kerning: 0pt; mso-bidi-font-family: AdobeSongStd-Light">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: AdobeSongStd-Light; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: AdobeSongStd-Light">在图中，我们除了给出了</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">m i b</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: AdobeSongStd-Light; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: AdobeSongStd-Light">对象标识外，还给出了</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">i s o . o r g . d o d . i n t e r n e t .<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">p r i v a t e . e n t e r p r i s e s</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: AdobeSongStd-Light; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: AdobeSongStd-Light">（</span>
				<st1:chsdate w:st="on" year="1899" month="12" day="30" islunardate="False" isrocdate="False">
						<span lang="EN-US" style="mso-font-kerning: 0pt">1 . 3 . 6</span>
				</st1:chsdate>
				<span lang="EN-US" style="mso-font-kerning: 0pt"> . 1 . 4 . 1</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: AdobeSongStd-Light; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: AdobeSongStd-Light">）这个标识。这是给厂家自定义而预留的。在</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">A s s i g n e d<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">Number RFC</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: AdobeSongStd-Light; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: AdobeSongStd-Light">中列出了在该结点下大约</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">4 0 0</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: AdobeSongStd-Light; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-family: AdobeSongStd-Light">个标识。</span>
				<span lang="EN-US" style="FONT-FAMILY: AdobeSongStd-Light; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt; mso-bidi-font-family: AdobeSongStd-Light">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-font-kerning: 0pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">此篇自做个人参考</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">更多了解请看</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">TCPIP</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">协议详解卷一</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">(</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">协议</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">) 25</span>
				<span style="FONT-FAMILY: 宋体; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">章</span>
				<span lang="EN-US" style="mso-font-kerning: 0pt">.<o:p></o:p></span>
		</p>
<img src ="http://www.blogjava.net/hellboys/aggbug/58224.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-07-14 17:10 <a href="http://www.blogjava.net/hellboys/archive/2006/07/14/58224.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Mysql 集群简介和配置</title><link>http://www.blogjava.net/hellboys/archive/2006/06/28/55507.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Wed, 28 Jun 2006 03:58:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/06/28/55507.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/55507.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/06/28/55507.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/55507.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/55507.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l2 level1 lfo1">
				<span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN">
						<span style="mso-list: Ignore">1．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">先了解一下你是否应该用</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">集群。</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">减少数据中心结点压力和大数据量处理，采用把</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">分布，一个或多个</span>
				<span lang="EN" style="mso-ansi-language: EN">application </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">对应一个</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">数据库。把几个</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">数据库公用的数据做出共享数据，例如购物车，用户对象等等，存在数据结点里面。其他不共享的数据还维持在各自分布的</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">数据库本身中。</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<span lang="EN" style="mso-ansi-language: EN">
				<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /?>
				<v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600">
						<v:stroke joinstyle="miter">
						</v:stroke>
						<v:formulas>
								<v:f eqn="if lineDrawn pixelLineWidth 0">
								</v:f>
								<v:f eqn="sum @0 1 0">
								</v:f>
								<v:f eqn="sum 0 0 @1">
								</v:f>
								<v:f eqn="prod @2 1 2">
								</v:f>
								<v:f eqn="prod @3 21600 pixelWidth">
								</v:f>
								<v:f eqn="prod @3 21600 pixelHeight">
								</v:f>
								<v:f eqn="sum @0 0 1">
								</v:f>
								<v:f eqn="prod @6 1 2">
								</v:f>
								<v:f eqn="prod @7 21600 pixelWidth">
								</v:f>
								<v:f eqn="sum @8 21600 0">
								</v:f>
								<v:f eqn="prod @7 21600 pixelHeight">
								</v:f>
								<v:f eqn="sum @10 21600 0">
								</v:f>
						</v:formulas>
						<v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f">
						</v:path>
						<o:lock aspectratio="t" v:ext="edit">
						</o:lock>
				</v:shapetype>
				<div class="mediaobject">
						<img alt="MySQL Cluster Components" src="http://dev.mysql.com/doc/refman/5.0/en/images/cluster-components-1.png" />
				</div>
				<o:p>
				</o:p>
		</span>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l2 level1 lfo1">
				<span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN">
						<span style="mso-list: Ignore">2．<span style="FONT: 7pt 'Times New Roman'">  </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集群</span>
				<span lang="EN" style="mso-ansi-language: EN">Mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">中名称概念</span>
				<span lang="EN" style="mso-ansi-language: EN">.(</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">如上图</span>
				<span lang="EN" style="mso-ansi-language: EN">)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt">
				<span lang="EN" style="mso-ansi-language: EN">1</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">）</span>
				<span lang="EN" style="mso-ansi-language: EN">Sql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">结点（</span>
				<span lang="EN" style="mso-ansi-language: EN">SQL node--</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">上图对应为</span>
				<span lang="EN" style="mso-ansi-language: EN">mysqld</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">）</span>
				<span lang="EN" style="mso-ansi-language: EN">:</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">分布式数据库。包括自身数据和查询中心结点数据</span>
				<span lang="EN" style="mso-ansi-language: EN">.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt">
				<span lang="EN" style="mso-ansi-language: EN">2</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">）数据结点</span>
				<span lang="EN" style="mso-ansi-language: EN">(Data node -- ndbd):</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">集群共享数据</span>
				<span lang="EN" style="mso-ansi-language: EN">(</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">内存中</span>
				<span lang="EN" style="mso-ansi-language: EN">).<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt">
				<span lang="EN" style="mso-ansi-language: EN">3</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">）管理服务器</span>
				<span lang="EN" style="mso-ansi-language: EN">(Management Server – ndb_mgmd): </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">集群管理</span>
				<span lang="EN" style="mso-ansi-language: EN">SQL node,Data node.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">3</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">．配置</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-tab-count: 1">       </span>mysql-max </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">版本，当然现在</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">集群系统</span>
				<span lang="EN" style="mso-ansi-language: EN">windonws</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">平台上面不被支持</span>
				<span lang="EN" style="mso-ansi-language: EN">.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-tab-count: 1">       </span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">安装</span>
				<span lang="EN" style="mso-ansi-language: EN">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">就不多说了，网上一打堆，简明扼要。</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-tab-count: 1">       </span>A:192.168.1.251 – Data node </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">和</span>
				<span style="mso-ansi-language: EN">
						<span lang="EN">Management Server.<o:p></o:p></span>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-tab-count: 1">       </span>B:192.168.1.254 – SQL node.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">当然，你也可以让一个机器同时为</span>
				<span lang="EN" style="mso-ansi-language: EN"> 3</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">者。</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">A,B my.inf </span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">加上：</span>
				<span style="mso-ansi-language: EN">
						<span lang="EN">
								<o:p>
								</o:p>
						</span>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-tab-count: 1">       </span>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[MYSQLD]<span style="mso-spacerun: yes">                        </span><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">ndbcluster<span style="mso-spacerun: yes">                      </span># run NDB engine<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">ndb-connectstring=192.168.1.251<span style="mso-spacerun: yes">  </span># location of MGM node<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN"># Options for ndbd process:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[MYSQL_CLUSTER]<span style="mso-spacerun: yes">                 </span><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">ndb-connectstring=192.168.1.251<span style="mso-spacerun: yes">  </span># location of MGM node<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">A: /var/lib/mysql-cluster/config.ini<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[NDBD DEFAULT]<span style="mso-spacerun: yes">    </span><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">NoOfReplicas=1<span style="mso-spacerun: yes">    </span># Number of replicas<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">DataMemory=<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /?><st1:chmetcnv w:st="on" unitname="m" sourcevalue="80" hasspace="False" negative="False" numbertype="1" tcsc="0">80M</st1:chmetcnv><span style="mso-spacerun: yes">    </span># How much memory to allocate for data storage<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">IndexMemory=<st1:chmetcnv w:st="on" unitname="m" sourcevalue="18" hasspace="False" negative="False" numbertype="1" tcsc="0">18M</st1:chmetcnv><span style="mso-spacerun: yes">   </span># How much memory to allocate for index storage<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># For DataMemory and IndexMemory, we have used the<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># default values. Since the "world" database takes up<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># only about 500KB, this should be more than enough for<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># this example Cluster setup.<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN"># TCP/IP options:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[TCP DEFAULT]<span style="mso-spacerun: yes">     </span><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">portnumber=2202<span style="mso-spacerun: yes">   </span># This the default; however, you can use any<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                </span>
						<span style="mso-spacerun: yes">  </span># port that is free for all the hosts in cluster<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># Note: It is recommended beginning with MySQL 5.0 that<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># you do not specify the portnumber at all and simply allow<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                  </span># the default value to be used instead<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN"># Management process options:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[NDB_MGMD]<span style="mso-spacerun: yes">                      </span><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">hostname=192.168.1.251<span style="mso-spacerun: yes">           </span># Hostname or IP address of MGM node<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">datadir=/var/lib/mysql-cluster<span style="mso-spacerun: yes">  </span># Directory for MGM node logfiles<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN"># Options for data node "A":<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[NDBD]<span style="mso-spacerun: yes">                  </span><span style="mso-spacerun: yes">        </span><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes">                                </span># (one [NDBD] section per data node)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">hostname=192.168.1.251<span style="mso-spacerun: yes">           </span># Hostname or IP address<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">datadir=/usr/local/mysql/data<span style="mso-spacerun: yes">   </span># Directory for this data node's datafiles<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN"># SQL node options:<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[MYSQLD]<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">hostname=192.168.1.254<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">#[MYSQLD] #</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">这个相当于</span>
				<span lang="EN" style="mso-ansi-language: EN">192.168.1.251<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; tab-stops: list 18.0pt; mso-list: l3 level1 lfo5">
				<span lang="EN" style="mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN">
						<span style="mso-list: Ignore">4.<span style="FONT: 7pt 'Times New Roman'">       </span></span>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">启动测试</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; tab-stops: list 36.0pt; mso-list: l1 level1 lfo3">
				<span lang="EN" style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN">
						<span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">         </span></span>
				</span>
				<span style="mso-ansi-language: EN">
						<font face="宋体">在管理服务器上面<span lang="EN">(</span>这里是<code><span lang="EN">192.168.1.251</span></code><span lang="EN">): <o:p></o:p></span></font>
				</span>
		</p>
		<pre style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; mso-list: l1 level1 lfo3">
				<span lang="EN" style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN">
						<span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">                </span></span>
				</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<font face="宋体">shell&gt; <code><b>ndb_mgmd -f /var/lib/mysql-cluster/config.ini</b></code><o:p></o:p></font>
				</span>
		</pre>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; tab-stops: list 36.0pt; mso-list: l0 level1 lfo2">
				<span lang="EN" style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN">
						<span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">         </span></span>
				</span>
				<span style="mso-ansi-language: EN">
						<font face="宋体">在数据结点服务器上面<span lang="EN">(</span>依然是<code><span lang="EN">192.168.1.251</span></code><span lang="EN"> and more): <o:p></o:p></span></font>
				</span>
		</p>
		<pre style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo2">
				<span lang="EN" style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN">
						<span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">                </span></span>
				</span>
				<font face="宋体">
						<span lang="EN" style="mso-ansi-language: EN">shell&gt; <code><b>ndbd </b>--initial (</code></span>
						<code>
								<span style="mso-ansi-language: EN">第一次时加 <span lang="EN">--initial </span>参数<span lang="EN">)</span></span>
						</code>
						<span lang="EN" style="mso-ansi-language: EN">
								<o:p>
								</o:p>
						</span>
				</font>
		</pre>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; tab-stops: list 36.0pt; mso-list: l4 level1 lfo4">
				<span lang="EN" style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN">
						<span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">         </span></span>
				</span>
				<font face="宋体">
						<span lang="EN" style="mso-ansi-language: EN">SQL</span>
						<span style="mso-ansi-language: EN">结点服务器上面<span lang="EN">(<code>192.168.1.254</code>): <o:p></o:p></span></span>
				</font>
		</p>
		<pre style="MARGIN-LEFT: 36pt; TEXT-INDENT: -18pt; mso-list: l4 level1 lfo4">
				<span lang="EN" style="FONT-SIZE: 10pt; FONT-FAMILY: Symbol; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-ansi-language: EN">
						<span style="mso-list: Ignore">·<span style="FONT: 7pt 'Times New Roman'">                </span></span>
				</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<font face="宋体">shell&gt; <code><b>mysqld &amp;</b></code><o:p></o:p></font>
				</span>
		</pre>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">在</span>
				<span lang="EN" style="mso-ansi-language: EN">251</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">上面察看</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">./ndb_mgm<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">-- NDB Cluster -- Management Client --<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">ndb_mgm&gt; show<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">Connected to Management Server at: 192.168.1.251:1186<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">Cluster Configuration<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">---------------------<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[ndbd(NDB)]<span style="mso-spacerun: yes">     </span>1 node(s)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">id=2<span style="mso-spacerun: yes">    </span>@192.168.1.251<span style="mso-spacerun: yes">  </span>(Version: <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">5.0.22</st1:chsdate>, Nodegroup: 0, Master)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes"> </span>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[ndb_mgmd(MGM)] 1 node(s)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">id=1<span style="mso-spacerun: yes">    </span>@192.168.1.251<span style="mso-spacerun: yes">  </span>(Version: <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">5.0.22</st1:chsdate>)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<span style="mso-spacerun: yes"> </span>
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">[mysqld(API)]<span style="mso-spacerun: yes">   </span>1 node(s)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">id=3<span style="mso-spacerun: yes">    </span>@192.168.1.254<span style="mso-spacerun: yes">  </span>(Version: <st1:chsdate w:st="on" isrocdate="False" islunardate="False" day="30" month="12" year="1899">5.0.22</st1:chsdate>)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">ok<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">关闭集群：</span>
				<span lang="EN" style="mso-ansi-language: EN">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN" style="mso-ansi-language: EN">shell&gt; </span>
				<code>
						<b>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN">
										<font face="宋体">ndb_mgm -e shutdown<o:p></o:p></font>
								</span>
						</b>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<code>
						<b>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN">
										<o:p>
												<font face="宋体"> </font>
										</o:p>
								</span>
						</b>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<code>
						<b>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN">
										<o:p>
												<font face="宋体"> </font>
										</o:p>
								</span>
						</b>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<font face="宋体">
						<code>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">5</span>
						</code>
						<code>
								<span style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">．基本的集群说明<span lang="EN"><o:p></o:p></span></span>
						</code>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font face="宋体">
						<code>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">1</span>
						</code>
						<code>
								<span style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">）在<span lang="EN">mysql </span>集群中<span lang="EN">.</span>当<span lang="EN">table</span>引擎为<span lang="EN">NDBCLUSTER</span>时才做集群，其他非<span lang="EN">NDBCLUSTER</span>表和一般<span lang="EN">mysql</span>数据库表一样，不会共享数据<span lang="EN">. NDBCLUSTER </span>表数据存储在<span lang="EN">Data node</span>服务器<b>内存中</b>，<span lang="EN">Data Node</span>可以为<span lang="EN">1</span>台或多台服务器，它们之间存放共享数据。<span lang="EN">Data Node</span>服务器可以分组数据<span lang="EN">copy</span>。<span lang="EN"><o:p></o:p></span></span>
						</code>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<code>
						<span style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">
								<font face="宋体">例如：<span lang="EN">2,3,4,5 </span>为四台<span lang="EN">Data Node</span>服务器<span lang="EN">ID. 2,3</span>为组<span lang="EN">0</span>。<span lang="EN"><span style="mso-spacerun: yes">  </span>4</span>，<span lang="EN">5</span>为组<span lang="EN">1</span>。<span lang="EN"><span style="mso-spacerun: yes">  </span>2</span>，<span lang="EN">3维持</span>数据相同，<span lang="EN"> 4</span>，<span lang="EN">5维持</span>数据相同。 组<span lang="EN">0</span>和组<span lang="EN">1维持</span>数据不同。<span lang="EN"><o:p></o:p></span></font>
						</span>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<font face="宋体">
						<code>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">
										<span style="mso-tab-count: 1">    </span>2</span>
						</code>
						<code>
								<span style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">）<span lang="EN"> sql node </span>服务器中，非<span lang="EN">NDBCLUSTER</span>数据存在本身数据库中，<span lang="EN">table</span>引擎为<span lang="EN">NDBCLUSTER</span>时，数据存储在<span lang="EN">Data Node </span>中。当查询<span lang="EN">NDBCLUSTER</span>表时，它会从<span lang="EN">Data node</span>集群中提起数据<span lang="EN">.<o:p></o:p></span></span>
						</code>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<code>
						<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">
								<font face="宋体">
										<span style="mso-tab-count: 1">    </span>3)Manager server<o:p></o:p></font>
						</span>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<font face="宋体">
						<code>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">
										<span style="mso-tab-count: 1">    </span>
								</span>
						</code>
						<code>
								<span style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">管理<span lang="EN">SQl node </span>和<span lang="EN">Data node </span>状态。<span lang="EN"><o:p></o:p></span></span>
						</code>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<code>
						<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">
								<o:p>
										<font face="宋体"> </font>
								</o:p>
						</span>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<code>
						<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">
								<o:p>
										<font face="宋体"> </font>
								</o:p>
						</span>
				</code>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<font face="宋体">
						<code>
								<span lang="EN" style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">6 </span>
						</code>
						<code>
								<span style="FONT-SIZE: 12pt; mso-ansi-language: EN; mso-bidi-font-weight: bold">深入了解</span>
						</code>
						<code>
								<span lang="EN" style="FONT-FAMILY: 'Times New Roman'; mso-ansi-font-size: 10.5pt; mso-ansi-language: EN">
										<o:p>
										</o:p>
								</span>
						</code>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt">
				<span lang="EN" style="mso-ansi-language: EN">http://dev.mysql.com/doc/refman/5.0/en/ndbcluster.html<br /><o:p><br /></o:p></span>
		</p>
<img src ="http://www.blogjava.net/hellboys/aggbug/55507.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-06-28 11:58 <a href="http://www.blogjava.net/hellboys/archive/2006/06/28/55507.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>基于Linux的VPN服务器</title><link>http://www.blogjava.net/hellboys/archive/2006/04/30/44103.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Sat, 29 Apr 2006 16:21:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/04/30/44103.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/44103.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/04/30/44103.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/44103.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/44103.html</trackback:ping><description><![CDATA[VPN(Virtual Private Network，虚拟专用网络)是专用网络的延伸，它可以通过共享Internet或公共网络连接模拟点对点专用连接的方式，在本地计算机和远程计算机之间发送数据。<br />它具有良好的保密性和不受干扰性，使双方能够进行自由而安全的点对点连接。下面介绍一种快速构建VPN服务器的方法。<br /><br /><strong>安装软件</strong><br /><br />1.安装PPP<br /><br />安装PPP（Point-to-Point Protocol，点到点协议）2.4.2以上的版本，可以到<a href="http://sourceforge.net/project/showfiles.php?group_id=44827">http://sourceforge.net/project/showfiles.php?group_id=44827</a>下载ppp-2.4.3-0.cvs_20040527.1.i386.rpm软件包。<br /><br />安装命令如下：<br /><br />#rpm -Uvh ppp-2.4.3-0.cvs_20040527.1.i386.rpm<br /><br />2.安装内核MPPE补丁 <br /><br />安装内核MPPE（Microsoft Point to Point Encryption，微软点对点加密）补丁需要根据内核选择相应的版本。笔者使用的Linux内核是2.4.20-31.9版本，可以到http: //pptpclient.sourceforge.net/mppe/kernel-mppe-2.4.20-31.9.i686.rpm下载相应的 kernel-mppe-2.4.20-31.9.i686.rpm软件包。安装命令如下： <br /><br />#rpm -ivh kernel-mppe-2.4.20-31.9.i686.rpm<br /><br />用以下命令检查内核MPPE补丁是否安装成功： <br /><br />#modprobe ppp-compress-18<br /><br /><br />3.检查PPP是否支持MPPE <br /><br />用以下命令检查PPP是否支持MPPE： <br /><br />#strings '/usr/sbin/pppd' |grep -i mppe | wc --lines<br /><br />如果以上命令输出为“0”则表示不支持；输出为“30”或更大的数字就表示支持。<br />4.安装PPTPD <br /><br />到<a href="http://sourceforge.net/project/showfiles.php?group_id=44827">http://sourceforge.net/project/showfiles.php?group_id=44827</a>下载pptpd-1.1.4-b4.i386.rpm软件包，并安装。 <br /><br /># rpm -ivh pptpd-1.1.4-b4.i386.rpm<br /><br /><strong>修改配置文件</strong><br /><br />1.修改modules.conf文件<br /><br />编辑/etc/modules.conf配置文件，加入如下内容：<br /><br />alias net-pf-47 ip_gre<br /><br />2.修改pptpd.conf文件 <br /><br />编辑/etc/pptpd.conf配置文件，添加如下内容，确定本地VPN服务器的IP地址和客户端登录后分配的IP地址范围。 <br /><br />debug <br />option /etc/ppp/options.pptpd<br />localip 192.168.0.254 #本地VPN服务器的IP<br />remoteip 192.168.1.1-254 #客户端被分配的IP范围<br /><br />3.修改options.pptpd文件 <br /><br />编辑/etc/ppp/options.pptpd配置文件，替换成如下内容： <br /><br />auth<br />lock<br />debug<br />proxyarp<br />lock<br />name rh9vpn #VPN服务器的名字<br />multilink<br />refuse-pap<br />refuse-chap<br />refuse-mschap<br />refuse-eap<br />refuse-mschap-v2<br />require-mppe<br />ms-wins 192.168.1.2 #把想要在网络邻居中看到的机器的IP填写到这里<br />ms-dns 192.168.1.2 #DNS服务器地址 <br />dump <br />logfile /var/log/pptpd.log #日志存放的路径<br />4.修改chap-secrets文件 <br /><br />编辑/etc/chap-secrets配置文件，添加如下内容： <br /><br /># client server secret IP addresses<br />"test@gd.cn" * "test" *<br /><br />上面第二行代码的四项内容分别对应第一行中的四项。<a href="mailto:%E2%80%9Ctest@gd.cn">“test@gd.cn</a>” 是Client端的VPN用户名；“server”对应的是VPN服务器的名字，该名字必须和/etc/ppp/options.pptpd文件中指明的 一样，或者设置成“*”号来表示自动识别服务器；“secret”对应的是登录密码；“IP addresses”对应的是可以拨入的客户端IP地址，如果不需要做特别限制，可以将其设置为“*”号。<br /><br />5.设置IP伪装转发<br /><br />只有设置了IP伪装转发，通过VPN连接上来的远程计算机才能互相ping通，实现像局域网那样的共享。用下面的命令进行设置：<br /><br />#echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br /><br />可以将这条命令放到文件/etc/rc.d/rc.local里面，以实现每次开机时自动运行该命令。<br /><br />6.打开防火墙端口<br /><br />将Linux服务器的1723端口和47端口打开，并打开GRE协议。<br /><br />#/sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT<br />#/sbin/iptables -A INPUT -p tcp --dport 47 -j ACCEPT<br />#/sbin/iptables -A INPUT -p gre -j ACCEPT<br /><br />启动服务. 
<p>　　/etc/rc.d/init.d/pptpd start<br /><br />在RHEL系列配置服务:<br />   cp /usr/sbin/pptpd /etc/rc.d/init.d/   <br />   可以用chkconfig  --add pptpd 来添加/sbin/service pptpd 下面服务<br />   笨方法/etc/rc.d/rc.l/sbin/service pptpd start<br /><br />       cat rc.local<br />#!/bin/sh<br />/sbin/service pptpd start<br />echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br /><br /><br /><br />到这里Linux服务器的设置就完成了，下面将利用Windows客户端进行测试。 <br /><strong>测试</strong><br /><br />下面以Windows Server 2003为例来进行测试。 <br /><br />1.新建连接 <br /><br />单击“开始→设置→网络和拨号连接”打开“网络和拨号连接”的窗口，再单击“新建连接”打开“网络连接向导”的窗口，然后依次选择或填写“连接到我的工 作场所网络→虚拟专用网络连接→公司名（可以随便填写）→不拨初始连接→IP地址（填入VPN服务器的IP地址）”，最后单击“确定”，就建立了一个新的 连接。 <br /><br />2. 修改连接属性 <br /><br />右击刚才创建的连接，再依次单击“属性→网络（选择TCP/IP协议）→属性→高级”，然后把“在远程网络上使用默认网关”前面的勾去掉后单击“确定”。 <br /><br />3.建立连接 <br /><br />双击刚才建立好的连接，填入提前设置好的用户名和密码，单击“确定”进行连接。如果连接成功，在连接的“详细信息”里应该可以看到服务器所分配的IP地址等信息。这时，就可以跟连接进入的局域网里的其它计算机进行通信了。 <br /><br />如果客户端使用的仍然是Windows 95或Windows 98，则需要到<a href="http://support.microsoft.com/support/kb/articles/q285/1/89.asp">http://support.microsoft.com/support/kb/articles/q285/1/89.asp</a>下载相关的拨号程序。</p><img src ="http://www.blogjava.net/hellboys/aggbug/44103.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-04-30 00:21 <a href="http://www.blogjava.net/hellboys/archive/2006/04/30/44103.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How Windows Peer-to-Peer Networking Works</title><link>http://www.blogjava.net/hellboys/archive/2006/04/02/38675.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Sat, 01 Apr 2006 17:07:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/04/02/38675.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/38675.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/04/02/38675.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/38675.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/38675.html</trackback:ping><description><![CDATA[
		<h2>How Windows Peer-to-Peer Networking Works</h2>
		<p>In this section, we briefly describe the Windows Peer-to-Peer Networking architecture and then describe the details of the fundamental peer-to-peer capabilities of peer discovery and name resolution, graphing, grouping, replicated storage, and searching.</p>
		<h3>Windows Peer-to-Peer Networking Architecture</h3>
		<p>The architecture of Windows Peer-to-Peer Networking is shown in Figure 1.</p>
		<div style="WIDTH: 335px">
				<img height="231" alt="Figure 1: Windows Peer-to-Peer Networking architecture" src="http://www.ppcn.net/upload/2004_07/040731153963402.gif" width="335" border="0" />
				<br />
				<p class="figureCaption">
						<b>Figure 1: Windows Peer-to-Peer Networking architecture</b>
						<br />
						<a href="http://www.microsoft.com/technet/images/prodtechnol/winxppro/deploy/images/p2pint01_BIG.gif" target="_blank">See full-sized image.</a>
				</p>
				<div class="figureRule">
				</div>
		</div>
		<p>Windows Peer-to-Peer Networking architecture consists of the following components:</p>
		<table cellspacing="0" cellpadding="0" border="0">
				<tbody>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>
												<b>Graphing</b> The Graphing component is responsible for maintaining a set of connected nodes known as a graph and providing flooding and replication of data across the graph. The Graphing component uses the Flood &amp; Synchronization, Store, and Graph Maintenance subcomponents.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>
												<b>Grouping</b> The Grouping component is the security layer provided by default on top of a graph. The security layer defines the security model behind group creation, invitation, and connection to the group. In addition, Grouping leverages PNRP as the name resolution protocol - and enables multiple applications to share the same graph. The Grouping component uses the Group Security and Group Security Service Provider (SSP) subcomponents.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>
												<b>NSP</b> The Name Service Provider (NSP) component provides a mechanism to access an arbitrary name service provider. In the case of Windows Peer-to-Peer Networking, peer-to-peer applications use the NSP interface to access PNRP.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>
												<b>PNRP</b> The PNRP component provides peer-to-peer name resolution.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>
												<b>Identity Manager</b> Identity manager enables the creation and management of peer-to-peer identities.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>
												<b>Microsoft TCP/IP version 6 protocol</b> The Microsoft TCP/IP version 6 protocol (IPv6) provides the transport over which Windows Peer-to-Peer Networking operates.</p>
								</td>
						</tr>
				</tbody>
		</table>
		<p>The details of how Windows Peer-to-Peer Networking works are described in the following sections:</p>
		<table cellspacing="0" cellpadding="0" border="0">
				<tbody>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>IPv6 and NAT traversal</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Name resolution and peer discovery with PNRP</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Graphing</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Grouping</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Replicated store</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Searching</p>
								</td>
						</tr>
				</tbody>
		</table>
		<h3>IPv6 and NAT Traversal</h3>
		<p>Windows Peer-to-Peer Networking uses IPv6 as its Internet layer. IPv6 was chosen because it restores the end-to-end computing model to networking. With IPv6, there are no issues with address shortage that require the use of Network Address Translators (NATs). For more information about how NATs translate addresses and port numbers and use port mappings, see <a href="http://www.microsoft.com/technet/community/columns/cableguy/cg0301.mspx">Windows 2000 Network Address Translator (NAT)</a>. NATs for IPv4 extend the lifetime of the IPv4 public address space, but at the expense of breaking end-to-end communication.</p>
		<p>IPv6 support was included in Windows XP and Windows XP with SP1 as a developer preview edition. A production-quality release of an IPv6 protocol is available in Windows XP with SP1, Windows XP with SP2, and the Windows Server™ 2003 family. A common misconception about IPv6 is that the existing IPv4 infrastructure (your intranet and the Internet) must be upgraded to support IPv6 before it can be used. This is not true. The designers of IPv6 realized that IPv4 infrastructures will be in place for the foreseeable future and created a series of transition technologies that allow IPv6 traffic to be sent over an IPv4 network by encapsulating an IPv6 packet with an IPv4 header.</p>
		<p>The two transition technologies that are recommended for use and enabled by default for the IPv6 protocol for Windows XP and the Windows Server 2003 family are the following:</p>
		<table cellspacing="0" cellpadding="0" border="0">
				<tbody>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)</p>
										<p>ISATAP is an address assignment and automatic tunneling technology that is used to provide unicast IPv6 connectivity between IPv6 hosts across an IPv4 intranet. ISATAP is described in the Internet draft titled "<a href="http://www.ietf.org/html.charters/ngtrans-charter.html">Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)</a>".</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>6to4</p>
										<p>6to4 is an address assignment and automatic tunneling technology that is used to provide unicast IPv6 connectivity between IPv6 sites and hosts across the IPv4 Internet. 6to4 is described in RFC 3056.</p>
								</td>
						</tr>
				</tbody>
		</table>
		<p>For more information about ISATAP and 6to4, see the <a href="http://www.microsoft.com/windowsserver2003/techinfo/overview/ipv6coexist.mspx">IPv6 Transition Technologies</a> white paper.</p>
		<p>For IPv6 connectivity across the IPv4 Internet, 6to4 is the preferred address assignment and tunneling technology. However, 6to4 depends on the assignment of a public IP address to a computer connected to a private network that acts as a 6to4 router. The IPv6 protocol for Windows XP and the Windows Server 2003 family can be used as a 6to4 router either automatically by enabling Internet Connection Sharing (ICS) or through manual configuration. Many Network Address Translators (NATs) that are used to connect small office or home office networks to the Internet do not yet have 6to4 router capability. Additionally, there might be more than one NAT between a host on a private network and the IPv4 Internet, in which case 6to4 would not work even if the NAT connected to the private network had 6to4 functionality. Another issue with NATs is their default inability to forward traffic that does not use either TCP or UDP. IPv6 over IPv4 traffic uses protocol 41. If this type of traffic is not recognized by the NAT, it is discarded.</p>
		<p>To address the need for an IPv6 over IPv4 address assignment and tunneling solution that works for hosts that are located across NATs that cannot also be 6to4 routers, Microsoft is working with the Internet standards bodies to define Teredo, also known as IPv6 NAT Traversal (NAT-T). Teredo is defined in an Internet draft titled "<a href="http://www.ietf.org/html.charters/ngtrans-charter.html">Teredo: Tunneling IPv6 over UDP through NATs</a>".</p>
		<p>Teredo works by assigning global IPv6 addresses that are based on the public IPv4 address of the NAT interface that is connected to the Internet and then encapsulating IPv6 packets with both an IPv4 header and a UDP header. By using both an IPv4 and a UDP header, most NATs can translate Teredo traffic.</p>
		<p>Teredo client support is included with Windows XP SP2. For computers running Windows XP with SP1, you must install the Advanced Networking Pack for Windows XP.</p>
		<p>For additional information about how Teredo works, see the "<a href="http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/teredo.mspx">Teredo Overview</a>" white paper.</p>
		<h3>Name Resolution and Peer Discovery with PNRP</h3>
		<p>In order for communication to occur between peers, they must be able to discover each other's presence and resolve each other's network locations (addresses, protocols, and ports) from names or other types of identifiers. How peers discover each other and resolve each other's names for communication is complicated by transient connectivity and the lack of address records in DNS.</p>
		<p>Windows Peer-to-Peer Networking solves this problem with a name resolution and peer discovery scheme with the following attributes:</p>
		<table cellspacing="0" cellpadding="0" border="0">
				<tbody>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Distributed and serverless for name resolution</p>
										<p>Like DNS, the complete list of names is stored on computers throughout the cloud. Unlike DNS, there are no servers that provide name resolution. Each peer stores a portion of the list in its cache and can refer to other peers. Central servers are not used to resolve names. Windows Peer-to-Peer Networking is not strictly serverless, as there is a seed node that facilitates initialization.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>The use of identifiers (IDs) instead of names</p>
										<p>Rather than using a name, such as a fully qualified domain name in DNS, IDs are used to identify peer entities. IDs are just numbers and therefore are not subject to language and trademark or copyright issues.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>The use of multiple IDs</p>
										<p>Each separate peer computer, user, group, device, service or other type of peer node can have its own peer ID.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>Ability to scale to large numbers of IDs</p>
										<p>The list of IDs is distributed among the peers using a multi-level cache and referral system that allows name resolution to scale to billions of IDs, while requiring minimal resources on each node.</p>
								</td>
						</tr>
				</tbody>
		</table>
		<p>The protocol used to send messages between peers for name resolution and peer discovery is Peer Name Resolution Protocol (PNRP).</p>
		<p>PNRP uses multiple clouds, in which a cloud is a grouping of computers that use addresses of a specific scope. A scope is an area of the network over which the address is unique. PNRP clouds are based on the address scopes for IPv6 addresses. The following clouds are defined:</p>
		<table cellspacing="0" cellpadding="0" border="0">
				<tbody>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>The global cloud corresponds to the global IPv6 address scope and represents all the computers on the entire IPv6 Internet. There is only a single global could.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>The site-specific cloud corresponds to the site IPv6 address scope and site-local addresses. A site is a portion of an organization network that has defined geographical or topological boundaries. There can be multiple site-specific clouds.</p>
								</td>
						</tr>
						<tr>
								<td class="listBullet" valign="top">•</td>
								<td class="listItem">
										<p>The link-local cloud corresponds to the link-local IPv6 address scope and link-local addresses. A link-local cloud is for a specific link, typically the same as the locally attached subnet. There can be multiple link-local clouds.</p>
								</td>
						</tr>
				</tbody>
		</table>
<img src ="http://www.blogjava.net/hellboys/aggbug/38675.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-04-02 01:07 <a href="http://www.blogjava.net/hellboys/archive/2006/04/02/38675.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>NAT和P2P网络</title><link>http://www.blogjava.net/hellboys/archive/2006/04/02/38672.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Sat, 01 Apr 2006 17:00:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/04/02/38672.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/38672.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/04/02/38672.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/38672.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/38672.html</trackback:ping><description><![CDATA[
		<p>互联网是基于32位IP地址的，这意味着互联网理论上最大电脑数目约为四万亿。由于IP地址使用方式的无效性，实际的数量会少得多。实际上，互联网过不了多久就会将IP地址用完。</p>
		<p>因为可用的IP地址越来越少，一种被称为网络地址解析或箭称NAT的技术被开发出来，它允许以一个IP地址来代表整个网络的电脑。</p>
		<p>一个NAT处在公用互联网与它所服务的网络之间，重写数据中IP头部的IP地址和端口号以使所有的包看上去都象从一个NAT设备的公用IP地址发来（或到它去）的，而不是发自（往）实际的源或者目标。</p>
		<p>NAT如今已经在小型家庭－办公室路由被普遍租用,也在很多软件中被用户使用以连接几台PC到一个唯一的电缆MODEM。它甚至被一些ISP使用。</p>
		<p>（NAT不是唯一可能的解决办法，代理服务器也被普遍使用，但需要更多的配置，有时还需要要定制的客户端软件。而最终，我们都将转换到IPｖ6，它将使用128位地址，可以解决已有的及所有的问题，但那将在很久后才会普及。</p>
		<p>
				<strong>某些协议是非NAT友好的</strong>
		</p>
		<p>
				<br />一些应用程序将IP和端口号隐藏在它们的数据包中发送，NAT不能正确重写它们，所以当你想在NAT网络内使用那些程序的话，它们将不会正确运行。</p>
		<p>一些NAT，由于安全原因，只允许从已经发送过数据去的外部地址接收数据。这意味着处于不同NAT后的两个人不能以通常的方式建立连接。</p>
		<p>
				<strong>解决办法</strong>
		</p>
		<p>
				<br />希望NAT友好的Peer-to-peer（点对点）协议必须明确：其所嵌入数据包的任何地址在通过NAT时都可能变梦扌В虼诵枰咕取Ｒ桓隹尚械姆椒ㄈ缦拢?/p&gt; </p>
		<p>两点之间所有的数据流都通过一个单一的UDP端口。存在着一个不处于任何NAT之后的地址服务器，用户首先与地址服务器连接，并发送他们认为拥有的IP地址；服务器标记该地址和它在UDP头部所看到的地址。然后服务器将两个地址都送往其它点。这样，所有人都知道其它人的地址。</p>
		<p>为打开点对点的连接，所有的旧（结）点发送一个UDP包到新的（结）点，且新（结）点发送一个UDP包到每一个老（结）点。因为无人知道开始它们是否处于同一个NAT之后，第一个包往往被同时送往公有和私有地址。</p>
		<p>这导致每个人的NAT为UDP数据流的通过打开一个双向的洞。一旦第一个响应从每个（结）点返回，发送者就知道使用哪个返回地址，并能停止向两个地址发送数据。</p>
		<p>
				<strong>兼容性需求</strong>
		</p>
		<p>
				<br />基于和超越基本的NAT　RFC，一个想支持这个技术的NAT设备必须有以下要求的属性：</p>
		<p>＞＞NAT不允许改变被数据流使用的UDP端口号。<br />如果一个处于NAT之后的主机从一个单一的UDP口发送了一系列的包，被NAT接棒后的包也必须表现为来自同一主机和UDP口。</p>
		<p>
				<strong>RFC蓝图</strong>
		</p>
		<p>
				<strong>
						<br />
				</strong>我正在拟订这项技术RFC蓝图更为详细的细节。如果你感兴趣，请与我联系。</p>
		<p>
				<strong>兼容性测试结果</strong>
		</p>
		<p>
				<strong>
						<br />
				</strong>我正在测试实现几个NAT通讯的兼容性。这里是部分结果：</p>
		<p>
				<strong>已知的NAT实现的兼容性</strong>
		</p>
		<p>
				<strong>
						<br />
				</strong>＞＞NAT1000：完全兼容。感谢Nevod技术人员早期所帮助做的兼容性测试。无任何东西需要改变；这项技术与他们的NAT一起运行很稳定。Nevod已经不再存在了，它已被微软兼并。<br />＞＞Win98 SE包含的网络联接共享软件，起源贜AT1000，所以一定运行良好。<br />＞＞SYGATE：完全兼容。<br />＞＞NAT32：1999年1月5号公布的BETA测试版完全兼容。现在公布的版本也应该完全兼容。<br />＞＞LINUX　IP　Masquerading（LINUX　IP伪装）：2.2.1版本内核和后续版本可以正常运行。请到h<a href="http://juanjox.linuxhq.com/"><font color="#000080">ttp://juanjox.linuxhq.com/</font></a>?寻找早期2.1版本的补丁。2.0版本的补丁见Glenn Lamb的页面：<a href="http://home.indyramp.com/lists/masq/msg03024.html"><font color="#000080">http://home.indyramp.com/lists/masq/msg03024.html</font></a>：<br /><a href="ftp://ftp.netcom.com/pub/mu/mumford/loose-udp-2.0.36.patch.gz"><font color="#000080">ftp://ftp.netcom.com/pub/mu/mumford/loose-udp-2.0.36.patch.gz</font></a>；<br />Glenn的端口使之拥有一个配置时选项CONFIG_IP_MASQ_LOOSE_UDP，这是一个很好的举措。<br />＞＞WinNAT：当前版本工作正常。</p>
		<p>
				<strong>NAT实现即将可兼容的</strong>
		</p>
		<p>
				<br />＞＞Arescom Apex 1100 ISDN路由：Arescom在1999年1月针对此问题发布了一个固件补丁；也许现在已经并入其标准固件里了,但我还没有证实。<br />＞＞Vicomsoft Softrouter Plus：Vicom曾公布过一个版本以解决这个问题，但我还没有机会来测试一下。注意：为使这个实现正常运行，你必须把网关设备上除指向内部以太适配器外的所有本地TCP绑定禁止。在使用Vicom的安装助手之前请阅读其文档。</p>
		<p>
				<strong>未知是否兼容的</strong>
		</p>
		<p>
				<strong>
						<br />
				</strong>＞＞Cisco IOS有一内置的NAT兼容特性，也许有用也许不然。<br />＞＞我们已经测试了我们手上所有能得到的WIN32软件。但还没有测试嵌入到许多小型家庭办公路由中的NAT，也没有测试外置的NAT如SonicWall等。</p>
		<p>
				<strong>不兼容的</strong>
		</p>
		<p>
				<strong>
						<br />
				</strong>＞＞所有的纯代理服务器解决办法，如WINGATE2或者PPPShar，都不能正常运行。</p>
		<p>
				<strong>使用这项技术的软件</strong>
		</p>
		<p>
				<br />以下软件包是已知的支持在NAT后操作的：<br />＞＞Civilization: Call To Power <br />＞＞Heavy Gear 2 </p>
		<p>
				<strong>讨论区</strong>
		</p>
		<p>
				<br />我想听到其它开发者对于这项技术的想法，以及Masq如何被重写以正确复用UDP端口。加入NAT-peer-games（<a href="http://onelist.com/viewarchive.cgi?listname=nat-peer-games"><font color="#000080">http://onelist.com/viewarchive.cgi?listname=nat-peer-games</font></a>）邮件列表让我们一起讨论。</p>
		<p>
				<strong>实施问题</strong>
		</p>
		<p>
				<br />在测试SYGATE和近期NAT1000版本时，我遇到一些实施方面的问题。当运行网关的机器是通过MODEM与INTERNET联接的话所有一切均正常。但如果网关机器是通过以太网与INTERNET联接的话，客户端不能访问那个外部以太网上的其它主机。看上去就象那台网关送出来的包完全被外部以太网上的其它主机丢弃了。然而路由器不会丢弃数据，所以与远程主机联接没有问题。想了解更多信息，请到my Usenet post（<a href="http://www.dejanews.com/getdoc.xp?AN=427631763"><font color="#000080">http://www.dejanews.com/getdoc.xp?AN=427631763</font></a>）获取。</p>
		<p>我倾向于相信这是硬件原因，但谁知道呢...</p>
		<p>
				<strong>链接</strong>
		</p>
		<p>＞＞IETF Working Group on NAT：<br /><a href="http://www.ietf.org/html.charters/nat-charter.html"><font color="#000080">http://www.ietf.org/html.charters/nat-charter.html</font></a><br />新的RFC草图和邮件列表。其中一个文档<br /><a href="http://www.ietf.org/internet-drafts/draft-ietf-nat-protocol-issues-01.txt"><font color="#000080">http://www.ietf.org/internet-drafts/draft-ietf-nat-protocol-issues-01.txt</font></a><br />提到这项技术；搜索关键词“Activision”</p>
		<p>＞＞NAT页面：<br /><a href="http://www.uq.edu.au/~gadmacka/the-nat-page/"><font color="#000080">http://www.uq.edu.au/~gadmacka/the-nat-page/</font></a><br />列出了一些可行的NAT实现</p>
		<p>＞＞LINUX　IP伪装：<br /><a href="http://www.indyramp.com/masq/"><font color="#000080">http://www.indyramp.com/masq/</font></a><br />都是关于NAT实现的LINUX之Masq。</p>
		<p>＞＞MASQ邮件列表的可查询索引：<br /><a href="http://www.mail-archive.com/masq@tori.indyramp.com/"><font color="#000080">http://www.mail-archive.com/masq@tori.indyramp.com/</font></a></p>
		<p>＞＞LINUX　IP　NAT论坛：<br /><a href="http://serf.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html"><font color="#000080">http://serf.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html</font></a><br />NAT论文，老式的不支持的LINUX　NAT实现和一个讨论区。多半为了历史兴趣。</p>
		<p>
				<strong>历史</strong>
		</p>
		<p>
				<strong>
						<br />
				</strong>相对于我的知识来讲这是一项新技术。我在1997年开始研究它，并在1998年用它完成了我的第一个作品。这项技术在制作Activision多玩家游戏中被开发。</p>
		<p>1999　<strong>DAN　KEGEL</strong>　版权所有<br /><a href="mailto:dank@alumni.caltech.edu"><font color="#000080">dank@alumni.caltech.edu</font></a><br />最近更新：1999年7月17日<br />KEGEL的主页：<a href="http://www.kegel.com/"><font color="#000080">http://www.kegel.com/</font></a></p>
		<script type="text/javascript"><![CDATA[
var arrBaiduCproConfig=new Array(); 
arrBaiduCproConfig['uid'] =86602;
arrBaiduCproConfig['n'] ='ppcnnetcpr';
arrBaiduCproConfig['tm'] =30;
arrBaiduCproConfig['cm'] =68;
arrBaiduCproConfig['um'] =34;
arrBaiduCproConfig['w'] =468;
arrBaiduCproConfig['h'] =60;
arrBaiduCproConfig['wn'] =2;
arrBaiduCproConfig['hn'] =1;
arrBaiduCproConfig['ta'] ='right';
arrBaiduCproConfig['tl'] ='bottom';
arrBaiduCproConfig['bu'] =0;
arrBaiduCproConfig['bd'] ='#CC0000';
arrBaiduCproConfig['bg'] ='#ffffff';
arrBaiduCproConfig['tt'] ='#0000ff';
arrBaiduCproConfig['ct'] ='#000000';
arrBaiduCproConfig['url'] ='#666666';
arrBaiduCproConfig['bdl'] ='#ffffff';
arrBaiduCproConfig['rad'] =1;
]]&gt;</script>
		<script src="http://cpro.baidu.com/cpro/ui/ui.js" type="text/javascript">
		</script>
		<script type="text/javascript">
				<!-- 
document.write(baiduCproIFrame()); 
-->
		</script>
<img src ="http://www.blogjava.net/hellboys/aggbug/38672.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-04-02 01:00 <a href="http://www.blogjava.net/hellboys/archive/2006/04/02/38672.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>IDS：Intrusion Detection System</title><link>http://www.blogjava.net/hellboys/archive/2006/03/24/37217.html</link><dc:creator>地狱男爵(hellboys)</dc:creator><author>地狱男爵(hellboys)</author><pubDate>Fri, 24 Mar 2006 06:52:00 GMT</pubDate><guid>http://www.blogjava.net/hellboys/archive/2006/03/24/37217.html</guid><wfw:comment>http://www.blogjava.net/hellboys/comments/37217.html</wfw:comment><comments>http://www.blogjava.net/hellboys/archive/2006/03/24/37217.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hellboys/comments/commentRss/37217.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hellboys/services/trackbacks/37217.html</trackback:ping><description><![CDATA[入侵检测系统（IDS）主要检测计算机网络中的非法、错误或者异常行为。运行在主机上，并且负责检测该主机上恶意破坏行为的 ID 系统，被称之为主机型 ID 系统。 
<p>　　主机型 IDS 软件被安装于需要监控的系统上。IDS 软件上的数据源是日志文件和/或系统审计代理。主机型 IDS 不仅着眼于计算机中通信流量的出入，同时也校验用户系统文件的完整性，并检测可疑程序。为了能使基于主机的 IDS 完整地覆盖受控站点，需要在每台计算机上都安装 IDS 系统。</p><p>　　主机型入侵检测软件主要有两种类型：主机 wrapper /个人防火墙和基于代理的软件。与网络型 IDS 相比，主机型 IDS 中每种检测内部攻击（即所谓的异常行为）的方法都更为高效，但相对而言，两者在检测外部攻击方面都非常有效。主机 wrapper 或者个人防火墙都可以配置来着眼于受控机器的所有网络数据包，连接尝试或登录尝试等。另外还包含拨号尝试或者其它非网络相关通信端口等功能。</p><p>　　网络型 IDS 的数据源是网络上的数据包，IDS 监控各网段的数据包流量作为。网络接口卡被设置为混合模式，以获取跨越各网段的所有网络流量。但网络型 IDS 不能监控其它各段上的网络流量。</p><p>　　网络型 IDS 着眼于经过传感器的网络数据包。传感器只能看到与其相连的网络段上装载的数据包。如果为这些数据包都匹配一个标志，那么主要有以下三种标志类型：</p><ul><li>串标志（String Signature）：着眼于文本串，表示可能性功能。为降低串信号错误数量，使用复合串信号是非常必要的。 
</li><li>端口标志（Port Signature）：着眼于众所周知的、高频率的攻击端口的连接尝试。例如 telnet（TCP 端口23）、FTP（TCP 端口21/20）、SUNRPC（TCP/UDP 端口111）和 IMAP （TCP 端口143）等端口。 
</li><li>头标志（Header Signature）：着眼于危险的或不合理的数据包头结合。其中最著名的例子是 Winnuke，数据包被指定 NetBIOS 端口和紧急指针，或者设置带外指针。对微软系统来说这将导致“蓝频死机”现象。 </li></ul><p>　　网络型和主机型 IDS 都具有正反两面。所以通常情况下，网络中结合两种技术提供完整保护功能。总之，有关何处使用到这三种类型，以及如何整合数据都是一个切实且日益关注的主题。 <br /><img src="http://www.networkdictionary.com/chinese/images/ids.jpg" /></p><img src ="http://www.blogjava.net/hellboys/aggbug/37217.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hellboys/" target="_blank">地狱男爵(hellboys)</a> 2006-03-24 14:52 <a href="http://www.blogjava.net/hellboys/archive/2006/03/24/37217.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>