2000-11-16 16:47:32

by " hip"

[permalink] [raw]
Subject: 2.2.18pre21 - IP kernel level autoconfiguration

It seem somewhere between 2.2.17 and the current 2.2.18 kernel, IP
kernel level autoconfiguration has been broken. Upon kernel loading
the Ethernet card is detected and loaded properly, but the bootp code
never seems to be executed and mounting the root partion via NFS then
fails from lack of IP configuration.

I haven't had any luck tracing down the root of this problem.

Anyone else experience this problem or have a patch to fix it?

Chip Schweiss


2000-11-16 18:32:53

by Luca Montecchiani

[permalink] [raw]
Subject: Re: 2.2.18pre21 - IP kernel level autoconfiguration

> It seem somewhere between 2.2.17 and the current 2.2.18 kernel, IP
> kernel level autoconfiguration has been broken. Upon kernel loading
> the Ethernet card is detected and loaded properly, but the bootp code
> never seems to be executed and mounting the root partion via NFS then
> fails from lack of IP configuration.
> I haven't had any luck tracing down the root of this problem.
> Anyone else experience this problem or have a patch to fix it?

Hi!

I've the same behavior here:

server kernel : 2.2.17
dhcpd : 2.0b1pl29
client kernel : 2.2.18-21
client cmdline: root=/dev/nfs nfsroot=/foo/bar ip=bootp

After some quick tests seem that if you want bootp
you _need_ to compile the client's kernel with _only_ bootp,
if you have also dhcp, it doesn't work :(

Dhcp into kernel is COOL and I hope that someone is
porting on 2.4 ;), doesn't seem that hard

hope this help,
luca

2000-11-17 15:48:32

by " hip"

[permalink] [raw]
Subject: RE: Re: 2.2.18pre21 - IP kernel level autoconfiguration


The problem seems to be deeper than that. I first encountered the
problem with only bootp compiled in. In my configuration I am not able
to supply kernel parameters on the client which may be why you were
able to get bootp to execute.

Chip



> It seem somewhere between 2.2.17 and the current 2.2.18 kernel, IP
> kernel level autoconfiguration has been broken. Upon kernel loading
> the Ethernet card is detected and loaded properly, but the bootp code
> never seems to be executed and mounting the root partion via NFS then
> fails from lack of IP configuration.
> I haven't had any luck tracing down the root of this problem.
> Anyone else experience this problem or have a patch to fix it?

Hi!

I've the same behavior here:

server kernel : 2.2.17
dhcpd : 2.0b1pl29
client kernel : 2.2.18-21
client cmdline: root=/dev/nfs nfsroot=/foo/bar ip=bootp

After some quick tests seem that if you want bootp
you _need_ to compile the client's kernel with _only_ bootp,
if you have also dhcp, it doesn't work :(

Dhcp into kernel is COOL and I hope that someone is
porting on 2.4 ;), doesn't seem that hard

hope this help,
luca

2000-11-17 16:03:19

by Luca Montecchiani

[permalink] [raw]
Subject: Re: 2.2.18pre21 - IP kernel level autoconfiguration

Chip Schweiss wrote:
>
> The problem seems to be deeper than that. I first encountered the
> problem with only bootp compiled in. In my configuration I am not able
> to supply kernel parameters on the client which may be why you were
> able to get bootp to execute.

Seem that you have to specify the "ip=bootp" options now

* <PROTO>:
* off|none - don't do autoconfig at all (DEFAULT)
* on|any - use any configured protocol
* dhcp|bootp|rarp - use only the specified protocol
* both - use both BOOTP and RARP (not DHCP)

Anyway I'll do more investigation about my problem to get bootp
work with dhcp compiled into kernel next week

luca

2000-11-20 17:34:02

by Luca Montecchiani

[permalink] [raw]
Subject: [PATCH] Re: 2.2.18pre21 - IP kernel level autoconfiguration

Luca Montecchiani wrote:
:
> Anyway I'll do more investigation about my problem to get bootp
> work with dhcp compiled into kernel next week

With the 2.2.18pre22 kernel and also pre21 last time I checked
if you compile the kernel with DHCP and BOOTP, it's impossible
to use bootp, you need to recompile the kernel without dhcp.

The problem (bug) is that dhcp code is _always_ executed also in
the case of bootp, breaking the procedure :(

I love to have dhcp and bootp compiled into kernel, so I can
chose my preferred protocol with the ip=XXXX option.

I don't like this _goto_ patch against 2.2.18pre22, but work :

--- ipconfig.c.old Mon Nov 20 17:01:16 2000
+++ ipconfig.c Mon Nov 20 17:34:01 2000
@@ -842,6 +842,8 @@
u32 server_id = INADDR_NONE;
int mt = 0;

+ if ( !(ic_proto_enabled & IC_USE_DHCP) ) goto nodhcp;
+
ext = &b->exten[4];
while (ext < end && *ext != 0xff) {
u8 *opt = ext++;
@@ -896,6 +898,7 @@

#endif /* IPCONFIG_DHCP */

+nodhcp:
ext = &b->exten[4];
while (ext < end && *ext != 0xff) {
u8 *opt = ext++;


ciao,
luca