What’s needed here is a proper seed, just as Neale wrote. It’s a ONE LINE change. Simply read the CPU tick register and you’re done.
D. From: Hu, Xuekun <xuekun...@intel.com> Sent: Tuesday, December 11, 2018 9:02 PM To: Neale Ranns (nranns) <nra...@cisco.com>; Dave Barach (dbarach) <dbar...@cisco.com>; vpp-dev <vpp-dev@lists.fd.io> Subject: RE: [vpp-dev] get the same IP address from DHCP server for two VPP DHCP clients To me, seems like it is not a real random generator. We need someone implement it. 😊 From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Neale Ranns via Lists.Fd.Io Sent: Tuesday, December 11, 2018 6:11 PM To: Hu, Xuekun <xuekun...@intel.com<mailto:xuekun...@intel.com>>; Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] get the same IP address from DHCP server for two VPP DHCP clients Hi Xuekun, The transaction ID used by VPP is from a series of random numbers, however, each VPP seeds the RNG the same, so the sequence will be the same. Please update: static clib_error_t * dhcp_client_init (vlib_main_t * vm) { dhcp_client_main_t *dcm = &dhcp_client_main; dcm->vlib_main = vm; dcm->vnet_main = vnet_get_main (); dcm->seed = 0xdeaddabe; <<<<< return 0; } the client-ID is user provided on the API. Regards Neale De : <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> au nom de Xuekun <xuekun...@intel.com<mailto:xuekun...@intel.com>> Date : mardi 11 décembre 2018 à 03:51 À : "Dave Barach (dbarach)" <dbar...@cisco.com<mailto:dbar...@cisco.com>>, vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Objet : Re: [vpp-dev] get the same IP address from DHCP server for two VPP DHCP clients No, they have different MACs. Here is the JIRA (https://jira.fd.io/browse/VPP-1528) with pcap captured. My quick glance found the two SUTs sent the same “transaction id” in the DHCP discover that why they got the same IP address. 1,SUT1_TX: [cid:image001.jpg@01D491EC.0DECA930] 2, SUT2_TX: [cid:image002.jpg@01D491EC.0DECA930] Is there anyone can take a look? 😊 Thanks. From: Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>> Sent: Monday, December 10, 2018 10:36 PM To: Hu, Xuekun <xuekun...@intel.com<mailto:xuekun...@intel.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Subject: RE: [vpp-dev] get the same IP address from DHCP server for two VPP DHCP clients Just to ask: is there any chance that the 2x UUT’s are using the same MAC address by mistake? D. From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Xuekun Sent: Monday, December 10, 2018 9:05 AM To: Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Subject: Re: [vpp-dev] get the same IP address from DHCP server for two VPP DHCP clients I also think it is a very basic functionality, so I tried with two different DHCP servers, but … ☹ I will attach the pcap file into the JIRA. Thanks. From: Dave Barach (dbarach) <dbar...@cisco.com<mailto:dbar...@cisco.com>> Sent: Monday, December 10, 2018 8:47 PM To: Hu, Xuekun <xuekun...@intel.com<mailto:xuekun...@intel.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Subject: RE: get the same IP address from DHCP server for two VPP DHCP clients This sounds more like dhcp server misconfiguration than a dhcp client bug in vpp, but anyway... You can submit a Jira ticket, but it will end up in “information request” state immediately if it doesn’t include a pcap capture which shows both transactions. The vpp dhcp client code is not new, and it’s been tested pretty carefully. HTH... Dave From: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Xuekun Sent: Monday, December 10, 2018 1:45 AM To: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Subject: [vpp-dev] get the same IP address from DHCP server for two VPP DHCP clients Hi, All Have anyone met the same issue? Should I submit a JIRA? I tried 18.10 and master, both the SUTs got the same IP address from my corporate DHCP server and my setup dnsmasq DHCP server. vpp configure: set int state TenGigabitEthernet6/0/1 up set dhcp client intfc TenGigabitEthernet6/0/1 show int address Thx, Xuekun
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11579): https://lists.fd.io/g/vpp-dev/message/11579 Mute This Topic: https://lists.fd.io/mt/28706858/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-