Mr.Chan

导航

一个3640的VOIP配置

下面是一个Cisco 3640的VOIP配置,对方的结构是台北和上海两地做VOIP,后接阿尔卡特的PBX,这是他亲手做的.

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


传统的电话业务使用模拟技术,最大缺点是只能够在专用的网络上进行传输,通话
双方之间的电路被独占。所以传统电话业务的成本较高,并且其业务范围也受到了
地域的限制。
IP电话由于不受电路交换方式的限制,可以将电话的功能及业务推向一个新的
发展阶段。Voice over IP (VoIP) 使路由器能够通过 IP 网络传送实时语音数据流
(例如语音电话和传真)。
在企业网络中推广IP语音技术有很多优点,例如可以控制数据流量,保证语音
质量,充分利用企业租用的数据线路资源,节省长途话费等等。企业使用IP语音技
术可以将语音、数据和多媒体通信融合在一个集成的网络中,并在一个企业解决方
案中,把专网和公网连接起来。
一个只有两个办公室的小公司,决定将Voice over IP 集成到现有的IP网络。
因为VoIP是一种实时性要求很高的应用,为了成功使用VoIP,应有一个性能较高
的端到端网络。仔细调整网络,使之能合适地支持VoIP 有关的一系列协议和功能,
符合服务质量(QoS)、通信形式等要求,以保证语音连接的可靠性。为了配置IP 网
络用于传送实时语音数据流,需要考虑整个网络的情况,然后选择和配置合适的
QoS 工具对在网络上的语音传送进行优化,这些工具包括:资源保护协议RSVP、
Multilink PPP with Interleaving、RTP Header Compression、Custom Queuing、
Weighted Fair Queuing 等。公司采用资源保护协议RSVP(Resource Reservation
Protocol)来提供通信质量保证。
该公司使用的是Cisco 2600 路由器,需要对路由器进行配置,使之支持语音
端口。一般来说,语音端口命令定义相应的语音端口的信号类型特性,Cisco 2600 系
列的语音端口支持三种基本的语音信号类型:FXO(长途交换电话局端口)、FXS
(长途交换工作站端口)、E&M(“RecEive and TransMit” 端口或“Ear and Mouth”
端口)。 在大多数情况下,要在现有的IP网络上传送语音数据,对配置FXO和 FXS
端口,可使用语音端口命令的默认值。公司采用通过RSVP的 FXS-to-FXS 连接
实现VoIP应用。
整个网络配置如图,一部普通电话已经连接到路由器 RLB-1上,因此该路由
器已经同时被配置为一个原有电话服务(POTS) 对等端和一个VoIP 对等端。路
由器 RLB-w 和路由器 R12-e 建立了两个办公室之间的广域网连接。因为有一个
POTS 电话设备连接到路由器 RLB-2上,它同样被配置为一个POTS 对等端兼
VoIP 对等端。在本例中,只有呼叫端(路由器 RLB-1)需要RSVP。该路由器设置
命令如下:
目的 命令
建立 voip 拨号对等端: hostname rlb-1
dial-peer voice 10 voip
定义相应的电话号码和IP地址: destination-pattern +4155554000
sess-target ipv4:40.0.0.1
请求RSVP: req-qos guaranteedDelay
建立pots 拨号对等1: dial-peer voice 1 pots
定义其相应的电话号码和voice port: destination-pattern +4085554000
port 1/0/0
配置串行端口 serial interface 0/0: interface Serial0/0
ip address 10.0.0.1 255.0.0.0
no ip mroute-cache
配置 RTP 报头压缩: ip rtp header-compression
ip rtp compression- connections 25
在该端口上激活 RSVP: ip rsvp bandwidth 48 48
fair-queue 64 256 36
clockrate 64000
router igrp 888
network 10.0.0.0
network 20.0.0.0
network 40.0.0.0
由于Cisco始终坚持开放的IP电话战略,从数据包基础设施层、呼叫控制层到
业务应用层,每层都可以通过开放、基于标准的接口连接。因此这样的VoIP解决
方案可以跨越骨干网和接入技术差别,为不同的企业开展VoIP应用带来方便。VoIP
模块可以不断添加,可节省很多投资,其灵活性和模块化结构使得企业可以不断提
供要求更高的服务。

posted on 2005-05-29 20:28  cunshen  阅读(788)  评论(0)    收藏  举报