Mdns » Historial » Versió 6
Pau Escrich, 10-07-2014 20:22
1 | 3 | Pau Escrich | h1. Mdns: mesh DNS system |
---|---|---|---|
2 | 1 | Pau Escrich | |
3 | This is an example of bmx6 SMS plugin utilization. It is a distributed DNS system where every node publish the domains it is managing. |
||
4 | The current implementation is done for working in OpenWRT with the Dnsmasq daemon. |
||
5 | |||
6 | 4 | Pau Escrich | h3. Usage |
7 | 1 | Pau Escrich | |
8 | 5 | Pau Escrich | * /etc/init.d/mdns start -> starts the system (adds itself to the crontab) |
9 | * /etc/init.d/mdns stop -> stops the system (removes itself from crontab) |
||
10 | * /etc/init.d/mdns reload -> update the data |
||
11 | 1 | Pau Escrich | |
12 | 4 | Pau Escrich | h3. Files |
13 | 1 | Pau Escrich | |
14 | * /etc/mdns/public contains the list of domains we wanto to announce in the network |
||
15 | * /etc/mdns/hosts contains a list of "IP -> domain" which have been obtained from the network (dnsmasq looks on it) |
||
16 | 3 | Pau Escrich | |
17 | 4 | Pau Escrich | h3. Executation |
18 | 3 | Pau Escrich | |
19 | By default, even if there are not domains to publish in /etc/mdns/public file, the mdns script publish its own hostname.[ALL_ACCEPTED_TLDs] |
||
20 | |||
21 | The accepted TLDs can be configured in the variables DOMAINS4 and DOMAINS6, for IPv4 and IPv6 respectivelly. |
||
22 | So if someone publish "google.com" but your mdns instance is not accepting the ".com" TLD it will be discarted. |
||
23 | |||
24 | <pre> |
||
25 | root@UPClab104-1677:~# /etc/init.d/mdns start |
||
26 | -> preparing bmx6 |
||
27 | INFO uci_create_section: bmx6.cfg125cb5=syncSms |
||
28 | INFO uci_save_option: bmx6.cfg125cb5.syncSms=mdns |
||
29 | INFO uci_save_option: bmx6.cfg125cb5.syncSms=mdns |
||
30 | INFO : --syncSms mdns |
||
31 | -> adding addn-host entry to dnsmasq config file |
||
32 | -> restarting dnsmasq daemon |
||
33 | -> cleaning files |
||
34 | -> publishing own IPv4 domains: UPClab104-1677.qmp |
||
35 | 1 | Pau Escrich | -> publishing own IPv6 domains: UPClab104-1677.qm6 |
36 | -> added remote domains google.qmp pau.qmp tita.qmp SApalafolls-ebb2.qmp = 10.228.206.65 |
||
37 | -> added remote domains SApalafolls-ebb2.qm6 = 2012:0:0:ebb2::1 |
||
38 | 5 | Pau Escrich | |
39 | root@UPClab104-1677:~# ping google.qmp |
||
40 | PING google.qmp (10.228.206.65): 56 data bytes |
||
41 | 64 bytes from 10.228.206.65: seq=0 ttl=63 time=25.248 ms |
||
42 | 64 bytes from 10.228.206.65: seq=1 ttl=64 time=1.655 ms |
||
43 | 64 bytes from 10.228.206.65: seq=2 ttl=64 time=1.661 ms |
||
44 | 64 bytes from 10.228.206.65: seq=3 ttl=64 time=1.692 ms |
||
45 | 64 bytes from 10.228.206.65: seq=4 ttl=64 time=1.593 ms |
||
46 | ^C |
||
47 | --- google.qmp ping statistics --- |
||
48 | 5 packets transmitted, 5 packets received, 0% packet loss |
||
49 | round-trip min/avg/max = 1.593/6.369/25.248 ms |
||
50 | |||
51 | root@UPClab104-1677:~# ping SApalafolls-ebb2.qm6 |
||
52 | PING SApalafolls-ebb2.qm6 (2012:0:0:ebb2::1): 56 data bytes |
||
53 | 64 bytes from 2012:0:0:ebb2::1: seq=0 ttl=64 time=1.886 ms |
||
54 | 64 bytes from 2012:0:0:ebb2::1: seq=1 ttl=64 time=1.632 ms |
||
55 | 64 bytes from 2012:0:0:ebb2::1: seq=2 ttl=64 time=1.679 ms |
||
56 | 64 bytes from 2012:0:0:ebb2::1: seq=3 ttl=64 time=1.801 ms |
||
57 | ^C |
||
58 | --- SApalafolls-ebb2.qm6 ping statistics --- |
||
59 | 4 packets transmitted, 4 packets received, 0% packet loss |
||
60 | round-trip min/avg/max = 1.632/1.749/1.886 ms |
||
61 | |||
62 | 3 | Pau Escrich | </pre> |
63 | 1 | Pau Escrich | |
64 | 3 | Pau Escrich | |
65 | 4 | Pau Escrich | h3. Code |
66 | 2 | Pau Escrich | |
67 | 6 | Pau Escrich | [[http://dev.qmp.cat/projects/qmp/repository/revisions/kalimotxo/show/packages/bmx6-mdns]] |