This chapter isn't so much about the physical alarm system per se as it is about protecting your home network from intruders. BeagleBone is connected to your home network, so it might as well do something in its spare time.
What we are going to do is install two small but very useful open source network monitoring software packages. The first package that we will be installing is MTR, which stands for MyTraceRoute. Anyone who has ever used trace route in either Linux or Windows will know that it is used to find the path to a given IP address.
Installation could not be simpler. Perform the following steps for installing MyTraceRoute:
/usr/src/
directory and then type:wget https://launchpad.net/mtr/main/0.85/+download/mtr-0.85.tar.gz
This will download the gzip tar ball to the user source directory.
tar -zxvf mtr-0.85.tar.gz.
./configure make make install
That's it. You are done.
Here, we have a couple of examples of the software at work. This example shows the route from my lab computer to the Yahoo! site:
In this example, 192.168.10.1
is the Internet gateway on my system's router. Lines 2 to 4 are my Internet service provider XPLORNET. As you can see in the columns, the software not only provides the hops, but it also provides the time for each hop and the packet loss.
This example is the route to Packt Publishing or www.packtpub.com.
The path through my router and XPLORNET is much the same. However, note the packet loss at hosts 9
and 10
.
Host 9
is showing a 73.0%
packet loss! Host 10
isn't much better. If this were occurring on a host that you had access to, it might be worth looking into. At least if you are having download problems, you now know where to look for the source. For example, the bottleneck can sometimes be with you service provider. So, we have a handy tool that you can access remotely via SSH, as I described earlier in the book. Is that cool or what?
The following is an excerpt from the MTR documentation, which is installed when you make
MTR:
SYNOPSIS
mtr [-hvrctglspeniu46] [--help] [--version] [--report]
[--report-wide]
[--report-cycles COUNT] [--curses] [--split] [--raw]
[--mpls] [--no-dns][--gtk][--address IP.ADD.RE.SS]
[--interval SECONDS][--psize BYTES | -s BYTES] HOSTNAME [PACKETSIZE]
More information on the use of MTR is installed when you enter make install
. Simply enter man mtr
(without the quotes) at the console.
18.188.98.148