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在上网,同时可以快速浏览校内资源,实现网上办公,何乐而不为!