I have a raspberry pi and it has 2 configuration files in /etc/network/, although I set it up I'm very new to networking and not sure what each of the lines do or what the differences are between the two files, particularly with regards to eth0. The "active" file is copied as /etc/network/interfaces.

I read through this question but I have the following question:

With config 1 and the ethernet cable connected to the internet what is the expected behaviour? Also using config 1 is there any reason a windows computer shouldn't be able to connect to the ad hoc network?

Configuration 1:

The raspberry should create an ad hoc wifi network that someone can connect to.

auto lo
iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet
    wireless-channel 1
    wireless-essid RPiwireless
    wireless-mode ad-hoc

Configuration 2:

The raspberry pi will connect to the internet if it has the correct settings in the wpa file or if an ethernet cable is connected to it.

auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Your Answer

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

Browse other questions tagged or ask your own question.