配置VoIP

實驗報告

實驗時間:

2009-03-04

實驗人:

蔡連軍

實驗名稱:配置VoIPIP電話)

實驗任務和目標:

1.        在路由器R1R2上配置VoIP

2.        讓總部和分佈之間通話。

實驗環境描述:

XXX公司在北京和上海各有公司,每天都有大量的電話通信,因此公司付大量的電話費,爲了節約資金,靈活的實現各種增值業務的開發,公司希望採用新技術VoIP實現在局域網免費打電話,以節省公司開銷。

 

實驗拓撲及網絡規劃:

 

實驗操作過程及配置說明:

1.        網絡互通,路由器基本配置。

1.1 配置R1接口f0/0IP,併爲其配置默認路由

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 0.0.0.0 0.0.0.0 f0/0

1.2 配置R2接口f0/0Ip,併爲其配置默認路由

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 0.0.0.0 0.0.0.0 f0/0

1.3     R1R2相通

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 = 1/1/4 ms

r2#

2.        配置IP電話。

2.1     設置與R1連接電話號爲110,映射目的地電話:120R2f0/0接口IP1.1.1.2

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,映射目的地電話:110R1f0/0接口IP1.1.1.1

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 0.0.0.0 0.0.0.0 FastEthernet0/0

!

…………..

voice-port 0/0/0

!

voice-port 0/0/1

!

voice-port 0/1/0

!

voice-port 0/1/1

!

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 0.0.0.0 0.0.0.0 FastEthernet0/0

!

…………….

!

voice-port 0/1/0

!

voice-port 0/1/1

!

voice-port 0/2/0

!

voice-port 0/2/1

!

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章