ifup after ifdown "no ip adress yet"

On Suse 9.3 I could start and stop my internet network (cable) with ifup eth0 and ifdown eth0.
Since Suse 10.3 and with suse 11, if I start th first time the interfase with ifup eth0, I get an ip address.
If I stop the interface with ifdown eth0 and then restart with ifup, I get the messaage “Starting DHCP Client … no ip address yet”. Afte I reboot the machine I can start the interfcae for one time.
Who can help me?

Mle56

I had this problem when I had knetworkmanager running. Do you have it running? Actually, there was a conflict. You can watch the messages from another terminal window and see what is happening while doing ifup.


tail -f /var/log/messages

Which is normal as NetworkManager and Ifup are mutually exclusive.

SuSE 9.3 didn’t have NWM (was introduced in 10.1) and is the default in newer versions, so maybe your suspicion is correct.

Thanks for your answer

I have no knetworker runing. The system runs in runlevel 3.

In the /var/log/messages are the following entries:

first ifup eth0

Apr 7 22:04:44 linux01 ifup: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 7 22:04:44 linux01 kernel: eth0: enabling interface
Apr 7 22:04:44 linux01 kernel: eth0: set link 10baseT auto
Apr 7 22:04:44 linux01 kernel: eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef01,0xffffffff,0xffff0008
Apr 7 22:04:44 linux01 kernel: eth0: set mode 0x7ffc0040, set sia 0xef01,0xffff,0x8
Apr 7 22:04:44 linux01 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 7 22:04:44 linux01 ifup-dhcp: Starting DHCP Client Daemon on eth0…
Apr 7 22:04:44 linux01 dhcpcd[3135]: eth0: dhcpcd 3.2.3 starting
Apr 7 22:04:44 linux01 dhcpcd[3135]: eth0: hardware address = 00:e0:29:0f:50:76
Apr 7 22:04:44 linux01 ifup-dhcp: .
Apr 7 22:04:45 linux01 kernel: NET: Registered protocol family 17
Apr 7 22:04:45 linux01 dhcpcd[3135]: eth0: broadcasting for a lease
Apr 7 22:04:46 linux01 ifup-dhcp: .
Apr 7 22:04:46 linux01 ifup-dhcp: .
Apr 7 22:04:47 linux01 kernel: eth0: link up, media 10baseT auto
Apr 7 22:04:47 linux01 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Apr 7 22:04:48 linux01 ifup-dhcp: .
Apr 7 22:04:48 linux01 dhcpcd[3135]: eth0: offered 192.168.0.101 from 192.168.0.1
Apr 7 22:04:48 linux01 dhcpcd[3135]: eth0: checking 192.168.0.101 is available on attached networks
Apr 7 22:04:49 linux01 ifup-dhcp: .
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: leased 192.168.0.101 for 345600 seconds
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: no renewal time supplied, assuming 172800 seconds
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: no rebind time supplied, assuming 302400 seconds
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: adding IP address 192.168.0.101/24
Apr 7 22:04:49 linux01 avahi-daemon[2459]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.0.101.
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: adding default route via 192.168.0.1 metric 0
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: adding route to 169.254.0.0/16 metric 0
Apr 7 22:04:49 linux01 avahi-daemon[2459]: New relevant interface eth0.IPv4 for mDNS.
Apr 7 22:04:49 linux01 avahi-daemon[2459]: Registering new address record for 192.168.0.101 on eth0.IPv4.
Apr 7 22:04:49 linux01 avahi-daemon[2459]: Registering new address record for fe80::2e0:29ff:fe0f:5076 on eth0.*.
Apr 7 22:04:49 linux01 modify_resolvconf: Service dhcpcd modified /etc/resolv.conf. See info block in this file
Apr 7 22:04:49 linux01 dhcpcd[3135]: eth0: exiting
Apr 7 22:04:49 linux01 syslog-ng[1448]: SIGHUP received, restarting syslog-ng
Apr 7 22:04:50 linux01 ifup-dhcp: IP/Netmask: ‘192.168.0.101’
Apr 7 22:04:50 linux01 syslog-ng[1448]: new configuration initialized
Apr 7 22:04:50 linux01 ifup-dhcp: / ‘255.255.255.0’
Apr 7 22:04:50 linux01 ifup-dhcp:
Apr 7 22:04:51 linux01 ifdown: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 7 22:04:52 linux01 ifup: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 7 22:04:55 linux01 SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 …
Apr 7 22:04:55 linux01 SuSEfirewall2: batch committing…
Apr 7 22:04:55 linux01 SuSEfirewall2: Firewall rules successfully set
Apr 7 22:04:56 linux01 kernel: klogd 1.4.1, ---------- state change ----------

