3

I have a nice little iMX6 (an ARM CPU) board running Linux kernel 3.0.35 with hostapd 0.7.3. Setting up the wireless interface as an access point works fine but clients think they can be routed through it to the Internet. This would not be a problem except that I want to set up one client (my laptop) with its wired/Ethernet interface as lower priority than its wireless interface (which will connect to my AP). Right now when the laptop connects to the AP, its wireless interface takes precedence over its wired interface and all requests to Internet IPs fail (because the laptop is trying to route through the AP).

So I need to somehow set up the AP to "not advertise Internet access" so that clients don't attempt to reach Internet IP addresses through it. This is a hard thing to search for.

My AP configuration:

dhcpd.conf:

ddns-update-style none;

default-lease-time 86400;
max-lease-time 604800;

authoritative;

subnet 10.11.12.0 netmask 255.255.255.0 {
    range 10.11.12.14 10.11.12.99;
    option subnet-mask 255.255.255.0;
    option broadcast-address 10.11.12.255;
    option routers 10.11.12.13;
}

hostapd.conf:

interface=wlan0
ssid=Cameras
hw_mode=g
channel=6

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
     address 10.11.12.13 
     netmask 255.255.255.0
     network 10.11.12.0

1 Answer 1

4

Your problem is so obvious that you're going to knock yourself on the head once you see it: stop advertising a router -- get rid of your "option routers" line in your dhcpd.conf. If you do have a subnet behind your AP, you can have dhcpd push static routes with "option static-routes", IIRC. But you don't need a router pushed by dhcpd because your client and the AP both reside on the same subnet: no layer three routing is involved at all. And so, once you stop stepping on your system's already-established default gateway, everything should "just work."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .