phanx

powered by Technology
RSS icon Email icon Bullet (black)
  • IBM Informix Dynamic Server for Redhat Enterprise Linux安装示例

    Posted on 01月 29th, 2010 phanx No comments

     

     

     

    IBM Informix Dynamic Server for Redhat Enterprise Linux

    安装示例

    by phanx lee

     

     

     

     

     

    2010-1-21

     

     


    1 准备工作3

    1.1 准备informix的组和用户3

    1.2 准备JAVA环境3

    1.3 准备安装时的环境变量3

    2 安装4

    2.1 解压4

    2.2 安装4

    2.3 修改informix运行时的环境变量13

    2.4 修改配置文件13

    2.5 修改操作系统的配置13

    2.6 修改informix配置文件13

    2.7 修改informixtmp目录属性14

    2.8 采用RAW设备方式存储数据14

    2.8.1 创建LV.. 14

    2.8.2 创建LV对应的RAW设备14

    2.8.3 配置启动时候自动创建LV对应的RAW设备15

    2.8.4 修改LV设备文件和RAW设备文件权限16

    2.8.5 RAW设备创建链接16

    2.9 第一次启动初始化informix数据库17

    2.10 调整默认的DBSpaces到独立的RAW设备19

    2.11 更改逻辑日志使用的存储空间20

    2.12 调整物理日志的存储空间20

    3 特别说明22

     

    1、准备工作

    1.1、准备informix的组和用户

     

    创建informix组和用户并设置密码

     

     groupadd informix

     useradd -g informix informix

    passwd informix

     

    1.2、准备JAVA环境

    JDK拷贝到/usr/local 下并安装

     

    cp jdk-1_5_0_04-linux-i586.bin /usr/local

    cd /usr/local

    ./jdk-1_5_0_04-linux-i586.bin

     

    /usr/bin下创建java的链接,或者直接设置JAVA_HOME变量

     

    cd /usr/bin

    ln –s /usr/local/ jdk1.5.0_04/bin/java java

     

    export JAVA_HOME=/usr/local/jdk1.5.0_04

     

    1.3、准备安装时的环境变量

    添加INFORMIXDIR环境变量

     

    export INFORMIXDIR=/home/informix

     

    2、安装

    2.1、解压

    将安装包解压缩后执行安装程序

     

    tar xvf  ./informix-linux.tar –C ./informix

     

    2.2、安装

    根据提示,按照默认设置安装

     

    cd informix

    ./ids_install

     

     

     

     

              Initializing InstallShield Wizard……..

              Launching InstallShield Wizard……..

     

     

       1. Release Notes

       2. Installation Guide

       3. Begin Installation

     

    Please select one of these options [3]

     

    Beginning installation…

     

     

    Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]

     

    Welcome to the InstallShield Wizard for IBM Informix Dynamic Server Bundle

     

    The InstallShield Wizard will install IBM Informix Dynamic Server Bundle on

    your computer.

    To continue, choose Next.

     

     

     

     

     

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

     

    Language not supported in console mode, will display in English

     

     

    Software Licensing Agreement

    Press Enter to display the license agreement on your screen. Please

    read the agreement carefully before installing the Program. After

     reading the agreement, you will be given the opportunity to accept it

     or decline it. If you choose to decline the agreement, installation

     will not be completed and you will not be able to use the Program.

     

     1

         International Program License Agreement

         

         Part 1 - General Terms

         

         BY DOWNLOADING, INSTALLING, COPYING, ACCESSING, OR USING

         THE PROGRAM YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU

          ARE ACCEPTING THESE TERMS ON BEHALF OF ANOTHER PERSON OR A

          COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT AND WARRANT

          THAT YOU HAVE FULL AUTHORITY TO BIND THAT PERSON, COMPANY,

          OR LEGAL ENTITY TO THESE TERMS. IF YOU DO NOT AGREE TO

          THESE TERMS, 

        

     

        

    - DO NOT DOWNLOAD, INSTALL, COPY, ACCESS, OR USE THE

          PROGRAM; AND

        

     

        

    - PROMPTLY RETURN THE PROGRAM AND PROOF OF ENTITLEMENT TO

          THE PARTY FROM WHOM YOU ACQUIRED IT TO OBTAIN A REFUND OF

          THE AMOUNT YOU PAID. IF YOU DOWNLOADED THE PROGRAM, CONTACT

          THE PARTY FROM WHOM YOU ACQUIRED IT.

        

     

        

    “IBM” is International Business Machines Corporation or one

          of its subsidiaries.

        

     

        

    “License Information” (”LI”) is a document that provides

          information specific to a Program. The Program’s LI is

          available at http://www.ibm.com/software/sla/ . The LI may

          also be found in a file in the Program’s directory, by the

          use of a system command, or as a booklet which accompanies

          the Program.

        

     

     

    Press Enter to continue viewing the license agreement, or, Enter 1 to

    accept the agreement, 2 to decline it or 99 to go back to the previous

     screen.

     

    1

     

    1 到下一步, 3 取消 或者 4 重新显示 [1]

     

    IBM Informix Dynamic Server Bundle Install Location

     

    Please specify a directory or press Enter to accept the default directory.

     

    Directory Name: [/home/informix]

     

    Press 1 for Next, 3 to Cancel or 4 to Redisplay [1]

     

     

    Searching for products available for install: this may take a few minutes.

     

    Select the products you would like to install:

     

       To select/deselect a product or to change its setup type, type its number:

     

       Product                                          Setup Type

       ———————————————— ————————

        1. [ ] IBM Informix IConnect                                           

        2. [x] IBM Informix Client-SDK                   Typical

        3. [x] IBM Informix Dynamic Server               Typical

        4. [x] IBM Informix JDBC Driver                                         

     

       Other options:

     

        0. Continue installing

     

       Enter command [0]

     

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

     

    Do you want to enable role separation?

     

    [ ] 1 - Yes

    [X] 2 - No

     

    To select an item enter its number, or 0 when you are finished: [0]

     

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

     

    Would you like to create an IDS demo instance?

     

    [ ] 1 - Create Demo

    [X] 2 - Do Not Create Demo

     

    To select an item enter its number, or 0 when you are finished: [0]

     

     

    The primary purpose of the demo instance is to ensure that the product is

    properly installed and the hardware is configured to work with IDS.

    This demo instance can be used as an actual production instance if properly

    configured.

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]   

     

    IBM Informix Dynamic Server Bundle will be installed in the following location:

     

    /home/informix

     

    with the following features:

     

    IBM Informix Client-SDK

    IBM Informix Dynamic Server

    IBM Informix JDBC Driver

     

    for a total size:

     

     51.6 MB

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

     

    Creating uninstaller…

     

    0 % complete

    10 % complete

    20 % complete

    30 % complete

    40 % complete

    50 % complete

    60 % complete

    70 % complete

    80 % complete

    90 % complete

    100 % complete

     

     

    Installing IBM Informix JDBC Driver. Please wait…

     

     

    Creating uninstaller…

     

     

    Installing Message Files by RPM

     

     

    Installing GLS Files by RPM

     

     

    Installing IDS Files by RPM

     

     

    Installing SDK Message Files by RPM

     

     

    Installing SDK GLS Files by RPM

     

     

    Installing SDK Files by RPM

     

     

    Branding Files …

    Installing directory .

    Installing directory etc

    Installing directory bin

    Installing directory lib

    Installing directory lib/client

    Installing directory lib/client/csm

    Installing directory lib/esql

    Installing directory lib/dmi

    Installing directory lib/c++

    Installing directory lib/cli

    Installing directory release

    Installing directory release/en_us

    Installing directory release/en_us/0333

    Installing directory incl

    Installing directory incl/esql

    Installing directory incl/dmi

    Installing directory incl/c++

    Installing directory incl/cli

    Installing directory demo

    Installing directory demo/esqlc

    Installing directory demo/c++

    Installing directory demo/cli

    Installing directory doc

    Installing directory doc/gls_api

    Installing directory doc/gls_api/en_us

    Installing directory doc/gls_api/en_us/0333

     

    IBM Informix Product:       IBM INFORMIX-Client SDK

    Installation Directory: /home/informix

     

    Performing root portion of installation of IBM INFORMIX-Client SDK…

     

     

    Installation of IBM INFORMIX-Client SDK complete.

     

    Installing directory etc

    Installing directory gls

    Installing directory gls/cm3

    Installing directory gls/cv9

    Installing directory gls/dll

    Installing directory gls/etc

    Installing directory gls/lc11

    Installing directory gls/lc11/cs_cz

    Installing directory gls/lc11/da_dk

    Installing directory gls/lc11/de_at

    Installing directory gls/lc11/de_ch

    Installing directory gls/lc11/de_de

    Installing directory gls/lc11/en_au

    Installing directory gls/lc11/en_gb

    Installing directory gls/lc11/en_us

    Installing directory gls/lc11/es_es

    Installing directory gls/lc11/fi_fi

    Installing directory gls/lc11/fr_be

    Installing directory gls/lc11/fr_ca

    Installing directory gls/lc11/fr_ch

    Installing directory gls/lc11/fr_fr

    Installing directory gls/lc11/is_is

    Installing directory gls/lc11/it_it

    Installing directory gls/lc11/ja_jp

    Installing directory gls/lc11/ko_kr

    Installing directory gls/lc11/nl_be

    Installing directory gls/lc11/nl_nl

    Installing directory gls/lc11/no_no

    Installing directory gls/lc11/os

    Installing directory gls/lc11/pl_pl

    Installing directory gls/lc11/pt_br

    Installing directory gls/lc11/pt_pt

    Installing directory gls/lc11/ru_ru

    Installing directory gls/lc11/sk_sk

    Installing directory gls/lc11/sv_se

    Installing directory gls/lc11/th_th

    Installing directory gls/lc11/zh_cn

    Installing directory gls/lc11/zh_tw

     

    IBM Informix Product:       Gls

    Installation Directory: /home/informix

     

    Performing root portion of installation of Gls…

     

     

    Installation of Gls complete.

     

    Installing directory etc

    Installing directory msg

    Installing directory msg/en_us

    Installing directory msg/en_us/0333

     

    IBM Informix Product:       messages

    Installation Directory: /home/informix

     

    Performing root portion of installation of messages…

     

     

    Installation of messages complete.

     

     

     

    Branding Installed Files …

     

    Please read the information below.

     

    Set required environment variables

            Set $INFORMIXDIR to the directory where the IDS server is installed.

            Set $PATH to include $INFORMIXDIR/bin

            Set $INFORMIXSERVER to the name of the database server

            Set $ONCONFIG to the name of the active onconfig configuration file.

            If using a sqlhosts file other than $INFORMIXDIR/etc/sqlhosts

                    Set $INFORMIXSQLHOSTS

            If using a locale/language other than the default

                    Set $CLIENT_LOCALE

                    Set $DB_LOCALE

                    Set $SERVER_LOCALE

                    Set $DBLANG

    Prepare connectivity files

            sqlhosts

            /etc/hosts

            /etc/services

    Prepare configuration file

            Set DBSERVERNAME

            Set SERVERNUM

            Set ROOTNAME

     

    Press ENTER to read the text [Type q to quit]

     

            Set ROOTPATH

            Set ROOTSIZE   

    Initialize database server

            As informix or root, run oninit

            If initializing a new server for the FIRST time, run oninit -i

    This will overwrite any existing data, so use caution on an exis

    ting setup

     

     

    For more information please refer to the IBM Informix Dynamic Server Getting

    Started Guide

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

     

    The InstallShield Wizard has successfully installed IBM Informix Dynamic Server

    Bundle. Choose Next to continue the wizard.

     

    Press 1 for Next, 2 for Previous, 3 to Cancel or 4 to Redisplay [1]

     

       1. Release Notes

       2. Quick Beginnings Guide

       3. Finish Installation

     

    Please select one of these options [3]

     

    Finishing Installation…

     

     

    Press 3 to Finish or 4 to Redisplay [3]

     

    2.3、修改informix运行时的环境变量

    修改informix用户的环境变量

     

    vi /home/informix/.bash_profile

     

    PATH=$PATH:$HOME/bin

    INFORMIXDIR=/home/informix

    INFORMIXTMP=/home/informix/tmp

    INFORMIXSERVER=testsvr

    ONCONFIG=onconfig

     

    TERMCAP=$HOME/etc/termcap

    export PATH INFORMIXDIR INFORMIXTMP INFORMIXSERVER ONCONFIG TERMCAP

     

    2.4、修改配置文件

    拷贝etc下的onconfig.stdsqlhosts.std为环境变量中所设置的名称

     

    cd /home/informix/etc

    cp onconfig.std onconfig

    cp sqlhosts.std sqlhosts

     

    2.5、修改操作系统的配置

    使用root用户修改/etc/services文件,增加informix服务

     

    # Local services

    informix         60000/tcp                       # Informix Server

     

    2.6、修改informix配置文件

    使用informix用户修改sqlhostonconfig文件

    vi /home/informix/etc/sqlhosts

    #ServerName Connect           Hostname   ServicesName(对应/etc/services)

    testsvr          onsoctcp        localhost       informix

     

    vi /home/informix/etc/onconfig

    DBSERVERNAME    testsvr

     

    TAPEDEV         /dev/null       # Tape device path

    LTAPEDEV        /dev/null       # Log tape device path

     

     

    将默认/usr/informix/ 替换为 /home/informix/

    vi命令 1,$  s/\/usr\/informix\//\/home\/informix\//g

    2.7、修改informixtmp目录属性

    修改/home/informix/tmp的属性

     

    chmod o-r /home/informix/tmp

    chmod o-x /home/informix/tmp

     

    2.8、采用RAW设备方式存储数据

    2.8.1、创建LV

    增加LVrootdbs大小对应config文件中的大小

     

    lvcreate –size 1G –name nwrootdbs datavg

    lvcreate –size 512M –name nwphydbs datavg

    lvcreate –size 512M –name nwlogdbs datavg

    lvcreate –size 512M –name nwtmpdbs datavg

    lvcreate –size 512M –name nwidxdbs datavg

    lvcreate –size 1G –name nwdatadbs datavg

     

    2.8.2、创建LV对应的RAW设备

    创建RAW设备

     

    raw /dev/raw/raw1 /dev/datavg/nwrootdbs

    raw /dev/raw/raw2 /dev/datavg/nwphydbs

    raw /dev/raw/raw3 /dev/datavg/nwlogdbs

    raw /dev/raw/raw4 /dev/datavg/nwtmpdbs

    raw /dev/raw/raw5 /dev/datavg/nwidxdbs

    raw /dev/raw/raw6 /dev/datavg/nwdatadbs

     

    2.8.3、配置启动时候自动创建LV对应的RAW设备

    由于Linux不会自动创建LV对应的RAW设备,所以建议将raw设备设定为启动时候自动添加。

    2.8.3.1、RHEL 5以后版本

    可以通过修改 /etc/rc.local ,加入以上创建RAW设备的命令。

     

    或者在/etc/udev/rules.d/60-raw.rules中配置

     

    ACTION==”add”, ENV{MAJOR}==”253″, ENV{MINOR}==”2″, RUN+=”/bin/raw /dev/raw/raw1 %M %m”

    ACTION==”add”, ENV{MAJOR}==”253″, ENV{MINOR}==”3″, RUN+=”/bin/raw /dev/raw/raw2 %M %m

    ACTION==”add”, ENV{MAJOR}==”253″, ENV{MINOR}==”4″, RUN+=”/bin/raw /dev/raw/raw3 %M %m”

    ACTION==”add”, ENV{MAJOR}==”253″, ENV{MINOR}==”5″, RUN+=”/bin/raw /dev/raw/raw4 %M %m”

    ACTION==”add”, ENV{MAJOR}==”253″, ENV{MINOR}==”6″, RUN+=”/bin/raw /dev/raw/raw5 %M %m”

    ACTION==”add”, ENV{MAJOR}==”253″, ENV{MINOR}==”7″, RUN+=”/bin/raw /dev/raw/raw6 %M %m”

    注:其中ENVMAJORMINOR值,可以从手工创建RAW设备时候得到。

     

    [root@localhost ~]# raw /dev/raw/raw1 /dev/datavg/nwrootdbs

    /dev/raw/raw1:  bound to major 253, minor 2

    [K1] 

    2.8.3.2、RHEL 5以前版本

    在以前的RedHat Enterprise Linux Server 5版本以前,系统是通过/etc/sysconfig/rawdevices配置raw的控制文件,通过/etc/init.d/rawdevices来管理raw设备的启动和关闭。所以,如果对应系统为RHEL5以前的版本,那么在/etc/sysconfig/rawdevices中添加一下配置

     

    /dev/raw/raw1 /dev/datavg/nwrootdbs

    /dev/raw/raw2 /dev/datavg/nwphydbs

    /dev/raw/raw3 /dev/datavg/nwlogdbs

    /dev/raw/raw4 /dev/datavg/nwtmpdbs

    /dev/raw/raw5 /dev/datavg/nwidxdbs

    /dev/raw/raw6 /dev/datavg/nwdatadbs

     

    2.8.4、修改LV设备文件和RAW设备文件权限

    修改LVRAW设备所属和权限

     

    chown informix:informix /dev/mapper/datavg-nw*

    chmod 660 /dev/mapper/datavg-*nw

    chown informix:informix /dev/raw/raw1

    chown informix:informix /dev/raw/raw2

    chown informix:informix /dev/raw/raw3

    chown informix:informix /dev/raw/raw4

    chown informix:informix /dev/raw/raw5

    chown informix:informix /dev/raw/raw6

    chmod 660 /dev/raw/raw1

    chmod 660 /dev/raw/raw2

    chmod 660 /dev/raw/raw3

    chmod 660 /dev/raw/raw4

    chmod 660 /dev/raw/raw5

    chmod 660 /dev/raw/raw6

     

    同样的,如果设定了启动时候自动添加raw设备定,那么也需要在/etc/rc.local中添加修改RAW设备所属和权限的命令

     

    chown informix:informix /dev/raw/raw1

    chown informix:informix /dev/raw/raw2

    chown informix:informix /dev/raw/raw3

    chown informix:informix /dev/raw/raw4

    chown informix:informix /dev/raw/raw5

    chown informix:informix /dev/raw/raw6

    chmod 660 /dev/raw/raw1

    chmod 660 /dev/raw/raw2

    chmod 660 /dev/raw/raw3

    chmod 660 /dev/raw/raw4

    chmod 660 /dev/raw/raw5

    chmod 660 /dev/raw/raw6

     

    2.8.5、RAW设备创建链接

    /dev/datavg下创建链接(可选)

     

    ln -s /dev/raw/raw1 /dev/datavg/rnwrootdbs

    ln -s /dev/raw/raw2 /dev/datavg/rnwphydbs

    ln -s /dev/raw/raw3 /dev/datavg/rnwlogdbs

    ln -s /dev/raw/raw4 /dev/datavg/rnwtmpdbs

    ln -s /dev/raw/raw5 /dev/datavg/rnwidxdbs

    ln -s /dev/raw/raw6 /dev/datavg/rnwdatadbs

     

    /home/informix/下创建chunk的目录和链接

     

    mkdir /home/informix/dbspaces

    ln -s /dev/raw/raw1  rootdbschunks

    ln -s /dev/raw/raw2  phydbschunks

    ln -s /dev/raw/raw3  logdbschunks

    ln -s /dev/raw/raw4  tmpdbschunks

    ln -s /dev/raw/raw5  idxdbschunks

    ln -s /dev/raw/raw6  datadbschunks

     

    2.8.6、修改onconfig文件

    修改onconfig文件中的rootdbs位置和大小

    vi /home/informix/etc/onconfig

    ROOTPATH        /home/informix/dbspaces/rootdbschunks

    ROOTOFFSET       100

    ROOTSIZE        1048476     #512M  1024*1024-OFFSET= 1048576

     

    2.9、采用文件系统方式存储数据

    2.9.1、创建存储文件

    创建一个存放数据库文件的目录 /home/informix/dbspaces

     

    mkdir /home/informix/dbspaces

     

    建立rootdbs的存储文件/home/informix/dbspaces/rootdbs (空文件)

     

    cat /dev/null > /home/informix/dbspaces/rootdbs

     

    修改所属和权限

     

    chown informix:informix /home/informix/dbspaces/rootdbs

    chmod 660 /home/informix/dbspaces/rootdbs

     

    2.9.2、修改onconfig文件

    修改onconfig文件中的rootdbs位置和大小

     

    vi /home/informix/etc/onconfig

    ROOTPATH        /home/informix/dbspaces/rootdbs

    ROOTOFFSET       0

    ROOTSIZE        1048576     #1G  1024*1024-OFFSET= 1048576

     

    2.10、第一次启动初始化informix数据库

    启动并初始化Informix Server

     

    alias oninitfirst=”oninit -iv”

    oninitfirst

     

    This action will initialize IBM Informix Dynamic Server;

    any existing IBM Informix Dynamic Server databases will NOT be accessible -

    Do you wish to continue (y/n)? y

     

    Checking group membership to determine server run mode…succeeded

    Reading configuration file ‘/home/informix/etc/onconfig’…succeeded

    Creating /INFORMIXTMP/.infxdirs…succeeded

    Creating infos file “/home/informix/etc/.infos.testsvr”…succeeded

    Linking conf file “/home/informix/etc/.conf.testsvr”…succeeded

    Writing to infos file…succeeded

    Checking config parameters…Invalid value of DUMPDIR ‘/usr/informix/tmp’ in onconfig file. Setting it to default value

     ‘/home/informix/tmp’…succeeded

    13:50:32  IBM Informix Dynamic Server Started.

    Allocating and attaching to shared memory…succeeded

    Creating resident pool 866 kbytes…succeeded

    Allocating 18384 kbytes for buffer pool of 2K page size…succeeded

    Initializing rhead structure…succeeded

     

    Thu Dec 10 13:50:32 2009

     

    13:50:32  Event alarms enabled.  ALARMPROG = ‘/usr/informix/etc/alarmprogram.sh’

    Initializing ASF…succeeded

    Initializing Dictionary Cache and SPL Routine Cache…13:50:32  Booting Language <c> from module <>

    13:50:32  Loading Module <CNULL>

    13:50:32  Booting Language <builtin> from module <>

    13:50:32  Loading Module <BUILTINNULL>

    succeeded

    Bringing up ADM VP…succeeded

    Creating VP classes…succeeded

    Onlining 0 additional cpu vps…succeeded

    Onlining 2 IO vps…succeeded

    Initialization of Encryption…succeeded

    Forking main_loop thread…succeeded

    Initializing DR structures…13:50:37  DR: DRAUTO is 0 (Off)

    succeeded

    Forking 1 ’soctcp’ listener threads…13:50:37  Dynamically allocated new virtual shared memory segment (size 8192KB)

    succeeded

    13:50:37  IBM Informix Dynamic Server Version 10.00.UC3R1   Software Serial Number AAA#B000000

    Starting tracing…succeeded

    Initializing 1 flushers…succeeded

    Initializing log/checkpoint information…succeeded

    Opening primary chunks…succeeded

    Opening mirror chunks…succeeded

    Initializing dbspaces…succeeded

    Validating chunks…succeeded

    Creating database partition…succeeded

    Initialize Async Log Flusher…succeeded

    13:50:39  IBM Informix Dynamic Server Initialized — Complete Disk Initialized.

    Forking btree cleaner…succeeded

    Initializing DBSPACETEMP list…succeeded

    Checking database partition index…succeeded

    13:50:39  Checkpoint Completed:  duration was 0 seconds.

    13:50:39  Checkpoint loguniq 1, logpos 0xd0, timestamp: 0×4f

     

    13:50:39  Maximum server connections 0

    Checking location of physical log…succeeded

    Initializing dataskip structure…13:50:39  Dataskip is now OFF for all dbspaces

    succeeded

    Checking for temporary tables to drop…succeeded

    Forking onmode_mon thread…succeeded

    Verbose output complete: mode = 5

    13:50:39  On-Line Mode

    13:50:39  Building ’sysmaster’ database …

    [informix@localhost ~]$ 13:50:40  Booting Language <spl> from module <>

    13:50:40  Loading Module <SPLNULL>

    13:50:40  Unloading Module <SPLNULL>

    13:50:40  Logical Log 2 Complete, timestamp: 0×93ba.

    13:50:40  Process exited with return code 127: /bin/sh /bin/sh -c /usr/informix/etc/alarmprogram.sh 2 23 “Logical Log 2 Complete, timestamp: 0×93ba.” “Logical Log 2 Com

    13:50:41  Loading Module <SPLNULL>

    13:50:42  ’sysmaster’ database built successfully.

    13:50:42  ’sysutils’ database built successfully.

    13:50:42  ’sysuser’ database built successfully.

    13:50:42  Logical Log 3 Complete, timestamp: 0xe915.

    13:50:42  Process exited with return code 127: /bin/sh /bin/sh -c /usr/informix/etc/alarmprogram.sh 2 23 “Logical Log 3 Complete, timestamp: 0xe915.” “Logical Log 3 Com

     

    2.11、调整默认的DBSpaces到独立的RAW设备

    建立其余DBSpacechunk

    -s size 的数值计算方法: dbs所在的raw设备LV的大小(KB)减去-o offset的值

    onspaces -c -d phydbs -p /home/informix/dbspaces/phydbschunks -o 100 -s 1048476

    onspaces -c -d logdbs -p /home/informix/dbspaces/logdbschunks -o 100 -s 524188

    onspaces -c -t -d tmpdbs -p /home/informix/dbspaces/tmpdbschunks -o 100 -s 524188

      onspaces -c -d idxdbs -p /home/informix/dbspaces/idxdbschunks -o 100 -s 524188

      onspaces -c -d datadbs -p /home/informix/dbspaces/datadbschunks -o 100 -s 1048476

     

     

    2.12、更改逻辑日志使用的存储空间

    至少创建三个逻辑日志文件

     

    onparams -a -d logdbs -s 15000

    onparams -a -d logdbs -s 15000

    onparams -a -d logdbs -s 15000

     

     

    调整informix使用的LOG文件到新加入的逻辑日志文件上,再将检查点记录同步到逻辑日志文件

     

    onmode -l

    onmode -l

    onmode -l

     

    onmode -c

     

    用循环添加Loglogdbschunk全部占用满。

    while true; do onparams -a -d logdbs -s 15000; done;

     

    在提示DBSpace is full.的时候,用Ctrl-C中断循环。

     

    删除原rootdbs上的逻辑日志文件

     

    onparams -d -l 1

    onparams -d -l 2

    onparams -d -l 3

     

    注:

     如果采用的是文件系统方式存储,那么在初始化informix数据库之前,可以通过修改onconfig文件中的逻辑日志相关配置来指定逻辑日志文件的大小和数量。

     

    2.13、调整物理日志的存储空间

    onconfig中的

    # Physical Log Configuration

     

    PHYSDBS            rootdbs                         # Location (dbspace) of physical log

    PHYSFILE            200000                         # Physical log file size (Kbytes)

     

    不能直接修改,需要在quiescent模式下使用 onparams -p -s pagesize -d dbspace 命令来调整。

     

    pagesize大小为LV大小(KB)减去offset值,即采用onspaces创建的phydbs的大小。

    onmode -sy

    onparams -p -s 1048476 -d phydbs

     

     

    3、特别说明

    informix oninit 必须是 root:informix 权限为 6754 ,否则oninit无法启动或者启动后用dbaccess连接测试会报告informix用户密码错误。

     



     [K1]RHEL 5.3上测试没有成功,建议还是采用在/etc/rc.local下配置raw命令来创建RAW设备。

  • 还真遇到伪造MAC地址让交换机CAM表溢出的事情了

    Posted on 03月 8th, 2009 phanx No comments
    今日处理某客户一个网络故障。某个节点总是间歇性故障,重启设备又好了。
    开始抓包发现有网络中有一半以上流量是目的地址为随机IP的445包。于是将发送源IP清理出来,断网隔离。
    没想到过了几个小时又出毛病了。3550交换机不转发流量,抓包看就只有交换机自身产生的STP,DTP,Loop Detect这些数据。
    这时候通过show mac-address-table发现某个端口下有大量伪造的MAC地址,当时就翻了有2000行,n屏都翻不完,放弃,估计CAM表是爆了。
    于是在端口下做port-security限制MAC数量,然后清空CAM表。交换机还是不转发流量,估计已经软件已经有问题了,重启好了。
    经过观察,故障解决了。
    经过了解,判断可能是一台服务器中毒了,可惜没有条件去服务器上确认病毒的名字和类型。
  • CS-MARS 6.x.x (6.0.2) 虚拟机的安装

    Posted on 02月 13th, 2009 phanx No comments

    ========phanx.com=========
    Author:  phanx
    Updated: 2009-2-13
    =========================

    网上关于CS-MARS 4.x.x的虚拟机安装的文章已经很多了,对于6.x.x来讲,其实大体一致。但是有些和4.x.x不一样的地方,这里特别讲一下。

    在4.x.x版本的安装文章中提到,当MARS的Recovery CD完成安装后,在MARS第一次启动的时侯,按住SHIFT键等待lilo停留在lilo boot:状态,然后输入linux rw init=/bin/bash进入系统的shell。

    但是在6.x.x版本的安装中,我发现无法按住SHIFT键停在lilo boot状态(其实lilo只要按住SHIFT或者CTRL或者ALT任意一个键都会停住),后来发现可以通过边按SHIFT边乱敲字母键的方式停在lilo boot:状态,但是只要不敲键,很快就会进入正常启动过程。于是我很快的输入了linux  rw init=/bin/bash,但是发现还是进入MARS的shell(pnsh)。

    后来找了点资料,发现6.x.x在这里有点不同。需要用linux的CD来启动进入rescue状态。我用的是Redhat Linux Enterprise Server Advanced 5的CD1来启动的。 CD启动后按F5再输入linux rescue进入拯救模式。

    Linux会问你,是否自动查找硬盘上的linux。选择Continue,然后就会找到MARS上的Linux了,并且会自动帮你挂载在/mnt/sysimage下面。

    然后就可以进入做license了。

    cd /mnt/sysimage/opt/janus/release/bin
    mv pnlicense pnlicense.org
    echo “/bin/echo d84f7ceaf50f9c45683e2efb77752d4f:License verified:4:0:0:4″ > pnlicense
    chmod +x pnlicense

    好了,到这里我们的MARS的license就有了,把光盘拿出来,退出rescure模式的shell,就会重新启动。然后进行MARS的第一次启动,然后开始prepare Oracle(相当慢),完成后就可以进入MARS的shell了。

    然后第一次Web登录MARS会让你输入License,OK,前面我们都弄了,所以这里随便输入任意数字填满输入框就行了,全1都可以。然后就可以随便用了。

    到这里基本就OK了,但是有的人并不满足,比如我,想用root?OK,有办法。

    但是必需要在前面rescue模式下多做些东西。

    首先要修改/mnt/sysimage/etc/passwd里面的内容

    把pnadmin:x:500:500::/opt/janus/release/bin:/opt/janus/release/bin/pnsh
    改为pnadmin:x:500:500::/opt/janus/release/bin:/bin/bash
    这个意思是让pnadmin用户不用MARS的shell而使用系统的bash。

    然后,修改/mnt/sysimage/etc/passwd的内容增加一行
    pnadmin ALL=(ALL)       NOPASSWD: ALL
    这个意思是让pnadmin用户可以使用sudo命令来进行命令执行,并且执行sudo的时侯不询问密码。

    BTW:别说你不会用vi….好了,保存好,其余和前面一样,退出rescue的shell。开始第一次启动MARS的系统,然后开始prepare Oracle(相当慢),完成后就可以进入系统的bash了。

    这个时侯用命令

    sudo su
    就可以不要口令直接变成root用户了。
    然后马上修改root的口令
    passwd
    输入一个口令。
    最后再修改/etc/passwd里面的内容
    把pnadmin:x:500:500::/opt/janus/release/bin:/bin/bash
    改为pnadmin:x:500:500::/opt/janus/release/bin:/opt/janus/release/bin/pnsh
    让pnadmin用户还原为MARS的shell而不使用系统的bash。

    好了,退出root用户。回到pnadmin用户,起用:/opt/janus/release/bin/pnsh到MARS的shell,这个时候我们就可以使用隐藏命令expert来进入root用户了,口令就是你刚才为root用户设置的口令。 OK,大功告成,enjoy it~


    重要提示
    前面提到的这些步骤,一定要在刚刚用Recovery CD恢复后进行。因为一旦让MARS的系统引导,准备好Oracle进入MARS系统后,再用linux rescue就不行了,linux会告诉你找不到硬盘上的系统,无法挂载。

    这个问题是老外讲的,我也发现了。

    还有,在rescue的时侯如果没有自动挂载好,你可以试试
    mkdir /mnt/opt
    mount /dev/md2 /mnt/opt

  • NAT/PAT中对于FTP的处理,以及PAT后的非标准21 FTP端口设置

    Posted on 01月 24th, 2009 phanx No comments
    ========phanx.com=========
    Author:  phanx
    Updated: 2009-1-24
    =========================
     
    这里先要对FTP的两种模式说一下:
    引用一张Cisco上面的图:
    pix-asa-enable-ftp-2.gif
    FTP分为两种模式: 主动Active   被动 Passive
    主动模式下是使用21作为控制, 20作为数据口。
    首先是客户端通过大于1023的端口发起到服务器21端口的控制连接,信息交换完成后。服务器从20端口发起连接到客户端提供的接收端口。
    这是传统意义上的FTP行为。
     
    被动模式是使用21作为控制,然后服务器自动选择一个大于1023的端口作为数据。
    首先是客户端通过大于1023的端口发起到服务器21端口的控制连接,信息交换完成后。服务器告诉客户端一个大于1023的端口作为数据口,
    然后客户端再以另外一个大于1023的端口发起连接到服务器提供的数据端口进行数据传输。
     
    目前大多数服务器都支持这种模式,而且大部分客户端都默认采用被动模式和服务器进行传输。
     
     
    好了,当我们在内网有两台服务器FTP SEVER1和FTP SERVER2都需要被外网访问的时侯,我们会分别为这两个服务器做映射出去。
    假定FTP SERVE1(10.0.0.100)占用公网IP(x.x.x.x)的21端口,FTP SERVER2(10.0.0.200)占用公网IP(x.x.x.x)的2211端口。那么我们就会这么写:
    ip nat inside source static tcp 10.0.0.100 21 x.x.x.x 21 extendable
    ip nat inside source static tcp 10.0.0.200 21 x.x.x.x 2211 extendable
     
    这样做了以后,我们会发现FTP SERVER1是正常的,而FTP SERVER2却不正常,表现为登录以后无法列出目录:
    以下为FTP 客户端的LOG:

    [xx:xx:03] PASV
    [xx:xx:03] 227 Entering Passive Mode (10,0,0,200,6,32)
    [xx:xx:24] Data Socket Error: Connection timed out
    [xx:xx:24] List Complete: 0 bytes in 21.44 (1.00 KBps)


    这是为什么呢?
     
    答案就是在被动模式下,FTP SEVER告诉客户端的数据端口,无法被访问。为什么 FTP SERVER1又可以呢?
    因为FTP SERVER1在对外映射的时侯采用了21端口,IOS会自动识别这个端口是FTP控制口,
    从而去检查里面FTP数据控制数据发现服务器告诉客户端的这个用于传送数据的端口,然后自动的添加一条映射。
    phanx# sh ip nat tr | in 10.0.0.100:
    tcp x.x.x.x:21  10.0.0.100:21       y.y.y.y:1585    y.y.y.y:1585
    tcp x.x.x.x:21  10.0.0.100:21       —                   —
    tcp x.x.x.x:1812  10.0.0.20:1812     y.y.y.y:1594    y.y.y.y:1594
     
    而FTP SERVER2映射的端口2211无法自动被识别成FTP端口,所以IOS不会自动的为它建立数据端口的映射。
     
    解决的办法就是用  ip nat service 来指定这个端口。
    access-list 10 permit 10.0.0.200
    ip nat service 10 ftp tcp port 21
    注意,这里的tcp port 21是指的 10.0.0.200的FTP端口21而不是 x.x.x.x的2211。如果FTP SERVER2用的FTP端口是其他的,那么就写对应的端口号。
    这样做了以后,我们的FTP SERVER2就可以以 x.x.x.x:2211 的方式被公网访问了。
     
     
    说道这里,问题已经解决了。但是,有人可能会提出来,既然FTP SERVER1用被动很正常,x.x.x.x:20端口并没有使用,
    那为什么不用把FTP SERVER2主动模式来映射呢?比如这样做:
    ip nat inside source static tcp 10.0.0.200 20 x.x.x.x 20 extendable
    ip nat inside source static tcp 10.0.0.200 21 x.x.x.x 2211 extendable
     
    OK. 这样做其实对于一部分情况是没有问题的。例如客户机的地址是公网地址,或者说能被FTP SERVER2所访问的地址。
    但是如果客户机也是通过NAT/PAT上网的呢?假设客户端地址是192.168.1.111我们将看到这样的情况:

    [00:14:10] PORT 192,168,1,111,6,179
    [00:14:10] 200 PORT Command successful.
    [00:14:10] REST 2028256
    [00:14:10] 350 Restarting at 2028256. Send STORE or RETRIEVE.
    [00:14:10] RETR fool.exe
    [00:14:10] 150 Opening BINARY mode data connection for fool.exe (924668 Bytes).
    [00:14:11] 425 Cannot open data connection.
    [00:14:11] Transfer Failed!


    因为是主动模式,是服务器主动送数据给客户机。那客户机通过控制信息就需要告诉服务器往哪里送,
    但是FTP客户端并不知道自己的公网地址和端口,并且客户机也没有能力去自己的NAT/PAT网关上去开放一个端口让服务器来送数据。
    所以它是以自己的实际地址去告诉服务器的。对于服务器而言,这个地址是无法被访问到的,所以这个办法也有行不通的地方。
    当然,如果FTP客户端支持uPNP能识别到翻译后的公网地址,NAT/PAT网关也有uPNP的能力的话,主动模式的这个问题应该就能解决。
     
    BTW:主动模式的FTP又被称为 "firewall UNfriendly",什么原因? 好好理解哦~
     
     
    PIX/ASA上面的配置方法见:
  • 中国电信 我的e家 e8-B 无线MODEM设置指南 阿尔卡特 100A-AA型

    Posted on 12月 21st, 2008 phanx No comments
    今天费劲周折,去电信换了一个号称无线Modem的东西。结果回来翻了半天说明书都没有看见在什么地方设置路由和NAT。
    Google一番,发现这个玩意儿是电信定制过的。电信可以远程网管。。。给大家贴在机器上的实际上是个Viewer帐号,
    真正的管理员帐号是 telecomadmin 密码是 nE7jA%5m
    通过这个帐号登录进去以后就可以配置拨号和路由了。
    点击“网络”,即可看到配置界面。
    连接名称选“1_INTERNET_R_x_xx"
    模式选"Route"
     "PPPoE"
    勾上"PPPoE路由桥混合模式"
    VPI用已有的
    VCI用已有的
    服务类型选"UBR Without PCR"
    勾上"NAT"
    用户名填入 拨号的用户名
    密码填入对应的密码
    服务名称 任意填
    拨号方式 包月的就选 "自动连接"
    服务模式选 "INTERNET"
    然后保存,重启即可。
     
     
    说明以下 VPI/VCI 号各个地方电信都不一样,一般来说领回来的机器上是默认设置好了的。
    如果没有,可以参考http://www.chinadsl.net/bbs/thread-29151-1-1.html 全国ADSL宽带虚拟通道值 VPI、VCI值征集【电信、网通、铁通】
    默认还有一个TR069连接,那是电信用来管理这个MODEM的连接,走的另外的VPI/VCI,用的DHCP方式得到地址。
    可以把这个连接删了,这样电信就没有办法管理了,要不然你的telecomadmin的口令可能就被改了。
     
     
  • TCP Intercept防止TCP SynFlood DoS

    Posted on 12月 18th, 2008 phanx No comments
    ========phanx.com=========
    Author:  phanx
    Updated: 2008-12-18
    =========================
     
    今天居然有人SynFlood我的Web Server,无聊的人还真多。。。
    偶然跑到Router上检查,居然发现有大量的NAT条目,一看端口很规律,都是去往Web Server的80的,而且源地址是同一个,源端口依次递增。
    估计是TCP SynFlood了,不过幸好还不是超多。
     
    于是使用2800自带的防止SynFlood DoS的功能TCP Intercept。
    配置简单,立马见效,5 seconds 不Established,就向Server发送TCP RST了 。
     
    ip tcp intercept list TCPINTERCEPT
    ip tcp intercept connection-timeout 300
    ip tcp intercept watch-timeout 5
    ip tcp intercept mode watch
     
    ip access-list extended TCPINTERCEPT
       permit tcp any host 188.8.8.8 eq 80
     
     
    phanx_Router#sh tcp intercept con
    Incomplete:
    Client                Server                State    Create   Timeout  Mode
    221.201.145.24:51247  188.8.8.8:80        SYNSENT  00:00:04 00:00:00 W
    221.201.145.24:51246  188.8.8.8:80        SYNSENT  00:00:04 00:00:00 W
    221.201.145.24:51245  188.8.8.8:80        SYNSENT  00:00:04 00:00:00 W
    221.201.145.24:51251  188.8.8.8:80        SYNSENT  00:00:03 00:00:01 W
    221.201.145.24:51250  188.8.8.8:80        SYNSENT  00:00:04 00:00:00 W
    221.201.145.24:51249  188.8.8.8:80        SYNSENT  00:00:04 00:00:00 W
    221.201.145.24:51248  188.8.8.8:80        SYNSENT  00:00:04 00:00:00 W
             
    Established:
     
     
    phanx_Router#sh tcp intercept st
    Watching new connections using access-list TCPINTERCEPT
    11 incomplete, 0 established connections (total 11)
    55 connection requests per minute
     
    还好还好,不是动真格的。。。
     

    以下是NAT记录。
    phanx_Router#sh ip nat translations
    Pro Inside global         Inside local          Outside local         Outside global
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:1055    60.240.247.48:1055
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:1060    60.240.247.48:1060
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:1061    60.240.247.48:1061
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:1094    60.240.247.48:1094
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:1116    60.240.247.48:1116
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:3688    60.240.247.48:3688
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:3689    60.240.247.48:3689
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:3690    60.240.247.48:3690
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:4887    60.240.247.48:4887
    tcp 218.104.217.135:80    188.8.8.8:80        60.240.247.48:4993    60.240.247.48:4993
    Pro Inside global         Inside local          Outside local         Outside global
    tcp 218.104.217.135:80    188.8.8.8:80        94.240.224.240:59779  94.240.224.240:59779
    tcp 218.104.217.135:80    188.8.8.8:80        94.240.224.240:60091  94.240.224.240:60091
    tcp 218.104.217.135:80    188.8.8.8:80        94.240.224.240:62937  94.240.224.240:62937
    tcp 218.104.217.135:80    188.8.8.8:80        94.240.224.240:64645  94.240.224.240:64645
    tcp 218.104.217.135:80    188.8.8.8:80        94.240.224.240:65373  94.240.224.240:65373
    tcp 218.104.217.135:80    188.8.8.8:80        121.229.68.69:1134    121.229.68.69:1134
    tcp 218.104.217.135:80    188.8.8.8:80        123.115.1.69:7744     123.115.1.69:7744
    tcp 218.104.217.135:80    188.8.8.8:80        123.115.1.69:8241     123.115.1.69:8241
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:18860  221.201.145.24:18860
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:18999  221.201.145.24:18999
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:40572  221.201.145.24:40572
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:40573  221.201.145.24:40573
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:40574  221.201.145.24:40574
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:40575  221.201.145.24:40575
    tcp 218.104.217.135:80    188.8.8.8:80        221.201.145.24:40576  221.201.145.24:40576
    tcp 218.104.217.135:80    188.8.8.8:80        —                   —
  • nslookup 解析域名的一点发现

    Posted on 11月 21st, 2008 phanx No comments
     ========phanx.com=========
    Author:  phanx
    Updated: 2008-11-21
    =========================
     
    C:Documents and SettingsAdministrator>nslookup bbs.scu.edu.cn
    Server:  68.128.128.61.cq.cq.cta.net.cn
    Address:  61.128.128.68
    Non-authoritative answer:
    Name:    bbs.scu.edu.cn.huawei.com1
    Address:  219.153.42.248
    C:Documents and SettingsAdministrator>ping bbs.scu.edu.cn
    Pinging bbs.scu.edu.cn [125.69.85.16] with 32 bytes of data:
    Reply from 125.69.85.16: bytes=32 time=8ms TTL=54
    Reply from 125.69.85.16: bytes=32 time=8ms TTL=54
    Reply from 125.69.85.16: bytes=32 time=8ms TTL=54
    Reply from 125.69.85.16: bytes=32 time=8ms TTL=54
    Ping statistics for 125.69.85.16:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 8ms, Maximum = 8ms, Average = 8ms
    C:Documents and SettingsAdministrator>
     
    用nslookup解析的时候为什么会多出一个 huawei.com1的后缀呢?
    原来nslookup解析域名的时候会自动把domain附加在输入的名字后面
    在nslookup中用set all检查参数
    > set all
    Default Server:  68.128.128.61.cq.cq.cta.net.cn
    Address:  61.128.128.68
    Set options:
      nodebug
      defname
      search
      recurse
      nod2
      novc
      noignoretc
      port=53
      type=A
      class=IN
      timeout=2
      retry=1
      root=A.ROOT-SERVERS.NET.
      domain=huawei.com1
      MSxfr
      IXFRversion=1
      srchlist=huawei.com1
    >
    原来附加了一个huawei.com1
    修改一下set nosearch
    然后再解析就对了
     
    > bbs.scu.edu.cn
    Server:  68.128.128.61.cq.cq.cta.net.cn
    Address:  61.128.128.68
    Non-authoritative answer:
    Name:    bbs.scu.edu.cn
    Address:  125.69.85.16
    >
     
  • 7600 SPA-IPSEC-2G和SPA-5xGE-V2配合之小问题

    Posted on 11月 13th, 2008 phanx 1 comment
    ========phanx.com=========
    Author:  phanx
    Updated: 2008-11-13
                        2009-03-08
    =========================
     
    某用户需要用SPA-IPSEC-2G在7600上实现到n多节点的IPSec Site-to-Site VPN, 由于7600引擎上的以太口做子接口配合IPSEC SPA不支持CBWFQ,
    故又弄了块SPA-5xGE-V2.

    说起SPA-5xGE-V2这卡也怪,在6500机框上要用7600-SIP-600来装,在7600上就非得用7600-SIP-400来装. 当然SPA-IPSEC-2G只能装在7600-SSC-400 上
    弄得之复杂.

    SPA-IPSEC-2G是采用的Vlan Connect方式,即一个在传统直连链路上将IPSEC加速模块嵌入进去.以前是用一个以太口的子接口连接对方.现在则将以太口子接口上的地址移到inside interface vlan上. 然后再用 outside vlan或者一个子接口去连接对方,最后通过connect方式将inside vlan和outside vlan/sub-interface桥接起来.

    以前是 sub-interface ——> 对端    或者 interface vlan & switchport trunk ——-> 对端

    interface Vlan2
     ip address 1.1.1.1 255.255.255.252
    interface G1/1
     switchport trunk encapsulation dot1q
     switchport mode trunk
    或者
    interface G4/0/0.2
     encapsulation dot1q 2
     ip address 1.1.1.1 255.255.255.252
     

    现在是 interface Vlan.inside —[connect engine]— [SPA-IPSEC-2G] — [connect vlan.inside] — vlan outside in switchoport trunk ——>对端

    或者是 interface Vlan.inside —[connect engine]— [SPA-IPSEC-2G] — [connect vlan.inside] — sub-interface.outside ——>对端

    interface Vlan102
     ip address 1.1.1.1 255.255.255.252
     crypto engine slot 2/0
    interface Vlan2
     crypto connect vlan 102
    interface G1/1
     switchport trunk encapsulation dot1q
     switchport mode trunk

    或者
    interface Vlan102
     ip address 1.1.1.1 255.255.255.252
     crypto engine slot 2/0
    interface G4/0/0.2
     encapsulation dot1q 2
     crypto connect vlan 102

    配置方式就说到这里. Guide上写的很明确,but 遇到一个Bug..

    CSCsg49757 Bug Details
    Combining Gig-Sub-intf & crypto connect & vlan with crypto engine
    Symptom:Unable to get the VPN configuration working with a GigabitEthernet SPA module. In addition, clear text connectivity outside the 7600/6500 does not workConditions:

    This problem only occurs if sub-interfaces are used on the GigabiotEthernet SPA module

    Workaround:

    Configure ‘cdp enable’ on the sub-interface

    什么意思呢,简单说就是用子接口方式做就ping不通对端,IPSec也不行…. 解决方法是在子接口下多配一个 cdp enable…. //寒…

    仿佛SPA的GE卡默认就没有开起cdp. 查了Bug Toolkit,发现还没有版本修复这个BUG的(到12.2(33)SRC1为止). 就用Workaround凑合吧.

    又遇到另外一个不知道是不是Bug的问题. 由于对端节点较多,所以子接口数目较多, 别人贴配置的时候一不留神把某几个子接口的配置多贴了一次.

    贴完发现crypto connect语句重复的地方有提示 xxxx already connect to vlan xxx, 然后发现重复的子接口下的OSPF neighber就起不来了.ping也能ping通对端,就是OSPF无法建立邻接关系. Debug看本端有OSPF的Hello出去,但是在对端Debug却没有收到. 无奈之下,no掉子接口下crypto connect语句重新配上,好了.

    依此办法对其他贴重复的子端口重配crypto connect语句, OSPF Neighbor就全部正常了.

    看来SIP/SPA的bug还真不少….!


     

    再补充一个SPA-IPSEC-2G的BUG,在Catalyst 6500 Series Switches Release Notes for Cisco IOS Release 12.2(33)SXH and Later Releases中提到:Note SPA-IPSEC-2G does not support TACACS+ authentication for IPsec. (CSCee33200)

    也就是说用SPA-IPSEC-2G来做Remote Access VPN的时侯没法用TACACS来做XAuth。我同事就很走运的遇到这个BUG了。

  • 2950/2960 Port Manager Internal Software Error

    Posted on 11月 13th, 2008 phanx No comments
    ========phanx.com=========
    Author:  phanx
    Updated: 2008-11-13
    =========================
     
    一台2950出现大量的Port Manager Internal Software Error. LOG如下:
    CST: %PM-3-INTERNALERROR: Port Manager Internal Software Error (vlanid >=0 && vlanid
    < PM_MAX_VLANS: ../switch/pm/pm_vlan.c: 564: pm_vlan_get_vlan_data)
     -Traceback= 5B7438 60A1E0 617A48 B36EB8 B3A5BC AE7380 AE840C BDD138 BD470C
    *Mar  1 08:06:02.052 CST: %PM-3-INTERNALERROR: Port Manager Internal Software Error (vlanid >=0 && vlanid < PM_MAX_VLANS: ../switch/pm/pm_vlan.c: 609: pm_vlan_get_vlan_data)
    -Traceback= 5B7438 60A1E0 617A48 B36EB8 B3A5BC AE7380 AE840C BDD138 BD470C
    *Mar  1 08:06:04.048 CST: %PM-3-INTERNALERROR: Port Manager Internal Software Error (vlanid >=0 && vlanid < PM_MAX_VLANS: ../switch/pm/pm_vlan.c: 609: pm_vlan_get_vlan_data)
    -Traceback= 5B7438 60A1E0 617A48 B36EB8 B3A5BC AE7380 AE840C BDD138 BD470C
    *Mar  1 08:06:04.048 CST: %PM-3-INTERNALERROR: Port Manager Internal Software Error (vlanid >=0 && vlanid < PM_MAX_VLANS: ../switch/pm/pm_vlan.c: 609: pm_vlan_get_vlan_data)
    -Traceback= 5B7438 60A1E0 617A48 B36EB8 B3A5BC AE7380 AE840C BDD138 BD470C
    *Mar  1 08:06:06.053 CST: %PM-3-INTERNALERROR: Port Manager Internal Software Error (vlanid >=0 && vlanid < PM_MAX_VLANS: ../switch/pm/pm_vlan.c: 609: pm_vlan_get_vlan_data)
    -Traceback= 5B7438 60A1E0 617A48 B36EB8 B3A5BC AE7380 AE840C BDD138 BD470C
    *Mar  1 08:06:06.053 CST: %PM-3-INTERNALERROR: Port Manager Internal Software Error (vlanid >=0 && vlanid < PM_MAX_VLANS: ../switch/pm/pm_vlan.c: 609: pm_vlan_get_vlan_data)
     
    开始以为是软件BUG,遂即升级到最新的12.1(22)EA12,故障依旧.
    后来,更换成一台2960,仍然报错.
     
    检查STP.
     
    2960#sh spanning-tree
     
    VLAN0001
      Spanning tree enabled protocol rstp
      Root ID    Priority    49152
                 Address     00b0.8e21.9400
                 Cost        3004
                 Port        49 (GigabitEthernet0/1)
                 Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
     
      Bridge ID  Priority    49153  (priority 49152 sys-id-ext 1)
                 Address     0021.1c7a.8380
                 Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
                 Aging Time 300
      UplinkFast enabled but inactive in rapid-pvst mode
     
    Interface        Role Sts Cost      Prio.Nbr Type
    —————- —- — ——— ——– ——————————–
    Fa0/23           Desg FWD 3019      128.23   P2p
    Fa0/47           Desg BKN*3019      128.47   P2p *PVID_Inc
    Fa0/48           Desg BKN*3019      128.48   P2p *PVID_Inc
    Gi0/1            Root FWD 3004      128.49   P2p Peer(STP)
     
     
    Fa0/47和Fa0/48连接的是同一台设备2811的HWIC-4ESW模块的Fa0/0/0和Fa0/0/1端口.
     
    我检查了2811上的配置,发现用户将vlan 99上的STP关闭了.询问原因是2811上的vlan99和其他H3C的设备连接时,运行生成树会有一些问题,所以将其关闭.
     
    经过测试,发现打开2811上的vlan99的生成树则2950上不会出现报错,所以恢复2811上的生成树就可以解决这个问题,但是又会造成H3C设备的问题.
     
     
    由于*PVID_Inc是说两边STP的Vlan数目不一致,导致端口的Vlan1被Block,
    鉴于用户没有使用vlan1,所以我采用了在2950上Fa0/47和Fa0/48上将vlan1从trunk中remove后,设备不再报错.
     
    另外说一下,发现HWIC-4ESW模块上的口子无法做Port Channel……. 囧rz
     
     
  • Cisco VPN Client Automatic Initiation 自动重连

    Posted on 07月 11th, 2007 phanx 1 comment
    ========phanx.com=========
    Author:  phanx
    Updated: 2007-7-11
    =========================
     
    默认情况下,Cisco VPN Client软件在断线以后无法自动重连。某个地方,却需要自动重连功能.
    search了一番guide.找到如下解决办法:
     
    通过修改vpnclient.ini,可以实现断线后自动重连。
     
    vpnclient.ini
    在[Main]段上添加三句
    AutoInitiationEnable=1       // 允许自动发起连接
    AutoInitiationRetryInterval=1    // 自动发起连接重试间隔时间(单位分钟)
    AutoInitiationList=XXXXX      // 自动连接配置段名称
    XXXXX为自动连接的字段名
    然后在[XXXXX]字段下写四句
    [XXXXX]
    Network=15.66.13.0            // 实际地址段
    Subnet=255.255.255.252     // 实际掩码
    ConnectionEntry=ATM1        // 需要连接的项目,对应VPN Client中建立的连接项目
    Connect=1                        // 允许自动连接
     
    修改后,VPN GUI界面在Options下也会多出一项Automatic VPN Initiation…