I've done quite a bit of research on wireless adapters and it has become very clear to me that if you want to do something outside of the intended parameters for a device you'll want a device that uses an Atheros chip.
The chip in use here is the same model used by this guy. His solution was to try another device, I would imagine you will probably need to do the same.
It hasn't been updated in a while, but here is a chart showing supported chips for pfSense. It should be clear by this chart why I would recommend a device with an atheros chip. You can find information on which devices use a particular chip on wikidevi
How to set static IP address on Rasperry Pi Raspian
Don't use /etc/network/interfaces
to set static IP. Use /etc/dhcpcd.conf
instead.
Restore your /etc/network/interfaces
to the original file, or undo your changes:
sudo nano /etc/network/interfaces
Replace your changes with manual setting in /etc/network/interfaces
:
iface eth0 inet manual
Configure dhcpcd:
sudo cp /etc/dhcpcd.conf /etc/dhcpcd.conf.bak
sudo nano /etc/dhcpcd.conf
Add your static profile options to the bottom of /etc/dhcpcd.conf
:
interface eth0
static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
Remove leases:
sudo rm /var/lib/dhcp/*
Reboot:
reboot
Another option is to disable dhcpcd. After you disable dhcpcd, you can use /etc/network/interfaces
instead to set static IP.
Configure /etc/network/interfaces
:
sudo cp /etc/network/interfaces /etc/network/interfaces.bak
sudo nano /etc/network/interfaces
Replace manual setting with static settings in /etc/network/interfaces
:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.1
Configure dhcpcd:
sudo cp /etc/dhcpcd.conf /etc/dhcpcd.conf.bak
sudo nano /etc/dhcpcd.conf
Add the option to the bottom of /etc/dhcpcd.conf
:
denyinterfaces eth0
Or you can disable the dhcpcd service:
systemctl disable dhcpcd.service
Remove leases:
sudo rm /var/lib/dhcp/*
Reboot:
reboot
Source:
Best Answer
The hostname for your server is for the purpose of IP resolution local to your Pi. The router won't recognize it automatically.
The network protocol which is used for network communication does not use domain/host names, just MAC addresses - the former are mostly for the convenience of us humans.
Unless you have a router that actively queries hostnames from the machines set up on your LAN (haven't seen such a thing myself), your router recognizes devices by their MACs.
Your best bet is to simply:
You could set up a DNS server on your Pi, such as
bind9
, which would map your hostname to your IP address, but that requires a lot of configuration, and would only work on the computers that recognize that DNS server anyway (so computers/servers that you have specifically set up for this).If you want to refer to your Pi using it's hostname from your desktop/laptop, add the hostname/IP number pair to your computer's hosts file.