Blog Just another tech site

20Jul/121

Path MTU Discovery

MTU Path Discovery - Fragment Error

Checking the MTU on a path is a very simple and handy thing to know (but I still seem to forget the command line options). The MTU can be manually discovered through manipulation of the windows ping tool.

There are two extra command line options that are used for MTU discovery:

  • -l - Used to change the number of bytes sent in the icmp ping echo.
  • -f - set the flag do not fragment, so networking devices will reply with a icmp message if the packet is to large for the frame.

An example use of this would be "ping www.google.com -l 1400 -f".

If the size being sent outweighs the MTU it will throw the exception "Packet needs to be fragemented but DF set." Starting at a large packet size and lowering it gradually will manually allow you to find path MTU.

Path MTU Discovery

Filed under: Networking 1 Comment
7Jul/120

Windows – Finding which process is bound to a port

Sometimes I have the issue that a port is already bound to a port, stopping another process using that port. Other times I just plainly needed to find which process was using a particular port.

Usually a simple nmap scan of the localhost shows enough information to get by. For beginners after installing nmap simply run the command "nmap localhost" to run a regular scan. Nmap can be found here http://nmap.org/download.html

If the exact proccess bound to a port needs to be found a few steps need to be taken.

  1. Open command prompt and run the command "netstat -ao". -a displays all listening ports. -o lists the owning process ID.

    netstat -ao

  2. Find the related port, make sure to differenciate between TCP / UDP ports and take note of processes PID.
  3. Open up task manager and select View > Select columns.

    Task Manager - Show columns.

  4. Select the top checkbox for "PID (Process Identifier)".

    Task Manager - Select PID column.

  5. Now simply find the related PID from netstat in the processes tab. Now you should have your related process.

    Task manager PIDs showing.

7Jul/120

Multiple DNS suffixes in Windows

Working in multiple domains can be a hassel, but there are a few things to make life easier. I have needed to do this recently to allow quicker access to two standard domains containing users, servers and workstations and a domain dedicated networking equipment.

Why would you need to do this? In my case instead of typing a full qaulified domain name to access a device in another domain, the device name can be used. For example if I am in 'domain1.com' and I need to access 'device1' in 'domain2.com' normally the full name 'device1.domain2.com' would have to be used. Instead once the second dns sufix as been added to your network interface to access 'device1.domain2.com', only 'device1' would have to be input.

Steps to add other dns suffixes:

  1. In your desired network adapters settings, select IPv4's properties

    Select Ipv4 properties

  2. Select advanced in the properties dialogue.

    Select Advanced

  3. Select the DNS tab.

    Select the DNS tab.

  4. Select "Append these DNS suffixes (in order):" and add your desired domains.

    Select 'Append' and add the desired DNS suffixes.

 

Now you should be able to access the devices from other domains without the fully qualified domain name. I presume if there are exactly the same names in both domains, it will use the first match of domains in the list.

7Jul/120

Cisco IOS – Logging to a non standard syslog port

Recently I have been setting up a new logging system, but have needed to log to a different port than the usual 514 (UDP).

This is relatively easy depending on the version of IOS running. The following command will allow it:

logging host <IP> transport udp port <port number>

Non standard port logging

Some versions of IOS will not allow the command:

Alternate IOS version

From my experience 2960S and  3560E series switchs running Universal based IOS seem to allow the command but 3560G series dont allow it running an IPBased IOS.

Im assuming the command is only available in certain feature set versions of IOS.

Filed under: Cisco No Comments
4Jul/122

WordPress running on a Raspberry Pi Issues

I have been monitoring the Raspberry Pi running apache2, php5, mysql powering a wordpress blog under very low traffic. I have noticed the load times are very unreasonable, with every page load causing a 100% spike in cpu activity for a fair period of time.

Response Time (in ms)

As can be seen in the above graph load times were very extreme considering the device was solely used just for running wordpress and the related software.

Page load response times

Frequently the raspberry pi would become completely unresponsive even to SSH connections.

Raspberry Pi Unresponsive

Availability Chart

Obviously a low powered device like this simply cant handle the standard software's demands. Mathew Shadel's blog http://matthewshadel.com/raspberry-pi-webserver/ talks about some interesting ways minimalise the software load with different software, I may try this in the future but for now I want to try a few different things with my Pi and not have it tied up in a server room.

2Jul/120

WordPress running on a Raspberry Pi

Raspberry Pi

Just a heads up, there is a clone of this very blog running at http://blog.lachlanmiskin.com on a Raspberry Pi.

It is running the standard Debian install provided at the Raspberry Pi website running stock standard apache2/php5/mysql server. This is very heavy for the low powered Raspberry Pi so if your trying it out, expect very slow load times and occasional crashes. From my experiences it seems that with an overload will cause the whole system to become unresponsive and requires a power cycle.

There are other software packages around for lower powered linux servers which I may look in to sometime in the future.

I recently received an MK802, so who knows may the blog will be dished out from that eventually.

1Jul/122

Centos: Yum update error “file from install of conflicts with file from package”

Centos Yum Update Issue

Recently I decided to update a few linux servers that I maintain and found some issues while running yum update which were stopping updates. Many errors showing that file conflicts with the file from package etc. All of the servers are 64 bit, but it seemed that yum had previously downloaded 32 bit versions of the programs installed, so these useless copies have to be removed.

file /usr/share/man/man1/perlplan9.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386
file /usr/share/man/man1/perlpod.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386
file /usr/share/man/man1/perlpodspec.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386
file /usr/share/man/man1/perlport.1.gz from install of perl-5.8.8-38.el5.x86_64 conflicts with file from package perl-5.8.8-32.el5_7.6.i386

The steps I took to resolve the issues:

  1. yum remove \*.i386 \*.i686
  2. If you don't want to issue to reoccur, echo "exclude = *.i?86" >> /etc/yum.conf
  3. yum reinstall \* or yum update
Filed under: General Linux 2 Comments
1Jul/121

Recover lost VisionDrive password

VisionDrive Password Recovery Script

Recently I have been looking in to making the VisionDrive system more usable, more specifically being able to extract videos and audio without using the VDAnalyser program, which seems to re-encode when exporting, which would be affecting quality. While on my search I found some interesting things from a user called Wimpster. One of them being a perl script which displays information about the file structure from the VD-3000 system, luckily it is a very similar structure as the VD-8000 which I personally own. Wimpsters' original script can be found here, all credits are due to him, this script explains the structure of .vd files very well although there are changes with dual camera systems.

I edited the script and created a password recovery script of sorts. This would be handy if a password for a VisionDrive system has been lost, or if lawful access needs to be gained to the video files. The modified version can be found here. If either scripts are downloaded obviously change the extension to a .pl and run under perl and  the result will simply output to the terminal. The usage is as such:

./info.pl <file name>

The files can either be the _vd.cfp configuration file from the root of the SD Card or from a .vd video file. Interestingly enough the structure of the files are fairly simple and non of the passwords are hashed / encrypted. The code can be found after the break if the file is un-downloadable.