[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to prefer temporary address? (raspbian / stretch)



On Saturday, 17 August 2019 11:26:36 BST Andrea Borgia wrote:
> Hello.
> 
> At the moment my raspy (stretch-based Raspbian) is getting a /128 static
> lease from my router out of the /48 I get from the he.net tunnel.
> It also has a /64 address which seems stable across reboots but is not a
> slaac address.
> 
> Where does this /64 address come from? In the logs I see it mentioned by
> avahi-daemon and dhcpd but I cannot find a corresponding lease file.
> More important, how do I get the sytem to generate and prefer a
> temporary address for outgoing connections?
> 
> Thanks,
> Andrea.
> 
> P.S.: also posted here in the Raspberrypi forum:
> https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=249079
Hello Andrea,
I have internet plus three private local networks, and each of the three three 
local networks has an assigned public address plus its own private local 
address for both IPv4 and (fd00::) IPv6, see RFC4193 / Unique Local IPv6 
Unicast Addresses.

For each box, I edit 

/etc/gai.conf for address preferences order

/etc/dhcpcd.conf for my choice of 
slaac private=0
and my fallback profile

#profile static_eth0
#static ip_address=192.168.1.23/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1 (a space separated list on one line)

#interface eth0
#fallback static_eth0

leaving the rest of /etc/dhcpcd.conf default/unset

I also add more local information in /etc/hosts for boxes sitting in my 
firewalled DMZ because they receive very limited DNS information.

The RaspberryPi does have its own IPv6 local part that is persistent over 
replacement of MicroSD card and operating system which is based on the MAC 
address embedded in the hardware. Other addresses can be added or deleted as 
normal using
# ip address [add | delete | show]

Hope that helps.

-- 
Chris Bell
Website http://chrisbell.org.uk


Reply to: