2003-03-28 09:19:26

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: turning off kernel dhcp klient on _one_ nic?

hi

is it possible to turn off the kernel dhcp client / kernel autoconfiguration
on _one_ nic? We're using dual gigabit cards from intel (e1000), so splitting
up modular/static drivers obviously won't do the job. I've search through the
kernel doc, but I can't find anything...

best regards

roy
--
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.


2003-03-28 16:06:28

by Randy.Dunlap

[permalink] [raw]
Subject: Re: turning off kernel dhcp klient on _one_ nic?

On Fri, 28 Mar 2003 10:30:35 +0100 Roy Sigurd Karlsbakk <[email protected]> wrote:

| hi
|
| is it possible to turn off the kernel dhcp client / kernel autoconfiguration
| on _one_ nic? We're using dual gigabit cards from intel (e1000), so splitting
| up modular/static drivers obviously won't do the job. I've search through the
| kernel doc, but I can't find anything...

I've seen that, er, scenario, too.
I should have fixed it last night, but I had other things to do.

Can['t] you just mess around with (depending on distro, not kernel)
something like /etc/sysconfig/network-scripts/ifcfg-ethN (just rename
one of them so that it won't be used)?

This should totally disable half of the dual NIC. Do you want to only
disable dhcp on half of it, but keep it usable otherwise?
You can edit ./ifcfg-ethN and change the line
BOOTPROTO=dhcp
to
BOOTPROTO=

Something like that should work, but I haven't done it yet.
--
~Randy

2003-03-28 16:18:48

by Maciej W. Rozycki

[permalink] [raw]
Subject: Re: turning off kernel dhcp klient on _one_ nic?

On Fri, 28 Mar 2003, Roy Sigurd Karlsbakk wrote:

> is it possible to turn off the kernel dhcp client / kernel autoconfiguration
> on _one_ nic? We're using dual gigabit cards from intel (e1000), so splitting
> up modular/static drivers obviously won't do the job. I've search through the
> kernel doc, but I can't find anything...

You may specify which interface to use explicitly with the "ip="
parameter -- see net/ipv4/ipconfig.c for details.

--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [email protected], PGP key available +

2003-03-31 16:52:24

by Randy.Dunlap

[permalink] [raw]
Subject: Re: turning off kernel dhcp klient on _one_ nic?

On Fri, 28 Mar 2003 08:13:18 -0800 Randy.Dunlap <[email protected]> wrote:

| On Fri, 28 Mar 2003 10:30:35 +0100 Roy Sigurd Karlsbakk <[email protected]> wrote:
|
| | is it possible to turn off the kernel dhcp client / kernel autoconfiguration
| | on _one_ nic? We're using dual gigabit cards from intel (e1000), so splitting
| | up modular/static drivers obviously won't do the job. I've search through the
| | kernel doc, but I can't find anything...
|
| I've seen that, er, scenario, too.
| I should have fixed it last night, but I had other things to do.
|
| Can['t] you just mess around with (depending on distro, not kernel)
| something like /etc/sysconfig/network-scripts/ifcfg-ethN (just rename
| one of them so that it won't be used)?
|
| This should totally disable half of the dual NIC. Do you want to only
| disable dhcp on half of it, but keep it usable otherwise?
| You can edit ./ifcfg-ethN and change the line
| BOOTPROTO=dhcp
| to
| BOOTPROTO=
|
| Something like that should work, but I haven't done it yet.

I did this and it works. I had /etc/sysconfig/network-scripts/ifcfg-eth[01]
but I only want one of them alive, so I renamed ifcfg-eth1 to
not-ifcfg-ethbackup (since the ifcfg* files are searched for as /ifcfg*/).
Then I renamed ifcfg-eth0 to ifcfg-ethmain and (by using advice from
the thread on "NICs trading places ?"), I used 'nameif' to name the
eth0 interface to 'ethmain' by making an /etc/mactab file containing:

ethmain mac.address.for.live.interface

and I modified /etc/rc.d/init.d/network to run 'nameif' to change
the interface names as listed in the /etc/mactab file.

--
~Randy