بحث هذه المدونة الإلكترونية

الاثنين، ١١ مارس ٢٠١٣

How to Simulate PSTN Using GNS3


بسم الله والحمد لله والصلاة والسلام علي رسول الله وآله وصحبه وإخوانه وسلم

How to Simulate PSTN Using GNS3

 

This is my initial CCNA VOICE lab using GNS3. The most important in this post is how to simulate the Public Switched Telephone Network (PSTN). As you know currently GNS3 does not support FXS or FXO ports, so the following configuration showing you how to get around this by Allah’s willing.
So, I have used the following IOS:
(C3745-IPVOICE_IVS-M), Version 12.4(15)T14
It is the same on all routers and the PSTN, this is to decrease the processor load. Because as you know GNS3 uses the ghost image feature which uses a single IOS on all routers from the same type instead of using a dedicated image for each router.


HQ:
voice service voip
 allow-connections h323 to h323
!
interface Loopback0
 ip address 10.10.10.1 255.255.255.255
 h323-gateway voip interface
 h323-gateway voip bind srcaddr 10.10.10.1
!
interface FastEthernet0/0
 ip address 192.168.20.1 255.255.255.0
 speed 100
 full-duplex
!
interface FastEthernet0/1
 ip address 172.17.20.2 255.255.255.252
 speed 100
 full-duplex
!
interface Serial1/1
 ip address 172.16.10.5 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 172.16.10.1 255.255.255.252
 serial restart-delay 0
!
router eigrp 100
 passive-interface FastEthernet0/0
 network 0.0.0.0
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 172.17.20.1
!
dial-peer voice 2 voip
 destination-pattern 10..
 session target ipv4:172.16.10.2
!
dial-peer voice 3 voip
 destination-pattern 20..
 session target ipv4:172.16.10.6
!
dial-peer voice 1 voip
 destination-pattern .T
 session target ipv4:10.10.10.10
 incoming called-number .
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
telephony-service
 max-ephones 20
 max-dn 20
 ip source-address 192.168.20.1 port 2000
 max-conferences 8 gain -6
 transfer-system full-consult
!
ephone-dn  1  dual-line
 number 3010
!
ephone-dn  2  dual-line
 number 3011
!
ephone  1
 mac-address 000C.29DE.9093
 type CIPC
 button  1:1 2:2
!

BR1:
voice service voip
 allow-connections h323 to h323
!
interface Loopback0
 ip address 10.10.10.2 255.255.255.255
 h323-gateway voip interface
 h323-gateway voip bind srcaddr 10.10.10.2
!
interface FastEthernet0/0
 ip address 192.168.10.1 255.255.255.0
 speed 100
 full-duplex
!
interface FastEthernet0/1
 ip address 172.17.30.2 255.255.255.252
 speed 100
 full-duplex
!
interface Serial1/0
 ip address 172.16.10.10 255.255.255.252
 serial restart-delay 0
!
interface Serial1/2
 ip address 172.16.10.2 255.255.255.252
 serial restart-delay 0
!
router eigrp 100
 passive-interface FastEthernet0/0
 network 0.0.0.0
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 172.17.30.1
!
dial-peer voice 2 voip
 destination-pattern 30..
 session target ipv4:172.16.10.1
!
dial-peer voice 3 voip
 destination-pattern 20..
 session target ipv4:172.16.10.9
!
dial-peer voice 1 voip
 destination-pattern .T
 session target ipv4:10.10.10.10
 incoming called-number .
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
telephony-service
 max-ephones 20
 max-dn 20
 ip source-address 192.168.10.1 port 2000
 max-conferences 8 gain -6
 transfer-system full-consult
!
ephone-dn  1  dual-line
 number 1010
!
ephone-dn  2  dual-line
 number 1011
!
ephone  1
 mac-address 000C.2909.DB4B
 type CIPC
 button  1:1 2:2
!

BR2:
voice service voip
 allow-connections h323 to h323
!
interface Loopback0
 ip address 10.10.10.3 255.255.255.255
 h323-gateway voip interface
 h323-gateway voip bind srcaddr 10.10.10.3
