VoIP語音電話的設(shè)計與實現(xiàn)
      
       2002/11/27
        Voice over IP是在IP網(wǎng)絡(luò)上傳輸語音流量(例如,電話和傳真)的技術(shù),主要是一種軟件特性,但是,要在Cisco2600/3600系列路由器上實現(xiàn)這個功能,必須首先安裝語音模塊VNM(Voice 
      Network Module),VNM可以裝兩個或四個語音接口卡(VIC),每個接口卡都對應(yīng)于與語音接口相關(guān)的特定信號類型。 
      
      1. 單機實現(xiàn)IP語音電話 
      
      (1)在裝有兩個語音模塊的3600路由器上實現(xiàn)IP語音電話(如下圖所示)。 
      
      (2)基本配置 
      
      dial-peer voice 1 pots 
      
      destination-pattern 111 
      
      port 3/0/0 
      
      ! 
      
      dial-peer voice 2 voip 
      
      destination-pattern 222 
      
      session target ipv4:192.16.12.1 
      
      ! 
      
      dial-peer voice 4 pots 
      
      destination-pattern 222 
      
      port 3/1/0 
      
      ! 
      
      dial-peer voice 3 voip 
      
      destination-pattern 111 
      
      session target ipv4:192.16.12.2 
      
      ! 
      
      ! 
      
      (3)配置概述 
      
      本實驗是在Cisco3600 Router內(nèi)部實現(xiàn)的,沒有經(jīng)過鏈路傳輸,所以不需要優(yōu)化撥號點和網(wǎng)絡(luò)接口的配置,只需配置撥號點: 
      
      ● 要配置源和目標(biāo)之間的所有連接,在voice port 3/0/0上輸入下面命令: 
      
      dial-peer voice 1 pots 
      
      destination-pattern 111 
      
      port 3/0/0 
      
      ! 
      
      dial-peer voice 2 voip 
      
      destination-pattern 222 
      
      session target ipv4:192.16.12.1 
      
      ● 要完成在撥號點1和撥號點4之間的端對端呼叫,在voice port3/1/0上輸入下面命令: 
      
      dial-peer voice 4 pots 
      
      destination-pattern 222 
      
      port 3/1/0 
      
      ! 
      
      dial-peer voice 3 voip 
      
      destination-pattern 111 
      
      session target ipv4:192.16.12.2 
      
      
      
      
      2. 路由器間實現(xiàn)IP語音電話 
      
      (1) 站點A有一個Cisco3600路由器,站點B有一個Cisco2600路由器,它們通過DCE/DTE V.35電纜背對背地連接起來。在每個路由器中安裝了一個含有一個VIC-2FXS的NM-2V,提 供兩個模擬電話的連接。
