<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=7123&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [HowTo] dhcp & udhcpc - Timeout for network connections]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=7123</link>
		<description><![CDATA[The most recent posts in [HowTo] dhcp & udhcpc - Timeout for network connections.]]></description>
		<lastBuildDate>Tue, 18 Mar 2025 14:40:56 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [HowTo] dhcp & udhcpc - Timeout for network connections]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=54983#p54983</link>
			<description><![CDATA[<p><span class="bbc">[ $(cat /sys/class/net/eth0/carrier) -eq 1 ]</span><br />is a logical expression. True, if the ethernet-cable is connected.</p>]]></description>
			<author><![CDATA[dummy@example.com (delgado)]]></author>
			<pubDate>Tue, 18 Mar 2025 14:40:56 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=54983#p54983</guid>
		</item>
		<item>
			<title><![CDATA[Re: [HowTo] dhcp & udhcpc - Timeout for network connections]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=54980#p54980</link>
			<description><![CDATA[<p>That&#039;s the important part I guess:</p><div class="codebox"><pre><code>pre-up [ $(cat /sys/class/net/eth0/carrier) -eq 1 ]</code></pre></div><p>But I don&#039;t understand it.<br />Where does the -eq option belongs to?<br />To the pre-up?</p>]]></description>
			<author><![CDATA[dummy@example.com (hacksenwerk)]]></author>
			<pubDate>Tue, 18 Mar 2025 13:04:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=54980#p54980</guid>
		</item>
		<item>
			<title><![CDATA[Re: [HowTo] dhcp & udhcpc - Timeout for network connections]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=54963#p54963</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>I want to have dhcp to try to establish a network connection at boot time, but when there is no ethernet cable plugged in, or no wlan card, it takes up to 60 seconds before dhcp gives up.</p></div></blockquote></div><p>I use this with my laptop.</p><div class="codebox"><pre><code>root@9600k:~# cat bin/lenovo_etc_network_interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The first card in the system added for devuan method of networking
# the pre-up is for stopping the annoying delay when the network cable is not connected.

auto eth0
    allow-hotplug eth0
    iface eth0 inet dhcp
        pre-up ip link set eth0 up &amp;&amp; sleep 1
        pre-up [ $(cat /sys/class/net/eth0/carrier) -eq 1 ]</code></pre></div><p>Forget where I got it when searching on the problem but it works perfectly every time it boots.</p>]]></description>
			<author><![CDATA[dummy@example.com (RedGreen925)]]></author>
			<pubDate>Sun, 16 Mar 2025 16:13:04 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=54963#p54963</guid>
		</item>
		<item>
			<title><![CDATA[[HowTo] dhcp & udhcpc - Timeout for network connections]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=54961#p54961</link>
			<description><![CDATA[<p>I want to have dhcp to try to establish a network connection at boot time, but when there is no ethernet cable plugged in, or no wlan card, it takes up to 60 seconds before dhcp gives up.</p><p>So let&#039;s decrease the timeout.</p><p>Edit </p><div class="codebox"><pre><code>/etc/dhcp/dhclient.conf</code></pre></div><p>Search for the line</p><div class="codebox"><pre><code>#timeout 60;</code></pre></div><p>uncomment it and change it to the value (amount of amount of seconds) you like. <br />For example: </p><div class="codebox"><pre><code>timeout 15;</code></pre></div><p>That&#039;s it.</p><p>Note 1: If the dhcp server did not offer an ip address before the time out runs down. you wont get an established network connection!</p><p>Note 2: udhcpc can be a replacement for isc-dhcp-client and isc-dhcp-common. I noticed, that it times out very quickly by default, when it can not find any of the interfaces defined in /etc/network/interfaces</p><p>Thanks to ralph.ronnquist (rrq) for helping with the timeout issue and mentioning udhcpc in IRC.</p>]]></description>
			<author><![CDATA[dummy@example.com (hacksenwerk)]]></author>
			<pubDate>Sun, 16 Mar 2025 13:01:04 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=54961#p54961</guid>
		</item>
	</channel>
</rss>
