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?
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.
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 ----------
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.
???
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