LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcpcd: eth0: renewing lease (https://www.linuxquestions.org/questions/linux-networking-3/dhcpcd-eth0-renewing-lease-836401/)

w1k0 10-05-2010 04:46 PM

dhcpcd: eth0: renewing lease
 
October 1st, 2010 I changed my Internet provider and since that day I encounter a lot of problems concerning my Internet connections. In this thread I’m describing the first one.

I use Slackware 13.1 on ThinkPad T60. My new provider delivered to me modem-router ASMAX AR 1004g. In my case Internet is provided through the analog phone line. Here’s the basic configuration of mentioned device:

● VPI: 0
● VCI: 35
● PPP over ATM (PPPoA)
● Encapsulation Mode: VC/MUX
● PPP Username: **********
● PPP Password: **********
● Authentication Method: AUTO

I don’t have to modify any configuration files in my system to get Internet connection. It’s enough to attach eth0 cable to the laptop. ASMAX modem-router establishes the connection automatically. In the basic configuration – described above – it gives to my machine an address from the private class 192.168.1.*.

# ifconfig eth0
Code:

eth0      Link encap:Ethernet  HWaddr ba:be:de:ad:ab:ed 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: deaf:abbe:bade:dead:beef:feed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:89 errors:0 dropped:0 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:18081 (17.6 KiB)  TX bytes:9028 (8.8 KiB)
          Memory:ee000000-ee020000

In such case log file looks well.

/var/log/messages:
Code:

Oct  5 19:18:20 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig lo 127.0.0.1
Oct  5 19:18:20 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
Oct  5 19:18:20 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -t 10  eth0
Oct  5 19:18:21 brightstar dhcpcd: version 5.2.2 starting
Oct  5 19:18:21 brightstar dhcpcd: eth0: waiting for carrier
Oct  5 19:18:22 brightstar kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
Oct  5 19:18:22 brightstar kernel: 0000:02:00.0: eth0: 10/100 speed: disabling TSO
Oct  5 19:18:22 brightstar dhcpcd: eth0: carrier acquired
Oct  5 19:18:22 brightstar dhcpcd: eth0: broadcasting for a lease
Oct  5 19:18:28 brightstar dhcpcd: eth0: offered 192.168.1.2 from 192.168.1.254
Oct  5 19:18:28 brightstar dhcpcd: eth0: acknowledged 192.168.1.2 from 192.168.1.254
Oct  5 19:18:28 brightstar dhcpcd: eth0: checking for 192.168.1.2
Oct  5 19:18:32 brightstar dhcpcd: eth0: leased 192.168.1.2 for 86400 seconds
Oct  5 19:18:32 brightstar dhcpcd: forking to background

When I want to get an Internet address from the public class I have to switch on the following ASMAX option:

● PPP IP extension

# ifconfig eth0
Code:

eth0      Link encap:Ethernet  HWaddr ba:be:de:ad:ab:ed 
          inet addr:77.24.14.10  Bcast:77.24.14.255  Mask:255.255.255.0
          inet6 addr: deaf:abbe:bade:dead:beef:feed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:221 errors:0 dropped:0 overruns:0 frame:0
          TX packets:123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:34986 (34.1 KiB)  TX bytes:12360 (12.0 KiB)
          Memory:ee000000-ee020000

In such case I get the following log messages in a never-ending loop:

Code:

dhcpcd: eth0: renewing lease of 77.24.14.10
brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds

Here’s a longer excerpt...

/var/log/messages:
Code:

Oct  5 19:27:26 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig lo 127.0.0.1
Oct  5 19:27:26 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
Oct  5 19:27:26 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -t 10  eth0
Oct  5 19:27:26 brightstar dhcpcd: version 5.2.2 starting
Oct  5 19:27:26 brightstar dhcpcd: eth0: waiting for carrier
Oct  5 19:27:28 brightstar kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
Oct  5 19:27:28 brightstar kernel: 0000:02:00.0: eth0: 10/100 speed: disabling TSO
Oct  5 19:27:28 brightstar dhcpcd: eth0: carrier acquired
Oct  5 19:27:28 brightstar dhcpcd: eth0: broadcasting for a lease
Oct  5 19:27:32 brightstar dhcpcd: eth0: offered 77.24.14.10 from 192.168.1.254
Oct  5 19:27:32 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:27:33 brightstar dhcpcd: eth0: checking for 77.24.14.10
Oct  5 19:27:38 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:27:38 brightstar dhcpcd: forking to background
.
.
.
Oct  5 19:27:53 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:27:53 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:27:53 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:28:08 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:28:08 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:28:08 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:28:23 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:28:23 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:28:23 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:28:38 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:28:38 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:28:38 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:28:53 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:28:53 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:28:53 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:29:08 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:29:08 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:29:08 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds
Oct  5 19:29:23 brightstar dhcpcd: eth0: renewing lease of 77.24.14.10
Oct  5 19:29:23 brightstar dhcpcd: eth0: acknowledged 77.24.14.10 from 192.168.1.254
Oct  5 19:29:23 brightstar dhcpcd: eth0: leased 77.24.14.10 for 30 seconds

So I ask you two questions:

1. Is it normal though slightly annoying situation or rather it’s a symptom of some serious problem?

2. Is there any method to avoid these messages?

niknah 10-05-2010 08:15 PM

The dhcp server shouldn't be leasing things out for 30 seconds, it should be more like several minutes or hours.

If you have no control over the server, try using -l ?? option with dhcpcd.
Or you could disable logging there, dhcp doesn't take up much bandwidth anyways but you may lose internet quickly if the dhcp server is not contactable for temporarily.

w1k0 10-05-2010 09:01 PM

I started the machine with unplugged eth0 cable, I logged myself into the system, I attached eth0 cable to the machine and I started Internet connection. The last command I run immediately after the next to last action. In the other case my new modem-router initializes Internet connection himself.

Here’s my command to manual run dhcpcd with 24 hours of leasing time:

# dhcpcd -l 86400 -d eth0
Code:

dhcpcd: version 5.2.2 starting
dhcpcd: eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: reading lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
dhcpcd: eth0: discarding expired lease
dhcpcd: eth0: broadcasting for a lease
dhcpcd: eth0: sending DHCP_DISCOVER (xid 0x91b0926b), next in 3.78 seconds
dhcpcd: eth0: offered 77.23.45.19 from 192.168.1.254
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x91b0926b), next in 4.63 seconds
dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
dhcpcd: eth0: checking for 77.23.45.19
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.31 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.09 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 77.23.45.19 for 30 seconds
dhcpcd: eth0: adding IP address 77.23.45.19/24
dhcpcd: eth0: adding route to 77.253.45.0/24
dhcpcd: eth0: adding default route via 77.23.45.19
dhcpcd: eth0: writing lease `/var/lib/dhcpcd/dhcpcd-eth0.lease'
dhcpcd: eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: forking to background

Here’s the result – the same as before:

# ifconfig eth0
Code:

eth0      Link encap:Ethernet  HWaddr ba:be:de:ad:ab:ed 
          inet addr:77.23.45.19  Bcast:77.253.45.255  Mask:255.255.255.0
          inet6 addr: deaf:abbe:bade:dead:beef:feed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:57 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:6993 (6.8 KiB)  TX bytes:1432 (1.3 KiB)
          Memory:ee000000-ee020000

/var/log/messages:
Code:

Oct  6 03:37:28 brightstar dhcpcd: version 5.2.2 starting
Oct  6 03:37:28 brightstar dhcpcd: eth0: broadcasting for a lease
Oct  6 03:37:28 brightstar dhcpcd: eth0: offered 77.23.45.19 from 192.168.1.254
Oct  6 03:37:28 brightstar dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
Oct  6 03:37:28 brightstar dhcpcd: eth0: checking for 77.23.45.19
Oct  6 03:37:32 brightstar dhcpcd: eth0: leased 77.23.45.19 for 30 seconds
Oct  6 03:37:33 brightstar dhcpcd: forking to background
Oct  6 03:37:47 brightstar dhcpcd: eth0: renewing lease of 77.23.45.19
Oct  6 03:37:47 brightstar dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
Oct  6 03:37:47 brightstar dhcpcd: eth0: leased 77.23.45.19 for 30 seconds
Oct  6 03:38:02 brightstar dhcpcd: eth0: renewing lease of 77.23.45.19
Oct  6 03:38:03 brightstar dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
Oct  6 03:38:03 brightstar dhcpcd: eth0: leased 77.23.45.19 for 30 seconds
Oct  6 03:38:18 brightstar dhcpcd: eth0: renewing lease of 77.23.45.19
Oct  6 03:38:18 brightstar dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
Oct  6 03:38:18 brightstar dhcpcd: eth0: leased 77.23.45.19 for 30 seconds
Oct  6 03:38:33 brightstar dhcpcd: eth0: renewing lease of 77.23.45.19
Oct  6 03:38:33 brightstar dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
Oct  6 03:38:33 brightstar dhcpcd: eth0: leased 77.23.45.19 for 30 seconds
Oct  6 03:38:48 brightstar dhcpcd: eth0: renewing lease of 77.23.45.19
Oct  6 03:38:48 brightstar dhcpcd: eth0: acknowledged 77.23.45.19 from 192.168.1.254
Oct  6 03:38:48 brightstar dhcpcd: eth0: leased 77.23.45.19 for 30 seconds

There is something wrong with my DHCP connections and I have no idea what should I do. Call to my provider? Inspect modem-router configuration? Use some specific command to run dhcpcd?

I will be grateful for any help.

niknah 10-05-2010 09:09 PM

The dhcp server on 192.168.1.254 is only letting you lease for 30 secs. If that's the router, check the settings there.

Anyways, it's probably harmless to leave it at 30 secs.

w1k0 10-05-2010 09:47 PM

I inspected my modem-router configuration twice:

First time with disabled PPP IP extension. In that case I couldn’t find any option concerning leasing time.

Second time with enabled PPP IP extension. In this case I found such option in LAN setup.

So it seems my modem-router is unable to set up leasing time concerning WAN setup.


All times are GMT -5. The time now is 08:57 AM.