Ok,
Well, after some investigation and patching (and noticing the bleedin'
obvious) I've got linux dhcp leasing through a CISCO.
The primary problem was that the ttl in the request IP packet was set
to 1 and hence was being thrown away by the router. (Patch is included
below). The strangest problems can have the most simplest solutions. :(
I've bumped the ttl to 128 (an arbitrary number, the same as the ttl in
an NT dhcpdiscover).
Also I've verified that with increased ttl and a udp checksum of zero
that the CISCO still honours the message. (Hence the previous patch
to set the correct checksum isn't specifically required).
However, a new problem arises. The BOOTP packet isn't honoured by the
DHCP server unless the hardware address is assigned an IP in the
DHCP configuration file. I've quickly modified the BOOTP config
area to include the option 'DHCPDISCOVER'.
I dont' know if this will break bootp or not. Is DHCP significantly
different?
Finally, as the DHCPOFFER packet can contain a lot of useful information
I was thinking it would be neat to have a 'dhcp' directory somewhere
in /proc. Being able to pull out information such as time servers,
name servers etc from the offer packet would be useful, especially
after (or during the later) boot stage(s). Thoughts? Comments?
-Greg
--- net/ipv4/ipconfig.c.orig Mon Jan 11 10:42:09 1999
+++ net/ipv4/ipconfig.c Mon Jan 11 11:19:03 1999
@@ -449,6 +449,11 @@
*e++ = 130;
*e++ = 83;
*e++ = 99;
+
+ *e++ = 53; /* DHCP Message Type */
+ *e++ = 1; /* length */
+ *e++ = 1; /* DHCPDISCOVER */
+
*e++ = 1; /* Subnet mask request */
*e++ = 4;
e += 4;
@@ -514,7 +519,7 @@
h->ihl = 5;
h->tot_len = htons(sizeof(struct bootp_pkt));
h->frag_off = htons(IP_DF);
- h->ttl = 1;
+ h->ttl = 128;
h->protocol = IPPROTO_UDP;
h->daddr = INADDR_BROADCAST;
h->check = ip_fast_csum((unsigned char *) h, h->ihl);
-Greg
------------------------------------------------------------------
Network Operations Center Manager Dr. Greg Wickham
Information Technology Services ______________________________
Deakin University Voice: (+61 3) 5227 8912
Geelong VIC 3217 eMail: [EMAIL PROTECTED]
Australia WWW: http://www.cm.deakin.edu.au/~gjw
------------------------------------------------------------------
ifiHadaDollArfoReveRytiMeapErsoNaskEdmeWhatThisBottOmliNeisAbouT:)
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]