??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码一区二区三区国产,自拍偷自拍亚洲精品偷一,亚洲人成人网毛片在线播放http://m.tkk7.com/hellboys/category/10570.htmlzh-cnWed, 05 Dec 2007 17:22:48 GMTWed, 05 Dec 2007 17:22:48 GMT60Android中文文档v0.1 beta低调发布,期待更多同学来参加reviewhttp://m.tkk7.com/hellboys/archive/2007/12/05/165574.html地狱L(hellboys)地狱L(hellboys)Wed, 05 Dec 2007 08:42:00 GMThttp://m.tkk7.com/hellboys/archive/2007/12/05/165574.htmlhttp://m.tkk7.com/hellboys/comments/165574.htmlhttp://m.tkk7.com/hellboys/archive/2007/12/05/165574.html#Feedback0http://m.tkk7.com/hellboys/comments/commentRss/165574.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/165574.htmlW一阶段:Android中文文档v0.1 beta发布--由www.androidcn.netC֌提供     

Android中文文档阅读地址:  http://www.androidcn.net/wiki/index.php/Documentation

Android中文文档大部分已l完? 但是可能有不细节和不之处需要完善和修补.

感谢译的同?已经在文档里面加? 如果~少,误pL



W二阶段:h旉的同学进行review.

review阶段既然采用wiki上面形式. 希望review的同学可以联pAndroidCN理员和各版版主.

怿review阶段对同学理解Android可以有更快的理解和提? 阅读文档也是对Android理解之初?

所有在阅读文档的时?希望同学们不吝啬自己的一W之?对于未完全或译有误的地方进行涂?

怿大家可以先阅L?然后提出译中的不q行.

review 讨论区: http://www.androidcn.net/thread-119-1-1.html


]]>
Ƣ迎讉KAndroid中国http://m.tkk7.com/hellboys/archive/2007/11/15/160794.html地狱L(hellboys)地狱L(hellboys)Thu, 15 Nov 2007 09:24:00 GMThttp://m.tkk7.com/hellboys/archive/2007/11/15/160794.htmlhttp://m.tkk7.com/hellboys/comments/160794.htmlhttp://m.tkk7.com/hellboys/archive/2007/11/15/160794.html#Feedback1http://m.tkk7.com/hellboys/comments/commentRss/160794.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/160794.html
主页Qhttp://www.androidcn.net  阅读全文

]]>
一C多台电脑监控 (keyword:cacti,snmp,snmpd.conf)http://m.tkk7.com/hellboys/archive/2007/03/07/102331.html地狱L(hellboys)地狱L(hellboys)Wed, 07 Mar 2007 02:27:00 GMThttp://m.tkk7.com/hellboys/archive/2007/03/07/102331.htmlhttp://m.tkk7.com/hellboys/comments/102331.htmlhttp://m.tkk7.com/hellboys/archive/2007/03/07/102331.html#Feedback0http://m.tkk7.com/hellboys/comments/commentRss/102331.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/102331.html


NAME
       share/snmp/snmpd.conf  -  configuration  file for the ucd-
       snmp SNMP agent.

DESCRIPTION
       snmpd.conf is the configuration file which defines how the
       ucd-smnp SNMP agent operates.  These files may contain any
       of the directives found in the DIRECTIVES  section  below.
       This  file  is  not  required for the agent to operate and
       report mib entries.

PLEASE READ FIRST
       First, make sure you have read the  snmp_config(5)  manual
       page  that  describes how the ucd-snmp configuration files
       operate, where they are located  and  how  they  all  work
       together.

EXTENSIBLE-MIB
       The  ucd-snmp  SNMP  agent reports much of its information
       through queries to the 1.3.6.1.4.1.2021 section of the mib
       tree.   Every  mib in this section has the following table
       entries in it.

       .1 -- index
              This is the table's index numbers for each  of  the
              DIRECTIVES listed below.

       .2 -- name
              The  name of the given table entry.  This should be
              unique, but is not required to be.

       .100 -- errorFlag
              This is a flag returning either the integer value 1
              or  0 if an error is detected for this table entry.

       .101 -- errorMsg
              This is a DISPLAY-STRING describing any error trig-
              gering the errorFlag above.

       .102 -- errorFix
              If  this entry is SNMPset to the integer value of 1
              AND the errorFlag defined above is indeed  a  1,  a
              program  or script will get executed with the table
              entry name from above as the argument.  The program
              to  be  executed is configured in the config.h file
              at compile time.

   Directives
       proc NAME

       proc NAME MAX

       proc NAME MAX MIN

              Checks to see if the NAME'd processes  are  running
              on  the  agent's  machine.  An error flag (1) and a
              description  message  are  then   passed   to   the
              1.3.6.1.4.1.2021.2.100  and  1.3.6.1.4.1.2021.2.101
              mib tables (respectively) if the NAME'd program  is
              not  found  in  the  process  table  as reported by
              "/bin/ps -e".

              If MAX and MIN are not specified, MAX is assumed to
              be infinity and MIN is assumed to be 1.

              If  MAX  is specified but MIN is not specified, MIN
              is assumed to be 0.

       procfix NAME PROG ARGS
              This registers a command  that  knows  how  to  fix
              errors   with   the   given   process  NAME.   When
              1.3.6.1.4.1.2021.2.102 for a given NAMEd program is
              set to the integer value of 1, this command will be
              called.  It defaults to a compiled value set  using
              the PROCFIXCMD definition in the config.h file.

       exec NAME PROG ARGS

       exec MIBNUM NAME PROG ARGS

              If  MIBNUM is not specified, the agent executes the
              named PROG with arguments of ARGS and  returns  the
              exit status and the first line of the STDOUT output
              of   the   PROG   program   to   queries   of   the
              1.3.6.1.4.1.2021.8.100  and  1.3.6.1.4.1.2021.8.101
              mib  tables  (respectively).   All  STDOUT   output
              beyond the first line is silently truncated.

              If  MIBNUM  is  specified,  it  acts  as  above but
              returns the exit status  to  MIBNUM.100.0  and  the
              entire  STDOUT  output to the table MIBNUM.101 in a
              mib table.  In this case, the MIBNUM.101  mib  con-
              tains the entire STDOUT output, one mib table entry
              per line of output (ie, the first line is output as
              MIBNUM.101.1,  the second at MIBNUM.101.2, etc...).

              Note:  The MIBNUM must be specified in dotted-inte-
                     ger  notation  and  can  not be specified as
                     ".iso.org.dod.internet..."  (should  instead
                     be

              Note:  The  agent caches the exit status and STDOUT
                     of the executed program for 30 seconds after
                     the  initial  query.   This  is  to increase
                     speed and maintain consistency  of  informa-
                     tion  for  consecutive  table  queries.  The
                     cache can be flushed by a  snmp-set  request
                     of  integer(1)  to 1.3.6.1.4.1.2021.100.VER-
                     CLEARCACHE.

       execfix NAME PROG ARGS
              This registers a command  that  knows  how  to  fix
              errors  with  the  given  exec  or  sh  NAME.  When
              1.3.6.1.4.1.2021.8.102 for a given NAMEd  entry  is
              set to the integer value of 1, this command will be
              called.  It defaults to a compiled value set  using
              the EXECFIXCMD definition in the config.h file.

       disk PATH

       disk PATH [ MINSPACE | MINPERCENT% ]

              Checks  the  named disks mounted at PATH for avail-
              able disk space.  If the disk space  is  less  than
              MINSPACE  (kB) if specified or less than MINPERCENT
              (%) if a  %  sign  is  specified,  or  DEFDISKMINI-
              MUMSPACE  (kB)  if  not  specified,  the associated
              entry in the 1.3.6.1.4.1.2021.9.100 mib table  will
              be  set to (1) and a descriptive error message will
              be returned to queries of 1.3.6.1.4.1.2021.9.101.

       load MAX1

       load MAX1 MAX5

       load MAX1 MAX5 MAX15

              Checks the load average of the machine and  returns
              an error flag (1), and an text-string error message
              to   queries   of    1.3.6.1.4.1.2021.10.100    and
              1.3.6.1.4.1.2021.10.101   (respectively)  when  the
              1-minute, 5-minute, or  15-minute  averages  exceed
              the associated maximum values.  If any of the MAX1,
              MAX5, or MAX15 values are unspecified, they default
              to a value of DEFMAXLOADAVE.

       file FILE [MAXSIZE]
              Monitors  file sizes and makes sure they don't grow
              beyond a certain size.  MAXSIZE defaults  to  infi-
              nite  if  not specified, and only monitors the size
              without reporting errors about it.

   Errors
       Any errors in obtaining the above information are reported
       via    the    1.3.6.1.4.1.2021.101.100    flag   and   the
       1.3.6.1.4.1.2021.101.101 text-string description.

SMUX SUB-AGENTS
       To enable and SMUX based sub-agent, such as gated, use the
       smuxpeer configuration entry

       smuxpeer OID PASS
              For gated a sensible entry might be

       .1.3.6.1.4.1.4.1.3 secret

ACCESS CONTROL
       snmpd  supports the View-Based Access Control Model (vacm)
       as defined in RFC 2275.  To this end,  it  recognizes  the
       following  keywords  in  the  configuration file: com2sec,
       group, access, and view  as  well  as  some  easier-to-use
       wrapper   directives:  rocommunity,  rwcommunity,  rouser,
       rwuser.

       rocommunity COMMUNITY [SOURCE] [OID]

       rwcommunity COMMUNITY [SOURCE] [OID]
              These create read-only and  read-write  communities
              that  can  be used to access the agent.  They are a
              quick method of using the following com2sec, group,
              access,  and view directive lines.  They are not as
              efficient either, as groups aren't created  so  the
              tables  are possibly larger.  In other words: don't
              use these if you have complex situations to set up.

              The  format  of the SOURCE is token is described in
              the com2sec directive section below.  The OID token
              restricts  access  for that community to everything
              below that given OID.

       rouser USER [noauth|auth|priv] [OID]

       rwuser USER [noauth|auth|priv] [OID]
              Creates a  SNMPv3  USM  user  in  the  VACM  access
              configuration  tables.   Again,  its more efficient
              (and powerful) to use the combined com2sec,  group,
              access, and view directives instead.

              The minimum level of authentication and privacy the
              user must use  is  specified  by  the  first  token
              (which  defaults  to  "auth").   The  OID parameter
              restricts access for that user to everything  below
              the given OID.

       com2sec NAME SOURCE COMMUNITY
              This   directive   specifies  the  mapping  from  a
              source/community pair to a  security  name.  SOURCE
              can be a hostname, a subnet, or the word "default".
              A subnet can be specified as  IP/MASK  or  IP/BITS.
              The first source/community combination that matches
              the incoming packet is selected.

       group NAME MODEL SECURITY
              This directive defines the mapping  from  security-
              model/securityname  to  group.  MODEL is one of v1,
              v2c, or usm.

       access NAME CONTEXT MODEL LEVEL PREFX READ WRITE NOTIFY
              The  access  directive  maps  from   group/security
              model/security  level  to  a view.  MODEL is one of
              any, v1, v2c, or usm.   LEVEL  is  one  of  noauth,
              auth,  or priv.  PREFX specifies how CONTEXT should
              be matched against the context of the incoming pdu,
              either  exact  or  prefix.   READ, WRITE and NOTIFY
              specifies the view to be used for the corresponding
              access.   For  v1  or  v2c  access,  LEVEL  will be
              noauth, and CONTEXT will be empty.

       view NAME TYPE SUBTREE [MASK]
              The defines the named view. TYPE is either included
              or  excluded.   MASK is a list of hex octets, sepa-
              rated by '.' or ':'.  The MASK defaults to "ff"  if
              not specified.

              The  reason  for the mask is, that it allows you to
              control access to one row in a table,  in  a  rela-
              tively  simple  way.  As  an example, as an ISP you
              might consider giving each customer access  to  his
              or her own interface:

              view cust1 included interfaces.ifTable.ifEntry.ifIndex.1 ff.a0
              view cust2 included interfaces.ifTable.ifEntry.ifIndex.2 ff.a0

              (interfaces.ifTable.ifEntry.ifIndex.1 == .1.3.6.1.2.1.2.2.1.1.1,
              ff.a0 == 11111111.10100000. which nicely covers up and including
              the row index, but lets the user vary the field of the row)

       VACM Examples:
              #       sec.name  source          community
              com2sec local     localhost       private
              com2sec mynet     10.10.10.0/24   public
              com2sec public    default         public

              #             sec.model  sec.name
              group mygroup v1         mynet
              group mygroup v2c        mynet
              group mygroup usm        mynet
              group local   v1         local
              group local   v2c        local
              group local   usm        local
              group public  v1         public
              group public  v2c        public
              group public  usm        public

              #           incl/excl subtree                          mask
              view all    included  .1                               80
              view system included  system                           fe
              view mib2   included  .iso.org.dod.internet.mgmt.mib-2 fc

              #              context sec.model sec.level prefix read   write notify
              access mygroup ""      any       noauth    exact  mib2   none  none
              access public  ""      any       noauth    exact  system none  none
              access local   ""      any       noauth    exact  all    all   all

       Default VACM model
              The default configuration of the agent, as shipped, is functionally
              equivalent to the following entries:
              com2sec   public    default   public
              group     public    v1   public
              group     public    v2c  public
              group     public    usm  public
              view      all  included  .1
              access    public    ""   any  noauth    exact     all  none none

SNMPv3 CONFIGURATION
       engineID STRING
              The  snmpd  agent  needs  to  be configured with an
              engineID to be able to respond to SNMPv3  messages.
              With  this  configuration  file  line, the engineID
              will be configured from STRING.  The default  value
              of  the  engineID  is  configured with the first IP
              address found for the hostname of the machine.

       createUser username (MD5|SHA) authpassphrase [DES]  [priv-
       passphrase]
              This directive should be placed into the "/var/ucd-
              snmp"/snmpd.conf  file  instead of the other normal
              locations.  The reason is that the  information  is
              read  from  the  file  and then the line is removed
              (eliminating the storage of the master password for
              that  user)  and  replaced  with  the  key  that is
              derived from it.  This key is a localized  key,  so
              that  if  it is stolen it can not be used to access
              other agents.  If the password is stolen,  however,
              it can be.

              MD5  and  SHA  are the authentication types to use,
              but you must have built the  package  with  openssl
              installed  in  order  to use SHA.  The only privacy
              protocol currently supported is DES.  If  the  pri-
              vacy  passphrase is not specified, it is assumed to
              be the same as the authentication passphrase.  Note
              that  the users created will be useless unless they
              are also added to the VACM  access  control  tables
              described above.

              Warning:  the minimum pass phrase length is 8 char-
              acters.

              SNMPv3 users can be created at  runtime  using  the
              snmpusm command.


SETTING SYSTEM INFORMATION
       syslocation STRING

       syscontact STRING

              Sets the system location and the system contact for
              the agent.  This information  is  reported  by  the
              'system' table in the mibII tree.

       authtrapenable NUMBER
              Setting  authtrapenable  to 1 enables generation of
              authentication failure traps. The default value  is
              2 (disable).

       trapcommunity STRING
              This  defines  the  default  community string to be
              used when sending traps.  Note  that  this  command
              must  be  used  prior to any of the following three
              commands  that  are  intended  use  this  community
              string.

       trapsink HOST [COMMUNITY [PORT]]

       trap2sink HOST [COMMUNITY [PORT]]

       informsink HOST [COMMUNITY [PORT]]
              These  commands  define  the hosts to receive traps
              (and/or inform notifications). The daemon  sends  a
              Cold  Start  trap when it starts up. If enabled, it
              also sends traps on authentication failures.   Mul-
              tiple  trapsink, trap2sink and informsink lines may
              be specified to specify multiple destinations.  Use
              trap2sink  to  send  SNMPv2 traps and informsink to
              send inform notifications.   If  COMMUNITY  is  not
              specified,  the  string from a preceding trapcommu-
              nity directive will be used. If PORT is not  speci-
              fied,  the  well known SNMP trap port (162) will be
              used.

PASS-THROUGH CONTROL
       pass MIBOID EXEC
              Passes entire control of MIBOID to  the  EXEC  pro-
              gram.   The  EXEC  program  is called in one of the
              following three ways:

              EXEC -g MIBOID

              EXEC -n MIBOID

                     These call lines match to SNMP get and  get-
                     next requests.  It is expected that the EXEC
                     program will take the arguments passed to it
                     and  return the appropriate response through
                     it's stdout.

                     The first line of stdout should be  the  mib
                     OID of the returning value.  The second line
                     should be the TYPE of value returned,  where
                     TYPE  is  one  of  the text strings: string,
                     integer,  unsigned,   objectid,   timeticks,
                     ipaddress,  counter,  or  gauge.   The third
                     line of stdout should be  the  VALUE  corre-
                     sponding with the returned TYPE.

                     For  instance, if a script was to return the
                     value integer value "42" when a request  for
                     .1.3.6.1.4.100  was  requested,  the  script
                     should return the following 3 lines:
                       .1.3.6.1.4.100
                       integer
                       42

                     To indicate that the  script  is  unable  to
                     comply with the request due to an end-of-mib
                     condition or an invalid request, simple exit
                     and  return  no  output to stdout at all.  A
                     snmp error will be  generated  corresponding
                     to the SNMP NO-SUCH-NAME response.

              EXEC -s MIBOID TYPE VALUE

                     For SNMP set requests, the above call method
                     is used.  The TYPE passed to the  EXEC  pro-
                     gram  is  one  of the text strings: integer,
                     counter, gauge, timeticks, ipaddress, objid,
                     or  string,  indicating  the  type  of value
                     passed in the next argument.

                     Return nothing to stdout, and the  set  will
                     assumed to have been successful.  Otherwise,
                     return one of the following error strings to
                     signal an error: not-writable, or wrong-type
                     and the appropriate error response  will  be
                     generated instead.

                      Note:  By   default,   the  only  community
                             allowed to  write  (ie  snmpset)  to
                             your  script  will  be the "private"
                             community,or community #2 if defined
                             differently by the "community" token
                             discussed above.  Which  communities
                             are  allowed  write  access are con-
                             trolled by the RWRITE definition  in
                             the snmplib/snmp_impl.h source file.

EXAMPLE
       See the EXAMPLE.CONF file in the top level  source  direc-
       tory for a more detailed example of how the above informa-
       tion is used in real examples.

RE-READING snmpd.conf and snmpd.local.conf
       The ucd-snmp agent can be forced to re-read its configura-
       tion files.  It can be told to do so by one of two ways:

       1.     An       snmpset       of       integer(1)       to
              1.3.6.1.4.1.2021.100.VERUPDATECONFIG.

       2.     A "kill -HUP" signal sent to the snmpd  agent  pro-
              cess.

FILES
       share/snmp/snmpd.conf

SEE ALSO
       snmp_config(5), snmpd(1), EXAMPLE.conf, read_config(3).



                           27 Jan 2000              SNMPD.CONF(5)


]]>
妙解|络多台dhcp引v的IP冲突 http://m.tkk7.com/hellboys/archive/2006/11/15/81181.html地狱L(hellboys)地狱L(hellboys)Wed, 15 Nov 2006 02:22:00 GMThttp://m.tkk7.com/hellboys/archive/2006/11/15/81181.htmlhttp://m.tkk7.com/hellboys/comments/81181.htmlhttp://m.tkk7.com/hellboys/archive/2006/11/15/81181.html#Feedback1http://m.tkk7.com/hellboys/comments/commentRss/81181.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/81181.html
  那么我们的问题也出现?常见的,很多用户抱怨用q种Ҏ上不了网Q但不是所有客户都上不了网。经q调查发玎ͼ住宾馆、酒店的人绝大多数是商务人员和工E师Q他们携带的手提电脑一般安装的是Windows server版本Qserver版本默认启动了DHCP server功能Q当一台这L计算入网l,在他之后的计机׃把他当成DHCP服务器,q被分配了不正确的IP地址Q从而上不了|?

  DHCP服务器地址分配方式

  DHCP是一U用于简化主机IP配置理的协议标准。通过采用DHCP标准Q可以用DHCP服务器ؓ|络上所有启用了DHCP的客L分配、配|、跟t和更改(必要?所有TCP/IP讄。此外,DHCPq可以确保不使用重复地址、重新分配未使用的地址Qƈ且可以自动ؓLq接的子|分配适当的IP地址。当一个网l中Q有2个或2个以上的DHCP服务器时Q提醒切勿将DHCP地址池定义的q大Q以免多个地址池之间出现“包含于”的关系Q或者是部分客户端手工指定的IP地址包含于DHCP服务器的地址池中Q从而造成DHCP的一些异常故障?

  针对不同的需求,DHCP服务器有三种机制分配IP地址:

  自动分配 DHCP服务器给首次q接到网l的某些客户端分配固定IP地址Q该地址q户长期?

  动态分?DHCP服务器给客户端分配有旉限制的IP地址Q用期限到期后Q客L需要重新申请地址Q客L也可以主动释放该地址。绝大多数客LL得到的是q种动态分配的地址;

  手动分配 ql管理员为客L指定固定的IP地址?

  三种地址分配方式中,只有动态分配可以重复用客L不再需要的地址?

  每项技术都是有利有弊的QDHCP也不例外Q由于DHCP有着配置单,理方便的优点,问题也随之生,׃DHCP的运作机Ӟ通常服务器和客户端没有认证机Ӟ如果|络上存在多台DHCP服务器将会给|络造成混ؕ。由于用户不心配置了DHCP服务器引L|络混ؕ非常常见Q可见此问题的普遍性?

  本h在从事网l工作的几年里,遇到q很多问题,其中有关DHCP-server冲突的不在少敎ͼ在解决问题的同时也ȝ了一些经验,在这里简单介l一下,与大家分享,希望l在解决此类问题的同行一些帮助,也希望广大高手指出其中的不和需要改q的地方?br />
DHCP服务器冲H的解决Ҏ

  使用DHCP snooping技术来解决

  针对q种DHCP服务器冲H的解决Ҏ有很多,最直接的方法就是脓告示Q让入住的客户在上网时关闭Windows的DHCP|络服务Q这个选项在‘控刉李쀙,‘管理工具’里的‘DHCP|络服务’,q入关闭卛_。这里要注意的是Q非server版的Windows不用关闭Qƈ且不要把‘控刉李쀙,‘管理工具’,‘服务’中的DHCP clientl停止了Q这h分配不到地址的?

  当然上面的方法比较被动也不合常理Q更不便于我们网l的理Q所以还是应该从我们|络本n出发来解决问题?

  既然是DHCP的问题,那么我们qDHCP的技术来解决问题Q比较有代表的就是DHCP snooping技术。DHCP snooping技术是DHCP安全Ҏ,通过建立和维护DHCP snoopingl定表过滤不可信ȝDHCP信息Q这些信息是指来自不信Q区域的DHCP信息。DHCP snoopingl定表包含不信Q区域的用户mac地址、IP地址、租用期、vlan-id接口{信息?

  首先定义交换Z的信ȝ口和不信ȝ口,其中信Q端口q接DHCP服务器或其他交换机的端口;不信ȝ口连接用h|络。不信Q端口接收到的DHCP服务器响应的DHCP ack 和DHCP off报文丢弃;而信ȝ口将此配|中的命令都是以CISCO的设备ؓ基础Q但不管是哪个公司的讑֤QM设计思想是一致的Q不同的可能在命令格式上略有差异Q工作h员应该根据具体的实际情况来解决相应的问题?

  在全局模式下启动DHCP snooping功能Q这个默认是关闭的,而且不是所有设备都支持q个功能Q最好先看用说明?

  switch(config)#ip dhcp-snooping

  如果有vlan׃用下面的命o来监具体的vlan

  switch(config)#ip dhcp-snooping vlan vlan-id

  然后定义可信ȝ端口Q默认情况交换机的端口均Z信Q端口Q通常|络讑֤接口Q?TRUNK 接口和连接DHCP服务器的端口定义为可信Q端口?

  switch(config)#int f0/x

  switch(config-if)#ip dhcp snooping trust

使用PVLAN技术来解决

  有很多二层的技术可以防止DHCP-server冲突的,PVLAN是其中一个运用比较广的技术?

  PVLANU有局域网(private vlan)Q在PVLAN的概念里Q端口有3U类?Isolated portQCommunity port, Promiscuous port;它们分别对应不同的vlancd:Isolated port属于Isolated PVLANQCommunity port属于Community PVLANQ而代表一个Private vlan整体的是Primary vlanQ前面两cvlan需要和它绑定在一P同时它还包括Promiscuous port。在Isolated PVLAN中,Isolated port只能和Promiscuous portQ彼此之间不能访?在Community PVLAN中,vlan与vlan之间都不能访问,同一Community vlan的接口可以互相访问,q且所有Community vlan的接口都可以与Promiscuous portq行通信。利用这Ҏ术,我们可以把上q或q接DHCP服务器的接口定义为Promiscuous portQ其他接口分配到Isolated vlan里,q样所有接口都只能与上q或DHCP服务器进行通信Q即使有一台机器设为DHCP服务器,其他机器也不会与它生流量,把它做ؓ服务器?

  利用q个技术解决DHCP-server冲突的方法有很多Q也很灵z,下面介绍一U比较简单的ҎQ也是用的比较多?

  首先把交换机配置成transparents模式:  

  switch(config)#vtp mode transparent

  Z可以打开端口的保护功能,它的意思是打开端口保护的端口之间不能访问,但打开保护的端口可以与没有开启此功能的端口通信Q可以根据自q需求来打开保护功能:

  switch(config)#int range f0/124

  switch(config-if-range)#switchitchport protected

  建立isolated vlan和primary vlanQ把isolated vlan定义为primary lan的附属vlanQ因与primary互相讉K:

  switch(config)#vlan 14

  switch(config-vlan)private-vlan isolated

  switch(config)#vlan 44

  switch(config-vlan)#private-vlan primary

  switch(config-vlan)#private-vlan association 14


]]>
P2P之UDPIKNAT的原理与实现http://m.tkk7.com/hellboys/archive/2006/09/13/69263.html地狱L(hellboys)地狱L(hellboys)Tue, 12 Sep 2006 16:32:00 GMThttp://m.tkk7.com/hellboys/archive/2006/09/13/69263.htmlhttp://m.tkk7.com/hellboys/comments/69263.htmlhttp://m.tkk7.com/hellboys/archive/2006/09/13/69263.html#Feedback1http://m.tkk7.com/hellboys/comments/commentRss/69263.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/69263.htmlP2P之UDPIKNAT的原理与实现 - 增强?附修改过的源代码)

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

NAT(The IP Network Address Translator) 的概念和意义是什?

NAT, 中文译为网l地址转换。具体的详细信息可以讉KRFC 1631 - http://www.faqs.org/rfcs/rfc1631.html, q是对于NAT的定义和解释的最权威的描q。网l术语都是很抽象和艰涩的Q除非是专业人士Q否则很难从字面中来准确理解NAT的含义?/p>

要想完全明白NAT 的作用,我们必须理解IP地址的两大分c,一cLU有IP地址Q在q里我们UC内网IP地址。一cL非私有的IP地址Q在q里我们UC公网IP地址。关于IP地址的概念和作用的介l参见我的另一文? http://hwycheng.blogchina.com/2402121.html

内网IP地址: 是指使用A/B/CcM的私有地址, 分配的IP地址在全球不惧有唯一性,也因此无法被其它外网L直接讉K?br />公网IP地址: 是指h全球唯一的IP地址Q能够直接被其它L讉K的?/p>

NAT 最初的目的是ؓ使用内网IP地址的计机提供通过数几台h公网的IP地址的计机讉K外部|络的功能。NAT 负责某些内|IP地址的计机向外部网l发出的IP数据包的源IP地址转换为NAT自己的公|的IP地址Q目的IP地址不变, q将IP数据包{发给路由器,最l到辑֤部的计算机。同时负责将外部的计机q回的IP数据包的目的IP地址转换为内|的IP地址Q源IP地址不变Qƈ最 l送达到内|中的计机?br />                                                
        ----------------------                           ----------------------              
        | 192.168.0.5        |  Internat host            | 192.168.0.6        |  Internat host
        ----------------------                           ----------------------              
                ^ port:2809                                      ^port: 1827                           
                |                                                |                           
                V                                                V                           
        ----------------------                           ----------------------              
        | 192.168.0.1        | NAT device                | 192.168.0.2        | NAT device   
        | 61.51.99.86        |                           | 61.51.77.66        |              
        ----------------------                           ----------------------              
                ^                                                ^                           
                |                                                |                           
                V port:80                                        V port: 80                          
        ----------------------                           ----------------------              
        | 61.51.202.88       | Internet host             | 61.51.76.102       | Internet host
        ----------------------                           ----------------------              
                                                           
                              图一: NAT 实现了私有IP的计机分n几个公网IP地址讉KInternet的功能?br />                             
? 着|络的普及,IPv4的局限性暴露出来。公|IP地址成ؓ一U稀~的资源Q此时NAT 的功能局限也暴露出来Q同一个公|的IP地址Q某个时间只能由一台私有IP地址的计机使用。于是NAPT(The IP Network Address/Port Translator)应运而生QNAPT实现了多台私有IP地址的计机可以同时通过一个公|IP地址来访问Internet的功能。这在很大程度上? 时缓解了IPv4地址资源的紧张?/p>

NAPT 负责某些内|IP地址的计机向外部网l发出的TCP/UDP数据包的源IP地址转换为NAPT自己的公|的IP地址Q源端口转ؓNAPT自己的一个端 口。目的IP地址和端口不? q将IP数据包发l\由器Q最l到辑֤部的计算机。同时负责将外部的计机q回的IP数据包的目的IP地址转换内网的IP地址Q目的端口{为内|计机? 端口Q源IP地址和源端口不变Qƈ最l送达到内|中的计机?/p>

                                                
                ----------------------                           ----------------------              
                | 192.168.0.5        |  Internat host            | 192.168.0.6        |  Internat host
                ----------------------                           ----------------------              
                        port: 2809      ^                   ^ port: 1827
                                         \                 /
                                          v               v                            
                                        ----------------------           
                                        | 192.168.0.1        | NAT device
                                        | 61.51.99.86        |           
                                        ----------------------                                 
        map port:9882 to 192.168.0.5:2809 ^              ^ map port: 9881 to 192.168.0.6:1827
                                         /                \
                             port:80    v                  v    port:80                        
                ----------------------                           ----------------------              
                | 61.51.202.88       | Internet host             | 61.51.76.102       | Internet host
                ----------------------                           ----------------------                                
                               
                              图二: NAPT 实现了私有IP的计机分n一个公|IP地址讉KInternet的功能。                                           ?
 
? 我们的工作和生活? NAPT的作用随处可见,l大部分公司的网l架构,都是通过1至N台支持NAPT的\由器来实现公司的所有计机q接外部的Internet|络的。包? 本h在写q篇文章的时候,也是在家中用一台IBMW记本通过一台宽带连接的台式机来讉KInternet的。我们本文章主要讨论的NAPT的问题?/p>

NAPT(The IP Network Address/Port Translator) Zȝ了P2P软g的应?

? qNAPT 上网的特点决定了只能由NAPT内的计算Z动向NAPT外部的主机发赯接,外部的主机想直接和NAPT内的计算机直接徏立连接是不被允许的。IM(? 旉讯)而言Q这意味着׃NAPT内的计算机和NAPT外的计算机只能通过服务器中转数据来q行通讯。对于P2P方式的下载程序而言Q意味着NAPT? 的计机不能接收到NAPT外部的连接,Dq接数用q少Q下载速度很难上去。因此P2P软g必须要解决的一个问题就是要能够在一定的E度上解决NAPT 内的计算Z能被外部q接的问题?/p>

NAT(The IP Network Address Translator) q行UDPIK的原理是什?

TCP/IP 传输时主要用到TCP和UDP协议。TCP协议是可靠的Q面向连接的传输协议。UDP是不可靠的,无连接的协议。根据TCP和UDP协议的实现原理,对于 NAPT来进行穿透,主要是指的UDP协议。TCP协议也有可能Q但是可行性非常小Q要求更高,我们此处不作讨论Q如果感兴趣可以到Google上搜索, 有些文章对这个问题做了探讨性的描述。下面我们来看看利用UDP协议来穿透NAPT的原理是什?

                        ----------------------                           ----------------------              
                        | 192.168.0.5        |  Internat host            | 192.168.0.6        |  Internat host
                        ----------------------                           ----------------------              
                          UDP port: 2809        ^                   ^ UDP port: 1827
                                                 \                 /
                                                  v               v                            
                                                ----------------------           
                                                | 192.168.0.1        | NAT device
                                                | 61.51.99.86        |           
                                                ----------------------                                 
  Session(192.168.0.6:1827 <-> 61.51.76.102:8098) ^              ^ Session(192.168.0.6:1827 <-> 61.51.76.102:8098)
               map port:9882 to 192.168.0.5:2809 /                \map port: 9881 to 192.168.0.6:1827
                                  UDP port:8098 v                  v    UDP port:8098                          
                        ----------------------                           ----------------------              
                        | 61.51.202.88       | Internet host             | 61.51.76.102       | Internet host
                        ----------------------                           ----------------------                
                                                       
                                       
                                      图三: NAPT 是如何将U有IP地址的UDP数据包与公网Lq行透明传输的?/p>

UDP协议包经NAPT透明传输的说?

NAPT 为每一个Session分配一个NAPT自己的端口号Q依据此端口h判断收到的公网IPLq回的TCP/IP数据包{发给那台内网IP地址的计? 机。在q里Session是虚拟的QUDP通讯q不需要徏立连接,但是对于NAPT而言Q的要有一个Session的概念存在。NAPT对于UDP协议 包的透明传输面的一个重要的问题是如何处理q个虚拟的Session。我们都知道TCPq接的Session以SYN包开始,以FIN包结束, NAPT可以很容易的获取到TCP Session的生命周期,q进行处理。但是对于UDP而言Q就ȝ了,NAPTq不知道转发出去的UDP协议包是否到达了目的LQ也没有办法知道。? 且鉴于UDP协议的特点,可靠很差Q因此NAPT必须强制l持Session的存在,以便{待外部送回来的数据q{发给曄发vh的内|IP地址的计 机。NAPT具体如何处理UDP Session的超时呢Q不同的厂商提供的设备对于NAPT的实Cq相同,也许几分钟,也许几个时Q些NAPT的实现还会根据设备的忙碌状态进行智? 计算时旉的长短?/p>

                  [192.168.0.6:1827]
                            | UDP Packet[src ip:192.168.0.6 src port:1827 dst ip:61.51.76.102 dst port 8098]
                            v
        [pub ip: 61.51.99.86]NAT[priv ip: 192.168.0.1]
                            | UDP Packet[src ip:61.51.99.86 src port:9881 dst ip:61.51.76.102 dst port 8098]
                            v                  
                  [61.51.76.102:8098]
                 
                                    囑֛: NAPT 内部发出的UDP协议包的源地址和源端口改变传输l公|IPL?br />                                   
                                   
                  [192.168.0.6:1827]
                            ^
                            | UDP Packet[src ip:61.51.76.102 src port:8098 dst ip:192.168.0.6 dst port 1827]
        [pub ip: 61.51.99.86]NAT[priv ip: 192.168.0.1]
                            ^  
                            | UDP Packet[src ip:61.51.76.102 src port:8098 dst ip:61.51.99.86 dst port 9881]   
                  [61.51.76.102:8098]
                 
                                    图五: NAPT 收到的公网IPLq回的UDP协议包的目的地址和目的端口改变传输给内网IP计算机。                              ?
现在我们大概明白了NAPT如何实现内网计算机和外网L间的透明通讯。现在来看一下我们最兛_的问题,是NAPT是依据什么策略来判断是否要ؓ一个请求发出的UDP数据包徏立Session的呢Q主要有一下几个策?

A. 源地址(内网IP地址)不同Q忽略其它因? 在NAPT上肯定对应不同的Session
B. 源地址(内网IP地址)相同Q源端口不同Q忽略其它的因素Q则在NAPT上也肯定对应不同的Session
C. 源地址(内网IP地址)相同Q源端口相同Q目的地址(公网IP地址)相同Q目的端口不同,则在NAPT上肯定对应同一个Session
D. 源地址(内网IP地址)相同Q源端口相同Q目的地址(公网IP地址)不同Q忽略目的端口,则在NAPT上是如何处理Session的呢Q?/p>

D的情冉|式我们关心和要讨论的问题。依据目的地址(公网IP地址)对于Session的徏立的军_方式我们NAPT讑֤划分Z大类:

Symmetric NAPT:
对于到同一个IP地址QQ意端口的q接分配使用同一个Session; 对于C同的IP地址, L端口的连接用不同的Session.
我们U此UNAPT?Symmetric NAPT. 也就是只要本地绑定的UDP端口相同Q?发出的目的IP地址不同Q则会徏立不同的Session.

        [202.223.98.78:9696] [202.223.98.78:9696] [202.223.98.78:9696]
                ^               ^                       ^
                |               |                       |
                v               v                       v
               9883            9882                    9881
                                 |
                             \ [NAT] /
                                 ^
                                 |
                                 v                       
                          [192.168.0.6:1827]
                         
                          囑օ: Symmetric 的英文意思是对称。多个端口对应多个主机,q的,对称?
                 
Cone NAPT:
对于到同一个IP地址QQ意端口的q接分配使用同一个Session; 对于C同的IP地址QQ意端口的q接也用同一个Session.
我们U此UNAPT?Cone NAPT. 也就是只要本地绑定的UDP端口相同Q?发出的目的地址不管是否相同Q?都用同一个Session.

        [202.223.98.78:9696] [202.223.98.78:9696] [202.223.98.78:9696]

                        ^          ^         ^
                         \         |        /
                          v        v       v
                                 9881
                                 [NAT]
                                   ^
                                   |
                                   v                     
                          [192.168.0.6:1827]
                         
                          图七: Cone 的英文意思是锥。一个端口对应多个主机,是不是像个锥?

? 在绝大多数的NAPT属于后者,即Cone NAT。本人在试的过E中Q只好用了一台日本的Symmetric NAT。还好不是自q买的Q我从不买日? 希望看这文章的朋友也自觉的不要购买日本的东ѝWin9x/2K/XP/2003pȝ自带的NAPT也是属于 Cone NAT的。这是值的庆幸的,因ؓ我们要做的UDPIK只能在Cone NAT间进行,只要有一C是Cone NATQ对不vQUDPIK没有希望了Q服务器转发吧。后面会做详l分?

下面我们再来分析一下NAPT 工作时的一些数据结构,在这里我们将真正说明UDP可以IKCone NAT的依据。这里描q的数据l构只是Z说明原理Q不h实际参考h|真正感兴可以阅读Linux的中关于NAT实现部分的源码。真正的NAT实现 也没有利用数据库的,呵呵Qؓ了速度Q?/p>

Symmetric NAPT 工作时的端口映射数据l构如下:

内网信息?

[NAPT 分配端口] [ 内网IP地址 ] [ 内网端口 ] [ 外网IP地址 ] [ SessionTime 开始时?]

PRIMARY KEY( [NAPT 分配端口] ) -> 表示依据[NAPT 分配端口]建立主键Q必d一且徏立烦引,加快查找.
UNIQUE( [ 内网IP地址 ], [ 内网端口 ] ) -> 表示q两个字D联合v来不能重?
UNIQUE( [ 内网IP地址 ], [ 内网端口 ], [ 外网IP地址 ] ) -> 表示q三个字D联合v来不能重?

映射?

[NAPT 分配端口] [ 外网端口 ]

UNIQUE( [NAPT 分配端口], [ 外网端口 ] ) -> 表示q两个字D联合v来不能重?

Cone NAPT 工作时的端口映射数据l构如下:

内网信息?

[NAPT 分配端口] [ 内网IP地址 ] [ 内网端口 ] [ SessionTime 开始时?]

PRIMARY KEY( [NAPT 分配端口] ) -> 表示依据[NAPT 分配端口]建立主键Q必d一且徏立烦引,加快查找.
UNIQUE( [ 内网IP地址 ], [ 内网端口 ] ) -> 表示q两个字D联合v来不能重?

外网信息?

[ wid 主键标识 ] [ 外网IP地址 ] [ 外网端口 ]

PRIMARY KEY( [ wid 主键标识 ] ) -> 表示依据[ wid 主键标识 ]建立主键Q必d一且徏立烦引,加快查找.
UNIQUE( [ 外网IP地址 ], [ 外网端口 ] ) -> 表示q两个字D联合v来不能重?

映射? 实现一对多Q的

[NAPT 分配端口] [ wid 主键标识 ]

UNIQUE( [NAPT 分配端口], [ wid 主键标识 ] ) -> 表示q两个字D联合v来不能重?
UNIQUE( [ wid 主键标识 ] ) -> 标识此字D不能重?

看完了上面的数据l构是更明白了还是更晕了Q?呵呵! 多想一会儿׃明白了。通过NAT,内网计算机向外q结是很Ҏ的,NAPT会自动处理,我们的应用程序根本不必关心它是如何处理的。那么外部的计算机想讉K内网中的计算机如何实现呢Q我们来看一下下面的程Q?/p>

c 是一台在NAPT后面的内|计机Qs是一台有外网IP地址的计机。c d?s 发vq接hQNAPT依据上面描述的规则在自己的数据结构中记录下来Q徏立一个Session. 然后 c ?s 之间可以实现双向的透明的数据传输了。如下面所C?

   c[192.168.0.6:1827] <-> [priv ip: 192.168.0.1]NAPT[pub ip: 61.51.99.86:9881] <-> s[61.51.76.102:8098]

? 此可见,一台外|IP地址的计机惛_NAPT后面的内|计机通讯的条件就是要求NAPT后面的内|计机d向外|IP地址的计机发v一个UDP? 据包。外|IP地址的计机利用收到的UDP数据包获取到NAPT的外|IP地址和映的端口Q以后就可以和内|IP的计机透明的进行通讯了?br />   
? 在我们再来分析一下我们最兛_的两个NAPT后面的内|计机如何实现直接通讯? 两者都无法d发出q接hQ谁也不知道Ҏ的NAPT的公|IP地址和NAPT上面映射的端口号。所以我们要靠一个公|IP地址的服务器帮助两者来建立 q接。当两个NAPT后面的内|计机分别q接了公|IP地址的服务器后,服务器可以从收到的UDP数据包中获取到这两个NAPT讑֤的公|IP地址和这 两个q接建立的Session的映端口。两个内|计机可以从服务器上获取到Ҏ的NAPT讑֤公网IP地址和映的端口了?/p>

我们假设两个内网计算机分别ؓA和BQ对应的NAPT分别为AN和BNQ?如果A在获取到B对应的BN的IP地址和映的端口后,q不急待的向q个IP
? 址和映的端口发送了个UDP数据包,会有什么情况发生呢Q依据上面的原理和数据结构我们会知道QAN会在自己的数据结构中生成一条记录,标识一个新 Session的存在。BN在收到数据包后,从自q数据l构中查询,没有扑ֈ相关记录Q因此将包丢弃。B是个慢性子Q此时才慢吞吞的向着AN的IP地址 和映的端口发送了一个UDP数据包,l果如何呢?当然是我们期望的l构了,AN在收到数据包后,从自q数据l构中查扑ֈ了记录,所以将数据包进行处? 发送给了A。A 再次向B发送数据包Ӟ一切都时畅通无M。OK, 大工告成Q且慢,q时对于Cone NAPT而言Q对于Symmetric NAPT呢?呵呵Q自己分析一下吧...

NAPT(The IP Network Address/Port Translator) q行UDPIK的具体情况分析!

首先明确的将NAPT讑֤按照上面的说明分? Symmetric NAPT ?Cone NAPT, Cone NAPT 是我们需要的。Win9x/2K/XP/2003 自带的NAPT也ؓCone NAPT?/p>

W一U情? 双方都是Symmetric NAPT:

此情况应l不存在什么问题,肯定是不支持UDPIK?/p>

W二U情? 双方都是Cone NAPT:

此情冉|我们需要的Q可以进行UDPIK?/p>

W三U情? 一个是Symmetric NAPT, 一个是Cone NAPT:

此情冉|较复杂,但我们按照上面的描述和数据机构进行一下分析也很容易就会明白了, 分析如下,

假设: A -> Symmetric NAT, B -> Cone NAT

1. A 惌?B, A 从服务器那儿获取?B 的NAT地址和映端? A 通知服务器,服务器告?B A的NAT地址和映端? B ?A 发vq接QA 肯定无法接收到。此?A ?B 发vq接Q?A 对应的NAT建立了一个新的SessionQ分配了一个新的映端口, B ? NAT 接收到UDP包后Q在自己的映表中查询,无法扑ֈ映射,因此包丢弃了?/p>

2. B 惌?A, B 从服务器那儿获取? A 的NAT地址和映端? B 通知服务? 服务器告?A B的NAT地址和映端?A ?B 发vq接, A 对应的NAT建立了一个新的SessionQ分配了一个新的映端口B肯定无法接收到。此?B ?A 发vq接, ׃ B 无法获取 A 建立的新的Session的映端口,仍是使用服务器上获取的映端口进行连接, 因此 A 的NAT在接收到UDP包后Q在自己的映表中查询,无法扑ֈ映射? 因此包丢弃了?/p>

Ҏ以上分析Q只有当q接的两端的NAT都ؓCone NAT的情况下Q才能进行UDP的内|穿透互联?/p>


NAPT(The IP Network Address/Port Translator) q行UDPIK如何进行现实的验证和分?

需要的|络l构如下:

三个NAT后面的内|机器,两个外网服务器。其中两台Cone NAPTQ一?Symmetric NAPT?/p>

验证Ҏ:

? 以用本E序提供的源码,~译Q然后分别运行服务器E序和客L。修改过后的源码增加了客L之间直接通过IP地址和端口发送消息的命oQ利用此命oQ你 可以手动的验证NAPT的穿透情cؓ了方便操作,推荐你用一个远E登陆YӞ可以直接在一台机器上操作所有的相关的计机Q这样很方便Q一个h可? 完成所有的工作了。呵呵,本h是q么完成的。欢q有兴趣和经验的朋友来信批评指正Q共同进步?/p>


原始作? Hwycheng Leo(FlashBT@Hotmail.com)

源码下蝲: http://bbs.hwysoft.com/download/UDP-NAT-LEO.rar
参考:http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt
      P2P之UDPIKNAT的原理与实现(shootingstars)

文章说明:

? 于UDPIKNAT的中文资料在|络上是很少的,仅有<<P2P之UDPIKNAT的原理与实现(shootingstars)> >q篇文章有实际的参考h倹{本两年来也一直从事P2P斚w的开发工作,比较有代表性的是个人开发的BitTorrent下蝲软g - FlashBT(变态快?. 对P2P下蝲或者P2P的开发感兴趣的朋友可以访问Y件的官方主页: http://www.hwysoft.com/chs/ 下蝲看看Q说不定有收莗写q篇文章的主要目的是懒的再每ơ单独回{一些网友的提问, 一ơ性写下来, 卌省了自己的时_也方便了对于P2P的UDPIK感兴趣的网友阅d理解。对此有兴趣和经验的朋友可以l我发邮件或者访问我的个人Blog留言: http://hwycheng.blogchina.com.
您可以自p{载此文章,但是请保留此说明?/p>

再次感谢shootingstars|友的早期A? 表示谢意?/p>

]]>
desktop推荐使用ubuntuhttp://m.tkk7.com/hellboys/archive/2006/08/29/66483.html地狱L(hellboys)地狱L(hellboys)Tue, 29 Aug 2006 09:40:00 GMThttp://m.tkk7.com/hellboys/archive/2006/08/29/66483.htmlhttp://m.tkk7.com/hellboys/comments/66483.htmlhttp://m.tkk7.com/hellboys/archive/2006/08/29/66483.html#Feedback0http://m.tkk7.com/hellboys/comments/commentRss/66483.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/66483.html在安装ubuntu6.061LTS 以后,感觉非常不错.

桌面部分ubuntu5 和ubuntu6有很大的改进.不要自己费劲去装输入法了. 自带的scim感觉很不?兼容性也可以.影音部分只要安装?w32code可以rth可以很流畅的play 军_部分格式的文?
驱动也支持的比较?不过自己又做了一下nv的驱?感觉也没什么太大的变化.
q有一贯的l承deb的安装包l织.可以很舒服的setup 一些东? q个׃做广告了. 有兴的可以试试.

感觉可惜的就?apt-get 是lock单Q务的, 安装很多东东的时候不太方? 

其实不必要用她和windows来比? 因ؓ各自的方?如何你很喜欢shell,那么linux更加方便.当然,ubuntu6用户体验已经有了很大的提?已经和windows很接q了.其实是用户习惯的问?

单张光盘的iso也让人非常满?



]]>
了解SNMP单网l管理协?/title><link>http://m.tkk7.com/hellboys/archive/2006/07/14/58224.html</link><dc:creator>地狱L(hellboys)</dc:creator><author>地狱L(hellboys)</author><pubDate>Fri, 14 Jul 2006 09:10:00 GMT</pubDate><guid>http://m.tkk7.com/hellboys/archive/2006/07/14/58224.html</guid><wfw:comment>http://m.tkk7.com/hellboys/comments/58224.html</wfw:comment><comments>http://m.tkk7.com/hellboys/archive/2006/07/14/58224.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/hellboys/comments/commentRss/58224.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/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">单网l管理协?/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'">Z</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'">的网l管理包?/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'">Q?/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'">Q。管理信息库包含所有代理进E?/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'">的一套公用的l构和表C符受叫做管理信息结?/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'">Q当辑ֈ最大值时Q又?/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'">理q程和代理进E之间的通信协议Q叫做简单网l管理协?/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'">Q?/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'">Q?/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'">协议Q默认端?/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'">关于理q程和代理进E之间的交互信息Q?/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'">U报文:</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'">操作Q从代理q程处提取一个或多个参数倹{?/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'">操作Q从代理q程处提取一个或多个参数的下一个参数|关于“下一个(</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'">Q”的含义在后面的章节中介绍Q?/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'">操作Q设|代理进E的一个或多个参数倹{?/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'">操作Q返回的一个或多个参数倹{这个操作是׃理进E发出的。它是前?/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'">操作Q代理进E主动发出的报文Q通知理q程有某些事情发生?/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://m.tkk7.com/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">差错状态字D|一个整敎ͼ它是׃理进E标注的Q指明有差错发生。图是参数倹{名U和描述之间的对应关pR?/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">差错索引字段是一个整数偏U量Q指明当有差错发?/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">Ӟ差错发生在哪个参数。它是由代理q程标注的,q且</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">时才q行标注?br /><img height="107" alt="image004.jpg" src="http://m.tkk7.com/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'">对象标识W?/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'">对象标识是一U数据类型,它指明一U“授权”命名的对象。“授权”的意思就是这些标</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'">识不是随便分配的Q它是由一些权威机构进行管理和分配?/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'">对象标识是一个整数序列,以点Q?/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'">”)分隔。这些整数构成一个树型结构,cM?/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'">的文件系l。对象标识从树的剙开始,剙没有标识Q以</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'">表示Q这?/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'">中文件系l的树遍历方向非常类|。树上的每个l点同时q有一个文字名。例如标?/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'">对应。这主要是ؓ了h们阅Lѝ在实际应用中,也就是说在管理进E?/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'">和代理进E进行数据报交互Ӟ</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://m.tkk7.com/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">在图中,我们除了l出?/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">对象标识外,q给Z</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">Q?/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">Q这个标识。这是给厂家自定义而预留的。在</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">中列Z在该l点下大U?/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'">此篇自做个h参?/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'">更多了解L</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://m.tkk7.com/hellboys/aggbug/58224.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/hellboys/" target="_blank">地狱L(hellboys)</a> 2006-07-14 17:10 <a href="http://m.tkk7.com/hellboys/archive/2006/07/14/58224.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Mysql 集群介和配置http://m.tkk7.com/hellboys/archive/2006/06/28/55507.html地狱L(hellboys)地狱L(hellboys)Wed, 28 Jun 2006 03:58:00 GMThttp://m.tkk7.com/hellboys/archive/2006/06/28/55507.htmlhttp://m.tkk7.com/hellboys/comments/55507.htmlhttp://m.tkk7.com/hellboys/archive/2006/06/28/55507.html#Feedback5http://m.tkk7.com/hellboys/comments/commentRss/55507.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/55507.html 1Q?span style="FONT: 7pt 'Times New Roman'">  先了解一下你是否应该?/span> mysql 集群?/span>

减少数据中心l点压力和大数据量处理,采用?/span> mysql 分布Q一个或多个 application 对应一?/span> mysql 数据库。把几个 mysql 数据库公用的数据做出׃n数据Q例如购物RQ用户对象等{,存在数据l点里面。其他不׃n的数据还l持在各自分布的 mysql 数据库本w中?/span>

 

MySQL Cluster Components

 

 

2Q?span style="FONT: 7pt 'Times New Roman'">  集群 Mysql 中名U概?/span> .( 如上?/span> )

1 Q?/span> Sql l点Q?/span> SQL node-- 上图对应?/span> mysqld Q?/span> : 分布式数据库。包括自w数据和查询中心l点数据 .

2 Q数据结?/span> (Data node -- ndbd): 集群׃n数据 ( 内存?/span> ).

3 Q管理服务器 (Management Server ?ndb_mgmd): 集群理 SQL node,Data node.

 

3 Q配|?/span>

       mysql-max 版本Q当然现?/span> mysql 集群pȝ windonws q_上面不被支持 .

       安装 mysql ׃多说了,|上一打堆Q简明扼要?/span>

       A:192.168.1.251 ?Data node ?/span> Management Server.

       B:192.168.1.254 ?SQL node.

当然Q你也可以让一个机器同时ؓ 3 者?/span>

A,B my.inf 加上Q?/span>

      

[MYSQLD]                       

ndbcluster                      # run NDB engine

ndb-connectstring=192.168.1.251  # location of MGM node

 

# Options for ndbd process:

[MYSQL_CLUSTER]                

ndb-connectstring=192.168.1.251  # location of MGM node

 

A: /var/lib/mysql-cluster/config.ini

[NDBD DEFAULT]   

NoOfReplicas=1    # Number of replicas

DataMemory=80M    # How much memory to allocate for data storage

IndexMemory=18M   # How much memory to allocate for index storage

                  # For DataMemory and IndexMemory, we have used the

                  # default values. Since the "world" database takes up

                  # only about 500KB, this should be more than enough for

                  # this example Cluster setup.

# TCP/IP options:

[TCP DEFAULT]    

portnumber=2202   # This the default; however, you can use any

                  # port that is free for all the hosts in cluster

                  # Note: It is recommended beginning with MySQL 5.0 that

                  # you do not specify the portnumber at all and simply allow

                  # the default value to be used instead

# Management process options:

[NDB_MGMD]                     

hostname=192.168.1.251           # Hostname or IP address of MGM node

datadir=/var/lib/mysql-cluster  # Directory for MGM node logfiles

# Options for data node "A":

[NDBD]                          

                                # (one [NDBD] section per data node)

hostname=192.168.1.251           # Hostname or IP address

datadir=/usr/local/mysql/data   # Directory for this data node's datafiles

# SQL node options:

[MYSQLD]

hostname=192.168.1.254

#[MYSQLD] # q个相当?/span> 192.168.1.251

 

 

4.       启动试

 

·         在管理服务器上面(q里?code>192.168.1.251):

				
						·                
				
				
						shell> ndb_mgmd -f /var/lib/mysql-cluster/config.ini
				
		

 

·         在数据结Ҏ务器上面(依然?code>192.168.1.251 and more):

				
						·                
				
				
						shell> ndbd --initial (
						
								W一ơ时?--initial 参数)
						
						
								
								
						
				
		

 

·         SQL l点服务器上?span lang="EN">(192.168.1.254):

				
						·                
				
				
						shell> mysqld &
				
		

 

?/span> 251 上面察看

 

./ndb_mgm

-- NDB Cluster -- Management Client --

ndb_mgm> show

Connected to Management Server at: 192.168.1.251:1186

Cluster Configuration

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

[ndbd(NDB)]     1 node(s)

id=2    @192.168.1.251  (Version: 5.0.22, Nodegroup: 0, Master)

 

[ndb_mgmd(MGM)] 1 node(s)

id=1    @192.168.1.251  (Version: 5.0.22)

 

[mysqld(API)]   1 node(s)

id=3    @192.168.1.254  (Version: 5.0.22)

 

ok

关闭集群Q?/span>

shell> ndb_mgm -e shutdown

 

 

5 Q基本的集群说明

1 Q在mysql 集群?span lang="EN">.?span lang="EN">table引擎?span lang="EN">NDBCLUSTER时才做集,其他?span lang="EN">NDBCLUSTER表和一?span lang="EN">mysql数据库表一P不会׃n数据. NDBCLUSTER 表数据存储在Data node服务?b>内存?/b>Q?span lang="EN">Data Node可以?span lang="EN">1台或多台服务器,它们之间存放׃n数据?span lang="EN">Data Node服务器可以分l数?span lang="EN">copy?span lang="EN">

例如Q?span lang="EN">2,3,4,5 为四?span lang="EN">Data Node服务?span lang="EN">ID. 2,3为组0?span lang="EN">  4Q?span lang="EN">5为组1?span lang="EN">  2Q?span lang="EN">3l持数据相同Q?span lang="EN"> 4Q?span lang="EN">5l持数据相同?l?span lang="EN">0和组1l持数据不同?span lang="EN">

    2 Q?span lang="EN"> sql node 服务器中Q非NDBCLUSTER数据存在本n数据库中Q?span lang="EN">table引擎?span lang="EN">NDBCLUSTERӞ数据存储?span lang="EN">Data Node 中。当查询NDBCLUSTER表时Q它会从Data node集群中提h?span lang="EN">.

    3)Manager server

    SQl node ?span lang="EN">Data node 状态?span lang="EN">

 

 

6 深入了解

http://dev.mysql.com/doc/refman/5.0/en/ndbcluster.html



]]>
ZLinux的VPN服务?/title><link>http://m.tkk7.com/hellboys/archive/2006/04/30/44103.html</link><dc:creator>地狱L(hellboys)</dc:creator><author>地狱L(hellboys)</author><pubDate>Sat, 29 Apr 2006 16:21:00 GMT</pubDate><guid>http://m.tkk7.com/hellboys/archive/2006/04/30/44103.html</guid><wfw:comment>http://m.tkk7.com/hellboys/comments/44103.html</wfw:comment><comments>http://m.tkk7.com/hellboys/archive/2006/04/30/44103.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/hellboys/comments/commentRss/44103.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/hellboys/services/trackbacks/44103.html</trackback:ping><description><![CDATA[VPN(Virtual Private NetworkQ虚拟专用网l?是专用网l的延Q它可以通过׃nInternet或公ql连接模拟点对点专用q接的方式,在本地计机和远E计机之间发送数据?br />它具有良好的保密性和不受q扰性,使双方能够进行自p安全的点对点连接。下面介l一U快速构建VPN服务器的Ҏ?br /><br /><strong>安装软g</strong><br /><br />1.安装PPP<br /><br />安装PPPQPoint-to-Point ProtocolQ点到点协议Q?.4.2以上的版本,可以?a >http://sourceforge.net/project/showfiles.php?group_id=44827</a>下蝲ppp-2.4.3-0.cvs_20040527.1.i386.rpm软g包?br /><br />安装命o如下Q?br /><br />#rpm -Uvh ppp-2.4.3-0.cvs_20040527.1.i386.rpm<br /><br />2.安装内核MPPE补丁 <br /><br />安装内核MPPEQMicrosoft Point to Point EncryptionQ微软点对点加密Q补丁需要根据内栔R择相应的版本。笔者用的Linux内核?.4.20-31.9版本Q可以到http: //pptpclient.sourceforge.net/mppe/kernel-mppe-2.4.20-31.9.i686.rpm下蝲相应?kernel-mppe-2.4.20-31.9.i686.rpm软g包。安装命令如下: <br /><br />#rpm -ivh kernel-mppe-2.4.20-31.9.i686.rpm<br /><br />用以下命令检查内核MPPE补丁是否安装成功Q?<br /><br />#modprobe ppp-compress-18<br /><br /><br />3.查PPP是否支持MPPE <br /><br />用以下命令检查PPP是否支持MPPEQ?<br /><br />#strings '/usr/sbin/pppd' |grep -i mppe | wc --lines<br /><br />如果以上命o输出为?”则表示不支持;输出为?0”或更大的数字就表示支持?br />4.安装PPTPD <br /><br />?a >http://sourceforge.net/project/showfiles.php?group_id=44827</a>下蝲pptpd-1.1.4-b4.i386.rpm软g包,q安装?<br /><br /># rpm -ivh pptpd-1.1.4-b4.i386.rpm<br /><br /><strong>修改配置文g</strong><br /><br />1.修改modules.conf文g<br /><br />~辑/etc/modules.conf配置文gQ加入如下内容:<br /><br />alias net-pf-47 ip_gre<br /><br />2.修改pptpd.conf文g <br /><br />~辑/etc/pptpd.conf配置文gQ添加如下内容,定本地VPN服务器的IP地址和客Ld后分配的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文g <br /><br />~辑/etc/ppp/options.pptpd配置文gQ替换成如下内容Q?<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 #把想要在|络d中看到的机器的IP填写到这?br />ms-dns 192.168.1.2 #DNS服务器地址 <br />dump <br />logfile /var/log/pptpd.log #日志存放的\?br />4.修改chap-secrets文g <br /><br />~辑/etc/chap-secrets配置文gQ添加如下内容: <br /><br /># client server secret IP addresses<br />"test@gd.cn" * "test" *<br /><br />上面W二行代码的四项内容分别对应W一行中的四V?a href="mailto:%E2%80%9Ctest@gd.cn">“test@gd.cn</a>?是Client端的VPN用户名;“server”对应的是VPN服务器的名字Q该名字必须?etc/ppp/options.pptpd文g中指明的 一P或者设|成?”号来表C动识别服务器Q“secret”对应的是登录密码;“IP addresses”对应的是可以拨入的客户端IP地址Q如果不需要做特别限制Q可以将其设|ؓ?”号?br /><br />5.讄IP伪装转发<br /><br />只有讄了IP伪装转发Q通过VPNq接上来的远E计机才能互相ping通,实现像局域网那样的共享。用下面的命令进行设|:<br /><br />#echo 1 > /proc/sys/net/ipv4/ip_forward<br /><br />可以这条命令放到文?etc/rc.d/rc.local里面Q以实现每次开机时自动q行该命令?br /><br />6.打开防火墙端?br /><br />Linux服务器的1723端口?7端口打开Qƈ打开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 />在RHELpd配置服务:<br />   cp /usr/sbin/pptpd /etc/rc.d/init.d/   <br />   可以用chkconfig  --add pptpd 来添?sbin/service pptpd 下面服务<br />   W方?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 > /proc/sys/net/ipv4/ip_forward<br /><br /><br /><br />到这里Linux服务器的讄完成了Q下面将利用Windows客户端进行测试?<br /><strong>试</strong><br /><br />下面以Windows Server 2003Z来进行测试?<br /><br />1.新徏q接 <br /><br />单击“开始→讄→网l和拨号q接”打开“网l和拨号q接”的H口Q再单击“新接”打开“网l连接向导”的H口Q然后依ơ选择或填写“连接到我的?作场所|络→虚拟专用网l连接→公司名(可以随便填写Q→不拨初始q接↺P地址Q填入VPN服务器的IP地址Q”,最后单几Z确定”,徏立了一个新?q接?<br /><br />2. 修改q接属?<br /><br />叛_刚才创徏的连接,再依ơ单几Z属性→|络Q选择TCP/IP协议Q→属性→高”,然后把“在q程|络上用默认网关”前面的勑֎掉后单击“确定”?<br /><br />3.建立q接 <br /><br />双击刚才建立好的q接Q填入提前设|好的用户名和密码,单击“确定”进行连接。如果连接成功,在连接的“详l信息”里应该可以看到服务器所分配的IP地址{信息。这Ӟ可以跟q接q入的局域网里的其它计算行通信了?<br /><br />如果客户端用的仍然是Windows 95或Windows 98Q则需要到<a >http://support.microsoft.com/support/kb/articles/q285/1/89.asp</a>下蝲相关的拨L序?/p><img src ="http://m.tkk7.com/hellboys/aggbug/44103.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/hellboys/" target="_blank">地狱L(hellboys)</a> 2006-04-30 00:21 <a href="http://m.tkk7.com/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 Workshttp://m.tkk7.com/hellboys/archive/2006/04/02/38675.html地狱L(hellboys)地狱L(hellboys)Sat, 01 Apr 2006 17:07:00 GMThttp://m.tkk7.com/hellboys/archive/2006/04/02/38675.htmlhttp://m.tkk7.com/hellboys/comments/38675.htmlhttp://m.tkk7.com/hellboys/archive/2006/04/02/38675.html#Feedback0http://m.tkk7.com/hellboys/comments/commentRss/38675.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/38675.htmlHow Windows Peer-to-Peer Networking Works

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.

Windows Peer-to-Peer Networking Architecture

The architecture of Windows Peer-to-Peer Networking is shown in Figure 1.

Figure 1: Windows Peer-to-Peer Networking architecture

Figure 1: Windows Peer-to-Peer Networking architecture
See full-sized image.

Windows Peer-to-Peer Networking architecture consists of the following components:

?/td>

Graphing 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 & Synchronization, Store, and Graph Maintenance subcomponents.

?/td>

Grouping 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.

?/td>

NSP 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.

?/td>

PNRP The PNRP component provides peer-to-peer name resolution.

?/td>

Identity Manager Identity manager enables the creation and management of peer-to-peer identities.

?/td>

Microsoft TCP/IP version 6 protocol The Microsoft TCP/IP version 6 protocol (IPv6) provides the transport over which Windows Peer-to-Peer Networking operates.

The details of how Windows Peer-to-Peer Networking works are described in the following sections:

?/td>

IPv6 and NAT traversal

?/td>

Name resolution and peer discovery with PNRP

?/td>

Graphing

?/td>

Grouping

?/td>

Replicated store

?/td>

Searching

IPv6 and NAT Traversal

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 Windows 2000 Network Address Translator (NAT). NATs for IPv4 extend the lifetime of the IPv4 public address space, but at the expense of breaking end-to-end communication.

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.

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:

?/td>

Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)

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 "Intra-Site Automatic Tunnel Addressing Protocol (ISATAP)".

?/td>

6to4

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.

For more information about ISATAP and 6to4, see the IPv6 Transition Technologies white paper.

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.

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 "Teredo: Tunneling IPv6 over UDP through NATs".

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.

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.

For additional information about how Teredo works, see the "Teredo Overview" white paper.

Name Resolution and Peer Discovery with PNRP

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.

Windows Peer-to-Peer Networking solves this problem with a name resolution and peer discovery scheme with the following attributes:

?/td>

Distributed and serverless for name resolution

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.

?/td>

The use of identifiers (IDs) instead of names

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.

?/td>

The use of multiple IDs

Each separate peer computer, user, group, device, service or other type of peer node can have its own peer ID.

?/td>

Ability to scale to large numbers of IDs

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.

The protocol used to send messages between peers for name resolution and peer discovery is Peer Name Resolution Protocol (PNRP).

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:

?/td>

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.

?/td>

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.

?/td>

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.



]]>
NAT和P2P|络http://m.tkk7.com/hellboys/archive/2006/04/02/38672.html地狱L(hellboys)地狱L(hellboys)Sat, 01 Apr 2006 17:00:00 GMThttp://m.tkk7.com/hellboys/archive/2006/04/02/38672.htmlhttp://m.tkk7.com/hellboys/comments/38672.htmlhttp://m.tkk7.com/hellboys/archive/2006/04/02/38672.html#Feedback0http://m.tkk7.com/hellboys/comments/commentRss/38672.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/38672.html互联|是Z32位IP地址的,q意味着互联|理Z最大电脑数目约为四万亿。由于IP地址使用方式的无效性,实际的数量会得多。实际上Q互联网q不了多久就会将IP地址用完?/p>

