Friday, July 27, 2007

Using multiple IPBlue Phones on one PC

The IPBlue phones are very handy for the vmware/dynamips simulated voice lab. However, the problem is that when you start up a second instance, it defaults to the first MAC address available and the first and second instances start flapping trying to re-register to the call manager using the same MAC address. Here is a quick and 'not so dirty' solution:

The phone basically reads its configuration from the windows registry when started. The trick is to make sure the appropriate MAC address is in the registry (assuming you have 2 or 3 NICs or Virtual vmnet interfaces in case of VMware) before you start the application each time. The settings are stored under HKEY_CURRENT_USER\Software\IPblue\ in the registry. Follow the procedure below to create multiple phone 'profiles' first
  1. Launch the IPblue phone
  2. Choose one of the available MAC addresses.
  3. Make sure settings on CCM / CCME is set correctly and verify that the phone registers.
  4. I usually also select the Cisco skin for the phone and select 'Mini View Mode' from the File menu, so that the compact view is used, allowing 3 or 4 phones to be displayed simultaneously on my desktop.
  5. Run the regedit tool ('Start', 'Run', regedit.exe)
  6. Browse to HKEY_CURRENT_USER\Software and select IPblue'
  7. From the 'Registry' menu, choose 'Export Registry File' - Make sure you have the'Selected Branch' option selected - you DON'T even want to think about exporting the whole darn thing - it's humongous.
  8. Give it an appropriate name - I usually choose the primary extension - example 1001.reg
  9. Go back to the phone configuration and choose another MAC address.
  10. Repeat steps 3 to 8 and create the next registry file (example 2001.reg, 3001,reg etc..)
A little bit of theory again.. Now you have a bunch of registry files that has the full configuration for a phone in the way you want it. If these entries are in the right place when the phone starts up, it will appropriately launch the right phone/extension. Double clicking on the registry file from explorer will give you a warning, and will import the content to registry when you accept the warning, and again shows up another annoying message about how it updated the registry. All settings under 'IPBlue' will now be updated from the registry file that you imported.

I usually keep all my phone registry files in the same directory and do the following steps to activate the phones (assuming the CCM configuration is completed for the phones).

  • Double click the first registry file to import phone configuration.
  • Run IPblue phone and wait until it registers. (Tip: Starting ipblue phone with a '/d' option lets you launch multiple phones - otherwise it will throw an error and bring the active one to the front)
  • Double click the second registry file to import second phone configuration.
  • Run IPblue phone again from the shortcut and it will launch a second instance, now with the configuration for second phone. Verify registration of the phone..
  • and so on.. limited by the number of MAC address/CCM pair.
That's brings another interesting discussion. You CAN re-use the MAC addresses, assuming they are registering to different CCM clusters. For instance, with 2 MAC addresses you can have 4 phones, two registered to CCM and two registered to CCME. Just follow the same procedure as above with the tftp server address pointing to CCME router, and reuse the MAC addresses for your CME phones.

The sound quality is not the greatest at all times, but it does work - I still have my virtual lab on my laptop.

Have fun.. :-)

Thursday, May 31, 2007

CCIE Voice Home lab with Dynamips/VMware

This is an attempt to simulate a decent CCIE Voice home lab on a single PC (with oodles of memory and a bleeding edge CPU).

  • What can it do?
    • Frame Relay/OSPF
    • Calls between all sites using 4 digit or full E.164 numbers
    • Full route plans using RG, RL, RP and H323 gateways or trunks
    • SRST
    • AAR
    • Voicemail integration of CCM/CME with Unity
    • IPCC (almost everything)
    • CME , COR, dial plan with 4 digit or full E.164 dialing
    • WAN QoS
    • Call manager Applications - IPMA, Ext Mob, Attendant Console
    • Gatekeepers, IPIP GW, SIP gateways and trunks
  • What doesn't work?
    • Anything that involves a DSP like transcoding, conferencing or calls with multiple codecs
    • Any type of voice port configuration - PRI or CAS, FXO/FXS, E&M..
    • Anything related to the 6500, VG248, ATA (although it might be possible to connect to an ATA externally if you are adventurous - all it needs is a DHCP address and access to CCM), specifically port configuration or QoS.
    • CUE or anything related to it
    • LAN QoS
    • MGCP
  • How is this done?
    • Four routers in dynamips, one for PSTN, one each for HQ, RS1, RS2
    • Frame relay over T1 cross-overs between all three sites
    • All four routers connected by FE to a virtual switch for H.323 traffic
    • VMware server with CCM/IPCC on one VM, Unity on another, 3 virtual networks
    • Third VM running Windows 2000Pro (XP is a hog) with 3 NIC cards
    • Multiple copies of IP Blue 'evaluation' phone on the w2k workstation for HQ, RS1,RS2, PSTN phones.
    • Basic configurations as detailed below for all routers.
    • Lots and lots of memory and a bleeding edge CPU.
    • Did I tell you lots and lots of memory and a bleeding edge CPU?
    • Patience - If all of this stuff is running at once, this thing will be crawling - start up only the stuff you need, and it will rock!

Following is a diagram of how it is all set up


  • VMware is set up with three network adapters vmnet1,vmnet2 and vmnet3 with ip addresses as 10.101.1.1/24, 10.102.1.1/24 and 10.103.1.1/24
  • HQ, RS1 and RS2 connected to PSTN via T1 crossover and frame-relay encapsulation
  • HQ, RS1 and RS2 routers has their fa0/0 interface with 10.[101/102/103].1.254
  • HQ, RS1 and RS2 routers has the loopback0 with 10.[11/12/13].1.254
  • PSTN, HQ, RS1 and RS2 has their fa0/1 interface as 10.100.1.[1/2/3/4]
  • HQ, RS1 and RS2 has VOIP dial-peers with 'session-target ipv4:10.100.1.1'
  • PSTN router has CME enabled and the extensions 911,101xxxyyyy,202xxxyyyy, 303xxxyyyy and so on..
  • PSTN router has VOIP dial peers pointing to the appropriate router for the extensions that belong at that site, for example 'session target ipv4:10.11.1.254' for 'destination-pattern 101xxxyyyy'
  • CME with B-ACD on the RS2 router
  • SRST with AA on the RS1 router
  • IPIPGW must be running on the HQ and RS1 routers - here's why. CCM will have HQ and RS1 routers configured as H.323 gateways - so the call to "PSTN" is a call to the H.323 gateway, which hits the router and.. the router in turn sends the call over h.323 to the "PSTN" simulator. So, the call has two h.323 legs to go one way - 'voice service voip, allow connections h323 to h323' - sound familiar? :-)
Forgot to mention one key part - My laptop is not running Windows - I am a long time Linux fan and is running Slackware 11.0, VMware server 1.0.3 on a Dell D620 with dual Centrino and 2GB of RAM.

That's pretty much what I can think of now.. Configs are included below to have the basic connectivity going as mentioned above. Rack your brains to build out the rest.

There are excellent notes by people elsewhere on the net on how to get CCM installed in a VM, how to launch multiple IP blue phones simultaneously (speaking of IP blue phones, I will write up another tip for getting multiple of those phones running quickly and post it here next), et cetera, et cetera..

Standard Disclaimers, just to avoid any hard feelings going forward :-)

I CANNOT provide you IOS images or CCM/IPCC software, All the trademarks and references of any of the commercial/ non commercial software/hardware referenced in this post are the properties of their respective owners and I do not claim any rights to them whatsoever... and last but not least, I am not responsible for anything that results directly or indirectly from following my instructions here - anything at all including but not limited to 'your computer blowing up' or 'your girlfriend/wife leaving you since you got hooked to VMware or dynamips'.

Three cheers for dynamips , dynagen and VMware.. and good luck for those who are working on their CCIE Voice labs!!

Dynagen .NET file for the network section :

I used 2691 routers since they can do IOS with IPIPGW, Frame relay, dot1q trunks, dhcp server, CME, SRST , h.323, SIP and so on with IOS 12.4 on 128MB RAM. The IOS I used is c2691-adventerprisek9_ivs-mz.124-9.T1. Yes, I know that this is not the same IOS mentioned in the lab blue print at Cisco's site, but this does most of what 'wanted to learn' using this environment. The idlepc values are specific to my IOS, and might not work if you use a different IOS - I get the dynamips CPU/memory usage down to 30%/32% approximately with these values when all of the devices up and running (CPU spikes momentarily to 99% while doing 'show running' or 'write mem' though).

ghostios = True
[localhost]

[[2691]]
image = /data/tftpboot/C2691-IP.BIN
ram = 128
slot1 = NM-4T

[[ROUTER PSTN]]
model = 2691
f0/1 = S4 1
s1/0 = HQ s1/0
s1/1 = RS1 s1/0
s1/2 = RS2 s1/0
idlepc = 0x60af83ec

[[ROUTER HQ]]
model = 2691
f0/0 = S1 1
f0/1 = S4 2
idlepc = 0x61f02640

[[ROUTER RS1]]
model = 2691
f0/0 = S2 1
f0/1 = S4 3
idlepc = 0x61f02640

[[ROUTER RS2]]
model = 2691
f0/0 = S3 1
f0/1 = S4 4
idlepc = 0x61f02640

[[ethsw S1]]
1 = access 1 NIO_linux_eth:vmnet1

[[ethsw S2]]
1 = access 1 NIO_linux_eth:vmnet2

[[ethsw S3]]
1 = access 1 NIO_linux_eth:vmnet3

[[ethsw S4]]
1 = access 100
2 = access 100
3 = access 100
4 = access 100


Relevant sections of the PSTN router

frame-relay switching

interface FastEthernet0/1
ip address 10.100.1.1 255.255.255.0
speed 100
full-duplex
h323-gateway voip interface
h323-gateway voip bind srcaddr 10.100.1.1

interface Serial1/0
description HQ-RTR
no ip address
encapsulation frame-relay IETF
serial restart-delay 0
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 201 interface Serial1/1 101
frame-relay route 202 interface Serial1/2 102

interface Serial1/1
description BR1-RTR
no ip address
encapsulation frame-relay IETF
no fair-queue
serial restart-delay 0
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 101 interface Serial1/0 201

interface Serial1/2
description BR2-RTR
no ip address
encapsulation frame-relay IETF
serial restart-delay 0
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 102 interface Serial1/0 202

ip route 10.11.1.0 255.255.255.0 10.100.1.2
ip route 10.12.1.0 255.255.255.0 10.100.1.3
ip route 10.13.1.0 255.255.255.0 10.100.1.4

tftp-server flash:P00307020200.bin
tftp-server flash:P00307020200.loads
tftp-server flash:P00307020200.sb2
tftp-server flash:P00307020200.sbn

dial-peer voice 2000 voip
destination-pattern 1011111...
session target ipv4:10.11.1.254
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

dial-peer voice 3000 voip
destination-pattern 2022222...
session target ipv4:10.12.1.254
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

dial-peer voice 4000 voip
destination-pattern 3033333...
session target ipv4:10.13.1.254
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

dial-peer voice 1 voip
incoming called-number .
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

telephony-service
load 7960-7940 P00307020200
max-ephones 1
max-dn 5
ip source-address 10.100.1.1 port 2000

ephone-dn 1 dual-line
number 911

ephone-dn 2 dual-line
number 1015551111

ephone-dn 3 dual-line
number 2025552222

ephone-dn 4 dual-line
number 3035553333

ephone-dn 5 dual-line
number 55987654321

ephone 1
mac-address 0000.0000.0000
type 7960
button 1:1 2:2 3:3 4:4 5:5

gateway

Sample Site router HQ:

voice service voip
allow-connections h323 to h323

interface Loopback0
ip address 10.11.1.254 255.255.255.255
h323-gateway voip interface
h323-gateway voip bind srcaddr 10.11.1.254

interface FastEthernet0/0
ip address 10.101.1.254 255.255.255.0
speed 100
full-duplex

interface FastEthernet0/1
ip address 10.100.1.2 255.255.255.0
speed 100
full-duplex
no cdp enable

interface Serial1/0
no ip address
encapsulation frame-relay IETF
serial restart-delay 0
frame-relay lmi-type ansi

interface Serial1/0.1 point-to-point
ip address 10.200.1.1 255.255.255.0
ip ospf mtu-ignore
frame-relay interface-dlci 201

interface Serial1/0.2 point-to-point
ip address 10.200.2.1 255.255.255.0
ip ospf mtu-ignore
frame-relay interface-dlci 202

router ospf 1
network 10.200.1.0 0.0.0.255 area 0
network 10.200.2.0 0.0.0.255 area 0
network 10.101.1.0 0.0.0.255 area 0
network 10.102.1.0 0.0.0.255 area 0
network 10.103.1.0 0.0.0.255 area 0

dial-peer voice 1 voip
destination-pattern .T
session target ipv4:10.100.1.1
incoming called-number .
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

dial-peer voice 2010 voip
destination-pattern 1011111...
session target ipv4:10.101.1.10
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

gateway


In addition, create static routes on the workstation redirecting traffic for the HQ, RS1 and PSTN loopback interfaces through HQ router, and the CME related traffic to the CME router. This reduces delay to the PSTN phone (which again is on your w2k desktop with TFTP address pointing to 10.100.1.1)

..now let the comments begin.