You are on page 1of 24

Mc ch:

1 Cu hnh cuc gi gia hai in thoi analog.


2 Cu hnh cuc gi gia hai softphone cng site hoc khc site.
3 Cu hnh cuc gi gia softphone v analog.
Yu cu phn mm:
+SIP Server: y s dng SIP server bng phn mm Brekeke SIP Server(download ti a
ch:www.brekeke.com).
+Client:S dng softphone l X-Lite(C th download ti trang:www.couterpath.com).
Ci t cc phn mm
Ci t softphone X-Lite client
Sau khi ti chng trnh v ci t chng trnh
Bn cn khi ng li my hon tt ci t.
Sau khi ci t hon thnh X-Lite c giao din:

Ci t SIP Server
Sau khi ti SIP server v a ch www.brekeke.com,chy file setup ci SIP server.
Cu hnh cho cc router
+Cu hnh cho Router 1
Code:

!
!
interface Ethernet0/0
ip address 10.215.219.254 255.255.255.0
half-duplex
!
interface Serial0/0
bandwidth 256
ip address 192.168.1.1 255.255.255.0
clock rate 64000
no fair-queue
!
interface ATM0/1
no ip address
shutdown
no atm ilmi-keepalive
dsl operating-mode auto

!
ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.2
!
!
!
!
voice-port 1/1/0
!
voice-port 1/1/1
!
!
dial-peer cor custom
!
!
!
dial-peer voice 1 pots
destination-pattern 201
port 1/1/0
!
dial-peer voice 2 pots
destination-pattern 301
port 1/1/1
!
dial-peer voice 3 voip
destination-pattern 301
session target ipv4:192.168.1.2
!
dial-peer voice 4 voip
destination-pattern 101
session protocol sipv2
session target ipv4:10.215.219.79
codec g711alaw
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
End

//a ch SIP Server

+Cu hnh cho Router 2


--More-Code:

!
interface Ethernet0/0
ip address 10.215.219.254 255.255.255.0
half-duplex
!
interface Serial0/0
bandwidth 256

ip address 192.168.1.2 255.255.255.0


!
ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
!
!
voice-port 1/0/0
!
voice-port 1/0/1
!
!
!
dial-peer voice 1 pots
destination-pattern 301
port 1/0/0
!
dial-peer voice 2 voip
destination-pattern 201
session target ipv4:192.168.1.1
!
dial-peer voice 3 voip
destination-pattern 110
session protocol sipv2
session target ipv4:10.215.219.79 //a ch SIP Server
codec g711alaw
!
dial-peer voice 4 pots
destination-pattern 101
port 1/0/1
!
!
!
line con 0
line aux 0
line vty 0 4
privilege level 15
no login
!
!
end

4 Thc hin cu hnh cuc gi


Cu hnh cuc gi gia hai softphone client
-To ti khon ngi dng
Ti khon ngi dng c user name l s in thoi c gn cho mt ngi c th.

Hnh 4.1.1a Mn hnh to ti khon ngi dng


y to 2 ti khon c s in thoi l 101 v 102.Sau khi to ti khon xong c th kim tra
bng cch click vo tab View User

Hnh 4.1.1b Kim tra ti khon ngi dng trong tabView Users
+Thc hin cuc gi gia hai softphone
Sau khi ti khon ngi dng c to th bn c th ng k trn softphone client

Sau khi ang k thnh cng,ti khon sn sang

Hnh 4.1.2a:ng k ti khon c user l 101 trn softphone client thnh cng.
Sau khi ng k ti khon xong bn c th thit lp cuc gi gia hai ti khon ngi dng bng
softphone client. y s dng user 101 gi ti 102
Hnh 4.1.2b :Thit lp cuc gi t ti khon 101 n ti khon 102.

Hnh 4.1.2c ang gi ti ti khon 102


Hnh 4.1.2e :Cuc gi t 101 i vo 102.
Kt qu hin th khi thc hin cuc gi trong Active Session t s 101 n 102
-Cu hnh cuc gi gia hai in thoi analog,hoc gia softphone v in thoi analog
Mun thc hin cuc gi gia hai in thoi khc site hoc gia softphone v in thoi analog
th cn phi to cc rule trong dial-plan c th thc hin c cc vic trn.
Mn hnh to rule.

Hnh 4.1.1b Kim tra ti khon ngi dng trong tabView Users
-Thc hin cuc gi gia hai softphone
Sau khi ti khon ngi dng c to th bn c th ng k trn softphone client

y to 2 rule c tn l Rule 1 v Rule 3.


