-
Notifications
You must be signed in to change notification settings - Fork 4
/
manual.txt
117 lines (100 loc) · 7.46 KB
/
manual.txt
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
***************************************************************
* *
* ampr-ripd.c - AMPR 44net RIPv2 Listner and Route Injector *
* *
***************************************************************
Author: Marius Petrescu, YO2LOJ, <marius@yo2loj.ro>
Usage: ampr-ripd [-?|-h] [-d] [-v] [-s] [-r] [-i <interface>] [-a <ip|hostname|subnet>[,<ip|hostname|subnet>...]] [-p <password>] [-f <interface>] [-e <ip>] [-x <system command>]
Options:
-?, -h Usage info
-d Debug mode: no daemonization, verbose output
-v More verbose debug output
Using this option without debug leaves the console attached
-s Save routes to /var/lib/ampr-ripd/encap.txt (encap format),
if this file exists, it will be loaded on startup regardless
of this option
-r Compatibility only (ignored, raw sockets are always used)
-i <interface> Tunnel interface to use, defaults to tunl0
-t <table> Routing table to use, defaults to 'main'
-a <ip>[,<ip>...] Comma separated list of IPs, hostnames or ampr subnets to be ignored.
Subnets can be in full network/mask (e.g. 44.182.20.0/24) or encap (e.g. 44.182.20/24) format,
but MUST match an entry in the RIP broadcast
If a hostname is used, its IP will be re-resolved 30 sec after every RIP broadcast.
The List contains local interface IPs by default
-m <metric> Metric to be used when setting routes.
This is a numerical value from 0 to 255. Defaults to 0.
-w <window> Sets the TCP window size to a given value (defaults to 840).
This is needed since IP over AX.25 connections have small TCP window size.
A value of 0 diables setting the window size (not recommended, default value should be ok)
-p <password> RIPv2 password, defaults to the current valid password
-f <interface> Interface for RIP forwarding, defaults to none/disabled
-e <ip> Forward destination IP, defaults to 224.0.0.9 if enabled
-x <system command> Execute this system command after route set/change. If the command includes white spaces, use quotes.
Observation: All routes are created with protocol 44 for easy management
Signal handling:
- On signal SIG_HUP, ampr-ripd will delete all set routes, but will remain active,
so routes will be set again on next received RIPv2 set, and the saved encap file updated.
- On exit (SIG_TERM), ampr-ripd will delete all set routes and exit.
Debug:
- As set up in the makefile, wiyh the default debug level, using the -d option,
the daemon will stay in the forground and allow you to find the RIPv2 password
(see the find_pass.sh shell script).
- To have full debug output, it has to be compiled with -D HAVE_DEBUG or by
uncommenting the right DOPT line.
************************************************************************
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
************************************************************************
* Version History
* --------------------------------------------------------------------
* 0.9 14.Apr.2013 Alpha version, based on Hessus's rip44d
* 1.0 1.Aug.2013 First functional version, no tables, no TCP window setting
* 1.1 1.Aug.2013 Fully functional version
* 1.2 3.Aug.2013 Added option for using raw sockets instead of multicast
* 1.3 7.Aug.2013 Minor bug fix, removed compiler warnings
* 1.4 8.Aug,2013 Possible buffer overflow fixed
* Reject metrics 15 packets fixed
* 1.5 10.Aug.2013 Corrected a stupid netmask calculation error introduced in v1.4
* 1.6 10.Oct.2013 Changed multicast setup procedures to be interface specific (Tnx. Rob, PE1CHL)
* 1.7 8.Feb.2014 Added support for dynamic hostnames and ampr subnets in the exclude list
* 1.8 11.Feb.2014 Added option for route metric setting
* 1.9 13.Feb.2014 Added window size setting option and console detaching on daemon startup
* 1.10 14.Feb.2014 Small fixes on option and signal processing (Tnx. Demetre, SV1UY))
* Using daemon() instead of fork().
* Option -v without debug keeps console attached
* 1.11 17.Feb.2014 Changed netlink route handling to overwrite/delete only routes written by ampr-ripd
* 1.12 16.Nov.2014 Added the execution of a system command after route setting/change. This is done
* on startup with encap file present and 30 seconds after RIP update if encap changes.
* (Tnx. Rob, PE1CHL for the idea)
* 1.13 20.Nov.2014 Ignore subnets for which the gateway is inside their own subnet
* Reconstruct forwarded RIP messages to be able to send them even on ampr-gw outages
* Forwarded RIP messages do not use authentication anymore
* Forwarded RIP messages are sent 30 seconds after RIP update, otherwise every 29 seconds
* 1.14 21.Sep.2016 Password is included in the daemon. Only need to set it sould it ever change
* (OK from Brian Kantor - Tnx.)
* Added man page courtesy of Ana C. Custura and the DebianHams
* 1.15 21.Sep.2016 Removed multicast access mode, now only raw sockets are used
INSTALLATION
------------
-Compile with: gcc -O2 -o ampr-ripd ampr-ripd.c or use the make script
-Copy the file ampr-ripd to a proper location, e.g. /usr/sbin
-Create the folder /var/lib/ampr-ripd
-Launch with proper parameters as described above
Or:
-Just do a 'make install' in the source folder,
KNOWN ISSUES
------------
- when using other table than 'main', interogating the routes via netlink does not work properly.
This means that on any update, the route is deleted and then recreated, even if it is already set correctly.
This should be no problem since this happen only at startup on encap loading and on route change.