M HYPE SPLASH
// updates

What's the default /etc/network/interfaces?

By John Peck

I messed up my network configuration. Can anyone help me and copy the default /etc/network/interfaces?

1

4 Answers

For eth0 with dhcp:

# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
iface eth0 inet dhcp

For eth0 static:

# The loopback network interface
auto lo eth0
iface lo inet loopback
# The primary network interface
iface eth0 inet static address 192.168.10.33 netmask 255.255.255.0 broadcast 192.168.10.255 network 192.168.10.0 gateway 192.168.10.254
dns-nameservers 192.168.10.254

link:

3

Mine looks like:

auto lo
iface lo inet loopback

Following the Debian network configuration page, if you're just using DHCP then all you need is something like:

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

Here are the default contents of /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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy