Cấu hình dải timeslot sử dụng.
CME(config)#controller e1 0/2/0
CME(config-controller)#pri-group timeslots ?
<1-31> List of timeslots which comprise the pri-group
CME(config-controller)#pri-group timeslots 1-31
CME(config-controller)#
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(1), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(2), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(3), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(4), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(5), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(6), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(7), changed state to up
May 13 06:55:27.739: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(8), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(9), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(10), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(11), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(12), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(13), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(14), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(15), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(17), changed state to up
May 13 06:55:27.743: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(18), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(19), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(20), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(21), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(22), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(23), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(24), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(25), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(26), changed state to up
May 13 06:55:27.747: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(27), changed state to up
May 13 06:55:27.751: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(28), changed state to up
May 13 06:55:27.751: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(29), changed state to up
May 13 06:55:27.751: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(30), changed state to up
May 13 06:55:27.751: %LINK-3-UPDOWN: Interface ISDN-VOICE 0/2/0:15(31), changed state to up
May 13 06:55:28.651: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:0, changed state to down
May 13 06:55:28.655: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:1, changed state to down
May 13 06:55:28.659: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:2, changed state to down
May 13 06:55:28.659: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:3, changed state to down
May 13 06:55:28.663: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:4, changed state to down
May 13 06:55:28.663: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:5, changed state to down
May 13 06:55:28.667: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:6, changed state to down
May 13 06:55:28.667: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:7, changed state to down
May 13 06:55:28.671: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:8, changed state to down
May 13 06:55:28.671: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0:9, changed state to down
CME(config-controller)#
CME#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset up up
FastEthernet0/0.1 10.1.1.254 YES manual up up
FastEthernet0/0.10 10.1.10.254 YES manual up up
FastEthernet0/0.20 10.1.20.254 YES manual up up
Service-Engine0/1 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/2/0:0 unassigned YES unset down down
Serial0/2/0:1 unassigned YES unset down down
Serial0/2/0:2 unassigned YES unset down down
Serial0/2/0:3 unassigned YES unset down down
Serial0/2/0:4 unassigned YES unset down down
Serial0/2/0:5 unassigned YES unset down down
Serial0/2/0:6 unassigned YES unset down down
Serial0/2/0:7 unassigned YES unset down down
Serial0/2/0:8 unassigned YES unset down down
Serial0/2/0:9 unassigned YES unset down down
Serial0/2/0:10 unassigned YES unset down down
Serial0/2/0:11 unassigned YES unset down down
Serial0/2/0:12 unassigned YES unset down down
Serial0/2/0:13 unassigned YES unset down down
Serial0/2/0:14 unassigned YES unset down down
Serial0/2/0:15 unassigned YES unset down down
Serial0/2/0:16 unassigned YES unset down down
Serial0/2/0:17 unassigned YES unset down down
Serial0/2/0:18 unassigned YES unset down down
Serial0/2/0:19 unassigned YES unset down down
Serial0/2/0:20 unassigned YES unset down down
Serial0/2/0:21 unassigned YES unset down down
Serial0/2/0:22 unassigned YES unset down down
Serial0/2/0:23 unassigned YES unset down down
Serial0/2/0:24 unassigned YES unset down down
Serial0/2/0:25 unassigned YES unset down down
Serial0/2/0:26 unassigned YES unset down down
Serial0/2/0:27 unassigned YES unset down down
Serial0/2/0:28 unassigned YES unset down down
Serial0/2/0:29 unassigned YES unset down down
Serial0/2/0:30 unassigned YES unset down down
CME#
CME# show voice port summary
IN OUT
PORT CH SIG-TYPE ADMIN OPER STATUS STATUS EC
=============== == ============ ===== ==== ======== ======== ==
0/2/0:15 01 isdn-voice up down none none y
0/2/0:15 02 isdn-voice up down none none y
0/2/0:15 03 isdn-voice up down none none y
0/2/0:15 04 isdn-voice up down none none y
0/2/0:15 05 isdn-voice up down none none y
0/2/0:15 06 isdn-voice up down none none y
0/2/0:15 07 isdn-voice up down none none y
0/2/0:15 08 isdn-voice up down none none y
0/2/0:15 09 isdn-voice up down none none y
0/2/0:15 10 isdn-voice up down none none y
0/2/0:15 11 isdn-voice up down none none y
0/2/0:15 12 isdn-voice up down none none y
0/2/0:15 13 isdn-voice up down none none y
0/2/0:15 14 isdn-voice up down none none y
0/2/0:15 15 isdn-voice up down none none y
0/2/0:15 17 isdn-voice up down none none y
0/2/0:15 18 isdn-voice up down none none y
0/2/0:15 19 isdn-voice up down none none y
0/2/0:15 20 isdn-voice up down none none y
0/2/0:15 21 isdn-voice up down none none y
0/2/0:15 22 isdn-voice up down none none y
0/2/0:15 23 isdn-voice up down none none y
0/2/0:15 24 isdn-voice up down none none y
0/2/0:15 25 isdn-voice up down none none y
0/2/0:15 26 isdn-voice up down none none y
0/2/0:15 27 isdn-voice up down none none y
0/2/0:15 28 isdn-voice up down none none y
0/2/0:15 29 isdn-voice up down none none y
0/2/0:15 30 isdn-voice up down none none y
0/2/0:15 31 isdn-voice up down none none y
50/0/1 1 efxs up dorm on-hook idle y
50/0/1 2 efxs up dorm on-hook idle y
50/0/2 1 efxs up dorm on-hook idle y
50/0/2 2 efxs up dorm on-hook idle y
50/0/3 1 efxs up up on-hook idle y
50/0/3 2 efxs up up on-hook idle y
PWR FAILOVER PORT PSTN FAILOVER PORT
================= ==================
CME#
Framing được dùng mặc định là CRC4 và linecode HDB3. Sau khi thực hiện lệnh “pri-group timeslots 1-31”, router sẽ tự động tạo ra một cổng Serial0/3/0:15. Kênh D của ISDN dùng timeslot 16.
interface Serial0/2/0:15
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn incoming-voice voice
no cdp enable
exit
Cấu hình dial-peer cho gọi ra mạng PSTN. Mạng PSTN nên kiểu dial-peer là pots.
CME(config)#dial-peer voice ?
<1-1073741823> Voice dial-peer tag
CME(config)#dial-peer voice 1 ?
mmoip Multi Media Over IP
pots Telephony
voatm Voice over ATM
vofr Voice over Frame Relay
voip Voice over IP
CME(config)#dial-peer voice 1 pots
CME(config-dial-peer)#destination-pattern .T
CME(config-dial-peer)#port 0/2/0:15
CME(config-dial-peer)#forward-digit all
CME(config-dial-peer)#exit
CME(config)#
CME(config)#dial-peer voice 2 pots
CME(config-dial-peer)#incoming called-number .
CME(config-dial-peer)#direct-inward-dial
CME(config-dial-peer)#exit
CME(config)#
Nếu chúng ta cấu hình “dial-peer voice 1 pots” như bên dưới, các IP Phone x1001, x1002, x1003 muốn gọi ra ngoài mạng PSTN sẽ phải nhấn number 9 trước khi nhấn số điện thoại cần gọi đến ở bên ngoài mạng PTSN vì quy tắc “POTS Dial-Peer Digit Stripping” mặc định trên CME (nếu số 901268772021 được “dialed”, 01268772021 sẽ được gửi đi.). Các cuộc gọi tới số nội bộ thì không cần phải nhấn number 9, chẳng hạn từ x1001 gọi tới x1002 thì không cần phải nhấn number 9.
CME(config)#dial-peer voice 1 pots
CME(config-dial-peer)#destination-pattern 9T
CME(config-dial-peer)#port 0/2/0:15
Tại router CME, để chuyển “dial tone” cho các cuộc gọi ra ngoài trước khi nhấn các số PSTN number, ta có thể cấu hình câu lệnh “secondary-dialtone command”, khi IP Phone x1001, x1002, x1003 nhấn phím số 9 cho cuộc gọi đi PSTN, user sẽ nghe được từ “dial tone” này chuyển thành “dial tone” khác.
CME(config)# telephony-service
CME(config-dial-peer)# secondary-dialtone 9
Tổng kết cấu hình E1 trên router CME.
card type e1 0 2
network-clock-participate wic 2
network-clock-select 1 e1 0/2/0
isdn switch-type primary-ni
controller e1 0/2/0
pri-group timeslots 1-31
description **voice to PSTN router**
exit
interface Serial0/2/0:15
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn incoming-voice voice
no cdp enable
exit
dial-peer voice 1 pots
destination-pattern .T
port 0/2/0:15
forward-digit all
exit
dial-peer voice 2 pots
incoming called-number .
direct-inward-dial
exit
Bước 5: Cấu hình router PSTN và kết nối E1 interface
Cấu hình router PSTN cấp số điện thoại 01268772021 cho IP Phone.
hostname PSTN
interface f0/0
description Ket noi toi PC cai CIPC
ip address 10.2.10.254 255.255.255.0
no shutdown
exit
line vty 0 4
privilege level 15
no login
exit
line console 0
logging synchronous
exit
no ip domain-lookup
ip dhcp excluded-address 10.2.10.254
ip dhcp pool Voice
network 10.2.10.0 255.255.255.0
default-router 10.2.10.254
option 150 ip 10.2.10.254
exit
exit
clock set 6:30:00 13 May 2015
configure terminal
telephony-service
ip source-address 10.2.10.254 port 2000
max-dn 144
max-ephones 42
create cnf-files
no auto-reg-ephone
exit
ephone-dn 1 dual-line
number 01268772021
exit
ephone 1
mac-address 24b6.fd47.139e
type CIPC
button 1:1
codec g711ulaw
restart
exit
Cấu hình kết nối E1 interface trên router PSTN.
PSTN# show inventory
NAME: "2811 chassis", DESCR: "2811 chassis"
PID: CISCO2811 , VID: V05, SN: FTX0940A3K9
NAME: "VWIC2-2MFT-T1/E1 - 2-Port RJ-48 Multiflex Trunk - T1/E1 on Slot 0 SubSlot 2", DESCR: "VWIC2-2MFT-T1/E1 - 2-Port RJ-48 Multiflex Trunk - T1/E1"
PID: VWIC2-2MFT-T1/E1 , VID: V01 , SN: FOC16181M4G
NAME: "PVDMII DSP SIMM with four DSPs on Slot 0 SubSlot 5", DESCR: "PVDMII DSP SIMM with four DSPs"
PID: PVDM2-64 , VID: NA , SN: FOC09303P0J
NAME: "AIM Service Engine 1", DESCR: "AIM Service Engine"
PID: AIM-CUE , VID: V03 , SN: FOC12082MY9
PSTN#
Cấu hình controller E1, chú ý lệnh “clock source”, lệnh này chỉ đặt ở một phía khi kết nối E1 back-to-back.
card type e1 0 2
network-clock-participate wic 2
network-clock-select 1 e1 0/2/0
isdn switch-type primary-ni
controller e1 0/2/0
pri-group timeslots 1-31
clock source internal
description **voice to CME router**
exit
interface Serial0/2/0:15
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn protocol-emulate network
isdn incoming-voice voice
no cdp enable
exit
dial-peer voice 1 pots
destination-pattern 1…
port 0/2/0:15
forward-digit all
exit
dial-peer voice 2 pots
incoming called-number .
direct-inward-dial
exit
Chú ý trạng thái cổng kết nối Serial0/2/0:15 giờ đây đang ở trạng thái “up/up”
PSTN# show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.2.10.254 YES manual up up
Service-Engine0/1 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Serial0/2/0:0 unassigned YES unset down down
Serial0/2/0:1 unassigned YES unset down down
Serial0/2/0:2 unassigned YES unset down down
Serial0/2/0:3 unassigned YES unset down down
Serial0/2/0:4 unassigned YES unset down down
Serial0/2/0:5 unassigned YES unset down down
Serial0/2/0:6 unassigned YES unset down down
Serial0/2/0:7 unassigned YES unset down down
Serial0/2/0:8 unassigned YES unset down down
Serial0/2/0:9 unassigned YES unset down down
Serial0/2/0:10 unassigned YES unset down down
Serial0/2/0:11 unassigned YES unset down down
Serial0/2/0:12 unassigned YES unset down down
Serial0/2/0:13 unassigned YES unset down down
Serial0/2/0:14 unassigned YES unset down down
Serial0/2/0:15 unassigned YES unset up up
Serial0/2/0:16 unassigned YES unset down down
Serial0/2/0:17 unassigned YES unset down down
Serial0/2/0:18 unassigned YES unset down down
Serial0/2/0:19 unassigned YES unset down down
Serial0/2/0:20 unassigned YES unset down down
Serial0/2/0:21 unassigned YES unset down down
Serial0/2/0:22 unassigned YES unset down down
Serial0/2/0:23 unassigned YES unset down down
Serial0/2/0:24 unassigned YES unset down down
Serial0/2/0:25 unassigned YES unset down down
Serial0/2/0:26 unassigned YES unset down down
Serial0/2/0:27 unassigned YES unset down down
Serial0/2/0:28 unassigned YES unset down down
Serial0/2/0:29 unassigned YES unset down down
Serial0/2/0:30 unassigned YES unset down down
PSTN#
PSTN# show interfaces s0/2/0:15
Serial0/2/0:15 is up, line protocol is up (spoofing)
Hardware is DSX1
MTU 1500 bytes, BW 64 Kbit/sec, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:02, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 48 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
91 packets input, 273 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
92 packets output, 276 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
1 carrier transitions
Timeslot(s) Used:16, SCC: 0, Transmitter delay is 0 flags
PSTN#
Kiểm tra trạng thái của card E1 có kết nối với router CME. Nếu trạng thái là Multiple Frame Established có nghĩa là router Backbone đã có thể gửi và nhận cuộc gọi trên luồng E1 này.
PSTN# show isdn status
Global ISDN Switchtype = primary-ni
ISDN Serial0/2/0:15 interface
******* Network side configuration *******
dsl 0, interface ISDN Switchtype = primary-ni
Layer 1 Status:
ACTIVE
Layer 2 Status:
TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
Layer 3 Status:
0 Active Layer 3 Call(s)
Active dsl 0 CCBs = 0
The Free Channel Mask: 0xFFFF7FFF
Number of L2 Discards = 0, L2 Session ID = 85
Total Allocated ISDN CCBs = 0
PSTN#