<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[懒虫's Blog]]></title>
  <subtitle type="html"><![CDATA[勤以补拙　厚积薄发]]></subtitle>
  <id>http://www.ciscobug.cn/</id>
  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/" /> 
  <link rel="self" type="application/atom+xml" href="http://www.ciscobug.cn/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.8">PJBlog3</generator> 
  <updated>2009-01-04T14:42:40+08:00</updated>

  <entry>
	  <title type="html"><![CDATA[Oracle10g 在AIX 5.3上的安装 ]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2009-01-04T14:42:40+08:00</updated>
	  <published>2009-01-04T14:42:40+08:00</published>
		  <summary type="html"><![CDATA[ 简单记录了一下安装过程：<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查硬件配置<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查内存：<br/><br/>&nbsp;&nbsp; # lsattr -El sys0 -a realmem<br/>&nbsp;&nbsp; realmem 2097152 Amount of usable physical memory in Kbytes False <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查交换空间<br/><br/>&nbsp;&nbsp; # lsps -a<br/>&nbsp;&nbsp; Page Space&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Physical Volume&nbsp;&nbsp; Volume Group&nbsp;&nbsp;&nbsp;&nbsp;Size %Used Active&nbsp;&nbsp;Auto&nbsp;&nbsp;Type<br/>&nbsp;&nbsp; hd6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hdisk0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rootvg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 512MB&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; yes&nbsp;&nbsp; yes&nbsp;&nbsp;&nbsp;&nbsp;lv <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查临时文件目录（至少应有400M空闲空间）<br/><br/>&nbsp;&nbsp; df -k /tmp<br/>&nbsp;&nbsp; Filesystem&nbsp;&nbsp;&nbsp;&nbsp;1024-blocks&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Free %Used&nbsp;&nbsp;&nbsp;&nbsp;Iused %Iused Mounted on<br/>&nbsp;&nbsp; /dev/hd3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;65536&nbsp;&nbsp;&nbsp;&nbsp; 63984&nbsp;&nbsp;&nbsp;&nbsp;3%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16&nbsp;&nbsp;&nbsp;&nbsp; 1% /tmp&nbsp;&nbsp; <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查操作系统位数<br/><br/>&nbsp;&nbsp; # getconf HARDWARE_BITMODE<br/>&nbsp;&nbsp; 64 <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查操作系统版本号<br/><br/>&nbsp;&nbsp; # oslevel -r<br/>&nbsp;&nbsp; 5300-06 <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查安装的软件包：<br/><br/>&nbsp;&nbsp; # lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat bos.perf.libperfstat bos.perf.proctools bos.adt.prof bos.cifs_fs.rte<br/>&nbsp;&nbsp;Fileset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Level&nbsp;&nbsp;State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;----------------------------------------------------------------------------<br/>Path: /usr/lib/objrepos<br/>&nbsp;&nbsp;bos.adt.base&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Base Application Development<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Toolkit<br/>&nbsp;&nbsp;bos.adt.lib&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Base Application Development<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Libraries<br/>&nbsp;&nbsp;bos.adt.libm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Base Application Development<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Math Library<br/>&nbsp;&nbsp;bos.adt.prof&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Base Profiling Support<br/>&nbsp;&nbsp;bos.cifs_fs.rte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Runtime for SMBFS<br/>&nbsp;&nbsp;bos.perf.libperfstat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Performance Statistics Library<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interface<br/>&nbsp;&nbsp;bos.perf.perfstat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Performance Statistics<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interface<br/>&nbsp;&nbsp;bos.perf.proctools&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Proc Filesystem Tools <br/>Path: /etc/objrepos<br/>&nbsp;&nbsp;bos.cifs_fs.rte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Runtime for SMBFS<br/>&nbsp;&nbsp;bos.perf.libperfstat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Performance Statistics Library<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interface<br/>&nbsp;&nbsp;bos.perf.perfstat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5.3.0.60&nbsp;&nbsp;COMMITTED&nbsp;&nbsp;Performance Statistics<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Interface<br/>对于缺少的包，用installp -a -d /dev/cd0 包名&nbsp;&nbsp;进行安装，安装时放入AIX的安装光备<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;检查安装的补丁包<br/><br/># /usr/sbin/instfix -i -k &#34;IY58143 IY59386 IY60930 IY66513 IY70159&#34;<br/>&nbsp;&nbsp;&nbsp;&nbsp;All filesets for IY58143 were found.<br/>&nbsp;&nbsp;&nbsp;&nbsp;All filesets for IY59386 were found.<br/>&nbsp;&nbsp;&nbsp;&nbsp;All filesets for IY60930 were found.<br/>&nbsp;&nbsp;&nbsp;&nbsp;All filesets for IY66513 were found.<br/>&nbsp;&nbsp;&nbsp;&nbsp;All filesets for IY70159 were found.<br/># /usr/sbin/instfix -i -k &#34;IY68989&#34;<br/>&nbsp;&nbsp;&nbsp;&nbsp;All filesets for IY68989 were found. <br/><br/>安装AIX C++ 8.0 运行时<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;编辑/etc/hosts文件<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;创建用户组oinstall，dba <br/><br/>mkgroup -&#39;A&#39; oinstall<br/>mkgroup -&#39;A&#39; dba<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;创建用户oracle<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;修改oracle用户密码<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;确认nobody用户存在 id nobdy<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;配置shell limits（ smit chuser）<br/><br/>&nbsp;&nbsp;soft FILE size -1<br/>&nbsp;&nbsp;soft CPU time -1<br/>&nbsp;&nbsp;soft DATA segment -1<br/>&nbsp;&nbsp;soft STACK size -1<br/>更改系统参数 smit chgsys<br/>&nbsp;&nbsp;将 Maximum number of PROCESSES allowed per user改为2048以上 <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;创建目录<br/><br/># mkdir -p /u01/app/oracle<br/># chown o&#114;acle:oinstall /u01/app/oracle<br/># chmod 775 /u01/app/oracle<br/># mkdir -p /u02/oradata<br/># chown o&#114;acle:oinstall /u02/oradata<br/># chmod 755 /u02/oradata <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;创建文件系统/u01 /u02<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;切换到oracle用户，在.profile中增加如下两行<br/><br/>umask 022<br/>AIXTHREAD_SCOPE=S; export AIXTHREAD_SCOPE<br/>o&#114;ACLE_BASE=/u01/app/oracle; export o&#114;ACLE_BASE <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;执行<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;. ./.profile将安装文件ftp到主机解压文件<br/><br/>gunzip 10gr2_aix5l64_database.cpio.gz<br/>cpio -idmv&nbsp;&nbsp;10gr2_aix5l64_database.cpio (如果报0511-903 Out of phase这样的错误，cpio命令加上c 这个参数，即idmcv） <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;以root用户执行 Disk1/rootpre/rootpre.sh切换回oracle用户export DISPLAY运行Disk1/runInstaller完成安装<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;完成后注意修改操作系统maxperm% maxclient% minperm% v_pinshm strict_maxclient strict_maxperm参数<br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2019.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2019</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[AIX+Oracle10G安装手册]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2009-01-04T14:41:23+08:00</updated>
	  <published>2009-01-04T14:41:23+08:00</published>
		  <summary type="html"><![CDATA[1 AIX系统的安装<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;使用AIX 5300L5的介质，根据系统提示进行安装。这一步很简单，不详细说明。安装完成后需要设置好系统时区、时间和网路。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;2 调整文件系统<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;初步装好的系统，其文件系统如下：<br/><br/># df -k<br/>Filesystem 1024-blocks Free %Used Iused %Iused Mounted on<br/>/dev/hd4 32768 15648 53% 1724 11% /<br/>/dev/hd2 1212416 8764 100% 31825 11% /usr<br/>/dev/hd9var 32768 23884 28% 369 5% /var<br/>/dev/hd3 65536 63404 4% 30 1% /tmp<br/>/dev/hd1 32768 31684 4% 18 1% /home<br/>/proc - - - - - /proc<br/>/dev/hd10opt 65536 14304 79% 981 6% /opt <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;查看vg情况<br/><br/># lsvg -l rootvg<br/>rootvg:<br/>LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT<br/>hd5 boot 1 1 1 closed/syncd N/A<br/>hd6 paging 16 16 1 open/syncd N/A<br/>hd8 jfslog 1 1 1 open/syncd N/A<br/>hd4 jfs 1 1 1 open/syncd /<br/>hd2 jfs 37 37 1 open/syncd /usr<br/>hd9var jfs 1 1 1 open/syncd /var<br/>hd3 jfs 2 2 1 open/syncd /tmp<br/>hd1 jfs 1 1 1 open/syncd /home<br/>hd10opt jfs 2 2 1 open/syncd /opt<br/><br/># lsvg -p rootvg<br/>rootvg:<br/>PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION<br/>hdisk0 active 543 481 108..93..63..108..109<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;其中vgroot还有空余的481个PP，由于我的PP大小为32M，所以还有481*32M=15392M的空间可以使用。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;接下来要对原先的文件系统进行调整。以/usr为例：<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;原先/usr的大小为32(PPs)*32M(PP SIZE)=1G<br/><br/># lslv hd2<br/>LOGICAL VOLUME: hd2 VOLUME GROUP: rootvg<br/>LV IDENTIFIER: 0006faaa00004c0000000111fd3878b2.5 PERMISSION: read/write<br/>VG STATE: active/complete LV STATE: opened/syncd<br/>TYPE: jfs WRITE VERIFY: off<br/>MAX LPs: 32512 PP SIZE: 32 megabyte(s)<br/>COPIES: 1 SCHED POLICY: parallel<br/>LPs: 32 PPs: 32<br/>STALE PPs: 0 BB POLICY: relocatable<br/>INTER-POLICY: minimum RELOCATABLE: yes<br/>INTRA-POLICY: center UPPER BOUND: 32<br/>MOUNT POINT: /usr LABEL: /usr <br/><br/><br/>将/usr的大小变为2G <br/><br/># chfs -a size=2048M /usr<br/>Filesystem size changed to 4194304<br/><br/># df -k<br/>Filesystem 1024-blocks Free %Used Iused %Iused Mounted on<br/>/dev/hd4 32768 15632 53% 1724 11% /<br/>/dev/hd2 2097152 865732 59% 31825 7% /usr<br/>/dev/hd9var 32768 23884 28% 369 5% /var<br/>/dev/hd3 65536 63396 4% 30 1% /tmp<br/>/dev/hd1 32768 31684 4% 18 1% /home<br/>/proc - - - - - /proc<br/>/dev/hd10opt 65536 14304 79% 981 6% /opt<br/><br/># lslv hd2<br/>LOGICAL VOLUME: hd2 VOLUME GROUP: rootvg<br/>LV IDENTIFIER: 0006faaa00004c0000000111fd3878b2.5 PERMISSION: read/write<br/>VG STATE: active/complete LV STATE: opened/syncd<br/>TYPE: jfs WRITE VERIFY: off<br/>MAX LPs: 32512 PP SIZE: 32 megabyte(s)<br/>COPIES: 1 SCHED POLICY: parallel<br/>LPs: 64 PPs: 64<br/>STALE PPs: 0 BB POLICY: relocatable<br/>INTER-POLICY: minimum RELOCATABLE: yes<br/>INTRA-POLICY: center UPPER BOUND: 32<br/>MOUNT POINT: /usr LABEL: /usr<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;其他的文件系统根据自己的需求进行设置就可以了，下面是我的设置：<br/><br/>Filesystem 1024-blocks Free %Used Iused %Iused Mounted on<br/>/dev/hd4 32768 16708 50% 1777 11% /<br/>/dev/hd2 2097152 811420 62% 32230 7% /usr<br/>/dev/hd9var 262144 245636 7% 380 1% /var<br/>/dev/hd3 1048576 796292 25% 457 1% /tmp<br/>/dev/hd1 262144 253744 4% 27 1% /home<br/>/proc - - - - - /proc<br/>/dev/hd10opt 2097152 1938404 8% 2302 1% /opt <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;o&#114;acle安装时需要的空间比较大，所以单独划了一个文件系统。<br/><br/># crfs -v jfs -g rootvg -m /oracle -a size=8196M -a bf=true <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;其中文件系统的类型时JFS的，大小8个G，支持大文件。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;最终的文件系统划分如下：<br/><br/># df -k<br/>Filesystem 1024-blocks Free %Used Iused %Iused Mounted on<br/>/dev/hd4 32768 15580 53% 1727 11% /<br/>/dev/hd2 2097152 865732 59% 31825 7% /usr<br/>/dev/hd9var 262144 246068 7% 373 1% /var<br/>/dev/hd3 524288 507704 4% 34 1% /tmp<br/>/dev/hd1 262144 253748 4% 18 1% /home<br/>/proc - - - - - /proc<br/>/dev/hd10opt 2097152 1981172 6% 981 1% /opt<br/>/dev/lv00 8388608 8125260 4% 17 1% /oracle <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;3 检查系统物理内存<br/><br/># lsattr -E -l sys0 -a realmem<br/>realmem 1048576 Amount of usable physical memory in Kbytes False<br/><br/># lsattr -E -l mem0<br/>goodsize 1024 Amount of usable physical memory in Mbytes False<br/>size 1024 Total amount of physical memory in Mbytes False<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;可以看到，我的系统的物理内存为1G<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;4 检查虚拟内存<br/><br/># lsps -a <br/>Page Space Physical Volume Volume Group Size %Used Active Auto Type<br/>hd6 hdisk0 rootvg 512MB 4 yes yes lv <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;可以看到我的系统原先的虚拟内存为512M，一般需要将其设置成物理内存的两倍大小<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;通过将SWAP分区所在的逻辑分区扩展48个PP的大小，即48*32M=1536M，加上原来的512M正好为2G <br/><br/># extendlv hd6 32<br/># lsps -a<br/>Page Space Physical Volume Volume Group Size %Used Active Auto Type<br/>hd6 hdisk0 rootvg 2048MB 1 yes yes lv <br/><br/>5 检查CPU情况<br/><br/># lsdev -C | grep proc<br/>proc0 Available 00-00 Processor<br/><br/># lsattr -E -l proc0<br/>frequency 450000000 Processor Speed False<br/>smt_enabled false Processor SMT enabled False<br/>smt_threads 0 Processor SMT threads False<br/>state enable Processor state False<br/>type PowerPC_POWER3 Processor type False<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;6 确认系统结构<br/><br/># getconf HARDWARE_BITMODE<br/>64 <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;7 确认安装oracle所需的系统库文件是否安装<br/><br/>lslpp -l bos.adt.base bos.adt.lib bos.adt.libm bos.perf.perfstat <br/>bos.perf.libperfstat bos.perf.proctools bos.adt.prof bos.cifs_fs.rte<br/>Fileset Level State Description <br/>----------------------------------------------------------------------------<br/>Path: /usr/lib/objrepos<br/>bos.adt.base 5.3.0.50 COMMITTED Base Application Development<br/>Toolkit <br/>bos.adt.lib 5.3.0.50 COMMITTED Base Application Development<br/>Libraries <br/>bos.adt.libm 5.3.0.40 COMMITTED Base Application Development<br/>Math Library <br/>bos.adt.prof 5.3.0.50 COMMITTED Base Profiling Support <br/>bos.cifs_fs.rte 5.3.0.50 COMMITTED Runtime for SMBFS <br/>bos.perf.libperfstat 5.3.0.50 COMMITTED Performance Statistics Library<br/>Interface <br/>bos.perf.perfstat 5.3.0.50 COMMITTED Performance Statistics<br/>Interface <br/>bos.perf.proctools 5.3.0.50 COMMITTED Proc Filesystem Tools <br/><br/>Path: /etc/objrepos<br/>bos.cifs_fs.rte 5.3.0.50 COMMITTED Runtime for SMBFS <br/>bos.perf.libperfstat 5.3.0.50 COMMITTED Performance Statistics Library<br/>Interface <br/>bos.perf.perfstat 5.3.0.50 COMMITTED Performance Statistics<br/>Interface <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;如果有库文件没有安装，请使用smitty（CLI）或smit（GUI），根据向导进行安装。<br/><br/>8 对于ORACLE10.2.0.1版本的数据库需要确认系统安装如下补丁：/usr/sbin/instfix -i -k &#34;IY89080&#34;如果补丁没有安装，请使用smitty（CLI）或smit（GUI），根据向导进行安装，打完补丁后，需要重启机器。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;至此，OS部分的安装就完成了。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;/********************<br/>&nbsp;&nbsp;&nbsp;&nbsp;o&#114;ACLE 10.2.0.1安装与配置<br/>&nbsp;&nbsp;&nbsp;&nbsp;********************/<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;1 从oracle官方网站上下载Oracle Database 10g Release 2 （10.2.0.1.0） for AIX5L下载网页链接如下：<a href="http://www.oracle.com/technology/so" target="_blank" rel="external">http://www.oracle.com/technology/so</a>……201aixsoft.html注意下载需要首先注册成为oracle网站的用户<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;现在的文件如下：<br/><br/>10gr2_aix5l64_database.cpio.gz (1,268,576,110 bytes) (cksum - 3772623559)<br/><br/>将下载好的压缩包通过FTP上传到AIX上，并通过如下命令进行解压缩：<br/>gunzip 10gr2_aix5l64_database.cpio.gz<br/>cpio -idcmv &lt; 10gr2_aix5l64_database.cpio.gz<br/><br/>2 创建用户组oinstall和dba<br/>3 创建oracle用户，用户组为oinstall和dba<br/>修改oracle用户的系统限额<br/>vi /etc/security/limits<br/>default:<br/>fsize = -1<br/>core = 2097151<br/>cpu = -1<br/>data = 262144<br/>rss = 65536<br/>stack = 65536<br/>nofiles = 2000<br/><br/>root:<br/><br/>daemon:<br/><br/>bin:<br/><br/>sys:<br/><br/>adm:<br/><br/>uucp:<br/><br/>guest:<br/><br/>nobody:<br/><br/>lpd:<br/><br/>o&#114;acle:<br/>data = -1<br/>stack = -1<br/><br/>修改oracle用户的.pofile文件<br/>o&#114;ACLE_BASE=/oracle;export o&#114;ACLE_BASE<br/>o&#114;ACLE_HOME=$ORACLE_BASE/product/10.2.0; export o&#114;ACLE_HOME<br/>o&#114;ACLE_SID=icdvm;export o&#114;ACLE_SID<br/><br/>PATH=$ORACLE_HOME/bin:$PATH;export PATH<br/>4 以root执行rootpre.sh<br/>5 以oracle用户登陆<br/>export DISPLAY=本机的IP地址:0.0<br/>如<br/>export DISPLAY=192.168.100.167:0.0<br/>然后执行runInstall.sh脚本，根据GUI向导进行oracle的安装<br/> <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;至此，oracle的安装就完成了。<br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2018.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2018</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Aix下使用rman备份oracle数据库]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=11" label="工作随笔" /> 
	  <updated>2009-01-03T20:37:21+08:00</updated>
	  <published>2009-01-03T20:37:21+08:00</published>
		  <summary type="html"><![CDATA[使用rman增量备份，备份策略为：每周四执行零级备份，周五---周三执行1级增量备份，下周四再进行新的零级备份。这样如果需要恢复的话，需要最多的备份数据为 1个零级备份＋6个1级备份＋当天的归档日志。rman零级备份脚本放于/home/oracle/ora0.sh，1级备份位于/home/oracle/ora1.sh 具体内容如下：<br/><br/>零级备份<br/><br/>#!/bin/sh<br/><br/>echo &#34;start&#34;; date<br/><br/>#env<br/><br/>o&#114;ACLE_BASE=/oracle/app/oracle<br/><br/>export o&#114;ACLE_BASE<br/><br/>o&#114;ACLE_HOME=/oracle/app/oracle/product/9.2.0<br/><br/>export o&#114;ACLE_HOME<br/><br/>o&#114;ACLE_SID=XXX<br/><br/>export o&#114;ACLE_SID<br/><br/>o&#114;ACLE_NLS33=$ORACLE_HOME/ocommon/nls/admin/data<br/><br/>export o&#114;ACLE_NLS33<br/><br/>LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib<br/><br/>export LD_LIRARY_PATH<br/><br/>PATH=/usr/css/sbin:$ORACLE_HOME/bin:/usr/bin:$PATH<br/><br/>export PATH<br/><br/>LANG=en_US<br/><br/>export LANG<br/><br/> <br/><br/>#backup<br/><br/>$ORACLE_HOME/bin/rman&lt;&lt;EOF<br/><br/>connect target<br/><br/> <br/><br/>run <br/><br/>{<br/><br/>allocate channel c1 device type disk ;<br/><br/>allocate channel c2 device type disk ;<br/><br/>allocate channel c3 device type disk ;<br/><br/>backup incremental level 0 database tag &#39;dbL0&#39; format &#39;/share1/backup/dbkup_%d_%T_%U_L0&#39;;<br/><br/>sql &#39;alt&#101;r system archive log current&#39; ;<br/><br/>backup archivelog all del&#101;te input format &#39;/share2/arcbkup/arcbkup/arc_%d_%T_%U_L0&#39;;<br/><br/>release channel c1;<br/><br/>release channel c2;<br/><br/>release channel c3;<br/><br/>}<br/><br/>exit;<br/><br/>EOF<br/><br/>echo &#34;end&#34;; date<br/><br/> <br/><br/>1级备份<br/><br/>#!/bin/sh<br/><br/>echo &#34;start&#34;; date<br/><br/>#env<br/><br/>o&#114;ACLE_BASE=/oracle/app/oracle<br/><br/>export o&#114;ACLE_BASE<br/><br/>o&#114;ACLE_HOME=/oracle/app/oracle/product/9.2.0<br/><br/>export o&#114;ACLE_HOME<br/><br/>o&#114;ACLE_SID=XXX<br/><br/>export o&#114;ACLE_SID<br/><br/>o&#114;ACLE_NLS33=$ORACLE_HOME/ocommon/nls/admin/data<br/><br/>export o&#114;ACLE_NLS33<br/><br/>LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib<br/><br/>export LD_LIRARY_PATH<br/><br/>PATH=/usr/css/sbin:$ORACLE_HOME/bin:/usr/bin:$PATH<br/><br/>export PATH<br/><br/>LANG=en_US<br/><br/>export LANG<br/><br/> <br/><br/>#backup<br/><br/>$ORACLE_HOME/bin/rman&lt;&lt;EOF<br/><br/>connect target<br/><br/>run <br/><br/>{<br/><br/>allocate channel c1 device type disk ;<br/><br/>allocate channel c2 device type disk ;<br/><br/>allocate channel c3 device type disk ;<br/><br/>backup incremental level 1 database tag &#39;dbL1&#39; format &#39;/share1/backup/dbkup_%d_%T_%U_L1&#39;;<br/><br/>sql &#39;alt&#101;r system archive log current&#39; ;<br/><br/>backup archivelog all del&#101;te input format &#39;/share2/arcbkup/arcbkup/arc_%d_%T_%U_ L1&#39;;<br/><br/>release channel c1;<br/><br/>release channel c2;<br/><br/>release channel c3;<br/><br/>}<br/><br/>exit;<br/><br/>EOF<br/><br/>echo &#34;end&#34;;date<br/><br/> <br/><br/> <br/><br/> <br/><br/>在cron任务中定时实现定时备份，即加入以下条目<br/><br/>0 1 * * 0,1,2,3,5,6 /home/oracle/ora1.sh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每天（除周四）凌晨1点执行一级备份<br/><br/>0 0 * * 4 /home/oracle/ora0.sh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;每周四0点执行0级备份<br/><br/> <br/><br/> <br/><br/>数据库全备份路径是在 /share1/backup<br/><br/> <br/><br/>数据库归档日志路径分别为/share2/archive/archive1；/share2/archive/archive2<br/><br/>（该目录文件请不要使用rm命令删除）<br/><br/> <br/><br/>数据库归档日志备份路径为/share2/arcbkup/arcbkup<br/><br/>数据库控制文件自动备份路径为 /share1/spbkup<br/><br/> <br/><br/>以下是数据库全备份脚本：<br/><br/>rman备份脚本放于/home/oracle/backup.sh，具体内容如下：<br/><br/>#!/bin/sh<br/><br/>echo &#34;start&#34;; date<br/><br/>#env<br/><br/>o&#114;ACLE_BASE=/oracle/app/oracle<br/><br/>export o&#114;ACLE_BASE<br/><br/>o&#114;ACLE_HOME=/oracle/app/oracle/product/9.2.0<br/><br/>export o&#114;ACLE_HOME<br/><br/>o&#114;ACLE_SID=XXX<br/><br/>export o&#114;ACLE_SID<br/><br/>o&#114;ACLE_NLS33=$ORACLE_HOME/ocommon/nls/admin/data<br/><br/>export o&#114;ACLE_NLS33<br/><br/>LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib<br/><br/>export LD_LIRARY_PATH<br/><br/>PATH=/usr/css/sbin:$ORACLE_HOME/bin:/usr/bin:$PATH<br/><br/>export PATH<br/><br/>LANG=en_US<br/><br/>export LANG<br/><br/> <br/><br/>#backup<br/><br/>$ORACLE_HOME/bin/rman&lt;&lt;EOF<br/><br/>connect target<br/><br/> <br/><br/>run<br/><br/>{<br/><br/>allocate channel c1 device type disk;<br/><br/>backup database format &#39;/share1/backup/dbkup_%d_%T_%U&#39;;<br/><br/>sql &#39;alt&#101;r system archive log current&#39;;<br/><br/>backup archivelog all del&#101;te input format &#39;/share2/arcbkup/arcbkup/arc_%d_%T_%U&#39;;<br/><br/>}<br/><br/>exit;<br/><br/>EOF<br/><br/>echo &#34;end&#34;; date<br/><br/> <br/><br/>在cron任务中定时实现定时备份，即加入这一条目<br/><br/>0 1 10 * * /home/oracle/backup.sh&nbsp;&nbsp;即在每月10号凌晨1点运行备份脚本。<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2017.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2017</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[在小机（例如AIX主机）上如何进行定期的Oracle备份 ]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=11" label="工作随笔" /> 
	  <updated>2009-01-03T20:15:53+08:00</updated>
	  <published>2009-01-03T20:15:53+08:00</published>
		  <summary type="html"><![CDATA[1.建立一个名为backup.sh的脚本文件<br/> <br/>2.保存文件内容如下所示：（具体内容，请视自已情况而定)<br/> <br/>#setup backup directory and backup file format<br/>export backup_dir=/tmp<br/>export expfile=newemos.`date &#39;+%Y_%m_%d_%H_%M&#39;`.dmp<br/>find /oracle/backupdb/*.Z -mtime +7 -exec rm -f {} \;<br/>#remove old files,keep 10 copys<br/>exp cent/cent file=$backup_dir/$expfile compress=y log=n<br/>compress $backup_dir/$expfile<br/><br/> <br/>3.将上面的backup.sh加入到crontab中(例如下面的例子)<br/>1 2 * * *&nbsp;&nbsp;su o&#114;acle &#34;/home/oracle/backupdb.sh&#34;<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2016.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2016</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[AIX下oracle的自动备份 ]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=11" label="工作随笔" /> 
	  <updated>2009-01-03T20:10:21+08:00</updated>
	  <published>2009-01-03T20:10:21+08:00</published>
		  <summary type="html"><![CDATA[1． 建立自动备份的脚本文件： <br/>备份计划为：每周为一个循环，每周的每一天的夜里12：00执行备份，备份文件为7个，分别是周一到周日的数据文件，只保留最近一周的文件； <br/>脚本文件如下： <br/>文件名：backup1.sh&nbsp;&nbsp;（周一所执行的文件） <br/>o&#114;ACLE_HOME=/home/oracle/OraHome1; <br/>export o&#114;ACLE_HOME; <br/>o&#114;ACLE_SID=hrdbs; <br/>export o&#114;ACLE_SID; <br/>rm -f /HRBACKUP/hrdbs_backup1.dmp; <br/>/home/oracle/OraHome1/bin/exp hr/hrcc file=/HRBACKUP/hrdbs_backup1.dmp; <br/>其他文件，backup2.sh ,backup3.sh 等等，和这个文件大致一样，只是具体的备份文件名不同； <br/><br/>脚本建立完成之后，放在oracle的安装目录下/home/oracle/OraHome1 <br/>然后改变这些文件的执行权限： <br/>chmod +x backup1.sh <br/><br/><br/>2． 给用户oracle分配crontab的权限； <br/>使用超级用户（root）的身份登录，在/usr/var/adm/cron下通过vi命令查看cron.deny文 <br/>件，如果数据库的拥有者oracle被列在里面，将其删除即可； <br/>然后建立cron.allow文件，文件中只用填写oracle即可； <br/>&nbsp;&nbsp;<br/>3． 建立自动调度的脚本文件； <br/>用oracle用户登录，通过使用命令crontab -e o&#114;acle开始建立oracle用户的Crontab文件； <br/>该文件全文如下： <br/>00 00 * * 0 /home/oracle/OraHome1/backup7.sh <br/>00 00 * * 1 /home/oracle/OraHome1/backup1.sh <br/>00 00 * * 2 /home/oracle/OraHome1/backup2.sh <br/>00 00 * * 3 /home/oracle/OraHome1/backup3.sh <br/>00 00 * * 4 /home/oracle/OraHome1/backup4.sh <br/>00 00 * * 5 /home/oracle/OraHome1/backup5.sh <br/>00 00 * * 6 /home/oracle/OraHome1/backup6.sh<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2015.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2015</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Cisco 2821 webvpn CSD 测试,分享 ]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2008-12-29T16:58:20+08:00</updated>
	  <published>2008-12-29T16:58:20+08:00</published>
		  <summary type="html"><![CDATA[Building configuration…<br/>Current configuration : 18090 bytes<br/>!<br/>version 12.4<br/>service timestamps debug datetime msec<br/>service timestamps log datetime msec<br/>no service password-encryption<br/>service sequence-numbers<br/>!<br/>hostname ROUTE01<br/>!<br/>boot-start-marker<br/>boot-end-marker<br/>!<br/>logging buffered 4096 debugging<br/>enable password ROUTE<br/>!<br/>aaa new-model<br/>!<br/>!<br/>aaa authentication login default local<br/>##################################### 生成一个证书##<br/>crypto pki trustpoint WEBVPN<br/>enrollment selfsigned<br/>subject-name CN=WEBVPN OU=cookbooks O=oreilly<br/>revocation-check crl<br/>rsakeypair WEBVPN 1024<br/>!<br/>!<br/>crypto pki certificate chain WEBVPN<br/>certificate self-signed 01<br/>&nbsp;&nbsp;3082028A 308201F3 A0030201 02020101 300D0609 2A864886 F70D0101 04050030<br/>&nbsp;&nbsp;4F312630 24060355 0403131D 57454256 504E204F 553D636F 6F6B626F 6F6B7320<br/>&nbsp;&nbsp;4F3D6F72 65696C6C 79312530 2306092A 864886F7 0D010902 16167379 73746563<br/>&nbsp;&nbsp;30312E73 79737465 632E636F 6D2E636E 301E170D 30373035 31333033 35343036<br/>&nbsp;&nbsp;5A170D32 30303130 31303030 3030305A 304F3126 30240603 55040313 1D574542<br/>&nbsp;&nbsp;56504E20 4F553D63 6F6F6B62 6F6F6B73 204F3D6F 7265696C 6C793125 30230609<br/>&nbsp;&nbsp;2A864886 F70D0109 02161673 79737465 6330312E 73797374 65632E63 6F6D2E63<br/>&nbsp;&nbsp;6E30819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281 8100B9EE<br/>&nbsp;&nbsp;403620EA DBE9ADAE 7DADB669 7A7D358E A5EA2782 AEEDB567 1E95DCF1 59104E9C<br/>&nbsp;&nbsp;256BBBEA AD4DA3D1 BDCED580 57AEC29F C5B251CC FF4F7A2E D13DC321 1D00104F<br/>&nbsp;&nbsp;15042194 B4899B40 8ADEDA30 CED3AB59 B9A2E0EA 3AB9741A 5DFB0261 815063F2<br/>&nbsp;&nbsp;AE1F3394 5EE04716 BC9A79C2 E43D3373 EE89E15B 47E9F9DA D153A3BD 64C70203<br/>&nbsp;&nbsp;010001A3 76307430 0F060355 1D130101 FF040530 030101FF 30210603 551D1104<br/>&nbsp;&nbsp;1A301882 16737973 74656330 312E7379 73746563 2E636F6D 2E636E30 1F060355<br/>&nbsp;&nbsp;1D230418 30168014 C5B5FEEB 0A0F1D9B 10E0F444 DFA08C39 99DC6756 301D0603<br/>&nbsp;&nbsp;551D0E04 160414C5 B5FEEB0A 0F1D9B10 E0F444DF A08C3999 DC675630 0D06092A<br/>&nbsp;&nbsp;864886F7 0D010104 05000381 81009A0A E61339DB 9C9DCA09 728515CC 89A0C393<br/>&nbsp;&nbsp;C423776E FA290522 45F2C7F5 42CD9610 D94A872D 7687FC88 CC7D2E93 EB235F26<br/>&nbsp;&nbsp;BAD10D26 3D770DF0 103FFFDE A8186ABF DD909555 604EF479 7A28E2C3 688A32C4<br/>&nbsp;&nbsp;230DE7A7 7165ED46 36734F14 07A58260 DDA1C399 198250FD 85DCFDA2 C1A710FD<br/>&nbsp;&nbsp;AC6B7B76 48806C84 12FE9E07 829F<br/>&nbsp;&nbsp;quit<br/>username test privilege 15 view root secret 5 $1$R5hB$/Ov8NvnjYYRC3YT9/33Xu/<br/>username cnq privilege 15 secret 5 $1$ql/A$0JMuxQV8NoeApNNXaDEWN.<br/><br/>interface GigabitEthernet0/0<br/>ip address 192.168.0.1 255.255.255.0<br/>ip nat inside<br/><br/>interface GigabitEthernet0/1<br/>ip address 11.11.11.86 255.255.255.0<br/>ip nat outside<br/>ip local pool ssl-user 192.168.0.160 192.168.0.170<br/>ip route 0.0.0.0 0.0.0.0 11.11.11.1<br/><br/>control-plane<br/>!<br/>line con 0<br/>line aux 0<br/>line vty 0 4<br/>line vty 5 15<br/>!<br/>#####################################建立gateway,指定监听webvpn的IP和接口，加密算法，这里我建了2个gateway##<br/>webvpn gateway ROUTE<br/>ip address 11.11.11.86 port 443<br/>ssl encryption 3des-sha1<br/>ssl trustpoint WEBVPN<br/>inservice<br/>!<br/>webvpn gateway test<br/>ip address 11.11.11.86 port 4433<br/>ssl encryption 3des-sha1<br/>ssl trustpoint WEBVPN<br/>inservice<br/>!<br/>#####################################安装ssl和CSD##<br/>webvpn install svc flash:/webvpn/svc.pkg<br/>!<br/>webvpn install csd flash:/webvpn/sdesktop.pkg<br/>!<br/>webvpn context Default_context<br/>ssl authenticate verify all<br/>!<br/>no inservice<br/>!<br/>!<br/>#####################################建立context,并和gateway关联, 指定加密算法，这里也建了2个context，分别和gateway关联##<br/>webvpn context ROUTE<br/>title “ROUTE”<br/>ssl encryption 3des-sha1<br/>ssl trustpoint WEBVPN<br/>ssl authenticate verify all<br/>!<br/>!<br/>policy group ROUTE<br/>&nbsp;&nbsp; functions svc-enabled<br/>&nbsp;&nbsp; svc address-pool “ssl-user”<br/>default-group-policy ROUTE<br/>gateway ROUTE<br/>csd enable<br/>inservice<br/>!<br/>!<br/>webvpn context test<br/>title “test”<br/>ssl encryption 3des-sha1<br/>ssl trustpoint WEBVPN<br/>ssl authenticate verify all<br/>!<br/>url-list “printer”<br/>&nbsp;&nbsp; url-text “printer” url-value “<a href="http://192.168.0.254" target="_blank" rel="external">http://192.168.0.254</a>”<br/>!<br/>nbns-list ROUTEftp<br/>&nbsp;&nbsp; nbns-server 192.168.0.254<br/>!<br/>port-forward “test”<br/>&nbsp;&nbsp; local-port 2323 remote-server “192.168.0.2″ remote-port 23 description “teslnet”<br/>!<br/>policy group test<br/>&nbsp;&nbsp; url-list “printer”<br/>&nbsp;&nbsp; port-forward “test”<br/>&nbsp;&nbsp; nbns-list “ROUTEftp”<br/>&nbsp;&nbsp; functions file-access<br/>&nbsp;&nbsp; functions file-browse<br/>&nbsp;&nbsp; functions file-entry<br/>default-group-policy test<br/>gateway test<br/>inservice<br/>!<br/>!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>end<br/><br/>#####################################一些show 的输出结果##<br/>ROUTE01#show webvpn context<br/>Codes: AS - Admin Status, OS - Operation Status<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VHost - Virtual Host<br/>Context Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gateway&nbsp;&nbsp;Domain/VHost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VRF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AS&nbsp;&nbsp;&nbsp;&nbsp;OS<br/>————&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;——-&nbsp;&nbsp;————&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;——-&nbsp;&nbsp;—-&nbsp;&nbsp;——–<br/>Default_context&nbsp;&nbsp;&nbsp;&nbsp; n/a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n/a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n/a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;down&nbsp;&nbsp;down<br/>ROUTE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ROUTE&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;up&nbsp;&nbsp;&nbsp;&nbsp;up&nbsp;&nbsp;<br/>test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;up&nbsp;&nbsp;&nbsp;&nbsp;up&nbsp;&nbsp;<br/>ROUTE01#show webvpn context ROUTE<br/>Admin Status: up<br/>Operation Status: up<br/>CSD Status: Enabled<br/>Certificate authentication type: All attributes (like CRL) are verified<br/>AAA Authentication List not configured<br/>AAA Authentication Domain not configured<br/>Default Group Policy: ROUTE<br/>Associated WebVPN Gateway: ROUTE<br/>Domain Name and Virtual Host not configured<br/>Maximum Users Allowed: 10000 (default)<br/>NAT Address not configured<br/>VRF Name not configured<br/>ROUTE01#show webvpn context test&nbsp;&nbsp;<br/>Admin Status: up<br/>Operation Status: up<br/>CSD Status: Disabled<br/>Certificate authentication type: All attributes (like CRL) are verified<br/>AAA Authentication List not configured<br/>AAA Authentication Domain not configured<br/>Default Group Policy: test<br/>Associated WebVPN Gateway: test<br/>Domain Name and Virtual Host not configured<br/>Maximum Users Allowed: 10000 (default)<br/>NAT Address not configured<br/>VRF Name not configured<br/>ROUTE01#show webvpn gateway ROUTE<br/>Admin Status: up<br/>Operation Status: up<br/>IP: 11.11.11.86, port: 443<br/>SSL Trustpoint: WEBVPN<br/>ROUTE01#show webvpn gateway test&nbsp;&nbsp;<br/>Admin Status: up<br/>Operation Status: up<br/>IP: 11.11.11.86, port: 4433<br/>SSL Trustpoint: WEBVPN<br/>ROUTE01#show webvpn gateway<br/>Gateway Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Admin&nbsp;&nbsp;Operation<br/>————&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; —–&nbsp;&nbsp;———<br/>ROUTE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; up&nbsp;&nbsp;&nbsp;&nbsp; up&nbsp;&nbsp;<br/>test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; up&nbsp;&nbsp;&nbsp;&nbsp; up&nbsp;&nbsp;<br/><br/>ROUTE01#show webvpn install status svc<br/>SSLVPN Package SSL-VPN-Client version installed:<br/>CISCO STC win2k+ 1.0.0<br/>1,1,2,169<br/>Wed 09/13/2006 14:53:38.43 ^D<br/>ROUTE01#show webvpn install status csd<br/>SSLVPN Package Cisco-Secure-Desktop version installed:<br/>CISCO CSD IOS<br/>3,1,1,27<br/>Wed 02/15/2006 12:51:25.57 T<br/>ROUTE01#<br/>ROUTE01#<br/>ROUTE01#<br/>ROUTE01# show ve<br/>Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9-M), Version 12.4(6)T, RELEASE SOFTWARE (fc1)<br/>Technical Support: <a href="http://www.cisco.com/techsupport" target="_blank" rel="external">http://www.cisco.com/techsupport</a><br/>Copyright (c) 1986-2006 by Cisco Systems, Inc.<br/>Compiled Wed 22-Feb-06 22:54 by ccai<br/>ROM: System Bootstrap, Version 12.3(8r)T7, RELEASE SOFTWARE (fc1)<br/>ROUTE01 uptime is 3 days, 6 hours, 15 minutes<br/>System returned to ROM by error - a Software forced crash, PC 0×4008D9FC at 09:37:54 GMT Thu May 10 2007<br/>System image file is “flash:c2800nm-adventerprisek9-mz.124-6.T.bin”<br/><br/>This product contains cryptographic features and is subject to United<br/>States and local country laws governing import, export, transfer and<br/>use. Delivery of Cisco cryptographic products does not imply<br/>third-party authority to import, export, distribute o&#114; use encryption.<br/>Importers, exporters, distributors and users are responsible for<br/>compliance with U.S. and local country laws. By using this product you<br/>agree to comply with applicable laws and regulations. If you are unable<br/>to comply with U.S. and local laws, return this product immediately.<br/>A summary of U.S. laws governing Cisco cryptographic products may be found at:<br/><a href="http://www.cisco.com/wwl/export/crypto/tool/stqrg.html" target="_blank" rel="external">http://www.cisco.com/wwl/export/crypto/tool/stqrg.html</a><br/>If you require further assistance please contact us by sending email to<br/>export@cisco.com.<br/>Cisco 2821 (revision 53.51) with 237568K/24576K bytes of memory.<br/>Processor board ID FHK0928F0K2<br/>2 Gigabit Ethernet interfaces<br/>1 Virtual Private Network (VPN) Module<br/>DRAM configuration is 64 bits wide with parity enabled.<br/>239K bytes of non-volatile configuration memory.<br/>62592K bytes of ATA CompactFlash (Read/Write)<br/>Configuration register is 0×2102<br/><br/>如果建立ssl vpn后，原来的443就占用了，这时如果想要再使用SDM，只剩80端口了，没有了加密，其实还有一个办法把443端口转换一下，做个NAT，<br/>先建一个loopback接口，然后再做NAT，把loopback的443静态转换成公网的一个其它端口，这是用SDM的时候，学到的。<br/>interface loopback1<br/>ip address 192.168.2.1 255.255.255.255<br/>ip nat inside source static tcp 192.168.2.1 80 218.20.56.86 4443<br/><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2013.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2013</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[SHOW PROCE CPU命令详解]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2008-12-11T20:43:58+08:00</updated>
	  <published>2008-12-11T20:43:58+08:00</published>
		  <summary type="html"><![CDATA[现代操作系统的两大功能：硬件控制和资源管理。 <br/>同时运行多个程序就是多任务。支持这种的就是多任务操作系统。多个程序中的一个子程序叫做一个线程。<br/>每一个线程都有一个cpu注册值，这个值叫做context=上下文。但是可以共与其他线程享内存地址空间，占有相同地址空间的一组线程叫做进程。<br/>一个进程控制一个子集的操作系统资源。操作系统和cpu都支持虚拟内存，每个进程都可能运行在分离的地址空间，用来保护其他进程。R&gt;决定运行哪个进程，这叫做预留。预留经常是由一个操作系统的核心来做的，这个叫做内核。<br/>一个操作系统会使用多个手段来预留线程。这也取决于操作系统的可选支持情况。<br/>先进、先出是一个最简单的方式。它所占负载很小。是公平的：即所有的线程都均等，先来，就先服务。FIFO。<br/>FIFO不适合实时的交互处理应用，实时处理需要快速、低cpuzu占用率<br/>一种可能的解决方法是给每个进程机遇应用地绑定优先级，保证实时应用先占用cpu。<br/>预约方式利用争抢来取代运行完整的，这个叫做争适者生存。这种操作系统叫做适者生存的多任务操作系统。<br/>注意：上下文交换发生生在操作系统内核从cpu删除一个线程，且把其他线程填进来的时候。换<br/>言之，上下文交换发生在电脑在当前工作下改变任务的<br/>时候上下文交换可以使安静的执行在cpu时间的术语中，因为所有的处理器注册器必须保存给开<br/>始拿掉cpu和还原给一开始放入cpu的线程。上下文本质是让争抢线程知道谁离开了，并让正要运行的线程知道上一个进程持续的时间 <br/>多任务争抢的好处是：他是周期性的。<br/>他是难以打破的，没有谁可以垄断资源。<br/>缺点是：他不如全运行完的方式有效利用。他加大了软件应用的复杂性。<br/>show process Command 详细解释：<br/>CPU utilization for five seconds: 98%/65%; one minute: 87%; five minutes: 49%<br/>PID QTy PC Runtime (ms) Invoked uSecs Stacks TTY Process<br/>1 Csp 602F5488 4 472 8 2624/3000 0 Load Meter <br/>2 ME 60542634 3192 4261 749 7756/9000 0 OSPF Hello <br/>3 Lst 602E0E00 1408 278 5064 5632/6000 0 Check heaps <br/>4 Cwe 602D85E0 0 1 0 5572/6000 0 Chunk Manager <br/>5 Cwe 602E6AA8 4 11 363 5620/6000 0 Pool Manager <br/>6 Mst 6025F148 0 2 0 5588/6000 0 Timers <br/>7 Mwe 6001D610 0 3 0 5476/6000 0 Serial Backgroun<br/>8 Mwe 60326EE0 0 1 011608/12000 0 OIR Handler <br/>9 Msi 6033B2D0 0 80 0 5612/6000 0 Environmental mo<br/>10 Lwe 6033D0A8 2272 298 7624 4916/6000 0 ARP Input <br/>11 Mwe 604D0180 0 4 0 5544/6000 0 DDR Timers <br/>12 Mwe 604E67A8 0 2 011596/12000 0 Dialer event <br/>13 Lwe 60638AE8 12 2 6000 5592/6000 0 Entity MIB API <br/>14 Mwe 600218D8 0 1 0 5632/6000 0 SERIAL A&#39;detect <br/>15 Cwe 602EBBB0 0 1 0 5636/6000 0 Critical Bkgnd <br/>16 Mwe 602B0370 172 1599 10710720/12000 0 Net Background <br/>17 Lwe 602544C8 4 27 14811404/12000 0 Logger <br/>18 Msp 602722D8 124 2348 52 5424/6000 0 TTY Background <br/>19 Msp 602AF8F0 24 2358 10 5756/6000 0 Per-Second Jobs <br/>20 Msi 60333560 68 2352 28 5616/6000 0 Partition Check <br/>21 Hwe 602AFB64 10792 15682 688 5608/6000 0 Net Input <br/>--More-- _<br/>• PID— 进程描述号. 每一个进程都有一个单独的数字来描述和与其他的进程相区分. <br/>• Qty— 进程优先级和进程的状态. 第一个字母的优先级含义如下: <br/>o K— 没有优先级，进程被杀了。 <br/>o D— 没有优先级，进程瘫了. <br/>o X— 没有优先级, 进程中断了. <br/>o C— 紧急优先级 <br/>o H— 高优先级. <br/>o M— 中优先级. <br/>o L— 低优先级. <br/>剩下的两个字母代表当前的处理状态: <br/>o *— cpu正在处理. <br/>o E— 进程正在等待一个重要动作. <br/>o S— 进程休眠了. <br/>o rd— 进程已经在运行了. <br/>o we— 进程idle了, 等待一个重要动作. <br/>o sa— 进程idle了, 等待一个指定的绝对时间的产生. <br/>o si— 进程idle了,等待一个指定的时间间隔. <br/>o sp— 进程idle了, 等待一个指定的时间间隔(周期性的). <br/>o st— 进程idle了,等待一个时间终止. <br/>o hg— 进程挂起了. <br/>o xx— 进程死了. <br/>• PC— 当进程持续放弃cpu时程序计数注册器的内容. 这个地方写的是内存的地址用以代表进程开始执行写一次占用的cpu.值0代表正在运行. <br/>• Runtime— 使用cpu累计时间 (毫秒级). <br/>• Invoked— 进程的建立起进程运行在cpu的总时间<br/>• uSecs— 每次进程使用平均cpu时间 (毫秒级). <br/>• Stacks— 堆叠空间使用状况. 斜线右边的数字(/)表示总的堆叠空间。 左边的数字代表空间利用率的最低水平线. <br/>• TTY— 控制台设备相关的进程.0代表进程不是被控制台和通讯器相关的主系统控制台<br/>• Process— 进程的名字.进程的名字不需要是唯一的 (一个进程的几分拷贝可以同时是激活状态的). 但是进程id号必须是唯一的。. <br/>如果你运行了show processs命令在几个不同的ios系统, 你会发现有几个进程一直都有. 这些进程中的大多数 是用来执行家务管理的或者是提供服务给其他的进程. <br/>普通常见系统进程和他们的功能。 <br/>系统进程代号 功能<br/>EXEC console和异步口直接tty上来的命令行 (CLI). EXEC 进程提供用户 输入和对接口粘贴的支持。<br/>Pool manager 管理缓冲池 <br/>Check heaps 周期性地确认 IOS代码运行时间的完整性 以及结构化内存的负载。<br/>Per-minute jobs 一般系统进程，每60秒进行一次系统维护, 如 检查系统背景进程的堆叠<br/>Per-second jobs 一般系统进程，用以运行每秒都要重复的工作. <br/>Critical background 紧急优先级进程， 用来执行基本的系统服务, 如：当队列元素被用尽的时候，预留附加的IOS 队列元素 。<br/>Net background 发送接口keepalive包, 非扼杀端口, 和进程接口状态的改变. <br/>Logger 查找消息 (debug, error, and informational) 通过内核排队 由其他进程并 输出他们到控制台 以及可选的syslog服务器. <br/>TTY background 管理直接通过tty异步连接上来的 激活的和启动&#34;EXEC&#34;进程让他们去激活<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2012.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2012</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Translate Multiple Global IP to a Single Local IP ]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2008-12-04T10:20:04+08:00</updated>
	  <published>2008-12-04T10:20:04+08:00</published>
		  <summary type="html"><![CDATA[<img src="http://www.ciscobug.cn/attachments/month_0812/o2008124101957.gif" border="0" alt=""/><br/><br/>ciscoasa(config)#show run<br/>: Saved<br/>:<br/>ASA Version 7.2(2)<br/>!<br/>hostname ciscoasa<br/>enable password 8Ry2YjIyt7RRXU24 encrypted<br/>names<br/>!<br/>interface GigabitEthernet0/0<br/> nameif outside<br/> security-level 0<br/> ip address 172.16.171.124 255.255.255.0<br/>!<br/>interface GigabitEthernet0/1<br/> nameif inside<br/> security-level 100<br/> ip address 192.168.100.1 255.255.255.0<br/>!<br/>interface GigabitEthernet0/2<br/> shutdown<br/> no nameif<br/> no security-level<br/> no ip address<br/>!<br/>interface GigabitEthernet0/3<br/> shutdown<br/> no nameif<br/> no security-level<br/> no ip address<br/>!<br/>interface Management0/0<br/> nameif management<br/> security-level 100<br/> ip address 192.168.1.1 255.255.255.0<br/> management-only<br/>!<br/>passwd 2KFQnbNIdI.2KYOU encrypted<br/>ftp mode passive<br/><br/><br/><br/><i><span style="color:Blue">!--- policy_nat_web1 and policy_nat_web2 are two access-lists that match the source <br/>!--- address we want to translate on.&nbsp;&nbsp;Two access-lists are required, though they<br/>!--- can be exactly the same.</span></i><br/><br/><br/><strong>access-list policy_nat_web1 extended permit ip host 192.168.100.50 any<br/>access-list policy_nat_web2 extended permit ip host 192.168.100.50 any</strong><br/><br/><br/><span style="color:Blue"><i>!--- The inbound_outside access-list defines the security policy, as previously described.<br/>!--- This access-list is applied inbound to the outside interface.</i></span><br/><br/><br/><strong>access-list inbound_outside extended permit tcp 172.16.171.0 255.255.255.0 <br/>&nbsp;&nbsp; host 192.168.100.50 eq www<br/>access-list inbound_outside extended permit icmp 172.16.171.0 255.255.255.0 <br/>&nbsp;&nbsp; host 192.168.100.50 echo-reply<br/>access-list inbound_outside extended permit icmp 172.16.171.0 255.255.255.0 <br/>&nbsp;&nbsp; host 192.168.100.50 echo<br/>access-list inbound_outside extended permit tcp any host 172.16.171.125 eq www<br/>access-list inbound_outside extended permit icmp any host 172.16.171.125 echo-reply<br/>access-list inbound_outside extended permit icmp any host 172.16.171.125 echo</strong><br/>pager lines 24<br/>logging asdm informational<br/>mtu management 1500<br/>mtu inside 1500<br/>mtu outside 1500<br/>no failover<br/>icmp unreachable rate-limit 1 burst-size 1<br/>no asdm history enable<br/>arp timeout 14400<br/><br/><br/><span style="color:Blue"><i>!--- This first static allows users to reach the translated global IP address of the <br/>!--- web server.&nbsp;&nbsp;Since this static appears first in the configuration, for connections<br/>!--- initiated outbound from the internal web server, the ASA translates the source<br/>!--- address to 172.16.171.125.</i></span><br/><br/><br/><strong>static (inside,outside) 172.16.171.125&nbsp;&nbsp;access-list policy_nat_web1</strong><br/><br/><br/><span style="color:Blue"><i>!--- The second static allows networks to access the web server by its private <br/>!--- IP address of 192.168.100.50.</i></span><br/><br/><br/><br/><strong>static (inside,outside) 192.168.100.50&nbsp;&nbsp;access-list policy_nat_web2</strong><br/><br/><br/><span style="color:Blue"><i>!--- Apply the inbound_outside access-list to the outside interface.</i></span><br/><br/><br/><strong>access-group inbound_outside in interface outside</strong><br/><br/>route outside 0.0.0.0 0.0.0.0 172.16.171.1 1<br/>timeout xlate 3:00:00<br/>timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02<br/>timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00<br/>timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00<br/>timeout uauth 0:05:00 absolute<br/>http server enable<br/>http 192.168.1.0 255.255.255.0 management<br/>no snmp-server location<br/>no snmp-server contact<br/>snmp-server enable traps snmp authentication linkup linkdown coldstart<br/>telnet timeout 5<br/>ssh timeout 5<br/>console timeout 0<br/>!<br/>class-map inspection_default<br/> match default-inspection-traffic<br/>!<br/>!<br/>policy-map type inspect dns preset_dns_map<br/> parameters<br/>&nbsp;&nbsp;message-length maximum 512<br/>policy-map global_policy<br/> class inspection_default<br/>&nbsp;&nbsp;inspect dns preset_dns_map<br/>&nbsp;&nbsp;inspect ftp<br/>&nbsp;&nbsp;inspect h323 h225<br/>&nbsp;&nbsp;inspect h323 ras<br/>&nbsp;&nbsp;inspect rsh<br/>&nbsp;&nbsp;inspect rtsp<br/>&nbsp;&nbsp;inspect esmtp<br/>&nbsp;&nbsp;inspect sqlnet<br/>&nbsp;&nbsp;inspect skinny<br/>&nbsp;&nbsp;inspect sunrpc<br/>&nbsp;&nbsp;inspect xdmcp<br/>&nbsp;&nbsp;inspect sip<br/>&nbsp;&nbsp;inspect netbios<br/>&nbsp;&nbsp;inspect tftp<br/>!<br/>service-policy global_policy global<br/>prompt hostname context]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2011.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2011</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[PIX、NETSCREEN、ASA防火墙功能实现比较]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2008-12-04T10:09:57+08:00</updated>
	  <published>2008-12-04T10:09:57+08:00</published>
		  <summary type="html"><![CDATA[<p><strong><font face="宋体">一、<br />
<font style="font-size: 12pt">功能比较</font></font></strong><br />
<font face="宋体 "><font style="font-size: 12pt">从以下八个方面对PIX、NETSCREEN和ASA防火墙功能做一功能描述和比较：</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">1、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">内网<span class="t_tag" href="tag.php?name=%B0%B2%C8%AB" onclick="tagshow(event)">安全</span>领域主动访问外网及DMZ非<span class="t_tag" href="tag.php?name=%B0%B2%C8%AB" onclick="tagshow(event)">安全</span>领域</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过定义区域的安全优先级来实现高安全优先级对低安全优先级的主动任意访问。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过区域策略实现安全区域对非安全区域的主动访问。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙: 通过定义区域的安全优先级来实现高安全优先级对低安全优先级的主动访问，但ICMP需要双相开通相应策略。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">2、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">外网对内网及DMZ区提供的专项服务的访问。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过静态映射（static）和策略（conduit）来实现外网对内网及DMZ专项服务的访问限制。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过对外网端口MIP和访问策略（set policy）来实现外网对内网及DMZ专项服务的访问限制。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙: 通过静态映射（static (inside,outside)）和策略（access-list）来实现外网对内网及DMZ专项服务的访问限制。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">3、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">内网地址转换</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过映射命令（net、global）来实现内网地址的转换。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过对外网端口MIP、VIP和DIP实现内部地址的转换。 </font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过映射命令（net、global）来实现内网地址的转换。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">对于同一个地址访问不同目的地时所转换地址不同的应用需求，ASA使用策略<span class="t_tag" href="tag.php?name=NAT" onclick="tagshow(event)">NAT</span>实现：</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">access-list inside_pnat_outbound_V1 extended permit ip host 2.6.6.7 host 2.6 .5.218</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">nat (inside) 38 access-list inside_pnat_outbound_V1</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">access-list inside_pnat_outbound extended permit ip host 2.6.6.7 host 2.6.5.35</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">nat (inside) 35 access-list inside_pnat_outbound</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">4、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">策略的定义</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过策略命令（conduit）来定制访问策略，实现Ip及端口的访问限制。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过对访问策略（set policy）实现Ip及端口的访问限制。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过策略命令（access-list）来定制访问策略，实现Ip及端口的访问限制。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">5、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">路由的实现</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过route outside 、route inside来实现内外网的访问路由。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过set route来实现内外网的访问路由。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过route outside 、route inside来实现内外网的访问路由。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">6、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">管理地址的定义</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过telnet来实现管理地址的指定。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过绑定到端口的manager IP来实现管理地址的制定。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过绑定到端口的manager IP来实现管理地址的制定。可以是MGMT端口，也可以定义为inside口、outside口或DMZ口。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">7、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙备份的实现</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过failover来实现硬件冗余。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过定义NSRP集群和VSD组来实现硬件冗余。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过failover定义来实现硬件冗余。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">8、<br />
</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙配置的备份和恢复。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">PIX</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过命令erase all即可删除防火墙上所以配置，使其恢复到出厂设置状态。通过在命令行内直接粘贴备份的配置文件即可自动恢复配置。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">NETSCREEN</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：在非HA模式下，通过命令unset all即可删除防火墙上所以配置，使其恢复到出厂设置状态。通过在命令行内直接粘贴备份的配置文件即可自动恢复配置。</font></font><br />
<font face="宋体 "><font style="font-size: 12pt">ASA</font></font><font face="宋体 "><font style="font-size: 12pt">防火墙：通过命令erase all即可删除防火墙上所以配置，使其恢复到出厂设置状态。通过在命令行内直接粘贴备份的配置文件即可自动恢复配置。</font></font><br />
<strong><font face="宋体 "><font style="font-size: 12pt">二、具体配置对照表如下：</font></font></strong><br />
<table class="t_table" cellspacing="0" style="width: 0px">
    <tbody>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">序列</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><strong><font face="宋体 "><font size="3">功能说明</font></font></strong><br />
            &nbsp;</td>
            <td width="187"><font size="3"><strong><font face="宋体 ">PIX</font></strong><strong><font face="宋体 ">配置</font></strong></font><br />
            &nbsp;</td>
            <td width="194"><font size="3"><strong><font face="宋体 ">NETSCREEN</font></strong><strong><font face="宋体 ">配置</font></strong></font><br />
            &nbsp;</td>
            <td width="182"><font size="3"><strong><font face="宋体 ">ASA</font></strong><strong><font face="宋体 ">配置</font></strong></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">1</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">定义区域</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">nameif ethernet0 outside security0</font></font><br />
            <font face="宋体 "><font size="3">nameif ethernet1 inside security100</font></font><br />
            <font face="宋体 "><font size="3">nameif ethernet2 dmz security80</font></font><br />
            <br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set interface &quot;ethernet1&quot; zone &quot;Trust&quot;</font></font><br />
            <font face="宋体 "><font size="3">set interface &quot;ethernet2&quot; zone &quot;DMZ&quot;</font></font><br />
            <font face="宋体 "><font size="3">set interface &quot;ethernet3&quot; zone &quot;Untrust&quot;</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">在接口状态下配置：interface GigabitEthernet0/1</font></font><br />
            <font face="宋体 "><font size="3"><br />
            nameif DMZ</font></font><br />
            <font face="宋体 "><font size="3"><br />
            security-level 30</font></font><br />
            <font face="宋体 "><font size="3"><br />
            ip address 2.6.7.1 255.255.255.0</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">2</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font style="font-size: 10.5pt">HA</font></font></td>
            <td width="187"><font face="宋体 "><font size="3">failover</font></font><br />
            <font face="宋体 "><font size="3">failover timeout 0:00:00</font></font><br />
            <font size="3"><font face="宋体 ">failover ip address outside 2.16.253.4</font></font><br />
            <font face="宋体 "><font size="3">failover ip address inside 2.6.1.82</font></font><br />
            <font face="宋体 "><font size="3">failover ip address dmz 2.16.1.130</font></font><br />
            <font face="宋体 "><font size="3">failover ip address wan 2.16.1.4</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set nsrp cluster id 1</font></font><br />
            <font face="宋体 "><font size="3">set nsrp rto-mirror sync</font></font><br />
            <font face="宋体 "><font size="3">set nsrp vsd-group id 0 priority 100</font></font><br />
            <font face="宋体 "><font size="3">set nsrp monitor interface ethernet1</font></font><br />
            <font face="宋体 "><font size="3">set nsrp monitor interface ethernet3</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">failover<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover lan unit primary<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover lan interface HA GigabitEthernet0/3<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover mac address GigabitEthernet0/1 0018.1900.5000 0018.1900.5001<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover mac address GigabitEthernet0/2 0018.1900.6000 0018.1900.6001<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover mac address Management0/0 0018.1900.7000 0018.1900.7001<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover mac address GigabitEthernet0/0 0018.1900.4000 0018.1900.4001<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover link HA GigabitEthernet0/3<br />
            </font></font><br />
            <font face="宋体 "><font size="3">failover interface ip HA 60.60.60.1 255.255.255.0 standby 60.60.60.2<br />
            </font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">3</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3"><span class="t_tag" href="tag.php?name=%C8%D5%D6%BE" onclick="tagshow(event)">日志</span></font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">logging trap critical</font></font><br />
            <font face="宋体 "><font size="3">logging facility 20</font></font><br />
            <font face="宋体 "><font size="3">logging host inside 2.6.1.2</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set syslog config &quot;2.6.1.253&quot; &quot;local0&quot; &quot;local0&quot; &quot;debug&quot;</font></font><br />
            <font face="宋体 "><font size="3">set syslog enable</font></font><br />
            <font face="宋体 "><font size="3">set syslog traffic</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">logging trap critical</font></font><br />
            <font face="宋体 "><font size="3">logging facility 20</font></font><br />
            <font face="宋体 "><font size="3">logging host inside 2.6.1.2</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">4</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">端口区域绑定和IP定义</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">ip address outside 2.16.253.3 255.255.255.0</font></font><br />
            <font face="宋体 "><font size="3">ip address inside 2.6.1.81 255.255.255.0</font></font><br />
            <font face="宋体 "><font size="3">ip address dmz 2.16.1.129 255.255.255.128</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set interface &quot;ethernet1&quot; zone &quot;Trust&quot;</font></font><br />
            <font face="宋体 "><font size="3">set interface &quot;ethernet2&quot; zone &quot;DMZ&quot;</font></font><br />
            <font face="宋体 "><font size="3">set interface &quot;ethernet3&quot; zone &quot;Untrust&quot;</font></font><br />
            <font face="宋体 "><font size="3">set interface ethernet1 ip 2.6.1.81/24</font></font><br />
            <font face="宋体 "><font size="3">set interface ethernet2 ip 2.16.1.129/28</font></font><br />
            <font face="宋体 "><font size="3">set interface ethernet3 ip 2.16.253.3/24</font></font><br />
            <font face="宋体 "><font size="3">set interface ethernet3 route</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">interface GigabitEthernet0/0</font></font><br />
            <font face="宋体 "><font size="3"><br />
            nameif outside</font></font><br />
            <font face="宋体 "><font size="3"><br />
            security-level 0</font></font><br />
            <font face="宋体 "><font size="3"><br />
            ip address 2.6.5.216 255.255.255.0</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">5</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">内网到外网允许访问</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">nat (inside) 0 0.0.0.0 0.0.0.0 0 0</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set policy id 4 name &quot;ANY1&quot; from &quot;Trust&quot; to &quot;Untrust&quot;<br />
            &quot;Any&quot; &quot;Any&quot; &quot;ANY&quot; Permit</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">access-list inside_access_in extended permit ip any any</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">6</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">静态映射</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">static (inside,outside) 2.16.1.38 <br />
            2.6.2.38 netmask 255.255.255.255 0 0</font></font><br />
            <font face="宋体 "><font size="3">&hellip;&hellip;..</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set interface &quot;ethernet3&quot; mip 2.16.1.38 host 2.6.2.38 netmask 255.255.255.255 vr &quot;trust-vr&quot;</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">static (inside,outside) 2.6.5.215 2.6.6.6 netmask 255.255.255.255</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">7</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">策略</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">conduit permit tcp host 23.168.1.38 eq telnet host 2.16.253.55</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set policy id 6 name &quot;U-T ICMP&quot; from &quot;Untrust&quot; to &quot;Trust&quot;<br />
            &quot;2.16.253.55/32&quot; &quot;MIP(2.16.1.38)&quot; &quot;TELNET&quot; Permit</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">access-list DMZ_access_in extended permit tcp host 2.6.7.11 eq ftp host 2.6. 6.7 eq ftp</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">8</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">路由</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">route outside 0.0.0.0 0.0.0.0 2.16.253.8 1</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set route 0.0.0.0/0 interface ethernet3 gateway 2.16.253.8 1</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">route outside 0.0.0.0 0.0.0.0 2.6.5.1 1</font></font><br />
            &nbsp;</td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">9</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font style="font-size: 10.5pt">SNMP</font></font></td>
            <td width="187"><font face="宋体 "><font size="3">snmp-server host inside 2.6.1.253</font></font><br />
            <font face="宋体 "><font size="3">snmp-server location XianWailian</font></font><br />
            <font face="宋体 "><font size="3">snmp-server contact FangHaitao</font></font><br />
            <font face="宋体 "><font size="3">snmp-server community 111</font></font><br />
            <font face="宋体 "><font size="3">snmp-server enable trap</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set snmp community &quot;INSIDE&quot; Read-Write Trap-on traffic</font></font><br />
            <font face="宋体 "><font size="3">set snmp host &quot;INSIDE&quot; 2.6.1.253 255.255.255.255</font></font><br />
            <font face="宋体 "><font size="3">set snmp location &quot;FangHaitao&quot;</font></font><br />
            <font face="宋体 "><font size="3">set snmp contact &quot;XianWailian&quot;</font></font><br />
            <font face="宋体 "><font size="3">set snmp name &quot;ns204&quot;</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">snmp-server host inside 2.6.1.253</font></font><br />
            <font face="宋体 "><font size="3">snmp-server location XianWailian</font></font><br />
            <font face="宋体 "><font size="3">snmp-server contact FangHaitao</font></font><br />
            <font face="宋体 "><font size="3">snmp-server community 111</font></font><br />
            <p align="left">&nbsp;</p>
            <p align="left"><font face="宋体 "><font size="3">snmp-server enable trap</font></font></p>
            <p>&nbsp;</p>
            </td>
        </tr>
        <tr>
            <td width="34"><strong><font face="宋体 "><font size="3">10</font></font></strong><br />
            &nbsp;</td>
            <td width="70"><font face="宋体 "><font size="3">TELNET</font></font><br />
            &nbsp;</td>
            <td width="187"><font face="宋体 "><font size="3">telnet 2.64.5.76 255.255.255.255</font></font><br />
            <font face="宋体 "><font size="3">telnet timeout 10</font></font><br />
            &nbsp;</td>
            <td width="194"><font face="宋体 "><font size="3">set admin manager-ip<br />
            2.64.5.76 255.255.255.255</font></font><br />
            <font face="宋体 "><font size="3">NETSCREEN</font></font><br />
            <font face="宋体 "><font size="3">通过指定IP地址来限制可</font></font><br />
            <font size="3"><font face="宋体 ">telnet</font><font face="宋体 ">到防火墙的终端。</font></font><br />
            &nbsp;</td>
            <td width="182"><font face="宋体 "><font size="3">telnet 2.64.7.0 255.255.255.0 DMZ</font></font><br />
            <font face="宋体 "><font size="3">telnet 2.64.6.0 255.255.255.0 inside</font></font><br />
            &nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
&nbsp;</p>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2010.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2010</id>
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[路由器打环测试教程]]></title>
	  <author>
		 <name>懒虫</name>
		 <uri>http://www.ciscobug.cn/</uri>
		 <email>zhengpx@gmail.com</email>
	  </author>
	  <category term="" scheme="http://www.ciscobug.cn/default.asp?cateID=13" label="技术文档" /> 
	  <updated>2008-12-04T09:45:31+08:00</updated>
	  <published>2008-12-04T09:45:31+08:00</published>
		  <summary type="html"><![CDATA[环回测试是很常用的一种测试，通常用于检查和分析端口或线路问题。如下图所示，我们在设备端口上用命令loopback（某些端口上命令格式为loopback diagnostic)使接口从内部将自己发送的信号转接到自己的接收端(如红线所示)，通过检查数据发送和接收的情况来判断端口工作状态是否正常。如果需要对端口进行完全的检测，可以使用符合标准的短跳线将端口收发短接构成环。如果端口正常，可以将线路的一部 分或全部包括到环中进行测试，即在线路中的某个点上进行短接构成环(如紫红色线所示)。这些点可以是在配线架、CSU/DSU、传输设备等之上。在某些类型的端口上，还可以用命令 loopback line 在端口上将对方发送的信号转接到对方的接收短，构成测试环。 <br/><br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;观察环回测试成功与否，首先看端口有没有形成环，如用命令 show interface 看看端口是不是已经从down状态变到up状态，状态中有没有“(looped)”的字样。端口的某些封装形式，如串行口上的PPP、帧中继等封装会检测环路，阻止端口变成up状态，所以可能要临时改为HDLC封装以便进行测试。 <br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;其次是通过ping 产生一定的流量，观察有没有丢包，show interface 检查端口计数器有没有显示input/output错误，有没有CRC、Frame等错误。注意在点对点类型的端口上ping 路由器本身的地址比ping 对端路由器的地址延时要小一半，原因可以参考下面的分析。在ATM等二层端口上不能直接产生测试数据包，可能需要额外的配置，如在8500交换机上可以这样配置: <br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;interface atm 1/0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//需要进行环回测试的ATM二层端口<br/>&nbsp;&nbsp;&nbsp;&nbsp; !<br/>&nbsp;&nbsp;&nbsp;&nbsp;inter atm 0.1 point-to-point<br/>&nbsp;&nbsp;&nbsp;&nbsp; atm pvc 0 100 interface atm 0/1/0 0 100 encap aal5snap<br/>&nbsp;&nbsp;&nbsp;&nbsp; ip address 172.31.20.1 255.255.255.0<br/>&nbsp;&nbsp;&nbsp;&nbsp; !<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;如果测试发现有丢包情况，可以通过命令show controller了解更多细节情况。如以下命令显示了某ATM端口上的BIP错误情况： <br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;Router&gt;show controllers atm 3/0/3<br/>&nbsp;&nbsp;&nbsp;&nbsp;IF Name: ATM3/0/3&nbsp;&nbsp;&nbsp;&nbsp;Chip Base Address: BC38E000<br/>&nbsp;&nbsp;&nbsp;&nbsp;Port type: OC3&nbsp;&nbsp;&nbsp;&nbsp;Port rate: 155000 Kbps&nbsp;&nbsp;&nbsp;&nbsp;Port medium: MM Fiber<br/>&nbsp;&nbsp;&nbsp;&nbsp;Port status:Good Signal&nbsp;&nbsp;&nbsp;&nbsp;Loopback:None&nbsp;&nbsp;&nbsp;&nbsp;Flags:8308<br/>&nbsp;&nbsp;&nbsp;&nbsp;...<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Key: txcell - # cells transmitted<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rxcell - # cells received<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b1&nbsp;&nbsp;&nbsp;&nbsp; - # section BIP-8 errors<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b2&nbsp;&nbsp;&nbsp;&nbsp; - # line BIP-8 errors<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b3&nbsp;&nbsp;&nbsp;&nbsp; - # path BIP-8 errors<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocd&nbsp;&nbsp;&nbsp;&nbsp;- # out-of-cell delineation errors - not implemented<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g1&nbsp;&nbsp;&nbsp;&nbsp; - # path FEBE errors<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; z2&nbsp;&nbsp;&nbsp;&nbsp; - # line FEBE errors<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; chcs&nbsp;&nbsp; - # correctable HEC errors<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uhcs&nbsp;&nbsp; - # uncorrectable HEC errors<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;txcell:275849733, rxcell:143010088<br/>&nbsp;&nbsp;&nbsp;&nbsp;b1:26, b2:104, b3:34, ocd:0<br/>&nbsp;&nbsp;&nbsp;&nbsp;g1:12, z2:0, chcs:0, uhcs:20<br/>&nbsp;&nbsp;&nbsp;&nbsp;...<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;一般而言，环回测试直接了当：观察有没有象意料中的一样形成环，形成环之后有没有发现传输错误，然后根据测试结果调整线路或者设备。但是有的时候，环路测试的结果比较有迷惑性，下面举两个例子： <br/>&nbsp;&nbsp;&nbsp;&nbsp;有一次在通讯机房里做环路测试，从本地E1传输设备上到本地路由器做环测试没有问题，从本地E1传输设备到远端路由器做环测试也没有问题，但从远端E1传输设备到本地路由器之间打环测试就会丢包。由于从本地E1传输设备到远端路由器做环测试没有问题，所以本地E1传输设备和远端E1传输设备之间的线路不应该有问题，但只要将这段线路包括进来之后测试就会出现丢包。最后发现原来是这个通讯机房里安装了微波传输设备，干扰大，线路屏蔽不好所以出现丢包。 <br/>&nbsp;&nbsp;&nbsp;&nbsp;另外一次是一台8540 ATM 交换机和12406路由器ATM端口通过一段短短的尾纤相连却发现大量CRC错误，更换了端口模块、尾纤都没有排除故障，反复观察才发现原来8540交换机的时钟同步信号存在问题。 <br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;还有一个特殊情况就是3750、3550、2950等以太网交换机在端口上发送keep alive信息以检查端口是否激活，如果端口被环回，按照默认的错误检测处理(errdisable)规则，端口将会关闭。除非设置了错误恢复(errdisable recovery)功能，否则在管理员干预之前端口不会恢复到正常工作状态。更严重的是网络中短暂的环路（如错误的连接、生成树配置错误）等都会引发这个错误，所以建议用端口配置命令no keepalive关闭端口激活检测或通过全局配置命令no errdisable detect cause loop 防止因环回错误关闭端口，中断网络连接。 <br/><br/>附：点对点端口上的ping 数据观察与分析(ping 对端地址需要一个来回，ping 自己的地址需要两个来回) <br/>&nbsp;&nbsp;&nbsp;&nbsp;测试情况，R1端口地址为172.31.20.1，对端R2地址为172.31.20.254 <br/>&nbsp;&nbsp;&nbsp;&nbsp;R1#ping <br/>&nbsp;&nbsp;&nbsp;&nbsp;Protocol [ip]: <br/>&nbsp;&nbsp;&nbsp;&nbsp;Target IP address: 172.31.20.254 //ping R2地址<br/>&nbsp;&nbsp;&nbsp;&nbsp;Repeat count [5]: 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;...<br/>&nbsp;&nbsp;&nbsp;&nbsp;Sending 1, 100-byte ICMP Echos to 172.31.20.254, timeout is 2 seconds:<br/>&nbsp;&nbsp;&nbsp;&nbsp;!<br/>&nbsp;&nbsp;&nbsp;&nbsp;Success rate is 100 percent (1/1), round-trip min/avg/max = 8/8/8 ms<br/>&nbsp;&nbsp;&nbsp;&nbsp;(debug 输出)<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:19:03.994: IP: s=172.31.20.1 (local), d=172.31.20.254 (Serial4/0/0), len 100, sending<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:19:03.994:&nbsp;&nbsp;&nbsp;&nbsp; ICMP type=8, code=0 R1发出一个Echo Request(type=8)，R2收到后以Echo Reply 相应 <br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:19:04.002: IP: s=172.31.20.254 (Serial4/0/0), d=172.31.20.1 (Serial4/0/0), len 100, rcvd 3<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:19:04.002:&nbsp;&nbsp;&nbsp;&nbsp; ICMP type=0, code=0 R1收到Echo Reply(type=0)，计算延时(002-994=8ms)。<br/><br/>&nbsp;&nbsp;&nbsp;&nbsp;R1#ping<br/>&nbsp;&nbsp;&nbsp;&nbsp;Protocol [ip]: <br/>&nbsp;&nbsp;&nbsp;&nbsp;Target IP address: 172.31.20.1 //ping R1自己的地址<br/>&nbsp;&nbsp;&nbsp;&nbsp;Repeat count [5]: 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;...<br/>&nbsp;&nbsp;&nbsp;&nbsp;Sending 1, 100-byte ICMP Echos to 172.31.20.1, timeout is 2 seconds:<br/>&nbsp;&nbsp;&nbsp;&nbsp;!<br/>&nbsp;&nbsp;&nbsp;&nbsp;Success rate is 100 percent (1/1), round-trip min/avg/max = 16/16/16 ms<br/>&nbsp;&nbsp;&nbsp;&nbsp;(debug 输出)<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.106: IP: s=172.31.20.1 (local), d=172.31.20.1 (Serial4/0/0), len 100, sending<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.106:&nbsp;&nbsp;&nbsp;&nbsp; ICMP type=8, code=0 R2发出一个Echo Request(type=8)<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.114: IP: s=172.31.20.1 (Serial4/0/0), d=172.31.20.1 (Serial4/0/0), len 100, rcvd 3<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.114:&nbsp;&nbsp;&nbsp;&nbsp; ICMP type=8, code=0 R2收到Echo Request，判断的目标地址为R1，所以将包发回<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.114: IP: s=172.31.20.1 (local), d=172.31.20.1 (Serial4/0/0), len 100, sending<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.114:&nbsp;&nbsp;&nbsp;&nbsp; ICMP type=0, code=0 R1收到自己发出的Echo Request，以Echo Reply(type=0)相应并通过端口发送<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.122: IP: s=172.31.20.1 (Serial4/0/0), d=172.31.20.1 (Serial4/0/0), len 100, rcvd 3<br/>&nbsp;&nbsp;&nbsp;&nbsp;Apr 10 12:18:00.122:&nbsp;&nbsp;&nbsp;&nbsp; ICMP type=0, code=0 R2将包发回。R1收到Echo Reply (type=0),计算延时(112-106=16ms)。<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.ciscobug.cn/article/2009.htm" /> 
	  <id>http://www.ciscobug.cn/default.asp?id=2009</id>
  </entry>	
		
</feed>
