-
Notifications
You must be signed in to change notification settings - Fork 1
A simple network manager and monitor for Linux
License
aholler/snetmanmon
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
snetmanmon A simple network manager and monitor for Linux (C) 2015 - 2018 Alexander Holler See the file LICENSE for the license. snetmanmon is a simple alternative to ifupdown, ifplugd, networkmanager, connman and similiar tools, which all lacked some functionality I wanted. In particular it makes it possible to not only react on (dis)appearing interfaces, but also on (dis)appearing IPs and (dis)appearing routes, besides the possibility to do actions based on the MAC of an interface too. Furthermore it's a tool to keep track (logging) of changes in regard to interfaces, IP addresses and routes on a machine. Something which becomes more important in times of virtual machines, containers and software-defined networking (SDN) and which isn't supported by the tools above. That means if you want to log the (dis)appearance of interfaces, IP addresses and routes on your machine, this tool might be your choice. But it also gives the possibility to do almost anything else if a network interface, an IP or route (dis)appears. E.g. if you want to start a DHCP-client if a WLAN dongle with a MAC a:b:c:d:e:f will be attached to your system and furthermore you want to start a NTP-client only if the IP i.j.k.m (or i::*) appears on interface ethN, this is easy possible to do with snetmanmon too. In short, if you have a ThingOfInternets (ToI) instead of an IoT, snetmanmon might be the right tool too. Have a look at the file snetmanmon.conf.full_example for documentation and a look at ipv6_rpc.txt for a creative usage example. Why is it called simple? Because it almost doesn't do any actions itself. E.g. It doesn't configure network interfaces nor does it do DHCP by itself, but instead relies on whatever tool the user prefers to accomplish such actions. This is in line with the old comcept on Unix systems of "Do One Thing and Do It Well". So, hopefully, snetmanmon does it well too. Describing how it works is simple too: snetmanmon listens for rtnetlink messages generated by the kernel and maintains an internal database of interfaces, IPs and routes in order to consolidate and extend the rtnetlink messages it received from the kernel for usage as consistent events in userspace. To build snetmanmon, call cmake -DCMAKE_BUILD_TYPE=release make Afterwards you just can call it with ./snetmanmon snetmanmon.conf.simple_example to test it (no special privileges are needed and nothing else will be executed). To build a package for Debian (tested with 8.0 (Jessie)), you need to install the packages build-essential, cmake, debhelper, libboost-dev, libboost-regex-dev and libboost-system-dev. Afterwards just call dpkg-buildpackage -us -uc To build a static version (e.g. for older systems where gcc >=4.7 isn't available) you need the static boost libraries and the static libstdc++ library (e.g. on Fedora you have to install boost-static and libstdc++-static, on Debian you are getting them with the -dev packages). To build a statically-linked binary, just use LDFLAGS=-static cmake -DCMAKE_BUILD_TYPE=release make If you want to show/use the MTU of routes, please have a look at the branch named mtu. I haven't merged it, because I think it's of no use for most people and I want to keep snetmanmon as simple as possible.
About
A simple network manager and monitor for Linux
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published