Sau khi to rule xong c th kim tra li trong tab View Rules

Hnh th hin cc rule va to trong dial-plan

Packet Tracer 6.0 - IP telephony basic configuration

Tutorial description
This tutorial is designed to help you to configure the new voice over ip (voip) features available
in Packet Tracer 6.0. It will show you the steps required to :

Configure Call Manager ExpressTM on a 2811 router,

Use the various telephony devices

Setup dial peers

Connect CiscoTM IP phones as well as analogue phone on the network.

Network diagram

Note : Connect only IP Phone 1 at the beginning of the lab. IP Phone 2 must be disconnected.

Tasks 1 : Configure interface FastEthernet 0/0 and DHCP


server on RouterA (2811 router)
#Configure the FA 0/0 interface#
RouterA>enable
RouterA#configure terminal

RouterA(config)#interface FastEthernet0/0
RouterA(config-if)#ip address 192.168.10.1 255.255.255.0
RouterA(config-if)#no shutdown

The DHCP server is needed to provide an IP adress and the TFTP server location for each IP
phone connected to the network.
RouterA(config)#ip dhcp pool VOICE #Create DHCP pool named VOICE
RouterA(dhcp-config)#network 192.168.10.0 255.255.255.0 #DHCP network network
192.168.10 with /24 mask#
RouterA(dhcp-config)#default-router 192.168.10.1 #The default router IP address#
RouterA(dhcp-config)#option 150 ip 192.168.10.1 #Mandatory for voip configuration.

After the configuration, wait a moment and check that IP Phone 1 has received an IP address
by placing your cursor over the phone until a configuration summary appears.

Tasks 2 : Configure the Call Manager Express telephony


service on RouterA
You must now configure the Call Manager Express telephony service on RouterA to enable voip
on your network.
RouterA(config)#telephony-service #Configuring the router for telephony services#
RouterA(config-telephony)#max-dn 5 #Define the maximum number of directory numbers#
RouterA(config-telephony)#max-ephones 5 #Define the maximum number of phones#
RouterA(config-telephony)#ip source-address 192.168.10.1 port 2000 #IP Address source#
RouterA(config-telephony)#auto assign 4 to 6 #Automatically assigning ext numbers to buttons#
RouterA(config-telephony)#auto assign 1 to 5 #Automatically assigning ext numbers to buttons#

Task 4 : Configure a voice vlan on SwitchA


Apply the following configuration on SwitchA interfaces. This configuration will separate voice
and data traffic in different vlans on SwitchA. data packets will be carried on the access vlan.
SwitchA(config)#interface range fa0/1 5 #Configure interface range#
SwitchA(config-if-range)#switchport mode access
SwitchA(config-if-range)#switchport voice vlan 1 #Define the VLAN on which voice packets
will be handled#

Task 5 : Configure the phone directory for IP Phone 1


Although IP Phone 1 is already connected to SwitchA, it needs additionnal configuration before
beeing able to communicate. You need to configure RouterA CME to assign a phone number to
this IP phone.
RouterA(config)#ephone-dn 1 #Defining the first directory entry#
RouterA(config-ephone-dn)#number 54001 #Assign the phone number to this entry#

Task 5 : Verify the configuration


Ensure that the IP Phone receives an IP Address and a the phone number 54001 from RouterA
(this can take a short while).

Task 6 : Configure the phone directory for IP Phone 2

Connect IP Phone 2 to SwitchA and power the phone ON using the power adapter (Physical tab).
RouterA(config)#ephone-dn 2 #Defining the first directory entry#
RouterA(config-ephone-dn)#number 54002 #Assign the phone number to this entry#

Task 7 : Verify the configuration


Ensure that the IP Phone 2 receives an IP Address and a the phone number 54002 from RouterA
(this can take a short while). Same procedure as task n5.
Dial 54001 and check if IP phone 1 correctly receives the call.

1. CONFIGURATION FOR DHCP SERVER ROUTER


Router>en

Router>enable
Router#con
Router#conf
Router#configure
Configuring from terminal, memory, or network [terminal]? terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#in
Router(config)#interface fa
Router(config)#interface fastEthernet 0/0
Router(config-if)#ip add
Router(config-if)#ip address 172.16.1.2 255.255.255.0
Router(config-if)#no sh
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state


to up

Router(config-if)#e
Router(config-if)#exit
Router(config)#ip dh
Router(config)#ip dhcp ex
Router(config)#ip dhcp excluded-address ?
A.B.C.D Low IP address
Router(config)#ip dhcp excluded-address

% Incomplete command.
Router(config)#ip dhcp excluded-address 172.16.1.1 ?
A.B.C.D High IP address
<cr>
Router(config)#ip dhcp excluded-address 172.16.1.1 172.16.1.5
Router(config)#ip dh
Router(config)#ip dhcp p
Router(config)#ip dhcp pool ?
WORD Pool name
Router(config)#ip dhcp pool PCPOOL
Router(dhcp-config)#ne
Router(dhcp-config)#network 172.16.1.0 255.255.255.0
Router(dhcp-config)#
Router(config)#ip dhcp pool PCPOOL
Router(dhcp-config)#de
Router(dhcp-config)#default-router 172.16.1.1
Router(dhcp-config)#op
Router(dhcp-config)#option 160 ?
ip Data is one or more IP addresses
Router(dhcp-config)#option ?
<0-254> DHCP option code
Router(dhcp-config)#option 160 172.16.1.1
^
% Invalid input detected at '^' marker.

Router(dhcp-config)#option 160 ip 172.16.1.1

%This version of PT does not support options other than 150


Router(dhcp-config)#option 150 ip 172.16.1.1
Router(dhcp-config)#
2. CONFIGURATION FOR UCME ROUTER (UNIFIED COMMUNICATION
MANAGEMENT EQUIPMENT)
Nhu1>en
Nhu1>enable
Nhu1#conf
Nhu1#configure te
Nhu1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Nhu1(config)#show ?
% Unrecognized command
Nhu1(config)#^Z
Nhu1#
%SYS-5-CONFIG_I: Configured from console by console
Nhu1#sho
Nhu1#show
% Incomplete command.
Nhu1#show ?
aaa
Show AAA values
access-lists
List access lists
arp
Arp table
cdp
CDP information
class-map
Show QoS Class Map
clock
Display the system clock
controllers
Interface controllers status
crypto
Encryption module
debugging
State of each debugging option
dhcp
Dynamic Host Configuration Protocol status
dot11
IEEE 802.11 show information
file
Show filesystem information
flash:
display information about flash: file system
frame-relay
Frame-Relay information
history
Display the session command history
hosts
IP domain-name, lookup style, nameservers, and host
table
interfaces
Interface status and configuration
ip
IP information
ipv6
IPv6 information
license
Show license information
line
TTY line information
logging
Show the contents of logging buffers
login
Display Secure Login Configurations and State

mac-address-table MAC forwarding table


ntp
Network time protocol
parser
Show parser commands
policy-map
Show QoS Policy Map
privilege
Show current privilege level
processes
Active process statistics
protocols
Active network routing protocols
queue
Show queue contents
queueing
Show queueing configuration
running-config
Current operating configuration
secure
Show secure image and configuration archive
sessions
Information about Telnet connections
Nhu1#show ru
Nhu1#show running-config
Building configuration...
Current configuration : 624 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Nhu1
!
!
!
!
!
!
!
!
!
!
!
!
license udi pid CISCO2911/K9 sn FTX1524ZSZ5
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface GigabitEthernet0/0
no ip address

duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
Nhu1#
Nhu1#
Nhu1#
Nhu1#
Nhu1#
Nhu1#con
Nhu1#conf
Nhu1#configure te
Nhu1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.

Nhu1(config)#hostname ?
WORD This system's network name
Nhu1(config)#hostname UCME
UCME(config)#in
UCME(config)#interface gi
UCME(config)#interface gigabitEthernet 0/0
UCME(config-if)#ip address ?
A.B.C.D IP address
dhcp
IP Address negotiated via DHCP
UCME(config-if)#ip address 172.16.1.1 ?
A.B.C.D IP subnet mask
UCME(config-if)#ip address 172.16.1.1 255.255.255.0
UCME(config-if)#no shu
UCME(config-if)#no shutdown
UCME(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to
up
%LINEPROTO-5-UPDOWN: Line protocol on Interface
GigabitEthernet0/0, changed state to up
UCME(config-if)#en
UCME(config-if)#enca
UCME(config-if)#encap
UCME(config-if)#encapsu
UCME(config-if)#encapsula
UCME(config-if)#encapsulation
UCME(config-if)#encapsulation ?
% Unrecognized command
UCME(config-if)#exit
UCME(config)#inte
UCME(config)#interface gi
UCME(config)#interface gigabitEthernet 0/0
UCME(config-if)#en
UCME(config-if)#enca
UCME(config-if)#exit
UCME(config)#in
UCME(config)#interface f
UCME(config)#interface fastEthernet 0/0.5
%Invalid interface type and number
UCME(config)#int gi
UCME(config)#int gigabitEthernet 0/0 ?
<cr>
UCME(config)#int gigabitEthernet 0/0.5
UCME(config-subif)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0.5, changed state to
up

%LINEPROTO-5-UPDOWN: Line protocol on Interface


GigabitEthernet0/0.5, changed state to up
UCME(config-subif)#
UCME#CONF
UCME#CONFigure te
UCME#CONFigure terminal
Enter configuration commands, one per line. End with CNTL/Z.
UCME(config)#in
UCME(config)#interface gi
UCME(config)#interface gigabitEthernet 0/0.5
UCME(config-subif)#en
UCME(config-subif)#encapsulation ?
dot1Q IEEE 802.1Q Virtual LAN
UCME(config-subif)#encapsulation d
UCME(config-subif)#encapsulation dot1Q
% Incomplete command.
UCME(config-subif)#encapsulation dot1Q ?
<1-1005> IEEE 802.1Q VLAN ID
UCME(config-subif)#encapsulation dot1Q 5
UCME(config-subif)#
3. CONFIGURE THE SWITCH
Switch>enable
Switch#con
Switch#conf
Switch#configure te
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#vl
Switch(config)#vlan ?
<1-1005> ISL VLAN IDs 1-1005
Switch(config)#vlan 5
Switch(config-vlan)#na
Switch(config-vlan)#name ?
WORD The ascii name for the VLAN
Switch(config-vlan)#name IPphone1
(VLAN for voice)
Switch(config-vlan)#i
Switch(config-vlan)#exi
Switch(config-vlan)#exit
Switch(config)#vl
Switch(config)#vlan 10
Switch(config-vlan)#nam
Switch(config-vlan)#name DATA
(VLAN for data, DATA stands for data network connecting between
IPphones and PCs)
Switch(config-vlan)#

ASSIGN 3 PORTS CONNECTING FROM THE SWITCH TO 3 IPHONES


TO VLAN 10 (DATA VLAN) (Because it must be data network when
we connect PCs to IP phones)
Switch(config)#interface range fastEthernet 0/1-3
(declare the range from port fastethernet 0/1 to 0/3)
Switch(config-if-range)#switchport mode access
(assign these interfaces in unconditionally access mode)
Switch(config-if-range)#switchport access ?
vlan Set VLAN when interface is in access mode
Switch(config-if-range)#switchport access v
Switch(config-if-range)#switchport access vlan ?
<1-1005> VLAN ID of the VLAN when this port is in access mode
Switch(config-if-range)#switchport access vlan 10
(VLAN 10 is data VLAN)
Switch(config-if-range)#switchport voice vlan 5
(VLAN 5 for voice)
Voice will be used for connection between IP phones and Switch,
and data between IP phones and PCs
- ASSIGN CONNECTION BETWEEN DHCP ROUTER AND SWITCH TO
VLAN 5 (VOICE VLAN)
Switch(config-if)#switchport mode access
Switch(config-if)#sw
Switch(config-if)#switchport a
Switch(config-if)#switchport access v
Switch(config-if)#switchport access vlan 5
- DECLARE CONNECTION BETWEEN UCME ROUTER AND THE SWITCH
IS TRUNK
Switch(config)#INterface FastEthernet 0/10
Switch(config-if)#SWitchport mode trunk
4. TURN THE IP PHONES ON (BY DRAGGING ADAPTER AND CONNECTING
TO IPPHONE)
5. CONFIGURE ON UCME ROUTER
Open the telephone service on the router (In packet tracer, we must
use Router 2811 for supporting this service)
- OPEN TELEPHONE SERVICE
UCME(config)#telephony-service
- CONFIGURE DIRECTORIES NUMBER
UCME(config-telephony)#max-dn 10
(Maximun directory number is 10, because we use only 3 IP
phones, so 10 is enough)
UCME(config-telephony)#max-ephones 5
UCME(config-telephony)#ip source-address 172.16.1.1 port 2000
(172.16.1.1 is IP of UCME router port connecting to the switch;
and we let port 2000 run telephony-service, IP phone will
communicate with UCME Router through this port)

6. SHOW IP ADDRESS INFORMATION ON THE DHCP ROUTER


Router#show ip dhcp binding
7. Show IP phone information which registered on UCME router
UCME#show ephone
(Do not know why have no information displayed when using this
command on the router)
8. Fdffd
UCME(config)#ephone-dn 1
UCME(config-ephone-dn)#number 6001
UCME(config-ephone-dn)#ex
UCME(config-ephone-dn)#exit
UCME(config)#ephone-dn 2
UCME(config-ephone-dn)#%LINK-3-UPDOWN: Interface ephone_dsp
DN 2.1, changed state to up
UCME(config-ephone-dn)#number 6002
UCME(config-ephone-dn)#exit
UCME(config)#ephone-dn 3
UCME(config-ephone-dn)#%LINK-3-UPDOWN: Interface ephone_dsp
DN 3.1, changed state to up
UCME(config-ephone-dn)#exit
UCME(config)#ephone-dn 3
UCME(config-ephone-dn)#number 6003
UCME(config-ephone-dn)#
9. F
10.

Packet Tracer 6.0 - IP telephony basic configuration


(Good_Tran Quang Nhu)
http://www.packettracernetwork.com/advanced-network-features/voip/voipconfiguration.html

Tutorial description
This tutorial is designed to help you to configure the new voice over ip (voip) features available
in Packet Tracer 6.0. It will show you the steps required to :

Configure Call Manager ExpressTM on a 2811 router,

Use the various telephony devices

Setup dial peers

Connect CiscoTM IP phones as well as analogue phone on the network.

Network diagram

Note : Connect only IP Phone 1 at the beginning of the lab. IP Phone 2 must be disconnected.

Tasks 1 : Configure interface FastEthernet 0/0 and DHCP


server on RouterA (2811 router)

#Configure the FA 0/0 interface#


RouterA>enable
RouterA#configure terminal
RouterA(config)#interface FastEthernet0/0
RouterA(config-if)#ip address 192.168.10.1 255.255.255.0
RouterA(config-if)#no shutdown

The DHCP server is needed to provide an IP address and the TFTP server location for each IP
phone connected to the network.
RouterA(config)#ip dhcp pool VOICE #Create DHCP pool named VOICE
RouterA(dhcp-config)#network 192.168.10.0 255.255.255.0 #DHCP network network
192.168.10 with /24 mask#
RouterA(dhcp-config)#default-router 192.168.10.1 #The default router IP address#
RouterA(dhcp-config)#option 150 ip 192.168.10.1 #Mandatory for voip configuration.

After the configuration, wait a moment and check that IP Phone 1 has received an IP address
by placing your cursor over the phone until a configuration summary appears.

Tasks 2 : Configure the Call Manager Express telephony


service on RouterA
You must now configure the Call Manager Express telephony service on RouterA to enable voip
on your network.
RouterA(config)#telephony-service #Configuring the router for telephony services#
RouterA(config-telephony)#max-dn 5 #Define the maximum number of directory numbers#
RouterA(config-telephony)#max-ephones 5 #Define the maximum number of phones#

RouterA(config-telephony)#ip source-address 192.168.10.1 port 2000 #IP Address source#


RouterA(config-telephony)#auto assign 4 to 6 #Automatically assigning ext numbers to buttons#
RouterA(config-telephony)#auto assign 1 to 5 #Automatically assigning ext numbers to buttons#

Task 4 : Configure a voice vlan on SwitchA


Apply the following configuration on SwitchA interfaces. This configuration will separate voice
and data traffic in different vlans on SwitchA. data packets will be carried on the access vlan.
SwitchA(config)#interface range fa0/1 5 #Configure interface range#
SwitchA(config-if-range)#switchport mode access
SwitchA(config-if-range)#switchport voice vlan 1 #Define the VLAN on which voice packets
will be handled#

Task 5 : Configure the phone directory for IP Phone 1


Although IP Phone 1 is already connected to SwitchA, it needs additionnal configuration before
beeing able to communicate. You need to configure RouterA CME to assign a phone number to
this IP phone.
RouterA(config)#ephone-dn 1 #Defining the first directory entry#
RouterA(config-ephone-dn)#number 54001 #Assign the phone number to this entry#

Task 5 : Verify the configuration


Ensure that the IP Phone receives an IP Address and a the phone number 54001 from RouterA
(this can take a short while).

Task 6 : Configure the phone directory for IP Phone 2

Connect IP Phone 2 to SwitchA and power the phone ON using the power adapter (Physical tab).
RouterA(config)#ephone-dn 2 #Defining the first directory entry#
RouterA(config-ephone-dn)#number 54002 #Assign the phone number to this entry#

Task 7 : Verify the configuration


Ensure that the IP Phone 2 receives an IP Address and a the phone number 54002 from RouterA
(this can take a short while). Same procedure as task n5.
Dial 54001 and check if IP phone 1 correctly receives the call.
11.

You might also like