[Dnsmasq-discuss] replace radvd with dnsmasq

Uwe Schindler uwe at thetaphi.de
Mon Jul 22 12:45:36 BST 2013


The host running dsnmasq must have a (more or less static IPv6 address, e.g. prefix could be assigned by PPP together with dhcpv6-PD), also it must have a defined suffix (e.g., ::1), otherwise dnsmasq does not know the network.

The config could then be:

dhcp-range=::1,constructor:eth0,ra-stateless,ra-names
 
The "::1" is the suffix of the static address, constructor defines from which network adaptor the prefix comes from. This option also enables DHCPv6 - if you don't want that replace ra-stateless and ra-names by a different option. If you have a completely static IPv6 (including suffix that never changes), you can remove the constructor and only list the prefix including suffix. For maintainability, you should put your options into /etc/dnsmasq.conf and don't pass then through command line.
In any case, the DHCP start address (which is also used for RAs) must be assigned to the network adaptor, otherwise dnsmasq prints out a warning that it cannot find a valid prefix/range..

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe at thetaphi.de

> -----Original Message-----
> From: dnsmasq-discuss-bounces at lists.thekelleys.org.uk [mailto:dnsmasq-
> discuss-bounces at lists.thekelleys.org.uk] On Behalf Of iw3gtf at tiscali.it
> Sent: Monday, July 15, 2013 11:39 AM
> To: dnsmasq-discuss at lists.thekelleys.org.uk
> Subject: [Dnsmasq-discuss] replace radvd with dnsmasq
> 
> Hi,
> 
> I must say first I'm rather new to 'dnsmasq'.
> I'm using 'dnsmasq' v2.66 ounder linux:
> 
> #
> dnsmasq -k --log-facility=- --pid-file=/var/run/dnsmasq.pid --no-poll --
> enable-ra --leasefile-ro
> 
> dnsmasq[496]: started, version 2.66 cachesize 150
> dnsmasq[496]: compile time options: IPv6 GNU- getopt no-DBus no-i18n no-
> IDN DHCP DHCPv6 no-scripts no-TFTP no-conntrack ipset auth dnsmasq-dhcp
> [496]: IPv6 router advertisement enabled
> dnsmasq[496]: failed to load names from /etc/hosts: No such file or directory
> 
> I'm trying to configure dnsmasq as a replacement for 'radvd' but It does not
> work as expected.
> 
> Starting 'radvd' with the following simple config file:
> 
> # cat /etc/radvd.
> conf
> interface eth0 {
>  AdvSendAdvert on;
>  prefix 2001:db8:0:1::/64 {
>   AdvOnLink on;
> 
> AdvAutonomous on;
>  };
> };
> 
> has the immediate effect of assigning an ipv6 address to the eth0 network
> device on the host running 'radvd':
> 
> # ip a show dev eth0
> 2: eth0: <BROADCAST,MULTICAST,UP,
> LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
>     link/ether 00:03:c5:0c:7c:71 brd ff:
> ff:ff:ff:ff:ff
>     inet 10.0.0.53/8 brd 10.255.255.255 scope global eth0
>        valid_lft forever
> preferred_lft forever
>     inet6 2001:db8:0:1:203:c5ff:fe0c:7c71/64 scope global dynamic
> 
> valid_lft 86393sec preferred_lft 14393sec
>     inet6 fe80::203:c5ff:fe0c:7c71/64 scope link
> 
> valid_lft forever preferred_lft forever
> 
> *and* on every other host on the network segment connected to eth0.
> 
> I cannot reproduce the same behavior with 'dnsmasq'.
> I've tried different configuration
> variants without results.
> 
> Here are some questions:
> 
> How do I tell 'dnsmasq' which ipv6 network
> (prefix) it should use ?
> Am I supposed to manually assign an ipv6 address to the host before starting
> 'dnsmasq' ?
> Could you please suggest a simple config file for 'dnsmasq' that reproduces
> the behavior of 'radvd' ?
> 
> thanks you for your attention.
> 
> giorgio
> 
> 
> 
> Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot
> in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un amico al
> mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss




More information about the Dnsmasq-discuss mailing list