因ؓ可用的IP地址来少Q一U被UCؓ|络地址解析或箭UNAT的技术被开发出来,它允总一个IP地址来代表整个网l的电脑?/p>

一个NAT处在公用互联|与它所服务的网l之_重写数据中IP头部的IP地址和端口号以所有的包看上去都象从一个NAT讑֤的公用IP地址发来Q或到它去)的,而不是发自(往Q实际的源或者目标?/p>

NAT如今已经在小型家庭-办公室\p普遍U用,也在很多软g中被用户使用以连接几台PCC个唯一的电~MODEM。它甚至被一些ISP使用?/p>

QNAT不是唯一可能的解军_法,代理服务器也被普遍用,但需要更多的配置Q有时还需要要定制的客L软g。而最l,我们都将转换到IP?Q它?28位地址Q可以解军_有的及所有的问题Q但那将在很久后才会普及?/p>

某些协议是非NAT友好?/strong>


一些应用程序将IP和端口号隐藏在它们的数据包中发送,NAT不能正确重写它们Q所以当你想在NAT|络内用那些程序的话,它们不会正运行?/p>

一些NATQ由于安全原因,只允总已经发送过数据ȝ外部地址接收数据。这意味着处于不同NAT后的两个Z能以通常的方式徏立连接?/p>

解决办法


希望NAT友好的Peer-to-peerQ点对点Q协议必L:其所嵌入数据包的M地址在通过NAT旉可能变梦扌ВD枰咕取R桓隹械姆椒ㄈu?/p>

两点之间所有的数据都通过一个单一的UDP端口。存在着一个不处于MNAT之后的地址服务器,用户首先与地址服务器连接,q发送他们认为拥有的IP地址Q服务器标记该地址和它在UDP头部所看到的地址。然后服务器两个地址都送往其它炏V这P所有h都知道其它h的地址?/p>

为打开点对点的q接Q所有的旧(l)点发送一个UDP包到新的Q结Q点Q且斎ͼl)点发送一个UDP包到每一个老(l)炏V因为无人知道开始它们是否处于同一个NAT之后Q第一个包往往被同旉往公有和私有地址?/p>

q导致每个h的NAT为UDP数据的通过打开一个双向的z。一旦第一个响应从每个Q结Q点q回Q发送者就知道使用哪个q回地址Qƈ能停止向两个地址发送数据?/p>

兼容性需?/strong>


Z和超基本的NAT RFCQ一个想支持q个技术的NAT讑֤必须有以下要求的属性:

Q>NAT不允许改变被数据用的UDP端口受?br />如果一个处于NAT之后的主Z一个单一的UDP口发送了一pd的包Q被NAT接棒后的包也必须表现为来自同一L和UDP口?/p>

RFC蓝图


我正在拟订这Ҏ术RFC蓝图更ؓ详细的细节。如果你感兴,请与我联pR?/p>

兼容性测试结?/strong>


我正在测试实现几个NAT通讯的兼Ҏ。这里是部分l果Q?/p>

已知的NAT实现的兼Ҏ?/strong>


Q>NAT1000Q完全兼宏V感谢Nevod技术h员早期所帮助做的兼容性测试。无M东西需要改变;q项技术与他们的NAT一赯行很E_。Nevod已经不再存在了,它已被微软兼q?br />Q>Win98 SE包含的网l联接共享YӞh贜AT1000Q所以一定运行良好?br />Q>SYGATEQ完全兼宏V?br />Q>NAT32Q?999q??号公布的BETA试版完全兼宏V现在公布的版本也应该完全兼宏V?br />Q>LINUX IP MasqueradingQLINUX IP伪装Q:2.2.1版本内核和后l版本可以正常运行。请到http://juanjox.linuxhq.com/?L早期2.1版本的补丁?.0版本的补丁见Glenn Lamb的页面:http://home.indyramp.com/lists/masq/msg03024.htmlQ?br />ftp://ftp.netcom.com/pub/mu/mumford/loose-udp-2.0.36.patch.gzQ?br />Glenn的端口之拥有一个配|时选项CONFIG_IP_MASQ_LOOSE_UDPQ这是一个很好的举措?br />Q>WinNATQ当前版本工作正常?/p>

NAT实现卛_可兼容的


Q>Arescom Apex 1100 ISDN路由QArescom?999q?月针Ҏ问题发布了一个固件补丁;也许现在已经q入其标准固仉?但我q没有证实?br />Q>Vicomsoft Softrouter PlusQVicom曑օ布过一个版本以解决q个问题Q但我还没有Z来测试一下。注意:Zɘq个实现正常q行Q你必须把网兌备上除指向内部以太适配器外的所有本地TCPl定止。在使用Vicom的安装助手之前请阅读其文档?/p>

未知是否兼容?/strong>


Q>Cisco IOS有一内置的NAT兼容Ҏ,也许有用也许不然?br />Q>我们已经试了我们手上所有能得到的WIN32软g。但q没有测试嵌入到许多型家庭办公路由中的NATQ也没有试外置的NAT如SonicWall{?/p>

不兼容的


Q>所有的U代理服务器解决办法Q如WINGATE2或者PPPSharQ都不能正常q行?/p>

使用q项技术的软g


以下软g包是已知的支持在NAT后操作的Q?br />Q>Civilization: Call To Power
Q>Heavy Gear 2

讨论?/strong>


我想听到其它开发者对于这Ҏ术的xQ以及Masq如何被重写以正确复用UDP端口。加入NAT-peer-gamesQ?a >http://onelist.com/viewarchive.cgi?listname=nat-peer-gamesQ邮件列表让我们一赯论?/p>

实施问题


在测试SYGATE和近期NAT1000版本Ӟ我遇C些实施方面的问题。当q行|关的机器是通过MODEM与INTERNET联接的话所有一切均正常。但如果|关机器是通过以太|与INTERNET联接的话Q客L不能讉K那个外部以太|上的其它主机。看上去p那台|关送出来的包完全被外部以太|上的其它主Z弃了。然而\由器不会丢弃数据Q所以与q程L联接没有问题。想了解更多信息Q请到my Usenet postQ?a >http://www.dejanews.com/getdoc.xp?AN=427631763Q获取?/p>

我們֐于相信这是硬件原因,但谁知道?..

链接

Q>IETF Working Group on NATQ?br />http://www.ietf.org/html.charters/nat-charter.html
新的RFC草图和邮件列表。其中一个文?br />http://www.ietf.org/internet-drafts/draft-ietf-nat-protocol-issues-01.txt
提到q项技术;搜烦关键词“Activision?/p>

Q>NAT面Q?br />http://www.uq.edu.au/~gadmacka/the-nat-page/
列出了一些可行的NAT实现

Q>LINUX IP伪装Q?br />http://www.indyramp.com/masq/
都是关于NAT实现的LINUX之Masq?/p>

Q>MASQ邮g列表的可查询索引Q?br />http://www.mail-archive.com/masq@tori.indyramp.com/

Q>LINUX IP NAT论坛Q?br />http://serf.csn.tu-chemnitz.de/HyperNews/get/linux-ip-nat.html
NAT论文Q老式的不支持的LINUX NAT实现和一个讨论区。多半ؓ了历史兴?/p>

历史


相对于我的知识来讲这是一Ҏ技术。我?997q开始研I它Qƈ?998q用它完成了我的W一个作品。这Ҏ术在制作Activision多玩家游戏中被开发?/p>

1999 DAN KEGEL 版权所?br />dank@alumni.caltech.edu
最q更斎ͼ1999q??7?br />KEGEL的主:http://www.kegel.com/



]]>
IDSQIntrusion Detection Systemhttp://m.tkk7.com/hellboys/archive/2006/03/24/37217.html地狱L(hellboys)地狱L(hellboys)Fri, 24 Mar 2006 06:52:00 GMThttp://m.tkk7.com/hellboys/archive/2006/03/24/37217.htmlhttp://m.tkk7.com/hellboys/comments/37217.htmlhttp://m.tkk7.com/hellboys/archive/2006/03/24/37217.html#Feedback0http://m.tkk7.com/hellboys/comments/commentRss/37217.htmlhttp://m.tkk7.com/hellboys/services/trackbacks/37217.html  L?IDS 软g被安装于需要监控的pȝ上。IDS 软g上的数据源是日志文g?或系l审计代理。主机型 IDS 不仅着g计算Z通信量的出入,同时也校验用Ll文件的完整性,q检可疑程序。ؓ了能使基于主机的 IDS 完整地覆盖受控站点,需要在每台计算Z都安?IDS pȝ?/p>

  L型入侉|Y件主要有两种cdQ主?wrapper /个h防火墙和Z代理的Y件。与|络?IDS 相比Q主机型 IDS 中每U检内部攻击(x谓的异常行ؓQ的Ҏ都更为高效,但相对而言Q两者在外部攻L面都非常有效。主?wrapper 或者个人防火墙都可以配|来着g受控机器的所有网l数据包Q连接尝试或d试{。另外还包含拨号试或者其它非|络相关通信端口{功能?/p>

  |络?IDS 的数据源是网l上的数据包QIDS 监控各网D늚数据包流量作为。网l接口卡被设|ؓ混合模式Q以获取跨越各网D늚所有网l流量。但|络?IDS 不能监控其它各段上的|络量?/p>

  |络?IDS 着gl过传感器的|络数据包。传感器只能看到与其相连的网l段上装载的数据包。如果ؓq些数据包都匚w一个标志,那么主要有以下三U标志类型:

  • 串标志(String SignatureQ:着g文本Ԍ表示可能性功能。ؓ降低串信号错误数量,使用复合串信h非常必要的?
  • 端口标志QPort SignatureQ:着g众所周知的、高频率的攻ȝ口的q接试。例?telnetQTCP 端口23Q、FTPQTCP 端口21/20Q、SUNRPCQTCP/UDP 端口111Q和 IMAP QTCP 端口143Q等端口?
  • 头标志(Header SignatureQ:着g危险的或不合理的数据包头l合。其中最著名的例子是 WinnukeQ数据包被指?NetBIOS 端口和紧急指针,或者设|带外指针。对微Ypȝ来说q将D“蓝频死机”现象?

  |络型和L?IDS 都具有正反两面。所以通常情况下,|络中结合两U技术提供完整保护功能。MQ有关何处用到q三U类型,以及如何整合数据都是一个切实且日益x的主题?



]]>
վ֩ģ壺 AV˾Ʒ | ۺһʵ| ɫwwwƷƵѿ| ŮվѸƵ| Avһ| ߹ۿƵ| ޳AVۺ߹ۿ| 69˳鶹Ƶ| þ޾ƷAB벥| þѸƵ| Ʒ޳aƬ߹ۿ| 67194ֻѹۿ| ޾ƷþëƬҰ | պһ| ׾ƷͼƬ| ˵ĺÿѹۿƵ | ƷƵ| þ޾Ʒ777С˵| þóѵӰ| Ļһ| AVר| ˸ӰԺѿ| gayƬgvվ| Ʒһ߹ۿ| ɫƷƵ| ղϵ| ޸߹ۿ| ޹Ʒ߹ۿ| ҹ˾ƷӰ߹ۿ| ĻѴȫ| 츾ɫ͵| ѿbbb| mv߹ۿ| Ƶ| 99ƵѾƷǿ6 | ձ߿Ƭ˳Ƶ1000 | ޳˵Ӱ߹ۿ| ˿| һ| ձɱ˹ۿ| һƷ޶߲|