3

How to disable LAN connection at startup in Debian Jessie? Ido not know what establishes that connection. Is it any configuration file or my wicd that starts on boot. But when I open wicd I can see that connection via the wire is established after system startup. I do not want this connection because the modem connection does not work then. How to disable LAN on boot?

interfaces file:

root@debian:cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
root@debian:/home/gameboy# 
trzczy
  • 630
  • 2
  • 9
  • 24
  • 1
    What is in /etc/network/interfaces ? – ivanivan Jan 05 '17 at 19:10
  • I put it into the question – trzczy Jan 05 '17 at 19:41
  • Your network isn't being brought up automatically during boot, so it would be WICD or NetworkManager or whatever your DE is using to do the connectiviity. – ivanivan Jan 05 '17 at 19:45
  • Actually you can disable networking from NetworkManager. Or you can leave LAN connection unconfigure.I also used modem connection.I didnt configure my LAN connection. – supriady Jan 06 '17 at 03:21
  • You can delete lan connection from wicd.You can add it again when you needed lan connection. – supriady Jan 06 '17 at 03:29
  • @supriady I have been looking for the switch in wicd gui or the option in wicd conf files to disable auto lan connection but have not succeed. I have two usb modems for internet and they stop working when the lan is connected. I do not know why. But roaima solution worked. Another solution was to unplug the lan cable. – trzczy Jan 06 '17 at 10:55

1 Answers1

3

These two lines define the actions to be applied to the eth0 interface:

allow-hotplug eth0
iface eth0 inet dhcp

The man page for interfaces (man interfaces) will describe it in glorious detail, but essentially, it's saying

  • If we have an eth0 interface, allow it to be defined
  • When we find eth0 bring it up with DHCP

In older versions of Debian you could simply comment out both lines. However, in newer versions this tells other network managers to take control of the interface, so that's not advisable.

Instead, change dhcp to manual, which tells the other network managers that you want control of the interface retained in this file, but that you don't want it brought up automatically:

allow-hotplug eth0
iface eth0 inet manual
roaima
  • 107,089
  • 14
  • 139
  • 261