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 <[email protected]> Sent: Tuesday, December 11, 2018 9:02 PM To: Neale Ranns (nranns) <[email protected]>; Dave Barach (dbarach) <[email protected]>; vpp-dev <[email protected]> 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: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Neale Ranns via Lists.Fd.Io Sent: Tuesday, December 11, 2018 6:11 PM To: Hu, Xuekun <[email protected]<mailto:[email protected]>>; Dave Barach (dbarach) <[email protected]<mailto:[email protected]>>; vpp-dev <[email protected]<mailto:[email protected]>> Cc: [email protected]<mailto:[email protected]> 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 : <[email protected]<mailto:[email protected]>> au nom de Xuekun <[email protected]<mailto:[email protected]>> Date : mardi 11 décembre 2018 à 03:51 À : "Dave Barach (dbarach)" <[email protected]<mailto:[email protected]>>, vpp-dev <[email protected]<mailto:[email protected]>> 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:[email protected]] 2, SUT2_TX: [cid:[email protected]] Is there anyone can take a look? 😊 Thanks. From: Dave Barach (dbarach) <[email protected]<mailto:[email protected]>> Sent: Monday, December 10, 2018 10:36 PM To: Hu, Xuekun <[email protected]<mailto:[email protected]>>; vpp-dev <[email protected]<mailto:[email protected]>> 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: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Xuekun Sent: Monday, December 10, 2018 9:05 AM To: Dave Barach (dbarach) <[email protected]<mailto:[email protected]>>; vpp-dev <[email protected]<mailto:[email protected]>> 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) <[email protected]<mailto:[email protected]>> Sent: Monday, December 10, 2018 8:47 PM To: Hu, Xuekun <[email protected]<mailto:[email protected]>>; vpp-dev <[email protected]<mailto:[email protected]>> 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: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Xuekun Sent: Monday, December 10, 2018 1:45 AM To: vpp-dev <[email protected]<mailto:[email protected]>> 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: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
