<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TechAnswers</title>
	<atom:link href="http://techanswers.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://techanswers.co.uk</link>
	<description>Tips, Tricks and News on FOSS, Networking, VoIP and more..</description>
	<lastBuildDate>Tue, 21 Feb 2012 16:40:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Create SSH bookmarks like Putty saved sessions</title>
		<link>http://techanswers.co.uk/2012/02/21/create-ssh-bookmarks-putty-saved-sessions/</link>
		<comments>http://techanswers.co.uk/2012/02/21/create-ssh-bookmarks-putty-saved-sessions/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 16:39:14 +0000</pubDate>
		<dc:creator>chrisw</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=135</guid>
		<description><![CDATA[You&#8217;re in Windows, and then you move back to your Linux box and its like breathing a breath of fresh air, mostly for me because of the command line. And most others probably feel the same way. Something that was bugging me though, was finding the SSH commands to connect to servers, and have to &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2012/02/21/create-ssh-bookmarks-putty-saved-sessions/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re in Windows, and then you move back to your Linux box and its like breathing a breath of fresh air, mostly for me because of the command line. And most others probably feel the same way. Something that was bugging me though, was finding the SSH commands to connect to servers, and have to retype them if they weren&#8217;t in my BASH history or some other easy to find place.</p>
<p>Well, you can add these &#8216;bookmarks&#8217; to your SSH config in your home directory, as follows:</p>
<p>Create or edit the ~/.ssh/config file with your favourite editor.<br />
<code><br />
nano ~/.ssh/config<br />
</code><br />
Add entries to the file as follows:<br />
<code><br />
Host myhost<br />
&nbsp;HostName myhost.example.com<br />
&nbsp;User chris<br />
</code><br />
Now save and exit the file (ctrl+O, ctrl+X for nano)<br />
You can now do:<br />
<code><br />
ssh myhost<br />
</code><br />
and you will be connected! Combine this with generating and copying a public key to the server, and the login will be password free. Be aware of the obvious security implications here though.</p>
<p>You can also add other switches to the config that would normally form part of your SSH command. For example;<br />
<code><br />
Host myhost<br />
&nbsp;HostName myhostname<br />
&nbsp;User root<br />
&nbsp;Port 9090<br />
&nbsp;DynamicForward 9999<br />
&nbsp;ServerAliveInterval 30<br />
</code><br />
In this example, &#8216;myhostname&#8217; has been added to /etc/hosts so you can change the IP in one place if you have many bookmarks pointing at the same host, if you have them for different users, ports or configurations.</p>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2012/02/21/create-ssh-bookmarks-putty-saved-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build and configure you own linux serial console server (reverse telnet)</title>
		<link>http://techanswers.co.uk/2011/10/20/build-configure-linux-serial-console-server-reverse-telnet/</link>
		<comments>http://techanswers.co.uk/2011/10/20/build-configure-linux-serial-console-server-reverse-telnet/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 10:17:31 +0000</pubDate>
		<dc:creator>andyn</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=127</guid>
		<description><![CDATA[One of the locations I look after has a stack of 16 Cisco switches that I manage remotely via the Internet. These switches often undergo some very complicated reconfigurations for certain customers of the site and from time to time I have found myself locked out via Telnet and have had to visit site with &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2011/10/20/build-configure-linux-serial-console-server-reverse-telnet/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>One of the locations I look after has a stack of 16 Cisco switches that I manage remotely via the Internet. These switches often undergo some very complicated reconfigurations for certain customers of the site and from time to time I have found myself locked out via Telnet and have had to visit site with a serial console cable to put the configurations right.</p>
<p>To avoid any more of these unplanned site visits I decided to sort out a serial console server for this site. If your reading this you probably realize that a Serial Console server is basically a computer with a number of Serial Interfaces and an Ethernet port. You can connect to the console server and the out over one of its serial ports to control the attached devices.</p>
<p>I needed a device with 16 ports. Proper 16-port console servers like those produced by Avocent cost upwards of £1500, so I decided to build my own. I put together the cheapest barebones PC system i could find with a spare PCI-Express slot. Into this spare PCI-E Slot i Installed a Startech 16-port PCI-E Serial Card. (PEX16S952LP) shown below.</p>
<div id="attachment_128" class="wp-caption aligncenter" style="width: 304px"><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/PEX16S952LP.jpg"><img class="size-full wp-image-128" title="PEX16S952LP" src="http://techanswers.co.uk/wp-content/uploads/2011/10/PEX16S952LP.jpg" alt="" width="294" height="150" /></a><p class="wp-caption-text">Startech PEX16S952LP</p></div>
<p>I then dug around the storerooms and found 16 standard blue Cisco Serial console cables and connected them from the 16-port breakout cable coming from the serial card and into each of the switches. I installed Ubuntu Server on the system. I could see 16 ttySx devices in /dev/ and i could use minicom to connect to the switch on the end of each /dev/ttySx port. The next stage, expose these serial ports via Reverse Telnet for easy remote management.</p>
<p>The ubuntu package ser2net package describes itself as:</p>
<blockquote><p> This daemon allows telnet and tcp sessions to be established with a<br />
unit&#8217;s serial ports. Combined with a terminal emulation like xterm or<br />
the Linux console, this can be a very simple means of communicating<br />
with routers, other systems&#8217; serial consoles and other equipment with<br />
a serial port. This is remarkably similar to the reverse telnet<br />
feature of some Cisco routers.</p></blockquote>
<p>I installed the package with:</p>
<p><code>sudo apt-get install ser2net</code></p>
<p>The next step is to configure which TCP ports you want ser2net to listen on and which serial ports to map these to. This is done in <code>/etc/ser2net.conf</code>  my configuration file looks something like this:</p>
<pre>BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n

2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
2002:telnet:600:/dev/ttyS2:9600 8DATABITS NONE 1STOPBIT banner
2003:telnet:600:/dev/ttyS3:9600 8DATABITS NONE 1STOPBIT banner
2004:telnet:600:/dev/ttyS4:9600 8DATABITS NONE 1STOPBIT banner
2005:telnet:600:/dev/ttyS5:9600 8DATABITS NONE 1STOPBIT banner
2006:telnet:600:/dev/ttyS6:9600 8DATABITS NONE 1STOPBIT banner
2007:telnet:600:/dev/ttyS7:9600 8DATABITS NONE 1STOPBIT banner
2008:telnet:600:/dev/ttyS8:9600 8DATABITS NONE 1STOPBIT banner
2009:telnet:600:/dev/ttyS9:9600 8DATABITS NONE 1STOPBIT banner
2010:telnet:600:/dev/ttyS10:9600 8DATABITS NONE 1STOPBIT banner
2011:telnet:600:/dev/ttyS11:9600 8DATABITS NONE 1STOPBIT banner
2012:telnet:600:/dev/ttyS12:9600 8DATABITS NONE 1STOPBIT banner
2013:telnet:600:/dev/ttyS13:9600 8DATABITS NONE 1STOPBIT banner
2014:telnet:600:/dev/ttyS14:9600 8DATABITS NONE 1STOPBIT banner
2015:telnet:600:/dev/ttyS15:9600 8DATABITS NONE 1STOPBIT banner</pre>
<p>Once ser2ner has been restarted with <code>/etc/init.d/ser2net restart</code> i was able to telnet into ports 2000 through to 2015 and gain direct access to the serial port connected to each switch.</p>
<div class="notice_block">You should really at this stage add some restrictive firewall rules to your serial console server, or onto whatever hardware firewll device you use. An article detailing how to easily and effectively manage an ipTables firewall will follow on this site in a couple of days time.</div>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2011/10/20/build-configure-linux-serial-console-server-reverse-telnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Trixbox or Elastix Endpoint Manager</title>
		<link>http://techanswers.co.uk/2011/10/19/upgrading-trixbox-elastix-endpoint-manager/</link>
		<comments>http://techanswers.co.uk/2011/10/19/upgrading-trixbox-elastix-endpoint-manager/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 17:49:04 +0000</pubDate>
		<dc:creator>andyn</dc:creator>
				<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=124</guid>
		<description><![CDATA[The Endpoint Manager that ships with current Elastix or Trixbox PBXes is a little outdated and lacks support for many modern VoIP Phones currently being deployed. Thankfully there is an actively maintained FreePBX Module which uses the latest configurations and firmwares provided provisioner.net. So you should find support for just about any modern VoIP hardware &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2011/10/19/upgrading-trixbox-elastix-endpoint-manager/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>The Endpoint Manager that ships with current Elastix or Trixbox PBXes is a little outdated and lacks support for many modern VoIP Phones currently being deployed. Thankfully there is an actively maintained FreePBX Module which uses the latest configurations and firmwares provided provisioner.net. So you should find support for just about any modern VoIP hardware you might be using.</p>
<p>Download this tarball: <a href="http://techanswers.co.uk/wp-content/uploads/2011/10/endpointmanager-v2.9.2.4.tar.gz">endpointmanager-v2.9.2.4.tar</a> or if you want to check for a newer version you can  <a href="https://github.com/tm1000/freepbx-endpointmanager/">visit the Endpoint Manager GitHub Repository</a> to obtain the module. When I grabbed the tarball from Github I had to rename the file, and rename one of the archives internal folders before FreePBX would allow me to upload it. The version I have directly linked above has already been renamed and is ready to upload.</p>
<p>Next, login to Elastix/Trixbox and navigate to the FreePBX configuration area. You will need to click the &#8220;Unembedded freePBX&#8221; link if using Elastix to access the full range of FreePBX web panel options. IGNORE the Endpoint Configurator menu link on the Elastix or Trixbox menu bar. This is for the outdated configuration system.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/UnembedFreepbx1.png"><img title="Unembedded freePBX" src="http://techanswers.co.uk/wp-content/uploads/2011/10/UnembedFreepbx1.png" alt="Unembedded freePBX" width="816" height="296" /></a><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/UnembedFreepbx.png"><br />
</a></p>
<p>In the new FreePBX window click the <strong>Tools Tab</strong> and select <strong>Module Admin</strong>. Click <strong>Upload Module</strong> and then once uploaded enable it and find the button to process the changes and install the module.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/enablemodule.png"><img title="Enable Module" src="http://techanswers.co.uk/wp-content/uploads/2011/10/enablemodule.png" alt="Enable Module" width="797" height="138" /></a></p>
<p>You should now have an <strong>End Point Manager</strong> section under the Tools menu of FreePBX. The first thing to do is enter the <strong>End Point Configuration</strong> menu to enable some handset types.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/enablephonetypes2.png"><img title="enablephonetypes" src="http://techanswers.co.uk/wp-content/uploads/2011/10/enablephonetypes2.png" alt="" width="557" height="284" /></a></p>
<p>Enable any handset types you need to auto provision. FreePBX will download a number of files (firmwares, profiles etc) and unpack them to the correct location ready to be served up via TFTP when the phones boot.</p>
<p>Its worth noting at this point that I was Applying Configuration Changes whenever the orange bar appeared at the top of FreePBX as shown below. You might not need to do this until the point your going to reboot your handsets, but I was clicking it any time there were changes to apply before proceeding to the next step.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/applychanges.png"><img title="applychanges" src="http://techanswers.co.uk/wp-content/uploads/2011/10/applychanges.png" alt="" width="554" height="104" /></a></p>
<p>When you are done enabling device types click on the <strong>End Point Device List</strong> from the left hand menu. Enter the subnet your phones are in (e.g. 192.168.0.0/24 or 10.10.1.0/23 etc) and click Go! Endpoint Manager will sweep that subnet to discover supported devices.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/subnetsearch1.png"><img title="subnetsearch" src="http://techanswers.co.uk/wp-content/uploads/2011/10/subnetsearch1.png" alt="subnetsearch" width="690" height="206" /></a></p>
<p>In a few moments you should have a list of all devices discovered, and you can click the checkbox by the Mac Address to select the phones you wish to configure, assign each to an existing FreePBX Extension and then click Add Selected Phones to save the provisioning configurations.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/unmanageddevices.png"><img title="unmanageddevices" src="http://techanswers.co.uk/wp-content/uploads/2011/10/unmanageddevices.png" alt="" width="931" height="145" /></a></p>
<p>At this point you should click the &#8220;Apply Configuration Changes&#8221; orange  bar at the top of the FreePBX screen if it is present, and then reboot your phones, they should TFTP boot, grab firmware and config via TFTP and register with your Elastix server within a few minutes of being rebooted.</p>
<p>It is worth noting that I had to ensure that my DHCP tftp server option included the tftp:// prefix when provisioning Polycom phones. The entry in /etc/dhcpd.conf that worked for me is:</p>
<p><code>option tftp-server-name "tftp://172.16.10.2";</code></p>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2011/10/19/upgrading-trixbox-elastix-endpoint-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetworkManager and /etc/network/interfaces</title>
		<link>http://techanswers.co.uk/2011/10/16/networkmanager-etcnetworkinterfaces/</link>
		<comments>http://techanswers.co.uk/2011/10/16/networkmanager-etcnetworkinterfaces/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 11:44:20 +0000</pubDate>
		<dc:creator>garyg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=79</guid>
		<description><![CDATA[Ever wondered how to manage interfaces declared in /etc/network/interfaces with NetworkManager? I recently updated an Ubuntu desktop remotely, and to my horror she hadn&#8217;t re-appeared after 5000 pings, that&#8217;s longer than a disk check. When I got back in front of the machine I could see she had rebooted just fine, but I had to &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2011/10/16/networkmanager-etcnetworkinterfaces/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Ever wondered how to manage interfaces declared in /etc/network/interfaces with NetworkManager? I recently updated an Ubuntu desktop remotely, and to my horror she hadn&#8217;t re-appeared after 5000 pings, that&#8217;s longer than a disk check.</p>
<p>When I got back in front of the machine I could see she had rebooted just fine, but I had to login locally for NetworkManager to start up the interface. Not ideal.</p>
<p>So I checked <strong>/etc/network/interfaces</strong> and find these lines commented out:</p>
<p><code># eth0 auto<br />
# iface eth0 inet dhcp</code></p>
<p>Uncomment; job done. The interface will now come up at boot time. Unfortunately NetworkManager ignores any interfaces declared there, which means I can&#8217;t easily use my saved VPN connexions, etc.</p>
<p>Checked /etc/NetworkManager/NetworkManager.conf and it was empty. On RTFM<a title="NetworkManager.conf man page" href="http://manpages.ubuntu.com/manpages/maverick/man5/NetworkManager.conf.5.html" target="_blank"> NetworkManager.conf man page</a> its clear you can have a lot of control over how your interfaces are managed.</p>
<p>So,<strong> sudo vi /etc/NetworkManager/NetworkManager.conf</strong> and added the following lines:</p>
<p><code>[main]<br />
plugins=ifupdown<br />
[ifupdown]<br />
managed=true</code></p>
<p>The interface comes up at boot, so I can reliably reboot remotely but still have access to the nice NM features!</p>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2011/10/16/networkmanager-etcnetworkinterfaces/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Configure VLAN Interfaces on Ubuntu or Debain systems</title>
		<link>http://techanswers.co.uk/2011/10/14/how-to-configure-vlan-intefaces-on-ubuntu-or-debain-based-systems/</link>
		<comments>http://techanswers.co.uk/2011/10/14/how-to-configure-vlan-intefaces-on-ubuntu-or-debain-based-systems/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 13:59:03 +0000</pubDate>
		<dc:creator>andyn</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=44</guid>
		<description><![CDATA[I manage several server systems that are connected to managed Cisco switches which carry a whole bunch of VLANs. Quite frequently I need to setup a host in one of these VLANs to provide a service or test something. Ubuntu Server or any other Debian based Linux OS makes it simple to connect a server &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2011/10/14/how-to-configure-vlan-intefaces-on-ubuntu-or-debain-based-systems/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I manage several server systems that are connected to managed Cisco switches which carry a whole bunch of VLANs. Quite frequently I need to setup a host in one of these VLANs to provide a service or test something.</p>
<p>Ubuntu Server or any other Debian based Linux OS makes it simple to connect a server or PC to a trunk port on a switch and then create multiple virtual interfaces on the system.</p>
<p>The example below assumes you have a server with two Ethernet cards: eth0 and eth1. eth0 is the servers primary network interface and is connected to a normal switchport and configured in /etc/network/interfaces statically.</p>
<p>eth1 is connected into a cisco switch and that port is configured as vlan trunk port. VLANs with IDs 3,4 and 101 are being presented over this trunk port and you would like the Server to bring up an interface in each of these VLANs and configure an IP address for each.</p>
<p>First of all you need to ensure you have the userspace VLAN tools installed on your system. Modern debian and ubuntu releases call this package: vlan some older distros call it vconfig so run either:</p>
<p><code>sudo apt-get install vlan</code></p>
<p><code>sudo apt-get install vconfig</code></p>
<p>Thats all the extra software you will need. The remainder of the configuration takes place in the /etc/network/interfaces file, the example below should be fairly self explanatory.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># The loopback network interface
</span>auto lo
iface lo inet loopback
&nbsp;
<span style="color: #666666; font-style: italic;"># The primary network interface
</span>auto eth0
iface eth0 inet static
    address 172<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>2
    netmask 255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>0
    network 172<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>0
    broadcast 172<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>255
    gateway 172<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>1
    dns<span style="color: #339933;">-</span>nameservers 172<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>16<span style="color: #339933;">.</span>1 8<span style="color: #339933;">.</span>8<span style="color: #339933;">.</span>8<span style="color: #339933;">.</span>8
&nbsp;
<span style="color: #666666; font-style: italic;"># You could make the following interface a static or DHCP interface if needed,
</span><span style="color: #666666; font-style: italic;"># if it is just going to be used for vlan trunks then all your need is:
</span>auto eth1
iface eth1 inet manual
&nbsp;
<span style="color: #666666; font-style: italic;"># virtual interface for VLAN ID 3
</span>auto eth1<span style="color: #339933;">.</span>3
iface eth1<span style="color: #339933;">.</span>3 inet static
    address 192<span style="color: #339933;">.</span>168<span style="color: #339933;">.</span>8<span style="color: #339933;">.</span>1
    netmask 255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>0
&nbsp;
<span style="color: #666666; font-style: italic;"># virtual interface for VLAN ID 4
</span>auto eth1<span style="color: #339933;">.</span>4
iface eth1<span style="color: #339933;">.</span>4 inet static
    address 10<span style="color: #339933;">.</span>34<span style="color: #339933;">.</span>12<span style="color: #339933;">.</span>45
    netmask 255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>254<span style="color: #339933;">.</span>0
&nbsp;
<span style="color: #666666; font-style: italic;"># virtual interface for VLAN ID 101
</span>auto eth1<span style="color: #339933;">.</span>101
iface eth1<span style="color: #339933;">.</span>101 inet static
    address 172<span style="color: #339933;">.</span>25<span style="color: #339933;">.</span>12<span style="color: #339933;">.</span>4
    netmask 255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>255<span style="color: #339933;">.</span>0</pre></td></tr></table></div>

<p>So you simply specify the physical interface the vlan tagged packets will come in on and the ID of the vlan separated by a period &#8220;.&#8221; e.g. <code>eth2.556</code></p>
<p>These interfaces will now be brought up when the system boots, if you want to bring one up or down straight away without a reboot you can:</p>
<p><code>sudo ifup eth1.3</code></p>
<p>You should see some output similar to:</p>
<p><code><br />
$ sudo ifup eth1.3<br />
Set name-type for VLAN subsystem. Should be visible in /proc/net/vlan/config<br />
Added VLAN with VID == 3 to IF -:eth1:-<br />
ssh stop/waiting<br />
ssh start/running, process 10882<br />
$<br />
</code></p>
<p>Running ifconfig should report something along the following lines:</p>
<p><code><br />
eth1.3 Link encap:Ethernet HWaddr 00:00:00:00:5e:5f<br />
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0<br />
inet6 addr: fe80::0001:0001:0001:0001/64 Scope:Link<br />
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<br />
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:35 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0<br />
RX bytes:0 (0.0 B) TX bytes:7389 (7.3 KB)<br />
</code></p>
<p>Now any 802.1q tagged packets tagged with VLAN ID 3 coming into the eth1 interface will be unwrapped by the kernel and handed to your brand new eth1.3 virtual ethernet interface.</p>
<p>&nbsp;</p>
<div class="notice_block">You can use iface type &#8220;inet dhcp&#8221; in your definitions but beware, if the DHCP server issues a default gateway this will likely override any existing default route on your system and you may loose connectivity or experience weired routing behavior. If you do need to have a vlan interface configured by DHCP and want to avoid this you can install the ifmetric package:</p>
<p><code>sudo apt-get install ifmetric</code></p>
<p>You then need to specify a higher metric for this interface in its definition. e.g.</p>
<p><code>auto eth1.3<br />
iface eth1.3 inet dhcp<br />
metric 1</code></p>
<p>Not specifying a metric for an interface is the same as it having metric 0, so you dont need to explicitly set &lt;code&gt;metric 0&lt;/code&gt; this for your primary interface.</div>
<p><code><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2011/10/14/how-to-configure-vlan-intefaces-on-ubuntu-or-debain-based-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using tcpdump to save captures for analysis in Wireshark</title>
		<link>http://techanswers.co.uk/2011/10/13/using-tcpdump-to-create-captures-for-later-analysis-in-wireshark/</link>
		<comments>http://techanswers.co.uk/2011/10/13/using-tcpdump-to-create-captures-for-later-analysis-in-wireshark/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 18:29:03 +0000</pubDate>
		<dc:creator>taadmin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=38</guid>
		<description><![CDATA[Wireshark is a great network protocol analyser which runs on Linux, Windows and OSX. You can capture data from within Wireshark, but often you need to run captures on remote machines without a graphical desktop and without the ability to install any extra software such as &#8220;tshark&#8221;. Many, if not most *nix sytems ship with &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2011/10/13/using-tcpdump-to-create-captures-for-later-analysis-in-wireshark/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>Wireshark is a great network protocol analyser which runs on Linux, Windows and OSX. You can capture data from within Wireshark, but often you need to run captures on remote machines without a graphical desktop and without the ability to install any extra software such as &#8220;tshark&#8221;. Many, if not most *nix sytems ship with the tcpdump as standard and this can capture data for later analysis in Wireshark.</p>
<p>In its simplest form the command to get TCP dump to capture sufficient data for useful analysis in Wireshark is:</p>
<p><code>tcpdump -i INTERFACE -s 65535 -w FILENAME<br />
</code></p>
<p>Obviously replacing the INTERFACE and FILEAME placeholders with the network interface you wish to capture from, and the path/filename you wish to capture to.</p>
<h2>Auto Rotating Capture Files</h2>
<p>Sometimes when capturing data for analysis  you dont know quite when an anomaly that requires attention will occur. In these situation leaving the GUI Wireshark capturing for days or weeks is not an option, and even capturing to a single file with tcpdump is unworkable due to the volumes of data involved. Thankfully tcpdump allows you to automatically rotate your capture files and name them by date. When you finally experience some network problem that needs analysis you can just pull the required file of a manageable size from the remote machine and open it in Wireshark.</p>
<p>The following command will rotate the capture file after a certain number of seconds. Maybe 3600 for hour-long capture files or 43200 for 12 hour length captures.</p>
<p><code>tcpdump -i INTERFACE -G NUM_SECONDS -w 'trace_%Y%m%d-%H%M%S.pcap' </code></p>
<p>In some situations you may experience unexpectedly large data throughput which could make your hourly capture files so large as to be unmanageable. The -C option lets you set a maximum file-size for each capture file (in millions of bytes, not megabytes!) and adds an incremental number to each file and starts a new file. So to write hour long capture files but limit any individual file to ~650mb:</p>
<p><code>tcpdump -i eth0 -G 3600 -C 680 -w 'trace_%Y%m%d-%H%M%S.pcap' </code></p>
<p>Finally, you might need to leave some traces running for weeks or months to catch a very intermittent network fault in your capture files. You could easily fill available disk space up at these lengths of time, so the -W option lets you specify the maximum number of files being captured before rotating and deleting the first capture file, a so very much like a ringbuffer style capture. The example below allows a max filesize of about 65mb and loops every 10 files.:</p>
<p><code>tcpdump -i eth0 -C 68 -W 10 -w 'ringbuffer-trace.pcap'</code></p>
<p>A sample of the directory output for this trace which has been running for a while. Notice the times for the .pcap0 and .pcap1 files in this 10 file buffer are newer than the rest as tcpdump had rotated at the 10th file. Also notice the size of .pcap1 is only 9.6mb, this is the file tcpdump is currently writing to up to the 65M limit.</p>
<pre>
-rw-r--r-- 1 root root  65M 2011-10-16 11:59 ringbuffer-trace.pcap0
-rw-r--r-- 1 root root 9.6M 2011-10-16 12:01 ringbuffer-trace.pcap1
-rw-r--r-- 1 root root  65M 2011-10-16 11:57 ringbuffer-trace.pcap2
-rw-r--r-- 1 root root  65M 2011-10-16 11:57 ringbuffer-trace.pcap3
-rw-r--r-- 1 root root  65M 2011-10-16 11:57 ringbuffer-trace.pcap4
-rw-r--r-- 1 root root  65M 2011-10-16 11:58 ringbuffer-trace.pcap5
-rw-r--r-- 1 root root  65M 2011-10-16 11:58 ringbuffer-trace.pcap6
-rw-r--r-- 1 root root  65M 2011-10-16 11:58 ringbuffer-trace.pcap7
-rw-r--r-- 1 root root  65M 2011-10-16 11:58 ringbuffer-trace.pcap8
-rw-r--r-- 1 root root  65M 2011-10-16 11:58 ringbuffer-trace.pcap9
</pre>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2011/10/13/using-tcpdump-to-create-captures-for-later-analysis-in-wireshark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Provisioning Polycom SoundPoint IP 321 Phones &#8211; Elastix / Trixbox</title>
		<link>http://techanswers.co.uk/2011/10/13/auto-provisioning-polycom-soundpoint-321-phones-with-elastixtrixbox/</link>
		<comments>http://techanswers.co.uk/2011/10/13/auto-provisioning-polycom-soundpoint-321-phones-with-elastixtrixbox/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 16:43:58 +0000</pubDate>
		<dc:creator>taadmin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VoIP]]></category>

		<guid isPermaLink="false">http://techanswers.co.uk/?p=6</guid>
		<description><![CDATA[I recently had the task of deploying a new Elastix PBX and a hundred Polycom SoundPoint IP 321 Handsets. Managing this many handsets manually via the embedded web interfaces is daft as both Elastix and Trixbox come with an Endpoint Configurator that allows you to autoprovison phones. The problem is that the Endpoint Configurator that &#8230; </p><p><a class="more-link block-button" href="http://techanswers.co.uk/2011/10/13/auto-provisioning-polycom-soundpoint-321-phones-with-elastixtrixbox/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<p>I recently had the task of deploying a new Elastix PBX and a hundred Polycom SoundPoint IP 321 Handsets. Managing this many handsets manually via the embedded web interfaces is daft as both Elastix and Trixbox come with an Endpoint Configurator that allows you to autoprovison phones. The problem is that the Endpoint Configurator that ships with the latest versions of Elastix and Trixbox doesnt support many of the newer phones available today.</p>
<p>The solution I found was to manually download the latest version of the FreePBX Endpoint Manager from Github. The process below is based on Elastix, but i have also deployed the same module on TrixboxCE and the process is identical once the FreePBX module is uploaded.</p>
<p>This tutorial assumes that you have something like the following setup to begin with:</p>
<ul>
<li>An Elastix or Trixbox server installed, with layer 3 connectivity to your handsets.</li>
<li>The Elastix Box acting as a DHCP server for your handsets (not a requirement but you will have to ensure you properly setup TFTP options on whatever DHCP server you are using, see end of post)</li>
<li>A number of Polycom phones that haven&#8217;t been messed with too much (factory fresh or reset)</li>
<li>All the extensions you wish to assign to a handset already created in FreePBX (hint, maybe use the Bulk Extentions upload feature if you have a lot to do)</li>
</ul>
<p>Download this tarball: <a href="http://techanswers.co.uk/wp-content/uploads/2011/10/endpointmanager-v2.9.2.4.tar.gz">endpointmanager-v2.9.2.4.tar</a> or if you want to check for a newer version you can  <a href="https://github.com/tm1000/freepbx-endpointmanager/">visit the Endpoint Manager GitHub Repository</a> to obtain the module. When I grabbed the tarball from Github I had to rename the file, and rename one of the archives internal folders before FreePBX would allow me to upload it. The version I have directly linked above has already been renamed and is ready to upload.</p>
<p>Next, login to Elastix and navigate to the PBX  tab. You will need to click the &#8220;Unembedded freePBX&#8221; link to access the full range of FreePBX web panel options. IGNORE the Endpoint Configurator menu link on the Elastix menu bar. This is for the outdated configuration system.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/UnembedFreepbx1.png"><img class="aligncenter size-full wp-image-16" title="Unembedded freePBX" src="http://techanswers.co.uk/wp-content/uploads/2011/10/UnembedFreepbx1.png" alt="Unembedded freePBX" width="816" height="296" /></a><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/UnembedFreepbx.png"><br />
</a></p>
<p>In the new FreePBX window click the <strong>Tools Tab</strong> and select <strong>Module Admin</strong>. Click <strong>Upload Module</strong> and then once uploaded enable it and find the button to process the changes and install the module.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/enablemodule.png"><img class="aligncenter size-full wp-image-17" title="Enable Module" src="http://techanswers.co.uk/wp-content/uploads/2011/10/enablemodule.png" alt="Enable Module" width="797" height="138" /></a></p>
<p>You should now have an <strong>End Point Manager</strong> section under the Tools menu of FreePBX. The first thing to do is enter the <strong>End Point Configuration</strong> menu to enable some handset types.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/enablephonetypes2.png"><img class="aligncenter size-full wp-image-20" title="enablephonetypes" src="http://techanswers.co.uk/wp-content/uploads/2011/10/enablephonetypes2.png" alt="" width="557" height="284" /></a></p>
<p>Enable any handset types you need to auto provision. FreePBX will download a number of files (firmwares, profiles etc) and unpack them to the correct location ready to be served up via TFTP when the phones boot.</p>
<p>Its worth noting at this point that I was Applying Configuration Changes whenever the orange bar appeared at the top of FreePBX as shown below. You might not need to do this until the point your going to reboot your handsets, but I was clicking it any time there were changes to apply before proceeding to the next step.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/applychanges.png"><img class="aligncenter size-full wp-image-25" title="applychanges" src="http://techanswers.co.uk/wp-content/uploads/2011/10/applychanges.png" alt="" width="554" height="104" /></a></p>
<p>When you are done enabling device types click on the <strong>End Point Device List</strong> from the left hand menu. Enter the subnet your phones are in (e.g. 192.168.0.0/24 or 10.10.1.0/23 etc) and click Go! Endpoint Manager will sweep that subnet to discover supported devices.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/subnetsearch1.png"><img class="aligncenter size-full wp-image-22" title="subnetsearch" src="http://techanswers.co.uk/wp-content/uploads/2011/10/subnetsearch1.png" alt="subnetsearch" width="690" height="206" /></a></p>
<p>In a few moments you should have a list of all devices discovered, and you can click the checkbox by the Mac Address to select the phones you wish to configure, assign each to an existing FreePBX Extension and then click Add Selected Phones to save the provisioning configurations.</p>
<p><a href="http://techanswers.co.uk/wp-content/uploads/2011/10/unmanageddevices.png"><img class="aligncenter size-full wp-image-23" title="unmanageddevices" src="http://techanswers.co.uk/wp-content/uploads/2011/10/unmanageddevices.png" alt="" width="931" height="145" /></a></p>
<p>At this point you should click the &#8220;Apply Configuration Changes&#8221; orange  bar at the top of the FreePBX screen if it is present, and then reboot your phones, they should TFTP boot, grab firmware and config via TFTP and register with your Elastix server within a few minutes of being rebooted.</p>
<p>It is worth noting that I had to ensure that my DHCP tftp server option included the tftp:// prefix when provisioning the Polycom phones. The entry in /etc/dhcpd.conf that worked for me is:</p>
<p><code>option tftp-server-name "tftp://172.16.10.2";</code></p>
<blockquote><p>Useful Links:</p>
<p><a href="http://www.polycom.com/products/voice/desktop_solutions/soundpoint/desk_phones/soundpoint_ip321_331.html">http://www.polycom.com/products/voice/desktop_solutions/soundpoint/desk_phones/soundpoint_ip321_331.html</a></p>
<p><a href="http://www.elastix.org/">http://www.elastix.org/</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://techanswers.co.uk/2011/10/13/auto-provisioning-polycom-soundpoint-321-phones-with-elastixtrixbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

