Saturday, April 21, 2012

Trixbox + CUCM + Exchange UM + SP3102 + SRP527W Part 1

I have setup the voice network @home as per below picture


As you can see, there are a lot of SIP trunks between them. I will try to put the configuration for each of them

Exchange UM - CUCM

For Exchange UM and CUCM connection configuration, just follow the document published by Microsoft: http://www.microsoft.com/download/en/details.aspx?id=13591

The following is the CUCM Media Resource Group



The following is the CUCM Media Resource Group List




The following is the CUCM Configuration for the SIP Trunk to Exchange UM (e.g. mx01.domain.local), use the Media Resource Group List created above



CUCM - Trixbox

Create a new SIP Trunk Security Profile



Create a SIP trunk from CUCM to Trixbox, use the SIP Trunk Security Profile created above





Create a new Route Group


Create a new Route List


Create a new Route Pattern

I have extension 1499 and 1500 for Exchange UM Pilot and Auto Attendant respectively





I created a Route Pattern for default route to Trixbox when dial starts with 9. I also do exactly the same Route Pattern to the default route when dial starts with 0. The purpose for this is to use VOIP when dial with 9 and to use PSTN when dial with 0 first (configuration later on Trixbox)



Trixbox - CUCM


To be continue...

Thursday, April 12, 2012

NetScaler MAC Based Forwarding

In the situation where you have deployed your NetScaler with 2 NICs, one connected to the DMZ network and the other one is connected to your Internal network, depending on your configuration, you might need to enable the MAC Based Forwarding on NetScaler

You probably assign the NSIP on your Internal Network, MIP on your Intenal Network, SNIP and VIPs on your DMZ Network (for example for publishing CAG/SSL VPN). You then trying to access your NetScaler services from your Internal Network. This means your traffic from the Internal network goes to your default gateway (e.g. the firewall) which then forwarded to the VIP on DMZ Network. NetScaler then accept the traffic, however, the returning traffic will not going back to through the firewall (e.g. NetScaler default gateway), it will be going to the other NetScaler's NIC that connects to Internal network. This will create asymmetric routing, and most router/firewall will drop the packets.

To avoid this, usually enabling the MAC Based Forwarding (MBF) will fix this.

The following is the definition of MBF:

With MAC-based forwarding (MBF) enabled, when a request reaches the NetScaler appliance, the appliance remembers the source MAC address of the frame and uses it as the destination MAC address for the resulting replies. MAC-based forwarding can be used to avoid multiple-route/ARP lookups and to avoid asymmetrical packet flows. MAC-based forwarding may be required when the NetScaler is connected to multiple stateful devices, such as VPNs or firewalls, because it ensures that the return traffic is sent to the same device that the initial traffic came from.


To enable it, from the NetScaler Console:

enable ns mode mbf

Wednesday, April 11, 2012

XenServer 6.0 Kill Dead VM

Sometime when you try to restart or shutdown the VM, its status get stuck with the yellow status on XenCenter.

To forcely kill that VM:
  •  Login to the XenServer console where the VM is hosted
  • Get the VM Dom ID 
xe vm-list name-label={VM Name} params=dom-id
  • Get the list of live domains and see if the Domain ID of your VM is listed there
list_domains
  • If your Domain ID VM is there, run the killing script
/opt/xensource/debug/destroy_domain -domid <dom id>
  • Do another list_domain to check the Dom ID is gone
  • Reset the power state of that VM
xe vm-reset-powerstate vm={VM Name} force=true
  • If that still does not work do
xe-toolstack-restart

SharePoint 2010 - Get Logged In User Details

To get the user details using JavaScript from SharePoint 2010, use the following code:

the SP.JS file should be available from the standard installation folder of SharePoint 2010

Sunday, April 08, 2012

FreeNAS 8 and Time Machine

I have just finished setting up the FreeNAS 8 on Hyper-V to backup my MAC using Time Machine.

Tricky bits settings up FreeNAS 8 on Hyper-V:

  • Remove the default NIC when creating VM
  • Add a new NIC, must be legacy NIC
  • FreeNAS 8 does not recognize SCSI disks, only IDE
  • After installed, change the IP to static
  • do: ifconfig to find out the adapter name
  • do: ifconfig down
  • do: ifconfig up

Once the FreeNAS is up and running, go to its web console:
  • Create a group called: backup-group
  • Create a user called: backup-user, with primary group ID: backup-group, enter the password
  • Go to Services, enable AFP
  • Go to AFP Settings, make sure Local Access is ticked
  • Go to Storage, and Create ZFS Data Set, called backup-apple
  • Once it is created, edit its permissions, make sure owner-user is changed to backup-user and owner-group is changed to backup-group. Tick the option to have the Group the write access
  • Go to Share, add Apple Share. Name it backup, path: /mnt/data/backup-apple. Make sure the Disk Discovery is ticked, Disk Discovery Mode is set to Time Machine
From my MAC, start Finder:
  • Click Go, and select Connect to Server
  • Enter Server Address: afp://freenas-ip
  • It will ask you for the username: backup-user, password: password
  • Start Console, type:defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
  • Start Time Machine and Select Disk, select the backup

Thanks for reading :)

Tuesday, April 03, 2012

Exchange 2010 SP2 Upgrade

Just done my Exchange 2010 upgrade to SP2, which includes the following steps:
  • Login to Active Directory Server which holds schema master, as schema master and enterprise admin user, and run: setup.com /ps and setup.com /p
  • Upgrade all the Hub/CAS
  • Upgrade all the UM
  • Upgrade all Mailbox Servers:
  1. Enable maintenance mode on the DAG of the server to be upgraded:

.\StartDagServerMaintenance.ps1 -server server1

  1. Upgrade to SP2
  2. Disable maintenance mode

.\StopDagServerMaintenance.ps1 -server server1