2009年6月8日星期一

《Cisco UC项目常见问题及解决方法》(11月8日更新)

转自:第四帝国 发表于: 2008-10-28 22:00 来源: UC帝国

首先,本文源自Cisco UC Team,作者应该是adam。这里就是抛砖引玉,慢慢丰富资料

第一大类:Callmanager
1.OS product key:
BTOO-VQES-CCJU-IEBI
2.增加subscriber 服务器
(1). 在publisher上增加一个server
(2). 在subscriber上手动启动需要的服务
(3). login 到CLI界面, utils dbreplication status检查数据库复制的状态
3.如何实现批量地添加和修改话机/用户或修改指定属性
4.BAT无法插入带中文的内容:
含中文的CSV文件应采用UTF-8编码方式保存
5.自定义service无法显示中文内容:
包含中文的asp文件保存时应采用UTF-8编码方式。
6.无法手动话设置机
1.在话机上按setting键,屏幕右上角显示上锁的图标。
2.按** # 解锁。图标变成打开的锁。
3.设置其他参数
7.无法为话机设置固定的IP地址
1. 在话机上按setting钮
2. 按 3 选择 Network Configuration.
3. 选择DHCP
4. 按 softkey NO.
5. 按 softkey Save.
6. 选择IP address
7. 输入IP 地址,小数点按*键
8. 按 softkey Save
8.为话机设置指定的tftp server
1. 在话机上按setting钮
2. 按 3 选择 Network Configuration.
3. 选择TFTP server
4. 输入IP 地址,小数点按*键
5. 按 softkey Save
9.清除话机上所有的配置
CallManager 4
1. 在话机上按setting钮
2. 按 3 选择 Network Configuration.
3. 按 33 选择 Erase Configuration.
4. 电话重启.
CallManager 5
1. 在话机上按setting钮
2. 按** # 解锁。图标变成打开的锁
3. 选择要清除的设置选项
4. 按屏幕最右侧的”清除” softkey
10.IP Communicator软电话按键显示为乱码
1. 删除IE的cookie。
2. 重新运行CIPC
11.话机经常死机,通话异常中断
升级话机的phone load。
12.如何在CallManager 上检查IP phone 话机状态
选择Device > Phone > Search
话机状态含义:
Registered: 话机目前在线,正常注册到CallManager。
Unregistered: 话机目前不在线,但是曾经正常注册到CallManager过。
Not Found: 话机目前不在线,并且从未在CallManager注册过。
13.Partition, calling search space是配置在电话上还是配置在号码上好
每一台电话上可以设置多个电话号码(Directory number), 每个号码称为一条线(line)。每个号码可以有自己独立的属性。
因此建议将partition, calling search space尽量配置在号码上, 即在Directory number页面做配置,而不是在Phone的页面去设置。
如果在号码上的域中未做特殊配置,CallManager 将使用电话上对应的属性;如果电话上也未配置,CallManager 将使用Device Pool中对应域的属性设置。
14.如何设置本地化的参数
选择Device > Phone, 进入话机配置页面
Network Locale:
定义了和本地电信网相关的参数:tones and cadences
User Locale:
定义了和用户相关的参数:语言和字体等
15.如何定制电话上号码的显示内容
Directory number: 电话液晶屏第一行显示的是本机的第一个号码,一般是分机号。如果设置了external phone mask,则显示external phone mask + directory number,即完整的市话外线号码。
Line Text Label: 每条线按钮左侧的显示。一般是电话使用者的名字,或者是所在的位置,如会议室一。可以是双字节字符。如未配置,则显示号码。
Line Text Label ASCII: 当话机不支持双字节字符时,将显示此内容。
Display: 电话接通后在对方话机上显示的你的名字。如未配置,则显示号码。
ASCII Display:当被叫话机不支持双字节字符时,将显示此内容。
Alerting Name: 对方拨打你的分机,振铃时,在对方话机上显示的你的名字。如未配置,则显示号码。
Alerting Nam ASCII: 当话机不支持双字节字符时,将显示此内容。
16.在SRST环境下中文用户名如何处理
在切换到SRST状态时,系统不支持中文。话机上的原来的中文部分无法正常显示。
在号码配置中的Line Text Label ASCII, ASCII Display, Alerting Nam ASCII域中填入对应的拼音或者英文。在SRST时,系统将使用 这些内容显示到话机上。
17.可以接电话却无法呼叫其他分机
检查被叫号码所在的partition是否在己方的calling search space中。
18.可以从外线呼入,但是无法呼出
1. 检查语音网关所在的partition是否在己方的calling search space中。
2. 在语音网关上debug isdn q931或debug csm voice 。
看来自CallManager 的呼叫是否送达网关。
3. 检查主叫及被叫号码是否正确
对于有DID功能的用户。当用户发起的呼叫进入PSTN网时,电信运营商会检查用户的主叫号码是否合法,即是否在它分配给该用户的号段范围内。如果非法,则会拒绝该呼叫。
常见原因是主叫号码只送了分机号,没有包括局向部分。
4. 检查reject原因代码。
19.可以正常呼入呼出,也可以手工转电话,但是外线呼入再call forward all到手机或市话总是失败
从外线打入再Call forward all转出时,主叫号码是原外线号码,不是用户的内部号码。因此被运营商认为非法,会拒绝该呼叫。
解决方法:
和电信运营商协商,放松检查
Work around:
在CallManager上设置修改主叫号码,转换到合法的号码范围。
缺点是被叫方将看到不正确的主叫号码。
1. 增加一个partition: CFWALL_PT
2. 增加一个calling search space: CFWALL_CSS
3. 增加一个translation pattern:
Translation Pattern 为空
partition: CFWALL_PT
calling search space: 可以拨打外线的CSS。
Calling Party Transform Mask:一个固定的合法号码,例如:85155000
4. 选择要更新的号码Call Forward and Call Pickup Settings > Forward All > Calling Search Space > CFWALL_CSS
20.本地呼叫和拨打异地分机都正常,但是异地出PSTN网失败
原因是主叫号码不在异地号码的范围内,被对方运营商拒绝。
解决方法同上。
21.呼叫异地分机时,如何将主叫本地分机号和异地的分机号区别开来
在CallManager 之间的intercluster trunk设置界面,设置Calling Number Transform,增加代表地域的区号。
22.分机可以呼出外线,但是外线拨入时提示“此号码不存在”
其中一条外线在网关上配置工作正常,但是没有在CallManager上进行相应的MGCP配置。
23.某些800号电话无法接通,其他的可以
部分国际服务的800号电话在网通和中国电信使用不同的接入号。根据租用的线路,选择相应的号码。
24.电话可以振铃并接通,却听不到声音,并马上中断
主被叫语音编码方式不匹配, 又没有配置transcoder资源可以进行转换。
IP Phone的默认codec是 G.711 ulaw
中国默认codec是 G.711 alaw
25.可以拨打Hunt group成员的号码,但是拨Hunt Pilot号码失败
1. 检查Hunt Pilot的设置
2. “Reset” Hunt Pilot
26.接电话时,第二个电话拨入却听不到忙音提示
当我们在接电话时,如果有第二个电话打入,话机将提示有第二个电话进来,让接听者决定是否要hold第一个电话去接听 第二个电话。而此时第二个电话的呼叫方听到的只是电话振铃的回铃音,并不知道被叫方正在接听电话。目前CallManager 不能支持客户化的提示“您所拨叫的用户正在通话中,请不要挂机”。
CallManager 的默认设置是每个号码可以同时可以接受两路呼入。要修改这个参数要进到directory number的设置界面,找到busy trigger参数,默认值是2。修改成1 后,第二路呼入将听到忙音。
27.调整转入语音信箱前响铃的时间
系统层面的timer:
System > Service Parameter > Callmanager > Clusterwide Parameters (Feature - Forward) > Forward No Answer Timer (default = 12)
每个号码的timer:
Directory Number > No Answer Ring Duration (seconds)
28.所有attendant console的operator都log off了,但是外线呼入仍不转到语音信箱
在Attendant console对应的Hunt Group中,选择使用User Member 的方式定义成员,而不是使用Device Member的方式。
当一个User退出登录后,其对应的号码也同时离开Attendant console的Hunt Group。新的呼叫就不会被路由到该话机。
29.打长途权限的控制方式
两种方式可以实现长途权限控制
方法一:针对不同的号码设置不同的权限.
将代表国内,国际的route pattern分别放入不同partition。再设置相应的calling search space。不同的号码或话机,分配不同的calling search space 。
只有有权限的话机和号码才可以打长途。
方法二:针对不同的用户设置不同的权限
有长途权限的每个用户分配一个FAC码。在他拨长途是当做密码输入,进行控制,并可以根据FAC码计费。
每个FAC码在系统中必须是唯一的。因此实施中应通过随机数生成软件,一次生成足量的FAC码,以确保其唯一性。
不同的route pattern可以分别设置不同的FAC级别,只有拥有高于其级别的FAC码的用户才可以拨打此route pattern对应的号码。因此,此方式可以实现非常灵活精确的控制。
注:不能打长途的用户可以通过有权限的用户帮助拨打,再转接过来的方式实现长途功能。
30.如何实现服务热线电话
依次配置Line Group, Hunt List, Hunt Pilot
31.如何实现按0, 即转总机
1. 选择 Route Plan > Translation Pattern
2. 在Translation Pattern域内填入“0”
3. 在 Called Party Transform Mask域填入总机接线员的实际分机号
32.如何实现摘机自动直拨(PLAR)
1. Create a partition.
2. Create a CSS
3. Create a translation pattern.
Select the desired partition name and CSS that were previously created in Step 1 and Step 2. Finally, under Called Party Transformation Mask, enter the Hotdial number that you want the phone to dial when it goes off-hook.
Note: Ensure that the Translation Pattern field is left blank.
4. select the CSS that you configured in Step 2 for the PLAR phone's CSS
控制转语音信箱前的响铃时间
33.如何实现在missed call, answered call中的外线号码前自动加9
1. Create a partition called Translate_PT.
2. Create a Calling Search Space (CSS) called Translate_CSS.
The only partition to be assigned to this CSS is Translate_PT.
3. Assign the Translate_CSS to a gateway. As configured in step 2, the gateway can only access the Translate_PT partition and cannot reach any phone directly.
4. Create a translation pattern with the internal extension
a) Select Translate_PT from the Partition drop−down list.
b) Select from the Route Filter drop−down list.
c) Select Internal_Phones CSS from the Calling Search Space drop−down list.
d) Check the Route this pattern checkbox.
e) Check the Use Calling Party's External Phone Number Mask checkbox
f) Under the Calling Party Transformation section, enter 9XXXXXXXXXX or a pattern that matches the internal dialing plan, in the Calling Party Transform Mask field.
g) To verify that no phone can reach this translation pattern, ensure that the CSS assigned to the phones does not include this translation pattern. In this case, Translate_PT cannot be included in any CSS which contains phones.
34.分析号码路由和号码转换是否正确的工具
CallManager 4.X
1. 安装Cisco CallManager Dialed Number Analyzer
选择Application > Install Plugins > Dialed Number Analyzer Plugin
2. 登录DNA
Start > Programs > Cisco Dialed Number Analyzer > Cisco Dialed Number Analyzer.
或 https:///dna/main.asp
3. 选择Analysis > Analyzer.
CallManager 5.X
1. 登录CallManager 管理界面,在右上角的Navigation下拉菜单中选择“Cisco Unified CallManager Serviceability”, 点击GO
2. 点击Tool > Dialed Number Analyzer
3. 点击 Analysis > Analayzer
35.启动CDR呼叫记录
1. 登录CallManager 管理界面点击System > Service Parameter > Cisco Callmanager > System
Enable CDREnabled 和CallDiagnosticsEnabled
2. Restart Cisco CAR Scheduler service
3. 在CallManager 管理界面,在右上角的Navigation下拉菜单中选择“Cisco Unified CallManager Serviceability”, 点击GO
4. 登录CallManager Tools > Service Activation.
36.查询某个用户的电话呼叫的历史记录
普通用户登录后可以察看自己的呼叫记录;CDR管理员登录后,可以查询所以人员的呼叫记录。
CallManager 4.X
1. 安装Cisco CDR Analysis and Reporting
选择Application > Install Plugins > CDR Analysis and Reporting
2. 登录CDR有两种方式:
 For CAR system administrators only — From Cisco Unified CallManager Serviceability, choose Tools > CDR Analysis and Reporting.
 For CAR users or administrators — From the web browser, enter https://:8443/car/Logon.jsp
