Re: How to disable at-boot configuration of a network interface but permit manual use of rc.d?

2005-06-27 Thread Dario Freni
nduja# grep ifconfig_ed1 /etc/rc.conf
#ifconfig_ed1="DHCP"

nduja# sh /etc/rc.d/dhclient start
nduja# setenv ifconfig_ed1 DHCP
nduja# sh /etc/rc.d/dhclient start
Starting dhclient.
ed1: flags=108843 mtu 1500
inet6 fe80::250:baff:fe7a:a9bd%ed1 prefixlen 64 scopeid 0x3
inet 37.0.203.130 netmask 0xff00 broadcast 37.0.203.255
ether 00:50:ba:7a:a9:bd
media: Ethernet 10baseT/UTP 
status: active
nduja#

Regards,
Dario

-- 
Dario Freni ([EMAIL PROTECTED])
FreeSBIE developer (http://www.freesbie.org)
GPG Public key at http://www.saturnero.net/saturnero.asc


pgpZkgFf17ZuZ.pgp
Description: PGP signature


RE: How to disable at-boot configuration of a network interface but permit manual use of rc.d?

2005-06-27 Thread Seán C . Farley

On Mon, 27 Jun 2005, Darren Pilgrim wrote:


From: Niki Denev [mailto:[EMAIL PROTECTED]

Darren Pilgrim wrote:

There are some conditions to the task given by the subject:

1: The interface must be present at boot.
2: Use of /etc/rc.d scripts to start and stop the interface is
desirable.

The first condition poses no problem, just don't include the
relevant ifconfig_ifn line in /etc/rc.conf and the interface won't
be configured. But rc.d/dhclient and rc.d/netif won't work without
an ifconfig line for the interface.

Adding the ifconfig line and then listing every interface but the
one I want configured in network_interfaces does prevent it from
being configured at boot while having an ifconfig line in rc.conf,
but if I try to use rc.d/netif to start the interface, rc.d/netif
does nothing because it tests the interface against the contents of
network_interfaces and cloned_interfaces, so the interface I left
out will be excluded.

Have I overlooked an option somewhere?


What happens if you configure the interface in 'down' state, like :

ifconfig_fxp0="inet 192.168.0.10 netmask 0xff00 down"


Then rc.d/dhclient won't work.  The "DHCP" keyword must be present in
the ifconfig line in order for dhcpif to test true.  A similar logic
is in place for wpaif based on the "WPA" keyword.


I am not sure it will help, but have you tried playing with
/etc/start_if.DEVICE scripts?  I do not know where they are documented,
but you can configure a network device this way.  I used it in the past
to change the MAC address on a NIC at boot before the card was
configured in rc.conf.

Seán
--
[EMAIL PROTECTED]___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

RE: How to disable at-boot configuration of a network interface but permit manual use of rc.d?

2005-06-27 Thread Darren Pilgrim
From: Niki Denev [mailto:[EMAIL PROTECTED] 
> Darren Pilgrim wrote:
> > There are some conditions to the task given by the subject:
> > 
> > 1: The interface must be present at boot.
> > 2: Use of /etc/rc.d scripts to start and stop the interface
> > is desirable.
> > 
> > The first condition poses no problem, just don't include the
> > relevant ifconfig_ifn line in /etc/rc.conf and the interface won't
> > be configured. But rc.d/dhclient and rc.d/netif won't work without
> > an ifconfig line for the interface.
> > 
> > Adding the ifconfig line and then listing every interface but the
> > one I want configured in network_interfaces does prevent it from
> > being configured at boot while having an ifconfig line in rc.conf,
> > but if I try to use rc.d/netif to start the interface, rc.d/netif
> > does nothing because it tests the interface against the contents
> > of network_interfaces and cloned_interfaces, so the interface I
> > left out will be excluded.
> > 
> > Have I overlooked an option somewhere?
> 
> What happens if you configure the interface in 'down' state, like :
> 
> ifconfig_fxp0="inet 192.168.0.10 netmask 0xff00 down"

Then rc.d/dhclient won't work.  The "DHCP" keyword must be present in
the ifconfig line in order for dhcpif to test true.  A similar logic is
in place for wpaif based on the "WPA" keyword.

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: How to disable at-boot configuration of a network interface but permit manual use of rc.d?

2005-06-27 Thread Niki Denev

Darren Pilgrim wrote:

There are some conditions to the task given by the subject:

1: The interface must be present at boot.
2: Use of /etc/rc.d scripts to start and stop the interface is
desirable.

The first condition poses no problem, just don't include the relevant
ifconfig_ifn line in /etc/rc.conf and the interface won't be configured.
But rc.d/dhclient and rc.d/netif won't work without an ifconfig line for
the interface.

Adding the ifconfig line and then listing every interface but the one I
want configured in network_interfaces does prevent it from being
configured at boot while having an ifconfig line in rc.conf, but if I
try to use rc.d/netif to start the interface, rc.d/netif does nothing
because it tests the interface against the contents of
network_interfaces and cloned_interfaces, so the interface I left out
will be excluded.

Have I overlooked an option somewhere?



Hi,

What happens if you configure the interface in 'down' state, like :

ifconfig_fxp0="inet 192.168.0.10 netmask 0xff00 down"

P.S.: Just an idea, never tried it :)

--niki


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


How to disable at-boot configuration of a network interface but permit manual use of rc.d?

2005-06-27 Thread Darren Pilgrim
There are some conditions to the task given by the subject:

1: The interface must be present at boot.
2: Use of /etc/rc.d scripts to start and stop the interface is
desirable.

The first condition poses no problem, just don't include the relevant
ifconfig_ifn line in /etc/rc.conf and the interface won't be configured.
But rc.d/dhclient and rc.d/netif won't work without an ifconfig line for
the interface.

Adding the ifconfig line and then listing every interface but the one I
want configured in network_interfaces does prevent it from being
configured at boot while having an ifconfig line in rc.conf, but if I
try to use rc.d/netif to start the interface, rc.d/netif does nothing
because it tests the interface against the contents of
network_interfaces and cloned_interfaces, so the interface I left out
will be excluded.

Have I overlooked an option somewhere?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"