!
interface FastEthernet0/0
 ip address 192.168.40.1 255.255.255.0
 speed 100
 full-duplex
!
interface FastEthernet0/1
 ip address 172.17.10.2 255.255.255.252
 speed 100
 full-duplex
!
interface Serial1/0
 ip address 172.16.10.9 255.255.255.252
 serial restart-delay 0
!
interface Serial1/1
 ip address 172.16.10.6 255.255.255.252
 serial restart-delay 0
!
router eigrp 100
 passive-interface FastEthernet0/0
 network 0.0.0.0
 no auto-summary
!
ip route 0.0.0.0 0.0.0.0 172.17.10.1
!
dial-peer voice 2 voip
 destination-pattern 10..
 session target ipv4:172.16.10.10
!
dial-peer voice 3 voip
 destination-pattern 30..
 session target ipv4:172.16.10.5
!
dial-peer voice 1 voip
 destination-pattern .T
 session target ipv4:10.10.10.10
 incoming called-number .
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
telephony-service
 max-ephones 20
 max-dn 20
 ip source-address 192.168.40.1 port 2000
 max-conferences 8 gain -6
 transfer-system full-consult
!
ephone-dn  1  dual-line
 number 2010
!
ephone-dn  2  dual-line
 number 2011
!
ephone  1
 mac-address 000C.291A.F96B
 type CIPC
 button  1:1 2:2
!

PSTN:
voice service voip
 allow-connections h323 to h323
 allow-connections h323 to sip
 allow-connections sip to h323
 allow-connections sip to sip
!
interface Loopback0
 ip address 10.10.10.10 255.255.255.255
 h323-gateway voip interface
 h323-gateway voip bind srcaddr 10.10.10.10
!
interface FastEthernet0/0
 ip address 192.168.1.99 255.255.255.0
 speed 100
 full-duplex
!
interface FastEthernet1/0
 no switchport
 ip address 172.17.20.1 255.255.255.252
 speed 100
!
interface FastEthernet1/1
 no switchport
 ip address 172.17.30.1 255.255.255.252
 speed 100
!
interface FastEthernet1/2
 no switchport
 ip address 172.17.10.1 255.255.255.252
 speed 100
!
ip route 10.10.10.1 255.255.255.255 172.17.20.2
ip route 10.10.10.2 255.255.255.255 172.17.30.2
ip route 10.10.10.3 255.255.255.255 172.17.10.2
!
dial-peer voice 1 voip
 incoming called-number .
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
dial-peer voice 2 voip
 description *** HQ ***
 destination-pattern 30..
 session target ipv4:10.10.10.1
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
dial-peer voice 3 voip
 description *** BR1 ***
 destination-pattern 10..
 session target ipv4:10.10.10.2
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
dial-peer voice 4 voip
 description *** BR2 ***
 destination-pattern 20..
 session target ipv4:10.10.10.3
 dtmf-relay h245-alphanumeric
 codec g711ulaw
 no vad
!
telephony-service
 max-ephones 20
 max-dn 20
 ip source-address 192.168.1.99 port 2000
 max-conferences 8 gain -6
 transfer-system full-consult
!
ephone-dn  1  dual-line
 number 125
!
ephone-dn  2  dual-line
 number 3645258
!
ephone-dn  3  dual-line
 number 4256821
!
ephone-dn  4  dual-line
 number 5425681
!
ephone  1
 mac-address 00E0.4C04.E85F
 type CIPC
 button  1:1 2:2 3:3 4:4
!

Making some rings between PSTN and the internal:



ولا تنسوني والمسلمين من صالح الدعاء

وصلي الله وسلم وبارك علي النبي وآله وصحبه وإخوانه وسلم



 

ليست هناك تعليقات:

إرسال تعليق

ضع تعليقك هنا ثم اضغط علي زرار كتابة تعليق وتذكر قوله تعالي: "ما يلفظ من قول إلا لديه رقيب عتيد"، سورة ق