供兩個模擬電話的連接。 
      
      
      (2)創(chuàng)建并實現(xiàn)撥號方案 
      
      (3)基本配置: 
      
      站點A的基本配置見清單1(站點B的基本配置略)。 
      
      清單1 站點A RouterA的配置 
      
      Current configuration: 
      
      ! 
      
      version 12.0 
      
      service timestamps debug uptime //設(shè)定Debug跟蹤日志顯示其時間 
      
      service timestamps log uptime //設(shè)定看Log時顯示其時間 
      
      no service password-encryption //口令不加密 
      
      ! 
      
      hostname router_A 
      
      ! 
      
      enable password cisco 
      
      ! 
      
      username router_A password 0 cisco 
      
      ! 
      
      ! 
      
      ! 
      
      ! 
      
      ip subnet-zero 
      
      no ip domain-lookup 
      
      ! 
      
      ! 
      
      ! 
      
      ! 
      
      voice-port 3/0/0 
      
      echo-cancel coverage 16 //啟動回聲消除功能 
      
      ! 
      
      voice-port 3/0/1 
      
      ! 
      
      ! 
      
      dial-peer voice 1 pots //定義撥號對等體到語音物理端口 
      
      destination-pattern 2222 //定義電話號碼 
      
      port 3/0/0 //定義電話號碼 
      
      ! 
      
      dial-peer voice 2 voip //定義撥號對等體到語音 
      
      destination-pattern 1111 //為撥號對等體分配電話號碼 
      
      req-qos controlled-load //在分配帶寬時,RSVP確保即使帶寬發(fā)生擁塞與過載時,數(shù)據(jù)流也能得到優(yōu)先處理。 
      
      codec g711ulaw //撥號點的語音編碼速率—64000bps 
      
      ip precedence 5 //IP優(yōu)先級,5為關(guān)鍵 
      
      no vad //禁用語音活動檢測 
      
      session target ipv4:192.168.100.1 //定義Voip路由,為對端的IP地址 
      
      ! 
      
      ! 
      
      interface Ethernet0/0 
      
      no ip address 
      
      no ip directed-broadcast 
      
      shutdown 
      
      ! 
      
      interface Serial0/0 
      
      ip address 192.168.100.2 255.255.255.0 // S0/0的IP地址 
      
      no ip directed-broadcast 
      
      no ip mroute-cache 
      
      no fair-queue 
      
      clockrate 2000000 
      
      ip rtp header-compression //配置RTP頭壓縮器 
      
      ip rtp compression-connections 25 
      
      ip rsvp bandwidth 1000 320 
      
      ! 
      
      interface Ethernet0/1 
      
      no ip address 
      
      no ip directed-broadcast 
      
      shutdown 
      
      ! 
      
      ip classless 
      
      ip route 192.168.100.0 255.255.255.0 192.168.100.1 
      
      no ip http server 
      
      ! 
      
      line con 0 
      
      transport input none 
      
      line aux 0 
      
      line vty 0 4 
      
      login 
      
      ! 
      
      end 
      
      (4)配置概述 
      
      根據(jù)公共的功能,站點A的配置分為4個不同的部分。第1部分在清單2中描述,它為日志和調(diào)試命令啟用時間標(biāo)記,為路由器指定一個主機名稱。 
      
      清單2 站點A的配置的第1部分 
      
      version 12.0 
      
      service timestamps debug uptime //設(shè)定Debug跟蹤日志顯示其時間 
      
      service timestamps log uptime //設(shè)定看Log時顯示其時間 
      
      no service password-encryption //口令不加密 
      
      ! 
      
      hostname router_A 
      
      ! 
      
      enable password cisco 
      
      ! 
      
      username router_A password 0 cisco 
      
      ! 
      
        第2部分在清單4中描述,它提供語音連接的實質(zhì)內(nèi)容,語音端口簡單地標(biāo)識它們連接到的設(shè)備。撥號對等體1把電話號碼分配給物理語音端口,撥號對等體2定義VoIP呼叫到站點B。在語音端口3/0/0上啟動回聲消除功能。IP優(yōu)先級設(shè)置為5,設(shè)置資源預(yù)留協(xié)議RSVP為controlled-load,確保即使帶寬發(fā)生擁塞與過載時,數(shù)據(jù)流也能得到優(yōu)先處理。而且因為多余的帶寬,語音活動檢測被禁止了,并為撥號點配置了語音編碼速率—64000bps。 
      
      
      清單4 站點A的配置的第2部分 
      
      voice-port 3/0/0 
      
      echo-cancel coverage 16 
      
      ! 
      
      voice-port 3/0/1 
      
      ! 
      
      ! 
      
      dial-peer voice 1 pots 
      
      destination-pattern 2222 
      
      port 3/0/0 
      
      ! 
      
      dial-peer voice 2 voip 
      
      destination-pattern 1111 
      
      req-qos controlled-load 
      
      codec g711ulaw 
      
      ip precedence 5 
      
      no vad 
      
      session target ipv4:192.168.100.1 
      
      ! 
      
        第3部分在清單5中描述,它配置路由器上的網(wǎng)絡(luò)端口。串口0/0連接到DCE V.35電纜,為串行接口增加clockrate接口配置命令。為語音配置RSVP保證在網(wǎng)絡(luò)中獲取特定的QoS。配置RTP頭壓縮連接的數(shù)量為25。 
      
      
      清單5 站點A的配置的第5部分 
      
      interface Ethernet0/0 
      
      no ip address 
      
      no ip directed-broadcast 
      
      shutdown 
      
      ! 
      
      interface Serial0/0 
      
      ip address 192.168.100.2 255.255.255.0 
      
      no ip directed-broadcast 
      
      no ip mroute-cache 
      
      no fair-queue 
      
      clockrate 2000000 
      
      ip rtp header-compression 
      
      ip rtp compression-connections 25 
      
      ip rsvp bandwidth 1000 320 
      
      ! 
      
        第4部分如清單6所示,完成整個配置,它分配一條靜態(tài)路由到站點B的網(wǎng)絡(luò)(192.168.100.0),在這個簡單環(huán)境中,不要求IP路由協(xié)議。 
      
      
      清單6 站點A的配置的第4部分 
      
      ip classless 
      
      ip route 192.168.100.0 255.255.255.0 192.168.100.1 
      
      no ip http server 
      
      ! 
      計算機世界網(wǎng)(www.ccw.com.cn) 
      
 
相關(guān)鏈接: 
平遥县|
洛川县|
花垣县|
淮北市|
运城市|
郧西县|
万山特区|
合肥市|
泽州县|
蓬莱市|
锡林浩特市|
霞浦县|
仪征市|
玛曲县|
手游|
肇源县|
珲春市|
左权县|
南京市|
大安市|
岑溪市|
原平市|
突泉县|
扎囊县|
涟水县|
乾安县|
青海省|
萨迦县|
新田县|
轮台县|
衡阳市|
平定县|
乐亭县|
榆林市|
凉山|
紫阳县|
沁水县|
积石山|
高邮市|
山东|
辛集市|