ifdown eth0

Apr 7 22:06:15 linux01 gconfd (root-3459): GConf server is not in use, shutting down.
Apr 7 22:06:15 linux01 gconfd (root-3459): Exiting
Apr 7 22:07:35 linux01 ifdown: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 7 22:07:35 linux01 dhcpcd[3197]: eth0: received SIGTERM, stopping
Apr 7 22:07:35 linux01 dhcpcd[3197]: eth0: removing default route via 192.168.0.1 metric 0
Apr 7 22:07:35 linux01 dhcpcd[3197]: eth0: removing IP address 192.168.0.101/24
Apr 7 22:07:35 linux01 avahi-daemon[2459]: Withdrawing address record for 192.168.0.101 on eth0.
Apr 7 22:07:35 linux01 avahi-daemon[2459]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.101.
Apr 7 22:07:35 linux01 avahi-daemon[2459]: Interface eth0.IPv4 no longer relevant for mDNS.
Apr 7 22:07:36 linux01 modify_resolvconf: restored /etc/resolv.conf.saved.by.dhcpcd.eth0 to /etc/resolv.conf
Apr 7 22:07:36 linux01 dhcpcd[3197]: eth0: exiting
Apr 7 22:07:37 linux01 avahi-daemon[2459]: Withdrawing address record for fe80::2e0:29ff:fe0f:5076 on eth0.
Apr 7 22:07:37 linux01 kernel: eth0: disabling interface

second ufup eth0

Apr 7 22:08:25 linux01 ifup: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 7 22:08:25 linux01 kernel: eth0: enabling interface
Apr 7 22:08:25 linux01 kernel: eth0: set link 10baseT auto
Apr 7 22:08:25 linux01 kernel: eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef01,0xffffffff,0xffff0008
Apr 7 22:08:25 linux01 kernel: eth0: set mode 0x7ffc0040, set sia 0xef01,0xffff,0x8
Apr 7 22:08:25 linux01 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Apr 7 22:08:25 linux01 ifup-dhcp: Starting DHCP Client Daemon on eth0…
Apr 7 22:08:25 linux01 dhcpcd[3674]: eth0: dhcpcd 3.2.3 starting
Apr 7 22:08:25 linux01 dhcpcd[3674]: eth0: hardware address = 00:e0:29:0f:50:76
Apr 7 22:08:25 linux01 dhcpcd[3674]: eth0: broadcasting for a lease
Apr 7 22:08:25 linux01 ifup-dhcp: .
Apr 7 22:08:25 linux01 ifup-dhcp: .
Apr 7 22:08:27 linux01 kernel: eth0: link up, media 10baseT auto
Apr 7 22:08:27 linux01 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Apr 7 22:08:27 linux01 ifup-dhcp: .
Apr 7 22:08:28 linux01 avahi-daemon[2459]: Registering new address record for fe80::2e0:29ff:fe0f:5076 on eth0.*.
Apr 7 22:08:28 linux01 ifup-dhcp: .
Apr 7 22:08:37 linux01 syslog-ng[1448]: last message repeated 8 times
Apr 7 22:08:37 linux01 kernel: eth0: no IPv6 routers present
Apr 7 22:08:38 linux01 ifup-dhcp: .
Apr 7 22:08:41 linux01 syslog-ng[1448]: last message repeated 2 times
Apr 7 22:08:41 linux01 ifup-dhcp: no IP address yet… backgrounding.

MLe56

It looks like your machine is correctly sending the DHCP request but the DHCP server is not responding to the request. Can you snoop the network and verify this? (Need to install wireshark for this).


tethereal -i eth0

You should see a “DHCP Discover” packet with a Transaction ID going from your machine.
If the DHCP server is really responding to this, you should see the following 2 packets from 192.168.0.1.
(1) ICMP Echo (ping)
(2) DHCP Offer - with same Transaction ID

If you don’t see these packets, your DHCP server is not responding to the request. If possible, just power down and power up 192.168.0.1 (I hope it is a router) and see if it starts responding again (without ifdown/ifup - DHCP tries are happening in the background).

I have installed whireshark. After the first “ifup eth0” and then “tethereal -i eth0” I get:
0.000000 Arcadyan_d2:1a:d5 -> Broadcast ARP Who has 192.168.0.16? Tell 192.168.0.1
1.000949 Arcadyan_d2:1a:d5 -> Broadcast ARP Who has 192.168.0.16? Tell 192.168.0.1
5.004918 Arcadyan_d2:1a:d5 -> Broadcast ARP Who has 192.168.0.17? Tell 192.168.0.1
6.005981 Arcadyan_d2:1a:d5 -> Broadcast ARP Who has 192.168.0.17? Tell 192.168.0.1
10.009954 Arcadyan_d2:1a:d5 -> Broadcast ARP Who has 192.168.0.18? Tell 192.168.0.1
11.011015 Arcadyan_d2:1a:d5 -> Broadcast ARP Who has 192.168.0.18? Tell 192.168.0.1

After “ifdown eth0” and then “ifup eth0” I get
linux01:~ # tethereal -i eth0
Running as user “root” and group “root”. This could be dangerous.
Capturing on eth0
0.000000 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
3.003994 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
6.008046 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
9.012145 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
12.016159 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
Where should I see this Transaction ID by “ICMP Echo”

After a first “ifup eth0” I can send the command ifdown-dhecp/ifup-dhcp and it works correctly.

ifdown-dhcp eth0

Apr 9 07:07:09 linux01 dhcpcd[3115]: eth0: received SIGTERM, stopping
Apr 9 07:07:09 linux01 dhcpcd[3115]: eth0: removing default route via 192.168.0.1 metric 0
Apr 9 07:07:09 linux01 dhcpcd[3115]: eth0: removing IP address 192.168.0.101/24
Apr 9 07:07:09 linux01 avahi-daemon[2493]: Withdrawing address record for 192.168.0.101 on eth0.
Apr 9 07:07:09 linux01 avahi-daemon[2493]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.101.
Apr 9 07:07:09 linux01 avahi-daemon[2493]: Interface eth0.IPv4 no longer relevant for mDNS.
Apr 9 07:07:09 linux01 modify_resolvconf: restored /etc/resolv.conf.saved.by.dhcpcd.eth0 to /etc/resolv.conf
Apr 9 07:07:09 linux01 dhcpcd[3115]: eth0: exiting

ifup-dhcp eth0