首次登录时默认的用户名是admin,口令也是admin
CallManager 5.X
1. 登录CallManager 管理界面,在右上角的Navigation下拉菜单中选择“Cisco Unified CallManager Serviceability”, 点击GO
2. 点击Tool > CDR Analysis and Reporting
3. 用要查询的用户名登录
37.查询所有用户的呼叫记录
CallManager 4.X
1. 使用用户名admin,口令admin登录
2. 添加CallManager 用户到管理员组
3. https://:8443/car/Logon.jsp,以管理员名字登录
4. 查看所有通话记录
CallManager 5.X
1. 在CallManager 上添加用户到Standard CAR Admin Users用户组
2. 登录CallManager 管理界面,在右上角的Navigation下拉菜单中选择“Cisco Unified CallManager Serviceability”, 点击GO
3. 点击Tool > CDR Analysis and Reporting
4. 用该用户名登录
5. 查看所有通话记录: 点击 User Reports >
6. 输出所有通话记录: 点击 CDR > Export CDR/CMR
38.话机无法显示其他电话的当前状态
话机的calling search space配置不正确。
If you do not select a different calling search space for presence requests, the SUBSCRIBE Calling Search Space defaults to None.
You apply the SUBSCRIBE Calling Search Space to the SIP trunk, phone, end user, or autogenerated device profile (for phones with extension mobility support only).
The SUBSCRIBE Calling Search Space associated with an end user gets used for extension mobility calls.
39.更换IP Phone 7970话机背景图片
40.更换IP Phone 7970话机铃声
铃声格式为raw:
 Raw PCM (no header)
 8000 samples per second
 8 bits per sample
 uLaw compression
 Maximum ring size—16080 samples
 Minimum ring size—240 samples
 Number of samples in the ring is evenly divisible by 240.
 Ring starts and ends at the zero crossing.
文件名:Ringlist.xml


Analog Synth 1
Analog1.raw


Analog Synth 2
Analog2.raw


41.升级话机的软件
1) 下载相应型号话机的phone code。
SCCP版本:cmterm-79XX-sccp.x-x-x
SIP版本:cmterm-79XX-sip.x-x-x
CallManager 4的版本是 .zip或.exe后缀的文件
CallManager 5的版本是 .cop后缀的文件
2) 上载到CallManager server
从CallManager 管理界面,点击右上角的下来菜单,登录IPT platform
v选择Software Upgrades > Upload tftp File.
3) 在对应话机的设置中,指定phone load的名字
4) 重启CallManager TFTP service
5) 重启话机
42.更新话机软件,连接第三方SIP server
1) 下载相应型号话机的SIP phone code。
注意:CallManager 5的版本是 .cop后缀的文件
2) 上载到CallManager server
从CallManager 管理界面,点击右上角的下来菜单,登录IPT platform
选择Software Upgrades > Install/Upgrade.
3) 在对应话机的设置中,指定phone load的名字
4) 重启话机
详细设置参见:Converting a Cisco 7940/7960 CallManager Phone to a SIP Phone
注意只有7940/7960/7905/7912可以连接第三方SIP Server,其余都不可以。
43.CallManager 无法和Active Directory同步
1. 登录CallManager 管理界面
2. 选择System > LDAP > LDAP System, 选择Enable Synchronizing from LDAP Server
3. 选择System > LDAP > LDAP Directory
LDAP Manager Distinguished Name域应填写:用户名@域名 (e.g.: administrator@ldap.com)
LDAP User Search Base ou=UC,dc=ldap,dc=com
44.CallManager 5.0的用户
CallManager 5的用户创建之后,不属于任何的group。需要把它增加的到Standard CCM End Users
如果用于CTI或者JTAPI,请加入CTI enabled
45.Upgrade from CallManager 4.0 to 5.0
新server的hostname和ip address必须和原server的完全一致。
备份成的文件,文件名不可以改动。
46.IP phone service
当你修改服务URL或者其中的参数时,确保“Update Subscription”,否则用户需要重新预订服务以正确重建URL
47.Attendant console directory not update
1. 登录CallManager 管理界面
2. Application > attendant console server > User File update
此处可以上载用户自定义的attendant console目录文件CorporateDirectory.txt
删除当前的CorporateDirectory.txt,在客户端登录时会根据当前目录重新生成
3. 登录CallManager serviceability管理界面,
4. Tools > Control Center – Feature service > Attendant Server > restart
5. 在客户端重新登录 AC client
目录存在本地目录Program Files > Cisco > attendant console > user list



第二大类:Unity
1.用administrator身份都无法登录Unity管理员界面
完全按照Cisco安装指南安装的Unity有专门的Unity管理员帐户 ,windows 的administrator用户也无权登录Unity管理界面。
请使用UnityAdmin或UnityInstall用户登录windows。
2.可以远程登录管理员界面,但是在server本地无法登录
IE的cookie问题。不要用IE浏览器的Favorites连接或者桌面的Unity Administrator快捷连接。直接在浏览器地址栏手工输入 http://x.x.x.x/web/sa
3.批量增加语音信箱用户
项目实施时,可以使用Unity Bulk Import大批量地增加用户
1. 创建语音信箱用户模板
a) 登录Unity 管理员界面:http:///web/SA
b) 点击 Subscribers > Subscribers template
c) 设置所有用户共同的特性, 如:用户语言,时区,默认密码等
2. 创建包含语音信箱用户信息的CSV文件
内容包括各用户不同的信息部分,格式为:
ALIAS, LAST_NAME, FIRST_NAME, DTMF_ACCESS_ID
3. 在Unity server上,点击Start > Programs > Unity > Cisco Unity Bulk Import
4. 依屏幕提示操作
4.批量删除语音信箱用户
仅从Unity的管理界面删除subscriber,不能同时自动删除该用户对应的exchange用户。Exchange mailbox用于实际保存对应Unity用户的语音留言文件。
使用Unity Bulk Subscriber Delete可以同时删除这两类用户。
1. 在Unity server上,点击Start > Programs > Unity > Cisco Unity Tools Depot
2. 点击左侧的Unity Bulk Subscriber Delete
3. 依屏幕提示操作
5.批量修改语音信箱用户的属性
1. 在Unity server上,点击Start > Programs > Unity > Cisco Unity Tools Depot
2. 点击左侧的Unity Bulk Edit
3. 依屏幕提示操作
6.创建CallManager用户同时创建相应的Unity 语音信箱用户
在日常维护中增加少量新用户时,可以采用以下步骤一次增加CallManager 和Unity上的用户,而不用分别登录两个server,分两次分别创建帐户。
CallManager 4.X
a. Click User > Global Directory.
b. From the list of users, click the name of the applicable user
c. Click the Create Voice Mailbox link that appears next to the Primary Extension.
与CallManager 4.X集成的方法如下:
1. Browse to CallManager Serviceability > Tools > Control Center, click the CallManager server name, and confirm that the RIS data collector is activated and running.
2. Copy the Voicemailbox.asp file from one of the following locations to the C:\CiscoWebs\Admin directory:
 CommServer\Cscoserv\Concerto\Ccmpages\Skate
 The application URL at http:///concerto
3. Log on to the Unity server by using the Unity installation account.
4. On the Unity server, from a Command Prompt window, run the CommServer\Cscoserv\Concerto\Setup.bat file.
5. Follow the onscreen instructions to complete installation of the Unity CallManager Integrated Mailbox Configuration wizard.
6. From the Services window, stop and restart the Tomcat service.
CallManager 5.X以上可以通过添加Application Server来绑定Unity,在给用户创建DN的时候可以添加Unity用户
7.有语音留言但是话机上的留言灯不亮
在Unity上设置每日定时对Unity数据库和话机留言灯的状态进行同步。
1. 在 Unity server上, click Start > Programs > Cisco Unity > Manage Integrations.
2. 选择对应的集成,点击Properties, 调整每日进行同步 MWI 操作的时间,选择Resynchronize
8.如何测试留言灯是否可以工作
1. 在分机上拨MWI on对应的号码,电话留言灯应该变亮
2. 在分机上拨MWI off对应的号码,电话留言灯应该变灭
9.没有语音信箱的话机,仍可以使用语音信箱键
话机的Voice Mail Profile, 选择“None”选项,是指使用Device Pool中默认的值。
“No Voice Mail”选项才是,没有语音信箱。Message 按钮才不会生效。
10.如何在其他分机上听取给自己的留言
1. 拨打语音信箱的领示号
2. 听到语音提示后,按*键
3. 按提示输入分机号码和密码
11.利用Unity实现自动应答总机
1. 拨打语音信箱的领示号
2. 听到语音提示后,按#键
3. 按提示拨分机号
注:所拨的分机号,必须有对应的语音信箱
12.总机下班后,所有呼叫转到专用的语音信箱
1. 创建一个CTI port:
点击Device > Phone > Add a new phone > CTI port
选择call forward all 到语音信箱
2. 为CTI port对应的号码创建一个语音信箱
3. 在Attendant console对应的Hunt Group中,最后一个成员选择使用Device Member,加入CTI port对应的号码, 选中 always route member
13.无法执行从电话听取电子邮件
1. 检查是否已经安装了unified message license
2. 在该用户profile的class of service项中,检查是否已经enable了该项功能
3. 检查windows server默认语言设置
Step 1 On the Windows Start menu, click Settings > Control Panel > Regional Options.
Step 2 On the General tab, in the Your Locale (Location) list, click Chinese (PRC).
Step 3 In the Language Settings for the System box, click Simplified Chinese.
If you have a multi-lingual system, choose additional languages as applicable.
Step 4 Click Set Default. The Set System Locale dialog box opens.
Step 5 In the Select Appropriate Locale list, click Chinese (PRC).
Step 6 Restart the Cisco Unity server for the changes to take effect.
14.如何利用语言信箱打长途
1. 登录管理员界面
2. 在左侧窗口,选择Subscribers > Subscribers
3. 点击窗口右上角的搜索,选择对应的用户
4. 在左侧窗口,选择Caller Input
5. 在右侧窗口的键盘上,点击要使用的键(例如:1)
6. 点击键盘右侧的Send caller to > Caller System Transfer
7. 修改个人的欢迎词,加入提示:按1拨其他号码,或在“嘀”声后留言。
15.如何监测Unity收到的Callmanager发送过来的号码
Tools Depot > View port
16.通话实时录音
电话接通后,一方按conference softkey,再拨专门用于录音的领示号,再按conference softkey,将Unity 当做三方会议接进来,由Unity进行录音。
录音过程中,没隔一定时间,通话方会听到嘀声,提示正在录音。
配置方法如下:
1. Create a Live Record Pilot Point in CCM and set its CallFwdAll to the VM pilot of the system
2. Create a Call Routing Rule in Unity
 Create a Forwarded Call routing rule and specify the DNIS and the Forwarding Station number of the CCM Route Point Pilot that you created above.
 Send calls to: Start Live Record
详细配置文档:
http://www.ciscounitytools.com/H ... veRecordAppNote.htm
17.加入其他windows domain
1. 将server从domain方式改成workgroup方式:
执行Start > Run > dcprom
2. 加入其他domain
18.Unity server 磁盘满
 Unity server 磁盘满
The customer UnityDB log file had grown too large. Pls do the following to shrink:
How to Squeeze UnityDB if it grows to large:
1. Bring up command prompt
2. osql –E
3. use unitydb
4. go
5. backup log unitydb with no_log
6. go
7. dbcc shrinkdatabase(unitydb)
8. go
9. exit
执行结果,类似以下输出:
C:\>osql -E
1> use unitydb
2> go
1> backup log unitydb with no_log
2> go
1> dbcc shrinkdatabase(unitydb)
2> go
DbId FileId CurrentSize MinimumSize UsedPages EstimatedPages
------ ------ ----------- ----------- ----------- --------------
6 1 2392 80 2384 2384
6 2 63 63 56 56
(2 rows affected)
DBCC execution completed. If DBCC printed error messages, contact your system
administrator.
1> exit

2009年5月22日星期五

Cisco ASA Web VPN 配置详解

zyxa-asa5510(config)# show ver

Cisco Adaptive Security Appliance Software Version 8.0(4)
Device Manager Version 6.1(3)

Compiled on Thu 07-Aug-08 20:53 by builders
System image file is "disk0:/asa804-k8.bin"
Config file at boot was "startup-config"

zyxa-asa5510 up 2 hours 14 mins

Hardware: ASA5510, 256 MB RAM, CPU Pentium 4 Celeron 1600 MHz
Internal ATA Compact Flash, 256MB
BIOS Flash M50FW080 @ 0xffe00000, 1024KB

Encryption hardware device : Cisco ASA-55x0 on-board accelerator (revision 0x0)
Boot microcode : CN1000-MC-BOOT-2.00
SSL/IKE microcode: CNLite-MC-SSLm-PLUS-2.03
IPSec microcode : CNlite-MC-IPSECm-MAIN-2.05
0: Ext: Ethernet0/0 : address is 0023.5e56.6554, irq 9
1: Ext: Ethernet0/1 : address is 0023.5e56.6555, irq 9
2: Ext: Ethernet0/2 : address is 0023.5e56.6556, irq 9
3: Ext: Ethernet0/3 : address is 0023.5e56.6557, irq 9
4: Ext: Management0/0 : address is 0023.5e56.6553, irq 11
5: Int: Not used : irq 11
6: Int: Not used : irq 5

Licensed features for this platform:
Maximum Physical Interfaces : Unlimited
Maximum VLANs : 50
Inside Hosts : Unlimited
Failover : Disabled
VPN-DES : Enabled
VPN-3DES-AES : Disabled
Security Contexts : 0
GTP/GPRS : Disabled
VPN Peers : 250
WebVPN Peers : 2
AnyConnect for Mobile : Disabled
AnyConnect for Linksys phone : Disabled
Advanced Endpoint Assessment : Disabled
UC Proxy Sessions : 2

This platform has a Base license.

Serial Number: JMX1250L26R
Running Activation Key: 0xf730e04b 0x5c75460f 0xc09149b4 0x99dc5cc0 0x8a3a33b4
Configuration register is 0x1
Configuration last modified by enable_15 at 05:10:01.499 UTC Fri May 22 2009


