You are not logged in.
Pages: 1
Introduction:
Sometimes an installation finishes without setting up a working network connection. In such cases, a user might find themselves requiring network access to get the necessary packages to properly setup Wifi.
Warning:
Some wifi manufactures do not cooperate with open source developers to publish the required information about their devices so that free software developers can write open drivers. In this case, either reverse engineering takes place when possible technically and legally, or a proprietary closed driver is provided.
For a list of Wifi makers and whether they provide open source drivers check the link: https://wiki.debian.org/WiFi
Note:
Please note that once you have a wifi driver installed you can use a network manager to manage your connection. If you decide to do that, comment any lines added to your /etc/network/interfaces as a result of this howto.
The Procedure for Wifis using encryption:
Open a terminal and run nano to open /etc/network/interfaces.
# nano /etc/network/interfaces
For Wifi add these lines:
iface wlan0 inet dhcp
wpa-ssid my_wifi_name
wpa-psk "my_very_hard_password"
Replace my_wifi_name with your wifi's SSID and my_very_hard_password with your wifi password.
Save and exit nano.
To connect, use ifup as follows:
# ifup wlan0
Please note you may need to use another name for wlan0. You can list your network devices by running:
ip link
Ifup will display text informing the user whether a connection has been established.
To disconnect a connection established with ifup, run:
# ifdown wlan0
The Procedure for OPEN Wifis:
First bring up the network interface wlan0 or whatever you have.
#ifconfig wlan0 up
Assuming your wifi hotspot's name, ESSID, is freeopenwifi, run:
# iwconfig wlan0 essid freeopenwifi
Run dhclient to assign an ip address so that the connection becomes useable.
# dhclient wlan0
To disconnect a connection established with ifconfig and iwconfig, follow the following short procedure:
First clear the DHCP lease with:
# dhclient -r wlan0
Then, either bring the connection down:
# ifconfig wlan0 down
OR force a null connection:
# iwconfig wlan0 ap 00:00:00:00:00:00
Enjoy.
Last edited by edbarx (2016-12-09 06:49:18)
Offline
I found this helpful. Thankyou. It was short and effective.
"The obstacle is the path."
Offline
Setnet - Text-based User Interface tool for ethernet and wi-fi network configuration
http://kalos.mine.nu/setnet/
setnet
wpasupplicant
net-tools
iputils-ping
bind9-host
traceroute
Make sure wpasupplicant was running before starting setnet.sh
run these in separate terminals:
sudo ifup wlan0 &
sudo setnet.sh
Offline
Is /etc/network/interfaces a safe place for passwords?
I put mine in /etc/wpa_supplicant/wpa_supplicant.conf... see wpa_passphrase... and the interface definition in /etc/network/interfaces only contains...
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Maybe having passwords in /etc/network/interfaces is ok too... if chmod-ed not to be world readable... what side effects might that have? Does it need to be o+r for some other functionality?
Offline
Nice guide!
Though I'm a little curious why you switch between ip and ifconfig and not stick with just one or the other. You mention the use of ip first, so why not stick with it?
For example,
ifconfig wlan0 up
is accomplished with
ip link set wlan0 up
. And down:
ip link set wlan0 down
.
Offline
Does this handle priorities or hotplug?
Offline
For example,
ifconfig wlan0 up
is accomplished with
ip link set wlan0 up
. And down:
ip link set wlan0 down
.
the ip link way its better .. by example when some interface are gone due broken hotplug usb.. the ifconfig way does not work...
Last edited by mckaygerhard (2017-06-13 01:26:14)
Offline
Pages: 1