VoIP語音電話的設(shè)計(jì)與實(shí)現(xiàn)
      
       2002/11/27
        Voice over IP是在IP網(wǎng)絡(luò)上傳輸語音流量(例如,電話和傳真)的技術(shù),主要是一種軟件特性,但是,要在Cisco2600/3600系列路由器上實(shí)現(xiàn)這個(gè)功能,必須首先安裝語音模塊VNM(Voice 
      Network Module),VNM可以裝兩個(gè)或四個(gè)語音接口卡(VIC),每個(gè)接口卡都對(duì)應(yīng)于與語音接口相關(guān)的特定信號(hào)類型。 
      
      1. 單機(jī)實(shí)現(xiàn)IP語音電話 
      
      (1)在裝有兩個(gè)語音模塊的3600路由器上實(shí)現(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)配置概述 
      
      本實(shí)驗(yàn)是在Cisco3600 Router內(nèi)部實(shí)現(xiàn)的,沒有經(jīng)過鏈路傳輸,所以不需要優(yōu)化撥號(hào)點(diǎn)和網(wǎng)絡(luò)接口的配置,只需配置撥號(hào)點(diǎn): 
      
      ● 要配置源和目標(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 
      
      ● 要完成在撥號(hào)點(diǎn)1和撥號(hào)點(diǎn)4之間的端對(duì)端呼叫,在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. 路由器間實(shí)現(xiàn)IP語音電話 
      
      (1) 站點(diǎn)A有一個(gè)Cisco3600路由器,站點(diǎn)B有一個(gè)Cisco2600路由器,它們通過DCE/DTE V.35電纜背對(duì)背地連接起來。在每個(gè)路由器中安裝了一個(gè)含有一個(gè)VIC-2FXS的NM-2V,提
供兩個(gè)模擬電話的連接。 
      
      
      (2)創(chuàng)建并實(shí)現(xiàn)撥號(hào)方案 
      
      (3)基本配置: 
      
      站點(diǎn)A的基本配置見清單1(站點(diǎn)B的基本配置略)。 
      
      清單1 站點(diǎn)A RouterA的配置 
      
      Current configuration: 
      
      ! 
      
      version 12.0 
      
      service timestamps debug uptime //設(shè)定Debug跟蹤日志顯示其時(shí)間 
      
      service timestamps log uptime //設(shè)定看Log時(shí)顯示其時(shí)間 
      
      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 //啟動(dòng)回聲消除功能 
      
      ! 
      
      voice-port 3/0/1 
      
      ! 
      
      ! 
      
      dial-peer voice 1 pots //定義撥號(hào)對(duì)等體到語音物理端口 
      
      destination-pattern 2222 //定義電話號(hào)碼 
      
      port 3/0/0 //定義電話號(hào)碼 
      
      ! 
      
      dial-peer voice 2 voip //定義撥號(hào)對(duì)等體到語音 
      
      destination-pattern 1111 //為撥號(hào)對(duì)等體分配電話號(hào)碼 
      
      req-qos controlled-load //在分配帶寬時(shí),RSVP確保即使帶寬發(fā)生擁塞與過載時(shí),數(shù)據(jù)流也能得到優(yōu)先處理。 
      
      codec g711ulaw //撥號(hào)點(diǎn)的語音編碼速率—64000bps 
      
      ip precedence 5 //IP優(yōu)先級(jí),5為關(guān)鍵 
      
      no vad //禁用語音活動(dòng)檢測(cè) 
      
      session target ipv4:192.168.100.1 //定義Voip路由,為對(duì)端的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ù)公共的功能,站點(diǎn)A的配置分為4個(gè)不同的部分。第1部分在清單2中描述,它為日志和調(diào)試命令啟用時(shí)間標(biāo)記,為路由器指定一個(gè)主機(jī)名稱。 
      
      清單2 站點(diǎn)A的配置的第1部分 
      
      version 12.0 
      
      service timestamps debug uptime //設(shè)定Debug跟蹤日志顯示其時(shí)間 
      
      service timestamps log uptime //設(shè)定看Log時(shí)顯示其時(shí)間 
      
      no service password-encryption //口令不加密 
      
      ! 
      
      hostname router_A 
      
      ! 
      
      enable password cisco 
      
      ! 
      
      username router_A password 0 cisco 
      
      ! 
      
        第2部分在清單4中描述,它提供語音連接的實(shí)質(zhì)內(nèi)容,語音端口簡(jiǎn)單地標(biāo)識(shí)它們連接到的設(shè)備。撥號(hào)對(duì)等體1把電話號(hào)碼分配給物理語音端口,撥號(hào)對(duì)等體2定義VoIP呼叫到站點(diǎn)B。在語音端口3/0/0上啟動(dòng)回聲消除功能。IP優(yōu)先級(jí)設(shè)置為5,設(shè)置資源預(yù)留協(xié)議RSVP為controlled-load,確保即使帶寬發(fā)生擁塞與過載時(shí),數(shù)據(jù)流也能得到優(yōu)先處理。而且因?yàn)槎嘤嗟膸挘Z音活動(dòng)檢測(cè)被禁止了,并為撥號(hào)點(diǎn)配置了語音編碼速率—64000bps。 
      
      
      清單4 站點(diǎn)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 站點(diǎn)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所示,完成整個(gè)配置,它分配一條靜態(tài)路由到站點(diǎn)B的網(wǎng)絡(luò)(192.168.100.0),在這個(gè)簡(jiǎn)單環(huán)境中,不要求IP路由協(xié)議。 
      
      
      清單6 站點(diǎn)A的配置的第4部分 
      
      ip classless 
      
      ip route 192.168.100.0 255.255.255.0 192.168.100.1 
      
      no ip http server 
      
      ! 
      計(jì)算機(jī)世界網(wǎng)(www.ccw.com.cn) 
      
 
相關(guān)鏈接: 
固原市|
乌兰察布市|
图们市|
山阴县|
抚松县|
甘洛县|
乌什县|
乌兰察布市|
泰和县|
泗洪县|
科尔|
天长市|
神池县|
县级市|
遂宁市|
连山|
连江县|
舒兰市|
磐石市|
天峨县|
鹿邑县|
鄢陵县|
临澧县|
邯郸县|
旺苍县|
察雅县|
隆尧县|
抚远县|
仁化县|
乌审旗|
安顺市|
蒙城县|
莱芜市|
璧山县|
无棣县|
滨海县|
河津市|
通山县|
平度市|
元谋县|
渑池县|