I followed this link for setting my Raspberry Pi as an Access Point:
http://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/
Below are my configuration:
/etc/network/interfaces:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
up iptables-restore < /etc/iptables.ip4.nat
/etc/dhcp/dhcp.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.3 192.168.1.254;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "local";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
/etc/hostapd/hostapd.conf
interface=wlan0
ssid=RPi
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=myownkey
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
driver=nl80211
ieee80211n=1
hw_mode=g
ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:27:eb:14:1d:81
inet addr:192.168.1.16 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:332 errors:0 dropped:0 overruns:0 frame:0
TX packets:301 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29981 (29.2 KiB) TX bytes:38489 (37.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9612 (9.3 KiB) TX bytes:9612 (9.3 KiB)
mon.wlan0 Link encap:UNSPEC HWaddr 7C-DD-90-03-75-EE-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:130 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:14064 (13.7 KiB) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 7c:dd:90:03:75:ee
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:353 errors:0 dropped:0 overruns:0 frame:0
TX packets:278 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35307 (34.4 KiB) TX bytes:26632 (26.0 KiB)
I have WIFI dongle plugged into RPI USB port. When my RPI boots up I am able to access my newly created WIFI network "RPi" (as per config above). The client does gets assigned a new address - in my case it was 192.168.1.3. But I am neither able to ping other systems from my RPI or clients who join RPi WIFI network:
From RPI:
root@raspberrypi:~# ping 198.168.1.92
connect: Network is unreachable
root@raspberrypi:~#
From 198.168.1.3:
# ping 198.168.1.92
From 192.168.2.3 ... Destination Host Unreachable
How can I correct the same? Also is it possible to assign clients a set of different network address say from range - 107.0.0.1 to 107.0.0.254?