IPwatchD an IP conflict detection tool for Linux

IPwatchD an IP conflict detection tool for Linux

IPwatchD an IP conflict detection tool for Linux

Project name: IPwatchD – IP conflict detection tool
Author: Jaroslav Imrich
Project’s Home Page: IPwatchD

 

Introduction

When using a GNU/Linux operating system, from time to time you may come across a situation where network connectivity was interrupted due to the IP conflict. An IP conflict event occurs when two or more hosts on the same network are configured with identical IP addresses. At the present, there appears to be no code in the Linux kernel to take care of this situation by means of appropriate Gratuitous ARP response . Very often a network administrator is left in the complete ignorance by the Linux kernel and needs to troubleshoot IP conflict the hard way. An IP Address Conflict GUI dialog triggered by IPwatchD Daemon Fortunately, there is a simple daemon called IPwatchD which main purpose is to catch and evaluate packets on the network and this way is able to prevent an IP conflict occurrence. This is done by help of libpcap library. IPwatchD daemon is written in C language and can run in passive or active modes. The difference between a passive and active mode is that in the passive mode IPwatchD only logs every IP conflict event by engaging syslog daemon, and in active mode IPwatchD takes one step further and responds to Gratuitous ARP request which is the main construction block when it comes to the IP conflict prevention. This article will explore this simple daemon in terms of installation, configuration and usage.

Prerequisites

Before we can install IPwatchD under the GNU/Linux operating system it is recommended to confirm that all prerequisites needed by IPwatchD are installed on the system. Here is a list of packages you would need to install on Ubuntu 8.10.

 * build-essential - C compiler and other development tools
* libpcap-dev - Network packet capture library
* libnet1-dev - Network packet construction library
* libnotify-dev - sends desktop notifications to a notification daemon

On ubuntu or debian linux you can install those packages with a following linux command:

# apt-get install build-essential libpcap-dev libnet1-dev libnotify-dev 

Read more

sakis3g the mobile broadband internet connection scrip

Mobile Broadband Internet connection and Sakis3G

This article is just a continuation of my first article about my experience with mobile broadband Internet on a Linux system. To cut the long story short a current network managers are trying to do a pretty good job by establishing a Mobile Broadband connection in a Plug & Play manner, however, they are not always successful to do so and user ends up with frustration and full hands of debugging and guessing what might went wrong instead of spending time with intended work.

Read more

Automatic HTML form submission using WWW::Mechanize

Here is a short tip on how to automatically submit a HTML form using a Linux command line and perl script. For this example we would need a WWW::Mechanize perl module and some basic PHP website. Let’s start with simple PHP website. The website will consist of two files:

form.php:

<form action="submit.php" method="post">
First Name: <input name="fname" type="text" />
Last Name: <input name="lname" type="text" />
<input type="submit" />
</form>

Read more

Choosing the right Linux File System Layout using a Top-Bottom Process

July 31, 2009
By Pierre Vignéras


Abstract:

As you may probably know, Linux supports various filesystems such as ext2, ext3, ext4, xfs, reiserfs, jfs among others. Few users really consider this part of a system, selecting default options of their distribution’s installer. In this article, I will give some reasons for a better consideration of the file-system and of its layout. I will suggest a top-bottom process for the design of a “smart” layout that remains as stable as possible over time for a given computer usage.

Introduction

The first question that you may ask is why are there so many file-systems, and what are their differences if any? To make it short (see wikipedia for details):

  • ext2: it is THE Linux fs, I mean, the one that was specifically designed for linux (influenced by ext and Berkeley FFS). Pro: fast; Cons: not journalized (long fsck).
  • ext3: the natural ext2 extension. Pro: compatible with ext2, journalized; Cons: slower than ext2, as many competitors, obsolete today.
  • ext4: the last extension of the ext family. Pro: ascending-compatibility with ext3, big size; good read performance; cons: a bit too recent to know?
  • jfs: IBM AIX FS ported to Linux. Pro: mature, fast, light and reliable, big size; Cons: still developed?
  • xfs: SGI IRIX FS ported to Linux. Pro: very mature and reliable, good average performance, big size, many tools (such as a defragmenter); Cons: none as far as I know.
  • reiserfs: alternative to ext2/3 file-system on linux. Pro: fast for small files; Cons: still developed?

There are other file-systems, in particular new ones such as btrfs, zfs and nilfs2 that may sound very interesting too. We will deal with them later on in this article.

So now the question is: which file-system is the most suitable for your particular situation? The answer is not simple. But if you don’t really know, if you have any doubt, I would recommend XFS for various reasons:

Read more

Resetting Vodafone USB mobile broadband device with usb_modeswitch

First time I used my vodafone USB mobile broadband device on my Fedora Linux system it worked perfectly . However, after couple minutes I got disconnected I was not able to connect again even when the blue light on the Vodafone USB mobile broadband device was making a clear blue blinking signal that network was found and all I need to do is to just connect. Eventually after many attempts to make an Internet connection I had reseted it with a usb_modeswitch command to make it working again. It is not guaranteed solution but its worth to try.

If you are in the same situation you may also try to reset your Vodafone USB mobile broadband device. To do that we first need vendor and product ID in a hexadecimal form. To get this information execute:

$ lsusb

Read more