Provisioning Linksys SPA922

When I started in the world of Asterisk, one of the important things to deploy a VoIP network is the segmentation of the network VLANs to separate voice and data. When I started two years ago, only knew two options:

– Use different network but this implies duplicate the number of the switches (much money and in my opinion unprofessional).
– Use VLAN’s to separate the networks. This option is better although requires much administrative work whenever there is change a site computer or telephone.

I was investigating the way this is done automatically and it seems that something went.

Here I leave an example implementation.

In this scenario We are going to configure a system to provisioning Linksys Phones (SPA922). Firts We have to configure our network LAN with 2 vlans (or more) to separate the data and voice network. We have used Cisco Switches (Catalyst 2960 and 3750).

Networking

The IP range ov Vlans are this:

Vlan 1 -> data network -> 192.168.1.0/24
Vlan 2 -> voice network -> 10.3.3.0/24

We need to have two DHCP servers, one in each vlan. In the vlan 1 we have configured one DHCP server (Windows 2003 Server) which will be the principal DHCP server. This is the configuration:

003 Router 192.168.1.1
006 DNS Servers 192.168.1.5 192.168.1.6
015 DNS Domain Name testing.lan.com
044 WINS/NBNS Servers 192.168.1.5
046 WINS/NBNS Node Type 0x8
066 Boot Server Host Name 10.3.3.3 (TFTP Server)

In the other Vlan (voIP), we have Asterisk server with DHCP server and TFTP Server. These are the configs:

apt-get install dhcpd

/etc/dhcp3# vim dhcpd.conf

subnet 10.3.3.0 netmask 255.255.255.0
{
range 10.3.3.100 10.3.3.254;
option domain-name-servers 192.168.1.6;
option routers 10.3.3.1;
option subnet-mask 255.255.255.0;
option broadcast-address 10.3.3.255;
option tftp-server-name "10.3.3.3";
default-lease-time 600;
max-lease-time 7200;
}

Provisioning

apt-get install atftpd

/etc/default# vim atftpd

USE_INETD=true
OPTIONS="--daemon --port 69 --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /tftpboot"

The tftp server configuration file indicates that the config are int tftpboot directory where we have configured the general config file for all phones and the especific config files to the phones too.

/etc/tftpboot# vim spa922.cfg

<flat-profile>

<!-- PROVISIONING -->
<Resync_Periodic>10</Resync_Periodic>
<Resync_Error_Retry_Delay>20</Resync_Error_Retry_Delay>
<Profile_Rule ua="na">/spa922-MAC/spa922-$MA.cfg</Profile_Rule>

<!-- SYSTEM -->
<Primary_NTP_Server ua="na">192.168.1.10</Primary_NTP_Server>
<Time_Zone ua="na">GMT+01:00</Time_Zone>

<!-- TIMERS -->
<Interdigit_Long_Timer ua="na">25</Interdigit_Long_Timer>

<!-- SIP -->
<Proxy_1_>10.3.3.3</Proxy_1_>

<Use_Auth_ID_1_ ua="na">No</Use_Auth_ID_1_>
<Preferred_Codec_1_>G711a</Preferred_Codec_1_>
<Use_Pref_Codec_Only_1_>no</Use_Pref_Codec_Only_1_>

<Dial_Plan_1_ ua="na">([1345]xxxS0|6xxxxxxxxS0|9xxxxxxxxS0|xx.)</Dial_Plan_1_>
<Enable_IP_Dialing_1_ ua="na">No</Enable_IP_Dialing_1_>

<Enable_VLAN ua="rw"> yes </Enable_VLAN>
<VLAN_ID ua="rw"> 2 </VLAN_ID>

</flat-profile>


One response to “Provisioning Linksys SPA922

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: