實驗報告
實驗時間:
|
|
實驗人:
|
蔡連軍
|
實驗名稱:配置VoIP(IP電話)
|
|||
實驗任務和目標:
1. 在路由器R1和R2上配置VoIP。
2. 讓總部和分佈之間通話。
|
|||
實驗環境描述:
XXX公司在北京和上海各有公司,每天都有大量的電話通信,因此公司付大量的電話費,爲了節約資金,靈活的實現各種增值業務的開發,公司希望採用新技術VoIP實現在局域網免費打電話,以節省公司開銷。
|
|||
實驗拓撲及網絡規劃:
|
|||
實驗操作過程及配置說明:
1. 網絡互通,路由器基本配置。
1.1 配置R1接口f0/0的IP,併爲其配置默認路由
R1:
r1(config)#int f0/0
r1(config-if)#ip add 100.1.1.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#exi
r1(config)#i
o upp 2 07:53:38.039: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state t
r1(config)#ip route
1.2 配置R2接口f0/0的Ip,併爲其配置默認路由
r2(config)#int f0/0
r2(config-if)#ip add 100.1.1.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#exi
r2(config)#ip route
1.3 R1與R2相通
r2#
r2#ping 100.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 100.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max =
r2#
2. 配置IP電話。
2.1 設置與R1連接電話號爲110,映射目的地電話:120和R2的f0/0接口IP:
r1(config)#dial-peer voice 1 pots
r1(config-dial-peer)#destination-pattern 110
r1(config-dial-peer)#port
r1(config-dial-peer)#port 0/1/0
r1(config-dial-peer)#exi
r1(config)#dial-peer voice 10 voip
r1(config-dial-peer)#destination-pattern 120
r1(config-dial-peer)#sess
r1(config-dial-peer)#session targe ipv4:100.1.1.2
r1(config-dial-peer)#exi
r1(config)#^Z
2.2 設置與R2連接電話號爲110,映射目的地電話:110和R1的f0/0接口IP:
r2(config)#dial-peer voice 1 pots
r2(config-dial-peer)#destination-pattern 120
r2(config-dial-peer)#port 0/1/0
r2(config-dial-peer)#exi
r2(config)#dial-peer voice 10 voip
r2(config-dial-peer)#destination-pattern 110
r2(config-dial-peer)#session targe ipv4:100.1.1.1
r2(config-dial-peer)#exi
r2(config)#
r2(config)#^Z
|
|||
實驗結果:
R1:
r1#
r1#
r1#show run
Building configuration...
Current configuration : 968 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
…………
!
interface FastEthernet0/0
ip address 100.1.1.1 255.255.255.0
duplex auto
speed auto
!
ip forward-protocol nd
ip route
!
…………..
voice-port 0/0/0
!
voice-port 0/0/1
!
voice-port 0/1/0
!
voice-port
!
dial-peer voice 1 pots
destination-pattern 110
port 0/1/0
!
dial-peer voice 10 voip
destination-pattern 120
session target ipv4:100.1.1.2
……………
!
scheduler allocate 20000 1000
!
end
r1#
R2:
r2#show run
Building configuration...
Current configuration : 968 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
…………….
!
interface FastEthernet0/0
ip address 100.1.1.2 255.255.255.0
duplex auto
speed auto
!
……….
!
ip forward-protocol nd
ip route
!
…………….
!
voice-port 0/1/0
!
voice-port
!
voice-port 0/2/0
!
voice-port
!
dial-peer voice 1 pots
destination-pattern 120
port 0/1/0
!
dial-peer voice 10 voip
destination-pattern 110
session target ipv4:100.1.1.1
!
scheduler allocate 20000 1000
!
end
r2#
此時電話P1可以與電話P2通話
|
|||
總結和分析:
|
本文出自 “一生有你” 博客,請務必保留此出處http://cailianjun.blog.51cto.com/681597/198954
本文出自 51CTO.COM技術博客