[En-Nut-Discussion] DHCP and four Ethernuts, IP conflict

Ralph Mason ralph.mason at telogis.com
Mon May 5 20:49:59 CEST 2003


I suggest you check the rfc on dhcp

http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1531.html

Regards,
Ralph

> -----Original Message-----
> From: en-nut-discussion-admin at egnite.de
> [mailto:en-nut-discussion-admin at egnite.de]On Behalf Of Lars Andersson
> Sent: Monday, 5 May 2003 9:24
> To: en-nut-discussion at egnite.de
> Subject: RE: Re[2]: [En-Nut-Discussion] DHCP and four Ethernuts, IP
> conflict
> 
> 
> I have had some problem getting the NUT DHCP to work properly 
> with a Linux machine. Do you thing that the acceptance of the 
> unicast UDP datagrams may solve this problem?
> 
> I plan to try to implement some random value alg. using the MAC 
> and the timer for generating the xid. Is the xid parameter 
> supposed to be unique for each device and then repeat this value 
> each time or is it supposed to be unique for each request made?
> 
> Regards,
> Lars Andersson
> 
> 
> variable Regarding this xid
> 
> -----Original Message-----
> From: Mgr. Pavel Chromy [mailto:chromy at asix.cz]
> Sent: den 30 april 2003 11:32
> To: Lars Andersson
> Subject: Re[2]: [En-Nut-Discussion] DHCP and four Ethernuts, IP conflict
> 
> 
> Wednesday, April 30, 2003, 11:13:23 AM Lars wrote:
> 
> > If I understand it correctly the xid variable will be assigned 
> the value equal to the address where the nif struct is pointing 
> to. In case I liked to generate some random value for xid, is this the
> > place where this should be done?
> 
> That's right.
> But it is not that easy to obtain a real random value, pseudorandom
> common pseudorandom generator is not good for this task, especially
> when several devices are powered from single power suply, in this case
> taking system timer as initialization value for random generator may
> also fail. Good solution is to use some kind of hash from mac address
> or from combination of mac address and system timer.
> 
> Another aproach is to enable NutOS to receive unicast UDP datagrams
> when IP is unconfigured, which would enable using unicast DHCP
> (Linux dhcpd is using this by default).
> This could be done in NutIpInpuit() in ipin.c
> by changing this:
>         /*
>          * Silently discard datagrams for other destinations.
>          * However, if we haven't got an IP address yet, we
>          * allow ICMP datagrams to support dynamic IP ARP method.
>          */
>         if (dst == 0 || dst != nif->if_local_ip) {
> to:
>         if (dst == 0 || (dst!=nif->if_local_ip &&
>             (nif->if_local_ip || ip->ip_p!=IPPROTO_UDP || bcast))) {
> 
> 
> Mgr. Pavel Chromy
> ASIX s.r.o.
> Staropramenna 4
> 150 00 Praha 5
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.461 / Virus Database: 260 - Release Date: 10/03/2003
> 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.461 / Virus Database: 260 - Release Date: 10/03/2003




More information about the En-Nut-Discussion mailing list