Since my goal is to use the pi as router i would like also to connect an host through its ethernet interface, but i'm not able to do this because i can't get an IP address by the DHCP server (Dnsmasq). I've tried to the way to use a bridge interface between eth0 and wlan0, but with this one i can't get an IP via wifi.
This are my related config files:
Code: Select all
/etc/hostapd/hostapd.conf:
interface=wlan0
#bridge=br0 --> commented because with bridge mode I can't get an IP address when connecting to this wifi, even if the bridge interface is up following the guide linked above.
country_code=it
driver=nl80211
ssid=MySSID
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=MyPasswd
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
ieee80211n=1 # 802.11n support
wmm_enabled=1 # QoS support
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]Code: Select all
/etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto br0
iface br0 inet manual
bridge_ports eth0 wlan0Code: Select all
/etc/dhcpcd.conf (last lines)
interface usb0
static ip_address=192.168.0.163/24
static routers=192.168.0.1
static domain_name_servers=127.0.0.1
interface wlan0
static ip_address=192.168.1.1/24
static routers=192.168.1.1
static domain_name_servers=127.0.0.1
denyinterfaces eth0
denyinterfaces wlan0Code: Select all
/etc/dnsmasq.conf:
interface=wlan0
dhcp-range=192.168.1.20,192.168.1.254,255.255.255.0,24hThanks
Marco