LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/network/interfaces too many parameters for iface line (https://www.linuxquestions.org/questions/linux-newbie-8/etc-network-interfaces-too-many-parameters-for-iface-line-4175491064/)

casperdaghost 01-12-2014 09:54 PM

/etc/network/interfaces too many parameters for iface line
 
I am trying to configure wireless for raspberry pi wheesy

when i set myself up with the static address i kept on getting there errors - ifplugd(eth0)[1881]: client: /etc/network/interfaces:8: too many parameters for iface line

Code:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static address 192.168.1.12 netmask 255.255.255.0 gateway 192.168.1.1
        wpa-ssid "foo"
        wpa-psk "bar"

here are the errors

Code:


Jan 13 02:53:15 raspberrypi kernel: [    6.734385] usbcore: registered new interface driver rtl8192cu
Jan 13 02:53:15 raspberrypi kernel: [  11.328850] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
Jan 13 02:53:15 raspberrypi kernel: [  11.800154] EXT4-fs (mmcblk0p6): re-mounted. Opts: (null)
Jan 13 02:53:15 raspberrypi ifplugd(wlan0)[1916]: ifplugd 0.28 initializing.
Jan 13 02:53:16 raspberrypi /usr/sbin/cron[1960]: (CRON) INFO (pidfile fd = 3)
Jan 13 02:53:16 raspberrypi /usr/sbin/cron[1962]: (CRON) STARTUP (fork ok)
Jan 13 02:53:16 raspberrypi /usr/sbin/cron[1962]: (CRON) INFO (Running @reboot jobs)
Jan 13 02:53:16 raspberrypi ifplugd(wlan0)[1916]: Using interface wlan0/80:1F:02:CC:72:33 with driver <rtl8192cu> (version: )
Jan 13 02:53:16 raspberrypi ifplugd(wlan0)[1916]: Using detection mode: wireless extension
Jan 13 02:53:16 raspberrypi ifplugd(wlan0)[1916]: Initialization complete, link beat not detected.
Jan 13 02:53:17 raspberrypi kernel: [  24.386887] Adding 102396k swap on /var/swap.  Priority:-1 extents:1 across:102396k SS
Jan 13 02:53:17 raspberrypi kernel: [  24.691521] smsc95xx 1-1.1:1.0: eth0: link up, 10Mbps, half-duplex, lpa 0x0020
Jan 13 02:53:17 raspberrypi ifplugd(eth0)[1881]: Link beat detected.
Jan 13 02:53:17 raspberrypi ifplugd(eth0)[1881]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
Jan 13 02:53:18 raspberrypi ifplugd(eth0)[1881]: client: /etc/network/interfaces:8: too many parameters for iface line
Jan 13 02:53:18 raspberrypi ifplugd(eth0)[1881]: client: /sbin/ifup: couldn't read interfaces file "/etc/network/interfaces"
Jan 13 02:53:18 raspberrypi ifplugd(eth0)[1881]: client: run-parts: /etc/ifplugd/action.d//ifupdown exited with return code 1
Jan 13 02:53:18 raspberrypi ntpd[2065]: ntpd 4.2.6p5@1.2349-o Fri May 18 20:30:57 UTC 2012 (1)
Jan 13 02:53:18 raspberrypi ntpd[2099]: proto: precision = 1.000 usec
Jan 13 02:53:18 raspberrypi ntpd[2099]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Jan 13 02:53:18 raspberrypi ntpd[2099]: Listening on routing socket on fd #17 for interface updates
Jan 13 02:53:18 raspberrypi ntpd[2099]: restrict: error in address '::' on line 38. Ignoring...
Jan 13 02:53:18 raspberrypi ntpd[2099]: restrict: error in address '::1' on line 42. Ignoring...
Jan 13 02:53:18 raspberrypi ifplugd(eth0)[1881]: Program execution failed, return value is 1.

however when i change iface line for wlan0, i don't get any error.

Code:

 

pi@raspberrypi ~ $ cat /etc/network/interfaces
auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
        address 192.168.1.12
        netmask 255.255.255.0
        gateway 192.168.1.1
        wpa-ssid "foo"
        wpa-psk "bar"

what is the difference - there is nothing in the man 5 interfaces that says that the address,. netmask and gatway parameterneed to be on seperate lines. the error was for eth0 but the only change that i made was on the iface line of wlan0

casperdaghost 01-13-2014 12:26 AM

actually the man page could be a little clearer on this point.
I swear in redhat that I put everything on the iface line and it works fine.

Code:

Stanzas defining logical interfaces start with a line consisting of the word "iface" followed by the name of the logical interface. In simple configurations without mapping stanzas this name should simply be the name of the physical interface to which it is to be applied. (The default mapping script is, in effect, the echo command.) The interface name is followed by the name of the address family that the interface uses. This will be "inet" for TCP/IP networking, but there is also some support for IPX networking ("ipx"), and IPv6 networking ("inet6"). Following that is the name of the method used to configure the interface.

Additional options can be given on subsequent lines in the stanza. Which options are available depends on the family and method, as described below. Additional options can be made available by other Debian packages.



All times are GMT -5. The time now is 11:08 PM.