实验环境如拓朴图。


在做实验之前让我们先来了解一下SSL VPN。
  目前市场上VPN产品很多,而且技术各异,就比如传统的 IPSec VPN 来讲, SSL 能让公司实现更多远程用户在不同地点接入,实现更多网络资源访问,且对客户端设备要求低,因而降低了配置和运行支撑成本。很多企业用户采纳 SSL VPN 作为远程安全接入技术,主要看重的是其接入控制功能。
SSL VPN 提供增强的远程安全接入功能。 IPSec VPN 通过在两站点间创建隧道提供直接(非代理方式)接入,实现对整个网络的透明访问;一旦隧道创建,用户 PC 就如同物理地处于企业 LAN 中。这带来很多安全风险,尤其是在接入用户权限过大的情况下。 SSL VPN 提供安全、可代理连接,只有经认证的用户才能对资源进行访问,这就安全多了。 SSL VPN 能对加密隧道进行细分,从而使得终端用户能够同时接入 Internet 和访问内部企业网资源,也就是说它具备可控功能。另外, SSL VPN 还能细化接入控制功能,易于将不同访问权限赋予不同用户,实现伸缩性访问;这种精确的接入控制功能对远程接入 IPSec VPN 来说几乎是不可能实现的。
SSL VPN 基本上不受接入位置限制,可以从众多 Internet 接入设备、任何远程位置访问网络资源。 SSL VPN 通信基于标准 TCP/UDP 协议传输,因而能遍历所有 NAT 设备、基于代理的防火墙和状态检测防火墙。这使得用户能够从任何地方接入,无论是处于其他公司网络中基于代理的防火墙之后,或是宽带连接中。 IPSec VPN 在稍复杂的网络结构中难于实现,因为它很难实现防火墙和 NAT 遍历,无力解决 IP 地址冲突。另外, SSL VPN 能实现从可管理企业设备或非管理设备接入,如家用 PC 或公共 Internet 接入场所,而 IPSec VPN 客户端只能从可管理或固定设备接入。随着远程接入需求的不断增长,远程接入 IPSec VPN 在访问控制方面受到极大挑战,而且管理和运行支撑成本较高,它是实现点对点连接的最佳解决方案,但要实现任意位置的远程安全接入, SSL VPN 要理想得多。
SSL VPN 不需要复杂的客户端支撑,这就易于安装和配置,明显降低成本。 IPSec VPN 需要在远程终端用户一方安装特定设备,以建立安全隧道,而且很多情况下在外部(或非企业控制)设备中建立隧道相当困难。另外,这类复杂的客户端难于升级,对新用户来说面临的麻烦可能更多,如系统运行支撑问题、时间开销问题、管理问题等。 IPSec 解决方案初始成本较低,但运行支撑成本高。如今,已有 SSL 开发商能提供网络层支持,进行网络应用访问,就如同远程机器处于 LAN 中一样;同时提供应用层接入,进行 Web 应用和许多客户端 / 服务器应用访问。

了解了上述基本因素之后,下面我们将开始实验:



第一步,ASA的基本配置:

Archasa(config)# int e0/0

Archasa(config-if)# ip add 192.168.0.1 255.255.255.0

Archasa(config-if)# nameif outside

Archasa(config-if)# no shut

Archasa(config-if)# exit

Archasa(config)# int e0/1

Archasa(config-if)# ip add 172.20.59.10 255.255.255.0

Archasa(config-if)# nameif inside

Archasa(config-if)# no shut

Archasa(config-if)# exit

Archasa(config)# webvpn

Archasa(config-webvpn)# enable outside

Archasa(config-webvpn)# svc image disk0:/sslclient-win-1.1.2.169.pkg

Archasa(config-webvpn)# svc enable

#上述配置是在外网口上启动WEBVPN,并同时启动SSL VPN功能

2、SSL VPN配置准备工作

#创建SSL VPN用户地址池

Archasa(config)# ip local pool ssl-user 10.10.10.1-10.10.10.50

#配置SSL VPN数据流不做NAT翻译

Archasa(config)# access-list go-vpn permit ip 172.20.50.0 255.255.255.0 10.10.10.0

255.255.255.0

Archasa(config)# nat (inside) 0 access-list go-vpn



3、WEB VPN隧道组与策略组的配置

#创建名为mysslvpn-group-policy的组策略

Archasa(config)# group-policy mysslvpn-group-policy internal

Archasa(config)# group-policy mysslvpn-group-policy attributes

Archasa(config-group-policy)# vpn-tunnel-protocol webvpn

Archasa(config-group-policy)# webvpn

#在组策略中启用SSL VPN

Archasa(config-group-webvpn)# svc enable

Archasa(config-group-webvpn)# exit

Archasa(config-group-policy)# exit

Archasa(config)#

#创建SSL VPN用户

Archasa(config-webvpn)# username test password woaicisco

#把mysslvpn-group-plicy策略赋予用户test

Archasa(config)# username test attributes

Archasa(config-username)# vpn-group-policy mysslvpn-group-policy

Archasa(config-username)# exit

Archasa(config)# tunnel-group mysslvpn-group type webvpn

Archasa(config)# tunnel-group mysslvpn-group general-attributes

#使用用户地址池

Archasa(config-tunnel-general)# address-pool ssl-user

Archasa(config-tunnel-general)# exit

Archasa(config)# tunnel-group mysslvpn-group webvpn-attributes

Archasa(config-tunnel-webvpn)# group-alias group2 enable

Archasa(config-tunnel-webvpn)# exit

Archasa(config)# webvpn

Archasa(config-webvpn)# tunnel-group-list enable

4、配置SSL VPN隧道分离

#注意,SSL VPN隧道分离是可选取的,可根据实际需求来做。

#这里的源地址是ASA的INSIDE地址,目标地址始终是ANY

Archasa(config)# access-list split-ssl extended permit ip 10.10.1.0 255.255.255.0 any

Archasa(config)# group-policy mysslvpn-group-policy attributes

Archasa(config-group-policy)# split-tunnel-policy tunnelspecified

Archasa(config-group-policy)# split-tunnel-network-list value split-ssl

基本上整个配置就完成了,下面可以进行测试:

在浏览器中输入https://192.168.0.1访问WEB VPN,在随后弹出的对话框中输入用户名和密码单击登陆。

这时系统会弹出要求安装SSL VPN CLIENT程序,单击“YES”,系统自动安装并连接SSLVPN,在SSLVPN连通之后在您的右下角的任务栏上会出现一个小钥匙状,你可以双击打开查看其状态。

草率此就,有不对的地方请予以指正,谢谢!

2009年5月14日星期四

视频会议流量穿越ASA问题后续原理解释


ASA/PIX系列从6.3开始就有监控引擎了,这个监控引擎的作用
1,通过协商动态分配连接资源,自动生成conn,xlate以及ACL
2,监控应用层的一些命令(安全保护)

我先解释下ASA/PIX的处理过程
当一个数据包到达ASA并请求一个连接时,ASA检查自身的ACL,如果允许这个连接,就创建一个连接项(CONNECT),然后ASA进程查找自身的(inspection)数据库,确定是否需要对此连接进行特别的处理,应用检查对数据包进行必要的修正(fixup),然后再传给目的地,会话建立成功,ASA会将识别出属于此绘画的后续数据包进行转发处理。

比如FTP,FTP是资格特殊的应用,它是用21作为目的端口,但回应的时候会用到随机端口号
client--------in-ASA-out-------ftp server
1,客户端用tcp 21端口号去连接服务器,这是第一信道,它的作用是用户认证,罗列清单(有些什么文件),同时在第一信道理包含了PORT字段告诉服务器你来连接我的什么地址,还有端口号(这个端口号是cilent随机产生的)
2,第二信道是由服务器主动发起的,但是由于此时外部进来的数据目的地址的端口号是内部client告诉ftp服务器的随机端口号,而一般我们配置outside的in方向列表是只会放些知名的端口号,而此时这个随机目的端口号的流量是无法进入内网的,所以会被丢弃,这就造成了FTP无法通过ASA

解决方案
CISCO在7.X里使用inspect ftp来解决这个问题,它的原理就是当client告诉服务器你来连接我的什么地址,还有端口号时,ASA通过7层监控来监控这个请求,这样ASA可以看到里面的client产生的随机端口来放行回来的流量


eve的解决办法
由于7.0(6)的inspect H323出现了某些问题,导致无法使回来的流量过ASA,所以只能手动来监控
1,由于我关闭了inspect H323,必须要手动做出动态放行端口的动作,所以使用如下命令
established TCP 1720 0 permitto UDP 16384 32767 permitfrom UDP 16384 32767------(里面德0表示any)
命令意义:源是any目的是1720出去的时候,放开回来的udp 16384-32767端口号

命令的意义动态放端口命令
establish A B C permitto D E permitfrom D F
使用协议A(TCP|UDP)目的端口B,源端口C,那么就允许回来的协议是D(TCP|UDP)目的端口是E,源端口是F的流量回来


2,打开inspect XDMCP
因为这个established命令需要打开这个做支持,单其实默认是打开的,这里只是提一下

为什么使用udp 16384 32767
答:因为H323会使用H225的TCP 1720来创建TCP初始化连接,然后使用H.225来协商最后RTP流使用的UDP端口号(RTP的端口号是协商出来的),而RTP得端口号是16384-32767里的偶数端口,这个端口+1后的奇数端口就是给RTCP用的,所以要放回这个范围的端口号

加上如上命令后,H323就正常了,但是这个理论上讲ASA应该不用配置就能让H323过的,可能是BUG吧,但是有一点,ASA的监控引擎毕竟支持的协议还是有限,如果你的客户那里遇到了ASA不支持的协议,而且正好这个协议的很多端口号需要协商的时候,这个命令正好有用,^_^CISCO还是为自己留了后路了,感觉还是蛮使用的,在此公享给大家,手酸死了,不敲了,有疑问可以继续跟贴问哦

2009年5月6日星期三

CISCO CME+CUE配置项目实例

2811配NM-CUE模块,用cue来实现AA以及语音信箱功能。同时28接E1线路做VG.并配有fxo用来做备用线路。IP话机有7961+7914模块,ATA用来接传真机。
AEASH-CME#sh run
Building configuration...
Current configuration : 12945 bytes
!
! Last configuration change at 04:45:11 UTC Sat Dec 29 2007 by AEASH
! NVRAM config last updated at 04:45:12 UTC Sat Dec 29 2007 by AEASH
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname AEASH-CME
!
boot-start-marker
boot-end-marker
!
card type e1 0 0
enable password cisco
!
no aaa new-model
!
resource policy
!
network-clock-participate wic 0
no network-clock-participate aim 0
!
!
ip cef
no ip dhcp use vrf connected
ip dhcp excluded-address 10.24.18.1 10.24.18.118
ip dhcp excluded-address 10.24.18.149 10.24.18.254
!
ip dhcp pool sdm-pool1
import all
network 10.24.18.0 255.255.255.0
dns-server 10.24.8.40 10.24.28.40
default-router 10.24.18.1
option 150 ip 10.24.18.1
!
!
no ip bootp server
no ip domain lookup
ip domain name yourdomain.com
ip name-server 10.24.8.40
ip name-server 10.24.28.40
!
!
isdn switch-type primary-net5
!
voice-card 0
no dspfarm
dsp services dspfarm
!
!
!
voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
supplementary-service h450.12
h323
!
!
!
!
!
!
!
!
!
!
!
!
!
voice translation-rule 1
rule 1 /^7/ /2123087/
!
voice translation-rule 2
rule 2 /^2123087/ /7/
!
!
voice translation-profile incall
translate called 2
!
voice translation-profile pstn
translate calling 1
!
!
!
!
username AEASH secret 5 $1$p3im$yx.VX9a6N1ig6jNRLvZ2Q.
!
!
controller E1 0/0/0
framing NO-CRC4 Australia
clock source internal
pri-group timeslots 1-31
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address 10.24.18.1 255.255.255.0
duplex auto
speed auto
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
!
interface Serial0/0/0:15
no ip address
encapsulation hdlc
isdn switch-type primary-net5
isdn incoming-voice voice
isdn T309-enable
isdn T310 120000
isdn bchan-number-order ascending
no cdp enable
!
interface Service-Engine1/0
ip unnumbered GigabitEthernet0/0
service-module ip address 10.24.18.2 255.255.255.0
service-module ip default-gateway 10.24.18.1
!
ip route 0.0.0.0 0.0.0.0 10.24.18.9
ip route 10.24.18.2 255.255.255.255 Service-Engine1/0
!
!
ip http server
no ip http secure-server
!
!
!
control-plane
!
!
!
voice-port 0/0/0:15
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
!
voice-port 0/1/0
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/1/1
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/1/2
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/1/3
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/2/0
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/2/1
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/2/2
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
voice-port 0/2/3
supervisory disconnect dualtone mid-call
cptone CN
timeouts call-disconnect 5
timeouts wait-release 5
timing hookflash-out 500
connection plar opx 7888
caller-id enable
!
!
!
!
!
dial-peer voice 7999 voip
description to-CUE
destination-pattern 7998
session protocol sipv2
session target ipv4:10.24.18.2
dtmf-relay sip-notify
codec g711ulaw
no vad
!
dial-peer voice 30 voip
description AA
destination-pattern 1001
session protocol sipv2
session target ipv4:10.24.18.2
dtmf-relay sip-notify
codec g711ulaw
no vad
!
dial-peer voice 7997 voip
destination-pattern 7997
session protocol sipv2
session target ipv4:10.24.18.2
dtmf-relay sip-notify
codec g711ulaw
no vad
!
dial-peer voice 20 pots
translation-profile incoming incall
translation-profile outgoing pstn
destination-pattern 9T
incoming called-number .
direct-inward-dial
port 0/0/0:15
!
dial-peer voice 42 pots
preference 3
destination-pattern 9T
port 0/1/1
!
dial-peer voice 43 pots
preference 3
destination-pattern 9T
port 0/1/2
!
dial-peer voice 44 pots
preference 3
destination-pattern 9T
port 0/1/3
!
dial-peer voice 45 pots
preference 3
destination-pattern 9T
port 0/2/0
!
dial-peer voice 46 pots
preference 3
destination-pattern 9T
port 0/2/1
!
dial-peer voice 47 pots
preference 3
destination-pattern 9T
port 0/2/2
!
dial-peer voice 48 pots
preference 3
destination-pattern 9T
port 0/2/3
!
dial-peer voice 80 voip
description to-HK
translation-profile outgoing hk
destination-pattern 8...
session target ipv4:10.23.18.20
codec g711ulaw
no vad
!
!
!
!
!
telephony-service
load 7960-7940 P0030702T023
load 7914 S00104000100
load ATA ATA030100SCCP040211A.zup
load 7961 SCCP41.8-0-4SR2S
max-ephones 35
max-dn 70
ip source-address 10.24.18.1 port 2000
timeouts interdigit 5
time-zone 42
voicemail 7998
max-conferences 8 gain -6
moh music-on-hold.au
web admin system name admin password cisco
dn-webedit
time-webedit
transfer-system full-consult
transfer-pattern .T
create cnf-files version-stamp 7960 Dec 28 2007 04:45:41
!
!
ephone-dn 1 dual-line
number 7801
label 7801
description Frankie Ko
name Frankie Ko
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 2 dual-line
number 7802
label 7802
description Brian Han
name Brian Han
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 3 dual-line
number 7804
label 7804
description Leo Fang
name Leo Fang
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 4 dual-line
number 7805
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 5 dual-line
number 7811
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 6 dual-line
number 7807
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 7 dual-line
number 7880
label AEA
description AEA
name AEA
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 8 dual-line
number 7980
label ACA
description ACA
name ACA
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 9 dual-line
number 7810
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 11 dual-line
number 7812
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 12 dual-line
number 7814
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 13 dual-line
number 7884
label 7884
description polycom
name polycom
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 14 dual-line
number 7888
label 7888
description Reception
name Reception
call-forward all 1001
call-forward busy 1000
call-forward noan 1000 timeout 20
!
!
ephone-dn 15 dual-line
number 7881
label 7881
description Meeting Room 1
name Meeting Room 1
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 16 dual-line
number 7882
label 7882
description Meeting Room 2
name Meeting Room 2
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 17 dual-line
number 7883
label 7883
description VC/Board Room
name VC/Board Room
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 18 dual-line
number 7994
call-forward noan 7999 timeout 30
!
!
ephone-dn 19 dual-line
number 7823
call-forward busy 7998
call-forward noan 7998 timeout 10
!
!
ephone-dn 20
number 8000 secondary 8001
mwi on-off
!
!
ephone-dn 21
number 1000
!
!
ephone-dn 31 dual-line
number 7999
!
!
ephone 1
device-security-mode none
description description Frankie Ko
username "Frankie" password 123456
mac-address 001E.4A91.DA1C
type 7961 addon 1 7914
button 1:1 7:15 8:16 9:17
button 10:14 11:2 12:3 13:4
button 14:6 15:9 16:5 17:11
button 18:12 19:19
!
!
!
ephone 2
device-security-mode none
description Brian Han
username "Brian" password 1234
mac-address 001E.4A91.DD20
type 7961 addon 1 7914
button 1:2 7:19
!
!
!
ephone 3
device-security-mode none
description Leo Fang
username "Leo" password 1234
mac-address 001E.4A5F.3724
type 7961
button 1:3
!
!
!
ephone 4
device-security-mode none
username "AEA2" password 1234
mac-address 001E.4A92.899B
type 7961
button 1:4
!
!
!
ephone 5
device-security-mode none
username "AEA5"
mac-address 001E.4A60.0479
type 7961 addon 1 7914
button 1:5
!
!
!
ephone 6
device-security-mode none
username "AEA3" password 1234
mac-address 001E.4A92.8815
type 7961
button 1:6
!
!
!
ephone 7
device-security-mode none
username "fax1" password vdb142763
mac-address 001D.45E8.BB86
type ata
button 1:7
!
!
!
ephone 8
device-security-mode none
username "fax2" password 1234
mac-address 1D45.E8BB.8601
type ata
button 1:8
!
!
!
ephone 9
device-security-mode none
username "AEA4" password 1234
mac-address 001E.4A92.8846
type 7961
button 1:9
!
!
!
ephone 11
device-security-mode none
username "AEA6" password 1234
mac-address 001E.4A60.05A9
type 7961
button 1:11
!
!
!
ephone 12
device-security-mode none
username "AEA7" password 1234
mac-address 001E.4A5F.39D6
type 7961 addon 1 7914
button 1:12
!
!
!
ephone 13
device-security-mode none
username "Polycome" password 1234
mac-address 001D.45E8.C201
type ata
button 1:13
!
!
!
ephone 14
device-security-mode none
description Reception
username "Reception" password 1234
mac-address 001E.4A60.05D8
type 7961 addon 1 7914
button 1:14 7:15 8:16 9:17
button 10:1 11:2 12:3 13:4
button 14:6 15:9 16:5 17:11
button 18:12 19:19
!
!
!
ephone 15
device-security-mode none
description Meeting Room 1
username "Meeting" password 1234
mac-address 001E.4A91.DC5B
type 7961
button 1:15
ephone 16
device-security-mode none
username "Meeting2" password 1234
mac-address 001E.4A91.D9E7
type 7961
button 1:16
ephone 17
device-security-mode none
username "VCBoard" password 1234
mac-address 001E.4A91.D9F4
type 7961
button 1:17
ephone 18
device-security-mode none
mac-address 1D45.E8C2.0101
type ata
button 1:18
ephone 19
device-security-mode none
username "AEA8" password 1234
mac-address 001E.4A91.D8A5
type 7961 addon 1 7914
button 1:19
!
!
!
line con 0
line aux 0
line 66
no activation-character
no exec
transport preferred none
transport input all
transport output all
line vty 0 4
login local
!
no scheduler allocate
!
end

2009年5月2日星期六

Win2003作路由 局域网共享多出口上网

适用于所有调制解调器等连接的网络共享

  一、案例

  本校计算机中心机房共有计算机240台,已互连为局域网,希望访问校内资源时通过校园网接口,而访问外部资源时通过ADSL接口。

  

  二、解决

  Windows XP和Windows 2003都自带ADSL宽带拨号程序,这里只要使用Windows 2003的“路由和远程访问”程序稍加配置,就可搞掂一切。

  

  1、前提

  

  计算机一台(配置不用很高,只要能安装Windows 2003就行),安装有Windows2003操作系统,内插3块网卡,网卡1:连接内部局域网,IP:192.168.1.1,子网掩码:255.255.255.0,网关:空,DNS:空;网卡2:连接ADSL,IP:自动获取,DNS:自动获取;网卡3:连接校园网,IP:202.203.230.2,子网掩码:255.255.255.0,网关:202.203.230.1,DNS:202.203.220.2(假设校园网网段为202.203.220.0—202.203.230.0之间,DNS服务器为202.203.220.2);

  

  2、服务器配置

  

  Step1.单击“开始”—“管理工具”—“路由和远程访问”,启动配置向导;选择本地服务器,单击“操作”—“配置并启用路由和远程访问 ”(图一)。单击“下一步”,选择“自定义配置”—“下一步”;复选“请求拨号连接(由分支办公室路由使用)”和“LAN路由”—“下一步”—“完成”,即可启动路由和远程访问。

  

  Step2.选择“网络接口”,单击“操作”—“新建请求拨号接口”—“下一步”—“下一步”,选择“使用以太网上的PPP(PPPoE)连接 ”—“下一步”—“下一步”,弹出“协议及安全措施”选项,去掉所有钩选,单击“下一步”,输入ADSL帐号和密码,“下一步”—“完成”。

  

  Step3.新建一批处理文件route.bat,并把其快捷方式添加到“开始”—“程序”—“启动”下,编辑route.bat内容如下:

  

  cdroute delete 0.0.0.0

  route add 192.168.1.0 mask 255.255.240.0 192.168.1.1

  route add 202.203.220.0 mask 255.255.240.0 202.203.230.1

  route add 202.203.221.0 mask 255.255.255.0 202.203.230.1

  //(自行把校园网的IP段添加上)

  route add 202.203.230.0 mask 255.255.255.0 202.203.230.1

  

  3、客户机配置

  

  TCP/IP配置如下:IP:192.168.1.x,子网掩码:255.255.255.0,网关:192.168.1.1,首选DNS服务器:当地ADSL域名服务器IP(可向ADSL提供商查询,如昆明电信的为:202.98.160.68),备用DNS服务器:202.203.220.2。此处的DNS设置非常关键,有的人会误把DNS设为:192.168.1.1。

  

  三、总结

  使用此方法实现宽带共享,可节约购买路由器的费用,几乎不占用服务器资源,且只要往服务器上加插网卡,就可任意扩张客户机数量或外部出口。我单位400多台计算机使用此种方法共享一条2MADSL宽带将有一年,运转非常稳定,每台计算机就象在独立使用一根2MADSL在上网,同时可以快速浏览校内资源,实现网上办公,何乐而不为!

2009年4月26日星期日

Cisco E1配置白皮书

E1知识点总结
1、一条E1是2.048M的链路,用PCM编码。
2、一个E1的帧长为256个bit,分为32个时隙,一个时隙为8个bit。
3、每秒有8k个E1的帧通过接口,即8K*256=2048kbps。
4、每个时隙在E1帧中占8bit,8*8k=64k,即一条E1中含有32个64K。

E1帧结构
E1有成帧,成复帧与不成帧三种方式,在成帧的E1中第0时隙用于传输帧同步数据,其余31个时隙可以用于传输有效数据;在成复帧的E1中,除了第0时隙外,第16时隙是用于传输信令的,只有第1到15,第17到第31共30个时隙可用于传输有效数据;而在不成帧的E1中,所有32个时隙都可用于传输有效数据.

一. E1基础知识

E1信道的帧结构简述
  在E1信道中,8bit组成一个时隙(TS),由32个时隙组成了一个帧(F),16个 帧组成一个复帧(MF)。在一个帧中,TS0主要用于传送帧定位信号(FAS)、
CRC-4(循环冗余校验)和对端告警指示,TS16主要传送随路信令(CAS)、复帧定位信号和复帧对端告警指示,TS1至TS15和TS17至TS31共30个时隙传送话音或数据等信息。我们称TS1至TS15和TS17至TS31为“净荷”,TS0和TS16为“开销”。如果采用带外公共信道信令(CCS),TS16就失去了传送信令的用途,该时隙也可用来传送信息信号,这时帧结构的净荷为TS1至TS31,开销只有 TS0了。
由PCM编码介绍E1:
由PCM编码中E1的时隙特征可知,E1共分32个时隙TS0-TS31。每
个时隙为64K,其中TS0为被帧同步码,Si, Sa4, Sa5, Sa6,Sa7
,A比特占用, 若系统运用了CRC校验,则Si比特位置改传CRC校验
码。TS16为信令时隙, 当使用到信令(共路信令或随路信令)时,该
时隙用来传输信令, 用户不可用来传输数据。所以2M的PCM码型有

① PCM30 : PCM30用户可用时隙为30个, TS1-TS15,
TS17-TS31。TS16传送信令,无CRC校验。
② PCM31: PCM30用户可用时隙为31个, TS1-TS15,
TS16-TS31。TS16不传送信令,无CRC校验。
③ PCM30C: PCM30用户可用时隙为30个, TS1-TS15,
TS17-TS31。TS16传送信令,有CRC校验。
④ PCM31C: PCM30用户可用时隙为31个, TS1-TS15,
TS16-TS31。TS16不传送信令,有CRC校验。

CE1,就是把2M的传输分成了30个64K的时隙,一般写成N*64,
你可以利用其中的几个时隙,也就是只利用n个64K,必须接在ce1/pri上。


CE1----最多可有31个信道承载数据 timeslots 1----31
timeslots 0 传同步

二. 接口
G.703非平衡的75 ohm,平衡的120 ohm2种接口

三. 使用E1有三种方法,
1,将整个2M用作一条链路,如DDN 2M;
2,将2M用作若干个64k及其组合,如128K,256K等,这就是CE1;
3,在用作语音交换机的数字中继时,这也是E1最本来的用法,是把一条E1作为32个64K来用,但是时隙0和时隙15是用作signaling即信令的,所以一条E1可以传30路话音。PRI就是其中的最常用的一种接入方式,标准叫PRA信令。

