Well —
RTFM never fails!
I had brought over my /etc/network/interfaces file from Ubuntu to Debian. When I tried to restart the network:
sudo /etc/init.d/networking restart
I got:
Reconfiguring network interfaces…/etc/network/interfaces:1: too many parameters for iface line
ifdown: couldn’t read interfaces file “/etc/network/interfaces”
/etc/network/interfaces:1: too many parameters for iface line
ifup: couldn’t read interfaces file “/etc/network/interfaces”
failed.
Huh? This worked fine in Ubuntu, but NOT Debian! Debian != Ubuntu.
The second paragraph under description for
man interfaces
says:
Lines starting with `#’ are ignored. Note that end-of-line comments
are NOT supported, comments must be on a line of their own.
Okay so they changed the parser in Ubuntu. Once I got rid of the inline comments, and made sure there was a tab at the end of each line it worked!
cat /etc/network/interfaces
# define static ip for network interfaces
# note that debian does NOT allow inline comments
#
# man interfaces (2nd paragraph under description)
# Lines starting with `#' are ignored. Note that end-of-line comments are
#NOT supported, comments must be on a line of their own.
#
# make sure there is a tab each line
#
# gu 06/02/2012
# define eth0 as static
iface eth0 inet static
# and the static ip address
address 192.168.1.104
# the netmask
netmask 255.255.255.0
# the network
network 192.168.1.0
# broadcast group
broadcast 192.168.1.255
# and the gateway to the internet, is router ip
gateway 192.168.1.1
Who knew? Thanks for the reality check, nsadmin and epsilon on #debian.
This was driving me insane. Now I hope I can continue on to try openvpn.
Wayno
Related Articles
No user responded in this post