Bug 1258956 - failed to get ipv4 addr at the first time from dhcp server using ifup tool
failed to get ipv4 addr at the first time from dhcp server using ifup tool
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts (Show other bugs)
6.7
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: David Kaspar [Dee'Kej]
qe-baseos-daemons
:
Depends On:
Blocks: 1356047
  Show dependency treegraph
 
Reported: 2015-09-01 11:21 EDT by mohamadb
Modified: 2016-11-25 08:01 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-11 10:14:27 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mohamadb 2015-09-01 11:21:02 EDT
Description of problem:
- "ifup" tool succeed to set interface up at client side, however, can't get ipv4 addr at the first time from dhcp server.

- "dhclient" succeed to get ipv4 addr at the first time (working successfully).

Version-Release number of selected component (if applicable):
2.6.32-573.el6.x86_64

How reproducible:
configure dhcp server and client 

Server 
# /etc/dhcp/dhcpd.conf
ddns-update-style interim;

allow booting;
allow bootp;

ignore client-updates;
set vendorclass = option vendor-class-identifier;

subnet 12.22.0.0 netmask 255.255.0.0 {  

  option domain-name-servers  12.22.145.1;  
  option subnet-mask 255.255.0.0;
  range 12.22.2.10 12.22.2.25;   
  default-lease-time 21600;
  max-lease-time 43200;
}

CLient 
DEVICE=p1p1
BOOTPROTO=dhcp
ONBOOT=yes

Steps to Reproduce:
1. run dhcp sever 
2. ifup p1p1

Actual results:
# ifup p1p1                    

Determining IP information for p1p1... failed; no link present.  Check cable?
# ifup p1p1                               

Determining IP information for p1p1... done.

Expected results:
# ifup p1p1                               

Determining IP information for p1p1... done.

Additional info:

Client 

# cat /sys/class/net/p1p1/carrier
cat: /sys/class/net/p1p1/carrier: Invalid argument
# ifup p1p1

Determining IP information for p1p1... failed; no link present.  Check cable?
# echo $?
1
# cat /sys/class/net/p1p1/carrier
1
# ifup p1p1

Determining IP information for p1p1... done.

# tcpdump -i p1p1;
tcpdump: WARNING: p1p1: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on p1p1, link-type EN10MB (Ethernet), capture size 65535 bytes
18:13:09.993314 STP 802.1w, Rapid STP, Flags [Proposal, Learn, Forward], bridge-id 8000.90:b1:1c:fd:1a:45:c0.8019, length 43
18:13:10.697630 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 90:b1:1c:fd:18:8c (oui Unknown), length 310
18:13:10.698558 IP 12.22.145.1.bootps > 12.22.2.10.bootpc: BOOTP/DHCP, Reply, length 300
18:13:10.765944 ARP, Request who-has 12.22.2.10 (Broadcast) tell 0.0.0.0, length 28
18:13:11.766056 ARP, Request who-has 12.22.2.10 (Broadcast) tell 0.0.0.0, length 28
Comment 2 Jiri Popelka 2015-09-02 07:49:09 EDT
(In reply to mohamadb from comment #0)
> Actual results:
> # ifup p1p1                    
> 
> Determining IP information for p1p1... failed; no link present.  Check cable?

Reassigning to initscripts, which is where ifup belongs.
Comment 3 David Kaspar [Dee'Kej] 2016-11-11 10:14:27 EST
So, I have checked the code responsible for bringing up interface and obtaining ip from DHCP. It looks correct.

We have come to a conclusion with my colleague that you have most likely quite fast machine, so the interface configuration would actually timeout. (There's similar issue in RHEL7, but this is the first time we're seing this in RHEL6.)

Please, try to set LINKDELAY configuration option to some reasonable amount, to delay the interface initialization. This should help workaround the problem.

You can find more info about LINKDELAY in:
/usr/share/doc/initscripts/sysconfig.txt

In case you will still have this problem, feel free to reopen this BZ.

Note You need to log in before you can comment on or make changes to this bug.