用2611等的广域网接口卡,经V.35-G.703转换器接E1线。这样的成本应该比E1卡低的

目前DDN的2M速率线路通常是经HDSL线路拉至用户侧.
E1可由传输设备出的光纤拉至用户侧的光端机提供E1服务.

四. 使用注意事项
E1接口对接时,双方的E1不能有信号丢失/帧失步/复帧失步/滑码告警,但是双方在E1接口参数上必须完全一致,因为个别特性参数的不一致,不会在指示灯或者告警台上有任何告警,但是会造成数据通道的不通/误码/滑码/失步等情况。这些特性参数主要有;阻抗/ 帧结构/CRC4校验,阻有75ohm和120ohm两种,帧结构有PCM31/PCM30/不成帧三种;在新桥节点机中将PCM31和PCM30分别描述为CCS和CAS,对接时要告诉网管人员选择CCS,是否进行CRC校验可以灵活选择,关键要双方一致,这样采可保证物理层的正常。

五. 嘻嘻阿姨的问题
【 在 lzx (不倒翁) 的大作中提到: 】
: questions:
: 1. E1 与 CE1是由谁控制,电信还是互连的两侧的用户设备?用户侧肯定要求支持他们
: ,电信又是如何 分别实现的。
首先由电信决定,电信可提供E1和CE1两种线路,但一般用户的E1线路都是
CE1,除非你特别要只用E1,然后才由你的设备所决定,CE1可以当E1用,但
E1却不可以作CE1。

: 2. CE1 是32个时隙都可用是吧?
CE1的0和16时隙不用,0是传送同步号,16传送控制命令,实际能用的只有30个
时隙1-15,16-30

: 3. E1/CE1/PRI又是如何区分的和通常说的2M的关系。和DDN的2M又如何关联啊?
E1 和CE1 都是E1线路标准,PRI是ISDN主干线咱,30B+D,DDN的2M是透明线路
你可以他上面跑任何协议。
E1和CE1的区别,当然可不可分时隙了。


: 4. E1/CE1/PRI与信令、时隙的关系
E1,CE1,都是32时隙,30时隙,0、16分别传送同步信号和控制信今,PRI采用
30B+D ,30B传数据,D信道传送信令, E1都是CAS结构,叫带内信令,PRI信令与
数据分开传送,即带外信令。

: 5. CE1可否接E1。

CE1 和E1 当然可以互联。但CE1必需当E1用,即不可分时隙使用。

: 6. 为实现利用CE1实现一点对多点互连,此时中心肯定是2M了,各分支速率是
N*64K<2m,分支物理上怎么接呢?>




2、链路为E1时, channel-group编号为0-30, Timeslot范围1-31.

3、使用show controllers e1观察controller状态,以下为帧类型为crc4时controllers正常

的状态



Router# show controllers e1
E1 2/0 is up.

Applique type is Channelized E1 - balanced

Deion: To DiWang Office

No alarms detected.

alarm-trigger is not set

Framing is NO-CRC4, Line Code is HDB3, Clock Source is Line.

Data in current interval (492 seconds elapsed):

0 Line Code Violations, 0 Path Code Violations

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

Total Data (last 24 hours)

0 Line Code Violations, 0 Path Code Violations,

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs



4、以下配置为E1连3条64K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体配置如下:



Router#
Building configuration...
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router
!
enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/
enable password Router
!
!
ip subnet-zero
!
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2
channel-group 2 timeslots 3
!
interface Ethernet0
ip address 133.118.40.1 255.255.0.0
media-type 10BaseT
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0:0
ip address 202.119.96.1 255.255.255.252
no ip mroute-cache
!
interface Serial0:1
ip address 202.119.96.5 255.255.255.252
no ip mroute-cache
!
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip mroute-cache
!
no ip classless
ip route 133.210.40.0 255.255.255.0 Serial0:0
ip route 133.210.41.0 255.255.255.0 Serial0:1
ip route 133.210.42.0 255.255.255.0 Serial0:2
!
line con 0
line aux 0
line vty 0 4
password Router
login
!
end
-----------------------------------
谈谈Cisco IOS的E1端口配置技巧

在Cisco 4500,4700,7000和7500系列里面均支持E1(2.048Mbps)数率的接口。每一个E1端口可以按时隙分成30路64K数据线路和2路信号线路。这30个64K数据线路每一路均可以当作一条64K的专线。

  功 能 命 令

  在配置模式下,定义Controller E1 controller e1 slot/port

  定义line code linecode {ami |hdb3}

  定义字符帧 framing {crc4 |no-crc4}

  定义E1组 channel-group number timeslots range [speed {48| 56| 64}]

  指定串口属于那一个channel-group组 interface serial slot/port:channel-group

  注:

  slot/port——是针对7000或7500系列的,故区分槽口号和端口号。

  linecode——默认是HDB3.

  framing——默认是crc4,要与电信局参数匹配。

  channel-group——每个E1可以分成30个channel-group,把channel-group和时间

  槽对应起来。channel-group是0-30,timeslots是1-31.

  interface serial——在定义完E1 channel-group后,我们把group赋予成一个虚拟串口
-------------------------------------------------
E1配置(转贴)
E1接口介绍



E1接口可有两种配置:

l 作为信道化(Channelized)E1接口使用。

接口在物理上分为31个时隙,可以任意地将全部时隙分成若干组,每组时隙捆绑以后作为一个接口使用,其逻辑特性与同步串口相同,支持PPP、帧中继、LAPB和X.25等链路层协议。

l 作为非信道化(Unchannelized)E1接口使用。

接口在物理上作为一个2M速率的G.703同步串口,支持PPP、帧中继、LAPB和X.25等链路层协议。

E1接口配置
配置E1接口,首先必须在全局配置态下输入controller E1命令。

命令
作用

controller E1 /
配置E1接口

slot为E1控制器所在的槽号,

group为E1控制器的链路号。


注: 3700系列路由器中E1控制器为“controller E1 0/0”,5000系列路由器中对于一口E1控制器,链路号范围为0-0,对于四口E1控制器,链路号范围为0-3。E1控制器槽号为1-4。

举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#

E1接口的配置任务包括:

l 配置E1接口的物理参数,包括帧校验方式、线路编解码格式和线路时钟、回环传输模式等。一般采用缺省参数即可。

l 信道化(Channelized)E1接口要求配置channel-group参数,确定时隙捆绑方式。

l 非信道化(Unchannelized)E1接口不需配置channel-group参数。

l 配置接口(Interface) 参数,

配置E1接口的工作方式
E1接口缺省为信道化(Channelized)方式。可通过unframed命令设置为非信道化(Unchannelized)方式。

命令
作用

unframed
配置为非信道化(Unchannelized)方式

no unframed
配置为信道化(Channelized)方式


举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0# unframed

Router_config_controller_E1_0/0# no unframed

配置E1接口的帧校验方式
E1接口支持对物理帧进行CRC32校验,缺省为不校验。

命令
作用

framing crc4
配置E1接口的帧校验方式为4字节CRC校验

no framing 或

framing no-crc4
配置E1接口的不进行帧校验


配置E1接口的线路编解码格式
E1接口支持两种线路编解码格式:AMI格式和HDB3格式

缺省为HDB3格式。



命令
作用

linecode ami
配置E1接口的线路编解码格式为AMI格式

no linecode 或

linecode hdb3
配置E1接口的线路编解码格式为HDB3格式


配置E1接口的时钟方式


当E1作为同步接口使用时,同样有DTE和DCE两种工作方式,也需要选择线路时钟。当两台路由器的E1接口直接相连时,必需使两端分别工作在DTE和DCE方式;当路由器的E1接口与交换机连接时,交换机为DCE设备,而路由器的E1接口需工作在DTE方式。

E1接口缺省工作在DTE方式。

命令
作用

clock internal
配置E1接口工作在DCE方式,使用芯片内部同步信号

clock external

no clock
配置E1接口工作在DTE方式,使用线路同步信号


配置E1接口的回环传输模式
在远端回环传输模式下,E1将端口上收到的报文从收到的通道上送回。

命令
作用

loopback local
配置E1接口工作在远端回环方式

no loop
取消远端回环设置


配置E1的发送脉冲模式
选择发送脉冲模式。当电缆类型为120Ω双绞线时,应执行Cable 120时。缺省时,默认为75Ω铜轴电缆(no cable),遵守ITU-T G.703标准。两者发送脉冲不同。

命令
作用

Cable 120
配置E1接口电缆类型为120Ω双绞线

No cable
缺省为75Ω同轴电缆。


禁止E1接口链路

可以禁止某个E1接口的使用。使端口上所有interface的line的状态均为down。

命令
作用

Shutdown
禁止该E1接口链路

No shutdown
恢复E1接口链路的使用


举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#shutdown

Router_config_controller_E1_0/0#no shutdown

配置E1接口的channel-group参数


channel-group为E1通道号,范围为0-30,timeslot为E1时隙号,范围为1-31。通道可以占用任何未分配的时隙,并能够任意组合时隙。E1通道配置成功后产生新的interface。

no channel-group清除channel-group的时隙捆绑,相应的interface也被删除。

命令
作用

channel-group channel-group timeslots { number | number1-number2 } [,number | number1-number2 ... ]
将E1接口的时隙捆绑为channel-group

no channel-group channel-group
取消channel-group时隙捆绑


举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#channel 5 timeslots 18,11-13,20,22,30-28,24-25

Router_config_controller_E1_0/0#interface s0/0:5

Router_config_interface_s0/0:5#

配置E1接口的interface参数
E1接口在信道化(Channelized)方式下,当配置的channel-group参数后,系统产生新的interface。其逻辑特性与同步串口相同。名字为serial/:,其中和controller E1 /一致。

E1接口在非信道化(Unchannelized)方式下,系统产生新的interface。名字为serial/:0

可在该interface上封装PPP、帧中继、HDLC和X.25等 链路层协议。

举例:

信道化(Channelized)方式下:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#channel 1 timeslots 1-31

Router_config_controller_E1_0/0#int s0/0:1

Router_config_controller_s0/0:1#enca fr

Router_config_controller_s0/0:1#ip add 130.130.0.1 255.255.255.0

非信道化(Unchannelized)方式下:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#unframed

Router_config_controller_E1_0/0#int s0/0:0

Router_config_controller_s0/0:0#enca fr

Router_config_controller_s0/0:0#ip add 130.130.0.1 255.255.255.0

2009年4月17日星期五

E1端口配置

在Cisco 4500,4700,7000和7500系列里面均支持E1(2.048Mbps)数率的接口.每一个E1端口可以按时隙分成30路64K数据线路和2路信号线路.这30个64K数据线路每一路均可以当作一条64K的专线.
功 能        命 令
在配置模式下,定义Controller E1        controller e1 slot/port
定义line code        linecode {ami |hdb3}
定义字符帧        framing {crc4 |no-crc4}
定义E1组        channel-group number timeslots range [speed {48| 56| 64}]
指定串口属于那一个channel-group组        interface serial slot/port:channel-group
注:
slot/port----是针对7000或7500系列的,故区分槽口号和端口号.
linecode----默认是HDB3.
framing----默认是crc4,要与电信局参数匹配.
channel-group----每个E1可以分成30个channel-group,把channel-group和时间槽对应起来.channel-group是0-30,timeslots是1-31.
interface serial----在定义完E1 channel-group后,我们把group赋予成一个虚拟串口.
Channelized E1 Interface Example
假设是7500系列路由器,E1接口(MIP板)在插槽4上面.
一个channel-group可对应多个时间槽,本例中serial4/0:1有5*64Kbps的数率.具体配置过程如下:
Router#conf t
Router(config)#controller e1 4/0
Router(config-controller)#
Router(config-controller)#framing NO-CRC4
Router(config-controller)#channel-group 0 timeslots 1
(配置时隙1 为channel-group 0,即channel-group 0包含时隙1,它的带
宽就为64K)
Router(config-controller)#channel-group 1 timeslots 2,7-9,20
(配置时隙2,7,8,9,20为channel-group 1,它的带宽就为64*5=512K,在
这里7-9是指一个段,可以采用同样的命令配置多个channel-group,但需注意
channel-group对应不同的数字,而且一个时隙不能包含在多个组当中)
Router(config-controller)#exit
Router(config)#interface s4/0:0
Router(config-if)#ip address 16.217.30.2 255.255.255.252
Router(config-if)# encapsulation ppp
Router(config-if)#exit
Router(config)#interface Serial4/0:1
Router(config-if)# ip address 16.205.30.5 255.255.255.252
Router(config-if)# encapsulation ppp
(上述过程基本完成E1配置,现只需将相应端口no shut,然后保存配置即可)
下面是配置完成后关于e1的相应配置显示
Configuration for Router:
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2,7-9,20
!
interface Serial4/0:0
ip address 16.217.30.2 255.255.255.252
encapsulation ppp
!
interface Serial4/0:1
ip address 16.205.30.5 255.255.255.252
encapsulation ppp

Cisco 3640 VoIP配置实例





  下面是Cisco 3640的VOIP配置,结构是台北和上海两地做VOIP,后接阿尔卡特的PBX,里面有很多需要注意的地方。

台北配置代码:

<code><br />Taipei#sh run<br />Building configuration...<br /><br />Current configuration:<br />!<br />version 12.0<br />service timestamps debug uptime(设定Debug跟踪日志显示其时间)<br />service timestamps log uptime(设定看Log时显示其时间)<br />no service password-encryption(口令不加密)<br />!<br />hostname Taipei(主机名)<br />!<br />enable secret 5 $1$R.66$z.BUjhNsJcIr8KCcS9uxG.<br />!<br />!<br />!<br />!<br />!<br />voice-card 1(定义语音卡1)<br />!<br />voice-card 3(定义语音卡3)<br />!<br />ip subnet-zero<br />no ip domain-lookup<br />!<br />isdn voice-call-failure 0<br />!<br />!<br />!<br />!<br />controller E1 1/0(配置 E1语音卡)<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-wink-start(定义语音卡的类型为E&M卡)<br />cas-custom 0<br />!<br />controller E1 3/0(配置 E1语音卡)<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-wink-start(定义语音卡的类型为E&M卡)<br />cas-custom 0<br />!<br />!<br />!<br />interface BRI0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />isdn guard-timer 0 on-expiry accept<br />!<br />interface FastEthernet0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />duplex auto<br />speed auto<br />!<br />   interface Serial0/0<br />description "Link to MainLand_ShangHai by NCIC lease line"<br />ip address 192.168.1.1 255.255.255.252<br />no ip directed-broadcast<br />no ip mroute-cache<br />no fair-queue<br />!<br />interface Serial0/1<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />clockrate 2000000<br />!<br />ip classless<br />no ip http server<br />!<br />!<br />voice-port 1/0:0(配置模拟语音端口)<br />compand-type a-law<br />!<br />voice-port 3/0:0(配置模拟语音端口)<br />compand-type a-law<br />!<br />dial-peer voice 1 voip (定义拨号对等体到语音)<br />destination-pattern +445...(为拨号对等体分配电话号码,其中.为通配符)<br />session target ipv4:192.168.1.2(定义Voip路由,为对端的IP地址)<br />req-qos guaranteed-delay (语音数据流RVSP的保证,其中Guaranteed-dealy可用于保证整个网络的延时)<br />ip precedence 5(IP优先级,5为关键)<br />!<br />dial-peer voice 2 pots(定义拨号对等体到语音物理端口)<br />destination-pattern +3...(定义电话话码以3开头的)<br />port 1/0:0(定义语音端口)<br />!<br />dial-peer voice 3 pots(定义拨号对等体到语音物理端口)<br />destination-pattern +3...(定义电话话码以3开头的)<br />port 3/0:0(定义语音端口)<br />!<br />!<br />line con 0(设定登陆)<br />transport input none<br />line aux 0<br />line vty 0 4(允许用Telnet)<br />password cisco(口令为Cisco)<br />login<br />!<br />end<br /><br />Taipei#<br /></code></pre></td></tr></tbody></table><br /><br />上海一方的3640配置代码:<br /><br /><table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"> <tbody> <tr> <td><pre><code><br />ShangHai#sh run<br />Building configuration...<br /><br />Current configuration:<br />!<br />version 12.0<br />service timestamps debug uptime<br />service timestamps log uptime<br />no service password-encryption<br />!<br />hostname ShangHai<br />!<br />enable secret 5 $1$dB/c$tnrMU9IxFCJdix5ssHAdH/<br />!<br />!<br />!<br />!<br />!<br />voice-card 1<br />!<br />voice-card 2<br />!<br />ip subnet-zero<br />no ip domain-lookup<br />!<br />isdn voice-call-failure 0<br />!<br />!<br />!<br />!<br />controller E1 1/0<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-immediate-start<br />cas-custom 0<br />! <br />   controller E1 2/0<br />framing N<br />ds0-group 0 timeslots 1-15,17-31 type e&m-immediate-start<br />cas-custom 0<br />!<br />!<br />!<br />interface BRI0/0<br />no ip address<br />no ip directed-broadcast<br />encapsulation ppp<br />isdn guard-timer 0 on-expiry accept<br />ppp multilink<br />!<br />interface FastEthernet0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />duplex auto<br />speed auto<br />!<br />interface Serial0/0<br />no ip address<br />no ip directed-broadcast<br />no ip mroute-cache<br />shutdown<br />no fair-queue<br />clockrate 2000000<br />!<br />interface Serial0/1<br />ip address 192.168.1.2 255.255.255.252<br />no ip directed-broadcast<br />!<br />ip classless<br />!<br />no ip http server<br />!<br />!<br />voice-port 1/0:0<br />compand-type a-law<br />!<br />voice-port 2/0:0<br />compand-type a-law<br />!<br />dial-peer voice 20 voip<br />destination-pattern +3...<br />session target ipv4:192.168.1.1<br />req-qos guaranteed-delay<br />ip precedence 5<br />!<br />dial-peer voice 10 pots<br />destination-pattern +448...<br />port 1/0:0<br />!<br />dial-peer voice 30 voip<br />destination-pattern +4...<br />session target ipv4:192.168.1.1<br />req-qos guaranteed-delay<br />ip precedence 5<br />!<br />dial-peer voice 40 pots<br />destination-pattern +449...<br />port 2/0:0<br />!<br />!<br />line con 0<br />transport input none<br />line aux 0<br />line vty 0 4<br />password cisco<br />login<br />!<br />end<br /><br />ShangHai#<br /></code>
(完)


2009年4月16日星期四

cnc-gk-gw配置模板(转贴)

网守的配置模板:
version 12.0
service timestamps debug uptime
service timestamps log datetime msec
service timestamps debug date msec
no service password-encryption
!
hostname xxxx
!
!
!
!
ip subnet-zero
ip domain-name cnc.net.cn
ip name-server 10.0.10.109
!
interface FastEthernet0/0
ip address <x.x.x.x> 255.255.255.128
no ip redirects
no ip directed-broadcast
duplex auto
speed auto
standby 1 timers 5 15
standby 1 priority xxx(gk1: 110, gk2: 100) preempt(gk1 only)
standby 1 ip x.x.x.x(HSRP address)
!
ip classless
ip route 0.0.0.0 0.0.0.0 x.x.x.x(IP gateway address)
no ip http server
!
logging trap errors
logging x.x.x.x(syslog server address)
!
snmp-server community snmp view v1default RO
snmp-server community cncvoiplic RO
snmp-server community cncvoip2000 RW
snmp-server community public view v1default RO
snmp-server enable traps syslog
snmp-server host < CVM IP > snmp
snmp-server host < CVM IP> public
snmp-server host <CiscoWorks IP> snmp
snmp-server host <CiscoWorks IP > public
!
gatekeeper
zone local <zone name>(same with city name)
<domain name> x.x.x.x(local HSRP address)
!
!
!
zone remote < cnc-dir-gk > <CNC domain Name> <dir-gk IP > 1719
!
zone prefix <zone name> <prefix>
!
!
no zone subnet <zone name> default enable
zone subnet <zone name> x.x.x.x/mask (for GW) enable

!

zone prefix <cnc-dir-gk> *
gw-type-prefix 1#* default-technology
no shutdown
!
!
line con 0
transport input none
line aux 0
modem Dialin
modem autoconfigure discovery
speed 38400
line vty 0 4
exec-timeout 180 0
password cisco
login
!
ntp server <Primary NTP server > prefer
ntp server <Secondary NTP server>
end


网关的配置模板:

!International route 4, fail-over route for all world call
dial-peer voice 8<xx>000 voip (xx—tech prefix)
preference 5
destination-pattern 00T
dtmf-relay cisco-rtp h245-signal h245-alphanumeric
fax-rate 9600
tech-prefix <xx># (xx --- tech prefix)
voice-class codec 88
session target ras
!
process-max-time 200
gateway
!
interface Loopback0
ip address <IP address> <subnet mask>
no ip directed-broadcast
h323-gateway voip interface
h323-gateway voip id <zone name> ipaddr <GK IP addr> 1719
h323-gateway voip h323-id <GW-id> (same with hostname)
h323-gateway voip tech-prefix 2#
!
interface Ethernet0
ip address <IP address> <subnet mask>
no ip directed-broadcast
!
interface FastEthernet0
ip address <IP address> <subnet mask>
no ip directed-broadcast
!
no ip http server
ip classless
!
ip route 0.0.0.0 0.0.0.0 x.x.x.x (local gateway ip address)
!
ip radius source-interface Loopback0

GW GK 配置

GW配置
  GW-GZ#show run
  Building configuration...
  Current configuration:
  !
  ! Last configuration change at 14:53:31 UTC Sat Jan 1 2000 by cisco
  ! NVRAM config last updated at 14:42:05 UTC Sat Jan 1 2000 by cisco
  !
  version 12.0
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname GW-GZ
  !
  aaa new-model
  aaa authentication login h323 group radius
  aaa authentication login no_rad local
  aaa authorization exec h323 group radius
  aaa accounting connection h323 start-stop group radius
  enable secret 5 $1$Do8I$JbsgS2.d//KmrBHcAJqy2.
  enable password cisco
  !
  username cisco password 0 cisco
  !
  resource-pool disable
  !
  !
  clock calendar-valid
  ip subnet-zero
  no ip domain-lookup
  !
  mta receive maximum-recipients 0
  !
  !
  controller E1 0
  framing NO-CRC4
  ds0-group 0 timeslots 1-15,17-31 type r2-digital r2-compelled ani
  cas-custom 0
  unused-abcd 0 1 1 1
  country china
  answer-signal group-b 1
  dnis-digits min 1 max 18
  !
  controller E1 1
  clock source line secondary 1
  !
  controller E1 2
  clock source line secondary 2
  !
  controller E1 3
  clock source line secondary 3
  !
  !
  voice-port 0:0
  echo-cancel coverage 32
  cptone CN
  timeouts call-disconnect 0
  !
  gw-accounting h323 vsa
  dial-peer voice 797 pots
  application clid_authen_npw
  destination-pattern 0797T
  direct-inward-dial
  port 0:0
  prefix 0797
  !
  dial-peer voice 80797 voip
  destination-pattern 079T
  session target ras
  !
  process-max-time 200
  gateway
  !
  interface Ethernet0
  no ip address
  no ip redirects
  no ip directed-broadcast
  !
  interface Serial0
  no ip address
  no ip directed-broadcast
  no ip mroute-cache
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface Serial1
  no ip address
  no ip directed-broadcast
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface Serial2
  no ip address
  no ip directed-broadcast
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface Serial3
  no ip address
  no ip directed-broadcast
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface FastEthernet0
  ip address 10.123.15.60 255.255.255.0
  no ip directed-broadcast
  duplex auto
  speed auto
  h323-gateway voip interface
  h323-gateway voip id ganzhou ipaddr 10.123.15.69 1719
  h323-gateway voip h323-id GZ.jx.cpn
  h323-gateway voip tech-prefix 1#
  !
  no ip http server
  ip classless
  ip route 0.0.0.0 0.0.0.0 10.123.15.254
  !
  radius-server host 10.123.15.139 auth-port 1812 acct-port 1813
  radius-server retransmit 2
  radius-server timeout 4
  radius-server key voip
  radius-server vsa send accounting
  radius-server vsa send authentication
  !
  line con 0
  exec-timeout 0 0
  transport input none
  login authentication no_rad
  line aux 0
  line vty 0 4
  exec-timeout 120 0
  password cisco
  login authentication no_rad
  !
  end
  Active GK配置举例
  GK-NC1#show run
  Building configuration...
  Current configuration:
  !
  version 12.1
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname GK-NC1
  enable secret 5 $1$Do8I$JbsgS2.d//KmrBHcAJqy2
  enable password cisco
  !
  !
  memory-size iomem 25
  ip subnet-zero
  no ip domain-lookup
  !
  !
  interface FastEthernet0/0
  ip address 10.123.15.61 255.255.255.0
  no ip redirects
  duplex auto
  speed auto
  standby 1 priority 105 preempt
  standby 1 ip 10.123.15.69
  !
  ip classless
  ip route 0.0.0.0 0.0.0.0 10.123.15.254
  no ip http server
  !
  !
  !
  gatekeeper
  zone local nanchang jx.cpn 10.123.15.69
  zone local ganzhou jx.cpn
  zone prefix nangchang 0791*
  zone prefix ganzhou 0797*
  gw-type-prefix 1#* default-technology
  arq reject-unknown-prefix
  lrq reject-unknown-prefix
  no shutdown
  !
  !
  line con 0
  exec-timeout 0 0
  login
  transport input none
  line aux 0
  line vty 0 4
  exec-timeout 120 0
  password cisco
  login
  !
  end
  

ASA防火墙NAT转换方法


近日做了个NAT,传上来给大家分享。每步都有注释。

nat-control命令
在6.3的时候只要是穿越防火墙都需要创建转换项,比如:nat;static等等,没有转换项是不能穿越防火墙的,但是到了7.0这个规则有了变化,不 需要任何转换项也能正常的像路由器一样穿越防火墙。但是一个新的命令出现了!当你打上nat-control这个命令的时候,这个规则就改变得和6.3时 代一样必须要有转换项才能穿越防火墙了。7.0以后开始 nat-control 是默认关闭的,关闭的时候允许没有配置NAT规则的前提下和外部主机通信,相当于路由器一样,启用NAT开关后内外网就必须通过NAT转换才能通信
1、定义外口
interface Ethernet0/0   进入端口
nameif outside    定义端口为外口
security-level 0    定义安全等级为0
no shut     激活端口
ip address ×.×.×.× 255.255.255.248  设置IP
2、定义内口
interface Ethernet0/1   
nameif inside    定义端口为内
security-level 100   定义端口安去昂等级为100
no shut
ip address 192.168.1.1 255.255.255.0

