[Solved] Bring Network up on a minimal install

If none of the more specific forums is the right place to ask

[Solved] Bring Network up on a minimal install

Postby makh » 2018-07-01 12:39

Hi

I use a minimal install within virtualbox.

Today I tried:
Code: Select all
systemctl start network
ifup


wrt:
https://www.debian.org/doc/manuals/debian-reference/ch05
and
https://wiki.debian.org/NetworkConfiguration

But all failed to do it. I dont have network manager installed.

On my googling, this guy was dishearted too:
https://manurevah.com/blah/en/blog/Debian-How-to-restart-networking

but a reboot to bring the network up sounds silly.

Is there a specific systemd command for it?

Thankyou
Last edited by makh on 2018-07-09 15:17, edited 1 time in total.
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 611
Joined: 2011-10-09 09:16

Re: Bring Network up on a minimal install

Postby bw123 » 2018-07-01 13:03

I believe the systemd service is 'networking' not network, and it might need
to be restarted instead of started, since it is default enabled at boot.

ifup by itself does nothing, as you would have seen if you ran it?

Code: Select all
# ifup
ifup: no interface(s) specified
ifup: Use --help for help


Your question is a little confusing, I know you have been around a long while. systemd runs ifupdown configuration if it exists, but there is a network component to systemd also, as shown in your link. Why confuse the two? Which do you wish to use?
User avatar
bw123
 
Posts: 3135
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Bring Network up on a minimal install

Postby makh » 2018-07-03 04:30

Hi

I tried:
Code: Select all
systemctl stop networking

... works

Code: Select all
systemctl start networking

... fails

Code: Select all
systemctl restart networking

... fails

Thankyou
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 611
Joined: 2011-10-09 09:16

Re: Bring Network up on a minimal install

Postby makh » 2018-07-03 11:25

hi

I used:
Code: Select all
ifup -a

but its not bringing up the connection.
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 611
Joined: 2011-10-09 09:16

Re: Bring Network up on a minimal install

Postby bw123 » 2018-07-03 13:28

If you are using ifupdown, then the configuration in /etc/network/interfaces will probably be where the problem is.

The only thing I notice when restarting networking.service is the module for the device needs to be reprobed when using allow-hotplug in the interfaces file. On mine it's modprobe -r b43, then modprobe b43 and this notifies the kernel there is a new device and the iface does it's thing like it was newly inserted.

The better way might be just ifdown -a, change your interfaces file, then ifup -a you don't need to use systemd/systemctl?

ifupdown is pretty old, pretty well documented, thousands of threads on the internet and the forum about how to set it up.
User avatar
bw123
 
Posts: 3135
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Bring Network up on a minimal install

Postby debiman » 2018-07-03 15:25

makh wrote:... fails
... fails

how?
show us.
also
Code: Select all
systemctl | grep -i net
User avatar
debiman
 
Posts: 2499
Joined: 2013-03-12 07:18

Re: Bring Network up on a minimal install

Postby makh » 2018-07-03 18:12

debiman wrote:
makh wrote:... fails
... fails

how?
show us.
also
Code: Select all
systemctl | grep -i net

output:
Code: Select all
sys-devices-pci0000:00-0000:00:03.0-net-enp0s3.device                                    loaded active plugged   82540EM Gigabit Ethernet Controller (PRO/1000 MT Desktop Adapter)
sys-subsystem-net-devices-enp0s3.device                                                  loaded active plugged   82540EM Gigabit Ethernet Controller (PRO/1000 MT Desktop Adapter)
networking.service                                                                       loaded active exited    Raise network interfaces                                         
network-online.target                                                                    loaded active active    Network is Online                                                 
network.target                                                                           loaded active active    Network


ping:
Code: Select all
ping: debian.org: Temporary failure in name resolution
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 611
Joined: 2011-10-09 09:16

Re: Bring Network up on a minimal install

Postby Wheelerof4te » 2018-07-03 20:58

On minimal CLI install, ifupdown manages the network by parsing the configuration from /etc/network/interfaces file.
Obviously, post the output of:
Code: Select all
cat /etc/network/interfaces


See this wiki page for details:
https://wiki.debian.org/NetworkConfiguration
User avatar
Wheelerof4te
 
Posts: 1030
Joined: 2015-08-30 20:14

Re: Bring Network up on a minimal install

Postby debiman » 2018-07-04 11:11

your network is up.
seems to be a name resolution issue.
please show us:
Code: Select all
ping -c3 8.8.8.8
User avatar
debiman
 
Posts: 2499
Joined: 2013-03-12 07:18

Re: Bring Network up on a minimal install

Postby makh » 2018-07-09 15:16

Hi

Default file /etc/network/interfaces
Code: Select all
# The primary network interface
allow-hotplug enp0s3
iface enp0s3 inet dhcp


Changed the file /etc/network/interfaces
Code: Select all
# The primary network interface
auto enp0s3
allow-hotplug enp0s3
iface enp0s3 inet dhcp


Now its working, with:
Code: Select all
ifup -a


Thankyou
:)
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 611
Joined: 2011-10-09 09:16


Return to General Questions

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable