Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 737448

Summary: VM's DHCP transaction ID is not random - it is based on the VM's MAC
Product: Red Hat Enterprise Linux 6 Reporter: Yaniv Kaul <ykaul>
Component: gpxeAssignee: Amos Kong <akong>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, ailan, djuran, jkt, juzhang, michen, mkenneth, shuang, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-01 02:31:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch: [dhcp] Use random transaction ID to associate messages none

Description Yaniv Kaul 2011-09-12 07:15:43 UTC
Description of problem:
It appears that when a VM is DHCP'ing, its DHCP transaction ID is the last 4 bytes of its MAC.
This is not in accordance to the RFC (http://www.networksorcery.com/enp/rfc/rfc2131.txt):

xid           4  Transaction ID, a random number chosen by the
                    client, used by the client and server to associate
                    messages and responses between a client and a
                    server.



Not sure what the consequences are, but it's wrong.


Version-Release number of selected component (if applicable):


How reproducible:
Look at the a DHCP of a VM booting (I've seen it with virtio-net)

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Amos Kong 2011-09-14 13:01:41 UTC
If boot up guest from disk, then launch the network interface, we can capture the real random ID (it changes every time).

I found this problem only exist when booting up guest from pxe.

gpxe/net/udp/dhcp.c:
/**
 * Calculate DHCP transaction ID for a network device
 *
 * @v netdev            Network device
 * @ret xid             DHCP XID
 *
 * Extract the least significant bits of the hardware address for use
 * as the transaction ID.
 */
static uint32_t dhcp_xid ( struct net_device *netdev ) {
        uint32_t xid;

        memcpy ( &xid, ( netdev->ll_addr + netdev->ll_protocol->ll_addr_len
                         - sizeof ( xid ) ), sizeof ( xid ) );
        return xid;
}

net/udp/dhcp6.c:
static uint32_t dhcp6_xid ( struct net_device *netdev ) {
...


According to this, moving this bug to gpxe Component.
This bug also exist in gpxe upstream.

Comment 5 Amos Kong 2011-09-17 00:24:09 UTC
Hi Yaniv, could you help to reply this mail?
http://marc.info/?l=kvm&m=131610214800469&w=2

What real problem do you touched? only not in accordance to the RFC?

Comment 10 David Juran 2011-09-20 07:23:00 UTC
I've tried the rom on http://fileshare.englab.nay.redhat.com/pub/section2/kvm/akong/virtio-net.rom and I managed to boot the VM three consecutive times. Of course this doesn't prove anything since the issue wasn't 100% reproducible in the first place but I'll update this Bz if I again manage to reproduce this issue again with the updated rom.

Comment 11 Suqin Huang 2011-09-21 02:38:54 UTC
reproduce it on gpxe-roms-qemu-0.9.7-6.7.el6.noarch

boot guest with -boot n 

[root@dhcp-8-125 ~]# tcpdump broadcast -i switch -vv|grep DHCP
tcpdump: listening on switch, link-type EN10MB (Ethernet), capture size 65535 bytes
    0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 9a:5e:b5:68:17:d8 (oui Unknown), length 387, xid 0xb56817d8, Flags [none] (0x0000)
	    DHCP-Message Option 53, length 1: Discover
    0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP, Request from 9a:5e:b5:68:17:d8 (oui Unknown), length 387, xid 0xb56817d8, Flags [none] (0x0000)

Comment 13 David Juran 2011-09-21 10:53:48 UTC
Tried again with the testing ROM from http://fileshare.englab.nay.redhat.com/pub/section2/kvm/akong/virtio-net.rom and today booting failed )-:
The boot went a bit further, (Sent a request and recieved an ACK but no TFTP started) Dump attached in  https://bugzilla.redhat.com/attachment.cgi?id=524184

Comment 20 Amos Kong 2012-02-01 02:31:17 UTC
No specific bug was mentioned in comment #1, and I didn't target any problem before applying this patch. So close this bug as NOTABUG.