Apr 9 07:09:19 linux01 ifup-dhcp: Starting DHCP Client Daemon on eth0…
Apr 9 07:09:19 linux01 dhcpcd[3488]: eth0: dhcpcd 3.2.3 starting
Apr 9 07:09:19 linux01 dhcpcd[3488]: eth0: hardware address = 00:e0:29:0f:50:76
Apr 9 07:09:19 linux01 dhcpcd[3488]: eth0: broadcasting for a lease
Apr 9 07:09:19 linux01 ifup-dhcp: .
Apr 9 07:09:19 linux01 dhcpcd[3488]: eth0: offered 192.168.0.101 from 192.168.0.1
Apr 9 07:09:19 linux01 dhcpcd[3488]: eth0: checking 192.168.0.101 is available on attached networks
Apr 9 07:09:20 linux01 ifup-dhcp: .
Apr 9 07:09:20 linux01 dhcpcd[3488]: eth0: leased 192.168.0.101 for 345600 seconds
Apr 9 07:09:20 linux01 dhcpcd[3488]: eth0: no renewal time supplied, assuming 172800 seconds
Apr 9 07:09:20 linux01 dhcpcd[3488]: eth0: no rebind time supplied, assuming 302400 seconds
Apr 9 07:09:20 linux01 dhcpcd[3488]: eth0: adding IP address 192.168.0.101/24
Apr 9 07:09:20 linux01 avahi-daemon[2493]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.0.101.
Apr 9 07:09:20 linux01 dhcpcd[3488]: eth0: adding default route via 192.168.0.1 metric 0
Apr 9 07:09:20 linux01 dhcpcd[3488]: eth0: adding route to 169.254.0.0/16 metric 0
Apr 9 07:09:20 linux01 avahi-daemon[2493]: New relevant interface eth0.IPv4 for mDNS.
Apr 9 07:09:20 linux01 avahi-daemon[2493]: Registering new address record for 192.168.0.101 on eth0.IPv4.
Apr 9 07:09:21 linux01 modify_resolvconf: Service dhcpcd modified /etc/resolv.conf. See info block in this file
Apr 9 07:09:21 linux01 dhcpcd[3488]: eth0: exiting
Apr 9 07:09:21 linux01 ifup-dhcp: IP/Netmask: ‘192.168.0.101’
Apr 9 07:09:21 linux01 ifup-dhcp: / ‘255.255.255.0’
Apr 9 07:09:21 linux01 syslog-ng[1430]: SIGHUP received, restarting syslog-ng
Apr 9 07:09:22 linux01 ifup-dhcp:
Apr 9 07:09:22 linux01 syslog-ng[1430]: new configuration initialized
Apr 9 07:09:22 linux01 ifdown: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 9 07:09:24 linux01 ifup: eth0 device: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 21)
Apr 9 07:09:26 linux01 SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 …
Apr 9 07:09:26 linux01 SuSEfirewall2: batch committing…
Apr 9 07:09:27 linux01 SuSEfirewall2: Firewall rules successfully set
Apr 9 07:09:28 linux01 kernel: klogd 1.4.1, ---------- state change ----------

Mle56

After “ifdown eth0” and then “ifup eth0” I get
linux01:~ # tethereal -i eth0
Running as user “root” and group “root”. This could be dangerous.
Capturing on eth0
0.000000 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
3.003994 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
6.008046 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
9.012145 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
12.016159 0.0.0.0 -> 255.255.255.255 DHCP DHCP Discover - Transaction ID 0xc288344c
Where should I see this Transaction ID by “ICMP Echo”

It looks like the router is not responding to your request this time.
I am not getting the full trace from this. Can you run “tethereal -i eth0” from annother terminal (Press Alt+F2 to get another terminal) while doing ifdown and ifup?

I think this is not a problem with the dhcp-router.
If I define a the first time static address with “ifconfig eth0 192.168.0.2” I can ping to the router with the address 192.168.0.1. If I send the command “ifdown eth0” and then I repeat “ifconfig eth0 192.168.0.2”, i get now answer from the router.
???

Mle56

It will work if you do “ifconfig eth0 192.168.0.2”. But, it is not DHCP then.

But this works only for the first time. After ifdown eth0, ifconfig eth0 192.168.0.2 it doesn’t work.

Mle56

First time you go 192.168.0.101 via DHCP.
So, if you try the same address after ifdown, it will work. (But this is not solving your real problem. It is just a work around).


ifconfig eth0 192.168.0.101 netmask 255.255.255.0 up

Thaks for youre answer, but it doesn’t work too. I think, I will change the networkcard next week.

Mle56