LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   how to stop automatically bringing up a network interface at boot (https://www.linuxquestions.org/questions/slackware-14/how-to-stop-automatically-bringing-up-a-network-interface-at-boot-738963/)

danielldaniell 07-09-2009 01:18 PM

how to stop automatically bringing up a network interface at boot
 
Hi!

So far when I boot Slackware(-current) it brings up all my network devices.
Can I configure it somehow to not bring up any network interface at boot, so I can manually enable them (be it wireless or wired)?

dugan 07-09-2009 02:06 PM

This is controlled by /etc/rc.d/rc.inet1.conf.

bgeddy 07-09-2009 02:31 PM

Have a look at Alien Bob's wiki page for setting up your network.

dive 07-09-2009 03:25 PM

chmod -x /etc/rc.d/rc.inet1

But then you would either need to chmod +x to start it manually, or use wicd for example.

bgeddy 07-09-2009 07:46 PM

Quote:

chmod -x /etc/rc.d/rc.inet1
The problem with this is that /etc/rc.d/rc.inet1 also brings up the loopback interface with 127.0.0.1. I don't think it's a good idea to not have this in place. If you must keep all interfaces down I think you'd be better editing /etc/rc.d/rc.inet1.conf to remove both DHCP and static IP assignments which will keep the interfaces down.

dive 07-09-2009 08:10 PM

Yes you are right. I typed in haste.

BrZ 07-09-2009 08:46 PM

Can he just turn it off on rc.local, like adding /etc/rc.d/rc.inet1 eth0_stop? Same for dhcpd and IP? I think he'll need loopback (127.0.0.1) locally, but it's not mandatory. My newbiness keeps bugging me with direct messing with rc.inet1, as for most time I just edited rc.inet1.conf...

Bruce Hill 07-09-2009 08:51 PM

Quote:

Originally Posted by danielldaniell (Post 3602471)
Hi!

So far when I boot Slackware(-current) it brings up all my network devices.
Can I configure it somehow to not bring up any network interface at boot, so I can manually enable them (be it wireless or wired)?

If that is your goal, perhaps wicd is what you'd prefer to use.

Be sure to read README.SLACKWARE so you set it up properly.

Once wicd is running, you can tell it to automatically connect,
or not to do so.

bgeddy 07-10-2009 05:06 AM

Quote:

Can he just turn it off on rc.local, like adding /etc/rc.d/rc.inet1 eth0_stop?
Yes he could add "/etc/rc.d/rc.inet1 stop" to send them all down but it just seems a little strange sending them up - waiting for DHCP (if that's how the interfaces are set up) and then sending them down again ! Maybe, as Bruce Hill says, wicd is the way to go. There are lots of ways to control this - Slackware never forces you into one way of doing things !!

stureedy 07-10-2009 08:37 PM

Perhaps I'm missing something, but can't one just edit /etc/rc.d/rc.inet1.conf and set IPADDR, NETMASK and USE_DHCP to "" for each network interface?

I believe that will activate loopback and nothing else. Then one could use WICD or the like to manage the interfaces.

My $0.02

Bruce Hill 07-10-2009 08:39 PM

Welcome to LQ!

You are exactly correct.

danielldaniell 07-13-2009 01:43 AM

no luck for me
 
Quote:

Originally Posted by stureedy (Post 3603892)
Perhaps I'm missing something, but can't one just edit /etc/rc.d/rc.inet1.conf and set IPADDR, NETMASK and USE_DHCP to "" for each network interface?

I believe that will activate loopback and nothing else. Then one could use WICD or the like to manage the interfaces.

My $0.02

Unfortunatelly, this is not working for me. I've added both my eth0 and wlan0 device (with IFNAME) and left everything empty, but during boot, both of my devices are coming up.

Nille_kungen 07-13-2009 02:02 AM

What doesn't work?
What happens and what did you want to happen?
Edit /etc/rc.d/rc.inet1.conf is the right way because you still need the loopback device.

bgeddy 07-13-2009 10:27 AM

Quote:

Unfortunatelly, this is not working for me. I've added both my eth0 and wlan0 device (with IFNAME) and left everything empty, but during boot, both of my devices are coming up.
This is the standard way of doing things. The interface will not be brought up unless /etc/rc.d/rc.inet1.conf has USE_DHCP[x]="yes" or IPADDR[x]="An.ip.address.set" where [x] is interface number "An.ip.address.set" is an IP address, obviously.

Note that you do not need IFNAME set for eth0 - just setup the IPADDR[0] stanza as the [0] implies eth0.

Perhaps you mean the devices themselves being detected - this is not what's usually termed "coming up". This is a setting on the device when it is put into an active state via /sbin/ifconfig (or other means). This is indicated when you run /sbin/ifconfig -a by an "UP" flag against the device.

Please - if you haven't already - check out Alien Bob's page on this subject and all will be revealed.

danielldaniell 07-13-2009 01:45 PM

more detailed description of problem
 
/etc/rc.d/rc.inet1.conf:
[...]
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]=""
DHCP_HOSTNAME[4]=""
[...]

Despite of this, on every boot, the wlan0 device will come up, which means:
$ ifconfig wlan0
wlan0 Link encap:Ethernet
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


How can I stop this behavior, and keep the wlan interface down?
(I'm not using wicd)


All times are GMT -5. The time now is 08:31 AM.