User:Ssstephen/forever

From XPUB & Lens-Based wiki
A cropped screenshot of an Inc article I was recommended yesterday

When you ask $ ip addr the last line returned says:

valid_lft forever preferred_lft forever

but what does this mean? What is the difference between a preferred lifetime and a valid lifetime? Does something have to be forever to be preferred? Is forever always the most valid lifetime? What about suffering? What about pain? Range of experience, intensity, variety? Are IP addresses really meant to be forever? Does the old IP address still think it's forever when a new one is assigned? Does it know a new one has been assigned, is it hurt by that? Does the new IP address know there was one there before, that thought, and thinks, it is forever? Do preference and validity have to agree? If your preferences feel invalid, is it possible for that to ever change? Is there peace somewhere in this forever, or answers, or happiness? Does P=NP? Which lifetime is happier: the valid or the preferred? Does that make it better? Can you ever know if it takes forever?

sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Rep: Reputation: 36

Hi all,

I gave the folowing command

ip addr show eth0

to get the o/p as

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:80:ad:83:e4:75 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.17/24 brd 192.168.0.255 scope global eth0
inet6 fe80::280:adff:fe83:e475/64 scope link
valid_lft forever preferred_lft forever

now my question is what does valid_lft forever preferred_lft forever means ???

One reply. 1

Setting default valid_lft and preferred_lft values with Netplan on Unbutu 20.04
Asked 2 years, 7 months ago
Modified 2 years, 7 months ago
Viewed 5k times 

What's the impact, if any, on having values greater than zero/forever for valid_lft and preferred_lft? Should I worry about this, and if so, how to set it automatically to forever at boot time (preferably using Netplan)?

One answer. 2

jimmyc 
Registered User
43, 0 Member Information Avatar
valid_lft forever preferred_lft forever <-- what does this mean?
Just looking at my ethernet interface.. I see this response... what does this mean...?

ipconfig...
lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever

What does this mean what is it telling me ??

Thanks all !!

Zero responses. 3

IPv6 address preferred_lft forever?
 0 networking
Avatar
forum:ingber
8 years, 3 months ago
On my Ubuntu 14.04.1 I can see ipv6 addresses:

% ip -6 addr

…

inet6 XXXX:XXXX::XXXX:XXXX:XXXX:XXXX/64 scope global dynamic

validlft 2591986sec preferredlft 604786sec

For this address I would like to set preferred_lft forever. I have in my /etc/network/interfaces file:

up /sbin/ip -6 addr add XXXX:XXXX::XXXX:XXXX:XXXX:XXXX/64 dev eth0 preferred_lft 0
up /sbin/ip -6 addr add XXXX:XXXX::XXXX:XXXX:XXXX:XXXX/64 dev eth0 preferred_lft forever

where I changed preferred_lft from 0 to forever. However, after a reboot this has not changed the above output of ip -6 addr ?

Zero replies. 4