added
[rrq/newlisp/arper.git] / arper.lsp.8.adoc
1 = arper.lsp(8)
2 :doctype: manpage
3 :revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
4 :COLON: :
5 :EQUALS: =
6
7 == NAME
8
9 arper.lsp - Emulate ipv4 presence on a tap by responding to ARP and ICMP.
10
11 == SYNOPSIS
12
13 *./arper.lsp* *-t* _tap_ _conf__
14
15 == DESCRIPTION
16
17 The *arper.lsp* program implements ARP and ICMP responding on a given
18 _tap_ interface for a selection of ipv4 addresses as specified in the
19 given configuration file. This emulates the presence of one or more
20 ipv4 hosts, as if the _tap_ was interfacing a network.
21
22 The configuration file has lines of "ipv4 mac comment" to declare
23 pairs of IP and MAC addresses to emulate.
24
25 Note that the _tap_ must be configured separately.
26
27 == EXAMPLE
28
29 === Emulating a single host
30
31 The configuration, "single", is as follows:
32 ----
33     192.168.1.2 02:00:00:00:00:02 some "random" host
34 ----
35
36 Commandline:
37 ----
38 # ./arper.lsp -t tap0 single &
39 # ifconfig tap0 192.168.1.1/24 up
40 # ping -n 192.168.1.2
41 # fg^C
42 ----
43
44 === Emulating three host on local network
45
46 The configuration, "triple", is as follows:
47 ----
48     192.168.1.2 02:00:00:00:00:02 some "random" host
49     192.168.1.20 02:00:00:00:00:02 another "random" host
50     192.168.1.200 02:00:00:00:00:02 and another "random" host
51 ----
52
53 Commandline:
54 ----
55 # ./arper.lsp -t tap0 single &
56 # ifconfig tap0 192.168.1.1/24 up
57 # ping -c 3 -n 192.168.1.2
58 # ping -c 3 -n 192.168.1.20
59 # ping -c 3 -n 192.168.1.22
60 # ping -c 3 -n 192.168.1.200
61 # fg^C
62 ----
63
64 Note that +192.168.1.22+ is not emulated.
65
66 === Emulating hosts on several network
67
68 The configuration, "triss", is as follows:
69 ----
70     192.168.1.2 02:00:00:00:00:02 some "random" host
71     192.168.2.2 02:00:00:00:00:02 another "random" host
72     192.168.3.2 02:00:00:00:00:02 and another "random" host
73 ----
74
75 Commandline:
76 ----
77 # ./arper.lsp -t tap0 single &
78 # ifconfig tap0 192.168.1.1/24 up
79 # ip addr add 192.168.2.1/24 dev tap0
80 # ip addr add 192.168.3.1/24 dev tap0
81 # ping -c 3 -n 192.168.1.2
82 # ping -c 3 -n 192.168.2.2
83 # ping -c 3 -n 192.168.3.2
84 # fg^C
85 ----
86
87 === NOTES
88
89 The *arper.lsp* script is prepared for handling ipv6 packets, but it
90 does not include any Neighbor Discovery activity.
91
92 == AUTHOR
93
94 Copyright 2021 Ralph Ronnquist <ralph.ronnquist@gmail.com>