3、定义内部NAT范围。
nat (inside) 1 0.0.0.0 0.0.0.0    任何IP都可以NAT,可以自由设置范围。
4、定义外网地址池
global (outside) 1 10.21.67.10-10.21.67.14 netmask 255.255.255.240

global (outside) 1 interface  当ISP只分配给一个IP是,直接使用分配给外口的IP地址。
5、设置默认路由
route outside 0 0 218.17.148.14  指定下一条为IPS指定的网关地址
查看NAT转换情况
show xlate


2009年4月15日星期三

用ScribeFire来写blogger博客

步骤:

以我的blogger账号为例:

1. 申请blogger账号

https://www.blogger.com/start

2. 设置scribefire

我创建的blog地址为 http://shizh.blogspot.com/

开始:
①输入博客的URL: http://shizh.blogspot.com/

手动设置:
②选择blogger
③填写API URL: https://www.blogger.com/feeds/4670315869282463882/posts/default

下一步:
④输入用户名密码:输入我的用户名密码

下一步:
⑤Finish:提示成功添加。

设置帐户的关键一步:API URL,应该使用https://www.blogger.com/feeds/blogID/posts/default,注意https,另外关于那个blogid,在控制台页面,把鼠标放在"编辑帖子"那个地方,就可以看到浏览器下面有网址显示的,最后面就是自己的id了。

3. 使用scribefire写文档

重新打开ScribeFire就能看到博客选项卡上已经显示登陆的blogger,可以写一个简单的测试页面,点击右下角的"发布到“SHIZH””按钮既可以发布到blog上。


这里的前提是要改一下scribefire的设置,去掉默认为草稿,如下图。



4. 在文档中插入图片

在工具栏点击"添加图片"按钮,选择"upload an image form your computer"菜单上传本地的图片,

在弹出的对话框中选择图片存放为止,确认对话框点击API即可,成功后就可以显示图片,图片会上传到picasa的相册中。


2009年4月14日星期二

思科E1配置白皮书

E1知识点总结


2009年4月12日星期日

E1线路配置 VWIC2-1MFT-G703 卡

此卡我是插在2811路由器上的

把卡插在2811上后show run你会看到card type command needed for slot/vwic-slot 0/1提示

下面是具体配置

(config)#card type card type E1 0 1 指定卡的类型为E1 插在0槽1slot

然后你再show run将会看到 controller E1 0/1/0

(config)#controller e1 0/1/0

#channel-group 0 timeslots 1-31 (0为你所分时隙的子接口 1-31说明你把所有的时隙都给了这个接口所使用)

然后系统会提示s0/1/0:0UP了

此时你可以配置S0/1/0:0接口了,如果你没有配置上面的两个步骤你show ip int b 是看不到s0/1/0这个接口的

int s0/1/0:0

ip addr 1.1.1.1 255.255.255.0 可以配置你的IP啦:-)

exit

ASA配置精华

【转载】
一:6个基本命令: nameif、 interface、 ip add


二:基本配置步骤:
step1: 命名接口名字
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 dmz security50

**7版本的配置是先进入接口再命名。

step2:配置接口速率

interface ethernet0 10full auto
interface ethernet1 10full auto
interface ethernet2 10full

step3:配置接口地址

ip address outside 218.106.185.82
ip address inside 192.168.100.1 255.255.255.0
ip address dmz 192.168.200.1 255.255.255.0

step4:地址转换(必须)

* 安全高的区域访问安全低的区域(即内部到外部)需NAT和global;
nat(inside) 1 192.168.1.1 255.255.255.0
global(outside) 1 222.240.254.193 255.255.255.248

*** nat (inside) 0 192.168.1.1 255.255.255.255 表示192.168.1.1这个地址不需要转换。直接转发出去。

* 如果内部有服务器需要映射到公网地址(外网访问内网)则需要static和conduit或者acl.
static (inside, outside) 222.240.254.194 192.168.1.240
static (inside, outside) 222.240.254.194 192.168.1.240 10000 10

后面的10000为限制连接数,10为限制的半开连接数。

conduit permit tcp host 222.240.254.194 eq www any
conduit permit icmp any any (这个命令在做测试期间可以配置,测试完之后要关掉,防止不必要的漏洞)

ACL实现的功能和conduit一样都可实现策略访问,只是ACL稍微麻烦点。conduit现在在7版本已经不能用了。
Access-list 101 permit tcp any host 222.240.254.194 eq www
Access-group 101 in interface outside (绑定到接口)

***允许任何地址到主机地址为222.240.254.194的www的tcp访问。

Step5:路由定义:
Route outside 0 0 222.240.254.193 1
Route inside 192.168.10.0 255.255.255.0 192.168.1.1 1

**如果内部网段不是直接接在防火墙内口,则需要配置到内部的路由。

Step6:基础配置完成,保存配置。
Write memory write erase 清空配置
reload

2009年3月24日星期二

CISCO UC统一通讯方案











CISCO UC统一通讯方案

用户需求分析

客户规模:

客户有一个总部,约有100名员工;

一个分支机构,约有20名员工;

客户需求:

组建安全可靠的总部和分支LAN和WAN;

总部和分支部署IP电话,以及IP语音信箱服务;

方便和图形化的网络管理;

整体方案要便于以后升级,以利于投资保护。

思科建议方案:

部署思科智能交换机和多业务集成路由器,构建安全的数据通信网络;

部署思科统一通信方案,构建语音通信网络;

部署思科CNA,实现图形化的网络管理。

1. 思科建议方案设计图





2. 思科建议方案总体配置概述



安全和智能的总部与分支网络

LAN:总部思科Cat3560和CE500交换机,提供约100个用户的接入; 分支思科NME交换机模块,提供约16个用户接入;

WAN:总部ISR3825路由器,分支ISR2811,实现总部和分支之间安全可靠地互联,可以采用专线,也可以经由因特网,采用VPN实现;

总部和分支用户的IP通信服务

总部ISR3825和分支ISR2811分别运行思科Call Manager Express IP电话服务,提供总部约100台IP电话机,分支16台IP电话的服务;

总部和分支的用户也可以使用PC上的思科软件IP电话进行通信;

总部ISR3825和分支ISR2811部署思科Unity Express ,提供总部和分支的语音信箱服务;

安全服务

利用总部和分支路由器的IOS FW和IOS IPS,及 IPSec VPN和WEB VPN功能,实现安全的网络访问和应用传输,以及高级的应用控制; 另外,可利用思科Auto-Secure功能快速部署基本的安全功能

网络管理

图形化思科网络助理CNA,可以监控,配置和管理总部或者分支网络中的所有设备,包括交换机,路由器和IP电话机;

可从CNA中调用思科SDM管理软件,对路由器上的所有功能,包括防火墙,VPN和IPS等进行图形化的配置管理;

利用图形化交互式IP通信配置工具:QCT(Quick Config Tool),帮助客户实现所需要的功能;

利用图形化的CCME和CUE配置界面,可以方便地配置管理Call Manager Express和Unity Express;


3. 总部方案产品配置详述


局域网LAN

Cat3560-48PS为主干,CE500-24PC为桌面交换机,可提供100个左右的用户以100M接入,同时提供IP电话机的电源供应;

广域网WAN

采用ISR3825,配置VWIC2-1MFT-G703,通过E1线路连接分支网络,如果希望经由因特网,利用VPN实现互联,可以不配此部件;

统一通信

ISR3825上配置VWIC2-4FXO,连接PSTN,配置VWIC2-2FXS,连接内部的传真机和模拟电话机;

如果需要更多的模拟电话接入和PSTN线路连接,可配置EVM扩展语音模块,最大支持24个FXS或者 8个FXS+12个FXO端口; 或者采用NM-HDV2和VWIC2-MFT-E1以支持更多的接入数量;

配置思科CallManager Express 的IP电话服务,提供96个IP电话支持,最大可以扩展到168个IP电话;

配置思科NM-CUE-EC模块,提供100个语音信箱的服务,最多可支持250个语音信箱。

配置96台IP 电话机:Cisco 7941G,和 IP communicator软电话

安全

配置思科路由器上的IOS FW和IOS IPS实现高级应用控制,配置WEB VPN和IPSec VPN,实现总部和分支互联,以及远程接入的功能;


4. 分支方案产品配置详述

LAN & WAN

LAN方面,采用ISR2811,配置NME-16ES-1G-P,提供16个用户100M的接入,同时提供IP电话机所需的电源供应。

WAN方面,在ISR2811上配置VWIC2-1MFT-G703,通过E1线路连接总部网络,如果希望经由因特网,利用VPN实现互联,可以不配此部件;

统一通信

ISR2811上配置VWIC2-2FXO,连接PSTN,配置VWIC2-2FXS,连接内部的传真机和模拟电话机;

如果需要更多的模拟电话接入和PSTN线路连接,可以配置更多的VWIC-FSX/FXO,或者 NM-HDV2和或VWIC2-MFT-E1以支持更多的接入数量;

配置思科CallManager Express 的IP电话服务,提供36个IP电话支持,最大可以扩展到8个IP电话;

配置内置于机箱的思科AIM-CUE模块,提供25个语音信箱的服务,最多可支持50个语音信箱。

配置96台IP 电话机:Cisco 7941G,和 IP communicator软电话

安全

配置思科路由器上的IOS FW和IOS IPS实现高级应用控制,配置IPSec VPN,实现总部和分支互联的功能;


5. 总部和分支方案产品清单

















































总部产品配置清单
C3825-VSEC-CCME/K9ISR3825 语音安全销售捆绑包,包括ISR3825硬件,高级IP服务特性集的IOS软件,语音编解码PVDM2-64,168个IP电话机支持的FL-CCME-168,128MB Flash,512MB DRAM
VIC2-4FXO4端口 Voice Interface Card – FXO,连接外线PSTN
VIC2-4FXS4端口 Voice Interface Card – FXS,连接FAX和模拟电话机
VWIC2-1MFT-G7031端口 RJ-48 Multiflex Trunk - G.703,连接专线;
NM-CUE-EC语音信箱服务模块,Cisco Unity Express Network Module Enhanced Capacity
SCUE-2.3语音信箱服务软件,Cisco Unity Express base release - 2.3
SCUE-LIC-100CME100个语音信箱许可,Unity Express License 25 Voice Mailbox-Auto Attendant-CCME
WS-C3560-48PS-S Catalyst 3560 48 10/100 PoE + 4 SFP Standard Image
WS-CE500-24PC24 10/100 (24PoE) and 2 10/100/1000BT or SFP uplinks
CP-7941GCisco IP Phone 7941
SW-CCME-UL-7941Cisco CallManager Express License For Single 7941 IP Phone


















































分支产品配置清单
C2811-VSEC-CCME/K9ISR2811 语音安全销售捆绑包,包括ISR2811硬件,高级IP服务特性集的IOS软件,语音编解码PVDM2-16,36个IP电话机支持的FL-CCME-36,64MB Flash和256MB DRAM
NME-16ES-1G-P以太网交换模块,16 10/100T POE + 1 GE,IP Base
VIC2-2FXO2端口 Voice Interface Card – FXO,连接外线PSTN
VIC2-2FXS2端口 Voice Interface Card – FXS,连接FAX和模拟电话机
VWIC2-1MFT-G7031端口 RJ-48 Multiflex Trunk - G.703,连接专线;
AIM-CUE语音信箱服务模块,Unity Express AIM -price includes 12个mailbox语音信箱
SCUE-2.3语音信箱服务软件,Cisco Unity Express base release - 2.3
SCUE-LIC-25CME25个语音信箱许可,Unity Express License 25 Voice Mailbox-Auto Attendant-CCME
PWR-2811-AC-IP利用NME-16ES提供在线电源支持的电源,Cisco 2811 AC/IP power supply
CP-7941GCisco IP Phone 7941
SW-CCME-UL-7941Cisco CallManager Express License For Single 7941 IP Phone

2009年3月13日星期五

cisco 1800 路由器密码恢复

2.重启路由器。
3.在路由器启动的60秒内在终端机上按Ctrl+Break键。将显示rommon> 提示符。
4.confreg 0x2142
5.reset
6.en
7.copy star run
8.conf t
9.no enable secret
10.no enable password
11.config-regester 0x2102
12.Ctrl+Z
13.reload 回车 yes
14.copy run star
15.reload

2009年2月26日星期四

cisco 3560的DHCP

1.同时为多个VLAN的客户机分配地址
2.VLAN内有部分地址采用手工分配的方式
3.为客户指定网关、Wins服务器等
4.VLAN 2的地址租用有效期限为1天,其它为3天
5.按MAC地址为特定用户分配指定的IP地址
最终配置如下:
ip dhcp excluded-address 10.1.1.1 10.1.1.19 //不用于动态地址分配的地址
ip dhcp excluded-address 10.1.1.240 10.1.1.254
ip dhcp excluded-address 10.1.2.1 10.1.2.19
!
ip dhcp pool global //global是pool name, 由用户指定
network 10.1.0.0 255.255.0.0 //动态分配的地址段
domain-name client.com //为客户机配置域后缀
dns-server 10.1.1.1 10.1.1.2 //为客户机配置dns服务器
netbios-name-server 10.1.1.5 10.1.1.6 //为客户机配置wins服务器
netbios-node-type h-node //为客户机配置节点模式(影响名称解释的顺利,如h-node=先通过wins服务器解释...)
lease 3 //地址租用期限: 3天
ip dhcp pool vlan1
network 10.1.1.0 255.255.255.0 //本pool是global的子pool, 将从global pool继承domain-name等option
default-router 10.1.1.100 10.1.1.101 //为客户机配置默认网关
!
ip dhcp pool vlan2 //为另一VLAN配置的pool
network 10.1.2.0 255.255.255.0
default-router 10.1.2.100 10.1.2.101
lease 1
!
ip dhcp pool vlan1_john //总是为MAC地址为...的机器分配...地址
host 10.1.1.21 255.255.255.0
client-identifier 010050.bade.6384 //client-identifier=01加上客户机网卡地址
!
ip dhcp pool vlan1_tom
host 10.1.1.50 255.255.255.0
client-identifier 010010.3ab1.eac8
相关的DHCP调试命令:
no service dhcp //停止DHCP服务[默认为启用DHCP服务]
sh ip dhcp binding //显示地址分配情况
show ip dhcp conflict //显示地址冲突情况
debug ip dhcp server {events | packets | linkage} //观察DHCP服务器工作情况

如果DHCP客户机分配不到IP地址,常见的原因有两个。第一种情况是没有把连接客户机的端口设置为Portfast方式。MS客户机开机后检查网卡连接 正常,Link是UP的,就开始发送DHCPDISCOVER请求,而此时交换机端口正在经历生成树计算,一般需要30-50秒才能进入转发状态。MS客 户机没有收到DHCP SERVER的响应就会给网卡设置一个169.169.X.X的IP地址。解决的方法是把交换机端口设置为Portfast方 式:CatOS(4000/5000/6000): set spantree portfast mod_num/port_num enable; IOS(2900/3500): interface ... ; spanning-tree portfast。

另外一种情况是DHCP服务器和DHCP工作站不在同一个VLAN,这时候通常通过设置ip helper-address来解决:
interface vlan1
ip address 10.1.1.254 255.255.255.0 //假设DHCP服务器地址为10.1.1.8
interface Vlan2
ip address 10.1.2.254 255.255.255.0
ip helper-address 10.1.1.8 //假设这是DHCP客户机所在的VLAN

2009年2月24日星期二

ubuntu显卡驱动管理

首先声明:这是我的解决方法,歪打正着,有没有通用性不知道,仅供参考吧!

过程
公司一女同事在我的怂恿下安装了ubuntu 8.04

她的机器配置是IBM Thinkpad T42 8ZU 显卡是 Radeon 9600

安装完之后一切都正常,就是屏幕闪烁,好象液晶屏的背光灯不稳定似的,很难受。

我把机器重启到XP下屏幕不闪了,再回到ubuntu下,又闪,把源里装的受限驱动卸载掉,重启,屏幕不闪了,由此断定是显卡驱动问题。

在网上辛苦地找了好久,也有人遇到此问题,有人回复说是驱动在9600显卡上的BUG,没有解决办法。感觉难以接受。

于是到AMD的官网下载了9600的驱动,安装完重启,糟了,分辨降到800*600,怎么调都不行。应用程序菜单里的 ATI Control Center运行出错,提示没有安装或ATI驱动没有运行。

再google,看到有人用envyng管理显卡的驱动程序,于是:

代码:
sudo apt-get install envyng-core
安装完毕,运行:
代码:
sudo envyng -t

出现一个文本菜单,选择卸载ATI的驱动程序,卸载完毕后。再用它把ATI的驱动重新安装了一次,系统要求重启

重启,万岁,分辨率恢复到了1400*1050,赶紧启动Compiz,3D桌面正常
运行ATI Control Center(super user mode)管理窗口居然也出来了,可以对显卡进行配置,牛啊!

看看屏幕也不闪烁了!

注销再登录,一切正常 !

重启,一切正常 !

OK,问题解决了

2009年2月23日星期一

Apache HTTP Server 与 Tomcat 的三种连接方式介绍



刘 冬 (javayou@gmail.com), 开发工程师,  

2007 年 1 月 15 日

整合 Apache Http Server 和 Tomcat 可以提升对静态文件的处理性能、利用 Web 服务器来做负载均衡以及容错、无缝的升级应用程序。本文介绍了三种整合 Apache 和 Tomcat 的方式。

首先我们先介绍一下为什么要让 Apache 与 Tomcat 之间进行连接。事实上 Tomcat 本身已经提供了 HTTP 服务,该服务默认的端口是 8080,装好 tomcat 后通过 8080 端口可以直接使用 Tomcat 所运行的应用程序,你也可以将该端口改为 80。

既然 Tomcat 本身已经可以提供这样的服务,我们为什么还要引入 Apache 或者其他的一些专门的 HTTP 服务器呢?原因有下面几个:

1. 提升对静态文件的处理性能

2. 利用 Web 服务器来做负载均衡以及容错

3. 无缝的升级应用程序

这 三点对一个 web 网站来说是非常之重要的,我们希望我们的网站不仅是速度快,而且要稳定,不能因为某个 Tomcat 宕机或者是升级程序导致用户访问不了,而能完成这几个功能的、最好的 HTTP 服务器也就只有 apache 的 http server 了,它跟 tomcat 的结合是最紧密和可靠的。

接下来我们介绍三种方法将 apache 和 tomcat 整合在一起。

JK

这是最常见的方式,你可以在网上找到很多关于配置JK的网页,当然最全的还是其官方所提供的文档。JK 本身有两个版本分别是 1 和 2,目前 1 最新的版本是 1.2.19,而版本 2 早已经废弃了,以后不再有新版本的推出了,所以建议你采用版本 1。

JK 是通过 AJP 协议与 Tomcat 服务器进行通讯的,Tomcat 默认的 AJP Connector 的端口是 8009。JK 本身提供了一个监控以及管理的页面 jkstatus,通过 jkstatus 可以监控 JK 目前的工作状态以及对到 tomcat 的连接进行设置,如下图所示:


图 1:监控以及管理的页面 jkstatus
图 1:监控以及管理的页面 jkstatus

在 这个图中我们可以看到当前JK配了两个连接分别到 8109 和 8209 端口上,目前 s2 这个连接是停止状态,而 s1 这个连接自上次重启后已经处理了 47 万多个请求,流量达到 6.2 个 G,最大的并发数有 13 等等。我们也可以利用 jkstatus 的管理功能来切换 JK 到不同的 Tomcat 上,例如将 s2 启用,并停用 s1,这个在更新应用程序的时候非常有用,而且整个切换过程对用户来说是透明的,也就达到了无缝升级的目的。关于 JK 的配置文章网上已经非常多了,这里我们不再详细的介绍整个配置过程,但我要讲一下配置的思路,只要明白了配置的思路,JK 就是一个非常灵活的组件。

JK 的配置最关键的有三个文件,分别是

httpd.conf
Apache 服务器的配置文件,用来加载 JK 模块以及指定 JK 配置文件信息

workers.properties
到 Tomcat 服务器的连接定义文件

uriworkermap.properties
URI 映射文件,用来指定哪些 URL 由 Tomcat 处理,你也可以直接在 httpd.conf 中配置这些 URI,但是独立这些配置的好处是 JK 模块会定期更新该文件的内容,使得我们修改配置的时候无需重新启动 Apache 服务器。

其中第二、三个配置文件名都可以自定义。下面是一个典型的 httpd.conf 对 JK 的配置


# (httpd.conf)
# 加载 mod_jk 模块
LoadModule jk_module modules/mod_jk.so

#
# Configure mod_jk
#

JkWorkersFile conf/workers.properties
JkMountFile conf/uriworkermap.properties
JkLogFile logs/mod_jk.log
JkLogLevel warn

接下来我们在 Apache 的 conf 目录下新建两个文件分别是 workers.properties、uriworkermap.properties。这两个文件的内容大概如下


#
# workers.properties
#


# list the workers by name

worker.list=DLOG4J, status

# localhost server 1
# ------------------------
worker.s1.port=8109
worker.s1.host=localhost
worker.s1.type=ajp13

# localhost server 2
# ------------------------
worker.s2.port=8209
worker.s2.host=localhost
worker.s2.type=ajp13
worker.s2.stopped=1

worker.DLOG4J.type=lb
worker.retries=3
worker.DLOG4J.balanced_workers=s1, s2
worker.DLOG4J.sticky_session=1

worker.status.type=status

以上的 workers.properties 配置就是我们前面那个屏幕抓图的页面所用的配置。首先我们配置了两个类型为 ajp13 的 worker 分别是 s1 和 s2,它们指向同一台服务器上运行在两个不同端口 8109 和 8209 的 Tomcat 上。接下来我们配置了一个类型为 lb(也就是负载均衡的意思)的 worker,它的名字是 DLOG4J,这是一个逻辑的 worker,它用来管理前面配置的两个物理连接 s1 和 s2。最后还配置了一个类型为 status 的 worker,这是用来监控 JK 本身的模块。有了这三个 worker 还不够,我们还需要告诉 JK,哪些 worker 是可用的,所以就有 worker.list = DLOG4J, status 这行配置。

接下来便是 URI 的映射配置了,我们需要指定哪些链接是由 Tomcat 处理的,哪些是由 Apache 直接处理的,看看下面这个文件你就能明白其中配置的意义


/*=DLOG4J
/jkstatus=status

!/*.gif=DLOG4J
!/*.jpg=DLOG4J
!/*.png=DLOG4J
!/*.css=DLOG4J
!/*.js=DLOG4J
!/*.htm=DLOG4J
!/*.html=DLOG4J

相信你已经明白了一大半了:所有的请求都由 DLOG4J 这个 worker 进行处理,但是有几个例外,/jkstatus 请求由 status 这个 worker 处理。另外这个配置中每一行数据前面的感叹号是什么意思呢?感叹号表示接下来的 URI 不要由 JK 进行处理,也就是 Apache 直接处理所有的图片、css 文件、js 文件以及静态 html 文本文件。

通过对 workers.properties 和 uriworkermap.properties 的配置,可以有各种各样的组合来满足我们前面提出对一个 web 网站的要求。您不妨动手试试!







http_proxy

这是利用 Apache 自带的 mod_proxy 模块使用代理技术来连接 Tomcat。在配置之前请确保是否使用的是 2.2.x 版本的 Apache 服务器。因为 2.2.x 版本对这个模块进行了重写,大大的增强了其功能和稳定性。

http_proxy 模式是基于 HTTP 协议的代理,因此它要求 Tomcat 必须提供 HTTP 服务,也就是说必须启用 Tomcat 的 HTTP Connector。一个最简单的配置如下


ProxyPass /images !
ProxyPass /css !
ProxyPass /js !
ProxyPass / http://localhost:8080/

在这个配置中,我们把所有 http://localhost 的请求代理到 http://localhost:8080/ ,这也就是 Tomcat 的访问地址,除了 images、css、js 几个目录除外。我们同样可以利用 mod_proxy 来做负载均衡,再看看下面这个配置


ProxyPass /images !
ProxyPass /css !
ProxyPass /js !

ProxyPass / balancer://example/

BalancerMember http://server1:8080/
BalancerMember http://server2:8080/
BalancerMember http://server3:8080/


配置比 JK 简单多了,而且它也可以通过一个页面来监控集群运行的状态,并做一些简单的维护设置。


图 2:监控集群运行状态
图 2:监控集群运行状态






ajp_proxy

ajp_proxy 连接方式其实跟 http_proxy 方式一样,都是由 mod_proxy 所提供的功能。配置也是一样,只需要把 http:// 换成 ajp:// ,同时连接的是 Tomcat 的 AJP Connector 所在的端口。上面例子的配置可以改为:


ProxyPass /images !
ProxyPass /css !
ProxyPass /js !

ProxyPass / balancer://example/

BalancerMember ajp://server1:8080/
BalancerMember ajp://server2:8080/
BalancerMember ajp://server3:8080/


采用 proxy 的连接方式,需要在 Apache 上加载所需的模块,mod_proxy 相关的模块有 mod_proxy.so、mod_proxy_connect.so、mod_proxy_http.so、mod_proxy_ftp.so、 mod_proxy_ajp.so, 其中 mod_proxy_ajp.so 只在 Apache 2.2.x 中才有。如果是采用 http_proxy 方式则需要加载 mod_proxy.so 和 mod_proxy_http.so;如果是 ajp_proxy 则需要加载 mod_proxy.so 和 mod_proxy_ajp.so这两个模块。





三者比较

相 对于 JK 的连接方式,后两种在配置上是比较简单的,灵活性方面也一点都不逊色。但就稳定性而言就不像 JK 这样久经考验,毕竟 Apache 2.2.3 推出的时间并不长,采用这种连接方式的网站还不多,因此,如果是应用于关键的互联网网站,还是建议采用 JK 的连接方式。



参考资料



关于作者


刘冬,一直使用 J2EE/J2ME 从事移动互联网方面的开发。您可以通过 Java 自由人网站来跟他联系,网址是:http://www.dlog.cn/javayou ,另外他的邮件地址是javayou@gmail.com